From a43b353ca3e2d923ca8f0cdd1aeab70e5b1313a4 Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Sat, 19 Sep 2020 14:15:35 +0800 Subject: new: lazyload image shortcodes --- layouts/shortcodes/img-lazy.html | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) (limited to 'layouts/shortcodes/img-lazy.html') diff --git a/layouts/shortcodes/img-lazy.html b/layouts/shortcodes/img-lazy.html index bac255b..eed9b0e 100644 --- a/layouts/shortcodes/img-lazy.html +++ b/layouts/shortcodes/img-lazy.html @@ -1,22 +1,5 @@ -{{ if len .Params | eq 2 }} -{{ index .Params 0 }} -{{ else if len .Params | eq 3 }}{{ if eq (index .Params 0) "row" }} -{{ index .Params 1 }} -{{ else if eq (index .Params 0) "col" }} -{{ index .Params 1 }} -{{ else }}{{ end }}{{ else }}{{ end }} +{{- if len .Params | eq 3 -}} +

+ {{ index .Params 1 }} +

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