Compare commits

...
5 Commits
Author SHA1 Message Date
Nuno C. 69014f6547 Bump version to 3.4.0 2026-08-22 09:07:41 +01:00
ZhenShuo Leo 9f8972fecf fix: medium-zoom conflict with featureImageHover 2026-08-22 09:06:46 +01:00
ZhenShuo Leo 4b42f34de5 fix: katex rendering (#3062) 2026-08-22 09:06:16 +01:00
Nuno Coração be63d03bea 3.3.0 2026-08-21 02:18:08 +01:00
ZhenShuo2021 8334f00562 fix: JS broken in v3 (#3061)
* fix: zoom broken in v3 (#3060)

* fix: buymeacoffee broken in v3
2026-08-21 02:17:22 +01:00
11 changed files with 27 additions and 47 deletions

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
mediumZoom(document.querySelectorAll("img:not(.nozoom)"), {
margin: 24,
background: "rgba(0,0,0,0.5)",
scrollOffset: 0,
});
+11 -27
View File
@@ -62,32 +62,16 @@
{{ end }}
</body>
{{ 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. */}}
<script>
(function () {
var load = function () {
var s = document.createElement("script");
s.src = "https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js";
s.setAttribute("data-name", "BMC-Widget");
s.setAttribute("data-cfasync", "false");
s.setAttribute("data-id", {{ site.Params.buymeacoffee.identifier }});
s.setAttribute("data-description", "Support me on Buy me a coffee!");
{{ with site.Params.buymeacoffee.globalWidgetMessage }}s.setAttribute("data-message", {{ . }});{{ end }}
s.setAttribute("data-color", {{ site.Params.buymeacoffee.globalWidgetColor | default `#FFDD00` }});
{{ with site.Params.buymeacoffee.globalWidgetPosition }}s.setAttribute("data-position", {{ . }});{{ end }}
s.setAttribute("data-x_margin", "18");
s.setAttribute("data-y_margin", "18");
document.body.appendChild(s);
};
if ("requestIdleCallback" in window) {
requestIdleCallback(load, { timeout: 4000 });
} else {
window.addEventListener("load", function () {
setTimeout(load, 1500);
});
}
})();
</script>
<script
data-name="BMC-Widget"
data-cfasync="false"
src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js"
data-id="{{ site.Params.buymeacoffee.identifier }}"
data-description="Support me on Buy me a coffee!"
{{ with site.Params.buymeacoffee.globalWidgetMessage }}data-message="{{ . }}"{{ end }}
{{ with site.Params.buymeacoffee.globalWidgetColor | default `#FFDD00` }}data-color="{{ . }}"{{ end }}
{{ with site.Params.buymeacoffee.globalWidgetPosition }}data-position="{{ . }}"{{ end }}
data-x_margin="18"
data-y_margin="18"></script>
{{ end }}
</html>
@@ -98,7 +98,7 @@
loading="lazy"
decoding="async"
fetchpriority="low"
class="not-prose absolute inset-0 h-full w-full object-cover transition-transform duration-700 ease-[cubic-bezier(0.22,1,0.36,1)] {{ if $featureImageHover }}group-hover:scale-[1.03]{{ end }}"
class="nozoom not-prose absolute inset-0 h-full w-full object-cover transition-transform duration-700 ease-[cubic-bezier(0.22,1,0.36,1)] {{ if $featureImageHover }}group-hover:scale-[1.03]{{ end }}"
{{ with $featureImagePosition }}style="object-position: {{ . }};"{{ end }} />
</div>
{{ end }}
@@ -74,7 +74,7 @@
loading="lazy"
decoding="async"
fetchpriority="low"
class="not-prose absolute inset-0 h-full w-full object-cover transition-transform duration-700 ease-[cubic-bezier(0.22,1,0.36,1)] {{ if $featureImageHover }}group-hover:scale-[1.03]{{ end }}"
class="nozoom not-prose absolute inset-0 h-full w-full object-cover transition-transform duration-700 ease-[cubic-bezier(0.22,1,0.36,1)] {{ if $featureImageHover }}group-hover:scale-[1.03]{{ end }}"
{{ with $featureImagePosition }}style="object-position: {{ . }};"{{ end }} />
</div>
{{ end }}
+1 -1
View File
@@ -78,7 +78,7 @@
loading="lazy"
decoding="async"
fetchpriority="low"
class="not-prose absolute inset-0 h-full w-full object-cover transition-transform duration-700 ease-[cubic-bezier(0.22,1,0.36,1)] {{ if $featureImageHover }}group-hover:scale-[1.03]{{ end }}"
class="nozoom not-prose absolute inset-0 h-full w-full object-cover transition-transform duration-700 ease-[cubic-bezier(0.22,1,0.36,1)] {{ if $featureImageHover }}group-hover:scale-[1.03]{{ end }}"
{{ with $featureImagePosition }}style="object-position: {{ . }};"{{ end }} />
</div>
{{ end }}
+1 -1
View File
@@ -91,7 +91,7 @@
loading="lazy"
decoding="async"
fetchpriority="low"
class="not-prose absolute inset-0 h-full w-full object-cover transition-transform duration-700 ease-[cubic-bezier(0.22,1,0.36,1)] {{ if $featureImageHover }}group-hover:scale-[1.03]{{ end }}"
class="nozoom not-prose absolute inset-0 h-full w-full object-cover transition-transform duration-700 ease-[cubic-bezier(0.22,1,0.36,1)] {{ if $featureImageHover }}group-hover:scale-[1.03]{{ end }}"
{{ with $featureImagePosition }}style="object-position: {{ . }};"{{ end }} />
</div>
{{ end }}
-9
View File
@@ -60,15 +60,6 @@
</p>
{{ end }}
</div>
{{ if not .Site.Params.disableImageZoom | default true }}
<script>
mediumZoom(document.querySelectorAll("img:not(.nozoom)"), {
margin: 24,
background: "rgba(0,0,0,0.5)",
scrollOffset: 0,
});
</script>
{{ end }}
{{/* Extend footer - eg. for extra scripts, etc. */}}
{{ if templates.Exists "partials/extend-footer.html" }}
{{ partialCached "extend-footer.html" . }}
+3 -3
View File
@@ -157,6 +157,8 @@
{{ if not .Site.Params.disableImageZoom | default true }}
{{ $zoomJS := resources.Get "lib/zoom/zoom.min.umd.js" | resources.Fingerprint $alg }}
<script defer src="{{ $zoomJS.RelPermalink }}" integrity="{{ $zoomJS.Data.Integrity }}"></script>
{{ $zoomInit := resources.Get "js/medium-zoom.js" | resources.Fingerprint $alg }}
<script defer src="{{ $zoomInit.RelPermalink }}" integrity="{{ $zoomInit.Data.Integrity }}"></script>
{{ end }}
{{ $showReadingProgress := site.Params.article.showReadingProgress | default false }}
{{ if isset .Params "showreadingprogress" }}
@@ -186,9 +188,7 @@
{{ if .Site.Params.rtl | default false }}
{{ $jsResources = $jsResources | append (resources.Get "js/rtl.js") }}
{{ end }}
{{ if .Page.HasShortcode "katex" }}
{{ $jsResources = $jsResources | append (resources.Get "js/katex-render.js") }}
{{ end }}
{{ $jsResources = $jsResources | append (resources.Get "js/katex-render.js") }}
{{ $jsResources = $jsResources | append (resources.Get "js/menu-a11y.js") }}
{{ $jsResources = $jsResources | append (resources.Get "js/print-support.js") }}
{{ $jsResources = $jsResources | append (resources.Get "js/email.js") }}
+1 -1
View File
@@ -49,7 +49,7 @@
loading="lazy"
decoding="async"
fetchpriority="low"
class="not-prose absolute inset-0 h-full w-full object-cover transition-transform duration-700 ease-[cubic-bezier(0.22,1,0.36,1)] {{ if $featureImageHover }}group-hover:scale-[1.03]{{ end }}"
class="nozoom not-prose absolute inset-0 h-full w-full object-cover transition-transform duration-700 ease-[cubic-bezier(0.22,1,0.36,1)] {{ if $featureImageHover }}group-hover:scale-[1.03]{{ end }}"
{{ with $featureImagePosition }}style="object-position: {{ . }};"{{ end }} />
</figure>
{{ end }}
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "hugo-blowfish-theme",
"version": "3.2.0",
"version": "3.3.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "hugo-blowfish-theme",
"version": "3.2.0",
"version": "3.3.0",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hugo-blowfish-theme",
"version": "3.2.0",
"version": "3.4.0",
"description": "Blowfish theme for Hugo.",
"scripts": {
"postinstall": "vendor-copy",