SCSS, Image processing, and reorg of content

This commit is contained in:
2023-11-06 16:20:14 +00:00
parent e76956ce10
commit 7bf339f020
117 changed files with 5712 additions and 42 deletions

View File

@@ -0,0 +1,24 @@
{{ $img := .Page.Resources.GetMatch (printf "*%s*" (.Get 0)) }}
{{ $command := .Get 1 }}
{{ $options := .Get 2 }}
{{ if eq $command "Fit"}}
{{ $img = $img.Fit $options }}
{{ else if eq $command "Resize"}}
{{ $img = $img.Resize $options }}
{{ else if eq $command "Fill"}}
{{ $img = $img.Fill $options }}
{{ else if eq $command "Crop"}}
{{ $img = $img.Crop $options }}
{{ else }}
{{ errorf "Invalid image processing command: Must be one of Crop, Fit, Fill or Resize."}}
{{ end }}
<figure class="image">
<img src="{{ $img.RelPermalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}">
<figcaption>
<small>
{{ with .Inner }}
{{ . }}
{{ end }}
</small>
</figcaption>
</figure>