From 568553394d0a8b34668a75c9839a0f1f426469b2 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sun, 6 Oct 2019 21:10:46 +0200 Subject: theme: Switch to docsy theme --- themes/docsy/layouts/shortcodes/imgproc.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 themes/docsy/layouts/shortcodes/imgproc.html (limited to 'themes/docsy/layouts/shortcodes/imgproc.html') diff --git a/themes/docsy/layouts/shortcodes/imgproc.html b/themes/docsy/layouts/shortcodes/imgproc.html new file mode 100644 index 0000000..bb80a85 --- /dev/null +++ b/themes/docsy/layouts/shortcodes/imgproc.html @@ -0,0 +1,21 @@ +{{ $original := .Page.Resources.GetMatch (printf "**%s*" (.Get 0)) }} +{{ $command := .Get 1 }} +{{ $options := .Get 2 }} +{{ if eq $command "Fit"}} +{{ .Scratch.Set "image" ($original.Fit $options) }} +{{ else if eq $command "Resize"}} +{{ .Scratch.Set "image" ($original.Resize $options) }} +{{ else if eq $command "Fill"}} +{{ .Scratch.Set "image" ($original.Fill $options) }} +{{ else }} +{{ errorf "Invalid image processing command: Must be one of Fit, Fill or Resize."}} +{{ end }} +{{ $image := .Scratch.Get "image" }} +
+ + {{ with .Inner }} +
+

{{ . }}{{ with $image.Params.byline }}
{{ . | html }}
{{ end }}

+
+ {{ end }} +
\ No newline at end of file -- cgit v1.2.3