hermit-V2/layouts/partials/scroll-to-top.html

9 lines
556 B
HTML
Raw Normal View History

2023-08-06 09:16:12 -04:00
{{ 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>
2023-08-19 03:24:17 -04:00
{{ $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>
2023-08-06 09:16:12 -04:00
{{ end }}