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 | |
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')
-rw-r--r-- | layouts/shortcodes/img-lazy.html | 10 | ||||
-rw-r--r-- | layouts/shortcodes/img-nz-lazy.html | 25 | ||||
-rw-r--r-- | layouts/shortcodes/img-nz.html | 7 | ||||
-rw-r--r-- | layouts/shortcodes/lazyimg-col.html | 3 | ||||
-rw-r--r-- | layouts/shortcodes/lazyimg-row.html | 3 | ||||
-rw-r--r-- | layouts/shortcodes/lazyimg.html | 3 |
6 files changed, 42 insertions, 9 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 diff --git a/layouts/shortcodes/img-nz-lazy.html b/layouts/shortcodes/img-nz-lazy.html new file mode 100644 index 0000000..bfdb26a --- /dev/null +++ b/layouts/shortcodes/img-nz-lazy.html @@ -0,0 +1,25 @@ +{{ if len .Params | eq 2 }} +<img class="lazyload" 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" src="{{ .Site.Params.lazyPlaceholderRow | relURL }}" data-src="{{ index .Params 2 }}" + alt="{{ index .Params 1 }}" /> +{{ else if eq (index .Params 0) "col" }} +<img class="lazyload" src="{{ .Site.Params.lazyPlaceholderCol | relURL }}" data-src="{{ index .Params 2 }}" + alt="{{ index .Params 1 }}" /> +{{ else }} +<a href="{{ index .Params 2 }}" target="_blank"> + <img class="lazyload" src="{{ .Site.Params.lazyPlaceholder | relURL }}" data-src="{{ index .Params 1 }}" + alt="{{ index .Params 0 }}" /> +</a> +{{ end }}{{ else if len .Params | eq 4 }}{{ if eq (index .Params 0) "row" }} +<a href="{{ index .Params 3 }}" target="_blank"> + <img class="lazyload" src="{{ .Site.Params.lazyPlaceholderRow | relURL }}" data-src="{{ index .Params 2 }}" + alt="{{ index .Params 1 }}" /> +</a> +{{ else if eq (index .Params 0) "col" }} +<a href="{{ index .Params 3 }}" target="_blank"> + <img class="lazyload" src="{{ .Site.Params.lazyPlaceholderCol | relURL }}" data-src="{{ index .Params 2 }}" + alt="{{ index .Params 1 }}" /> +</a> +{{ else }}{{ end }}{{ else }}{{ end }}
\ No newline at end of file diff --git a/layouts/shortcodes/img-nz.html b/layouts/shortcodes/img-nz.html new file mode 100644 index 0000000..1b4f791 --- /dev/null +++ b/layouts/shortcodes/img-nz.html @@ -0,0 +1,7 @@ +{{ if (index .Params 2) }} +<a href="{{ index .Params 2 }}" target="_blank"> + <img src="{{ index .Params 1 }}" alt="{{ index .Params 0 }}" /> +</a> +{{ else }} +<img src="{{ index .Params 1 }}" alt="{{ index .Params 0 }}" /> +{{ end }}
\ No newline at end of file diff --git a/layouts/shortcodes/lazyimg-col.html b/layouts/shortcodes/lazyimg-col.html deleted file mode 100644 index ce68446..0000000 --- a/layouts/shortcodes/lazyimg-col.html +++ /dev/null @@ -1,3 +0,0 @@ -<p> - <img class="lazyload img-zoomable" src="{{ .Site.Params.lazyPlaceholderCol }}" data-src="{{ index .Params 1 }}" alt="{{ index .Params 0 }}" /> -</p>
\ No newline at end of file diff --git a/layouts/shortcodes/lazyimg-row.html b/layouts/shortcodes/lazyimg-row.html deleted file mode 100644 index 61e61ec..0000000 --- a/layouts/shortcodes/lazyimg-row.html +++ /dev/null @@ -1,3 +0,0 @@ -<p> - <img class="lazyload img-zoomable" src="{{ .Site.Params.lazyPlaceholderRow }}" data-src="{{ index .Params 1 }}" alt="{{ index .Params 0 }}" /> -</p>
\ No newline at end of file diff --git a/layouts/shortcodes/lazyimg.html b/layouts/shortcodes/lazyimg.html deleted file mode 100644 index ff36b35..0000000 --- a/layouts/shortcodes/lazyimg.html +++ /dev/null @@ -1,3 +0,0 @@ -<p> - <img class="lazyload img-zoomable" src="{{ .Site.Params.lazyPlaceholder }}" data-src="{{ index .Params 1 }}" alt="{{ index .Params 0 }}" /> -</p>
\ No newline at end of file |