From 7da818e69b76ff6764157da75137de69feadb7ce Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Tue, 7 Jul 2020 21:40:03 +0800 Subject: Fix medium-zoom --- layouts/shortcodes/img-lazy.html | 44 ++++++++++++++++----------------- layouts/shortcodes/img-nz-lazy.html | 49 +++++++++++++++++++++++++++++++++++++ layouts/shortcodes/img-nz.html | 7 ++++++ 3 files changed, 78 insertions(+), 22 deletions(-) create mode 100644 layouts/shortcodes/img-nz-lazy.html create mode 100644 layouts/shortcodes/img-nz.html (limited to 'layouts/shortcodes') diff --git a/layouts/shortcodes/img-lazy.html b/layouts/shortcodes/img-lazy.html index e57b8fb..a8927a5 100644 --- a/layouts/shortcodes/img-lazy.html +++ b/layouts/shortcodes/img-lazy.html @@ -1,22 +1,22 @@ -{{- 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 -}} \ No newline at end of file +{{ 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 }} diff --git a/layouts/shortcodes/img-nz-lazy.html b/layouts/shortcodes/img-nz-lazy.html new file mode 100644 index 0000000..a606f51 --- /dev/null +++ b/layouts/shortcodes/img-nz-lazy.html @@ -0,0 +1,49 @@ +{{ 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 }} + + {{ index .Params 0 }} + +{{ end }}{{ else if len .Params | eq 4 }}{{ if eq (index .Params 0) "row" }} + + {{ index .Params 1 }} + +{{ else if eq (index .Params 0) "col" }} + + {{ index .Params 1 }} + +{{ else }}{{ end }}{{ else }}{{ end }} diff --git a/layouts/shortcodes/img-nz.html b/layouts/shortcodes/img-nz.html new file mode 100644 index 0000000..30ea28a --- /dev/null +++ b/layouts/shortcodes/img-nz.html @@ -0,0 +1,7 @@ +{{ if (index .Params 2) }} + + {{ index .Params 0 }} + +{{ else }} +{{ index .Params 0 }} +{{ end }} -- cgit v1.2.3