#162 Scroll to top - attempted fix

This commit is contained in:
Zdenek K 2024-04-01 22:06:11 +02:00 committed by zjedi
parent 9e4ffcda5e
commit 628147b53f
2 changed files with 4 additions and 3 deletions

3
.gitignore vendored
View file

@ -2,4 +2,5 @@ public
exampleSite/public
exampleSite/resources
node_modules
*.lock
*.lock
hugo-scroll.code-workspace

View file

@ -54,7 +54,7 @@
<div class='fixed-nav'>
{{ if eq .Params.nav_to_top_weight "first" }}
{{ $fnav_title := "Start" }}{{ with .Params.nav_to_top_title }}{{ $fnav_title = . }}{{ end }}
<a class='fn-item' item_index='{{ 0 }}' href='/#site-head'>{{ $fnav_title | safeHTML }}</a>
<a class='fn-item' item_index='{{ 0 }}' href='./#site-head'>{{ $fnav_title | safeHTML }}</a>
{{ end }}
{{ $last_index_val := 0 }}
{{ range $index_val, $elem_val := $content }}
@ -64,7 +64,7 @@
{{ end }}
{{ if eq .Params.nav_to_top_weight "last" }}
{{ $fnav_title := "Start" }}{{ with .Params.nav_to_top_title }}{{ $fnav_title = . }}{{ end }}
<a class='fn-item' item_index='{{ (add $last_index_val 2) }}' href='/#site-head'>{{ $fnav_title | safeHTML }}</a>
<a class='fn-item' item_index='{{ (add $last_index_val 2) }}' href='./#site-head'>{{ $fnav_title | safeHTML }}</a>
{{ end }}
</div>