diff --git a/assets/js/medium-zoom.js b/assets/js/medium-zoom.js new file mode 100644 index 00000000..7bd17a08 --- /dev/null +++ b/assets/js/medium-zoom.js @@ -0,0 +1,5 @@ +mediumZoom(document.querySelectorAll("img:not(.nozoom)"), { + margin: 24, + background: "rgba(0,0,0,0.5)", + scrollOffset: 0, +}); diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index a53a4df0..685888e9 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -62,32 +62,16 @@ {{ end }} {{ if site.Params.buymeacoffee.globalWidget | default false }} - {{/* Inject the third-party widget after the page is idle so it never - competes with rendering-critical resources. */}} - + {{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index e8f8ce40..de46b2df 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -60,15 +60,6 @@

{{ end }} - {{ if not .Site.Params.disableImageZoom | default true }} - - {{ end }} {{/* Extend footer - eg. for extra scripts, etc. */}} {{ if templates.Exists "partials/extend-footer.html" }} {{ partialCached "extend-footer.html" . }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 56f4c452..ae42c6cc 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -157,6 +157,8 @@ {{ if not .Site.Params.disableImageZoom | default true }} {{ $zoomJS := resources.Get "lib/zoom/zoom.min.umd.js" | resources.Fingerprint $alg }} + {{ $zoomInit := resources.Get "js/medium-zoom.js" | resources.Fingerprint $alg }} + {{ end }} {{ $showReadingProgress := site.Params.article.showReadingProgress | default false }} {{ if isset .Params "showreadingprogress" }}