From 3c38d54a87fcc844075c4ee8efc1ce1d85ac5117 Mon Sep 17 00:00:00 2001 From: Dillon Date: Wed, 22 Apr 2020 17:50:30 +0800 Subject: [PATCH] feat(home): add custom content for home page (#248) --- README.md | 6 +-- README.zh-cn.md | 3 +- assets/js/theme.min.js | 2 +- assets/js/theme.min.js.map | 2 +- exampleSite/config.toml | 38 ++++++++++++++++--- exampleSite/content/about.en.md | 5 ++- exampleSite/content/about.fr.md | 5 ++- exampleSite/content/about.zh-cn.md | 3 +- .../posts/theme-documentation-basics.en.md | 21 +++++++++- .../posts/theme-documentation-basics.fr.md | 21 +++++++++- .../posts/theme-documentation-basics.zh-cn.md | 21 +++++++++- layouts/_default/baseof.html | 4 +- layouts/index.html | 10 +++++ layouts/partials/assets.html | 11 ++---- layouts/partials/comment.html | 2 +- layouts/partials/plugin/analytics.html | 22 +++++++++++ layouts/partials/plugin/analytics/fathom.html | 13 ------- layouts/partials/plugin/script.html | 2 +- layouts/posts/single.html | 2 +- src/js/theme.js | 2 +- 20 files changed, 148 insertions(+), 47 deletions(-) create mode 100644 layouts/partials/plugin/analytics.html delete mode 100644 layouts/partials/plugin/analytics/fathom.html diff --git a/README.md b/README.md index fc14b3a6..93446408 100644 --- a/README.md +++ b/README.md @@ -62,8 +62,8 @@ I hope you will LoveIt ❤️! * Optimized for **performance**: 99/100 on mobile and 100/100 on desktop in [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights) * Optimized SEO performance with a correct **SEO SCHEMA** based on JSON-LD -* [**Google Analytics**](https://analytics.google.com/analytics) supported -* [**Fathom Analytics**](https://usefathom.com/) supported +* **[Google Analytics](https://analytics.google.com/analytics)** supported +* **[Fathom Analytics](https://usefathom.com/)** supported * Search engine **verification** supported (Google, Bind, Yandex and Baidu) * **CDN** for third-party libraries supported * Automatically converted images with **Lazy Load** by [lazysizes](https://github.com/aFarkas/lazysizes) @@ -136,7 +136,7 @@ All feedback is welcome! Head over to the [issue tracker](https://github.com/dil ## License -LoveIt is licensed under the MIT license. Check the [LICENSE file](https://github.com/dillonzq/LoveIt/blob/master/LICENSE) for details. +LoveIt is licensed under the **MIT** license. Check the [LICENSE file](https://github.com/dillonzq/LoveIt/blob/master/LICENSE) for details. Thanks to the authors of following resources included in the theme: diff --git a/README.zh-cn.md b/README.zh-cn.md index 2c6d9a59..4c9c14b4 100644 --- a/README.zh-cn.md +++ b/README.zh-cn.md @@ -58,6 +58,7 @@ * **性能**优化:在 [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights) 中, 99/100 的移动设备得分和 100/100 的桌面设备得分 * 使用基于 JSON-LD 格式 的 **SEO SCHEMA** 文件进行 SEO 优化 * 支持 **[Google Analytics](https://analytics.google.com/analytics)** +* 支持 **[Fathom Analytics](https://usefathom.com/)** * 支持搜索引擎的**网站验证** (Google, Bind, Yandex and Baidu) * 支持所有第三方库的 **CDN** * 基于 [lazysizes](https://github.com/aFarkas/lazysizes) 自动转换图片为**懒加载** @@ -130,7 +131,7 @@ LoveIt 支持下列语言: ## 许可协议 -LoveIt 根据 MIT 许可协议授权。 更多信息请查看 [LICENSE 文件](https://github.com/dillonzq/LoveIt/blob/master/LICENSE)。 +LoveIt 根据 **MIT** 许可协议授权。 更多信息请查看 [LICENSE 文件](https://github.com/dillonzq/LoveIt/blob/master/LICENSE)。 LoveIt 主题中用到了以下项目,感谢它们的作者: diff --git a/assets/js/theme.min.js b/assets/js/theme.min.js index 40ee2a87..cec80ea5 100644 --- a/assets/js/theme.min.js +++ b/assets/js/theme.min.js @@ -1,4 +1,4 @@ "use strict";function _objectDestructuringEmpty(a){if(null==a)throw new TypeError("Cannot destructure undefined")}function _createForOfIteratorHelper(a){if("undefined"==typeof Symbol||null==a[Symbol.iterator]){if(Array.isArray(a)||(a=_unsupportedIterableToArray(a))){var b=0,c=function(){};return{s:c,n:function n(){return b>=a.length?{done:!0}:{done:!1,value:a[b++]}},e:function e(a){throw a},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var d,e,f=!0,g=!1;return{s:function s(){d=a[Symbol.iterator]()},n:function n(){var a=d.next();return f=a.done,a},e:function e(a){g=!0,e=a},f:function f(){try{f||null==d.return||d.return()}finally{if(g)throw e}}}}function _toConsumableArray(a){return _arrayWithoutHoles(a)||_iterableToArray(a)||_unsupportedIterableToArray(a)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(a,b){if(a){if("string"==typeof a)return _arrayLikeToArray(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);return"Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c?Array.from(c):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?_arrayLikeToArray(a,b):void 0}}function _iterableToArray(a){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(a))return Array.from(a)}function _arrayWithoutHoles(a){if(Array.isArray(a))return _arrayLikeToArray(a)}function _arrayLikeToArray(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=Array(b);c$1"),g=g.replace(new RegExp("(".concat(a,")"),"gi"),"$1")}),{uri:e.uri,title:f,date:e.date,context:g}})};a._index?e(f()):fetch(b.lunrIndexURL).then(function(a){return a.json()}).then(function(c){var d={};a._index=lunr(function(){var a=this;b.lunrLanguageCode&&this.use(lunr[b.lunrLanguageCode]),this.ref("uri"),this.field("title",{boost:50}),this.field("tags",{boost:20}),this.field("description",{boost:10}),this.field("content",{boost:5}),this.metadataWhitelist=["position"],c.forEach(function(b){d[b.uri]=b,a.add(b)})}),a._indexData=d,e(f())}).catch(function(a){console.error(a),e([])})}else"algolia"===b.type&&(h.style.display="inline",i.style.display="none",a._algoliaIndex=a._algoliaIndex||algoliasearch(b.algoliaAppID,b.algoliaSearchKey).initIndex(b.algoliaIndex),a._algoliaIndex.search(c,{offset:0,length:12,attributesToHighlight:["title","content"]}).then(function(a){var b=a.hits;e(b.map(function(a){var b=a.uri,c=a.date,d=a._highlightResult,e=d.title,f=d.content;return{uri:b,title:e.value,date:c,context:f.value}}))}).catch(function(a){console.error(a),e([])}))},templates:{suggestion:function suggestion(a){var b=a.title,c=a.date,d=a.context;return"
".concat(b,"").concat(c,"
").concat(d,"
")},empty:function empty(a){var c=a.query;return"
".concat(b.noResultsFound,": \"").concat(c,"\"
")},footer:function footer(a){_objectDestructuringEmpty(a);var c="algolia"===b.type?{searchType:"algolia",icon:"",href:"https://www.algolia.com/"}:{searchType:"Lunr.js",icon:"",href:"https://lunrjs.com/"},d=c.searchType,e=c.icon,f=c.href;return"")}}});e.on("autocomplete:selected",function(a,b){window.location.assign(b.uri)}),c?a._searchMobile=e:a._searchDesktop=e};if(b.lunrSegmentitURL&&!document.getElementById("lunr-segmentit")){var k=document.createElement("script");k.id="lunr-segmentit",k.type="text/javascript",k.src=b.lunrSegmentitURL,k.async=!0,k.readyState?k.onreadystatechange=function(){("loaded"==k.readyState||"complete"==k.readyState)&&(k.onreadystatechange=null,j())}:k.onload=function(){j()},document.body.appendChild(k)}else j()}}},{key:"initLightGallery",value:function initLightGallery(){this.config.lightGallery&&lightGallery(document.getElementById("content"),this.config.lightGallery)}},{key:"initHighlight",value:function initHighlight(){var a=this;this.util.forEach(document.querySelectorAll(".highlight > .chroma"),function(a){var b=a.querySelectorAll("pre.chroma > code");b.length&&(a.className+=" "+b[b.length-1].className.toLowerCase(),b[0].classList.add("lnc"),b[b.length-1].classList.remove("lnc"))}),this.util.forEach(document.querySelectorAll(".highlight > pre.chroma"),function(a){var b=document.createElement("div");b.className=a.className;var c=document.createElement("table");b.appendChild(c);var d=document.createElement("tbody");c.appendChild(d);var e=document.createElement("tr");d.appendChild(e);var f=document.createElement("td");e.appendChild(f),a.parentElement.replaceChild(b,a),f.appendChild(a)}),this.util.forEach(document.querySelectorAll("pre > code"),function(b){if(b.classList.add("block"),!b.classList.contains("lnc")&&a.config.clipboard){var c=document.createElement("div");c.classList.add("copy-button"),c.innerHTML="",c.setAttribute("data-clipboard-text",b.innerText),c.title=a.config.clipboard.title;var d=new ClipboardJS(c);d.on("success",function(){a.util.animateCSS(b,"flash")}),b.after(c)}})}},{key:"initTable",value:function initTable(){this.util.forEach(document.querySelectorAll(".content table"),function(a){var b=document.createElement("div");b.className="table-wrapper",a.parentElement.replaceChild(b,a),b.appendChild(a)})}},{key:"initHeaderLink",value:function initHeaderLink(){for(var a=1;6>=a;a++)this.util.forEach(document.querySelectorAll(".page.single .content > h"+a),function(a){a.classList.add("headerLink"),a.innerHTML="").concat(a.innerHTML)})}},{key:"initToc",value:function initToc(){var a=this,b=document.getElementById("TableOfContents");if(null!==b)if(this.util.isTocStatic()){var o=document.getElementById("toc-content-static");b.parentElement!==o&&(b.parentElement.removeChild(b),o.appendChild(b)),this._tocOnScroll&&this.scrollEventSet.delete(this._tocOnScroll)}else{var p=document.getElementById("toc-content-auto");b.parentElement!==p&&(b.parentElement.removeChild(b),p.appendChild(b));var c=document.getElementById("toc-auto"),d=document.getElementsByClassName("page")[0],e=d.getBoundingClientRect();c.style.left="".concat(e.left+e.width+20,"px"),c.style.maxWidth="".concat(d.getBoundingClientRect().left-20,"px");var f=b.getElementsByTagName("a"),g=b.getElementsByTagName("li"),h=document.getElementsByClassName("headerLink"),j="normal"!==this.config.headerMode.desktop,k=document.getElementById("header-desktop").offsetHeight,l=20+(j?k:0),m=c.offsetTop,n=m-l+(j?0:k);this._tocOnScroll=this._tocOnScroll||function(){var d=document.getElementById("post-footer").offsetTop,e=d-c.getBoundingClientRect().height,o=e-l+(j?0:k);a.newScrollTopo?(c.style.position="absolute",c.style.top="".concat(e,"px")):(c.style.position="fixed",c.style.top="".concat(l,"px")),a.util.forEach(f,function(a){a.classList.remove("active")}),a.util.forEach(g,function(a){a.classList.remove("has-active")});for(var p=20+(j?k:0),q=h.length-1,r=0;rp||s<=p&&t>p){q=r;break}}if(-1!==q){f[q].classList.add("active");for(var u=f[q].parentElement;u!==b;)u.classList.add("has-active"),u=u.parentElement.parentElement}},this._tocOnScroll(),this.scrollEventSet.add(this._tocOnScroll)}}},{key:"initMath",value:function initMath(){this.config.math&&renderMathInElement(document.body,this.config.math)}},{key:"initMermaid",value:function initMermaid(){var a=this,b=document.getElementsByClassName("mermaid");b.length&&(mermaid.initialize({startOnLoad:!1,theme:"null"}),this.util.forEach(b,function(b){mermaid.mermaidAPI.render("svg-"+b.id,a.data[b.id],function(a){b.innerHTML=a},b)}))}},{key:"initEcharts",value:function initEcharts(){var a=this;this._echartsOnSwitchTheme=this._echartsOnSwitchTheme||function(){a._echartsArr=a._echartsArr||[];for(var b=0;bd?(b.classList.remove("fadeInDown"),a.util.animateCSS(b,["fadeOutUp","faster"],!0)):e<-d&&(b.classList.remove("fadeOutUp"),a.util.animateCSS(b,["fadeInDown","faster"],!0))}),a.newScrollTop>d?e>d?(c.classList.remove("fadeIn"),a.util.animateCSS(c,["fadeOut","faster"],!0)):e<-d&&(c.style.display="block",c.classList.remove("fadeOut"),a.util.animateCSS(c,["fadeIn","faster"],!0)):c.style.display="none";var f,g=_createForOfIteratorHelper(a.scrollEventSet);try{for(g.s();!(f=g.n()).done;){var h=f.value;h()}}catch(a){g.e(a)}finally{g.f()}a.oldScrollTop=a.newScrollTop},!1)}},{key:"onResize",value:function onResize(){var a=this;window.addEventListener("resize",function(){a._resizeTimeout||(a._resizeTimeout=window.setTimeout(function(){a._resizeTimeout=null;var b,c=_createForOfIteratorHelper(a.resizeEventSet);try{for(c.s();!(b=c.n()).done;){var d=b.value;d()}}catch(a){c.e(a)}finally{c.f()}a.initToc(),a.initSmoothScroll(),a.initMermaid(),a.initSearch()},100))},!1)}},{key:"onClickMask",value:function onClickMask(){var a=this;document.getElementById("mask").addEventListener("click",function(){var b,c=_createForOfIteratorHelper(a.clickMaskEventSet);try{for(c.s();!(b=c.n()).done;){var d=b.value;d()}}catch(a){c.e(a)}finally{c.f()}document.body.classList.remove("blur")},!1)}},{key:"init",value:function init(){this.initMenuMobile(),this.initSwitchTheme(),this.initSearch(),this.initLightGallery(),this.initHighlight(),this.initTable(),this.initHeaderLink(),this.initToc(),this.initComment(),this.initSmoothScroll(),this.initMath(),this.initMermaid(),this.initEcharts(),this.initTypeit(),this.initMapbox(),this.onScroll(),this.onResize(),this.onClickMask()}}]),a}(),themeInit=function(){var a=new Theme;a.init()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",themeInit,!1):themeInit(); +},{name:"search",source:function source(c,d){h.style.display="inline",i.style.display="none";var e=function(a){h.style.display="none",i.style.display="inline",d(a)};if("lunr"===b.type){var f=function(){return lunr.queryHandler&&(c=lunr.queryHandler(c)),a._index.search(c).slice(0,12).map(function(b){var c=b.ref,d=b.matchData.metadata,e=a._indexData[c],f=e.title,g=e.content,h=0;return Object.values(d).forEach(function(a){var b=a.description,c=a.content;if(b)g=e.description,h=-1;else if(c){var d=c.position[0][0];(d$1"),g=g.replace(new RegExp("(".concat(a,")"),"gi"),"$1")}),{uri:e.uri,title:f,date:e.date,context:g}})};a._index?e(f()):fetch(b.lunrIndexURL).then(function(a){return a.json()}).then(function(c){var d={};a._index=lunr(function(){var a=this;b.lunrLanguageCode&&this.use(lunr[b.lunrLanguageCode]),this.ref("uri"),this.field("title",{boost:50}),this.field("tags",{boost:20}),this.field("description",{boost:10}),this.field("content",{boost:5}),this.metadataWhitelist=["position"],c.forEach(function(b){d[b.uri]=b,a.add(b)})}),a._indexData=d,e(f())}).catch(function(a){console.error(a),e([])})}else"algolia"===b.type&&(h.style.display="inline",i.style.display="none",a._algoliaIndex=a._algoliaIndex||algoliasearch(b.algoliaAppID,b.algoliaSearchKey).initIndex(b.algoliaIndex),a._algoliaIndex.search(c,{offset:0,length:12,attributesToHighlight:["title","content"]}).then(function(a){var b=a.hits;e(b.map(function(a){var b=a.uri,c=a.date,d=a._highlightResult,e=d.title,f=d.content;return{uri:b,title:e.value,date:c,context:f.value}}))}).catch(function(a){console.error(a),e([])}))},templates:{suggestion:function suggestion(a){var b=a.title,c=a.date,d=a.context;return"
".concat(b,"").concat(c,"
").concat(d,"
")},empty:function empty(a){var c=a.query;return"
".concat(b.noResultsFound,": \"").concat(c,"\"
")},footer:function footer(a){_objectDestructuringEmpty(a);var c="algolia"===b.type?{searchType:"algolia",icon:"",href:"https://www.algolia.com/"}:{searchType:"Lunr.js",icon:"",href:"https://lunrjs.com/"},d=c.searchType,e=c.icon,f=c.href;return"")}}});e.on("autocomplete:selected",function(a,b){window.location.assign(b.uri)}),c?a._searchMobile=e:a._searchDesktop=e};if(b.lunrSegmentitURL&&!document.getElementById("lunr-segmentit")){var k=document.createElement("script");k.id="lunr-segmentit",k.type="text/javascript",k.src=b.lunrSegmentitURL,k.async=!0,k.readyState?k.onreadystatechange=function(){("loaded"==k.readyState||"complete"==k.readyState)&&(k.onreadystatechange=null,j())}:k.onload=function(){j()},document.body.appendChild(k)}else j()}}},{key:"initLightGallery",value:function initLightGallery(){this.config.lightGallery&&lightGallery(document.getElementById("content"),this.config.lightGallery)}},{key:"initHighlight",value:function initHighlight(){var a=this;this.util.forEach(document.querySelectorAll(".highlight > .chroma"),function(a){var b=a.querySelectorAll("pre.chroma > code");b.length&&(a.className+=" "+b[b.length-1].className.toLowerCase(),b[0].classList.add("lnc"),b[b.length-1].classList.remove("lnc"))}),this.util.forEach(document.querySelectorAll(".highlight > pre.chroma"),function(a){var b=document.createElement("div");b.className=a.className;var c=document.createElement("table");b.appendChild(c);var d=document.createElement("tbody");c.appendChild(d);var e=document.createElement("tr");d.appendChild(e);var f=document.createElement("td");e.appendChild(f),a.parentElement.replaceChild(b,a),f.appendChild(a)}),this.util.forEach(document.querySelectorAll("pre > code"),function(b){if(b.classList.add("block"),!b.classList.contains("lnc")&&a.config.clipboard){var c=document.createElement("div");c.classList.add("copy-button"),c.innerHTML="",c.setAttribute("data-clipboard-text",b.innerText),c.title=a.config.clipboard.title;var d=new ClipboardJS(c);d.on("success",function(){a.util.animateCSS(b,"flash")}),b.after(c)}})}},{key:"initTable",value:function initTable(){this.util.forEach(document.querySelectorAll(".content table"),function(a){var b=document.createElement("div");b.className="table-wrapper",a.parentElement.replaceChild(b,a),b.appendChild(a)})}},{key:"initHeaderLink",value:function initHeaderLink(){for(var a=1;6>=a;a++)this.util.forEach(document.querySelectorAll(".single .content > h"+a),function(a){a.classList.add("headerLink"),a.innerHTML="").concat(a.innerHTML)})}},{key:"initToc",value:function initToc(){var a=this,b=document.getElementById("TableOfContents");if(null!==b)if(this.util.isTocStatic()){var o=document.getElementById("toc-content-static");b.parentElement!==o&&(b.parentElement.removeChild(b),o.appendChild(b)),this._tocOnScroll&&this.scrollEventSet.delete(this._tocOnScroll)}else{var p=document.getElementById("toc-content-auto");b.parentElement!==p&&(b.parentElement.removeChild(b),p.appendChild(b));var c=document.getElementById("toc-auto"),d=document.getElementsByClassName("page")[0],e=d.getBoundingClientRect();c.style.left="".concat(e.left+e.width+20,"px"),c.style.maxWidth="".concat(d.getBoundingClientRect().left-20,"px");var f=b.getElementsByTagName("a"),g=b.getElementsByTagName("li"),h=document.getElementsByClassName("headerLink"),j="normal"!==this.config.headerMode.desktop,k=document.getElementById("header-desktop").offsetHeight,l=20+(j?k:0),m=c.offsetTop,n=m-l+(j?0:k);this._tocOnScroll=this._tocOnScroll||function(){var d=document.getElementById("post-footer").offsetTop,e=d-c.getBoundingClientRect().height,o=e-l+(j?0:k);a.newScrollTopo?(c.style.position="absolute",c.style.top="".concat(e,"px")):(c.style.position="fixed",c.style.top="".concat(l,"px")),a.util.forEach(f,function(a){a.classList.remove("active")}),a.util.forEach(g,function(a){a.classList.remove("has-active")});for(var p=20+(j?k:0),q=h.length-1,r=0;rp||s<=p&&t>p){q=r;break}}if(-1!==q){f[q].classList.add("active");for(var u=f[q].parentElement;u!==b;)u.classList.add("has-active"),u=u.parentElement.parentElement}},this._tocOnScroll(),this.scrollEventSet.add(this._tocOnScroll)}}},{key:"initMath",value:function initMath(){this.config.math&&renderMathInElement(document.body,this.config.math)}},{key:"initMermaid",value:function initMermaid(){var a=this,b=document.getElementsByClassName("mermaid");b.length&&(mermaid.initialize({startOnLoad:!1,theme:"null"}),this.util.forEach(b,function(b){mermaid.mermaidAPI.render("svg-"+b.id,a.data[b.id],function(a){b.innerHTML=a},b)}))}},{key:"initEcharts",value:function initEcharts(){var a=this;this._echartsOnSwitchTheme=this._echartsOnSwitchTheme||function(){a._echartsArr=a._echartsArr||[];for(var b=0;bd?(b.classList.remove("fadeInDown"),a.util.animateCSS(b,["fadeOutUp","faster"],!0)):e<-d&&(b.classList.remove("fadeOutUp"),a.util.animateCSS(b,["fadeInDown","faster"],!0))}),a.newScrollTop>d?e>d?(c.classList.remove("fadeIn"),a.util.animateCSS(c,["fadeOut","faster"],!0)):e<-d&&(c.style.display="block",c.classList.remove("fadeOut"),a.util.animateCSS(c,["fadeIn","faster"],!0)):c.style.display="none";var f,g=_createForOfIteratorHelper(a.scrollEventSet);try{for(g.s();!(f=g.n()).done;){var h=f.value;h()}}catch(a){g.e(a)}finally{g.f()}a.oldScrollTop=a.newScrollTop},!1)}},{key:"onResize",value:function onResize(){var a=this;window.addEventListener("resize",function(){a._resizeTimeout||(a._resizeTimeout=window.setTimeout(function(){a._resizeTimeout=null;var b,c=_createForOfIteratorHelper(a.resizeEventSet);try{for(c.s();!(b=c.n()).done;){var d=b.value;d()}}catch(a){c.e(a)}finally{c.f()}a.initToc(),a.initSmoothScroll(),a.initMermaid(),a.initSearch()},100))},!1)}},{key:"onClickMask",value:function onClickMask(){var a=this;document.getElementById("mask").addEventListener("click",function(){var b,c=_createForOfIteratorHelper(a.clickMaskEventSet);try{for(c.s();!(b=c.n()).done;){var d=b.value;d()}}catch(a){c.e(a)}finally{c.f()}document.body.classList.remove("blur")},!1)}},{key:"init",value:function init(){this.initMenuMobile(),this.initSwitchTheme(),this.initSearch(),this.initLightGallery(),this.initHighlight(),this.initTable(),this.initHeaderLink(),this.initToc(),this.initComment(),this.initSmoothScroll(),this.initMath(),this.initMermaid(),this.initEcharts(),this.initTypeit(),this.initMapbox(),this.onScroll(),this.onResize(),this.onClickMask()}}]),a}(),themeInit=function(){var a=new Theme;a.init()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",themeInit,!1):themeInit(); //# sourceMappingURL=theme.min.js.map \ No newline at end of file diff --git a/assets/js/theme.min.js.map b/assets/js/theme.min.js.map index 214cdf14..e6cf48fe 100644 --- a/assets/js/theme.min.js.map +++ b/assets/js/theme.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/js/theme.js"],"names":[],"mappings":"ilEAAM,CAAA,I,2HACM,C,CAAU,C,CAAS,CACvB,CAAQ,CAAG,CAAQ,EAAI,EADA,CAEvB,IAAK,GAAI,CAAA,CAAC,CAAG,CAAb,CAAgB,CAAC,CAAG,CAAQ,CAAC,MAA7B,CAAqC,CAAC,EAAtC,CAA0C,CAAO,CAAC,CAAQ,CAAC,CAAD,CAAT,CACpD,C,mDAEc,CACX,MAAQ,CAAA,QAAQ,CAAC,eAAT,EAA4B,QAAQ,CAAC,eAAT,CAAyB,SAAtD,EAAoE,QAAQ,CAAC,IAAT,CAAc,SAC5F,C,2CAEU,CACP,MAAO,CAAA,MAAM,CAAC,UAAP,CAAkB,oCAAlB,EAAwD,OAClE,C,iDAEa,CACV,MAAO,CAAA,MAAM,CAAC,UAAP,CAAkB,oCAAlB,EAAwD,OAClE,C,8CAEU,C,CAAS,C,CAAW,C,CAAU,C,CAAU,OAC1C,KAAK,CAAC,OAAN,CAAc,CAAd,CAD0C,GAChB,CAAS,CAAG,CAAC,CAAD,CADI,EAE/C,GAAA,CAAO,CAAC,SAAR,EAAkB,GAAlB,UAAsB,UAAtB,4BAAqC,CAArC,GAF+C,CAG/C,GAAM,CAAA,CAAO,CAAG,UAAM,OAClB,GAAA,CAAO,CAAC,SAAR,EAAkB,MAAlB,UAAyB,UAAzB,4BAAwC,CAAxC,GADkB,CAElB,CAAO,CAAC,mBAAR,CAA4B,cAA5B,CAA4C,CAA5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Ac,SAAd,CAAwB,MAAxB,CAA+B,MAA/B,CACH,CAHD,IAIH,C,mCAEM,CACH,KAAK,cAAL,EADG,CAEH,KAAK,eAAL,EAFG,CAGH,KAAK,UAAL,EAHG,CAIH,KAAK,gBAAL,EAJG,CAKH,KAAK,aAAL,EALG,CAMH,KAAK,SAAL,EANG,CAOH,KAAK,cAAL,EAPG,CAQH,KAAK,OAAL,EARG,CASH,KAAK,WAAL,EATG,CAUH,KAAK,gBAAL,EAVG,CAWH,KAAK,QAAL,EAXG,CAYH,KAAK,WAAL,EAZG,CAaH,KAAK,WAAL,EAbG,CAcH,KAAK,UAAL,EAdG,CAeH,KAAK,UAAL,EAfG,CAiBH,KAAK,QAAL,EAjBG,CAkBH,KAAK,QAAL,EAlBG,CAmBH,KAAK,WAAL,EACH,C,SAGC,SAAS,CAAG,UAAM,CACpB,GAAM,CAAA,CAAK,CAAG,GAAI,CAAA,KAAlB,CACA,CAAK,CAAC,IAAN,EACH,C,CAE2B,SAAxB,GAAA,QAAQ,CAAC,U,CAGT,QAAQ,CAAC,gBAAT,CAA0B,kBAA1B,CAA8C,SAA9C,I,CAFA,SAAS,E","file":"theme.min.js","sourcesContent":["class Util {\n forEach(elements, handler) {\n elements = elements || [];\n for (let i = 0; i < elements.length; i++) handler(elements[i]);\n }\n\n getScrollTop() {\n return (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop;\n }\n\n isMobile() {\n return window.matchMedia('only screen and (max-width: 680px)').matches;\n }\n\n isTocStatic() {\n return window.matchMedia('only screen and (max-width: 960px)').matches;\n }\n\n animateCSS(element, animation, reserved, callback) {\n if (!Array.isArray(animation)) animation = [animation];\n element.classList.add('animated', ...animation);\n const handler = () => {\n element.classList.remove('animated', ...animation);\n element.removeEventListener('animationend', handler);\n if (typeof callback === 'function') callback();\n };\n if (!reserved) element.addEventListener('animationend', handler, false);\n }\n}\n\nclass Theme {\n constructor() {\n this.config = window.config;\n this.data = this.config.data;\n this.isDark = document.body.classList.contains('dark');\n this.util = new Util();\n this.newScrollTop = this.util.getScrollTop();\n this.oldScrollTop = this.newScrollTop;\n this.scrollEventSet = new Set();\n this.resizeEventSet = new Set();\n this.switchThemeEventSet = new Set();\n this.clickMaskEventSet = new Set();\n }\n\n initMenuMobile() {\n const $menuToggleMobile = document.getElementById('menu-toggle-mobile');\n const $menuMobile = document.getElementById('menu-mobile');\n $menuToggleMobile.addEventListener('click', () => {\n document.body.classList.toggle('blur');\n $menuToggleMobile.classList.toggle('active');\n $menuMobile.classList.toggle('active');\n }, false);\n this._menuMobileOnClickMask = this._menuMobileOnClickMask || (() => {\n $menuToggleMobile.classList.remove('active');\n $menuMobile.classList.remove('active');\n });\n this.clickMaskEventSet.add(this._menuMobileOnClickMask);\n }\n\n initSwitchTheme() {\n this.util.forEach(document.getElementsByClassName('theme-switch'), $themeSwitch => {\n $themeSwitch.addEventListener('click', () => {\n document.body.classList.toggle('dark');\n this.isDark = !this.isDark;\n window.localStorage && localStorage.setItem('theme', this.isDark ? 'dark' : 'light');\n for (let event of this.switchThemeEventSet) event();\n }, false);\n });\n }\n\n initSearch() {\n const searchConfig = this.config.search;\n const isMobile = this.util.isMobile();\n if (!searchConfig || isMobile && this._searchMobileOnce || !isMobile && this._searchDesktopOnce) return;\n const classSuffix = isMobile ? 'mobile' : 'desktop';\n const $header = document.getElementById(`header-${classSuffix}`);\n const $searchInput = document.getElementById(`search-input-${classSuffix}`);\n const $searchToggle = document.getElementById(`search-toggle-${classSuffix}`);\n const $searchLoading = document.getElementById(`search-loading-${classSuffix}`);\n const $searchClear = document.getElementById(`search-clear-${classSuffix}`);\n if (isMobile) {\n this._searchMobileOnce = true;\n $searchInput.addEventListener('focus', () => {\n document.body.classList.add('blur');\n $header.classList.add('open');\n }, false);\n document.getElementById('search-cancel-mobile').addEventListener('click', () => {\n $header.classList.remove('open');\n document.body.classList.remove('blur');\n document.getElementById('menu-toggle-mobile').classList.remove('active');\n document.getElementById('menu-mobile').classList.remove('active');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n }, false);\n $searchClear.addEventListener('click', () => {\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n }, false);\n this._searchMobileOnClickMask = this._searchMobileOnClickMask || (() => {\n $header.classList.remove('open');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n });\n this.clickMaskEventSet.add(this._searchMobileOnClickMask);\n } else {\n this._searchDesktopOnce = true;\n $searchToggle.addEventListener('click', () => {\n document.body.classList.add('blur');\n $header.classList.add('open');\n $searchInput.focus();\n }, false);\n $searchClear.addEventListener('click', () => {\n $searchClear.style.display = 'none';\n this._searchDesktop && this._searchDesktop.autocomplete.setVal('');\n }, false);\n this._searchDesktopOnClickMask = this._searchDesktopOnClickMask || (() => {\n $header.classList.remove('open');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchDesktop && this._searchDesktop.autocomplete.setVal('');\n });\n this.clickMaskEventSet.add(this._searchDesktopOnClickMask);\n }\n $searchInput.addEventListener('input', () => {\n if ($searchInput.value === '') $searchClear.style.display = 'none';\n else $searchClear.style.display = 'inline';\n }, false);\n\n const CONTEXT_LENGTH = 200;\n const initAutosearch = () => {\n const autosearch = autocomplete(`#search-input-${classSuffix}`, {\n hint: false,\n autoselect: true,\n dropdownMenuContainer: `#search-dropdown-${classSuffix}`,\n clearOnSelected: true,\n cssClasses: { noPrefix: true },\n // debug: true,\n }, {\n name: 'search',\n source: (query, callback) => {\n $searchLoading.style.display = 'inline';\n $searchClear.style.display = 'none';\n const finish = (results) => {\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'inline';\n callback(results);\n };\n if (searchConfig.type === 'lunr') {\n const search = () => {\n if (lunr.queryHandler) query = lunr.queryHandler(query);\n return this._index.search(query).slice(0, 12).map(({ ref, matchData: { metadata } }) => {\n const matchData = this._indexData[ref];\n let { title, content: context } = matchData;\n let position = 0;\n Object.values(metadata).forEach(({ description, content }) => {\n if (description) {\n context = matchData.description;\n position = -1;\n } else if (content) {\n const matchPosition = content.position[0][0];\n if (matchPosition < position || position === 0) position = matchPosition;\n }\n });\n position -= CONTEXT_LENGTH / 5;\n if (position > 0) {\n position += context.substr(position, 25).lastIndexOf(' ') + 1;\n context = '...' + context.substr(position, CONTEXT_LENGTH);\n } else {\n context = context.substr(0, CONTEXT_LENGTH);\n }\n Object.keys(metadata).forEach(key => {\n title = title.replace(new RegExp(`(${key})`, 'gi'), '$1');\n context = context.replace(new RegExp(`(${key})`, 'gi'), '$1');\n });\n return {\n 'uri': matchData.uri,\n 'title' : title,\n 'date' : matchData.date,\n 'context' : context,\n };\n });\n }\n if (!this._index) {\n fetch(searchConfig.lunrIndexURL)\n .then(response => response.json())\n .then(data => {\n const indexData = {};\n this._index = lunr(function () {\n if (searchConfig.lunrLanguageCode) this.use(lunr[searchConfig.lunrLanguageCode]);\n this.ref('uri');\n this.field('title', { boost: 50 });\n this.field('tags', { boost: 20 });\n this.field('description', { boost: 10 });\n this.field('content', { boost: 5 });\n this.metadataWhitelist = ['position'];\n data.forEach((record) => {\n indexData[record.uri] = record;\n this.add(record);\n });\n });\n this._indexData = indexData;\n finish(search());\n }).catch(err => {\n console.error(err);\n finish([]);\n });\n } else finish(search());\n } else if (searchConfig.type === 'algolia') {\n $searchLoading.style.display = 'inline';\n $searchClear.style.display = 'none';\n this._algoliaIndex = this._algoliaIndex || algoliasearch(searchConfig.algoliaAppID, searchConfig.algoliaSearchKey).initIndex(searchConfig.algoliaIndex);\n this._algoliaIndex\n .search(query, { offset: 0, length: 12, attributesToHighlight: ['title', 'content'] })\n .then(({ hits }) => {\n finish(hits.map(({ uri, date, _highlightResult: { title, content } }) => ({\n uri: uri,\n title: title.value,\n date: date,\n context: content.value,\n })));\n })\n .catch(err => {\n console.error(err);\n finish([]);\n });\n }\n },\n templates: {\n suggestion: ({ title, date, context }) => `
${title}${date}
${context}
`,\n empty: ({ query }) => `
${searchConfig.noResultsFound}: \"${query}\"
`,\n footer: ({}) => {\n const { searchType, icon, href } = searchConfig.type === 'algolia' ? {\n searchType: 'algolia',\n icon: '',\n href: 'https://www.algolia.com/',\n } : {\n searchType: 'Lunr.js',\n icon: '',\n href: 'https://lunrjs.com/',\n };\n return ``;},\n },\n });\n autosearch.on('autocomplete:selected', (event, suggestion, dataset, context) => {\n window.location.assign(suggestion.uri);\n });\n if (isMobile) this._searchMobile = autosearch;\n else this._searchDesktop = autosearch;\n };\n if (searchConfig.lunrSegmentitURL && !document.getElementById('lunr-segmentit')) {\n const script = document.createElement('script');\n script.id = 'lunr-segmentit';\n script.type = 'text/javascript';\n script.src = searchConfig.lunrSegmentitURL;\n script.async = true;\n if (script.readyState) {\n script.onreadystatechange = () => {\n if (script.readyState == 'loaded' || script.readyState == 'complete'){\n script.onreadystatechange = null;\n initAutosearch();\n }\n };\n } else {\n script.onload = () => {\n initAutosearch();\n };\n }\n document.body.appendChild(script);\n } else initAutosearch();\n }\n\n initLightGallery() {\n if (this.config.lightGallery) lightGallery(document.getElementById('content'), this.config.lightGallery);\n }\n\n initHighlight() {\n this.util.forEach(document.querySelectorAll('.highlight > .chroma'), $chroma => {\n const $elements = $chroma.querySelectorAll('pre.chroma > code');\n if ($elements.length) {\n $chroma.className += ' ' + $elements[$elements.length - 1].className.toLowerCase();\n $elements[0].classList.add('lnc');\n $elements[$elements.length - 1].classList.remove('lnc');\n }\n });\n this.util.forEach(document.querySelectorAll('.highlight > pre.chroma'), $preChroma => {\n const $chroma = document.createElement('div');\n $chroma.className = $preChroma.className;\n const $table = document.createElement('table');\n $chroma.appendChild($table);\n const $tbody = document.createElement('tbody');\n $table.appendChild($tbody);\n const $tr = document.createElement('tr');\n $tbody.appendChild($tr);\n const $td = document.createElement('td');\n $tr.appendChild($td);\n $preChroma.parentElement.replaceChild($chroma, $preChroma);\n $td.appendChild($preChroma);\n });\n this.util.forEach(document.querySelectorAll('pre > code'), $code => {\n $code.classList.add('block');\n if ($code.classList.contains('lnc') || !this.config.clipboard) return;\n const $button = document.createElement('div');\n $button.classList.add('copy-button');\n $button.innerHTML = '';\n $button.setAttribute('data-clipboard-text', $code.innerText);\n $button.title = this.config.clipboard.title;\n const clipboard = new ClipboardJS($button);\n clipboard.on('success', e => {\n this.util.animateCSS($code, 'flash');\n });\n $code.after($button);\n });\n }\n\n initTable() {\n this.util.forEach(document.querySelectorAll('.content table'), $table => {\n const $wrapper = document.createElement('div');\n $wrapper.className = 'table-wrapper';\n $table.parentElement.replaceChild($wrapper, $table);\n $wrapper.appendChild($table);\n });\n }\n\n initHeaderLink() {\n for (let num = 1; num <= 6; num++) {\n this.util.forEach(document.querySelectorAll('.page.single .content > h' + num), $header => {\n $header.classList.add('headerLink');\n $header.innerHTML = `${$header.innerHTML}`;\n });\n }\n }\n\n initToc() {\n const $tocCore = document.getElementById('TableOfContents');\n if ($tocCore === null) return;\n if (this.util.isTocStatic()) {\n const $tocContentStatic = document.getElementById('toc-content-static');\n if ($tocCore.parentElement !== $tocContentStatic) {\n $tocCore.parentElement.removeChild($tocCore);\n $tocContentStatic.appendChild($tocCore);\n }\n if (this._tocOnScroll) this.scrollEventSet.delete(this._tocOnScroll);\n } else {\n const $tocContentAuto = document.getElementById('toc-content-auto');\n if ($tocCore.parentElement !== $tocContentAuto) {\n $tocCore.parentElement.removeChild($tocCore);\n $tocContentAuto.appendChild($tocCore);\n }\n const $toc = document.getElementById('toc-auto');\n const $page = document.getElementsByClassName('page')[0];\n const rect = $page.getBoundingClientRect();\n $toc.style.left = `${rect.left + rect.width + 20}px`;\n $toc.style.maxWidth = `${$page.getBoundingClientRect().left - 20}px`;\n const $tocLinkElements = $tocCore.getElementsByTagName('a');\n const $tocLiElements = $tocCore.getElementsByTagName('li');\n const $headerLinkElements = document.getElementsByClassName('headerLink');\n const headerIsFixed = this.config.headerMode.desktop !== 'normal';\n const headerHeight = document.getElementById('header-desktop').offsetHeight;\n const TOP_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\n const minTocTop = $toc.offsetTop;\n const minScrollTop = minTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight);\n this._tocOnScroll = this._tocOnScroll || (() => {\n const footerTop = document.getElementById('post-footer').offsetTop;\n const maxTocTop = footerTop - $toc.getBoundingClientRect().height;\n const maxScrollTop = maxTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight);\n if (this.newScrollTop < minScrollTop) {\n $toc.style.position = 'absolute';\n $toc.style.top = `${minTocTop}px`;\n } else if (this.newScrollTop > maxScrollTop) {\n $toc.style.position = 'absolute';\n $toc.style.top = `${maxTocTop}px`;\n } else {\n $toc.style.position = 'fixed';\n $toc.style.top = `${TOP_SPACING}px`;\n }\n\n this.util.forEach($tocLinkElements, $tocLink => { $tocLink.classList.remove('active'); });\n this.util.forEach($tocLiElements, $tocLi => { $tocLi.classList.remove('has-active'); });\n const INDEX_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\n let activeTocIndex = $headerLinkElements.length - 1;\n for (let i = 0; i < $headerLinkElements.length - 1; i++) {\n const thisTop = $headerLinkElements[i].getBoundingClientRect().top;\n const nextTop = $headerLinkElements[i + 1].getBoundingClientRect().top;\n if ((i == 0 && thisTop > INDEX_SPACING)\n || (thisTop <= INDEX_SPACING && nextTop > INDEX_SPACING)) {\n activeTocIndex = i;\n break;\n }\n }\n if (activeTocIndex !== -1) {\n $tocLinkElements[activeTocIndex].classList.add('active');\n let $parent = $tocLinkElements[activeTocIndex].parentElement;\n while ($parent !== $tocCore) {\n $parent.classList.add('has-active');\n $parent = $parent.parentElement.parentElement;\n }\n }\n });\n this._tocOnScroll();\n this.scrollEventSet.add(this._tocOnScroll);\n }\n }\n\n initMath() {\n if (this.config.math) renderMathInElement(document.body, this.config.math);\n }\n\n initMermaid() {\n const $mermaidElements = document.getElementsByClassName('mermaid');\n if ($mermaidElements.length) {\n mermaid.initialize({startOnLoad: false, theme: 'null'});\n this.util.forEach($mermaidElements, $mermaid => {\n mermaid.mermaidAPI.render('svg-' + $mermaid.id, this.data[$mermaid.id], svgCode => {\n $mermaid.innerHTML = svgCode;\n }, $mermaid);\n });\n }\n }\n\n initEcharts() {\n this._echartsOnSwitchTheme = this._echartsOnSwitchTheme || (() => {\n this._echartsArr = this._echartsArr || [];\n for (let i = 0; i < this._echartsArr.length; i++) {\n this._echartsArr[i].dispose();\n }\n this._echartsArr = [];\n this.util.forEach(document.getElementsByClassName('echarts'), $echarts => {\n const chart = echarts.init($echarts, this.isDark ? 'dark' : 'macarons', {renderer: 'svg'});\n chart.setOption(JSON.parse(this.data[$echarts.id]));\n this._echartsArr.push(chart);\n });\n });\n this.switchThemeEventSet.add(this._echartsOnSwitchTheme);\n this._echartsOnSwitchTheme();\n this._echartsOnResize = this._echartsOnResize || (() => {\n for (let i = 0; i < this._echartsArr.length; i++) {\n this._echartsArr[i].resize();\n }\n });\n this.resizeEventSet.add(this._echartsOnResize);\n }\n\n initMapbox() {\n if (this.config.mapbox) {\n mapboxgl.accessToken = this.config.mapbox.accessToken;\n mapboxgl.setRTLTextPlugin(this.config.mapbox.RTLTextPlugin);\n this._mapboxArr = this._mapboxArr || [];\n this.util.forEach(document.getElementsByClassName('mapbox'), $mapbox => {\n const { lng, lat, zoom, lightStyle, darkStyle, marked, navigation, geolocate, scale, fullscreen } = this.data[$mapbox.id];\n const mapbox = new mapboxgl.Map({\n container: $mapbox,\n center: [lng, lat],\n zoom: zoom,\n minZoom: .2,\n style: this.isDark ? darkStyle : lightStyle,\n attributionControl: false,\n });\n if (marked) {\n new mapboxgl.Marker().setLngLat([lng, lat]).addTo(mapbox);\n }\n if (navigation) {\n mapbox.addControl(new mapboxgl.NavigationControl(), 'bottom-right');\n }\n if (geolocate) {\n mapbox.addControl(new mapboxgl.GeolocateControl({\n positionOptions: {\n enableHighAccuracy: true,\n },\n showUserLocation: true,\n trackUserLocation: true,\n }), 'bottom-right');\n }\n if (scale) {\n mapbox.addControl(new mapboxgl.ScaleControl());\n }\n if (fullscreen) {\n mapbox.addControl(new mapboxgl.FullscreenControl());\n }\n mapbox.addControl(new MapboxLanguage());\n this._mapboxArr.push(mapbox);\n });\n this._mapboxOnSwitchTheme = this._mapboxOnSwitchTheme || (() => {\n this.util.forEach(this._mapboxArr, mapbox => {\n const $mapbox = mapbox.getContainer();\n const { lightStyle, darkStyle } = this.data[$mapbox.id];\n mapbox.setStyle(this.isDark ? darkStyle : lightStyle);\n mapbox.addControl(new MapboxLanguage());\n });\n });\n this.switchThemeEventSet.add(this._mapboxOnSwitchTheme);\n }\n }\n\n initTypeit() {\n if (this.config.typeit) {\n this.config.typeit.forEach(group => {\n const typeone = (i) => {\n const id = group[i];\n if (i === group.length - 1) {\n new TypeIt(`#${id}`, {\n strings: this.data[id],\n }).go();\n return;\n }\n let instance = new TypeIt(`#${id}`, {\n strings: this.data[id],\n afterComplete: () => {\n instance.destroy();\n typeone(i + 1);\n },\n }).go();\n };\n typeone(0);\n });\n }\n }\n\n initComment() {\n if (this.config.comment && this.config.comment.gitalk) {\n this.config.comment.gitalk.body = decodeURI(window.location.href);\n const gitalk = new Gitalk(this.config.comment.gitalk.body);\n gitalk.render('gitalk');\n }\n if (this.config.comment && this.config.comment.valine) new Valine(this.config.comment.valine);\n }\n\n initSmoothScroll() {\n if ((!this.util.isMobile() && this.config.headerMode.desktop === 'normal')\n || (this.util.isMobile() && this.config.headerMode.mobile === 'normal')) {\n new SmoothScroll('[href^=\"#\"]', {speed: 300, speedAsDuration: true});\n } else {\n new SmoothScroll('[href^=\"#\"]', {speed: 300, speedAsDuration: true, header: '#header-desktop'});\n }\n }\n\n onScroll() {\n const $headers = [];\n if (this.config.headerMode.desktop === 'auto') $headers.push(document.getElementById('header-desktop'));\n if (this.config.headerMode.mobile === 'auto') $headers.push(document.getElementById('header-mobile'));\n if (document.getElementById('comments')) {\n const $viewComments = document.getElementById('view-comments');\n $viewComments.href = `#comments`;\n $viewComments.style.display = 'block';\n }\n const $fixedButtons = document.getElementById('fixed-buttons');\n const MIN_SCROLL = 20;\n window.addEventListener('scroll', () => {\n this.newScrollTop = this.util.getScrollTop();\n const scroll = this.newScrollTop - this.oldScrollTop;\n this.util.forEach($headers, $header => {\n if (scroll > MIN_SCROLL) {\n $header.classList.remove('fadeInDown');\n this.util.animateCSS($header, ['fadeOutUp', 'faster'], true);\n } else if (scroll < - MIN_SCROLL) {\n $header.classList.remove('fadeOutUp');\n this.util.animateCSS($header, ['fadeInDown', 'faster'], true);\n }\n });\n if (this.newScrollTop > MIN_SCROLL) {\n if (scroll > MIN_SCROLL) {\n $fixedButtons.classList.remove('fadeIn');\n this.util.animateCSS($fixedButtons, ['fadeOut', 'faster'], true);\n } else if (scroll < - MIN_SCROLL) {\n $fixedButtons.style.display = 'block';\n $fixedButtons.classList.remove('fadeOut');\n this.util.animateCSS($fixedButtons, ['fadeIn', 'faster'], true);\n }\n } else {\n $fixedButtons.style.display = 'none';\n }\n for (let event of this.scrollEventSet) event();\n this.oldScrollTop = this.newScrollTop;\n }, false);\n }\n\n onResize() {\n window.addEventListener('resize', () => {\n if (!this._resizeTimeout) {\n this._resizeTimeout = window.setTimeout(() => {\n this._resizeTimeout = null;\n for (let event of this.resizeEventSet) event();\n this.initToc();\n this.initSmoothScroll();\n this.initMermaid();\n this.initSearch();\n }, 100);\n }\n }, false);\n }\n\n onClickMask() {\n document.getElementById('mask').addEventListener('click', () => {\n for (let event of this.clickMaskEventSet) event();\n document.body.classList.remove('blur');\n }, false);\n }\n\n init() {\n this.initMenuMobile();\n this.initSwitchTheme();\n this.initSearch();\n this.initLightGallery();\n this.initHighlight();\n this.initTable();\n this.initHeaderLink();\n this.initToc();\n this.initComment();\n this.initSmoothScroll();\n this.initMath();\n this.initMermaid();\n this.initEcharts();\n this.initTypeit();\n this.initMapbox();\n\n this.onScroll();\n this.onResize();\n this.onClickMask();\n }\n}\n\nconst themeInit = () => {\n const theme = new Theme();\n theme.init();\n};\n\nif (document.readyState !== 'loading') {\n themeInit();\n} else {\n document.addEventListener('DOMContentLoaded', themeInit, false);\n}\n"]} \ No newline at end of file +{"version":3,"sources":["../../src/js/theme.js"],"names":[],"mappings":"ilEAAM,CAAA,I,2HACM,C,CAAU,C,CAAS,CACvB,CAAQ,CAAG,CAAQ,EAAI,EADA,CAEvB,IAAK,GAAI,CAAA,CAAC,CAAG,CAAb,CAAgB,CAAC,CAAG,CAAQ,CAAC,MAA7B,CAAqC,CAAC,EAAtC,CAA0C,CAAO,CAAC,CAAQ,CAAC,CAAD,CAAT,CACpD,C,mDAEc,CACX,MAAQ,CAAA,QAAQ,CAAC,eAAT,EAA4B,QAAQ,CAAC,eAAT,CAAyB,SAAtD,EAAoE,QAAQ,CAAC,IAAT,CAAc,SAC5F,C,2CAEU,CACP,MAAO,CAAA,MAAM,CAAC,UAAP,CAAkB,oCAAlB,EAAwD,OAClE,C,iDAEa,CACV,MAAO,CAAA,MAAM,CAAC,UAAP,CAAkB,oCAAlB,EAAwD,OAClE,C,8CAEU,C,CAAS,C,CAAW,C,CAAU,C,CAAU,OAC1C,KAAK,CAAC,OAAN,CAAc,CAAd,CAD0C,GAChB,CAAS,CAAG,CAAC,CAAD,CADI,EAE/C,GAAA,CAAO,CAAC,SAAR,EAAkB,GAAlB,UAAsB,UAAtB,4BAAqC,CAArC,GAF+C,CAG/C,GAAM,CAAA,CAAO,CAAG,UAAM,OAClB,GAAA,CAAO,CAAC,SAAR,EAAkB,MAAlB,UAAyB,UAAzB,4BAAwC,CAAxC,GADkB,CAElB,CAAO,CAAC,mBAAR,CAA4B,cAA5B,CAA4C,CAA5C,CAFkB,CAGM,UAApB,QAAO,CAAA,CAHO,EAGkB,CAAQ,EAC/C,CAJD,CAKK,CAR0C,EAQhC,CAAO,CAAC,gBAAR,CAAyB,cAAzB,CAAyC,CAAzC,IAClB,C,SAGC,K,yBACF,YAAc,yBACV,KAAK,MAAL,CAAc,MAAM,CAAC,MADX,CAEV,KAAK,IAAL,CAAY,KAAK,MAAL,CAAY,IAFd,CAGV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AK,WAAL,EATG,CAUH,KAAK,gBAAL,EAVG,CAWH,KAAK,QAAL,EAXG,CAYH,KAAK,WAAL,EAZG,CAaH,KAAK,WAAL,EAbG,CAcH,KAAK,UAAL,EAdG,CAeH,KAAK,UAAL,EAfG,CAiBH,KAAK,QAAL,EAjBG,CAkBH,KAAK,QAAL,EAlBG,CAmBH,KAAK,WAAL,EACH,C,SAGC,SAAS,CAAG,UAAM,CACpB,GAAM,CAAA,CAAK,CAAG,GAAI,CAAA,KAAlB,CACA,CAAK,CAAC,IAAN,EACH,C,CAE2B,SAAxB,GAAA,QAAQ,CAAC,U,CAGT,QAAQ,CAAC,gBAAT,CAA0B,kBAA1B,CAA8C,SAA9C,I,CAFA,SAAS,E","file":"theme.min.js","sourcesContent":["class Util {\n forEach(elements, handler) {\n elements = elements || [];\n for (let i = 0; i < elements.length; i++) handler(elements[i]);\n }\n\n getScrollTop() {\n return (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop;\n }\n\n isMobile() {\n return window.matchMedia('only screen and (max-width: 680px)').matches;\n }\n\n isTocStatic() {\n return window.matchMedia('only screen and (max-width: 960px)').matches;\n }\n\n animateCSS(element, animation, reserved, callback) {\n if (!Array.isArray(animation)) animation = [animation];\n element.classList.add('animated', ...animation);\n const handler = () => {\n element.classList.remove('animated', ...animation);\n element.removeEventListener('animationend', handler);\n if (typeof callback === 'function') callback();\n };\n if (!reserved) element.addEventListener('animationend', handler, false);\n }\n}\n\nclass Theme {\n constructor() {\n this.config = window.config;\n this.data = this.config.data;\n this.isDark = document.body.classList.contains('dark');\n this.util = new Util();\n this.newScrollTop = this.util.getScrollTop();\n this.oldScrollTop = this.newScrollTop;\n this.scrollEventSet = new Set();\n this.resizeEventSet = new Set();\n this.switchThemeEventSet = new Set();\n this.clickMaskEventSet = new Set();\n }\n\n initMenuMobile() {\n const $menuToggleMobile = document.getElementById('menu-toggle-mobile');\n const $menuMobile = document.getElementById('menu-mobile');\n $menuToggleMobile.addEventListener('click', () => {\n document.body.classList.toggle('blur');\n $menuToggleMobile.classList.toggle('active');\n $menuMobile.classList.toggle('active');\n }, false);\n this._menuMobileOnClickMask = this._menuMobileOnClickMask || (() => {\n $menuToggleMobile.classList.remove('active');\n $menuMobile.classList.remove('active');\n });\n this.clickMaskEventSet.add(this._menuMobileOnClickMask);\n }\n\n initSwitchTheme() {\n this.util.forEach(document.getElementsByClassName('theme-switch'), $themeSwitch => {\n $themeSwitch.addEventListener('click', () => {\n document.body.classList.toggle('dark');\n this.isDark = !this.isDark;\n window.localStorage && localStorage.setItem('theme', this.isDark ? 'dark' : 'light');\n for (let event of this.switchThemeEventSet) event();\n }, false);\n });\n }\n\n initSearch() {\n const searchConfig = this.config.search;\n const isMobile = this.util.isMobile();\n if (!searchConfig || isMobile && this._searchMobileOnce || !isMobile && this._searchDesktopOnce) return;\n const classSuffix = isMobile ? 'mobile' : 'desktop';\n const $header = document.getElementById(`header-${classSuffix}`);\n const $searchInput = document.getElementById(`search-input-${classSuffix}`);\n const $searchToggle = document.getElementById(`search-toggle-${classSuffix}`);\n const $searchLoading = document.getElementById(`search-loading-${classSuffix}`);\n const $searchClear = document.getElementById(`search-clear-${classSuffix}`);\n if (isMobile) {\n this._searchMobileOnce = true;\n $searchInput.addEventListener('focus', () => {\n document.body.classList.add('blur');\n $header.classList.add('open');\n }, false);\n document.getElementById('search-cancel-mobile').addEventListener('click', () => {\n $header.classList.remove('open');\n document.body.classList.remove('blur');\n document.getElementById('menu-toggle-mobile').classList.remove('active');\n document.getElementById('menu-mobile').classList.remove('active');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n }, false);\n $searchClear.addEventListener('click', () => {\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n }, false);\n this._searchMobileOnClickMask = this._searchMobileOnClickMask || (() => {\n $header.classList.remove('open');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n });\n this.clickMaskEventSet.add(this._searchMobileOnClickMask);\n } else {\n this._searchDesktopOnce = true;\n $searchToggle.addEventListener('click', () => {\n document.body.classList.add('blur');\n $header.classList.add('open');\n $searchInput.focus();\n }, false);\n $searchClear.addEventListener('click', () => {\n $searchClear.style.display = 'none';\n this._searchDesktop && this._searchDesktop.autocomplete.setVal('');\n }, false);\n this._searchDesktopOnClickMask = this._searchDesktopOnClickMask || (() => {\n $header.classList.remove('open');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchDesktop && this._searchDesktop.autocomplete.setVal('');\n });\n this.clickMaskEventSet.add(this._searchDesktopOnClickMask);\n }\n $searchInput.addEventListener('input', () => {\n if ($searchInput.value === '') $searchClear.style.display = 'none';\n else $searchClear.style.display = 'inline';\n }, false);\n\n const CONTEXT_LENGTH = 200;\n const initAutosearch = () => {\n const autosearch = autocomplete(`#search-input-${classSuffix}`, {\n hint: false,\n autoselect: true,\n dropdownMenuContainer: `#search-dropdown-${classSuffix}`,\n clearOnSelected: true,\n cssClasses: { noPrefix: true },\n // debug: true,\n }, {\n name: 'search',\n source: (query, callback) => {\n $searchLoading.style.display = 'inline';\n $searchClear.style.display = 'none';\n const finish = (results) => {\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'inline';\n callback(results);\n };\n if (searchConfig.type === 'lunr') {\n const search = () => {\n if (lunr.queryHandler) query = lunr.queryHandler(query);\n return this._index.search(query).slice(0, 12).map(({ ref, matchData: { metadata } }) => {\n const matchData = this._indexData[ref];\n let { title, content: context } = matchData;\n let position = 0;\n Object.values(metadata).forEach(({ description, content }) => {\n if (description) {\n context = matchData.description;\n position = -1;\n } else if (content) {\n const matchPosition = content.position[0][0];\n if (matchPosition < position || position === 0) position = matchPosition;\n }\n });\n position -= CONTEXT_LENGTH / 5;\n if (position > 0) {\n position += context.substr(position, 25).lastIndexOf(' ') + 1;\n context = '...' + context.substr(position, CONTEXT_LENGTH);\n } else {\n context = context.substr(0, CONTEXT_LENGTH);\n }\n Object.keys(metadata).forEach(key => {\n title = title.replace(new RegExp(`(${key})`, 'gi'), '$1');\n context = context.replace(new RegExp(`(${key})`, 'gi'), '$1');\n });\n return {\n 'uri': matchData.uri,\n 'title' : title,\n 'date' : matchData.date,\n 'context' : context,\n };\n });\n }\n if (!this._index) {\n fetch(searchConfig.lunrIndexURL)\n .then(response => response.json())\n .then(data => {\n const indexData = {};\n this._index = lunr(function () {\n if (searchConfig.lunrLanguageCode) this.use(lunr[searchConfig.lunrLanguageCode]);\n this.ref('uri');\n this.field('title', { boost: 50 });\n this.field('tags', { boost: 20 });\n this.field('description', { boost: 10 });\n this.field('content', { boost: 5 });\n this.metadataWhitelist = ['position'];\n data.forEach((record) => {\n indexData[record.uri] = record;\n this.add(record);\n });\n });\n this._indexData = indexData;\n finish(search());\n }).catch(err => {\n console.error(err);\n finish([]);\n });\n } else finish(search());\n } else if (searchConfig.type === 'algolia') {\n $searchLoading.style.display = 'inline';\n $searchClear.style.display = 'none';\n this._algoliaIndex = this._algoliaIndex || algoliasearch(searchConfig.algoliaAppID, searchConfig.algoliaSearchKey).initIndex(searchConfig.algoliaIndex);\n this._algoliaIndex\n .search(query, { offset: 0, length: 12, attributesToHighlight: ['title', 'content'] })\n .then(({ hits }) => {\n finish(hits.map(({ uri, date, _highlightResult: { title, content } }) => ({\n uri: uri,\n title: title.value,\n date: date,\n context: content.value,\n })));\n })\n .catch(err => {\n console.error(err);\n finish([]);\n });\n }\n },\n templates: {\n suggestion: ({ title, date, context }) => `
${title}${date}
${context}
`,\n empty: ({ query }) => `
${searchConfig.noResultsFound}: \"${query}\"
`,\n footer: ({}) => {\n const { searchType, icon, href } = searchConfig.type === 'algolia' ? {\n searchType: 'algolia',\n icon: '',\n href: 'https://www.algolia.com/',\n } : {\n searchType: 'Lunr.js',\n icon: '',\n href: 'https://lunrjs.com/',\n };\n return ``;},\n },\n });\n autosearch.on('autocomplete:selected', (event, suggestion, dataset, context) => {\n window.location.assign(suggestion.uri);\n });\n if (isMobile) this._searchMobile = autosearch;\n else this._searchDesktop = autosearch;\n };\n if (searchConfig.lunrSegmentitURL && !document.getElementById('lunr-segmentit')) {\n const script = document.createElement('script');\n script.id = 'lunr-segmentit';\n script.type = 'text/javascript';\n script.src = searchConfig.lunrSegmentitURL;\n script.async = true;\n if (script.readyState) {\n script.onreadystatechange = () => {\n if (script.readyState == 'loaded' || script.readyState == 'complete'){\n script.onreadystatechange = null;\n initAutosearch();\n }\n };\n } else {\n script.onload = () => {\n initAutosearch();\n };\n }\n document.body.appendChild(script);\n } else initAutosearch();\n }\n\n initLightGallery() {\n if (this.config.lightGallery) lightGallery(document.getElementById('content'), this.config.lightGallery);\n }\n\n initHighlight() {\n this.util.forEach(document.querySelectorAll('.highlight > .chroma'), $chroma => {\n const $elements = $chroma.querySelectorAll('pre.chroma > code');\n if ($elements.length) {\n $chroma.className += ' ' + $elements[$elements.length - 1].className.toLowerCase();\n $elements[0].classList.add('lnc');\n $elements[$elements.length - 1].classList.remove('lnc');\n }\n });\n this.util.forEach(document.querySelectorAll('.highlight > pre.chroma'), $preChroma => {\n const $chroma = document.createElement('div');\n $chroma.className = $preChroma.className;\n const $table = document.createElement('table');\n $chroma.appendChild($table);\n const $tbody = document.createElement('tbody');\n $table.appendChild($tbody);\n const $tr = document.createElement('tr');\n $tbody.appendChild($tr);\n const $td = document.createElement('td');\n $tr.appendChild($td);\n $preChroma.parentElement.replaceChild($chroma, $preChroma);\n $td.appendChild($preChroma);\n });\n this.util.forEach(document.querySelectorAll('pre > code'), $code => {\n $code.classList.add('block');\n if ($code.classList.contains('lnc') || !this.config.clipboard) return;\n const $button = document.createElement('div');\n $button.classList.add('copy-button');\n $button.innerHTML = '';\n $button.setAttribute('data-clipboard-text', $code.innerText);\n $button.title = this.config.clipboard.title;\n const clipboard = new ClipboardJS($button);\n clipboard.on('success', e => {\n this.util.animateCSS($code, 'flash');\n });\n $code.after($button);\n });\n }\n\n initTable() {\n this.util.forEach(document.querySelectorAll('.content table'), $table => {\n const $wrapper = document.createElement('div');\n $wrapper.className = 'table-wrapper';\n $table.parentElement.replaceChild($wrapper, $table);\n $wrapper.appendChild($table);\n });\n }\n\n initHeaderLink() {\n for (let num = 1; num <= 6; num++) {\n this.util.forEach(document.querySelectorAll('.single .content > h' + num), $header => {\n $header.classList.add('headerLink');\n $header.innerHTML = `${$header.innerHTML}`;\n });\n }\n }\n\n initToc() {\n const $tocCore = document.getElementById('TableOfContents');\n if ($tocCore === null) return;\n if (this.util.isTocStatic()) {\n const $tocContentStatic = document.getElementById('toc-content-static');\n if ($tocCore.parentElement !== $tocContentStatic) {\n $tocCore.parentElement.removeChild($tocCore);\n $tocContentStatic.appendChild($tocCore);\n }\n if (this._tocOnScroll) this.scrollEventSet.delete(this._tocOnScroll);\n } else {\n const $tocContentAuto = document.getElementById('toc-content-auto');\n if ($tocCore.parentElement !== $tocContentAuto) {\n $tocCore.parentElement.removeChild($tocCore);\n $tocContentAuto.appendChild($tocCore);\n }\n const $toc = document.getElementById('toc-auto');\n const $page = document.getElementsByClassName('page')[0];\n const rect = $page.getBoundingClientRect();\n $toc.style.left = `${rect.left + rect.width + 20}px`;\n $toc.style.maxWidth = `${$page.getBoundingClientRect().left - 20}px`;\n const $tocLinkElements = $tocCore.getElementsByTagName('a');\n const $tocLiElements = $tocCore.getElementsByTagName('li');\n const $headerLinkElements = document.getElementsByClassName('headerLink');\n const headerIsFixed = this.config.headerMode.desktop !== 'normal';\n const headerHeight = document.getElementById('header-desktop').offsetHeight;\n const TOP_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\n const minTocTop = $toc.offsetTop;\n const minScrollTop = minTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight);\n this._tocOnScroll = this._tocOnScroll || (() => {\n const footerTop = document.getElementById('post-footer').offsetTop;\n const maxTocTop = footerTop - $toc.getBoundingClientRect().height;\n const maxScrollTop = maxTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight);\n if (this.newScrollTop < minScrollTop) {\n $toc.style.position = 'absolute';\n $toc.style.top = `${minTocTop}px`;\n } else if (this.newScrollTop > maxScrollTop) {\n $toc.style.position = 'absolute';\n $toc.style.top = `${maxTocTop}px`;\n } else {\n $toc.style.position = 'fixed';\n $toc.style.top = `${TOP_SPACING}px`;\n }\n\n this.util.forEach($tocLinkElements, $tocLink => { $tocLink.classList.remove('active'); });\n this.util.forEach($tocLiElements, $tocLi => { $tocLi.classList.remove('has-active'); });\n const INDEX_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\n let activeTocIndex = $headerLinkElements.length - 1;\n for (let i = 0; i < $headerLinkElements.length - 1; i++) {\n const thisTop = $headerLinkElements[i].getBoundingClientRect().top;\n const nextTop = $headerLinkElements[i + 1].getBoundingClientRect().top;\n if ((i == 0 && thisTop > INDEX_SPACING)\n || (thisTop <= INDEX_SPACING && nextTop > INDEX_SPACING)) {\n activeTocIndex = i;\n break;\n }\n }\n if (activeTocIndex !== -1) {\n $tocLinkElements[activeTocIndex].classList.add('active');\n let $parent = $tocLinkElements[activeTocIndex].parentElement;\n while ($parent !== $tocCore) {\n $parent.classList.add('has-active');\n $parent = $parent.parentElement.parentElement;\n }\n }\n });\n this._tocOnScroll();\n this.scrollEventSet.add(this._tocOnScroll);\n }\n }\n\n initMath() {\n if (this.config.math) renderMathInElement(document.body, this.config.math);\n }\n\n initMermaid() {\n const $mermaidElements = document.getElementsByClassName('mermaid');\n if ($mermaidElements.length) {\n mermaid.initialize({startOnLoad: false, theme: 'null'});\n this.util.forEach($mermaidElements, $mermaid => {\n mermaid.mermaidAPI.render('svg-' + $mermaid.id, this.data[$mermaid.id], svgCode => {\n $mermaid.innerHTML = svgCode;\n }, $mermaid);\n });\n }\n }\n\n initEcharts() {\n this._echartsOnSwitchTheme = this._echartsOnSwitchTheme || (() => {\n this._echartsArr = this._echartsArr || [];\n for (let i = 0; i < this._echartsArr.length; i++) {\n this._echartsArr[i].dispose();\n }\n this._echartsArr = [];\n this.util.forEach(document.getElementsByClassName('echarts'), $echarts => {\n const chart = echarts.init($echarts, this.isDark ? 'dark' : 'macarons', {renderer: 'svg'});\n chart.setOption(JSON.parse(this.data[$echarts.id]));\n this._echartsArr.push(chart);\n });\n });\n this.switchThemeEventSet.add(this._echartsOnSwitchTheme);\n this._echartsOnSwitchTheme();\n this._echartsOnResize = this._echartsOnResize || (() => {\n for (let i = 0; i < this._echartsArr.length; i++) {\n this._echartsArr[i].resize();\n }\n });\n this.resizeEventSet.add(this._echartsOnResize);\n }\n\n initMapbox() {\n if (this.config.mapbox) {\n mapboxgl.accessToken = this.config.mapbox.accessToken;\n mapboxgl.setRTLTextPlugin(this.config.mapbox.RTLTextPlugin);\n this._mapboxArr = this._mapboxArr || [];\n this.util.forEach(document.getElementsByClassName('mapbox'), $mapbox => {\n const { lng, lat, zoom, lightStyle, darkStyle, marked, navigation, geolocate, scale, fullscreen } = this.data[$mapbox.id];\n const mapbox = new mapboxgl.Map({\n container: $mapbox,\n center: [lng, lat],\n zoom: zoom,\n minZoom: .2,\n style: this.isDark ? darkStyle : lightStyle,\n attributionControl: false,\n });\n if (marked) {\n new mapboxgl.Marker().setLngLat([lng, lat]).addTo(mapbox);\n }\n if (navigation) {\n mapbox.addControl(new mapboxgl.NavigationControl(), 'bottom-right');\n }\n if (geolocate) {\n mapbox.addControl(new mapboxgl.GeolocateControl({\n positionOptions: {\n enableHighAccuracy: true,\n },\n showUserLocation: true,\n trackUserLocation: true,\n }), 'bottom-right');\n }\n if (scale) {\n mapbox.addControl(new mapboxgl.ScaleControl());\n }\n if (fullscreen) {\n mapbox.addControl(new mapboxgl.FullscreenControl());\n }\n mapbox.addControl(new MapboxLanguage());\n this._mapboxArr.push(mapbox);\n });\n this._mapboxOnSwitchTheme = this._mapboxOnSwitchTheme || (() => {\n this.util.forEach(this._mapboxArr, mapbox => {\n const $mapbox = mapbox.getContainer();\n const { lightStyle, darkStyle } = this.data[$mapbox.id];\n mapbox.setStyle(this.isDark ? darkStyle : lightStyle);\n mapbox.addControl(new MapboxLanguage());\n });\n });\n this.switchThemeEventSet.add(this._mapboxOnSwitchTheme);\n }\n }\n\n initTypeit() {\n if (this.config.typeit) {\n this.config.typeit.forEach(group => {\n const typeone = (i) => {\n const id = group[i];\n if (i === group.length - 1) {\n new TypeIt(`#${id}`, {\n strings: this.data[id],\n }).go();\n return;\n }\n let instance = new TypeIt(`#${id}`, {\n strings: this.data[id],\n afterComplete: () => {\n instance.destroy();\n typeone(i + 1);\n },\n }).go();\n };\n typeone(0);\n });\n }\n }\n\n initComment() {\n if (this.config.comment && this.config.comment.gitalk) {\n this.config.comment.gitalk.body = decodeURI(window.location.href);\n const gitalk = new Gitalk(this.config.comment.gitalk.body);\n gitalk.render('gitalk');\n }\n if (this.config.comment && this.config.comment.valine) new Valine(this.config.comment.valine);\n }\n\n initSmoothScroll() {\n if ((!this.util.isMobile() && this.config.headerMode.desktop === 'normal')\n || (this.util.isMobile() && this.config.headerMode.mobile === 'normal')) {\n new SmoothScroll('[href^=\"#\"]', {speed: 300, speedAsDuration: true});\n } else {\n new SmoothScroll('[href^=\"#\"]', {speed: 300, speedAsDuration: true, header: '#header-desktop'});\n }\n }\n\n onScroll() {\n const $headers = [];\n if (this.config.headerMode.desktop === 'auto') $headers.push(document.getElementById('header-desktop'));\n if (this.config.headerMode.mobile === 'auto') $headers.push(document.getElementById('header-mobile'));\n if (document.getElementById('comments')) {\n const $viewComments = document.getElementById('view-comments');\n $viewComments.href = `#comments`;\n $viewComments.style.display = 'block';\n }\n const $fixedButtons = document.getElementById('fixed-buttons');\n const MIN_SCROLL = 20;\n window.addEventListener('scroll', () => {\n this.newScrollTop = this.util.getScrollTop();\n const scroll = this.newScrollTop - this.oldScrollTop;\n this.util.forEach($headers, $header => {\n if (scroll > MIN_SCROLL) {\n $header.classList.remove('fadeInDown');\n this.util.animateCSS($header, ['fadeOutUp', 'faster'], true);\n } else if (scroll < - MIN_SCROLL) {\n $header.classList.remove('fadeOutUp');\n this.util.animateCSS($header, ['fadeInDown', 'faster'], true);\n }\n });\n if (this.newScrollTop > MIN_SCROLL) {\n if (scroll > MIN_SCROLL) {\n $fixedButtons.classList.remove('fadeIn');\n this.util.animateCSS($fixedButtons, ['fadeOut', 'faster'], true);\n } else if (scroll < - MIN_SCROLL) {\n $fixedButtons.style.display = 'block';\n $fixedButtons.classList.remove('fadeOut');\n this.util.animateCSS($fixedButtons, ['fadeIn', 'faster'], true);\n }\n } else {\n $fixedButtons.style.display = 'none';\n }\n for (let event of this.scrollEventSet) event();\n this.oldScrollTop = this.newScrollTop;\n }, false);\n }\n\n onResize() {\n window.addEventListener('resize', () => {\n if (!this._resizeTimeout) {\n this._resizeTimeout = window.setTimeout(() => {\n this._resizeTimeout = null;\n for (let event of this.resizeEventSet) event();\n this.initToc();\n this.initSmoothScroll();\n this.initMermaid();\n this.initSearch();\n }, 100);\n }\n }, false);\n }\n\n onClickMask() {\n document.getElementById('mask').addEventListener('click', () => {\n for (let event of this.clickMaskEventSet) event();\n document.body.classList.remove('blur');\n }, false);\n }\n\n init() {\n this.initMenuMobile();\n this.initSwitchTheme();\n this.initSearch();\n this.initLightGallery();\n this.initHighlight();\n this.initTable();\n this.initHeaderLink();\n this.initToc();\n this.initComment();\n this.initSmoothScroll();\n this.initMath();\n this.initMermaid();\n this.initEcharts();\n this.initTypeit();\n this.initMapbox();\n\n this.onScroll();\n this.onResize();\n this.onClickMask();\n }\n}\n\nconst themeInit = () => {\n const theme = new Theme();\n theme.init();\n};\n\nif (document.readyState !== 'loading') {\n themeInit();\n} else {\n document.addEventListener('DOMContentLoaded', themeInit, false);\n}\n"]} \ No newline at end of file diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 6fd3bdce..a0d90daa 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -537,6 +537,7 @@ enableEmoji = true # date format # 日期格式 dateFormat = "2006-01-02" + # Header config # 页面头部导航栏配置 [params.header] @@ -546,6 +547,7 @@ enableEmoji = true # mobile header mode ("fixed", "normal", "auto") # 移动端导航栏模式 ("fixed", "normal", "auto") mobileMode = "auto" + # Footer config # 页面底部信息配置 [params.footer] @@ -571,6 +573,7 @@ enableEmoji = true # license info (HTML format is supported) # 许可协议信息 (支持 HTML 格式) license= 'CC BY-NC 4.0' + # Section (all posts) page config # Section (所有文章) 页面配置 [params.section] @@ -580,6 +583,7 @@ enableEmoji = true # date format (month and day) # 日期格式 (月和日) dateFormat = "01-02" + # List (category or tag) page config # List (目录或标签) 页面配置 [params.list] @@ -589,6 +593,7 @@ enableEmoji = true # date format (month and day) # 日期格式 (月和日) dateFormat = "01-02" + # Page config # 文章页面配置 [params.page] @@ -774,7 +779,8 @@ enableEmoji = true url = "cover.png" width = 800 height = 600 - # site verification code for Google/Bing/Yandex/Pinterest/Baidu + + # Site verification code for Google/Bing/Yandex/Pinterest/Baidu # 网站验证代码,用于 Google/Bing/Yandex/Pinterest/Baidu [params.verification] google = "" @@ -782,10 +788,26 @@ enableEmoji = true yandex = "" pinterest = "" baidu = "" - [params.fathomAnalytics] - # siteID = "ABC123" - # If you're self hosting use this for your tracker - # serverURL = "https://example.com" + + # Analytics config + # 网站分析配置 + [params.analytics] + enable = false + # Google Analytics + [params.analytics.google] + id = "" + # whether to anonymize IP + # 是否匿名化用户 IP + anonymizeIP = true + # whether to use cookie + # 是否使用 cookie + cookie = false + # Fathom Analytics + [params.analytics.fathom] + id = "" + # server url for your tracker if you're self hosting + # 自行托管追踪器时的主机路径 + server = "" # CSS and JS Files CDN # CSS 和 JS 文件的 CDN 设置 @@ -899,8 +921,12 @@ enableEmoji = true # Privacy config (https://gohugo.io/about/hugo-and-gdpr/) # 隐私信息配置 (https://gohugo.io/about/hugo-and-gdpr/) [privacy] + # privacy of the Google Analytics (replaced by params.analytics.google) + # Google Analytics 相关隐私 (被 params.analytics.google 替代) [privacy.googleAnalytics] - anonymizeIP = true + # ... + [privacy.twitter] + enableDNT = true [privacy.youtube] privacyEnhanced = true diff --git a/exampleSite/content/about.en.md b/exampleSite/content/about.en.md index 17a22d44..cddee8f9 100644 --- a/exampleSite/content/about.en.md +++ b/exampleSite/content/about.en.md @@ -26,7 +26,8 @@ It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) a * :(fas fa-rocket): Optimized for **performance**: [99]/[100] on mobile and [100]/[100] on desktop in [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights) * :(fab fa-searchengin): Optimized SEO performance with a correct **SEO SCHEMA** based on JSON-LD -* :(fab fa-google): [**Google Analytics**](https://analytics.google.com/analytics) supported +* :(fab fa-google): **[Google Analytics](https://analytics.google.com/analytics)** supported +* :(far fa-chart-bar): **[Fathom Analytics](https://usefathom.com/)** supported * :(fas fa-search): Search engine **verification** supported (Google, Bind, Yandex and Baidu) * :(fas fa-tachometer-alt): **CDN** for third-party libraries supported * :(fas fa-cloud-download-alt): Automatically converted images with **Lazy Load** by [lazysizes](https://github.com/aFarkas/lazysizes) @@ -76,7 +77,7 @@ It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) a ### License -LoveIt is licensed under the MIT license. +LoveIt is licensed under the **MIT** license. Check the [LICENSE file](https://github.com/dillonzq/LoveIt/blob/master/LICENSE) for details. diff --git a/exampleSite/content/about.fr.md b/exampleSite/content/about.fr.md index d1f6aa5b..eb073860 100644 --- a/exampleSite/content/about.fr.md +++ b/exampleSite/content/about.fr.md @@ -31,7 +31,8 @@ It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) a * :(fas fa-rocket): Optimized for **performance**: [99]/[100] on mobile and [100]/[100] on desktop in [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights) * :(fab fa-searchengin): Optimized SEO performance with a correct **SEO SCHEMA** based on JSON-LD -* :(fab fa-google): [**Google Analytics**](https://analytics.google.com/analytics) supported +* :(fab fa-google): **[Google Analytics](https://analytics.google.com/analytics)** supported +* :(far fa-chart-bar): **[Fathom Analytics](https://usefathom.com/)** supported * :(fas fa-search): Search engine **verification** supported (Google, Bind, Yandex and Baidu) * :(fas fa-tachometer-alt): **CDN** for third-party libraries supported * :(fas fa-cloud-download-alt): Automatically converted images with **Lazy Load** by [lazysizes](https://github.com/aFarkas/lazysizes) @@ -81,7 +82,7 @@ It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) a ### License -LoveIt is licensed under the MIT license. +LoveIt is licensed under the **MIT** license. Check the [LICENSE file](https://github.com/dillonzq/LoveIt/blob/master/LICENSE) for details. diff --git a/exampleSite/content/about.zh-cn.md b/exampleSite/content/about.zh-cn.md index 13ecde8a..a18555c2 100644 --- a/exampleSite/content/about.zh-cn.md +++ b/exampleSite/content/about.zh-cn.md @@ -27,6 +27,7 @@ lightgallery: true * :(fas fa-rocket): **性能**优化:在 [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights) 中, [99]/[100] 的移动设备得分和 [100]/[100] 的桌面设备得分 * :(fab fa-searchengin): 使用基于 JSON-LD 格式 的 **SEO SCHEMA** 文件进行 SEO 优化 * :(fab fa-google): 支持 **[Google Analytics](https://analytics.google.com/analytics)** +* :(far fa-chart-bar): 支持 **[Fathom Analytics](https://usefathom.com/)** * :(fas fa-search): 支持搜索引擎的**网站验证** (Google, Bind, Yandex and Baidu) * :(fas fa-tachometer-alt): 支持所有第三方库的 **CDN** * :(fas fa-cloud-download-alt): 基于 [lazysizes](https://github.com/aFarkas/lazysizes) 自动转换图片为**懒加载** @@ -76,7 +77,7 @@ lightgallery: true ### 许可协议 -LoveIt 根据 MIT 许可协议授权。 +LoveIt 根据 **MIT** 许可协议授权。 更多信息请查看 [LICENSE 文件](https://github.com/dillonzq/LoveIt/blob/master/LICENSE)。 diff --git a/exampleSite/content/posts/theme-documentation-basics.en.md b/exampleSite/content/posts/theme-documentation-basics.en.md index 4a6525a8..4dc5da57 100644 --- a/exampleSite/content/posts/theme-documentation-basics.en.md +++ b/exampleSite/content/posts/theme-documentation-basics.en.md @@ -503,6 +503,22 @@ Note that some of these parameters are explained in details in other sections of pinterest = "" baidu = "" + # {{< version 0.2.0 >}} Analytics config + [params.analytics] + enable = false + # Google Analytics + [params.analytics.google] + id = "" + # whether to anonymize IP + anonymizeIP = true + # whether to use cookie + cookie = false + # Fathom Analytics + [params.analytics.fathom] + id = "" + # server url for your tracker if you're self hosting + server = "" + # CSS and JS Files CDN config [params.cdn] # {{< version 0.2.0 >}} {{< link "https://github.com/necolas/normalize.css" "normalize.css" >}}@8.0.1 @@ -605,8 +621,11 @@ Note that some of these parameters are explained in details in other sections of # {{< link "https://gohugo.io/about/hugo-and-gdpr/" "Privacy config" >}} [privacy] + # {{< version 0.2.0 deleted >}} privacy of the Google Analytics (replaced by params.analytics.google) [privacy.googleAnalytics] - anonymizeIP = true + # ... + [privacy.twitter] + enableDNT = true [privacy.youtube] privacyEnhanced = true diff --git a/exampleSite/content/posts/theme-documentation-basics.fr.md b/exampleSite/content/posts/theme-documentation-basics.fr.md index 2fe53e0a..8fcb6c49 100644 --- a/exampleSite/content/posts/theme-documentation-basics.fr.md +++ b/exampleSite/content/posts/theme-documentation-basics.fr.md @@ -508,6 +508,22 @@ Note that some of these parameters are explained in details in other sections of pinterest = "" baidu = "" + # {{< version 0.2.0 >}} Analytics config + [params.analytics] + enable = false + # Google Analytics + [params.analytics.google] + id = "" + # whether to anonymize IP + anonymizeIP = true + # whether to use cookie + cookie = false + # Fathom Analytics + [params.analytics.fathom] + id = "" + # server url for your tracker if you're self hosting + server = "" + # CSS and JS Files CDN config [params.cdn] # {{< version 0.2.0 >}} {{< link "https://github.com/necolas/normalize.css" "normalize.css" >}}@8.0.1 @@ -610,8 +626,11 @@ Note that some of these parameters are explained in details in other sections of # {{< link "https://gohugo.io/about/hugo-and-gdpr/" "Privacy config" >}} [privacy] + # {{< version 0.2.0 deleted >}} privacy of the Google Analytics (replaced by params.analytics.google) [privacy.googleAnalytics] - anonymizeIP = true + # ... + [privacy.twitter] + enableDNT = true [privacy.youtube] privacyEnhanced = true diff --git a/exampleSite/content/posts/theme-documentation-basics.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics.zh-cn.md index 31ad7e51..18cbb656 100644 --- a/exampleSite/content/posts/theme-documentation-basics.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics.zh-cn.md @@ -506,6 +506,22 @@ hugo pinterest = "" baidu = "" + # {{< version 0.2.0 >}} 网站分析配置 + [params.analytics] + enable = false + # Google Analytics + [params.analytics.google] + id = "" + # 是否匿名化用户 IP + anonymizeIP = true + # 是否使用 cookie + cookie = false + # Fathom Analytics + [params.analytics.fathom] + id = "" + # 自行托管追踪器时的主机路径 + server = "" + # CSS 和 JS 文件的 CDN 设置 [params.cdn] # {{< version 0.2.0 >}} {{< link "https://github.com/necolas/normalize.css" "normalize.css" >}}@8.0.1 @@ -608,8 +624,11 @@ hugo # {{< link "https://gohugo.io/about/hugo-and-gdpr/" "隐私信息配置" >}} [privacy] + # {{< version 0.2.0 deleted >}} Google Analytics 相关隐私 (被 params.analytics.google 替代) [privacy.googleAnalytics] - anonymizeIP = true + # ... + [privacy.twitter] + enableDNT = true [privacy.youtube] privacyEnhanced = true diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 0862dfcd..eb4c5109 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -13,8 +13,8 @@ {{- if eq hugo.Environment "production" -}} {{- .Scratch.Set "cdn" .Site.Params.cdn -}} {{- .Scratch.Set "fingerprint" .Site.Params.fingerprint -}} -{{- else -}} - {{- $params = dict "comment" nil | merge $params -}} + {{- .Scratch.Set "analytics" .Site.Params.analytics -}} + {{- .Scratch.Set "comment" $params.comment -}} {{- end -}} {{- .Scratch.Set "params" $params -}} diff --git a/layouts/index.html b/layouts/index.html index 96dd11c1..b1650765 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,10 +1,20 @@ {{- define "content" -}} + {{- $params := .Scratch.Get "params" -}}
{{- /* Profile */ -}} {{- if ne .Site.Params.home.profile.enable false -}} {{- partial "home/profile.html" . -}} {{- end -}} + {{- /* Content */ -}} + {{- if .Content -}} +
+
+ {{- dict "content" .Content "ruby" $params.ruby "fraction" $params.fraction "fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}} +
+
+ {{- end -}} + {{- /* Posts */ -}} {{- if ne .Site.Params.home.posts.enable false -}} {{- /* Paginate */ -}} diff --git a/layouts/partials/assets.html b/layouts/partials/assets.html index c8f6ee61..8f5c6e28 100644 --- a/layouts/partials/assets.html +++ b/layouts/partials/assets.html @@ -261,11 +261,6 @@ {{- partial "plugin/script.html" . -}} {{- end -}} -{{- /* Google analytics async */ -}} -{{- if eq hugo.Environment "production" | and .Site.GoogleAnalytics -}} - {{- template "_internal/google_analytics_async.html" . -}} - - {{ if and .Site.Params.fathomAnalytics .Site.Params.fathomAnalytics.siteID }} - {{- partial "plugin/analytics/fathom" . -}} - {{ end }} -{{- end -}} \ No newline at end of file +{{- with .Scratch.Get "analytics" -}} + {{- partial "plugin/analytics.html" . -}} +{{- end -}} diff --git a/layouts/partials/comment.html b/layouts/partials/comment.html index 33e37e1d..ace116a6 100644 --- a/layouts/partials/comment.html +++ b/layouts/partials/comment.html @@ -1,6 +1,6 @@ {{- $cdn := .Scratch.Get "cdn" | default dict -}} {{- $fingerprint := .Scratch.Get "fingerprint" -}} -{{- $comment := (.Scratch.Get "params").comment | default dict -}} +{{- $comment := .Scratch.Get "comment" | default dict -}} {{- $commentConfig := dict -}} {{- if $comment.enable -}} diff --git a/layouts/partials/plugin/analytics.html b/layouts/partials/plugin/analytics.html new file mode 100644 index 00000000..7714da6d --- /dev/null +++ b/layouts/partials/plugin/analytics.html @@ -0,0 +1,22 @@ +{{- if .enable -}} + {{- /* Google Analytics */ -}} + {{- with .google.id -}} + + {{- dict "source" "https://www.google-analytics.com/analytics.js" "async" true | partial "plugin/script.html" -}} + {{- end -}} + + {{- /* Fathom Analytics */ -}} + {{- with .fathom.id -}} + + {{- dict "source" ($.fathom.server | default "cdn.usefathom.com" | printf "https://%s/tracker.js") "async" true "attr" "id=fathom-script" | partial "plugin/script.html" -}} + {{- end -}} +{{- end -}} diff --git a/layouts/partials/plugin/analytics/fathom.html b/layouts/partials/plugin/analytics/fathom.html deleted file mode 100644 index 89210b9a..00000000 --- a/layouts/partials/plugin/analytics/fathom.html +++ /dev/null @@ -1,13 +0,0 @@ - \ No newline at end of file diff --git a/layouts/partials/plugin/script.html b/layouts/partials/plugin/script.html index 4e189f71..64ed3013 100644 --- a/layouts/partials/plugin/script.html +++ b/layouts/partials/plugin/script.html @@ -3,7 +3,7 @@ {{- else -}} {{- $src := .source -}} {{- $integrity := .integrity -}} - {{- if strings.HasPrefix $src "http" | not -}} + {{- if strings.HasPrefix $src "http" | or (strings.HasPrefix $src "||") | not -}} {{- $res := resources.Get $src -}} {{- with .template -}} {{- $res = $res | resources.ExecuteAsTemplate . $.context -}} diff --git a/layouts/posts/single.html b/layouts/posts/single.html index ba0a078b..7df7a618 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -48,7 +48,7 @@   {{ T "wordCount" .WordCount }}  {{ T "readingTime" .ReadingTime }}  - {{- $comment := $params.comment | default dict -}} + {{- $comment := .Scratch.Get "comment" | default dict -}} {{- if $comment.enable | and $comment.valine.enable | and $comment.valine.visitor -}}  {{ T "views" }} diff --git a/src/js/theme.js b/src/js/theme.js index df7f83c9..1c4c9d39 100644 --- a/src/js/theme.js +++ b/src/js/theme.js @@ -325,7 +325,7 @@ class Theme { initHeaderLink() { for (let num = 1; num <= 6; num++) { - this.util.forEach(document.querySelectorAll('.page.single .content > h' + num), $header => { + this.util.forEach(document.querySelectorAll('.single .content > h' + num), $header => { $header.classList.add('headerLink'); $header.innerHTML = `${$header.innerHTML}`; });