diff options
author | DSRKafuU | 2020-06-04 07:21:13 -0500 |
---|---|---|
committer | GitHub | 2020-06-04 07:21:13 -0500 |
commit | 73244a2e55dffa158027126346eefd5bafa5fea8 (patch) | |
tree | c98ee9fbdb6f474579aa769a2a4b0b4c98fd21f1 /layouts/shortcodes/img-lazy.html | |
parent | aa5290aeef9df1c583fdf30290351968df9215dc (diff) | |
parent | 914bf54c493b299268c293be33a8babf99b1cce2 (diff) | |
download | hugo-theme-fuji-73244a2e55dffa158027126346eefd5bafa5fea8.tar.gz hugo-theme-fuji-73244a2e55dffa158027126346eefd5bafa5fea8.tar.bz2 hugo-theme-fuji-73244a2e55dffa158027126346eefd5bafa5fea8.zip |
Merge pull request #24 from amzrk2/dev
v2 pre-release
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 |