1
0

Wrap nav links into a list.

This commit is contained in:
Alexander Andreev 2024-06-30 00:12:18 +04:00
parent c0e4981d62
commit e313a52daf
Signed by: Arav
GPG Key ID: 25969B23DCB5CA34
2 changed files with 6 additions and 5 deletions

View File

@ -147,9 +147,10 @@ header.main nav {
font-variant: small-caps;
width: 300px; }
header.main nav div {
header.main nav ul {
display: flex;
justify-content: space-evenly;
list-style: none;
width: 100%; }
section {

View File

@ -51,17 +51,17 @@ templ navigation(title string) {
{{ sections := []string{"Stuff", "Mindflow", "About", "Guestbook"} }}
{{ links := []templ.SafeURL{"/stuff", "/mindflow", "/about", "/guestbook"} }}
<nav>
<div>
<ul>
if title != "" {
<a href="/">Home</a>
<li><a href="/">Home</a></li>
}
for i, s := range sections {
if strings.HasSuffix(title, s) {
{{ continue }}
}
<a href={ links[i] }>{ s }</a>
<li><a href={ links[i] }>{ s }</a></li>
}
</div>
</ul>
if title != "" {
<h1>
if strings.HasSuffix(title, "- Stuff") {