link tracking
This commit is contained in:
parent
9ec025b24c
commit
d6bec835ef
2 changed files with 10 additions and 14 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue