mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-14 18:19:29 -07:00
chore(link.html): update main style source and options to improve performance and maintainability chore(link.html): remove unused meta.html file chore(nav.html): update decrement and increment buttons to use Unicode characters for better accessibility chore(plugin/style.html): update style plugin to support inline styles for critical CSS chore(plugin/style.html): update style plugin to support minification and fingerprinting for main CSS chore(plugin/style.html): remove script plugin as it is no longer used chore(plugin/style.html): update style plugin to support inline styles for critical CSS chore(plugin/style.html): update style plugin to support minification and fingerprinting for main CSS chore(resources/imageJSON.html): update image resize options for better performance and quality
24 lines
762 B
HTML
24 lines
762 B
HTML
{{- $Page := .Page -}}
|
|
|
|
{{ $gallery := site.GetPage .Path }}
|
|
{{ with $gallery.Resources.ByType "image" }}
|
|
{{ $index := len . }}
|
|
{{ $Page.Scratch.Add "img" slice }}
|
|
{{ range . }}
|
|
{{ $index = sub $index 1 }}
|
|
{{ $lores := .Resize "800x webp Lanczos q60" }}
|
|
{{ $hires := .Resize "2500x webp Lanczos q75" }}
|
|
{{ $Page.Scratch.Add "img" (dict
|
|
"index" (int $index)
|
|
"loUrl" (string $lores.RelPermalink)
|
|
"loImgH" (int $lores.Height)
|
|
"loImgW" (int $lores.Width)
|
|
"hiUrl" (string $hires.RelPermalink)
|
|
"hiImgH" (int $hires.Height)
|
|
"hiImgW" (int $hires.Width)
|
|
)
|
|
}}
|
|
{{- end -}}
|
|
<script id="imagesSource" type="application/json">{{ $Page.Scratch.Get "img" | jsonify | safeJS }}</script>
|
|
{{- end -}}
|