mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-14 10:09:31 -07:00
* chore(Geist): bump geist font to v1.0.1 * refactor(_typography.scss): split the CSS lang tag to ensure compatibility with Chromium-based browsers * refactor(stage.ts): bump up preload count on desktop * feat(params.toml): add support for user defined resize option * feat(_fonts.scss): add a new font file to better support fullwidth plus and minus * refactor(info): update info * chore(build.yml): update branch name for updating bundled artifacts to include the current date * chore(package.json): update version from 0.0.1 to v0.0.2 to reflect changes made in the codebase
31 lines
1.0 KiB
HTML
31 lines
1.0 KiB
HTML
{{- $Page := .Page -}}
|
|
{{- $params := .Page.Params | merge .Site.Params.Page -}}
|
|
|
|
{{- $gallery := site.GetPage .Path -}}
|
|
{{- with $gallery.Resources.ByType "image" -}}
|
|
{{- $index := len . -}}
|
|
{{- $Page.Scratch.Add "img" slice -}}
|
|
{{- range sort . "Name" "desc" -}}
|
|
{{- $image := . -}}
|
|
{{- $index = sub $index 1 -}}
|
|
{{- $alt := .Name -}}
|
|
{{- with $params.unifiedAlt -}}
|
|
{{- $alt = . -}}
|
|
{{- end -}}
|
|
{{- $lores := .Resize (site.Params.loResOpt | default "700x webp Lanczos q60") -}}
|
|
{{- $hires := .Resize (site.Params.hiResOpt | default "2000x webp Lanczos q75") -}}
|
|
{{- $Page.Scratch.Add "img" (dict
|
|
"index" (int $index)
|
|
"alt" (string $alt)
|
|
"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 -}}
|