Decided to hide a current section in menu.
This commit is contained in:
parent
5db465d72a
commit
b1d7f92cff
@ -46,15 +46,18 @@ templ base(title, description, keywords, canonical string, head templ.Component)
|
||||
}
|
||||
|
||||
templ navigation(heading string) {
|
||||
{{ links := []string{"Stuff", "Mindflow", "About", "Guestbook"} }}
|
||||
<nav>
|
||||
<div>
|
||||
if heading != "Home" {
|
||||
<a href="/">Home</a>
|
||||
}
|
||||
<a href="/stuff">Stuff</a>
|
||||
<a href="/mindflow">Mindflow</a>
|
||||
<a href="/about">About</a>
|
||||
<a href="/guestbook">Guestbook</a>
|
||||
for _, n := range links {
|
||||
if n == heading {
|
||||
{{ continue }}
|
||||
}
|
||||
<a href={ templ.URL("/"+strings.ToLower(n)) }>{ n }</a>
|
||||
}
|
||||
</div>
|
||||
if heading != "" && heading != "Home" {
|
||||
if strings.HasSuffix(heading, "Article") {
|
||||
|
Loading…
Reference in New Issue
Block a user