Refactor carousel code so more of it is in the Carousel class

Load the script as a module
This commit is contained in:
Eryn Wells 2023-04-05 08:14:19 -07:00
parent bb655bcf30
commit ad9f83ed39
2 changed files with 124 additions and 94 deletions

View file

@ -73,9 +73,9 @@
{{ define "scripts" }}
{{- $photos := partial "photos/list.html" . -}}
{{ if gt (len $photos) 1 }}
{{ if gt (len $photos) 1 -}}
{{- with resources.Get "scripts/photos/carousel.js" | fingerprint "md5" -}}
<script src="{{ .RelPermalink }}"></script>
<script type="module" src="{{ .RelPermalink }}"></script>
{{- end -}}
{{ end }}
{{- end }}
{{ end }}