diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-03-26 11:04:57 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-03-26 11:04:57 +0200 |
commit | d7497b28c17fe2f402accde45c75642ed7f09d08 (patch) | |
tree | ec560802471331c111fb1fec0fd639509c50560d /docs/layouts | |
parent | 94459680ba391275ac667407627cafdab5a50d79 (diff) | |
parent | d276e901b36d2576ef8350ed96b17f66254eac1b (diff) |
Merge commit 'd276e901b36d2576ef8350ed96b17f66254eac1b'
Diffstat (limited to 'docs/layouts')
-rw-r--r-- | docs/layouts/maintenance/list.html | 6 | ||||
-rw-r--r-- | docs/layouts/shortcodes/imgproc.html | 35 |
2 files changed, 20 insertions, 21 deletions
diff --git a/docs/layouts/maintenance/list.html b/docs/layouts/maintenance/list.html index ff573d54b..299602318 100644 --- a/docs/layouts/maintenance/list.html +++ b/docs/layouts/maintenance/list.html @@ -17,9 +17,9 @@ {{ $recent := ($byLastMod | last 30).Reverse }} {{ $leastRecent := $byLastMod | first 10 }} <h2 id="last-updated">Last Updated</h2> - {{ partial "maintenance-pages-table" $recent }} + {{ partial "maintenance-pages-table.html" $recent }} <h2 id="least-recently-updated">Least Recently Updated</h2> - {{ partial "maintenance-pages-table" $leastRecent }} + {{ partial "maintenance-pages-table.html" $leastRecent }} {{/* Don't think this is possible with where directly. Should investigate. */}} {{ .Scratch.Set "todos" slice }} @@ -29,7 +29,7 @@ {{ end }} {{ end }} <h2 id="todos">Pages marked with TODO</h2> - {{ partial "maintenance-pages-table" (.Scratch.Get "todos") }} + {{ partial "maintenance-pages-table.html" (.Scratch.Get "todos") }} <h2 id="dependencies">Dependencies</h2> <table class="collapse ba br2 b--black-10 pv2 ph3"> diff --git a/docs/layouts/shortcodes/imgproc.html b/docs/layouts/shortcodes/imgproc.html index 181e97f1d..f792702ce 100644 --- a/docs/layouts/shortcodes/imgproc.html +++ b/docs/layouts/shortcodes/imgproc.html @@ -1,27 +1,26 @@ -{{ $original := .Page.Resources.GetMatch (printf "*%s*" (.Get 0)) }} +{{ $img := .Page.Resources.GetMatch (printf "*%s*" (.Get 0)) }} {{ $command := .Get 1 }} {{ $options := .Get 2 }} {{ if eq $command "Fit"}} -{{ .Scratch.Set "image" ($original.Fit $options) }} + {{ $img = $img.Fit $options }} {{ else if eq $command "Resize"}} -{{ .Scratch.Set "image" ($original.Resize $options) }} + {{ $img = $img.Resize $options }} {{ else if eq $command "Fill"}} -{{ .Scratch.Set "image" ($original.Fill $options) }} + {{ $img = $img.Fill $options }} {{ else if eq $command "Crop"}} -{{ .Scratch.Set "image" ($original.Crop $options) }} + {{ $img = $img.Crop $options }} {{ else }} -{{ errorf "Invalid image processing command: Must be one of Crop, Fit, Fill or Resize."}} + {{ errorf "Invalid image processing command: Must be one of Crop, Fit, Fill or Resize."}} {{ end }} -{{ $image := .Scratch.Get "image" }} <figure style="padding: 0.25rem; margin: 2rem 0; background-color: #cccc"> - <img style="max-width: 100%; width: auto; height: auto;" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}"> - <figcaption> - <small> - {{ with .Inner }} - {{ . }} - {{ else }} - .{{ $command }} "{{ $options }}" - {{ end }} - </small> - </figcaption> -</figure>
\ No newline at end of file + <img style="max-width: 100%; width: auto; height: auto;" src="{{ $img.RelPermalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}"> + <figcaption> + <small> + {{ with .Inner }} + {{ . }} + {{ else }} + .{{ $command }} "{{ $options }}" + {{ end }} + </small> + </figcaption> +</figure> |