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-nz.html | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'layouts/shortcodes/img-nz.html') diff --git a/layouts/shortcodes/img-nz.html b/layouts/shortcodes/img-nz.html index 2e4b3af..175dc5b 100644 --- a/layouts/shortcodes/img-nz.html +++ b/layouts/shortcodes/img-nz.html @@ -1,7 +1,5 @@ -{{ if (index .Params 2) }} - +{{- if len .Params | eq 2 -}} +

{{ index .Params 0 }} - -{{ else }} -{{ index .Params 0 }} -{{ end }} +

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