feat: add to top button as an option

This commit is contained in:
Henk Verlinde
2022-06-21 20:52:44 +02:00
parent 75d250b240
commit dd6f7b578b
4 changed files with 32 additions and 0 deletions

View File

@ -60,6 +60,12 @@
{{ $scrollLock := resources.Get "js/scroll-lock.js" | js.Build -}}
{{ $slice = $slice | append $scrollLock -}}
{{ if .Site.Params.options.toTopButton -}}
{{ $toTopButton := resources.Get "js/to-top.js" -}}
{{ $toTopButton := $toTopButton | js.Build -}}
{{ $slice = $slice | append $toTopButton -}}
{{ end -}}
{{ $js := $slice | resources.Concat "main.js" -}}
{{ if eq (hugo.Environment) "development" -}}