diff options
author | amzrk2 | 2020-06-14 23:17:37 +0800 |
---|---|---|
committer | amzrk2 | 2020-06-14 23:17:37 +0800 |
commit | 89fc2917985d3da944af8116e101748267d66104 (patch) | |
tree | 69d8f6fa344a9a5a9d996bd87ed131bfd5468619 /layouts | |
parent | a6f35cee7b1634f734c830af2bfa5283f3de7366 (diff) | |
download | hugo-theme-fuji-89fc2917985d3da944af8116e101748267d66104.tar.gz hugo-theme-fuji-89fc2917985d3da944af8116e101748267d66104.tar.bz2 hugo-theme-fuji-89fc2917985d3da944af8116e101748267d66104.zip |
Remove medium-zoom
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/_markup/render-image.html | 4 | ||||
-rw-r--r-- | layouts/partials/scripts-end.html | 1 | ||||
-rw-r--r-- | layouts/shortcodes/img-lazy.html | 32 | ||||
-rw-r--r-- | layouts/shortcodes/img-nz-lazy.html | 25 | ||||
-rw-r--r-- | layouts/shortcodes/img-nz.html | 7 |
5 files changed, 25 insertions, 44 deletions
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index b9020c7..1b20943 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -1 +1,3 @@ -<img class="img-zoomable" src="{{ .Destination | safeURL }}" alt="{{ .Text }}" />
\ No newline at end of file +<a href="{{ .Destination | safeURL }}" target="_blank"> + <img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" /> +</a>
\ No newline at end of file diff --git a/layouts/partials/scripts-end.html b/layouts/partials/scripts-end.html index 024ee6f..e5426ad 100644 --- a/layouts/partials/scripts-end.html +++ b/layouts/partials/scripts-end.html @@ -4,7 +4,6 @@ <script defer src="https://cdn.jsdelivr.net/npm/prismjs@1.20.0/plugins/autoloader/prism-autoloader.min.js"></script> <script defer src="https://cdn.jsdelivr.net/npm/lazysizes@5.2.2/lazysizes.min.js"></script> -<script defer src="https://cdn.jsdelivr.net/npm/medium-zoom@1.0.5/dist/medium-zoom.min.js"></script> <script defer src="{{ "/assets/js/fuji.min.js" | relURL }}"></script> {{ with .Params.player }} diff --git a/layouts/shortcodes/img-lazy.html b/layouts/shortcodes/img-lazy.html index fef9bd3..e57b8fb 100644 --- a/layouts/shortcodes/img-lazy.html +++ b/layouts/shortcodes/img-lazy.html @@ -1,10 +1,22 @@ -{{ 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 +{{- if len .Params | eq 2 -}} +<p> + <a href="{{ index .Params 1 | safeURL }}" target="_blank"> + <img class="lazyload" src="{{ .Site.Params.lazyPlaceholder | relURL }}" + data-src="{{ index .Params 1 | safeURL }}" alt="{{ index .Params 0 }}" /> + </a> +</p> +{{- else if len .Params | eq 3 }}{{ if eq (index .Params 0) "row" -}} +<p> + <a href="{{ index .Params 2 | safeURL }}" target="_blank"> + <img class="lazyload" src="{{ .Site.Params.lazyPlaceholderRow | relURL }}" + data-src="{{ index .Params 2 | safeURL }}" alt="{{ index .Params 1 }}" /> + </a> +</p> +{{- else if eq (index .Params 0) "col" -}} +<p> + <a href="{{ index .Params 2 | safeURL }}" target="_blank"> + <img class="lazyload" src="{{ .Site.Params.lazyPlaceholderCol | relURL }}" + data-src="{{ index .Params 2 | safeURL }}" alt="{{ index .Params 1 }}" /> + </a> +</p> +{{- 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 deleted file mode 100644 index bfdb26a..0000000 --- a/layouts/shortcodes/img-nz-lazy.html +++ /dev/null @@ -1,25 +0,0 @@ -{{ 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 deleted file mode 100644 index 1b4f791..0000000 --- a/layouts/shortcodes/img-nz.html +++ /dev/null @@ -1,7 +0,0 @@ -{{ 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 |