This commit is contained in:
Charles.Day 2025-01-23 22:55:32 +01:00 committed by GitHub
commit 065e1ffc4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 1 deletions

View File

@ -40,6 +40,17 @@
img { img {
max-width: 100%; max-width: 100%;
height: auto; height: auto;
display: block;
margin: 0 auto;
}
figcaption {
margin-top: 0.5em;
font-size: 0.9em;
color: var(--card-text-color-secondary);
font-style: italic;
font-weight: bold;
text-align: center;
} }
} }

View File

@ -1,6 +1,7 @@
{{- $image := .Page.Resources.GetMatch (printf "%s" (.Destination | safeURL)) -}} {{- $image := .Page.Resources.GetMatch (printf "%s" (.Destination | safeURL)) -}}
{{- $Permalink := .Destination | relURL | safeURL -}} {{- $Permalink := .Destination | relURL | safeURL -}}
{{- $alt := .PlainText | safeHTML -}} {{- $alt := .PlainText | safeHTML -}}
{{- $title := .Title | markdownify | safeHTML -}}
{{- $Width := 0 -}} {{- $Width := 0 -}}
{{- $Height := 0 -}} {{- $Height := 0 -}}
{{- $Srcset := "" -}} {{- $Srcset := "" -}}
@ -38,4 +39,7 @@
data-flex-grow="{{ div (mul $image.Width 100) $image.Height }}" data-flex-grow="{{ div (mul $image.Width 100) $image.Height }}"
data-flex-basis="{{ div (mul $image.Width 240) $image.Height }}px" data-flex-basis="{{ div (mul $image.Width 240) $image.Height }}px"
{{ end }} {{ end }}
> >
{{- if $title }}
<figcaption>{{ .Title }}</figcaption>
{{- end }}