diff options
| author | Reorx <novoreorx@gmail.com> | 2022-04-21 23:39:03 +0800 |
|---|---|---|
| committer | Reorx <novoreorx@gmail.com> | 2022-04-21 23:39:03 +0800 |
| commit | 48cba7f5aedec28e24b427cd0a3b00ded924de63 (patch) | |
| tree | 903425d7e3aabaad3e89b272d99275c3ecdb01b0 /layouts | |
| parent | 8c47961c418f874d0fa2bda7065651e277809f41 (diff) | |
add image zoom js
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/partials/footer.html | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 03a932c..e676aa3 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -228,6 +228,15 @@ </script> {{- end -}} +{{- if (.Param "EnableImageZoom") }} +{{- $imagezoom := resources.Get "js/medium-zoom.min.js" }} +<script src="{{ $imagezoom.RelPermalink }}" data-no-instant + {{- if site.Params.assets.disableFingerprinting }}integrity="{{ $imagezoom.Data.Integrity }}"{{- end }} +></script> +<script> + mediumZoom('.post-content img'); +</script> +{{- end }} {{ if (.Param "comments") }} {{ partial "comments_js.html" . }} @@ -250,7 +259,7 @@ {{- /* InstantClick.js */}} {{- if (.Param "EnableInstantClick") }} -{{- $instantclick := slice (resources.Get "js/instantclick.js") | resources.Concat "assets/js/instantclick.js" | minify }} +{{- $instantclick := resources.Get "js/instantclick.js" }} <script src="{{ $instantclick.RelPermalink }}" data-no-instant {{- if site.Params.assets.disableFingerprinting }}integrity="{{ $instantclick.Data.Integrity }}"{{- end }} ></script> |
