Skip to content

Commit

Permalink
#162 Scroll to top - attempted fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zjedi committed Apr 1, 2024
1 parent 9e4ffcd commit 70ef9fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ public
exampleSite/public
exampleSite/resources
node_modules
*.lock
*.lock
hugo-scroll.code-workspace
4 changes: 2 additions & 2 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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>

Expand Down

0 comments on commit 70ef9fb

Please sign in to comment.