Added Christmas greetings
This commit is contained in:
@@ -1,33 +1,37 @@
|
||||
{{ $cols := .Parent.Get "columns" }}
|
||||
{{ $imgOriginal := .Page.Resources.GetMatch (.Get "src") }}
|
||||
{{ $img := $imgOriginal }}
|
||||
{{ if eq $cols "2" }}
|
||||
{{ $img = $imgOriginal.Fit "500x1000 webp" }}
|
||||
{{ else if eq $cols "3" }}
|
||||
{{ $img = $imgOriginal.Fit "333x800 webp" }}
|
||||
{{ else if eq $cols "4" }}
|
||||
{{ $img = $imgOriginal.Fit "250x500 webp" }}
|
||||
{{ else }}
|
||||
{{ $img = $imgOriginal.Fit "800x1000 webp" }}
|
||||
{{ end }}
|
||||
{{ $imgFitted := $imgOriginal.Fit "850x1000 webp" }}
|
||||
<figure class="tsc-gallery-img">
|
||||
<a
|
||||
{{ with .Get "href" }}
|
||||
href="{{ . }}"
|
||||
{{ else }}
|
||||
data-url="{{ $imgFitted.RelPermalink }}"
|
||||
{{ end }}
|
||||
>
|
||||
<img
|
||||
{{ with .Get "alt"}}alt="{{.}}"{{ end }}
|
||||
src="{{ $img.RelPermalink }}"
|
||||
{{ with $imgOriginal }}
|
||||
{{ if eq $cols "2" }}
|
||||
{{ $img = $imgOriginal.Fit "500x1000 webp" }}
|
||||
{{ else if eq $cols "3" }}
|
||||
{{ $img = $imgOriginal.Fit "333x800 webp" }}
|
||||
{{ else if eq $cols "4" }}
|
||||
{{ $img = $imgOriginal.Fit "250x500 webp" }}
|
||||
{{ else }}
|
||||
{{ $img = $imgOriginal.Fit "800x1000 webp" }}
|
||||
{{ end }}
|
||||
{{ $imgFitted := $imgOriginal.Fit "850x1000 webp" }}
|
||||
<figure class="tsc-gallery-img">
|
||||
<a
|
||||
{{ with $.Get "href" }}
|
||||
href="{{ . }}"
|
||||
{{ else }}
|
||||
data-url="{{ $imgFitted.RelPermalink }}"
|
||||
{{ end }}
|
||||
>
|
||||
</a>
|
||||
{{ with .Get "credits" }}
|
||||
<div class="credits">Foto: {{ . }}</div>
|
||||
{{ end }}
|
||||
{{ with .Get "caption" }}
|
||||
<caption>{{ . }}</caption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
<img
|
||||
{{ with $.Get "alt"}}alt="{{.}}"{{ end }}
|
||||
src="{{ $img.RelPermalink }}"
|
||||
>
|
||||
</a>
|
||||
{{ with $.Get "credits" }}
|
||||
<div class="credits">Foto: {{ . }}</div>
|
||||
{{ end }}
|
||||
{{ with $.Get "caption" }}
|
||||
<caption>{{ . }}</caption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ else }}
|
||||
{{ warnf "No image found for page %s: %s" .Page.RelPermalink (.Get "src") }}
|
||||
{{ end }}
|
||||
@@ -6,6 +6,9 @@
|
||||
{{ with .Get "alt" }}alt="{{ . }}"{{ end }}
|
||||
{{- $filename := .Get "src" }}
|
||||
{{ $resource := .Page.Resources.Get $filename -}}
|
||||
{{ if not $resource }}
|
||||
{{ $resource = resources.GetMatch $filename }}
|
||||
{{ end }}
|
||||
src="{{ $resource.RelPermalink }}"
|
||||
>
|
||||
{{ with .Get "href" }}
|
||||
|
||||
Reference in New Issue
Block a user