hermit-V2/layouts/partials/scroll-to-top.html
2023-08-19 07:24:17 +00:00

9 lines
No EOL
556 B
HTML

{{ if and (.Site.Params.scrollToTop) (.Params.scrolltotop) }}
<a href="#" class="scroll-up">{{ partial "svg.html" (dict "context" . "name" "scrollup") }}</a>
<noscript>
<a href="#" class="scroll-up show">{{ partial "svg.html" (dict "context" . "name" "scrollup") }}</a>
</noscript>
{{ $scrollwatcher := resources.Get "js/scrollwatcher.js" -}}
{{ $script := $scrollwatcher | minify | fingerprint -}}
<script async src="{{ $script.Permalink }}" {{ printf "integrity=%q" $script.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous"></script>
{{ end }}