diff options
8 files changed, 37 insertions, 3 deletions
diff --git a/assets/scss/main.scss b/assets/scss/main.scss index efaa7d0..c53cdd7 100644 --- a/assets/scss/main.scss +++ b/assets/scss/main.scss @@ -102,7 +102,7 @@ position: relative; z-index: 4; } - [data-theme="dark"] .post img { + [data-theme="dark"] img { filter: brightness(50%); } {{ end }} diff --git a/config-examples/en-us/config.toml b/config-examples/en-us/config.toml index ad11c51..79d79e1 100644 --- a/config-examples/en-us/config.toml +++ b/config-examples/en-us/config.toml @@ -1176,6 +1176,13 @@ uglyURLs = false ###################################### + # Medium Zoom + + enableMediumZoom = true + # Note: https://github.com/francoischalifour/medium-zoom + + + ###################################### # 404 Page fofPoster = "" diff --git a/config-examples/zh-cn/config.toml b/config-examples/zh-cn/config.toml index f8bb9c1..f470b09 100644 --- a/config-examples/zh-cn/config.toml +++ b/config-examples/zh-cn/config.toml @@ -1146,6 +1146,13 @@ uglyURLs = false ###################################### + # 图片缩放 + + enableMediumZoom = true + # 说明:https://github.com/francoischalifour/medium-zoom + + + ###################################### # 404 页面 # 视频封面 diff --git a/exampleSite/resources/_gen/assets/scss/scss/main.scss_b04c21e44835e7dcdc8cb03d103b5ef1.content b/exampleSite/resources/_gen/assets/scss/scss/main.scss_b04c21e44835e7dcdc8cb03d103b5ef1.content index 8b5ed01..13fabec 100644 --- a/exampleSite/resources/_gen/assets/scss/scss/main.scss_b04c21e44835e7dcdc8cb03d103b5ef1.content +++ b/exampleSite/resources/_gen/assets/scss/scss/main.scss_b04c21e44835e7dcdc8cb03d103b5ef1.content @@ -1 +1 @@ -:root{--color-primary:hsl(220, 90%, 56%);--color-primary-h:220;--color-primary-s:90%;--color-primary-l:56%;--color-bg:hsl(0, 0%, 100%);--color-bg-h:0;--color-bg-s:0%;--color-bg-l:100%;--color-contrast-lower:hsl(0, 0%, 95%);--color-contrast-lower-h:0;--color-contrast-lower-s:0%;--color-contrast-lower-l:95%;--color-contrast-low:hsl(240, 1%, 83%);--color-contrast-low-h:240;--color-contrast-low-s:1%;--color-contrast-low-l:83%;--color-contrast-medium:hsl(240, 1%, 48%);--color-contrast-medium-h:240;--color-contrast-medium-s:1%;--color-contrast-medium-l:48%;--color-contrast-high:hsl(240, 4%, 20%);--color-contrast-high-h:240;--color-contrast-high-s:4%;--color-contrast-high-l:20%;--color-contrast-higher:hsl(240, 8%, 12%);--color-contrast-higher-h:240;--color-contrast-higher-s:8%;--color-contrast-higher-l:12%}[data-theme="dark"]{--color-primary:hsl(201, 65%, 62%);--color-primary-h:201;--color-primary-s:65%;--color-primary-l:62%;--color-bg:hsl(240, 8%, 12%);--color-bg-h:240;--color-bg-s:8%;--color-bg-l:12%;--color-contrast-lower:hsl(240, 6%, 19%);--color-contrast-lower-h:240;--color-contrast-lower-s:6%;--color-contrast-lower-l:19%;--color-contrast-low:hsl(240, 3%, 27%);--color-contrast-low-h:240;--color-contrast-low-s:3%;--color-contrast-low-l:27%;--color-contrast-medium:hsl(240, 1%, 57%);--color-contrast-medium-h:240;--color-contrast-medium-s:1%;--color-contrast-medium-l:57%;--color-contrast-high:hsl(0, 0%, 89%);--color-contrast-high-h:0;--color-contrast-high-s:0%;--color-contrast-high-l:89%;--color-contrast-higher:hsl(0, 0%, 100%);--color-contrast-higher-h:0;--color-contrast-higher-s:0%;--color-contrast-higher-l:100%}#theme-toggle{padding:1em;cursor:pointer;float:right;position:relative;z-index:4}[data-theme="dark"] .post img{filter:brightness(50%)}html,body{margin:0;width:100%;height:100%}body{font-size:20px;color:var(--color-contrast-high);background-color:var(--color-bg);overflow-wrap:break-word;word-wrap:break-word;line-height:1.618}.container{min-height:100%;min-width:100%;position:relative}.main{padding:2em 1em 15em;display:block}.main-inner{margin:0 auto;display:block}.icon{width:1em;height:1em;fill:currentColor;display:inline-block}svg{vertical-align:middle}h1,h2,h3,h4,h5,h6{margin:1.618em 0 1em;color:var(--color-contrast-higher)}h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{text-decoration:none !important;color:var(--color-contrast-higher)}h1{font-size:2em}h2{font-size:1.8em}h3{font-size:1.6em}h4{font-size:1.4em}h5{font-size:1.2em}h6{font-size:1em}a{color:var(--color-contrast-high);text-decoration:none;transition:color .5s}a:hover{color:var(--color-primary)}::selection{background-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.3)}::-webkit-scrollbar{width:0.4em;height:0.2em}::-webkit-scrollbar-track{background-color:var(--color-bg)}::-webkit-scrollbar-thumb{background-color:var(--color-contrast-low)}::-webkit-scrollbar-thumb:hover{background-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5)}::-webkit-scrollbar-thumb:active{background-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.75)}[data-hide="true"]{display:none}[data-small-caps="true"] .post-body h1,[data-small-caps="true"] .post-body h2,[data-small-caps="true"] .post-body h3,[data-small-caps="true"] .post-body h4,[data-small-caps="true"] .post-body h5,[data-small-caps="true"] .post-body h6{font-variant:small-caps}[data-small-caps="true"] .contents-title{font-variant:small-caps}[data-align="justify"] .post-body p{text-align:justify;text-justify:distribute}[data-align="center"] .post-body p{text-align:center}[data-type="poetry"] .post-body{display:table;margin:0 auto}.list-title,.term-title,.list-year,.list-month,.post-title,.post-subtitle,.related-title,.post-nav,thead,dt{font-family:Comfortaa,sans-serif}.post-body h1,.post-body h2,.post-body h3,.post-body h4,.post-body h5,.post-body h6{font-family:Comfortaa,sans-serif}.contents-title{font-family:Comfortaa,sans-serif}code,pre,sup,.post-meta,.updated-badge,.post-gitinfo,.minimal-footer,.minimal-footer-about,.busuanzi-site-uv-and-pv{font-family:"Source Code Pro",monospace}body{font-family:"IBM Plex Serif",serif}.header{z-index:3;position:relative}.site-brand{text-align:center}.site-brand{background-image:linear-gradient(90deg, #f79533 0, #f37055 15%, #ef4e7b 30%, #a166ab 44%, #5073b8 58%, #1098ad 72%, #07b39b 86%, #6dba82 100%)}.brand{width:250px;height:100px;fill:#fff}.nav{z-index:3;position:relative}.menu{padding:0;margin:0;list-style:none;text-align:center;background:var(--color-contrast-lower);line-height:1.5;font-weight:500}.menu-item{display:inline-block;margin:0 1em}.menu-item a{color:var(--color-contrast-medium)}.menu-item a:hover{color:var(--color-primary)}.active a{color:var(--color-primary)}.menu-item-name{display:flex}.post-meta{color:var(--color-contrast-medium);font-size:80%;text-align:center;margin:20px 0}.post-meta a{color:var(--color-contrast-medium)}.post-meta a:hover{color:var(--color-primary)}.home .post-meta{margin:20px 0}.post-meta-item{margin:0.5em;display:inline-block}.post-meta-icon{fill:hsla(var(--color-contrast-medium-h), var(--color-contrast-medium-s), var(--color-contrast-medium-l), 0.5);margin-bottom:0.3em}.single .main-inner{width:32em}.post-title{text-align:center}.post-subtitle{font-size:1.8em;text-align:center;font-weight:700;margin-top:-0.618em}.post-description{text-align:center;margin:20px 0;font-size:90%}.post-body{margin-top:5em !important}.post-body a{text-decoration:underline}.post p{margin:0 0 1em;line-height:1.618}.post img{display:block;margin:2em auto;max-width:100%;border:1px solid var(--color-contrast-lower);clear:both}.post video{display:block;max-width:100%;margin:2em auto;clear:both}.post sup{font-size:70%;vertical-align:super}.post sup a{text-decoration:none}.post ol,.post ul{padding-left:2em;line-height:1.618}.post hr{border:none;margin:2.427em 0 1.5em;text-align:center}.post hr::after{content:"···";letter-spacing:2em;padding-left:2em}blockquote{margin:2em 0;padding:0 1em;color:var(--color-contrast-medium);border-left:3px solid var(--color-contrast-low)}blockquote p{text-align:left !important}blockquote a{color:var(--color-contrast-medium)}blockquote a:hover{color:var(--color-primary)}.emphasis-point{font-weight:normal;text-emphasis:'•';-webkit-text-emphasis:'•';-moz-text-emphasis:'•';text-emphasis-position:under;-webkit-text-emphasis-position:under;-moz-text-emphasis-position:under}.drop-cap{float:left;font-size:62px;margin-right:12.36px;margin-top:10px;line-height:32.36px}.caption{display:block;text-align:center;margin:-1em 0 0;font-size:90%;color:var(--color-contrast-medium)}.contents{margin-top:5em}.contents ol{list-style:none;counter-reset:item}.contents ol li::before{content:counters(item, ".") ". ";counter-increment:item}ol.toc{padding:0;overflow:auto hidden;white-space:nowrap}.footnotes{font-size:90%;margin-top:100px}.footnotes hr{margin:0;height:1px;border:none;background-color:var(--color-contrast-medium)}.footnotes hr::after{content:none}.footnotes ol{margin:32.36px 0 0;padding:0 20px 0 40px}.anchor-link{position:absolute;transform:translate(-150%)}.anchor-icon{width:0.75em;height:0.75em;vertical-align:baseline}table{width:100%;border-collapse:collapse;border-spacing:0;border:1px solid var(--color-contrast-lower);margin:2em 0}thead{font-weight:700}th,td{font-size:0.9em;padding:0.4em;border:1px solid var(--color-contrast-lower)}table>tbody>tr:nth-of-type(odd){background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5)}table>tbody>tr:hover{background-color:var(--color-contrast-lower)}dt{font-weight:700}dd{margin-left:2em;text-align:left}code{padding:2.5px 5px;background-color:var(--color-contrast-lower);border-radius:3px;font-size:80%}pre{overflow:auto hidden;font-size:16px;margin:40px 0;padding:1em;line-height:1.618;background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.75)}pre code{background-color:unset;font-size:inherit;padding:0}.highlight{font-size:0.8em;margin:40px 0}.highlight pre{margin:0 !important;overflow:auto hidden;background-color:unset}.highlight th,.highlight td{font-size:inherit}.highlight table>tbody>tr:nth-of-type(odd){background-color:inherit}.highlight table>tbody>tr:hover{background-color:inherit}span.lnt{user-select:none;display:block;margin-right:-1em !important;padding:0 !important}.katex-display,mjx-container[jax="CHTML"][display="true"]{overflow:auto hidden;text-indent:0}:root{--anchor-opacity: 0}.anchor-link{opacity:var(--anchor-opacity);transition:all .25s}.post h1:hover,.post h2:hover,.post h3:hover,.post h4:hover,.post h5:hover,.post h6:hover,.post .anchor-link:hover{--anchor-opacity: 1}.footnote-icon{fill:hsla(var(--color-contrast-high-h), var(--color-contrast-high-s), var(--color-contrast-high-l), 0.5);transition:fill .5s}.footnote-icon:hover{fill:var(--color-primary)}[data-indent="true"] .contents-title{text-align:center}[data-indent="true"] .post-body p{text-indent:2em;margin:0}[data-indent="true"] .post-body .caption{text-indent:0;margin:0 0 1em}[data-indent="true"] .post-body blockquote{margin:1em 0;padding:0;border:none}[data-indent="true"] .post-body img,[data-indent="true"] .post-body video{margin:1em auto}[data-indent="true"] .post-body table{margin:1em 0}[data-indent="true"] .post-body pre,[data-indent="true"] .post-body .highlight{margin:20px 0}[data-indent="true"] .post-body h1,[data-indent="true"] .post-body h2,[data-indent="true"] .post-body h3,[data-indent="true"] .post-body h4,[data-indent="true"] .post-body h5,[data-indent="true"] .post-body h6{text-align:center}[data-indent="true"] .post-body .anchor-link{position:relative;transform:none;display:block;float:none}[data-indent="true"] .post-body ol,[data-indent="true"] .post-body ul{margin:0;list-style-position:inside}[data-indent="true"] .post-body ol p,[data-indent="true"] .post-body ul p{text-indent:0;display:inline-block}[data-indent="true"] .post-body .footnotes ol{margin:32.36px 0 0;list-style-position:outside}[data-indent="true"] .post-body dl{text-indent:2em}[data-indent="true"] .post-body dl dd{text-indent:0;margin-left:4em}[data-indent="true"] .post-body dl p{text-indent:0}.post-copyright{margin:0;list-style:none;margin-top:5em;padding:0.5em 1em;background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5);border-left:3px solid hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5);line-height:2}.copyright-item{line-height:1.5;margin:0.5em 0}.updated-badge-container{margin-top:5em;text-align:center}.updated-badge-left{fill:var(--color-contrast-low)}.updated-badge-right{fill:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5)}.related-posts{text-align:left;border:1px solid var(--color-contrast-lower);padding:0.6em 1em;line-height:2em;margin-top:5em}.related-title{font-size:1em;margin:0}.related-icon{float:right;margin-top:0.4em}.related-list{margin:0;padding:0;list-style:none}.related-link{line-height:1.5;display:inline-block}.post-tags{margin-top:100px;text-align:center;font-size:90%}.post-tags-link{color:hsla(var(--color-contrast-medium-h), var(--color-contrast-medium-s), var(--color-contrast-medium-l), 0.9);margin:0 0.5em;line-height:2;display:inline-block}.tag-icon{margin-right:0.3em;font-size:80%}.post-nav{list-style:none;padding:0;display:flex;justify-content:space-between;border-top:1px solid var(--color-contrast-lower);font-weight:700;margin-top:5em;padding-top:0.618em}.post-nav-prev{margin-right:auto;max-width:42%}.post-nav-next{margin-left:auto;text-align:right;max-width:42%}.list .main-inner{width:30em}.list-title{text-align:center}.list ul{list-style:none;padding:0}.list-item{line-height:2;position:relative;transition:border .5s;border-bottom:1px dashed var(--color-contrast-low);margin-top:1em;padding-bottom:0.5em;display:flex;align-items:baseline}.list-item:hover{border-bottom-color:var(--color-primary)}.list-item:hover ::before{background:var(--color-primary)}.list-item ::before{content:" ";position:absolute;left:0.618em;top:0.618em;width:6.66666667px;height:6.66666667px;background:var(--color-contrast-low);border-radius:50%;border:1px solid var(--color-bg);transition:background .5s;font-size:20px}.list-item-title{margin:0 0.618em 0 2em;font-size:1.2em;line-height:1.5}.list-item-time{margin:0 0.618em 0 2em;color:var(--color-contrast-medium);line-height:1.5}.list-year{display:flex;justify-content:space-between;align-items:baseline}.term-count{color:var(--color-contrast-medium);font-size:0.7em}.tree{margin-left:-2em;overflow:auto hidden;white-space:nowrap}.category-item{color:blue;font-size:1.2em}.category-item:hover{color:blueviolet}.category-count{color:var(--color-contrast-medium)}.tag-cloud{text-align:center}.tag-cloud-item{margin:10px;display:inline-block}.list-item-title{flex:1}.list-item-time{text-align:right;margin-left:1em}.back-to-top{position:fixed;right:0;z-index:1}.back-to-top a{display:block;padding:1em;color:var(--color-contrast-medium)}.back-to-top a:hover{color:var(--color-primary)}.back-to-top{bottom:-5em;transition:bottom 0.3s ease-in-out}.back-to-top.show{bottom:0}.footer{position:absolute;bottom:0;width:100%;font-size:90%;color:var(--color-contrast-medium)}.footer a{color:var(--color-contrast-medium)}.footer a:hover{color:var(--color-primary)}.footer-inner{padding:1em;text-align:center}.footer-icon{margin:0 0.25em 0.3em}.footer-icon{fill:#f06292}@keyframes heartbeat{0%,100%{transform:scale(1)}10%,30%{transform:scale(0.9)}20%,40%,50%,60%,70%,80%{transform:scale(1.1)}}.footer-icon{animation:heartbeat 1.33s ease-in-out infinite}.summary-title-link{color:var(--color-contrast-higher)}.summary{line-height:1.618;display:block}.read-more-container{text-align:center;margin-top:1.618em}.read-more-link{display:inline-block}.pagination{list-style:none;margin:5em 0 0;padding:0;display:flex;justify-content:space-between}.pagination-prev{margin-right:auto}.pagination-next{margin-left:auto;text-align:right}.fof::before{background-repeat:no-repeat;background-size:cover;background-position:50% 50%;content:" ";position:fixed;width:100%;height:100%;top:0;left:0;z-index:1}.fof .main-inner{background:rgba(0,0,0,0.25);min-height:100%;min-width:100%;position:absolute;z-index:3}.fof video{position:fixed;top:50%;left:50%;min-width:100%;min-height:100%;width:auto;height:auto;z-index:2;transform:translateX(-50%) translateY(-50%)}.fof h1{font-size:3rem;text-transform:uppercase;letter-spacing:0.3rem;text-align:center;top:15%;left:5%;right:5%;position:absolute;color:#fff;margin:0.67em 0}.fof .fof-footer{font-size:2rem;position:absolute;bottom:15%;left:10%;right:10%;text-align:center}.fof a{color:#eee}.fof a:hover{color:#fff}@media only screen and (max-device-width: 1024px){.fof #bgvid{display:none}}.fof::before{background-image:url()}.chroma{background-color:#ffffff}.chroma .err{color:#ff0000;background-color:#ffaaaa}.chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}.chroma .lntable{border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block}.chroma .hl{display:block;width:100%;background-color:#ffffcc}.chroma .lnt{margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f}.chroma .ln{margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f}.chroma .k{color:#0000aa}.chroma .kc{color:#0000aa}.chroma .kd{color:#0000aa}.chroma .kn{color:#0000aa}.chroma .kp{color:#0000aa}.chroma .kr{color:#0000aa}.chroma .kt{color:#00aaaa}.chroma .na{color:#1e90ff}.chroma .nb{color:#00aaaa}.chroma .nc{color:#00aa00}.chroma .no{color:#aa0000}.chroma .nd{color:#888888}.chroma .ni{color:#880000}.chroma .nf{color:#00aa00}.chroma .nn{color:#00aaaa}.chroma .nt{color:#1e90ff}.chroma .nv{color:#aa0000}.chroma .s{color:#aa5500}.chroma .sa{color:#aa5500}.chroma .sb{color:#aa5500}.chroma .sc{color:#aa5500}.chroma .dl{color:#aa5500}.chroma .sd{color:#aa5500}.chroma .s2{color:#aa5500}.chroma .se{color:#aa5500}.chroma .sh{color:#aa5500}.chroma .si{color:#aa5500}.chroma .sx{color:#aa5500}.chroma .sr{color:#009999}.chroma .s1{color:#aa5500}.chroma .ss{color:#0000aa}.chroma .m{color:#009999}.chroma .mb{color:#009999}.chroma .mf{color:#009999}.chroma .mh{color:#009999}.chroma .mi{color:#009999}.chroma .il{color:#009999}.chroma .mo{color:#009999}.chroma .ow{color:#0000aa}.chroma .c{color:#888888}.chroma .ch{color:#888888}.chroma .cm{color:#888888}.chroma .c1{color:#888888}.chroma .cs{color:#0000aa}.chroma .cp{color:#4c8317}.chroma .cpf{color:#4c8317}.chroma .gd{color:#aa0000}.chroma .gr{color:#aa0000}.chroma .gh{color:#000080}.chroma .gi{color:#00aa00}.chroma .go{color:#666666}.chroma .gp{color:#454545}.chroma .gu{color:#800080}.chroma .gt{color:#aa0000}.chroma .w{color:#999999}.chroma{color:var(--color-contrast-high);background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5)}.chroma-dark{color:#f8f8f2;background-color:#272822}.chroma-dark .err{color:#960050;background-color:#1e0010}.chroma-dark .lntd{vertical-align:top;padding:0;margin:0;border:0}.chroma-dark .lntable{border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block}.chroma-dark .hl{display:block;width:100%;background-color:#ffffcc}.chroma-dark .lnt{margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f}.chroma-dark .ln{margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f}.chroma-dark .k{color:#66d9ef}.chroma-dark .kc{color:#66d9ef}.chroma-dark .kd{color:#66d9ef}.chroma-dark .kn{color:#f92672}.chroma-dark .kp{color:#66d9ef}.chroma-dark .kr{color:#66d9ef}.chroma-dark .kt{color:#66d9ef}.chroma-dark .na{color:#a6e22e}.chroma-dark .nc{color:#a6e22e}.chroma-dark .no{color:#66d9ef}.chroma-dark .nd{color:#a6e22e}.chroma-dark .ne{color:#a6e22e}.chroma-dark .nf{color:#a6e22e}.chroma-dark .nx{color:#a6e22e}.chroma-dark .nt{color:#f92672}.chroma-dark .l{color:#ae81ff}.chroma-dark .ld{color:#e6db74}.chroma-dark .s{color:#e6db74}.chroma-dark .sa{color:#e6db74}.chroma-dark .sb{color:#e6db74}.chroma-dark .sc{color:#e6db74}.chroma-dark .dl{color:#e6db74}.chroma-dark .sd{color:#e6db74}.chroma-dark .s2{color:#e6db74}.chroma-dark .se{color:#ae81ff}.chroma-dark .sh{color:#e6db74}.chroma-dark .si{color:#e6db74}.chroma-dark .sx{color:#e6db74}.chroma-dark .sr{color:#e6db74}.chroma-dark .s1{color:#e6db74}.chroma-dark .ss{color:#e6db74}.chroma-dark .m{color:#ae81ff}.chroma-dark .mb{color:#ae81ff}.chroma-dark .mf{color:#ae81ff}.chroma-dark .mh{color:#ae81ff}.chroma-dark .mi{color:#ae81ff}.chroma-dark .il{color:#ae81ff}.chroma-dark .mo{color:#ae81ff}.chroma-dark .o{color:#f92672}.chroma-dark .ow{color:#f92672}.chroma-dark .c{color:#75715e}.chroma-dark .ch{color:#75715e}.chroma-dark .cm{color:#75715e}.chroma-dark .c1{color:#75715e}.chroma-dark .cs{color:#75715e}.chroma-dark .cp{color:#75715e}.chroma-dark .cpf{color:#75715e}.chroma-dark .gd{color:#f92672}.chroma-dark .gi{color:#a6e22e}.chroma-dark .gu{color:#75715e}.chroma-dark{color:var(--color-contrast-high);background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5)}@media (max-width: 740px){.main-inner{width:auto !important}.anchor-link{position:relative;transform:none;float:right}.menu{display:flex;justify-content:space-around;word-break:break-all}.menu-item{margin:0}} +:root{--color-primary:hsl(220, 90%, 56%);--color-primary-h:220;--color-primary-s:90%;--color-primary-l:56%;--color-bg:hsl(0, 0%, 100%);--color-bg-h:0;--color-bg-s:0%;--color-bg-l:100%;--color-contrast-lower:hsl(0, 0%, 95%);--color-contrast-lower-h:0;--color-contrast-lower-s:0%;--color-contrast-lower-l:95%;--color-contrast-low:hsl(240, 1%, 83%);--color-contrast-low-h:240;--color-contrast-low-s:1%;--color-contrast-low-l:83%;--color-contrast-medium:hsl(240, 1%, 48%);--color-contrast-medium-h:240;--color-contrast-medium-s:1%;--color-contrast-medium-l:48%;--color-contrast-high:hsl(240, 4%, 20%);--color-contrast-high-h:240;--color-contrast-high-s:4%;--color-contrast-high-l:20%;--color-contrast-higher:hsl(240, 8%, 12%);--color-contrast-higher-h:240;--color-contrast-higher-s:8%;--color-contrast-higher-l:12%}[data-theme="dark"]{--color-primary:hsl(201, 65%, 62%);--color-primary-h:201;--color-primary-s:65%;--color-primary-l:62%;--color-bg:hsl(240, 8%, 12%);--color-bg-h:240;--color-bg-s:8%;--color-bg-l:12%;--color-contrast-lower:hsl(240, 6%, 19%);--color-contrast-lower-h:240;--color-contrast-lower-s:6%;--color-contrast-lower-l:19%;--color-contrast-low:hsl(240, 3%, 27%);--color-contrast-low-h:240;--color-contrast-low-s:3%;--color-contrast-low-l:27%;--color-contrast-medium:hsl(240, 1%, 57%);--color-contrast-medium-h:240;--color-contrast-medium-s:1%;--color-contrast-medium-l:57%;--color-contrast-high:hsl(0, 0%, 89%);--color-contrast-high-h:0;--color-contrast-high-s:0%;--color-contrast-high-l:89%;--color-contrast-higher:hsl(0, 0%, 100%);--color-contrast-higher-h:0;--color-contrast-higher-s:0%;--color-contrast-higher-l:100%}#theme-toggle{padding:1em;cursor:pointer;float:right;position:relative;z-index:4}[data-theme="dark"] img{filter:brightness(50%)}html,body{margin:0;width:100%;height:100%}body{font-size:20px;color:var(--color-contrast-high);background-color:var(--color-bg);overflow-wrap:break-word;word-wrap:break-word;line-height:1.618}.container{min-height:100%;min-width:100%;position:relative}.main{padding:2em 1em 15em;display:block}.main-inner{margin:0 auto;display:block}.icon{width:1em;height:1em;fill:currentColor;display:inline-block}svg{vertical-align:middle}h1,h2,h3,h4,h5,h6{margin:1.618em 0 1em;color:var(--color-contrast-higher)}h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{text-decoration:none !important;color:var(--color-contrast-higher)}h1{font-size:2em}h2{font-size:1.8em}h3{font-size:1.6em}h4{font-size:1.4em}h5{font-size:1.2em}h6{font-size:1em}a{color:var(--color-contrast-high);text-decoration:none;transition:color .5s}a:hover{color:var(--color-primary)}::selection{background-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.3)}::-webkit-scrollbar{width:0.4em;height:0.2em}::-webkit-scrollbar-track{background-color:var(--color-bg)}::-webkit-scrollbar-thumb{background-color:var(--color-contrast-low)}::-webkit-scrollbar-thumb:hover{background-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5)}::-webkit-scrollbar-thumb:active{background-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.75)}[data-hide="true"]{display:none}[data-small-caps="true"] .post-body h1,[data-small-caps="true"] .post-body h2,[data-small-caps="true"] .post-body h3,[data-small-caps="true"] .post-body h4,[data-small-caps="true"] .post-body h5,[data-small-caps="true"] .post-body h6{font-variant:small-caps}[data-small-caps="true"] .contents-title{font-variant:small-caps}[data-align="justify"] .post-body p{text-align:justify;text-justify:distribute}[data-align="center"] .post-body p{text-align:center}[data-type="poetry"] .post-body{display:table;margin:0 auto}.list-title,.term-title,.list-year,.list-month,.post-title,.post-subtitle,.related-title,.post-nav,thead,dt{font-family:Comfortaa,sans-serif}.post-body h1,.post-body h2,.post-body h3,.post-body h4,.post-body h5,.post-body h6{font-family:Comfortaa,sans-serif}.contents-title{font-family:Comfortaa,sans-serif}code,pre,sup,.post-meta,.updated-badge,.post-gitinfo,.minimal-footer,.minimal-footer-about,.busuanzi-site-uv-and-pv{font-family:"Source Code Pro",monospace}body{font-family:"IBM Plex Serif",serif}.header{z-index:3;position:relative}.site-brand{text-align:center}.site-brand{background-image:linear-gradient(90deg, #f79533 0, #f37055 15%, #ef4e7b 30%, #a166ab 44%, #5073b8 58%, #1098ad 72%, #07b39b 86%, #6dba82 100%)}.brand{width:250px;height:100px;fill:#fff}.nav{z-index:3;position:relative}.menu{padding:0;margin:0;list-style:none;text-align:center;background:var(--color-contrast-lower);line-height:1.5;font-weight:500}.menu-item{display:inline-block;margin:0 1em}.menu-item a{color:var(--color-contrast-medium)}.menu-item a:hover{color:var(--color-primary)}.active a{color:var(--color-primary)}.menu-item-name{display:flex}.post-meta{color:var(--color-contrast-medium);font-size:80%;text-align:center;margin:20px 0}.post-meta a{color:var(--color-contrast-medium)}.post-meta a:hover{color:var(--color-primary)}.home .post-meta{margin:20px 0}.post-meta-item{margin:0.5em;display:inline-block}.post-meta-icon{fill:hsla(var(--color-contrast-medium-h), var(--color-contrast-medium-s), var(--color-contrast-medium-l), 0.5);margin-bottom:0.3em}.single .main-inner{width:32em}.post-title{text-align:center}.post-subtitle{font-size:1.8em;text-align:center;font-weight:700;margin-top:-0.618em}.post-description{text-align:center;margin:20px 0;font-size:90%}.post-body{margin-top:5em !important}.post-body a{text-decoration:underline}.post p{margin:0 0 1em;line-height:1.618}.post img{display:block;margin:2em auto;max-width:100%;border:1px solid var(--color-contrast-lower);clear:both}.post video{display:block;max-width:100%;margin:2em auto;clear:both}.post sup{font-size:70%;vertical-align:super}.post sup a{text-decoration:none}.post ol,.post ul{padding-left:2em;line-height:1.618}.post hr{border:none;margin:2.427em 0 1.5em;text-align:center}.post hr::after{content:"···";letter-spacing:2em;padding-left:2em}blockquote{margin:2em 0;padding:0 1em;color:var(--color-contrast-medium);border-left:3px solid var(--color-contrast-low)}blockquote p{text-align:left !important}blockquote a{color:var(--color-contrast-medium)}blockquote a:hover{color:var(--color-primary)}.emphasis-point{font-weight:normal;text-emphasis:'•';-webkit-text-emphasis:'•';-moz-text-emphasis:'•';text-emphasis-position:under;-webkit-text-emphasis-position:under;-moz-text-emphasis-position:under}.drop-cap{float:left;font-size:62px;margin-right:12.36px;margin-top:10px;line-height:32.36px}.caption{display:block;text-align:center;margin:-1em 0 0;font-size:90%;color:var(--color-contrast-medium)}.contents{margin-top:5em}.contents ol{list-style:none;counter-reset:item}.contents ol li::before{content:counters(item, ".") ". ";counter-increment:item}ol.toc{padding:0;overflow:auto hidden;white-space:nowrap}.footnotes{font-size:90%;margin-top:100px}.footnotes hr{margin:0;height:1px;border:none;background-color:var(--color-contrast-medium)}.footnotes hr::after{content:none}.footnotes ol{margin:32.36px 0 0;padding:0 20px 0 40px}.anchor-link{position:absolute;transform:translate(-150%)}.anchor-icon{width:0.75em;height:0.75em;vertical-align:baseline}table{width:100%;border-collapse:collapse;border-spacing:0;border:1px solid var(--color-contrast-lower);margin:2em 0}thead{font-weight:700}th,td{font-size:0.9em;padding:0.4em;border:1px solid var(--color-contrast-lower)}table>tbody>tr:nth-of-type(odd){background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5)}table>tbody>tr:hover{background-color:var(--color-contrast-lower)}dt{font-weight:700}dd{margin-left:2em;text-align:left}code{padding:2.5px 5px;background-color:var(--color-contrast-lower);border-radius:3px;font-size:80%}pre{overflow:auto hidden;font-size:16px;margin:40px 0;padding:1em;line-height:1.618;background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.75)}pre code{background-color:unset;font-size:inherit;padding:0}.highlight{font-size:0.8em;margin:40px 0}.highlight pre{margin:0 !important;overflow:auto hidden;background-color:unset}.highlight th,.highlight td{font-size:inherit}.highlight table>tbody>tr:nth-of-type(odd){background-color:inherit}.highlight table>tbody>tr:hover{background-color:inherit}span.lnt{user-select:none;display:block;margin-right:-1em !important;padding:0 !important}.katex-display,mjx-container[jax="CHTML"][display="true"]{overflow:auto hidden;text-indent:0}:root{--anchor-opacity: 0}.anchor-link{opacity:var(--anchor-opacity);transition:all .25s}.post h1:hover,.post h2:hover,.post h3:hover,.post h4:hover,.post h5:hover,.post h6:hover,.post .anchor-link:hover{--anchor-opacity: 1}.footnote-icon{fill:hsla(var(--color-contrast-high-h), var(--color-contrast-high-s), var(--color-contrast-high-l), 0.5);transition:fill .5s}.footnote-icon:hover{fill:var(--color-primary)}[data-indent="true"] .contents-title{text-align:center}[data-indent="true"] .post-body p{text-indent:2em;margin:0}[data-indent="true"] .post-body .caption{text-indent:0;margin:0 0 1em}[data-indent="true"] .post-body blockquote{margin:1em 0;padding:0;border:none}[data-indent="true"] .post-body img,[data-indent="true"] .post-body video{margin:1em auto}[data-indent="true"] .post-body table{margin:1em 0}[data-indent="true"] .post-body pre,[data-indent="true"] .post-body .highlight{margin:20px 0}[data-indent="true"] .post-body h1,[data-indent="true"] .post-body h2,[data-indent="true"] .post-body h3,[data-indent="true"] .post-body h4,[data-indent="true"] .post-body h5,[data-indent="true"] .post-body h6{text-align:center}[data-indent="true"] .post-body .anchor-link{position:relative;transform:none;display:block;float:none}[data-indent="true"] .post-body ol,[data-indent="true"] .post-body ul{margin:0;list-style-position:inside}[data-indent="true"] .post-body ol p,[data-indent="true"] .post-body ul p{text-indent:0;display:inline-block}[data-indent="true"] .post-body .footnotes ol{margin:32.36px 0 0;list-style-position:outside}[data-indent="true"] .post-body dl{text-indent:2em}[data-indent="true"] .post-body dl dd{text-indent:0;margin-left:4em}[data-indent="true"] .post-body dl p{text-indent:0}.post-copyright{margin:0;list-style:none;margin-top:5em;padding:0.5em 1em;background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5);border-left:3px solid hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5);line-height:2}.copyright-item{line-height:1.5;margin:0.5em 0}.updated-badge-container{margin-top:5em;text-align:center}.updated-badge-left{fill:var(--color-contrast-low)}.updated-badge-right{fill:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5)}.related-posts{text-align:left;border:1px solid var(--color-contrast-lower);padding:0.6em 1em;line-height:2em;margin-top:5em}.related-title{font-size:1em;margin:0}.related-icon{float:right;margin-top:0.4em}.related-list{margin:0;padding:0;list-style:none}.related-link{line-height:1.5;display:inline-block}.post-tags{margin-top:100px;text-align:center;font-size:90%}.post-tags-link{color:hsla(var(--color-contrast-medium-h), var(--color-contrast-medium-s), var(--color-contrast-medium-l), 0.9);margin:0 0.5em;line-height:2;display:inline-block}.tag-icon{margin-right:0.3em;font-size:80%}.post-nav{list-style:none;padding:0;display:flex;justify-content:space-between;border-top:1px solid var(--color-contrast-lower);font-weight:700;margin-top:5em;padding-top:0.618em}.post-nav-prev{margin-right:auto;max-width:42%}.post-nav-next{margin-left:auto;text-align:right;max-width:42%}.list .main-inner{width:30em}.list-title{text-align:center}.list ul{list-style:none;padding:0}.list-item{line-height:2;position:relative;transition:border .5s;border-bottom:1px dashed var(--color-contrast-low);margin-top:1em;padding-bottom:0.5em;display:flex;align-items:baseline}.list-item:hover{border-bottom-color:var(--color-primary)}.list-item:hover ::before{background:var(--color-primary)}.list-item ::before{content:" ";position:absolute;left:0.618em;top:0.618em;width:6.66666667px;height:6.66666667px;background:var(--color-contrast-low);border-radius:50%;border:1px solid var(--color-bg);transition:background .5s;font-size:20px}.list-item-title{margin:0 0.618em 0 2em;font-size:1.2em;line-height:1.5}.list-item-time{margin:0 0.618em 0 2em;color:var(--color-contrast-medium);line-height:1.5}.list-year{display:flex;justify-content:space-between;align-items:baseline}.term-count{color:var(--color-contrast-medium);font-size:0.7em}.tree{margin-left:-2em;overflow:auto hidden;white-space:nowrap}.category-item{color:blue;font-size:1.2em}.category-item:hover{color:blueviolet}.category-count{color:var(--color-contrast-medium)}.tag-cloud{text-align:center}.tag-cloud-item{margin:10px;display:inline-block}.list-item-title{flex:1}.list-item-time{text-align:right;margin-left:1em}.back-to-top{position:fixed;right:0;z-index:1}.back-to-top a{display:block;padding:1em;color:var(--color-contrast-medium)}.back-to-top a:hover{color:var(--color-primary)}.back-to-top{bottom:-5em;transition:bottom 0.3s ease-in-out}.back-to-top.show{bottom:0}.footer{position:absolute;bottom:0;width:100%;font-size:90%;color:var(--color-contrast-medium)}.footer a{color:var(--color-contrast-medium)}.footer a:hover{color:var(--color-primary)}.footer-inner{padding:1em;text-align:center}.footer-icon{margin:0 0.25em 0.3em}.footer-icon{fill:#f06292}@keyframes heartbeat{0%,100%{transform:scale(1)}10%,30%{transform:scale(0.9)}20%,40%,50%,60%,70%,80%{transform:scale(1.1)}}.footer-icon{animation:heartbeat 1.33s ease-in-out infinite}.summary-title-link{color:var(--color-contrast-higher)}.summary{line-height:1.618;display:block}.read-more-container{text-align:center;margin-top:1.618em}.read-more-link{display:inline-block}.pagination{list-style:none;margin:5em 0 0;padding:0;display:flex;justify-content:space-between}.pagination-prev{margin-right:auto}.pagination-next{margin-left:auto;text-align:right}.fof::before{background-repeat:no-repeat;background-size:cover;background-position:50% 50%;content:" ";position:fixed;width:100%;height:100%;top:0;left:0;z-index:1}.fof .main-inner{background:rgba(0,0,0,0.25);min-height:100%;min-width:100%;position:absolute;z-index:3}.fof video{position:fixed;top:50%;left:50%;min-width:100%;min-height:100%;width:auto;height:auto;z-index:2;transform:translateX(-50%) translateY(-50%)}.fof h1{font-size:3rem;text-transform:uppercase;letter-spacing:0.3rem;text-align:center;top:15%;left:5%;right:5%;position:absolute;color:#fff;margin:0.67em 0}.fof .fof-footer{font-size:2rem;position:absolute;bottom:15%;left:10%;right:10%;text-align:center}.fof a{color:#eee}.fof a:hover{color:#fff}@media only screen and (max-device-width: 1024px){.fof #bgvid{display:none}}.fof::before{background-image:url()}.chroma{background-color:#ffffff}.chroma .err{color:#ff0000;background-color:#ffaaaa}.chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}.chroma .lntable{border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block}.chroma .hl{display:block;width:100%;background-color:#ffffcc}.chroma .lnt{margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f}.chroma .ln{margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f}.chroma .k{color:#0000aa}.chroma .kc{color:#0000aa}.chroma .kd{color:#0000aa}.chroma .kn{color:#0000aa}.chroma .kp{color:#0000aa}.chroma .kr{color:#0000aa}.chroma .kt{color:#00aaaa}.chroma .na{color:#1e90ff}.chroma .nb{color:#00aaaa}.chroma .nc{color:#00aa00}.chroma .no{color:#aa0000}.chroma .nd{color:#888888}.chroma .ni{color:#880000}.chroma .nf{color:#00aa00}.chroma .nn{color:#00aaaa}.chroma .nt{color:#1e90ff}.chroma .nv{color:#aa0000}.chroma .s{color:#aa5500}.chroma .sa{color:#aa5500}.chroma .sb{color:#aa5500}.chroma .sc{color:#aa5500}.chroma .dl{color:#aa5500}.chroma .sd{color:#aa5500}.chroma .s2{color:#aa5500}.chroma .se{color:#aa5500}.chroma .sh{color:#aa5500}.chroma .si{color:#aa5500}.chroma .sx{color:#aa5500}.chroma .sr{color:#009999}.chroma .s1{color:#aa5500}.chroma .ss{color:#0000aa}.chroma .m{color:#009999}.chroma .mb{color:#009999}.chroma .mf{color:#009999}.chroma .mh{color:#009999}.chroma .mi{color:#009999}.chroma .il{color:#009999}.chroma .mo{color:#009999}.chroma .ow{color:#0000aa}.chroma .c{color:#888888}.chroma .ch{color:#888888}.chroma .cm{color:#888888}.chroma .c1{color:#888888}.chroma .cs{color:#0000aa}.chroma .cp{color:#4c8317}.chroma .cpf{color:#4c8317}.chroma .gd{color:#aa0000}.chroma .gr{color:#aa0000}.chroma .gh{color:#000080}.chroma .gi{color:#00aa00}.chroma .go{color:#666666}.chroma .gp{color:#454545}.chroma .gu{color:#800080}.chroma .gt{color:#aa0000}.chroma .w{color:#999999}.chroma{color:var(--color-contrast-high);background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5)}.chroma-dark{color:#f8f8f2;background-color:#272822}.chroma-dark .err{color:#960050;background-color:#1e0010}.chroma-dark .lntd{vertical-align:top;padding:0;margin:0;border:0}.chroma-dark .lntable{border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block}.chroma-dark .hl{display:block;width:100%;background-color:#ffffcc}.chroma-dark .lnt{margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f}.chroma-dark .ln{margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f}.chroma-dark .k{color:#66d9ef}.chroma-dark .kc{color:#66d9ef}.chroma-dark .kd{color:#66d9ef}.chroma-dark .kn{color:#f92672}.chroma-dark .kp{color:#66d9ef}.chroma-dark .kr{color:#66d9ef}.chroma-dark .kt{color:#66d9ef}.chroma-dark .na{color:#a6e22e}.chroma-dark .nc{color:#a6e22e}.chroma-dark .no{color:#66d9ef}.chroma-dark .nd{color:#a6e22e}.chroma-dark .ne{color:#a6e22e}.chroma-dark .nf{color:#a6e22e}.chroma-dark .nx{color:#a6e22e}.chroma-dark .nt{color:#f92672}.chroma-dark .l{color:#ae81ff}.chroma-dark .ld{color:#e6db74}.chroma-dark .s{color:#e6db74}.chroma-dark .sa{color:#e6db74}.chroma-dark .sb{color:#e6db74}.chroma-dark .sc{color:#e6db74}.chroma-dark .dl{color:#e6db74}.chroma-dark .sd{color:#e6db74}.chroma-dark .s2{color:#e6db74}.chroma-dark .se{color:#ae81ff}.chroma-dark .sh{color:#e6db74}.chroma-dark .si{color:#e6db74}.chroma-dark .sx{color:#e6db74}.chroma-dark .sr{color:#e6db74}.chroma-dark .s1{color:#e6db74}.chroma-dark .ss{color:#e6db74}.chroma-dark .m{color:#ae81ff}.chroma-dark .mb{color:#ae81ff}.chroma-dark .mf{color:#ae81ff}.chroma-dark .mh{color:#ae81ff}.chroma-dark .mi{color:#ae81ff}.chroma-dark .il{color:#ae81ff}.chroma-dark .mo{color:#ae81ff}.chroma-dark .o{color:#f92672}.chroma-dark .ow{color:#f92672}.chroma-dark .c{color:#75715e}.chroma-dark .ch{color:#75715e}.chroma-dark .cm{color:#75715e}.chroma-dark .c1{color:#75715e}.chroma-dark .cs{color:#75715e}.chroma-dark .cp{color:#75715e}.chroma-dark .cpf{color:#75715e}.chroma-dark .gd{color:#f92672}.chroma-dark .gi{color:#a6e22e}.chroma-dark .gu{color:#75715e}.chroma-dark{color:var(--color-contrast-high);background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5)}@media (max-width: 740px){.main-inner{width:auto !important}.anchor-link{position:relative;transform:none;float:right}.menu{display:flex;justify-content:space-around;word-break:break-all}.menu-item{margin:0}} diff --git a/exampleSite/resources/_gen/assets/scss/scss/main.scss_b04c21e44835e7dcdc8cb03d103b5ef1.json b/exampleSite/resources/_gen/assets/scss/scss/main.scss_b04c21e44835e7dcdc8cb03d103b5ef1.json index 7ab9044..f00dbc3 100644 --- a/exampleSite/resources/_gen/assets/scss/scss/main.scss_b04c21e44835e7dcdc8cb03d103b5ef1.json +++ b/exampleSite/resources/_gen/assets/scss/scss/main.scss_b04c21e44835e7dcdc8cb03d103b5ef1.json @@ -1 +1 @@ -{"Target":"css/meme.min.6d3c21d9e26feb664656273dcabec98fd69d798917e8a1badb2d70b7cf5c9dfb.css","MediaType":"text/css","Data":{"Integrity":"sha256-bTwh2eJv62ZGVic9yr7Jj9adeYkX6KG62y1wt89cnfs="}}
\ No newline at end of file +{"Target":"css/meme.min.46b2a650b7c9df1e9a4c1f4bbdb37e988a26d2f08cc6ebc293c348fe3b595a8e.css","MediaType":"text/css","Data":{"Integrity":"sha256-RrKmULfJ3x6aTB9LvbN+mIom0vCMxuvCk8NI/jtZWo4="}}
\ No newline at end of file diff --git a/layouts/partials/components/content.html b/layouts/partials/components/content.html index df955fc..797745c 100644 --- a/layouts/partials/components/content.html +++ b/layouts/partials/components/content.html @@ -210,6 +210,15 @@ {{- end -}} {{- end -}} +<!-- Medium Zoom --> +{{- $Content := .Scratch.Get "Content" -}} +{{- if .Site.Params.enableMediumZoom -}} + {{- $regexPatternMediumZoom := `(<img)(.+)( />)` -}} + {{- $regexReplacementMediumZoom := `$1$2 data-zoomable$3` -}} + {{- $Content := $Content | replaceRE $regexPatternMediumZoom $regexReplacementMediumZoom | safeHTML -}} + {{- .Scratch.Set "Content" $Content -}} +{{- end -}} + <!-- Custom --> {{- partial "custom/content.html" . -}} diff --git a/layouts/partials/script.html b/layouts/partials/script.html index 8fb8982..a1862cb 100644 --- a/layouts/partials/script.html +++ b/layouts/partials/script.html @@ -70,6 +70,10 @@ {{ end }} {{ end }} +{{ if .Site.Params.enableMediumZoom }} + {{ partial "third-party/medium-zoom.html" . }} +{{ end }} + {{ partial "third-party/service-worker.html" . }} {{ partial "third-party/busuanzi.html" . }} diff --git a/layouts/partials/third-party/medium-zoom.html b/layouts/partials/third-party/medium-zoom.html new file mode 100644 index 0000000..3277dc0 --- /dev/null +++ b/layouts/partials/third-party/medium-zoom.html @@ -0,0 +1,7 @@ +<script src="https://cdn.jsdelivr.net/npm/medium-zoom@latest/dist/medium-zoom.min.js"></script> + +<script> + mediumZoom('[data-zoomable]', { + background: 'hsla(var(--color-bg-h), var(--color-bg-s), var(--color-bg-l), 0.95)' + }) +</script>
\ No newline at end of file |