link tracking

This commit is contained in:
bronku 2026-06-10 20:21:30 +02:00
parent 9ec025b24c
commit d6bec835ef
2 changed files with 10 additions and 14 deletions

View file

@ -180,12 +180,10 @@ templ layout(activePage string) {
templ Link(activePage, targetPage, title string) {
<a
if activePage != targetPage {
if targetPage == "index" {
href="/"
} else {
href={ fmt.Sprint("/", targetPage, "/") }
}
if targetPage == "index" {
href="/"
} else {
href={ fmt.Sprint("/", targetPage, "/") }
}
if activePage == targetPage {
aria-current="page"
@ -195,12 +193,10 @@ templ Link(activePage, targetPage, title string) {
templ GreenLink(activePage, targetPage, title string) {
<a
if activePage != targetPage {
if targetPage == "index" {
href="/"
} else {
href={ fmt.Sprint("/", targetPage, "/") }
}
if targetPage == "index" {
href="/"
} else {
href={ fmt.Sprint("/", targetPage, "/") }
}
if activePage == targetPage {
aria-current="page"