Hello whiny.lol

This commit is contained in:
2026-03-09 18:41:02 +00:00
commit b880a1acc2
181 changed files with 3017 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
{{- $alt := .Text -}}
{{- $caption := .Title -}}
{{- $src := .Destination -}}
{{- $image := .Page.Resources.GetMatch $src -}}
{{- if $image -}}
{{- $webp := $image.Resize (printf "%dx%d webp" $image.Width $image.Height) -}}
{{- if $caption -}}
<figure>
<img src="{{ $webp.RelPermalink }}" alt="{{ $alt }}" width="{{ $webp.Width }}" height="{{ $webp.Height }}">
<figcaption>{{ $caption }}</figcaption>
</figure>
{{- else -}}
<img src="{{ $webp.RelPermalink }}" alt="{{ $alt }}" width="{{ $webp.Width }}" height="{{ $webp.Height }}">
{{- end -}}
{{- else -}}
{{- if $caption -}}
<figure>
<img src="{{ $src }}" alt="{{ $alt }}">
<figcaption>{{ $caption }}</figcaption>
</figure>
{{- else -}}
<img src="{{ $src }}" alt="{{ $alt }}">
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1 @@
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank"{{ end }}>{{ .Text }}</a>