diff options
author | amzrk2 | 2020-05-27 22:53:13 +0800 |
---|---|---|
committer | amzrk2 | 2020-05-27 22:53:13 +0800 |
commit | dfb6e1f80754c1c8f2d4d332c5292319f008a67b (patch) | |
tree | fd8c0cf13e03613b6a39c662b6a0ced87fb69157 /layouts/shortcodes/img-lazy.html | |
parent | aa5290aeef9df1c583fdf30290351968df9215dc (diff) | |
download | hugo-theme-fuji-dfb6e1f80754c1c8f2d4d332c5292319f008a67b.tar.gz hugo-theme-fuji-dfb6e1f80754c1c8f2d4d332c5292319f008a67b.tar.bz2 hugo-theme-fuji-dfb6e1f80754c1c8f2d4d332c5292319f008a67b.zip |
v2 original port
Diffstat (limited to 'layouts/shortcodes/img-lazy.html')
-rw-r--r-- | layouts/shortcodes/img-lazy.html | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/layouts/shortcodes/img-lazy.html b/layouts/shortcodes/img-lazy.html new file mode 100644 index 0000000..fef9bd3 --- /dev/null +++ b/layouts/shortcodes/img-lazy.html @@ -0,0 +1,10 @@ +{{ if len .Params | eq 2 }} +<img class="lazyload img-zoomable" src="{{ .Site.Params.lazyPlaceholder | relURL }}" data-src="{{ index .Params 1 }}" + alt="{{ index .Params 0 }}" /> +{{ else if len .Params | eq 3 }}{{ if eq (index .Params 0) "row" }} +<img class="lazyload img-zoomable" src="{{ .Site.Params.lazyPlaceholderRow | relURL }}" data-src="{{ index .Params 2 }}" + alt="{{ index .Params 1 }}" /> +{{ else if eq (index .Params 0) "col" }} +<img class="lazyload img-zoomable" src="{{ .Site.Params.lazyPlaceholderCol | relURL }}" data-src="{{ index .Params 2 }}" + alt="{{ index .Params 1 }}" /> +{{ else }}{{ end }}{{ else }}{{ end }}
\ No newline at end of file |