From 4184aad3fe65faca15812c57cb806daa05e4559e Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 19 Aug 2018 16:35:53 +0100 Subject: [PATCH] Cleanup shortcode template --- layouts/shortcodes/button.html | 4 +--- layouts/shortcodes/resource.html | 13 +------------ 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/layouts/shortcodes/button.html b/layouts/shortcodes/button.html index d5e6d8c..f2d8c70 100644 --- a/layouts/shortcodes/button.html +++ b/layouts/shortcodes/button.html @@ -1,5 +1,3 @@ -{{ $style := default "btn-outline-dark" (.Get "style" )}} - - + {{ .Inner }} diff --git a/layouts/shortcodes/resource.html b/layouts/shortcodes/resource.html index 3d003b1..cb0fe58 100644 --- a/layouts/shortcodes/resource.html +++ b/layouts/shortcodes/resource.html @@ -1,18 +1,7 @@ {{ $original := .Page.Resources.GetMatch (.Get "src") }} {{ $options := default "1000x" (.Get "options") }} -{{ .Scratch.Set "image" $original }} - -{{ $command := (default "Resize" (.Get "command")) }} - -{{ 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) }} -{{ end }} - +{{ .Scratch.Set "image" ($original.Resize $options) }} {{ define "img" }} {{ $image := .Scratch.Get "image" }}