Finished making site look good.

This commit is contained in:
2023-08-31 03:21:35 +00:00
parent a8321a07fd
commit 628311dc7c
3 changed files with 22 additions and 23 deletions

View File

@ -1,6 +1,7 @@
{{- $original := .Page.Resources.GetMatch (printf "*%s*" (.Get 0)) -}}
{{- $image := $original -}}
{{- $align := "none" -}}
{{- $alttext := "" -}}
{{- with (.Get 1) -}}
{{- if not (eq . "auto") -}}
{{- if or (hasSuffix . "x") (hasPrefix . "x") -}}
@ -13,14 +14,17 @@
{{- with (.Get 2) -}}
{{- $align = . -}}
{{- end -}}
{{- with (.Get 3) -}}
{{ $alttext = . -}}
{{- end -}}
{{- if (gt $image.Width 1500) -}}
{{- $image = ($image.Resize "1500x") -}}
{{- else if (gt $image.Height 1500) -}}
{{- $image = ($image.Resize "x1500") -}}
{{- end -}}
<figure style="padding: 0.25rem; margin: 2rem 0; float: {{- $align -}}">
<figure style="float: {{ $align }};">
<a href="{{- $original.RelPermalink -}}">
<img style="max-width: 100%; width: auto; height: auto;" src="{{- $image.RelPermalink -}}" width="{{- $image.Width -}}" height="{{- $image.Height -}}">
<img style="max-width: 100%; width: auto; height: auto;" src="{{- $image.RelPermalink -}}" width="{{- $image.Width -}}" height="{{- $image.Height -}}" alt="{{ $alttext }}"/>
</a>
<figcaption>
{{ .Inner | markdownify }}