support SCSS

This commit is contained in:
2024-01-30 12:34:00 +01:00
parent c79c9cd1fc
commit adcd4c4ee0
2 changed files with 5 additions and 2 deletions

View File

@@ -1,10 +1,13 @@
<link rel="stylesheet" href="/css/snap-gallery.css" />
{{/* TODO: Ensure CSS/JS is only loaded once */}}
{{- with resources.Get "css/snap-gallery.scss" | toCSS | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{- end }}
<script src="/js/snap-gallery.js"></script>
{{/* Initialise variables */}}
{{ $imgs := slice }}
{{/* Get/sanitise image paths */}}
{{ if .Params.isdir }}
{{/* Get images from folder, put into map */}}
{{ $imgdir := print "/static/" .Params.src }}