unified structure of navbar and footer

This commit is contained in:
2025-11-13 22:32:00 +13:00
parent b4cf4e88bc
commit a2c3f0c7cb
2 changed files with 17 additions and 27 deletions

View File

@@ -1,29 +1,27 @@
--- ---
const links = [ const links = [
{ {
text: "src", txt: "src",
href: "https://github.com/breadone/breadone.net" lnk: "https://github.com/breadone/breadone.net"
}, },
{ {
text: "bsky", txt: "bsky",
href: "https://bsky.app/profile/breadone.xyz" lnk: "https://bsky.app/profile/breadone.xyz"
}, },
{ {
text: "email", txt: "email",
href: "mailto:contact@breadone.net" lnk: "mailto:contact@breadone.net"
}, },
] ]
--- ---
<footer class="text-xl mt-auto"> <footer class="text-xl mt-auto">
{ {
links.map(l => ( links.map((l, i) => (
<a <>
class="ps-2" <a href={l.lnk}>{l.txt}</a>
href={l.href} {i < links.length - 1 && <span class="text-(--accent)"> | </span>}
> </>
{l.text}
</a>
)) ))
} }
</footer> </footer>

View File

@@ -17,19 +17,11 @@ const links = [
<div class="text-2xl"> <div class="text-2xl">
{ {
links.map(l => ( links.map((l, i) => (
<>
<a href={l.lnk}>{l.txt}</a> <a href={l.lnk}>{l.txt}</a>
)).join(<span class="text-(--accent)"></span>) {i < links.length - 1 && <span class="text-(--accent)"></span>}
</>
))
} }
<!-- <a href="/now">now</a>
<span class="text-(--accent)">•</span>
<a href="/posts">posts</a>
<span class="text-(--accent)">•</span>
<a href="/photos">photos</a> -->
<!-- • <a href="/software">software</a> -->
</div> </div>