link tracking
This commit is contained in:
parent
9ec025b24c
commit
d6bec835ef
2 changed files with 10 additions and 14 deletions
|
|
@ -54,7 +54,7 @@ body > nav {
|
|||
text-decoration: none;
|
||||
color: var(--on-background);
|
||||
|
||||
&[href] {
|
||||
&[href]:not([aria-current="page"]) {
|
||||
font-weight: 200;
|
||||
transition: color 0.2s;
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ body > nav {
|
|||
}
|
||||
}
|
||||
|
||||
&:not([href]) {
|
||||
&[aria-current="page"] {
|
||||
padding-bottom: 8px;
|
||||
color: var(--primary);
|
||||
border-bottom: 2px solid var(--primary);
|
||||
|
|
|
|||
|
|
@ -180,13 +180,11 @@ templ layout(activePage string) {
|
|||
|
||||
templ Link(activePage, targetPage, title string) {
|
||||
<a
|
||||
if activePage != targetPage {
|
||||
if targetPage == "index" {
|
||||
href="/"
|
||||
} else {
|
||||
href={ fmt.Sprint("/", targetPage, "/") }
|
||||
}
|
||||
}
|
||||
if activePage == targetPage {
|
||||
aria-current="page"
|
||||
}
|
||||
|
|
@ -195,13 +193,11 @@ 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 activePage == targetPage {
|
||||
aria-current="page"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue