feat: add to top button as an option
This commit is contained in:
@ -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" -}}
|
||||
|
Reference in New Issue
Block a user