This commit is contained in:
mark
2023-04-06 09:09:17 +02:00
parent b87a91f6df
commit 2bcd955402
3 changed files with 18 additions and 0 deletions

View File

@@ -18,3 +18,15 @@ a:active {
.tickmark li::marker { .tickmark li::marker {
content: ""; content: "";
} }
.anchor
{
color: transparent;
// color: black;
}
.heading:hover .anchor
{
transition: 0.25s ease-in-out;
color: $primary;
}

View File

@@ -21,6 +21,7 @@
# toml-docs-start navigation # toml-docs-start navigation
[navigation] [navigation]
anchor = true
logo = "/img/logo_icon.svg" logo = "/img/logo_icon.svg"
color = "body" color = "body"
fixed = true fixed = true

View File

@@ -0,0 +1,5 @@
{{ if site.Params.navigation.anchor }}
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="heading">{{ .Text | safeHTML }} <a href="#{{ .Anchor | safeURL }}"><i class="fa-solid fa-link anchor"></i></a></h{{ .Level }}>
{{ else }}
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}</h{{ .Level }}>
{{ end }}