summaryrefslogtreecommitdiffstats
path: root/static/assets/js/fuji.min.js
diff options
context:
space:
mode:
authoramzrk22020-06-12 13:15:20 +0800
committeramzrk22020-06-12 13:15:20 +0800
commitea46f3c293c2d725a1ed9cf03ff42e8b54cd6ad2 (patch)
treeaf7cdace444cd857dcf10975c28eef3ca61cd70d /static/assets/js/fuji.min.js
parent434c94873196dbb975dfc0479c33b9533e9ce58b (diff)
downloadhugo-theme-fuji-ea46f3c293c2d725a1ed9cf03ff42e8b54cd6ad2.tar.gz
hugo-theme-fuji-ea46f3c293c2d725a1ed9cf03ff42e8b54cd6ad2.tar.bz2
hugo-theme-fuji-ea46f3c293c2d725a1ed9cf03ff42e8b54cd6ad2.zip
Custom title font supported
Diffstat (limited to 'static/assets/js/fuji.min.js')
-rw-r--r--static/assets/js/fuji.min.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/static/assets/js/fuji.min.js b/static/assets/js/fuji.min.js
index 7113209..90c27a6 100644
--- a/static/assets/js/fuji.min.js
+++ b/static/assets/js/fuji.min.js
@@ -1,2 +1 @@
-"use strict";function getNowTheme(){var e=document.body.getAttribute("data-theme");return"auto"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":"dark"===e?"dark":"light"}function updateMeidumTheme(e){var t=getNowTheme();e&&(e.detach(),e="dark"===t?mediumZoom(".img-zoomable",{background:"#2f3136"}):mediumZoom(".img-zoomable",{background:"#fffffd"}))}function updateUtterancesTheme(e){var t=getNowTheme();e&&("dark"===t?e.contentWindow.postMessage({type:"set-theme",theme:"photon-dark"},"https://utteranc.es"):e.contentWindow.postMessage({type:"set-theme",theme:"github-light"},"https://utteranc.es"))}var mediumInst;document.querySelector("span.post-comment-notloaded")&&document.querySelector("span.post-comment-notloaded").addEventListener("click",loadComment),document.querySelector(".btn .btn-scroll-top").addEventListener("click",function(){document.documentElement.scrollTop=0}),mediumInst="dark"===getNowTheme()?mediumZoom(".img-zoomable",{background:"#2f3136"}):mediumZoom(".img-zoomable",{background:"#fffffd"}),document.querySelector(".btn .btn-toggle-mode").addEventListener("click",function(){var e=getNowTheme(),t=document.body.getAttribute("data-theme"),o=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";"auto"===t?(document.body.setAttribute("data-theme","light"===e?"dark":"light"),localStorage.setItem("fuji_data-theme","light"===e?"dark":"light")):"light"===t?(document.body.setAttribute("data-theme","dark"),localStorage.setItem("fuji_data-theme","dark"==o?"auto":"dark")):(document.body.setAttribute("data-theme","light"),localStorage.setItem("fuji_data-theme","light"==o?"auto":"light")),updateMeidumTheme(mediumInst);var m=document.querySelector(".post-comment");m&&document.querySelector("span.post-comment-notloaded").getAttribute("style")&&("utterances"===m.getAttribute("data-comment")&&updateUtterancesTheme(document.querySelector(".post-comment iframe")),"disqus"===m.getAttribute("data-comment")&&DISQUS.reset({reload:!0}))});
-//# sourceMappingURL=fuji.min.js.map
+"use strict";function getNowTheme(){var e=document.body.getAttribute("data-theme");return"auto"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":"dark"===e?"dark":"light"}function updateMeidumTheme(e){var t=getNowTheme();e&&(e.detach(),e="dark"===t?mediumZoom(".img-zoomable",{background:"#2f3136"}):mediumZoom(".img-zoomable",{background:"#fffffd"}))}function updateUtterancesTheme(e){var t=getNowTheme();e&&("dark"===t?e.contentWindow.postMessage({type:"set-theme",theme:"photon-dark"},"https://utteranc.es"):e.contentWindow.postMessage({type:"set-theme",theme:"github-light"},"https://utteranc.es"))}var mediumInst;document.querySelector("span.post-comment-notloaded")&&document.querySelector("span.post-comment-notloaded").addEventListener("click",loadComment),document.querySelector(".btn .btn-scroll-top").addEventListener("click",function(){document.documentElement.scrollTop=0}),mediumInst="dark"===getNowTheme()?mediumZoom(".img-zoomable",{background:"#2f3136"}):mediumZoom(".img-zoomable",{background:"#fffffd"}),document.querySelector(".btn .btn-toggle-mode").addEventListener("click",function(){var e=getNowTheme(),t=document.body.getAttribute("data-theme"),o=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";"auto"===t?(document.body.setAttribute("data-theme","light"===e?"dark":"light"),localStorage.setItem("fuji_data-theme","light"===e?"dark":"light")):"light"===t?(document.body.setAttribute("data-theme","dark"),localStorage.setItem("fuji_data-theme","dark"==o?"auto":"dark")):(document.body.setAttribute("data-theme","light"),localStorage.setItem("fuji_data-theme","light"==o?"auto":"light")),updateMeidumTheme(mediumInst);var m=document.querySelector(".post-comment");m&&document.querySelector("span.post-comment-notloaded").getAttribute("style")&&("utterances"===m.getAttribute("data-comment")&&updateUtterancesTheme(document.querySelector(".post-comment iframe")),"disqus"===m.getAttribute("data-comment")&&DISQUS.reset({reload:!0}))}); \ No newline at end of file