diff --git a/README.md b/README.md index 742d5a93a..f49510cbb 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) a Since the three themes have a similar look, if you have questions about their differences, read [Why choose LoveIt](#why-choose-loveit) so that you can choose the one that works best for you. -![Hugo Theme LoveIt](images/Apple-Devices-Preview.png) +![Hugo Theme LoveIt](https://github.com/dillonzq/LoveIt/raw/develop/images/Apple-Devices-Preview.png) ## [Demo Site](https://hugoloveit.com/) diff --git a/README.zh-cn.md b/README.zh-cn.md index 74687978c..385621d2e 100644 --- a/README.zh-cn.md +++ b/README.zh-cn.md @@ -13,7 +13,7 @@ 由于三个主题外观的相似性,如果你对于它们的不同之处有疑问,请阅读 [为什么选择 LoveIt](#为什么选择-LoveIt),以便你能选择最适合你的一个。 -![Hugo 主题 LoveIt](images/Apple-Devices-Preview.png) +![Hugo 主题 LoveIt](https://github.com/dillonzq/LoveIt/raw/develop/images/Apple-Devices-Preview.png) ## 主题[预览](https://hugoloveit.com/zh-cn/) diff --git a/assets/css/_core/_base.scss b/assets/css/_core/_base.scss index d68daaa91..e78cadf65 100644 --- a/assets/css/_core/_base.scss +++ b/assets/css/_core/_base.scss @@ -58,14 +58,9 @@ body { } } -b, strong { - font-weight: bold; -} - a { color: $global-link-color; text-decoration: none; - transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease; &:hover { color: $global-link-hover-color; @@ -82,47 +77,10 @@ a { b, strong { font-weight: bold; -} -#dynamic-to-top { - display: none; - overflow: hidden; - width: auto; - z-index: 90; - position: fixed; - bottom: 2rem; - right: 2rem; - top: auto; - left: auto; - font-family: sans-serif; - font-size: 1rem; - color: #fff; - text-decoration: none; - font-weight: bold; - padding: 1rem 1rem; - border: 1px solid $global-border-color; - background: #222; - outline: none; - &:hover { - background: #000; - cursor: pointer; - } - &:active { - background: #000; - outline: none; - } - &:focus, &:hover { - outline: none; - } - span { - display: block; - overflow: hidden; - width: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KaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAKVJREFUeNqUz7ENgzAURdErUSXQMgdTZJFIqeg8DFI2YQeEvAEbUJja3y9NEiwCUXIlN/62jww7Saok3Z+r4pckXSRNWpskXb5deClHfeo7ylGrLqnbTmOMs/e+9d63McZ554GOlFLId0IIvXOuAUqgdM41IYQ+P5NSCpjZkitADRTZTwqgznUzWzCzZaMc9dbNbGEYhuuOclQB1OM43gBO/N/5MQAeMwpyB1MtLQAAAABJRU5ErkJggg==') no-repeat center center; - } - - .dark-theme &{ - border: 1px solid $global-border-color-dark; + .dark-theme & { + color: #ddd; } } + +@import "../_partial/dynamic-to-top"; diff --git a/assets/css/_core/_media.scss b/assets/css/_core/_media.scss index dbcade847..7b2fd7551 100644 --- a/assets/css/_core/_media.scss +++ b/assets/css/_core/_media.scss @@ -31,7 +31,7 @@ @media only screen and (max-width: 960px) { #header-desktop { .header-wrapper { - margin: 0 1rem; + padding: 0 1rem; } } @@ -48,7 +48,7 @@ } } -@media only screen and (max-width: 720px) { +@media only screen and (max-width: 680px) { #header-desktop { display: none; } diff --git a/assets/css/_page/_single.scss b/assets/css/_page/_single.scss index 4c0c4641e..54208fad7 100644 --- a/assets/css/_page/_single.scss +++ b/assets/css/_page/_single.scss @@ -1,9 +1,9 @@ /** Single **/ .single { .single-title { - margin: 0; - font-size: 1.8rem; - line-height: 3rem; + margin: 0.8rem 0; + font-size: 1.6rem; + line-height: 140%; } .post-meta { @@ -22,14 +22,14 @@ color: $single-link-color; .dark-theme & { - color: $single-link-color-dark; + color: $global-link-color-dark; } &:hover { color: $single-link-hover-color; .dark-theme & { - color: $single-link-hover-color-dark; + color: $global-link-hover-color-dark; } } } @@ -101,7 +101,6 @@ .dark-theme &:hover { color: $single-link-hover-color-dark; - font-weight: bold; } } @@ -143,6 +142,7 @@ margin: .625rem 0; border-spacing: 0; background: $table-background-color; + border-collapse: collapse; .dark-theme & { background: $table-background-color-dark; @@ -179,12 +179,10 @@ min-width: 20%; max-width: 80%; display: inline-block; - padding: .625rem; + padding: .5rem; margin: 0 auto; - border-bottom: 1px solid #d9d9d9; font-size: .875rem; color: #969696; - line-height: 1.7; } img { @@ -252,31 +250,10 @@ } @import "../_partial/_single/code"; + @import "../_partial/_single/instagram"; @import "../_partial/_single/admonition"; - - .echarts { - width: 100%; - height: 30rem; - margin: 3% auto; - text-align: center; - } - - .bilibili { - position: relative; - width: 100%; - height: 0; - padding-bottom: 75%; - margin: 3% auto; - text-align: center; - - iframe { - position: absolute; - width: 100%; - height: 100%; - left: 0; - top: 0; - } - } + @import "../_partial/_single/echarts"; + @import "../_partial/_single/bilibili"; hr { margin: 1rem 0; diff --git a/assets/css/_partial/_archive/_tags.scss b/assets/css/_partial/_archive/_tags.scss index 05f352c4e..56bb3c04a 100644 --- a/assets/css/_partial/_archive/_tags.scss +++ b/assets/css/_partial/_archive/_tags.scss @@ -14,7 +14,7 @@ &:focus, &:hover { color: $global-link-hover-color; - transform: scale(1.1); + transform: scale(1.2); .dark-theme & { color: $global-link-hover-color-dark; diff --git a/assets/css/_partial/_dynamic-to-top.scss b/assets/css/_partial/_dynamic-to-top.scss new file mode 100644 index 000000000..a860042cf --- /dev/null +++ b/assets/css/_partial/_dynamic-to-top.scss @@ -0,0 +1,39 @@ +#dynamic-to-top { + display: none; + overflow: hidden; + width: auto; + z-index: 100; + position: fixed; + bottom: 2rem; + right: 2rem; + top: auto; + left: auto; + font-size: 1.4rem; + line-height: 1.8rem; + padding: .6rem .6rem; + color: $global-font-secondary-color; + background: $header-background-color; + border: 1px solid $global-border-color; + border-radius: 2rem; + + &:hover, &:active { + color: $global-font-color; + background: $global-background-color; + cursor: pointer; + } + + &:active, &:focus, &:hover { + outline: none; + } + + .dark-theme & { + color: $global-font-secondary-color-dark; + background: $header-background-color-dark; + border-color: $global-border-color-dark; + + &:hover, &:active { + color: $global-font-color-dark; + background: $global-background-color-dark; + } + } +} diff --git a/assets/css/_partial/_header.scss b/assets/css/_partial/_header.scss index 91b0181f8..6bebe79e1 100644 --- a/assets/css/_partial/_header.scss +++ b/assets/css/_partial/_header.scss @@ -8,25 +8,21 @@ header { } .header-title { + font-size: 1.5rem; font-weight: bold; } - .language-select { - font-weight: $global-font-weight; - border: none; - box-shadow: none; - background: transparent; - background-image: none; - -webkit-appearance: none; - color: $global-font-color; - - .dark-theme & { - color: $global-font-color-dark; - } + .menu .menu-item { + position: relative; + } - &:focus { - outline: none; - } + .language-select { + position: absolute; + opacity: 0; + left: 0; + top: 0; + width: 100%; + height: 100%; &:hover { cursor: pointer; @@ -47,23 +43,20 @@ header { .header-wrapper { width: auto; text-align: center; - margin: 0 4rem; + padding: 0 3rem; display: flex; justify-content: space-between; - .header-title a { - padding: 0 8px; - font-size: 1.25rem; + .menu { + .menu-item { + margin: 0 .5rem; - i { - line-height: 2rem; + &.theme-switch { + margin: 0 .3rem; + } } - } - - .menu a { - padding: 0 8px; - &.active { + a.active { font-weight: 900; color: $header-hover-color; @@ -96,10 +89,6 @@ header { padding-left: 1rem; box-sizing: border-box; - .header-title { - font-size: 1.25rem; - } - .menu-toggle { cursor: pointer; line-height: 4rem; diff --git a/assets/css/_partial/_home/_summary.scss b/assets/css/_partial/_home/_summary.scss index aada46d15..f216e646e 100644 --- a/assets/css/_partial/_home/_summary.scss +++ b/assets/css/_partial/_home/_summary.scss @@ -27,7 +27,9 @@ } .single-title { - font-size: 1.6rem; + font-size: 1.4rem; + line-height: 140%; + margin: 0.4rem 0; } .content { @@ -72,10 +74,10 @@ &::before { content: "|"; margin-right: .3125rem; - color: $single-link-color; + color: $global-link-color; .dark-theme & { - color: $single-link-color-dark; + color: $global-link-color-dark; } } } @@ -87,27 +89,49 @@ content: "#"; } } + + a { + color: $global-link-color; + + .dark-theme & { + color: $global-link-color-dark; + } + + &:hover { + color: $global-link-hover-color; + + .dark-theme & { + color: $global-link-hover-color-dark; + } + } + } + + b, strong { + .dark-theme & { + color: $global-font-secondary-color-dark; + } + } } .post-footer { - margin-top: .5rem; + margin-top: .4rem; display: flex; justify-content: space-between; align-items: center; - font-size: .875rem !important; + font-size: .875rem; a { - color: $single-link-color !important; + color: $single-link-color; .dark-theme & { - color: $single-link-color-dark !important; + color: $single-link-color-dark; } &:hover { - color: $single-link-hover-color !important; + color: $single-link-hover-color; .dark-theme & { - color: $single-link-hover-color-dark !important; + color: $single-link-hover-color-dark; } } } @@ -116,17 +140,17 @@ padding: 0; a { - color: $global-link-color !important; + color: $global-link-color; .dark-theme & { - color: $global-link-color-dark !important; + color: $global-link-color-dark; } &:hover { - color: $global-link-hover-color !important; + color: $global-link-hover-color; .dark-theme & { - color: $global-link-hover-color-dark !important; + color: $global-link-hover-color-dark; } } } diff --git a/assets/css/_partial/_single/_bilibili.scss b/assets/css/_partial/_single/_bilibili.scss new file mode 100644 index 000000000..6eef8e649 --- /dev/null +++ b/assets/css/_partial/_single/_bilibili.scss @@ -0,0 +1,16 @@ +.bilibili { + position: relative; + width: 100%; + height: 0; + padding-bottom: 75%; + margin: 3% auto; + text-align: center; + + iframe { + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + } +} diff --git a/assets/css/_partial/_single/_code.scss b/assets/css/_partial/_single/_code.scss index 1bcdb7b83..0e3786918 100644 --- a/assets/css/_partial/_single/_code.scss +++ b/assets/css/_partial/_single/_code.scss @@ -46,15 +46,6 @@ code, pre, .highlight table, .highlight tr, .highlight td { } } - table, tr, td { - margin: 0; - border: none !important; - } - - td { - padding: .2rem .4rem; - } - .lntd { &:first-child { width: 1.2rem; @@ -107,3 +98,203 @@ code, pre, .highlight table, .highlight tr, .highlight td { } } } + +.highlight > .chroma, .gist { + table, tr, td { + margin: 0; + border: none !important; + } + + td { + padding: .2rem .4rem; + } +} + +.gist { + .gist-file, .gist-data, .gist-meta { + border: none; + } + + .gist-meta { + padding: .4rem .8rem; + background-color: darken($code-background-color, 5%); + + a { + color: $single-link-color; + + .dark-theme & { + color: $single-link-color-dark; + } + } + + a:hover { + color: $single-link-hover-color; + + .dark-theme &:hover { + color: $single-link-hover-color-dark; + } + } + + .dark-theme & { + background-color: darken($code-background-color-dark, 5%); + } + } + + .dark-theme & { + // imported from https://github.com/lonekorean/gist-syntax-themes/blob/master/stylesheets/one-dark.css + .highlight { + background: #141414; + } + .blob-num, + .blob-code-inner, + .highlight, + .pl-enm, + .pl-ko, + .pl-mo, + .pl-mp1 .pl-sf, + .pl-ms, + .pl-pdc1, + .pl-scp, + .pl-smc, + .pl-som, + .pl-va, + .pl-vpf, + .pl-vpu, + .pl-mdr { + color: #aab1bf; + } + .pl-mb, + .pl-pdb { + font-weight: 700; + } + .pl-c, + .pl-c span, + .pl-pdc { + color: #5b6270; + font-style: italic; + } + .pl-sr .pl-cce { + color: #56b5c2; + font-weight: 400; + } + .pl-ef, + .pl-en, + .pl-enf, + .pl-eoai, + .pl-kos, + .pl-mh .pl-pdh, + .pl-mr { + color: #61afef; + } + .pl-ens, + .pl-vi { + color: #be5046; + } + .pl-enti, + .pl-mai .pl-sf, + .pl-ml, + .pl-sf, + .pl-sr, + .pl-sr .pl-sra, + .pl-src, + .pl-st, + .pl-vo { + color: #56b5c2; + } + .pl-eoi, + .pl-mri, + .pl-pds, + .pl-pse .pl-s1, + .pl-s, + .pl-s1 { + color: #97c279; + } + .pl-k, + .pl-kolp, + .pl-mc, + .pl-pde { + color: #c578dd; + } + .pl-mi, + .pl-pdi { + color: #c578dd; + font-style: italic; + } + .pl-mp, + .pl-stp { + color: #818896; + } + .pl-mdh, + .pl-mdi, + .pl-mdr { + font-weight: 400; + } + .pl-mdht, + .pl-mi1 { + color: #97c279; + background: #020; + } + .pl-md, + .pl-mdhf { + color: #df6b75; + background: #200; + } + .pl-corl { + color: #df6b75; + text-decoration: underline; + } + .pl-ib { + background: #df6b75; + } + .pl-ii { + background: #e0c184; + color: #fff; + } + .pl-iu { + background: #e05151; + } + .pl-ms1 { + color: #aab1bf; + background: #373b41; + } + .pl-c1, + .pl-cn, + .pl-e, + .pl-eoa, + .pl-eoac, + .pl-eoac .pl-pde, + .pl-kou, + .pl-mm, + .pl-mp .pl-s3, + .pl-mq, + .pl-s3, + .pl-sok, + .pl-sv, + .pl-mb { + color: #d19965; + } + .pl-enc, + .pl-entc, + .pl-pse .pl-s2, + .pl-s2, + .pl-sc, + .pl-smp, + .pl-sr .pl-sre, + .pl-stj, + .pl-v, + .pl-pdb { + color: #e4bf7a; + } + .pl-ent, + .pl-entl, + .pl-entm, + .pl-mh, + .pl-pdv, + .pl-smi, + .pl-sol, + .pl-mdh, + .pl-mdi { + color: #df6b75; + } + } +} diff --git a/assets/css/_partial/_single/_echarts.scss b/assets/css/_partial/_single/_echarts.scss new file mode 100644 index 000000000..06d4ad91d --- /dev/null +++ b/assets/css/_partial/_single/_echarts.scss @@ -0,0 +1,6 @@ +.echarts { + width: 100%; + height: 30rem; + margin: 3% auto; + text-align: center; +} diff --git a/assets/css/_partial/_single/_instagram.scss b/assets/css/_partial/_single/_instagram.scss new file mode 100644 index 000000000..49c088671 --- /dev/null +++ b/assets/css/_partial/_single/_instagram.scss @@ -0,0 +1,5 @@ +iframe.instagram-media { + .dark-theme & { + border: none !important; + } +} diff --git a/assets/css/_partial/_single/_toc.scss b/assets/css/_partial/_single/_toc.scss index 397ecf160..cda63b19c 100644 --- a/assets/css/_partial/_single/_toc.scss +++ b/assets/css/_partial/_single/_toc.scss @@ -2,12 +2,13 @@ display: block; position: absolute; width: 100%; + max-width: 1000px; margin-left: 1000px; padding: 0 .8rem; border-left: 1px solid $global-border-color; overflow-wrap: break-word; box-sizing: border-box; - top: if($header-normal-mode-desktop, 7rem, 12rem); + top: if($header-normal-mode-desktop, 5rem, 10rem); .dark-theme & { border-left: 1px solid $global-border-color-dark; diff --git a/assets/css/_variables.scss b/assets/css/_variables.scss index 539facde0..1a57e200f 100644 --- a/assets/css/_variables.scss +++ b/assets/css/_variables.scss @@ -50,8 +50,8 @@ $selection-color-dark: rgba(38, 139, 211, 0.3) !default; // ========== Header ========== // // Height of the header -$header-height-desktop: 4rem !default; -$header-height-mobile: 4rem !default; +$header-height-desktop: 3.5rem !default; +$header-height-mobile: 3.5rem !default; // Color of the header background $header-background-color: #f8f8f8 !default; @@ -62,8 +62,8 @@ $header-position-desktop: if($header-normal-mode-desktop, static, fixed) !defaul $header-position-mobile: if($header-normal-mode-mobile, static, fixed) !default; // Top of the page padding -$page-padding-top-desktop: if($header-normal-mode-desktop, 1rem, 6rem) !default; -$page-padding-top-mobile: if($header-normal-mode-mobile, 1rem, 6rem) !default; +$page-padding-top-desktop: if($header-normal-mode-desktop, 0, $header-height-desktop) !default; +$page-padding-top-mobile: if($header-normal-mode-mobile, 0, $header-height-mobile) !default; // Color of the hover header item $header-hover-color: #161209 !default; @@ -77,11 +77,11 @@ $toc-content-font-size: 0.9rem !default; // Color of the single link $single-link-color: #2d96bd !default; -$single-link-color-dark: #eee !default; +$single-link-color-dark: #55bde2 !default; // Color of the hover single link $single-link-hover-color: #ef3982 !default; -$single-link-hover-color-dark: #2d96bd !default; +$single-link-hover-color-dark: #bdebfc !default; // Color of the table background $table-background-color: #fff !default; diff --git a/assets/js/theme.min.js b/assets/js/theme.min.js index ff2c998e4..b894dc1c2 100644 --- a/assets/js/theme.min.js +++ b/assets/js/theme.min.js @@ -1,3 +1,3 @@ -"use strict";function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _defineProperties(a,b){for(var c,d=0;d .chroma"),function(a){var b=a.querySelectorAll("pre.chroma > code"),c=b[b.length-1],d=c?c.className.toLowerCase():"";a.className+=" "+d}),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)})}},{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 k=document.getElementById("toc-content-static");b.parentElement!==k&&(b.parentElement.removeChild(b),k.appendChild(b)),this._tocOnScroll&&this.scrollEventSet.delete(this._tocOnScroll)}else{var l=document.getElementById("toc-content-auto");b.parentElement!==l&&(b.parentElement.removeChild(b),l.appendChild(b));var c=document.getElementById("toc-auto"),d=document.getElementsByClassName("page")[0];c.style.maxWidth="".concat(d.getBoundingClientRect().left-20,"px"),this._tocLinks=this._tocLinks||b.getElementsByTagName("a"),this._tocLis=this._tocLis||b.getElementsByTagName("li"),this._headerLinks=this._headerLinks||document.getElementsByClassName("headerLink")||[];var e="normal"!==window.desktopHeaderMode,f=document.getElementById("header-desktop").offsetHeight,g=20+(e?f:0),h=c.offsetTop,j=h-g+(e?0:f);this._tocOnScroll=this._tocOnScroll||function(){var d=document.getElementById("post-footer").offsetTop,k=d-c.getBoundingClientRect().height,l=k-g+(e?0:f);a.newScrollTopl?(c.style.position="absolute",c.style.top="".concat(k,"px")):(c.style.position="fixed",c.style.top="".concat(g,"px")),a.util.forEach(a._tocLinks,function(a){a.classList.remove("active")}),a.util.forEach(a._tocLis,function(a){a.classList.remove("has-active")});for(var m=20+(e?f:0),n=a._headerLinks.length-1,o=0;om||p<=m&&q>m){n=o;break}}if(-1!==n){a._tocLinks[n].classList.add("active");for(var r=a._tocLinks[n].parentElement;r!==b;)r.classList.add("has-active"),r=r.parentElement.parentElement}},this._tocOnScroll(),this.scrollEventSet.add(this._tocOnScroll)}}},{key:"initMermaid",value:function initMermaid(){window.mermaidArr&&(mermaid.initialize({startOnLoad:!1,theme:"null"}),this.util.forEach(window.mermaidArr,function(a){var b=document.getElementById(a);mermaid.mermaidAPI.render("svg-"+a,window.contentMap[a],function(a){b.innerHTML=a},b)}))}},{key:"initEcharts",value:function initEcharts(){var a=this;if(window.echartsArr){this._echartsArr=this._echartsArr||[];for(var b=0;bd?(a.classList.remove("fadeInDown"),a.classList.add("fadeOutUp")):e<-d&&(a.classList.remove("fadeOutUp"),a.classList.add("fadeInDown"))}),400d?(c.classList.remove("fadeIn"),c.classList.add("fadeOut")):e<-d&&(c.style.display="block",c.classList.remove("fadeOut"),c.classList.add("fadeIn")):c.style.display="none",a._scrollTimeout||(a._scrollTimeout=window.setTimeout(function(){a._scrollTimeout=null;var b=!0,c=!1,d=void 0;try{for(var e,f,g=a.scrollEventSet[Symbol.iterator]();!(b=(e=g.next()).done);b=!0)f=e.value,f()}catch(a){c=!0,d=a}finally{try{b||null==g.return||g.return()}finally{if(c)throw d}}},10)),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=!0,c=!1,d=void 0;try{for(var e,f,g=a.resizeEventSet[Symbol.iterator]();!(b=(e=g.next()).done);b=!0)f=e.value,f()}catch(a){c=!0,d=a}finally{try{b||null==g.return||g.return()}finally{if(c)throw d}}a.initMenuMobile(),a.initToc(),a.initSmoothScroll(),a.initMermaid()},100))},!1)}},{key:"init",value:function init(){this.initMenuMobile(),this.initSwitchTheme(),this.initHighlight(),this.initTable(),this.initHeaderLink(),this.initMermaid(),this.initEcharts(),this.initTypeit(),this.initToc(),this.initSmoothScroll(),this.onScroll(),this.onResize()}}]),b}(),c=function(){var a=new b;a.init()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",c,!1):c()})(); +"use strict";function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _defineProperties(a,b){for(var c,d=0;d .chroma"),function(a){var b=a.querySelectorAll("pre.chroma > code"),c=b[b.length-1],d=c?c.className.toLowerCase():"";a.className+=" "+d}),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)})}},{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 k=document.getElementById("toc-content-static");b.parentElement!==k&&(b.parentElement.removeChild(b),k.appendChild(b)),this._tocOnScroll&&this.scrollEventSet.delete(this._tocOnScroll)}else{var l=document.getElementById("toc-content-auto");b.parentElement!==l&&(b.parentElement.removeChild(b),l.appendChild(b));var c=document.getElementById("toc-auto"),d=document.getElementsByClassName("page")[0];c.style.maxWidth="".concat(d.getBoundingClientRect().left-20,"px"),this._tocLinks=this._tocLinks||b.getElementsByTagName("a"),this._tocLis=this._tocLis||b.getElementsByTagName("li"),this._headerLinks=this._headerLinks||document.getElementsByClassName("headerLink")||[];var e="normal"!==window.desktopHeaderMode,f=document.getElementById("header-desktop").offsetHeight,g=20+(e?f:0),h=c.offsetTop,j=h-g+(e?0:f);this._tocOnScroll=this._tocOnScroll||function(){var d=document.getElementById("post-footer").offsetTop,k=d-c.getBoundingClientRect().height,l=k-g+(e?0:f);a.newScrollTopl?(c.style.position="absolute",c.style.top="".concat(k,"px")):(c.style.position="fixed",c.style.top="".concat(g,"px")),a.util.forEach(a._tocLinks,function(a){a.classList.remove("active")}),a.util.forEach(a._tocLis,function(a){a.classList.remove("has-active")});for(var m=20+(e?f:0),n=a._headerLinks.length-1,o=0;om||p<=m&&q>m){n=o;break}}if(-1!==n){a._tocLinks[n].classList.add("active");for(var r=a._tocLinks[n].parentElement;r!==b;)r.classList.add("has-active"),r=r.parentElement.parentElement}},this._tocOnScroll(),this.scrollEventSet.add(this._tocOnScroll)}}},{key:"initMermaid",value:function initMermaid(){window.mermaidArr&&(mermaid.initialize({startOnLoad:!1,theme:"null"}),this.util.forEach(window.mermaidArr,function(a){var b=document.getElementById(a);mermaid.mermaidAPI.render("svg-"+a,window.contentMap[a],function(a){b.innerHTML=a},b)}))}},{key:"initEcharts",value:function initEcharts(){var a=this;if(window.echartsArr){this._echartsArr=this._echartsArr||[];for(var b=0;bd?(a.classList.remove("fadeInDown"),a.classList.add("fadeOutUp")):e<-d&&(a.classList.remove("fadeOutUp"),a.classList.add("fadeInDown"))}),200d?(c.classList.remove("fadeInUp"),c.classList.add("fadeOutDown")):e<-d&&(c.style.display="block",c.classList.remove("fadeOutDown"),c.classList.add("fadeInUp")):c.style.display="none",a._scrollTimeout||(a._scrollTimeout=window.setTimeout(function(){a._scrollTimeout=null;var b=!0,c=!1,d=void 0;try{for(var e,f,g=a.scrollEventSet[Symbol.iterator]();!(b=(e=g.next()).done);b=!0)f=e.value,f()}catch(a){c=!0,d=a}finally{try{b||null==g.return||g.return()}finally{if(c)throw d}}},10)),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=!0,c=!1,d=void 0;try{for(var e,f,g=a.resizeEventSet[Symbol.iterator]();!(b=(e=g.next()).done);b=!0)f=e.value,f()}catch(a){c=!0,d=a}finally{try{b||null==g.return||g.return()}finally{if(c)throw d}}a.initMenuMobile(),a.initToc(),a.initSmoothScroll(),a.initMermaid()},100))},!1)}},{key:"init",value:function init(){this.initMenuMobile(),this.initSwitchTheme(),this.initHighlight(),this.initTable(),this.initHeaderLink(),this.initMermaid(),this.initEcharts(),this.initTypeit(),this.initToc(),this.initSmoothScroll(),this.onScroll(),this.onResize()}}]),b}(),c=function(){var a=new b;a.init()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",c,!1):c()})(); //# 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 f74ad8e62..a34f443c6 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":"+YAAA,CAAC,UAAM,CACH,aADG,GAGG,CAAA,CAHH,2HAIS,CAJT,CAImB,CAJnB,CAI4B,CACvB,CAAQ,CAAG,CAAQ,EAAI,EADA,CAEvB,IAAK,GAAI,CAAA,CAAC,CAAG,CAAb,CAAgB,CAAC,CAAG,CAAQ,CAAC,MAA7B,CAAqC,CAAC,EAAtC,CACI,CAAO,CAAC,CAAQ,CAAC,CAAD,CAAT,CAEd,CATF,mDAWgB,CACX,MAAQ,CAAA,QAAQ,CAAC,eAAT,EAA4B,QAAQ,CAAC,eAAT,CAAyB,SAAtD,EAAoE,QA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ANG,CAOH,KAAK,WAAL,EAPG,CAQH,KAAK,UAAL,EARG,CASH,KAAK,OAAL,EATG,CAUH,KAAK,gBAAL,EAVG,CAYH,KAAK,QAAL,EAZG,CAaH,KAAK,QAAL,EACH,CAvTF,SA0TG,CAAS,CAAG,UAAM,CACpB,GAAM,CAAA,CAAK,CAAG,GAAI,CAAA,CAAlB,CACA,CAAK,CAAC,IAAN,EACH,CA7TE,CA+TyB,SAAxB,GAAA,QAAQ,CAAC,UA/TV,CAkUC,QAAQ,CAAC,gBAAT,CAA0B,kBAA1B,CAA8C,CAA9C,IAlUD,CAgUC,CAAS,EAIhB,CApUD,G","file":"theme.min.js","sourcesContent":["(() => {\n 'use strict';\n\n class Util {\n forEach(elements, handler) {\n elements = elements || [];\n for (let i = 0; i < elements.length; i++) {\n handler(elements[i]);\n }\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: 560px)').matches;\n }\n\n isTocStatic() {\n return window.matchMedia('only screen and (max-width: 960px)').matches;\n }\n }\n\n class Theme {\n constructor() {\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 }\n\n initMenuMobile() {\n const menuToggleMobile = document.getElementById('menu-toggle-mobile');\n const menuMobile = document.getElementById('menu-mobile');\n this._menuMobileOnScroll = this._menuMobileOnScroll || (() => {\n menuToggleMobile.classList.remove('active');\n menuMobile.classList.remove('active');\n });\n if (this.util.isMobile()) {\n menuToggleMobile.onclick = () => {\n menuToggleMobile.classList.toggle('active');\n menuMobile.classList.toggle('active');\n };\n this.scrollEventSet.add(this._menuMobileOnScroll);\n } else {\n this.scrollEventSet.delete(this._menuMobileOnScroll);\n }\n }\n\n initSwitchTheme() {\n this.util.forEach(document.getElementsByClassName('theme-switch'), (button) => {\n button.onclick = () => {\n document.body.classList.toggle('dark-theme');\n window.isDark = !window.isDark;\n window.localStorage && window.localStorage.setItem('theme', window.isDark ? 'dark' : 'light');\n this.initEcharts();\n };\n });\n }\n\n initHighlight() {\n this.util.forEach(document.querySelectorAll('.highlight > .chroma'), (block) => {\n const codes = block.querySelectorAll('pre.chroma > code');\n const code = codes[codes.length - 1];\n const lang = code ? code.className.toLowerCase() : '';\n block.className += ' ' + lang;\n });\n this.util.forEach(document.querySelectorAll('.highlight > pre.chroma'), (block) => {\n const chroma = document.createElement('div');\n chroma.className = block.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 block.parentElement.replaceChild(chroma, block);\n td.appendChild(block);\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 toc.style.maxWidth = `${page.getBoundingClientRect().left - 20}px`;\n this._tocLinks = this._tocLinks || tocCore.getElementsByTagName('a');\n this._tocLis = this._tocLis || tocCore.getElementsByTagName('li');\n this._headerLinks = this._headerLinks || document.getElementsByClassName('headerLink') || [];\n const headerIsFixed = window.desktopHeaderMode !== '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(this._tocLinks, (link) => { link.classList.remove('active'); });\n this.util.forEach(this._tocLis, (link) => { link.classList.remove('has-active'); });\n const INDEX_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\n let activeTocIndex = this._headerLinks.length - 1;\n for (let i = 0; i < this._headerLinks.length - 1; i++) {\n const thisTop = this._headerLinks[i].getBoundingClientRect().top;\n const nextTop = this._headerLinks[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 this._tocLinks[activeTocIndex].classList.add('active');\n let parent = this._tocLinks[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 initMermaid() {\n if (window.mermaidArr) {\n mermaid.initialize({startOnLoad: false, theme: 'null'});\n this.util.forEach(window.mermaidArr, (id) => {\n const element = document.getElementById(id);\n mermaid.mermaidAPI.render('svg-' + id, window.contentMap[id], (svgCode) => {\n element.innerHTML = svgCode;\n }, element);\n });\n }\n }\n\n initEcharts() {\n if (window.echartsArr) {\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(window.echartsArr, (id) => {\n const chart = echarts.init(document.getElementById(id), window.isDark ? 'dark' : 'macarons', {renderer: 'svg'});\n chart.setOption(JSON.parse(window.contentMap[id]));\n this._echartsArr.push(chart);\n });\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\n initTypeit() {\n if (window.typeitArr) {\n for (let i = 0; i < window.typeitArr.length; i++) {\n const group = window.typeitArr[i];\n (function typeone(i) {\n const id = group[i];\n if (i === group.length - 1) {\n new TypeIt(`#${id}`, {\n strings: window.contentMap[id],\n }).go();\n return;\n }\n let instance = new TypeIt(`#${id}`, {\n strings: window.contentMap[id],\n afterComplete: () => {\n instance.destroy();\n typeone(i + 1);\n },\n }).go();\n })(0);\n }\n }\n }\n\n initSmoothScroll() {\n if ((!this.util.isMobile() && window.desktopHeaderMode === 'normal')\n || (this.util.isMobile() && window.mobileHeaderMode === '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 (window.desktopHeaderMode === 'auto') headers.push(document.getElementById('header-desktop'));\n if (window.mobileHeaderMode === 'auto') headers.push(document.getElementById('header-mobile'));\n this.util.forEach(headers, (header) => {\n header.classList.add('animated');\n header.classList.add('faster');\n });\n const toTopButton = document.getElementById('dynamic-to-top');\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 header.classList.add('fadeOutUp');\n } else if (scroll < - MIN_SCROLL) {\n header.classList.remove('fadeOutUp');\n header.classList.add('fadeInDown');\n }\n });\n if (this.newScrollTop > 400) {\n if (scroll > MIN_SCROLL) {\n toTopButton.classList.remove('fadeIn');\n toTopButton.classList.add('fadeOut');\n } else if (scroll < - MIN_SCROLL) {\n toTopButton.style.display = 'block';\n toTopButton.classList.remove('fadeOut');\n toTopButton.classList.add('fadeIn');\n }\n } else {\n toTopButton.style.display = 'none';\n }\n if (!this._scrollTimeout) {\n this._scrollTimeout = window.setTimeout(() => {\n this._scrollTimeout = null;\n for (let event of this.scrollEventSet) event();\n }, 10);\n }\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.initMenuMobile();\n this.initToc();\n this.initSmoothScroll();\n this.initMermaid()\n }, 100);\n }\n }, false);\n }\n\n init() {\n this.initMenuMobile();\n this.initSwitchTheme();\n this.initHighlight();\n this.initTable();\n this.initHeaderLink();\n this.initMermaid();\n this.initEcharts();\n this.initTypeit();\n this.initToc();\n this.initSmoothScroll();\n\n this.onScroll();\n this.onResize();\n }\n }\n\n const themeInit = () => {\n const theme = new Theme();\n theme.init();\n };\n\n if (document.readyState !== 'loading') {\n themeInit();\n } else {\n document.addEventListener('DOMContentLoaded', themeInit, false);\n }\n})();\n"]} \ No newline at end of file +{"version":3,"sources":["../../src/js/theme.js"],"names":[],"mappings":"+YAAA,CAAC,UAAM,CACH,aADG,GAGG,CAAA,CAHH,2HAIS,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,CAAC,cAAL,EAH0C,CAI1C,CAAI,CAAC,OAAL,EAJ0C,CAK1C,CAAI,CAAC,gBAAL,EAL0C,CAM1C,CAAI,CAAC,WAAL,EACH,CAPqB,CAOnB,GAPmB,CAFU,CAWvC,CAXD,IAYH,CAvSF,mCAySQ,CACH,KAAK,cAAL,EADG,CAEH,KAAK,eAAL,EAFG,CAGH,KAAK,aAAL,EAHG,CAIH,KAAK,SAAL,EAJG,CAKH,KAAK,cAAL,EALG,CAMH,KAAK,WAAL,EANG,CAOH,KAAK,WAAL,EAPG,CAQH,KAAK,UAAL,EARG,CASH,KAAK,OAAL,EATG,CAUH,KAAK,gBAAL,EAVG,CAYH,KAAK,QAAL,EAZG,CAaH,KAAK,QAAL,EACH,CAvTF,SA0TG,CAAS,CAAG,UAAM,CACpB,GAAM,CAAA,CAAK,CAAG,GAAI,CAAA,CAAlB,CACA,CAAK,CAAC,IAAN,EACH,CA7TE,CA+TyB,SAAxB,GAAA,QAAQ,CAAC,UA/TV,CAkUC,QAAQ,CAAC,gBAAT,CAA0B,kBAA1B,CAA8C,CAA9C,IAlUD,CAgUC,CAAS,EAIhB,CApUD,G","file":"theme.min.js","sourcesContent":["(() => {\n 'use strict';\n\n class Util {\n forEach(elements, handler) {\n elements = elements || [];\n for (let i = 0; i < elements.length; i++) {\n handler(elements[i]);\n }\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\n class Theme {\n constructor() {\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 }\n\n initMenuMobile() {\n const menuToggleMobile = document.getElementById('menu-toggle-mobile');\n const menuMobile = document.getElementById('menu-mobile');\n this._menuMobileOnScroll = this._menuMobileOnScroll || (() => {\n menuToggleMobile.classList.remove('active');\n menuMobile.classList.remove('active');\n });\n if (this.util.isMobile()) {\n menuToggleMobile.onclick = () => {\n menuToggleMobile.classList.toggle('active');\n menuMobile.classList.toggle('active');\n };\n this.scrollEventSet.add(this._menuMobileOnScroll);\n } else {\n this.scrollEventSet.delete(this._menuMobileOnScroll);\n }\n }\n\n initSwitchTheme() {\n this.util.forEach(document.getElementsByClassName('theme-switch'), (button) => {\n button.onclick = () => {\n document.body.classList.toggle('dark-theme');\n window.isDark = !window.isDark;\n window.localStorage && window.localStorage.setItem('theme', window.isDark ? 'dark' : 'light');\n this.initEcharts();\n };\n });\n }\n\n initHighlight() {\n this.util.forEach(document.querySelectorAll('.highlight > .chroma'), (block) => {\n const codes = block.querySelectorAll('pre.chroma > code');\n const code = codes[codes.length - 1];\n const lang = code ? code.className.toLowerCase() : '';\n block.className += ' ' + lang;\n });\n this.util.forEach(document.querySelectorAll('.highlight > pre.chroma'), (block) => {\n const chroma = document.createElement('div');\n chroma.className = block.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 block.parentElement.replaceChild(chroma, block);\n td.appendChild(block);\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 toc.style.maxWidth = `${page.getBoundingClientRect().left - 20}px`;\n this._tocLinks = this._tocLinks || tocCore.getElementsByTagName('a');\n this._tocLis = this._tocLis || tocCore.getElementsByTagName('li');\n this._headerLinks = this._headerLinks || document.getElementsByClassName('headerLink') || [];\n const headerIsFixed = window.desktopHeaderMode !== '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(this._tocLinks, (link) => { link.classList.remove('active'); });\n this.util.forEach(this._tocLis, (link) => { link.classList.remove('has-active'); });\n const INDEX_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\n let activeTocIndex = this._headerLinks.length - 1;\n for (let i = 0; i < this._headerLinks.length - 1; i++) {\n const thisTop = this._headerLinks[i].getBoundingClientRect().top;\n const nextTop = this._headerLinks[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 this._tocLinks[activeTocIndex].classList.add('active');\n let parent = this._tocLinks[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 initMermaid() {\n if (window.mermaidArr) {\n mermaid.initialize({startOnLoad: false, theme: 'null'});\n this.util.forEach(window.mermaidArr, (id) => {\n const element = document.getElementById(id);\n mermaid.mermaidAPI.render('svg-' + id, window.contentMap[id], (svgCode) => {\n element.innerHTML = svgCode;\n }, element);\n });\n }\n }\n\n initEcharts() {\n if (window.echartsArr) {\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(window.echartsArr, (id) => {\n const chart = echarts.init(document.getElementById(id), window.isDark ? 'dark' : 'macarons', {renderer: 'svg'});\n chart.setOption(JSON.parse(window.contentMap[id]));\n this._echartsArr.push(chart);\n });\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\n initTypeit() {\n if (window.typeitArr) {\n for (let i = 0; i < window.typeitArr.length; i++) {\n const group = window.typeitArr[i];\n (function typeone(i) {\n const id = group[i];\n if (i === group.length - 1) {\n new TypeIt(`#${id}`, {\n strings: window.contentMap[id],\n }).go();\n return;\n }\n let instance = new TypeIt(`#${id}`, {\n strings: window.contentMap[id],\n afterComplete: () => {\n instance.destroy();\n typeone(i + 1);\n },\n }).go();\n })(0);\n }\n }\n }\n\n initSmoothScroll() {\n if ((!this.util.isMobile() && window.desktopHeaderMode === 'normal')\n || (this.util.isMobile() && window.mobileHeaderMode === '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 (window.desktopHeaderMode === 'auto') headers.push(document.getElementById('header-desktop'));\n if (window.mobileHeaderMode === 'auto') headers.push(document.getElementById('header-mobile'));\n this.util.forEach(headers, (header) => {\n header.classList.add('animated');\n header.classList.add('faster');\n });\n const toTopButton = document.getElementById('dynamic-to-top');\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 header.classList.add('fadeOutUp');\n } else if (scroll < - MIN_SCROLL) {\n header.classList.remove('fadeOutUp');\n header.classList.add('fadeInDown');\n }\n });\n if (this.newScrollTop > 200) {\n if (scroll > MIN_SCROLL) {\n toTopButton.classList.remove('fadeInUp');\n toTopButton.classList.add('fadeOutDown');\n } else if (scroll < - MIN_SCROLL) {\n toTopButton.style.display = 'block';\n toTopButton.classList.remove('fadeOutDown');\n toTopButton.classList.add('fadeInUp');\n }\n } else {\n toTopButton.style.display = 'none';\n }\n if (!this._scrollTimeout) {\n this._scrollTimeout = window.setTimeout(() => {\n this._scrollTimeout = null;\n for (let event of this.scrollEventSet) event();\n }, 10);\n }\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.initMenuMobile();\n this.initToc();\n this.initSmoothScroll();\n this.initMermaid()\n }, 100);\n }\n }, false);\n }\n\n init() {\n this.initMenuMobile();\n this.initSwitchTheme();\n this.initHighlight();\n this.initTable();\n this.initHeaderLink();\n this.initMermaid();\n this.initEcharts();\n this.initTypeit();\n this.initToc();\n this.initSmoothScroll();\n\n this.onScroll();\n this.onResize();\n }\n }\n\n const themeInit = () => {\n const theme = new Theme();\n theme.init();\n };\n\n if (document.readyState !== 'loading') {\n themeInit();\n } else {\n document.addEventListener('DOMContentLoaded', themeInit, false);\n }\n})();\n"]} \ No newline at end of file diff --git a/assets/lib/mermaid/mermaid.scss b/assets/lib/mermaid/mermaid.scss index 078562d3e..7568095cb 100644 --- a/assets/lib/mermaid/mermaid.scss +++ b/assets/lib/mermaid/mermaid.scss @@ -10,6 +10,6 @@ @import "themes/neutral/index"; .dark-theme & { - @import "themes/darker/index"; + @import "themes/dark/index"; } } diff --git a/assets/lib/mermaid/themes/darker/index.scss b/assets/lib/mermaid/themes/darker/index.scss deleted file mode 100644 index c1043f025..000000000 --- a/assets/lib/mermaid/themes/darker/index.scss +++ /dev/null @@ -1,62 +0,0 @@ -$mainBkg: #BDD5EA; -$secondBkg: #6D6D65; -$mainContrastColor: lightgrey; -$darkTextColor: #323D47; -$lineColor: $mainContrastColor; -$border1: #81B1DB; -$border2: rgba(255, 255, 255, 0.25); -$arrowheadColor: $mainContrastColor; - -/* Flowchart variables */ - -$nodeBkg: $mainBkg; -$nodeBorder: purple; -$clusterBkg: $secondBkg; -$clusterBorder: $border2; -$defaultLinkColor: $lineColor; -$titleColor: #F9FFFE; -$edgeLabelBackground: #e8e8e8; - -/* Sequence Diagram variables */ - -$actorBorder: $border1; -$actorBkg: $mainBkg; -$actorTextColor: black; -$actorLineColor: $mainContrastColor; -$signalColor: $mainContrastColor; -$signalTextColor: $mainContrastColor; -$labelBoxBkgColor: $actorBkg; -$labelBoxBorderColor: $actorBorder; -$labelTextColor: $darkTextColor; -$loopTextColor: $mainContrastColor; -$noteBorderColor: $border2; -$noteBkgColor: #fff5ad; -$activationBorderColor: #666; -$activationBkgColor: #f4f4f4; -$sequenceNumberColor: white; - -/* Gantt chart variables */ - -$sectionBkgColor: rgba(255, 255, 255, 0.3); -$altSectionBkgColor: white; -$sectionBkgColor2: #EAE8B9; -$taskBorderColor: rgba(255, 255, 255, 0.5); -$taskBkgColor: $mainBkg; -$taskTextColor: $darkTextColor; -$taskTextLightColor: $mainContrastColor; -$taskTextOutsideColor: $taskTextLightColor; -$taskTextClickableColor: #003163; -$activeTaskBorderColor: rgba(255, 255, 255, 0.5); -$activeTaskBkgColor: #81B1DB; -$gridColor: $mainContrastColor; -$doneTaskBkgColor: $mainContrastColor; -$doneTaskBorderColor: grey; -$critBorderColor: #E83737; -$critBkgColor: #E83737; -$taskTextDarkColor: $darkTextColor; -$todayLineColor: #DB5757; - -/* state colors */ -$labelColor: black; - -@import '../mermaid'; diff --git a/assets/lib/mermaid/themes/gantt.scss b/assets/lib/mermaid/themes/gantt.scss index 5fb4bb991..a08f54aa3 100644 --- a/assets/lib/mermaid/themes/gantt.scss +++ b/assets/lib/mermaid/themes/gantt.scss @@ -59,6 +59,7 @@ text { font-family: 'trebuchet ms', verdana, arial; font-family: var(--mermaid-font-family); + fill: $taskTextOutsideColor; } } @@ -151,12 +152,12 @@ .taskTextOutside0, .taskTextOutside2 { - fill: $taskTextOutsideColor; + fill: $taskTextOutsideColor !important; } .taskTextOutside1, .taskTextOutside3 { - fill: $taskTextOutsideColor; + fill: $taskTextOutsideColor !important; } @@ -174,7 +175,7 @@ .activeText1, .activeText2, .activeText3 { - fill: $taskTextDarkColor !important; + fill: $taskTextDarkColor; } @@ -193,7 +194,7 @@ .doneText1, .doneText2, .doneText3 { - fill: $taskTextDarkColor !important; + fill: $taskTextDarkColor; } @@ -239,20 +240,20 @@ .doneCritText1, .doneCritText2, .doneCritText3 { - fill: $taskTextDarkColor !important; + fill: $taskTextDarkColor; } .activeCritText0, .activeCritText1, .activeCritText2, .activeCritText3 { - fill: $taskTextDarkColor !important; + fill: $taskTextDarkColor; } .titleText { text-anchor: middle; font-size: 18px; - fill: $taskTextDarkColor; + fill: $taskTextOutsideColor; font-family: 'trebuchet ms', verdana, arial; font-family: var(--mermaid-font-family); } diff --git a/assets/lib/valine/dark.scss b/assets/lib/valine/valine.scss similarity index 92% rename from assets/lib/valine/dark.scss rename to assets/lib/valine/valine.scss index 4c552a90f..0b56d221c 100644 --- a/assets/lib/valine/dark.scss +++ b/assets/lib/valine/valine.scss @@ -25,6 +25,10 @@ .v code, .v pre { background: #272C34; } + + .v .vmark .vinput { + color: #0e0f10; + } } .v code, .v pre { diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 5ae8ea3ee..14e1684bf 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,4 +1,4 @@ -baseURL = "/" +baseURL = "https://example.com" # [en, zh-cn, fr, ...] determines default content language # [en, zh-cn, fr, ...] 设置默认的语言 defaultContentLanguage = "en" @@ -25,7 +25,7 @@ enableEmoji = true # language code languageCode = "en" # website title - title = "LoveIt Theme" + title = "LoveIt" # language name languageName = "English" # whether to include Chinese/Japanese/Korean @@ -66,7 +66,7 @@ enableEmoji = true [[languages.en.menu.main]] identifier = "documentation" pre = "" - name = "Documentation" + name = "Docs" url = "/categories/documentation/" title = "" weight = 4 @@ -77,6 +77,13 @@ enableEmoji = true url = "/about/" title = "" weight = 5 + [[languages.en.menu.main]] + identifier = "github" + pre = "" + name = "" + url = "https://github.com/dillonzq/LoveIt" + title = "GitHub" + weight = 6 [languages.en.params] # site description description = "About LoveIt Theme" @@ -242,7 +249,7 @@ enableEmoji = true # 网站语言, 仅在这里 CN 大写 languageCode = "zh-CN" # 网站标题 - title = "LoveIt 主题" + title = "LoveIt" # 语言名称 languageName = "简体中文" # 是否包括中日韩文字 @@ -260,7 +267,7 @@ enableEmoji = true [[languages.zh-cn.menu.main]] identifier = "posts" pre = "" - name = "文章" + name = "所有文章" url = "/posts/" title = "" weight = 1 @@ -281,7 +288,7 @@ enableEmoji = true [[languages.zh-cn.menu.main]] identifier = "documentation" pre = "" - name = "主题文档" + name = "文档" url = "/categories/documentation/" title = "" weight = 4 @@ -292,6 +299,13 @@ enableEmoji = true url = "/about/" title = "" weight = 5 + [[languages.zh-cn.menu.main]] + identifier = "github" + pre = "" + name = "" + url = "https://github.com/dillonzq/LoveIt" + title = "GitHub" + weight = 6 [languages.zh-cn.params] # 网站描述 description = "关于 LoveIt 主题" @@ -457,7 +471,7 @@ enableEmoji = true # language code languageCode = "fr" # website title - title = "LoveIt Thème" + title = "LoveIt" # language name languageName = "Français" # whether to include Chinese/Japanese/Korean @@ -496,7 +510,7 @@ enableEmoji = true [[languages.fr.menu.main]] identifier = "documentation" pre = "" - name = "Documentation" + name = "Docs" url = "/categories/documentation/" title = "" weight = 4 @@ -507,6 +521,13 @@ enableEmoji = true url = "/about/" title = "" weight = 5 + [[languages.fr.menu.main]] + identifier = "github" + pre = "" + name = "" + url = "https://github.com/dillonzq/LoveIt" + title = "GitHub" + weight = 6 [languages.fr.params] # site description description = "À propos du thème LoveIt" diff --git a/exampleSite/content/about.en.md b/exampleSite/content/about.en.md index 333c63855..a08071c69 100644 --- a/exampleSite/content/about.en.md +++ b/exampleSite/content/about.en.md @@ -11,6 +11,7 @@ lightgallery: true [![Hugo](https://img.shields.io/badge/Hugo-%5E0.62.0-ff4088?style=flat-square&logo=hugo)](https://gohugo.io/) [![License](https://img.shields.io/github/license/dillonzq/LoveIt?style=flat-square)](https://github.com/dillonzq/LoveIt/blob/master/LICENSE) [![GitHub stars](https://img.shields.io/github/stars/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt) +[![GitHub forks](https://img.shields.io/github/forks/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt/fork) [LoveIt :(far fa-heart):](https://github.com/dillonzq/LoveIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/) developed by [Dillon](https://dillonzq.com). diff --git a/exampleSite/content/about.fr.md b/exampleSite/content/about.fr.md index 0803e59ec..4534f4376 100644 --- a/exampleSite/content/about.fr.md +++ b/exampleSite/content/about.fr.md @@ -11,6 +11,7 @@ lightgallery: true [![Hugo](https://img.shields.io/badge/Hugo-%5E0.62.0-ff4088?style=flat-square&logo=hugo)](https://gohugo.io/) [![License](https://img.shields.io/github/license/dillonzq/LoveIt?style=flat-square)](https://github.com/dillonzq/LoveIt/blob/master/LICENSE) [![GitHub stars](https://img.shields.io/github/stars/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt) +[![GitHub forks](https://img.shields.io/github/forks/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt/fork) {{< admonition warning >}} Sorry, this article has not been completely translated into **French**. diff --git a/exampleSite/content/about.zh-cn.md b/exampleSite/content/about.zh-cn.md index dce8a4438..3de068c82 100644 --- a/exampleSite/content/about.zh-cn.md +++ b/exampleSite/content/about.zh-cn.md @@ -11,6 +11,7 @@ lightgallery: true [![Hugo](https://img.shields.io/badge/Hugo-%5E0.62.0-ff4088?style=flat-square&logo=hugo)](https://gohugo.io/) [![License](https://img.shields.io/github/license/dillonzq/LoveIt?style=flat-square)](https://github.com/dillonzq/LoveIt/blob/master/LICENSE) [![GitHub stars](https://img.shields.io/github/stars/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt) +[![GitHub forks](https://img.shields.io/github/forks/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt/fork) [LoveIt :(far fa-heart):](https://github.com/dillonzq/LoveIt) 是一个由 [Dillon](https://dillonzq.com) 开发的**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。 diff --git a/exampleSite/content/categories/documentation/_index.en.md b/exampleSite/content/categories/documentation/_index.en.md new file mode 100644 index 000000000..3050ea745 --- /dev/null +++ b/exampleSite/content/categories/documentation/_index.en.md @@ -0,0 +1,4 @@ +--- +title: "Documentation" +slug: "documentation" +--- diff --git a/exampleSite/content/categories/documentation/_index.fr.md b/exampleSite/content/categories/documentation/_index.fr.md new file mode 100644 index 000000000..3050ea745 --- /dev/null +++ b/exampleSite/content/categories/documentation/_index.fr.md @@ -0,0 +1,4 @@ +--- +title: "Documentation" +slug: "documentation" +--- diff --git a/exampleSite/content/categories/documentation/_index.zh-cn.md b/exampleSite/content/categories/documentation/_index.zh-cn.md new file mode 100644 index 000000000..9168d971f --- /dev/null +++ b/exampleSite/content/categories/documentation/_index.zh-cn.md @@ -0,0 +1,4 @@ +--- +title: "文档" +slug: "documentation" +--- diff --git a/exampleSite/content/posts/theme-documentation-basics.en.md b/exampleSite/content/posts/theme-documentation-basics.en.md index fb857693d..0758cfcda 100644 --- a/exampleSite/content/posts/theme-documentation-basics.en.md +++ b/exampleSite/content/posts/theme-documentation-basics.en.md @@ -547,9 +547,9 @@ Add a logo image (127x40) and a cover image (800x600) in the `static` directory. **LoveIt** theme has been built to be as configurable as possible by defining custom `.scss` style files. -The directory including the custom `.scss` style files is `config/css` relative to **your project path**. +The directory including the custom `.scss` style files is `config/css` relative to **your project root directory**. -In `_override.scss`, you can override the variables in `themes/LoveIt/assets/css/_variables.scss` to customize the style. +In `config/css/_override.scss`, you can override the variables in `themes/LoveIt/assets/css/_variables.scss` to customize the style. Here is a example: @@ -558,7 +558,7 @@ Here is a example: $code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospace; ``` -In `_custom.scss`, you can add some css style code to customize the style. +In `config/css/_custom.scss`, you can add some css style code to customize the style. ## 4 Multilingual and i18n diff --git a/exampleSite/content/posts/theme-documentation-basics.fr.md b/exampleSite/content/posts/theme-documentation-basics.fr.md index a78d59277..fbffbbf35 100644 --- a/exampleSite/content/posts/theme-documentation-basics.fr.md +++ b/exampleSite/content/posts/theme-documentation-basics.fr.md @@ -30,11 +30,6 @@ Découvrez en quoi consiste le thème Hugo - **LoveIt** et les concepts fondamen -{{< admonition warning >}} -Sorry, this article has not been completely translated into **French**. -Welcome to take the time to propose a translation by [making a PR](https://github.com/dillonzq/LoveIt/pulls) to the theme! -{{< /admonition >}} - ## 1 Requirements Thanks to the simplicity of Hugo, [Hugo](https://gohugo.io/) is the only dependency of this theme. @@ -552,9 +547,9 @@ Add a logo image (127x40) and a cover image (800x600) in the `static` directory. **LoveIt** theme has been built to be as configurable as possible by defining custom `.scss` style files. -The directory including the custom `.scss` style files is `config/css` relative to **your project path**. +The directory including the custom `.scss` style files is `config/css` relative to **your project root directory**. -In `_override.scss`, you can override the variables in `themes/LoveIt/assets/css/_variables.scss` to customize the style. +In `config/css/_override.scss`, you can override the variables in `themes/LoveIt/assets/css/_variables.scss` to customize the style. Here is a example: @@ -563,7 +558,7 @@ Here is a example: $code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospace; ``` -In `_custom.scss`, you can add some css style code to customize the style. +In `config/css/_custom.scss`, you can add some css style code to customize the style. ## 4 Multilingual and i18n diff --git a/exampleSite/content/posts/theme-documentation-basics.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics.zh-cn.md index 37e44c7df..03fa0a608 100644 --- a/exampleSite/content/posts/theme-documentation-basics.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics.zh-cn.md @@ -549,9 +549,9 @@ hugo 通过定义自定义 `.scss` 样式文件, **LoveIt** 主题支持可配置的样式. -包含自定义 `.scss` 样式文件的目录相对于 **你的项目** 的路径为 `config / css`. +包含自定义 `.scss` 样式文件的目录相对于 **你的项目根目录** 的路径为 `config/css`. -在 `_override.scss` 中, 你可以覆盖 `themes/LoveIt/assets/css/_variables.scss` 中的变量以自定义样式. +在 `config/css/_override.scss` 中, 你可以覆盖 `themes/LoveIt/assets/css/_variables.scss` 中的变量以自定义样式. 这是一个例子: @@ -560,7 +560,7 @@ hugo $code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospace; ``` -在 `_custom.scss` 中, 你可以添加一些 CSS 样式代码以自定义样式. +在 `config/css/_custom.scss` 中, 你可以添加一些 CSS 样式代码以自定义样式. ## 4 多语言和 i18n diff --git a/exampleSite/static/images/Apple-Devices-Preview.png b/exampleSite/static/images/Apple-Devices-Preview.png index d1bd34c90..db0b7d683 100644 Binary files a/exampleSite/static/images/Apple-Devices-Preview.png and b/exampleSite/static/images/Apple-Devices-Preview.png differ diff --git a/images/Apple-Devices-Preview.png b/images/Apple-Devices-Preview.png index 0e1638895..db0b7d683 100644 Binary files a/images/Apple-Devices-Preview.png and b/images/Apple-Devices-Preview.png differ diff --git a/images/screenshot.png b/images/screenshot.png index 01637d78f..826ff8d6d 100644 Binary files a/images/screenshot.png and b/images/screenshot.png differ diff --git a/images/tn.png b/images/tn.png index 9da2fd19a..dac03cd21 100644 Binary files a/images/tn.png and b/images/tn.png differ diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 80eac99dc..aeff9cfa2 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -56,7 +56,7 @@ {{- /* Dynamic to top button */ -}} -   + {{- /* Load JavaScript scripts and CSS */ -}} diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index 7bb78d993..60c3a91e0 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -29,15 +29,14 @@

{{- with .Params.categories -}} -