Refactor carousel code so more of it is in the Carousel class
Load the script as a module
This commit is contained in:
parent
bb655bcf30
commit
ad9f83ed39
2 changed files with 124 additions and 94 deletions
|
@ -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 }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue