diff options
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> |