├── .gitignore ├── LICENSE ├── README.md ├── archetypes └── default.md ├── assets ├── scss │ ├── 404 │ │ └── index.scss │ ├── _base │ │ ├── index.scss │ │ ├── mixin.scss │ │ ├── reset.scss │ │ ├── theme.scss │ │ └── var.scss │ └── index │ │ ├── card.scss │ │ ├── footer.scss │ │ ├── header.scss │ │ ├── index.scss │ │ ├── markdown.scss │ │ ├── page.scss │ │ ├── pagination.scss │ │ ├── single.scss │ │ └── widget.scss └── ts │ ├── 404.ts │ └── main.ts ├── exampleSite ├── config.toml └── resources │ └── _gen │ └── assets │ └── scss │ └── scss │ ├── 404 │ ├── index.scss_b98b5e972f5f195c32bfc8ba6d50ffcd.content │ └── index.scss_b98b5e972f5f195c32bfc8ba6d50ffcd.json │ └── index │ ├── index.scss_f89e1ab8e79fb5b4e88c8331b38c808f.content │ └── index.scss_f89e1ab8e79fb5b4e88c8331b38c808f.json ├── i18n ├── en.yml ├── ja.yml ├── zh-CN.yml └── zh-TW.yml ├── images ├── screenshot.png └── tn.png ├── layouts ├── 404.html ├── _default │ ├── _markup │ │ ├── render-image.html │ │ └── render-link.html │ ├── baseof.html │ ├── list.html │ ├── single-baseof.html │ ├── single.html │ ├── term.html │ └── terms.html ├── index.html ├── page │ ├── link.html │ ├── message.html │ └── single.html ├── partials │ ├── card │ │ ├── card-article.html │ │ ├── card-banner.html │ │ ├── card-childer.html │ │ ├── card-cover.html │ │ └── card-paging.html │ ├── disqus.html │ ├── footer-script.html │ ├── footer-single.html │ ├── footer.html │ ├── head.html │ ├── header.html │ ├── pagination.html │ └── widget │ │ ├── widget-articles.html │ │ ├── widget-author.html │ │ ├── widget-categories.html │ │ ├── widget-tags.html │ │ └── widget-toc.html ├── rss.xml ├── section │ └── section.html └── shortcodes │ ├── aplayer.html │ ├── dplayer.html │ └── youtube.html ├── static ├── .DS_Store └── image │ ├── .DS_Store │ └── 404.png └── theme.toml /.gitignore: -------------------------------------------------------------------------------- 1 | # OS 2 | .DS_Store 3 | Thumbs.db 4 | 5 | # IDEs 6 | .buildpath 7 | .project 8 | .settings/ 9 | .build/ 10 | .idea/ 11 | public/ 12 | nbproject/ 13 | 14 | # Vagrant 15 | .vagrant/ 16 | 17 | # FE Setup 18 | .bin/node_modules/ 19 | /node_modules/ 20 | src/node_modules/ 21 | exampleSite/node_modules/ 22 | src/npm-debug.log.* 23 | npm-debug.log 24 | /npm-debug.log* 25 | /dist/ 26 | /src/client.config.json 27 | /styleguide/ 28 | /docs/ 29 | 30 | /junit.xml 31 | partials/structure/stylesheet.html 32 | 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Sola 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # kagome 一个卡片类拟态风格的Hugo主题 2 | 3 | ![Kagome](images/screenshot.png) 4 | 5 | ### Why is Kagome? 6 | 7 | 因为在开发这个主题的期间,一直在重温`犬夜叉`,真的很喜欢里面女主`日暮戈薇`,所以这里用了她的名字`kagome`~~ 8 | 9 | 而站点域名则使用了`桔梗`的名字`kikyo` ~~我全都要~~ 10 | 11 | ### Example Site 12 | 13 | **[Example Site](https://kagome-example-site.vercel.app/)** | **[DEMO](https://kikyo.cc)** 14 | 15 | ### Document 16 | 17 | doc list: [docs](https://kikyo.cc/posts/) 18 | 19 | - [config.toml相关配置](https://kikyo.cc/posts/202106091132/) 20 | 21 | - [Front Matter 相关参数说明](https://kikyo.cc/posts/202106180929/) 22 | 23 | - [插入公式,图片与Widget目录显示](https://kikyo.cc/posts/202105251659/) 24 | 25 | - [播放音频与视频,shortcode使用说明](https://kikyo.cc/posts/202105261132/) 26 | 27 | - [i18n多语言配置](https://kikyo.cc/posts/202106221751/) 28 | 29 | - [如何丰富Banner信息](https://kikyo.cc/posts/202106230952/) 30 | 31 | ### Install 32 | 33 | #### 下载`kagome` 34 | 35 | 从GitHub下载主题并将其添加到网站目录: themes 36 | 37 | 进入你的网站目录并执行以下代码: 38 | 39 | ``` 40 | git clone https://github.com/miiiku/hugo-theme-kagome.git ./themes/kagome 41 | ``` 42 | 43 | 或者你也可以将此存储库作为[Git - 子模块](https://git-scm.com/book/de/v2/Git-Tools-Submodule),这样将更容易获取这个主题的更新 44 | 45 | ``` 46 | git submodule add https://github.com/miiiku/hugo-theme-kagome.git ./themes/kagome 47 | ``` 48 | 49 | 如果你不是`git`用户也可以从[https://github.com/miiiku/hugo-theme-kagome/archive/refs/heads/main.zip](https://github.com/miiiku/hugo-theme-kagome/archive/refs/heads/main.zip)下载压缩包解压到你的网站目录下的`theme`文件夹下并重命名`hugo-theme-kagome-main`为`kagome`。 50 | 51 | #### 应用当前主题为`kagome` 52 | 53 | ```base 54 | echo theme = \"kagome\" >> config.toml 55 | ``` 56 | 57 | 或者手动编辑`config.toml`文件找到**theme**并设置值为`kagome` 58 | -------------------------------------------------------------------------------- /archetypes/default.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | date: {{ .Date }} 4 | draft: true 5 | cover: 6 | --- 7 | -------------------------------------------------------------------------------- /assets/scss/404/index.scss: -------------------------------------------------------------------------------- 1 | @import '../_base/index.scss'; 2 | 3 | .container { 4 | display: flex; 5 | flex-direction: column; 6 | align-items: center; 7 | justify-content: center; 8 | width: 100vw; 9 | height: 100vh; 10 | background-color: var(--theme-bg-primary); 11 | } 12 | 13 | .bg-text { 14 | position: relative; 15 | text-align: center; 16 | font-family: 'Big Shoulders Stencil Display', cursive; 17 | font-size: 180px; 18 | color: var(--theme-text-primary); 19 | letter-spacing: 24px; 20 | user-select: none; 21 | 22 | .text { 23 | @include soft-text; 24 | } 25 | 26 | .bg { 27 | display: block; 28 | width: 100%; 29 | height: 100%; 30 | top: 0; 31 | left: 0; 32 | position: absolute; 33 | -webkit-background-clip: text; 34 | background-clip: text; 35 | -webkit-text-fill-color: transparent; 36 | background-image: url('/image/404.png'); 37 | background-size: 150%; 38 | background-repeat: no-repeat; 39 | background-position: attr(x, y); 40 | } 41 | } 42 | 43 | .btn-box { 44 | margin: 20px 0; 45 | 46 | a { 47 | margin: 10px; 48 | padding: 6px 12px; 49 | display: inline-flex; 50 | align-items: center; 51 | color: var(--theme-text-primary); 52 | transition: transitions((background-color, box-shadow)); 53 | 54 | svg { 55 | width: 32px; 56 | height: 32px; 57 | margin-right: 6px; 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /assets/scss/_base/index.scss: -------------------------------------------------------------------------------- 1 | @import './var.scss'; 2 | @import './theme.scss'; 3 | @import './reset.scss'; 4 | @import './mixin.scss'; 5 | 6 | 7 | body { 8 | background-color: var(--theme-bg-primary); 9 | transition: transitions(background-color, 0.3s); 10 | } 11 | 12 | .text-ellipsis { 13 | overflow: hidden; 14 | text-overflow: ellipsis; 15 | white-space: nowrap; 16 | } 17 | 18 | .center-bg { 19 | background-repeat: no-repeat; 20 | background-position: center; 21 | background-size: cover; 22 | } 23 | 24 | .layout-padding { 25 | padding: var(--layout-padding-x); 26 | } 27 | 28 | .layout-margin { 29 | margin: var(--layout-padding-x); 30 | } 31 | 32 | .layout-block { 33 | width: 100%; 34 | max-width: var(--layout-max-width); 35 | margin-left: auto; 36 | margin-right: auto; 37 | } 38 | 39 | .content-padding-large { 40 | padding: var(--content-large-padding); 41 | } 42 | 43 | .content-padding-primary { 44 | padding: var(--content-primary-padding); 45 | } 46 | 47 | [class*=soft-size--] { 48 | &.soft-size--large { 49 | --radius: var(--soft-large-radius); 50 | } 51 | 52 | &.soft-size--primary { 53 | --radius: var(--soft-primary-radius); 54 | } 55 | 56 | &.soft-size--small { 57 | --radius: var(--soft-small-radius); 58 | } 59 | 60 | &.soft-size--round { 61 | --radius: 50%; 62 | } 63 | } 64 | 65 | [class*=soft-style--] { 66 | transition: transitions((border-radius, box-shadow, background-image)); 67 | 68 | &.soft-style--box { 69 | @include soft-box(var(--radius)); 70 | } 71 | 72 | &.soft-style--hover:hover { 73 | @include soft-box(var(--radius)); 74 | } 75 | 76 | &.soft-style--active:active { 77 | @include soft-box--active(var(--radius)); 78 | } 79 | } -------------------------------------------------------------------------------- /assets/scss/_base/mixin.scss: -------------------------------------------------------------------------------- 1 | @mixin mq-pc { 2 | @media #{$mq-pc} { 3 | @content; 4 | } 5 | }; 6 | 7 | @mixin mq-mb { 8 | @media #{$mq-mb} { 9 | @content; 10 | } 11 | }; 12 | 13 | @mixin soft-text () { 14 | color: var(--theme-text-primary); 15 | text-shadow: 16 | 2px 2px 4px var(--theme-bg-shadow), 17 | -2px -2px 4px var(--theme-bg-high); 18 | }; 19 | 20 | @mixin soft-box ($radius) { 21 | overflow: hidden; 22 | border-radius: $radius; 23 | background-color: var(--theme-bg-primary); 24 | box-shadow: 25 | var(--soft-shadow) var(--soft-shadow) calc(var(--soft-shadow) * 2) var(--theme-bg-shadow), 26 | calc(-1 * var(--soft-shadow)) calc(-1 * var(--soft-shadow)) calc(var(--soft-shadow) * 2) var(--theme-bg-high); 27 | }; 28 | 29 | @mixin soft-box--active ($radius) { 30 | overflow: hidden; 31 | border-radius: $radius; 32 | background-color: var(--theme-bg-primary); 33 | background-image: linear-gradient(145deg, var(--theme-text-active1), var(--theme-text-active2)); 34 | box-shadow: 35 | inset var(--soft-shadow) var(--soft-shadow) calc(var(--soft-shadow) * 2) var(--theme-bg-shadow), 36 | inset calc(-1 * var(--soft-shadow)) calc(-1 * var(--soft-shadow)) calc(var(--soft-shadow) * 2) var(--theme-bg-high); 37 | } 38 | 39 | @function transitions ($attribute, $duration: 0.3s) { 40 | $return: null; 41 | @each $var in $attribute { 42 | $return: $return , #{$var} #{$duration} ease-out 43 | } 44 | @return $return 45 | }; -------------------------------------------------------------------------------- /assets/scss/_base/reset.scss: -------------------------------------------------------------------------------- 1 | html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, 2 | abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, 3 | s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, 4 | li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, 5 | article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, 6 | menu, nav, output, ruby, section, summary, time, mark, audio, video { 7 | margin: 0; 8 | padding: 0; 9 | border: 0; 10 | vertical-align: baseline; 11 | font-size: 100%; 12 | } 13 | 14 | html { 15 | box-sizing: border-box; 16 | font: var(--base-font); 17 | -ms-text-size-adjust: 100%; 18 | -webkit-text-size-adjust: 100%; 19 | } 20 | 21 | body { 22 | font-size: 14px; 23 | line-height: 1; 24 | } 25 | 26 | *, *:before, *:after { 27 | box-sizing: inherit; 28 | } 29 | 30 | ol, ul { 31 | list-style: none; 32 | } 33 | 34 | blockquote, q { 35 | quotes: none; 36 | } 37 | 38 | blockquote:before, blockquote:after, q:before, q:after { 39 | content: ""; 40 | content: none; 41 | } 42 | 43 | table { 44 | border-spacing: 0; 45 | border-collapse: collapse; 46 | } 47 | 48 | img { 49 | max-width: 100%; 50 | } 51 | 52 | a { 53 | background-color: transparent; 54 | text-decoration: none; 55 | color: inherit; 56 | } 57 | 58 | a:active, a:hover { 59 | outline: 0; 60 | } 61 | 62 | b, strong { 63 | font-weight: bold; 64 | } 65 | 66 | i, em, dfn { 67 | font-style: italic; 68 | } -------------------------------------------------------------------------------- /assets/scss/_base/theme.scss: -------------------------------------------------------------------------------- 1 | /** light theme */ 2 | $light-bg-primary: #f5f8fa; 3 | $light-bg-high: #ffffff; 4 | $light-bg-shadow: #dddfe1; 5 | $light-bg-active1: #dddfe1; 6 | $light-bg-active2: #ffffff; 7 | 8 | $light-text-active: #f857a6; 9 | $light-text-light: #ffffff; 10 | $light-text-primary: #3e3e5f; 11 | $light-text-low: #aeacb1; 12 | $light-text-stress: #14281D; 13 | 14 | $light-border-primary: #e1e4e8; 15 | $light-border-secondary: #ebedef; 16 | 17 | 18 | /** dark theme */ 19 | $dark-bg-primary: #1e2428; 20 | $dark-bg-high: #303a40; 21 | $dark-bg-shadow: #0c0e10; 22 | $dark-bg-active1: #1b2024; 23 | $dark-bg-active2: #20272b; 24 | 25 | $dark-text-active: #ca5388; 26 | $dark-text-light: #d7dfe6; 27 | $dark-text-primary: #adbac7; 28 | $dark-text-low: #444c56; 29 | $dark-text-stress: #cdd9e5; 30 | 31 | $dark-border-primary: #444c56; 32 | $dark-border-secondary: #373e47; 33 | 34 | :root.theme-light { 35 | --theme-bg-primary: #{$light-bg-primary}; 36 | --theme-bg-high: #{$light-bg-high}; 37 | --theme-bg-shadow: #{$light-bg-shadow}; 38 | --theme-bg-actvie1: #{$light-bg-active1}; 39 | --theme-bg-actvie2: #{$light-bg-active2}; 40 | 41 | --theme-text-active: #{$light-text-active}; 42 | --theme-text-light: #{$light-text-light}; 43 | --theme-text-primary: #{$light-text-primary}; 44 | --theme-text-low: #{$light-text-low}; 45 | --theme-text-stress: #{$light-text-stress}; 46 | 47 | --theme-border-primary: #{$light-border-primary}; 48 | --theme-border-secondary: #{$light-border-secondary}; 49 | } 50 | 51 | :root.theme-dark { 52 | --theme-bg-primary: #{$dark-bg-primary}; 53 | --theme-bg-high: #{$dark-bg-high}; 54 | --theme-bg-shadow: #{$dark-bg-shadow}; 55 | --theme-bg-actvie1: #{$dark-bg-active1}; 56 | --theme-bg-actvie2: #{$dark-bg-active2}; 57 | 58 | --theme-text-active: #{$dark-text-active}; 59 | --theme-text-light: #{$dark-text-light}; 60 | --theme-text-primary: #{$dark-text-primary}; 61 | --theme-text-low: #{$dark-text-low}; 62 | --theme-text-stress: #{$dark-text-stress}; 63 | 64 | --theme-border-primary: #{$dark-border-primary}; 65 | --theme-border-secondary: #{$dark-border-secondary}; 66 | } 67 | 68 | @media (prefers-color-scheme: light) { 69 | :root { 70 | --theme-bg-primary: #{$light-bg-primary}; 71 | --theme-bg-high: #{$light-bg-high}; 72 | --theme-bg-shadow: #{$light-bg-shadow}; 73 | --theme-bg-actvie1: #{$light-bg-active1}; 74 | --theme-bg-actvie2: #{$light-bg-active2}; 75 | 76 | --theme-text-active: #{$light-text-active}; 77 | --theme-text-light: #{$light-text-light}; 78 | --theme-text-primary: #{$light-text-primary}; 79 | --theme-text-low: #{$light-text-low}; 80 | --theme-text-stress: #{$light-text-stress}; 81 | 82 | --theme-border-primary: #{$light-border-primary}; 83 | --theme-border-secondary: #{$light-border-secondary}; 84 | } 85 | } 86 | 87 | @media (prefers-color-scheme: dark) { 88 | :root { 89 | --theme-bg-primary: #{$dark-bg-primary}; 90 | --theme-bg-high: #{$dark-bg-high}; 91 | --theme-bg-shadow: #{$dark-bg-shadow}; 92 | --theme-bg-actvie1: #{$dark-bg-active1}; 93 | --theme-bg-actvie2: #{$dark-bg-active2}; 94 | 95 | --theme-text-active: #{$dark-text-active}; 96 | --theme-text-light: #{$dark-text-light}; 97 | --theme-text-primary: #{$dark-text-primary}; 98 | --theme-text-low: #{$dark-text-low}; 99 | --theme-text-stress: #{$dark-text-stress}; 100 | 101 | --theme-border-primary: #{$dark-border-primary}; 102 | --theme-border-secondary: #{$dark-border-secondary}; 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /assets/scss/_base/var.scss: -------------------------------------------------------------------------------- 1 | $mq-pc: "screen and (min-width: 768px)"; 2 | $mq-mb: "screen and (max-width: 767px)"; 3 | 4 | :root { 5 | --layout-max-width: 1200px; 6 | --base-font: var(--font-base-size) / var(--font-base-lh) 'Open Sans', sans-serif; 7 | // 全局统一soft UI阴影 3px 8 | --soft-shadow: 3px; 9 | } 10 | 11 | @media #{$mq-pc} { 12 | :root { 13 | --layout-max-width: 1200px; 14 | --layout-padding-x: 20px; 15 | --font-large-size: 46px; 16 | --font-stress-size: 22px; 17 | --font-common-size: 16px; 18 | --font-base-size: 14px; 19 | --font-base-lh: 1.8; 20 | 21 | // 导航栏,文章卡片,右侧widget 22 | --content-large-padding: 40px 38px 46px; 23 | // 标签term,子内容children,上下一篇article-nav,友链link 24 | --content-primary-padding: 23px; 25 | 26 | // 导航栏,文章卡片,右侧widget 27 | --soft-large-radius: 24px; 28 | // social社交图标 返回顶部按钮 404按钮 标签term 子内容children,上下一篇article-nav,友链link 29 | --soft-primary-radius: 12px; 30 | // soft类文字 如导航栏,分页按钮,右侧widget term,文章内容中img,aplery,dplayer等 31 | --soft-small-radius: 6px; 32 | } 33 | } 34 | 35 | @media #{$mq-mb} { 36 | :root { 37 | --layout-max-width: 100%; 38 | --layout-padding-x: 10px; 39 | --font-large-size: 22px; 40 | --font-stress-size: 18px; 41 | --font-common-size: 14px; 42 | --font-base-size: 12px; 43 | --font-base-lh: 1.4; 44 | 45 | // 导航栏,文章卡片,右侧widget 46 | --content-large-padding: 18px 15px 20px; 47 | // 标签term,子内容children,上下一篇article-nav,友链link 48 | --content-primary-padding: 16px; 49 | 50 | // 导航栏,文章卡片,右侧widget 51 | --soft-large-radius: 16px; 52 | // social社交图标 返回顶部按钮 404按钮 标签term 子内容children,上下一篇article-nav,友链link 53 | --soft-primary-radius: 10px; 54 | // soft类文字 如导航栏,分页按钮,右侧widget term,文章内容中img,aplery,dplayer等 55 | --soft-small-radius: 6px; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /assets/scss/index/card.scss: -------------------------------------------------------------------------------- 1 | /** card common style */ 2 | .card-container { 3 | position: relative; 4 | 5 | &.img { 6 | padding: 0; 7 | 8 | .card-cover { 9 | position: relative; 10 | overflow: hidden; 11 | 12 | > img { 13 | display: block; 14 | width: 100%; 15 | max-height: 380px; 16 | object-fit: cover; 17 | } 18 | } 19 | 20 | .card-text { 21 | position: absolute; 22 | bottom: 0; 23 | left: 0; 24 | right: 0; 25 | padding: var(--content-large-padding); 26 | } 27 | } 28 | 29 | .card-cover { 30 | position: absolute; 31 | top: 0; 32 | right: 0; 33 | bottom: 0; 34 | left: 0; 35 | background-repeat: no-repeat; 36 | background-position: center; 37 | background-size: cover; 38 | background-image: #ff5858; 39 | background-image: linear-gradient(1deg, #f857a6, #ff5858); 40 | 41 | &::after { 42 | content: ""; 43 | display: block; 44 | position: absolute; 45 | top: 0; 46 | left: 0; 47 | width: 100%; 48 | height: 100%; 49 | opacity: 0.3; 50 | background-image: linear-gradient(234deg, #394245 0%, #000 100%); 51 | } 52 | } 53 | 54 | .card-text { 55 | line-height: var(--font-base-lh); 56 | color: var(--theme-text-light); 57 | position: relative; 58 | transition: transitions(color, 0.3s); 59 | 60 | .card-text--title { 61 | font-size: var(--font-stress-size); 62 | font-weight: bolder; 63 | } 64 | 65 | .card-text--row { 66 | font-size: var(--font-common-size); 67 | margin-top: var(--layout-padding-x); 68 | } 69 | 70 | .card-text--tag { 71 | display: flex; 72 | flex-wrap: wrap; 73 | margin-top: 18px; 74 | margin-left: -8px; 75 | margin-right: -8px; 76 | 77 | a { 78 | border-radius: 20px; 79 | padding: 4px 8px; 80 | transition: color 0.3s ease, background-color 0.3s ease; 81 | &::before { 82 | content: "#"; 83 | margin-right: 4px; 84 | } 85 | 86 | &:hover { 87 | color: var(--theme-text-active); 88 | background-color: #fff; 89 | } 90 | } 91 | } 92 | } 93 | } 94 | 95 | /** section swiper style */ 96 | .section-swiper { 97 | display: flex; 98 | overflow-x: auto; 99 | scroll-snap-type: x proximity; 100 | 101 | &::-webkit-scrollbar { 102 | display: none; 103 | } 104 | 105 | .swiper-item { 106 | padding: var(--layout-padding-x); 107 | scroll-snap-align: center; 108 | @include mq-pc { 109 | width: 25%; 110 | flex: 0 0 25%; 111 | min-width: 25%; 112 | } 113 | @include mq-mb { 114 | width: 50%; 115 | flex: 1 1 50%; 116 | min-width: 50%; 117 | } 118 | } 119 | } 120 | 121 | /** article lsit style */ 122 | .article-list { 123 | display: flex; 124 | flex-wrap: wrap; 125 | 126 | .article-card { 127 | height: 100%; 128 | } 129 | 130 | .article-item { 131 | padding: var(--layout-padding-x); 132 | max-width: 100%; 133 | flex: 1 0 auto; 134 | 135 | @include mq-pc { 136 | min-width: 25%; 137 | } 138 | 139 | @include mq-mb { 140 | width: 100%; 141 | min-width: 230px; 142 | } 143 | 144 | &:nth-child(1n) .article-card .card-cover { 145 | background-color: #e77842; 146 | background-image: linear-gradient(45deg, #e77842, #f7c068); 147 | } 148 | 149 | &:nth-child(2n) .article-card .card-cover { 150 | background-image: #ff5858; 151 | background-image: linear-gradient(1deg, #f857a6, #ff5858); 152 | } 153 | 154 | &:nth-child(3n) .article-card .card-cover { 155 | background-color: #b53cff; 156 | background-image: linear-gradient(20deg, #b53cff, #f952ff); 157 | } 158 | 159 | &:nth-child(4n) .article-card .card-cover { 160 | background-color: #6bd0ff; 161 | background-image: linear-gradient(40deg, #327ae7, #6bd0ff); 162 | } 163 | 164 | &:nth-child(5n) .article-card .card-cover { 165 | background-color: #ffd62e; 166 | background-image: linear-gradient(40deg, #ffb040, #ffd62e); 167 | } 168 | } 169 | } 170 | 171 | /** article paging style */ 172 | .article-paging { 173 | display: flex; 174 | flex-wrap: wrap; 175 | 176 | .post-paging--item { 177 | margin: var(--layout-padding-x); 178 | color: var(--theme-text-light); 179 | text-align: center; 180 | flex: 1; 181 | transition: transitions(color, 0.3s); 182 | } 183 | } -------------------------------------------------------------------------------- /assets/scss/index/footer.scss: -------------------------------------------------------------------------------- 1 | .footer-container { 2 | text-align: center; 3 | padding: 40px 0; 4 | 5 | .social-icons { 6 | display: flex; 7 | align-items: center; 8 | justify-content: center; 9 | flex-wrap: wrap; 10 | padding-bottom: 20px; 11 | 12 | a { 13 | display: block; 14 | text-align: center; 15 | margin: 10px; 16 | width: 45px; 17 | height: 45px; 18 | padding: 10px; 19 | 20 | &:hover svg.icon { 21 | fill: var(--theme-text-stress); 22 | } 23 | 24 | svg.icon { 25 | display: block; 26 | fill: var(--theme-text-low); 27 | transition: transitions(fill, 0.3s); 28 | } 29 | } 30 | } 31 | 32 | .colour-bar { 33 | width: 150px; 34 | max-width: 76%; 35 | height: 5px; 36 | background: linear-gradient(45deg, 37 | #D83A56 0, #D83A56 25%, 38 | #FF616D 25%, #FF616D 50%, 39 | #B6C9F0 50%, #B6C9F0 75%, 40 | #66DE93 75%, #66DE93 100%); 41 | margin: auto; 42 | } 43 | 44 | p { 45 | margin: 6px 0; 46 | color: var(--theme-text-primary); 47 | line-height: var(--font-base-lh); 48 | transition: transitions(color, 0.3s); 49 | } 50 | 51 | a { 52 | margin: 0 3px; 53 | font-weight: bolder; 54 | color: var(--theme-text-stress); 55 | transition: transitions(color, 0.3s); 56 | 57 | &:hover { 58 | color: var(--theme-text-active); 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /assets/scss/index/header.scss: -------------------------------------------------------------------------------- 1 | .header-container { 2 | .header-inner { 3 | position: relative; 4 | display: flex; 5 | align-items: center; 6 | justify-content: space-between; 7 | } 8 | 9 | .header-logo h1 { 10 | font-size: var(--font-large-size); 11 | font-weight: bolder; 12 | font-family: monospace, sans-serif; 13 | white-space: nowrap; 14 | color: var(--theme-text-primary); 15 | transition: transitions((color, text-shadow), 0.3s); 16 | @include soft-text; 17 | } 18 | 19 | .header-nav { 20 | padding-left: 40px; 21 | 22 | .header-nav--btn { 23 | position: relative; 24 | width: 24px; 25 | height: 24px; 26 | cursor: pointer; 27 | user-select: none; 28 | 29 | &.open div.btn-item { 30 | transition: transform 0.3s ease 0.3s; 31 | } 32 | &.open div.btn-item::before { 33 | transition: transform 0.3s ease, opacity 0.3s ease 0.3s; 34 | } 35 | &.open div.btn-item:nth-child(1) { 36 | transform: rotate(45deg); 37 | } 38 | &.open div.btn-item:nth-child(1)::before { 39 | transform: translateY(0); 40 | } 41 | &.open div.btn-item:nth-child(2)::before { 42 | opacity: 0; 43 | } 44 | &.open div.btn-item:nth-child(3) { 45 | transform: rotate(-45deg); 46 | } 47 | &.open div.btn-item:nth-child(3)::before { 48 | transform: translateY(0); 49 | } 50 | 51 | .btn-item { 52 | position: absolute; 53 | top: 0; 54 | left: 0; 55 | width: 100%; 56 | height: 100%; 57 | transform-origin: center; 58 | transition: transitions(transform, 0.3s); 59 | 60 | &:nth-child(1):before { 61 | transform: translateY(-8px); 62 | } 63 | &:nth-child(3):before { 64 | transform: translateY(8px); 65 | } 66 | 67 | &::before { 68 | position: absolute; 69 | content: ""; 70 | left: 0; 71 | right: 0; 72 | top: 0; 73 | bottom: 0; 74 | margin: auto; 75 | width: 100%; 76 | height: 2px; 77 | border-radius: 2px; 78 | background-color: var(--theme-text-stress); 79 | transition: background-color 0.3s ease, transform 0.3s ease 0.3s, opacity 0.3s ease 0.3s; 80 | } 81 | } 82 | } 83 | 84 | a.list-item { 85 | display: inline-block; 86 | color: var(--theme-text-primary); 87 | font-size: var(--font-common-size); 88 | font-weight: bolder; 89 | overflow: hidden; 90 | } 91 | } 92 | } 93 | 94 | @media #{$mq-pc} { 95 | .header-container { 96 | .header-nav--btn { 97 | display: none; 98 | } 99 | .header-nav--list { 100 | display: block; 101 | 102 | .list-item { 103 | padding: 8px 10px; 104 | } 105 | } 106 | } 107 | } 108 | 109 | 110 | @media #{$mq-mb} { 111 | .header-container { 112 | .header-inner { 113 | overflow: inherit !important; 114 | } 115 | .header-nav--btn { 116 | display: block; 117 | } 118 | .header-nav--btn.open + .header-nav--list { 119 | display: block; 120 | } 121 | .header-nav--list { 122 | overflow: inherit !important; 123 | display: none; 124 | position: absolute; 125 | z-index: 9; 126 | top: 100%; 127 | right: 28px; 128 | transform: translateY(-20px); 129 | 130 | &::before, &::after { 131 | position: absolute; 132 | top: 0; 133 | right: 12px; 134 | content: ""; 135 | display: block; 136 | width: 10px; 137 | height: 10px; 138 | transform-origin: center; 139 | transform: translate(50%, -50%) rotate(-45deg); 140 | background-color: var(--theme-bg-primary); 141 | } 142 | 143 | &::before { 144 | box-shadow: 145 | 1px 1px calc(1px * 2) var(--theme-bg-shadow), 146 | calc(-1 * 1px) calc(-1 * 1px) calc(1px * 2) var(--theme-bg-high); 147 | } 148 | 149 | & > div { 150 | @include soft-box(var(--soft-small-radius)); 151 | position: relative; 152 | padding: 6px 8px; 153 | } 154 | 155 | a.list-item { 156 | display: block; 157 | text-align: left; 158 | padding: 14px 12px; 159 | transition: transitions(color); 160 | } 161 | } 162 | } 163 | } -------------------------------------------------------------------------------- /assets/scss/index/index.scss: -------------------------------------------------------------------------------- 1 | @import '../_base/index.scss'; 2 | 3 | @import './header.scss'; 4 | @import './footer.scss'; 5 | @import './card.scss'; 6 | @import './single.scss'; 7 | @import './page.scss'; 8 | @import './markdown.scss'; 9 | @import './widget.scss'; 10 | @import './pagination.scss'; 11 | -------------------------------------------------------------------------------- /assets/scss/index/markdown.scss: -------------------------------------------------------------------------------- 1 | .markdown-body .octicon { 2 | display: inline-block; 3 | fill: currentColor; 4 | vertical-align: text-bottom; 5 | } 6 | 7 | .markdown-body .anchor { 8 | float: left; 9 | line-height: 1; 10 | margin-left: -20px; 11 | padding-right: 4px; 12 | } 13 | 14 | .markdown-body .anchor:focus { 15 | outline: none; 16 | } 17 | 18 | .markdown-body h1 .octicon-link, 19 | .markdown-body h2 .octicon-link, 20 | .markdown-body h3 .octicon-link, 21 | .markdown-body h4 .octicon-link, 22 | .markdown-body h5 .octicon-link, 23 | .markdown-body h6 .octicon-link { 24 | color: #1b1f23; 25 | vertical-align: middle; 26 | visibility: hidden; 27 | } 28 | 29 | .markdown-body h1:hover .anchor, 30 | .markdown-body h2:hover .anchor, 31 | .markdown-body h3:hover .anchor, 32 | .markdown-body h4:hover .anchor, 33 | .markdown-body h5:hover .anchor, 34 | .markdown-body h6:hover .anchor { 35 | text-decoration: none; 36 | } 37 | 38 | .markdown-body h1:hover .anchor .octicon-link, 39 | .markdown-body h2:hover .anchor .octicon-link, 40 | .markdown-body h3:hover .anchor .octicon-link, 41 | .markdown-body h4:hover .anchor .octicon-link, 42 | .markdown-body h5:hover .anchor .octicon-link, 43 | .markdown-body h6:hover .anchor .octicon-link { 44 | visibility: visible; 45 | } 46 | 47 | .markdown-body h1:hover .anchor .octicon-link:before, 48 | .markdown-body h2:hover .anchor .octicon-link:before, 49 | .markdown-body h3:hover .anchor .octicon-link:before, 50 | .markdown-body h4:hover .anchor .octicon-link:before, 51 | .markdown-body h5:hover .anchor .octicon-link:before, 52 | .markdown-body h6:hover .anchor .octicon-link:before { 53 | width: 16px; 54 | height: 16px; 55 | content: ' '; 56 | display: inline-block; 57 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' width='16' height='16' aria-hidden='true'%3E%3Cpath fill-rule='evenodd' d='M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z'%3E%3C/path%3E%3C/svg%3E"); 58 | } 59 | 60 | .markdown-body { 61 | -ms-text-size-adjust: 100%; 62 | -webkit-text-size-adjust: 100%; 63 | color: var(--theme-text-primary); 64 | font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji; 65 | font-size: var(--font-base-size); 66 | line-height: var(--font-base-lh); 67 | word-wrap: break-word; 68 | transition: transitions(color, 0.3s); 69 | } 70 | 71 | .markdown-body details { 72 | display: block; 73 | } 74 | 75 | .markdown-body summary { 76 | display: list-item; 77 | } 78 | 79 | .markdown-body a { 80 | background-color: initial; 81 | } 82 | 83 | .markdown-body a:active, 84 | .markdown-body a:hover { 85 | outline-width: 0; 86 | } 87 | 88 | .markdown-body strong { 89 | font-weight: inherit; 90 | font-weight: bolder; 91 | } 92 | 93 | .markdown-body h1 { 94 | font-size: 2em; 95 | margin: .67em 0; 96 | } 97 | 98 | .markdown-body img { 99 | border-style: none; 100 | } 101 | 102 | .markdown-body code, 103 | .markdown-body kbd, 104 | .markdown-body pre { 105 | font-family: monospace,monospace; 106 | font-size: 1em; 107 | } 108 | 109 | .markdown-body hr { 110 | box-sizing: initial; 111 | height: 0; 112 | overflow: visible; 113 | } 114 | 115 | .markdown-body input { 116 | font: inherit; 117 | margin: 0; 118 | } 119 | 120 | .markdown-body input { 121 | overflow: visible; 122 | } 123 | 124 | .markdown-body [type=checkbox] { 125 | box-sizing: border-box; 126 | padding: 0; 127 | } 128 | 129 | .markdown-body * { 130 | box-sizing: border-box; 131 | } 132 | 133 | .markdown-body input { 134 | font-family: inherit; 135 | font-size: inherit; 136 | line-height: inherit; 137 | } 138 | 139 | .markdown-body a { 140 | color: #0366d6; 141 | text-decoration: none; 142 | } 143 | 144 | .markdown-body a:hover { 145 | text-decoration: underline; 146 | } 147 | 148 | .markdown-body strong { 149 | font-weight: 600; 150 | } 151 | 152 | .markdown-body hr { 153 | height: 0; 154 | margin: 15px 0; 155 | overflow: hidden; 156 | background: transparent; 157 | border: 0; 158 | border-bottom: 1px solid var(--theme-border-primary); 159 | transition: transitions(border-color, 0.3s); 160 | } 161 | 162 | .markdown-body hr:after, 163 | .markdown-body hr:before { 164 | display: table; 165 | content: ""; 166 | } 167 | 168 | .markdown-body hr:after { 169 | clear: both; 170 | } 171 | 172 | .markdown-body table { 173 | border-spacing: 0; 174 | border-collapse: collapse; 175 | } 176 | 177 | .markdown-body td, 178 | .markdown-body th { 179 | padding: 0; 180 | } 181 | 182 | .markdown-body details summary { 183 | cursor: pointer; 184 | } 185 | 186 | .markdown-body kbd { 187 | display: inline-block; 188 | padding: 3px 5px; 189 | font: 11px SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace; 190 | line-height: 10px; 191 | color: #444d56; 192 | vertical-align: middle; 193 | background-color: #fafbfc; 194 | border: 1px solid #d1d5da; 195 | border-radius: 3px; 196 | box-shadow: inset 0 -1px 0 #d1d5da; 197 | } 198 | 199 | .markdown-body h1, 200 | .markdown-body h2, 201 | .markdown-body h3, 202 | .markdown-body h4, 203 | .markdown-body h5, 204 | .markdown-body h6 { 205 | margin-top: 0; 206 | margin-bottom: 0; 207 | } 208 | 209 | .markdown-body h1 { 210 | font-size: 32px; 211 | } 212 | 213 | .markdown-body h1, 214 | .markdown-body h2 { 215 | font-weight: 600; 216 | } 217 | 218 | .markdown-body h2 { 219 | font-size: 24px; 220 | } 221 | 222 | .markdown-body h3 { 223 | font-size: 20px; 224 | } 225 | 226 | .markdown-body h3, 227 | .markdown-body h4 { 228 | font-weight: 600; 229 | } 230 | 231 | .markdown-body h4 { 232 | font-size: 16px; 233 | } 234 | 235 | .markdown-body h5 { 236 | font-size: 14px; 237 | } 238 | 239 | .markdown-body h5, 240 | .markdown-body h6 { 241 | font-weight: 600; 242 | } 243 | 244 | .markdown-body h6 { 245 | font-size: 12px; 246 | } 247 | 248 | .markdown-body p { 249 | margin-top: 0; 250 | margin-bottom: 10px; 251 | } 252 | 253 | .markdown-body blockquote { 254 | margin: 0; 255 | } 256 | 257 | .markdown-body ol, 258 | .markdown-body ul { 259 | padding-left: 0; 260 | margin-top: 0; 261 | margin-bottom: 0; 262 | list-style: initial; 263 | } 264 | 265 | .markdown-body ol ol, 266 | .markdown-body ul ol { 267 | list-style-type: lower-roman; 268 | } 269 | 270 | .markdown-body ol ol ol, 271 | .markdown-body ol ul ol, 272 | .markdown-body ul ol ol, 273 | .markdown-body ul ul ol { 274 | list-style-type: lower-alpha; 275 | } 276 | 277 | .markdown-body dd { 278 | margin-left: 0; 279 | } 280 | 281 | .markdown-body code, 282 | .markdown-body pre { 283 | font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace; 284 | font-size: 12px; 285 | } 286 | 287 | .markdown-body pre { 288 | margin-top: 0; 289 | margin-bottom: 0; 290 | } 291 | 292 | .markdown-body input::-webkit-inner-spin-button, 293 | .markdown-body input::-webkit-outer-spin-button { 294 | margin: 0; 295 | -webkit-appearance: none; 296 | appearance: none; 297 | } 298 | 299 | .markdown-body :checked+.radio-label { 300 | position: relative; 301 | z-index: 1; 302 | border-color: #0366d6; 303 | } 304 | 305 | .markdown-body .border { 306 | border: 1px solid #e1e4e8!important; 307 | } 308 | 309 | .markdown-body .border-0 { 310 | border: 0!important; 311 | } 312 | 313 | .markdown-body .border-bottom { 314 | border-bottom: 1px solid #e1e4e8!important; 315 | } 316 | 317 | .markdown-body .rounded-1 { 318 | border-radius: 3px!important; 319 | } 320 | 321 | .markdown-body .bg-white { 322 | background-color: #fff!important; 323 | } 324 | 325 | .markdown-body .bg-gray-light { 326 | background-color: #fafbfc!important; 327 | } 328 | 329 | .markdown-body .text-gray-light { 330 | color: #6a737d!important; 331 | } 332 | 333 | .markdown-body .mb-0 { 334 | margin-bottom: 0!important; 335 | } 336 | 337 | .markdown-body .my-2 { 338 | margin-top: 8px!important; 339 | margin-bottom: 8px!important; 340 | } 341 | 342 | .markdown-body .pl-0 { 343 | padding-left: 0!important; 344 | } 345 | 346 | .markdown-body .py-0 { 347 | padding-top: 0!important; 348 | padding-bottom: 0!important; 349 | } 350 | 351 | .markdown-body .pl-1 { 352 | padding-left: 4px!important; 353 | } 354 | 355 | .markdown-body .pl-2 { 356 | padding-left: 8px!important; 357 | } 358 | 359 | .markdown-body .py-2 { 360 | padding-top: 8px!important; 361 | padding-bottom: 8px!important; 362 | } 363 | 364 | .markdown-body .pl-3, 365 | .markdown-body .px-3 { 366 | padding-left: 16px!important; 367 | } 368 | 369 | .markdown-body .px-3 { 370 | padding-right: 16px!important; 371 | } 372 | 373 | .markdown-body .pl-4 { 374 | padding-left: 24px!important; 375 | } 376 | 377 | .markdown-body .pl-5 { 378 | padding-left: 32px!important; 379 | } 380 | 381 | .markdown-body .pl-6 { 382 | padding-left: 40px!important; 383 | } 384 | 385 | .markdown-body .f6 { 386 | font-size: 12px!important; 387 | } 388 | 389 | .markdown-body .lh-condensed { 390 | line-height: 1.25!important; 391 | } 392 | 393 | .markdown-body .text-bold { 394 | font-weight: 600!important; 395 | } 396 | 397 | .markdown-body .pl-c { 398 | color: #6a737d; 399 | } 400 | 401 | .markdown-body .pl-c1, 402 | .markdown-body .pl-s .pl-v { 403 | color: #005cc5; 404 | } 405 | 406 | .markdown-body .pl-e, 407 | .markdown-body .pl-en { 408 | color: #6f42c1; 409 | } 410 | 411 | .markdown-body .pl-s .pl-s1, 412 | .markdown-body .pl-smi { 413 | color: #24292e; 414 | } 415 | 416 | .markdown-body .pl-ent { 417 | color: #22863a; 418 | } 419 | 420 | .markdown-body .pl-k { 421 | color: #d73a49; 422 | } 423 | 424 | .markdown-body .pl-pds, 425 | .markdown-body .pl-s, 426 | .markdown-body .pl-s .pl-pse .pl-s1, 427 | .markdown-body .pl-sr, 428 | .markdown-body .pl-sr .pl-cce, 429 | .markdown-body .pl-sr .pl-sra, 430 | .markdown-body .pl-sr .pl-sre { 431 | color: #032f62; 432 | } 433 | 434 | .markdown-body .pl-smw, 435 | .markdown-body .pl-v { 436 | color: #e36209; 437 | } 438 | 439 | .markdown-body .pl-bu { 440 | color: #b31d28; 441 | } 442 | 443 | .markdown-body .pl-ii { 444 | color: #fafbfc; 445 | background-color: #b31d28; 446 | } 447 | 448 | .markdown-body .pl-c2 { 449 | color: #fafbfc; 450 | background-color: #d73a49; 451 | } 452 | 453 | .markdown-body .pl-c2:before { 454 | content: "^M"; 455 | } 456 | 457 | .markdown-body .pl-sr .pl-cce { 458 | font-weight: 700; 459 | color: #22863a; 460 | } 461 | 462 | .markdown-body .pl-ml { 463 | color: #735c0f; 464 | } 465 | 466 | .markdown-body .pl-mh, 467 | .markdown-body .pl-mh .pl-en, 468 | .markdown-body .pl-ms { 469 | font-weight: 700; 470 | color: #005cc5; 471 | } 472 | 473 | .markdown-body .pl-mi { 474 | font-style: italic; 475 | color: #24292e; 476 | } 477 | 478 | .markdown-body .pl-mb { 479 | font-weight: 700; 480 | color: #24292e; 481 | } 482 | 483 | .markdown-body .pl-md { 484 | color: #b31d28; 485 | background-color: #ffeef0; 486 | } 487 | 488 | .markdown-body .pl-mi1 { 489 | color: #22863a; 490 | background-color: #f0fff4; 491 | } 492 | 493 | .markdown-body .pl-mc { 494 | color: #e36209; 495 | background-color: #ffebda; 496 | } 497 | 498 | .markdown-body .pl-mi2 { 499 | color: #f6f8fa; 500 | background-color: #005cc5; 501 | } 502 | 503 | .markdown-body .pl-mdr { 504 | font-weight: 700; 505 | color: #6f42c1; 506 | } 507 | 508 | .markdown-body .pl-ba { 509 | color: #586069; 510 | } 511 | 512 | .markdown-body .pl-sg { 513 | color: #959da5; 514 | } 515 | 516 | .markdown-body .pl-corl { 517 | text-decoration: underline; 518 | color: #032f62; 519 | } 520 | 521 | .markdown-body .mb-0 { 522 | margin-bottom: 0!important; 523 | } 524 | 525 | .markdown-body .my-2 { 526 | margin-bottom: 8px!important; 527 | } 528 | 529 | .markdown-body .my-2 { 530 | margin-top: 8px!important; 531 | } 532 | 533 | .markdown-body .pl-0 { 534 | padding-left: 0!important; 535 | } 536 | 537 | .markdown-body .py-0 { 538 | padding-top: 0!important; 539 | padding-bottom: 0!important; 540 | } 541 | 542 | .markdown-body .pl-1 { 543 | padding-left: 4px!important; 544 | } 545 | 546 | .markdown-body .pl-2 { 547 | padding-left: 8px!important; 548 | } 549 | 550 | .markdown-body .py-2 { 551 | padding-top: 8px!important; 552 | padding-bottom: 8px!important; 553 | } 554 | 555 | .markdown-body .pl-3 { 556 | padding-left: 16px!important; 557 | } 558 | 559 | .markdown-body .pl-4 { 560 | padding-left: 24px!important; 561 | } 562 | 563 | .markdown-body .pl-5 { 564 | padding-left: 32px!important; 565 | } 566 | 567 | .markdown-body .pl-6 { 568 | padding-left: 40px!important; 569 | } 570 | 571 | .markdown-body .pl-7 { 572 | padding-left: 48px!important; 573 | } 574 | 575 | .markdown-body .pl-8 { 576 | padding-left: 64px!important; 577 | } 578 | 579 | .markdown-body .pl-9 { 580 | padding-left: 80px!important; 581 | } 582 | 583 | .markdown-body .pl-10 { 584 | padding-left: 96px!important; 585 | } 586 | 587 | .markdown-body .pl-11 { 588 | padding-left: 112px!important; 589 | } 590 | 591 | .markdown-body .pl-12 { 592 | padding-left: 128px!important; 593 | } 594 | 595 | .markdown-body hr { 596 | border-bottom-color: var(--theme-border-primary); 597 | transition: transitions(border-color, 0.3s); 598 | } 599 | 600 | .markdown-body kbd { 601 | display: inline-block; 602 | padding: 3px 5px; 603 | font: 11px SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace; 604 | line-height: 10px; 605 | color: #444d56; 606 | vertical-align: middle; 607 | background-color: #fafbfc; 608 | border: 1px solid #d1d5da; 609 | border-radius: 3px; 610 | box-shadow: inset 0 -1px 0 #d1d5da; 611 | } 612 | 613 | .markdown-body:after, 614 | .markdown-body:before { 615 | display: table; 616 | content: ""; 617 | } 618 | 619 | .markdown-body:after { 620 | clear: both; 621 | } 622 | 623 | .markdown-body>:first-child { 624 | margin-top: 0!important; 625 | } 626 | 627 | .markdown-body>:last-child { 628 | margin-bottom: 0!important; 629 | } 630 | 631 | .markdown-body a:not([href]) { 632 | color: inherit; 633 | text-decoration: none; 634 | } 635 | 636 | .markdown-body blockquote, 637 | .markdown-body details, 638 | .markdown-body dl, 639 | .markdown-body ol, 640 | .markdown-body p, 641 | .markdown-body pre, 642 | .markdown-body table, 643 | .markdown-body ul { 644 | margin-top: 0; 645 | margin-bottom: 16px; 646 | } 647 | 648 | .markdown-body hr { 649 | height: .25em; 650 | padding: 0; 651 | margin: 24px 0; 652 | border: 0; 653 | background-color: var(--theme-border-primary); 654 | transition: transitions(background-color, 0.3s); 655 | } 656 | 657 | .markdown-body blockquote { 658 | padding: 0 1em; 659 | color: #6a737d; 660 | border-left: .25em solid #dfe2e5; 661 | } 662 | 663 | .markdown-body blockquote>:first-child { 664 | margin-top: 0; 665 | } 666 | 667 | .markdown-body blockquote>:last-child { 668 | margin-bottom: 0; 669 | } 670 | 671 | .markdown-body h1, 672 | .markdown-body h2, 673 | .markdown-body h3, 674 | .markdown-body h4, 675 | .markdown-body h5, 676 | .markdown-body h6 { 677 | margin-top: 24px; 678 | margin-bottom: 16px; 679 | font-weight: 600; 680 | line-height: 1.25; 681 | } 682 | 683 | .markdown-body h1 { 684 | font-size: 2em; 685 | } 686 | 687 | .markdown-body h1, 688 | .markdown-body h2 { 689 | padding-bottom: .3em; 690 | border-bottom: 1px solid var(--theme-border-secondary); 691 | } 692 | 693 | .markdown-body h2 { 694 | font-size: 1.5em; 695 | } 696 | 697 | .markdown-body h3 { 698 | font-size: 1.25em; 699 | } 700 | 701 | .markdown-body h4 { 702 | font-size: 1em; 703 | } 704 | 705 | .markdown-body h5 { 706 | font-size: .875em; 707 | } 708 | 709 | .markdown-body h6 { 710 | font-size: .85em; 711 | color: #6a737d; 712 | } 713 | 714 | .markdown-body ol, 715 | .markdown-body ul { 716 | padding-left: 2em; 717 | } 718 | 719 | .markdown-body ol ol, 720 | .markdown-body ol ul, 721 | .markdown-body ul ol, 722 | .markdown-body ul ul { 723 | margin-top: 0; 724 | margin-bottom: 0; 725 | } 726 | 727 | .markdown-body li { 728 | word-wrap: break-all; 729 | } 730 | 731 | .markdown-body li>p { 732 | margin-top: 16px; 733 | } 734 | 735 | .markdown-body li+li { 736 | margin-top: .25em; 737 | } 738 | 739 | .markdown-body dl { 740 | padding: 0; 741 | } 742 | 743 | .markdown-body dl dt { 744 | padding: 0; 745 | margin-top: 16px; 746 | font-size: 1em; 747 | font-style: italic; 748 | font-weight: 600; 749 | } 750 | 751 | .markdown-body dl dd { 752 | padding: 0 16px; 753 | margin-bottom: 16px; 754 | } 755 | 756 | .markdown-body table { 757 | display: block; 758 | width: 100%; 759 | overflow: auto; 760 | } 761 | 762 | .markdown-body table th { 763 | font-weight: 600; 764 | } 765 | 766 | .markdown-body table td, 767 | .markdown-body table th { 768 | padding: 6px 13px; 769 | border: 1px solid #dfe2e5; 770 | } 771 | 772 | .markdown-body table tr { 773 | background-color: #fff; 774 | border-top: 1px solid #c6cbd1; 775 | } 776 | 777 | .markdown-body table tr:nth-child(2n) { 778 | background-color: #f6f8fa; 779 | } 780 | 781 | .markdown-body img { 782 | max-width: 100%; 783 | box-sizing: initial; 784 | background-color: #fff; 785 | @include soft-box(var(--soft-small-radius)); 786 | } 787 | 788 | .markdown-body img[align=right] { 789 | padding-left: 20px; 790 | } 791 | 792 | .markdown-body img[align=left] { 793 | padding-right: 20px; 794 | } 795 | 796 | .markdown-body code { 797 | padding: .2em .4em; 798 | margin: 0; 799 | font-size: 85%; 800 | background-color: rgba(27,31,35,.05); 801 | border-radius: 3px; 802 | } 803 | 804 | .markdown-body pre { 805 | word-wrap: normal; 806 | } 807 | 808 | .markdown-body pre>code { 809 | padding: 0; 810 | margin: 0; 811 | font-size: 100%; 812 | word-break: normal; 813 | white-space: pre; 814 | background: transparent; 815 | border: 0; 816 | } 817 | 818 | .markdown-body .highlight { 819 | margin-bottom: 16px; 820 | } 821 | 822 | .markdown-body .highlight pre { 823 | margin-bottom: 0; 824 | word-break: normal; 825 | } 826 | 827 | .markdown-body .highlight pre, 828 | .markdown-body pre { 829 | padding: 16px; 830 | overflow: auto; 831 | font-size: 85%; 832 | line-height: 1.45; 833 | background-color: #f6f8fa; 834 | border-radius: 3px; 835 | } 836 | 837 | .markdown-body pre code { 838 | display: inline; 839 | max-width: auto; 840 | padding: 0; 841 | margin: 0; 842 | overflow: visible; 843 | line-height: inherit; 844 | word-wrap: normal; 845 | background-color: initial; 846 | border: 0; 847 | } 848 | 849 | .markdown-body .commit-tease-sha { 850 | display: inline-block; 851 | font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace; 852 | font-size: 90%; 853 | color: #444d56; 854 | } 855 | 856 | .markdown-body .full-commit .btn-outline:not(:disabled):hover { 857 | color: #005cc5; 858 | border-color: #005cc5; 859 | } 860 | 861 | .markdown-body .blob-wrapper { 862 | overflow-x: auto; 863 | overflow-y: hidden; 864 | } 865 | 866 | .markdown-body .blob-wrapper-embedded { 867 | max-height: 240px; 868 | overflow-y: auto; 869 | } 870 | 871 | .markdown-body .blob-num { 872 | width: 1%; 873 | min-width: 50px; 874 | padding-right: 10px; 875 | padding-left: 10px; 876 | font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace; 877 | font-size: 12px; 878 | line-height: 20px; 879 | color: rgba(27,31,35,.3); 880 | text-align: right; 881 | white-space: nowrap; 882 | vertical-align: top; 883 | cursor: pointer; 884 | -webkit-user-select: none; 885 | -moz-user-select: none; 886 | -ms-user-select: none; 887 | user-select: none; 888 | } 889 | 890 | .markdown-body .blob-num:hover { 891 | color: rgba(27,31,35,.6); 892 | } 893 | 894 | .markdown-body .blob-num:before { 895 | content: attr(data-line-number); 896 | } 897 | 898 | .markdown-body .blob-code { 899 | position: relative; 900 | padding-right: 10px; 901 | padding-left: 10px; 902 | line-height: 20px; 903 | vertical-align: top; 904 | } 905 | 906 | .markdown-body .blob-code-inner { 907 | overflow: visible; 908 | font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace; 909 | font-size: 12px; 910 | color: #24292e; 911 | word-wrap: normal; 912 | white-space: pre; 913 | } 914 | 915 | .markdown-body .pl-token.active, 916 | .markdown-body .pl-token:hover { 917 | cursor: pointer; 918 | background: #ffea7f; 919 | } 920 | 921 | .markdown-body .tab-size[data-tab-size="1"] { 922 | -moz-tab-size: 1; 923 | tab-size: 1; 924 | } 925 | 926 | .markdown-body .tab-size[data-tab-size="2"] { 927 | -moz-tab-size: 2; 928 | tab-size: 2; 929 | } 930 | 931 | .markdown-body .tab-size[data-tab-size="3"] { 932 | -moz-tab-size: 3; 933 | tab-size: 3; 934 | } 935 | 936 | .markdown-body .tab-size[data-tab-size="4"] { 937 | -moz-tab-size: 4; 938 | tab-size: 4; 939 | } 940 | 941 | .markdown-body .tab-size[data-tab-size="5"] { 942 | -moz-tab-size: 5; 943 | tab-size: 5; 944 | } 945 | 946 | .markdown-body .tab-size[data-tab-size="6"] { 947 | -moz-tab-size: 6; 948 | tab-size: 6; 949 | } 950 | 951 | .markdown-body .tab-size[data-tab-size="7"] { 952 | -moz-tab-size: 7; 953 | tab-size: 7; 954 | } 955 | 956 | .markdown-body .tab-size[data-tab-size="8"] { 957 | -moz-tab-size: 8; 958 | tab-size: 8; 959 | } 960 | 961 | .markdown-body .tab-size[data-tab-size="9"] { 962 | -moz-tab-size: 9; 963 | tab-size: 9; 964 | } 965 | 966 | .markdown-body .tab-size[data-tab-size="10"] { 967 | -moz-tab-size: 10; 968 | tab-size: 10; 969 | } 970 | 971 | .markdown-body .tab-size[data-tab-size="11"] { 972 | -moz-tab-size: 11; 973 | tab-size: 11; 974 | } 975 | 976 | .markdown-body .tab-size[data-tab-size="12"] { 977 | -moz-tab-size: 12; 978 | tab-size: 12; 979 | } 980 | 981 | .markdown-body .task-list-item { 982 | list-style-type: none; 983 | } 984 | 985 | .markdown-body .task-list-item+.task-list-item { 986 | margin-top: 3px; 987 | } 988 | 989 | .markdown-body .task-list-item input { 990 | margin: 0 .2em .25em -1.6em; 991 | vertical-align: middle; 992 | } 993 | 994 | 995 | /** append style */ 996 | .markdown-body .iframe-video { /** iframe video */ 997 | margin-bottom: 20px; 998 | @include soft-box(var(--soft-small-radius)); 999 | } 1000 | 1001 | .markdown-body .aplayer.aplayer-box { /** aplayer */ 1002 | margin: 0; 1003 | margin-bottom: 20px; 1004 | background-color: var(--theme-bg-color); 1005 | @include soft-box(var(--soft-small-radius)); 1006 | 1007 | .aplayer-info .aplayer-controller .aplayer-time { 1008 | line-height: normal; 1009 | } 1010 | 1011 | .aplayer-lrc:before { 1012 | background: linear-gradient(180deg, var(--theme-bg-color) 0, hsla(0,0%,100%,0)); 1013 | } 1014 | 1015 | .aplayer-lrc:after { 1016 | background: linear-gradient(180deg, hsla(0,0%,100%,0) 0, var(--theme-bg-color)); 1017 | } 1018 | } 1019 | 1020 | .markdown-body .dplayer.dplayer-box { /** dplayer */ 1021 | margin-bottom: 20px; 1022 | @include soft-box(var(--soft-small-radius)); 1023 | } 1024 | 1025 | .markdown-body .figure-image { /** figure image */ 1026 | margin-bottom: 16px; 1027 | 1028 | figcaption { 1029 | margin-top: 12px; 1030 | text-align: center; 1031 | color: var(--theme-text-low); 1032 | } 1033 | } -------------------------------------------------------------------------------- /assets/scss/index/page.scss: -------------------------------------------------------------------------------- 1 | /** links page style */ 2 | .links-content { 3 | .links-wrap { 4 | display: flex; 5 | flex-direction: row; 6 | flex-wrap: wrap; 7 | justify-content: center; 8 | } 9 | 10 | .link-item { 11 | @include mq-pc { 12 | max-width: 100%; 13 | min-width: 33.333%; 14 | flex: 1 0 auto; 15 | } 16 | 17 | @include mq-mb { 18 | max-width: 100%; 19 | flex: 1 1 50%; 20 | } 21 | 22 | > a { 23 | display: flex; 24 | align-items: center; 25 | transition: transitions(color); 26 | height: 100%; 27 | 28 | img { 29 | display: block; 30 | width: 46px; 31 | min-width: 46px; 32 | height: 46px; 33 | margin-right: 12px; 34 | object-fit: cover; 35 | flex: 0 0 46px; 36 | } 37 | 38 | div { 39 | overflow: hidden; 40 | line-height: var(--font-base-lh); 41 | } 42 | 43 | h4 { 44 | font-weight: bold; 45 | color: var(--theme-text-stress); 46 | } 47 | 48 | p { 49 | color: var(--theme-text-primary); 50 | } 51 | } 52 | } 53 | } 54 | 55 | /** terms page style */ 56 | .terms-container { 57 | 58 | .terms-inner { 59 | display: flex; 60 | flex-direction: row; 61 | flex-wrap: wrap; 62 | justify-content: center; 63 | 64 | .term-item { 65 | @include mq-pc { 66 | max-width: 50%; 67 | } 68 | 69 | @include mq-mb { 70 | max-width: 100%; 71 | flex: 1 1 auto; 72 | } 73 | 74 | & > a { 75 | @include mq-pc { 76 | padding-right: 100px; 77 | } 78 | @include mq-mb { 79 | padding-right: 40px; 80 | } 81 | position: relative; 82 | display: block; 83 | height: 100%; 84 | font-weight: bold; 85 | color: var(--theme-text-primary); 86 | 87 | &::after { 88 | display: block; 89 | position: absolute; 90 | right: 10px; 91 | bottom: 10px; 92 | font-size: var(--font-large-size); 93 | line-height: 1; 94 | content: attr(data-count); 95 | opacity: 0.3; 96 | } 97 | } 98 | } 99 | } 100 | } -------------------------------------------------------------------------------- /assets/scss/index/pagination.scss: -------------------------------------------------------------------------------- 1 | .pagination-container { 2 | padding-top: 16px; 3 | padding-bottom: 16px; 4 | 5 | .pagination-list { 6 | display: flex; 7 | align-items: center; 8 | justify-content: center; 9 | 10 | li { 11 | padding: 4px 6px; 12 | margin: 8px; 13 | transition: color 0.3s ease; 14 | font-weight: bolder; 15 | font: var(--base-font); 16 | font-weight: bolder; 17 | 18 | a { 19 | color: var(--theme-text-primary); 20 | transition: transitions(color, 0.3s); 21 | 22 | &:hover { 23 | color: var(--theme-text-active); 24 | } 25 | } 26 | 27 | span { 28 | color: var(--theme-text-low); 29 | } 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /assets/scss/index/single.scss: -------------------------------------------------------------------------------- 1 | .single-container { 2 | display: flex; 3 | align-items: flex-start; 4 | overflow: visible; 5 | 6 | .article-content { 7 | padding: var(--layout-padding-x); 8 | } 9 | 10 | .widget-info { 11 | position: sticky; 12 | top: 0; 13 | width: 360px; 14 | min-width: 360px; 15 | display: flex; 16 | flex-direction: column; 17 | } 18 | 19 | @include mq-pc { 20 | .article-info { 21 | flex: 0 1 calc(100% - 360px); 22 | min-width: calc(100% - 360px); 23 | } 24 | .widget-info { 25 | display: flex; 26 | } 27 | } 28 | 29 | @include mq-mb { 30 | .article-info { 31 | flex: 1 1 100%; 32 | width: 100%; 33 | } 34 | .widget-info { 35 | display: none; 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /assets/scss/index/widget.scss: -------------------------------------------------------------------------------- 1 | .aside-widget { 2 | margin: var(--layout-padding-x); 3 | 4 | .widget-header { 5 | margin-bottom: 20px; 6 | 7 | .title { 8 | display: flex; 9 | align-items: center; 10 | padding-bottom: 6px; 11 | 12 | > span { 13 | color: var(--theme-text-stress); 14 | font-weight: 500; 15 | font-size: var(--font-stress-size); 16 | letter-spacing: 0.6px; 17 | text-transform: uppercase; 18 | transition: transitions(color, 0.3s); 19 | @include soft-text; 20 | } 21 | } 22 | 23 | &::after { 24 | display: block; 25 | content: ""; 26 | width: 100%; 27 | height: 2px; 28 | background-color: var(--theme-border-primary); 29 | transition: transitions(background-color, 0.3s); 30 | } 31 | } 32 | 33 | .widget-footer { 34 | margin-top: 8px; 35 | text-align: center; 36 | 37 | .more-link { 38 | color: var(--theme-text-stress); 39 | font: var(--base-font); 40 | transition: transitions(color, 0.3s); 41 | 42 | &.center { 43 | text-align: center; 44 | } 45 | 46 | &:hover { 47 | color: var(--theme-text-active); 48 | 49 | > svg { 50 | fill: var(--theme-text-active); 51 | } 52 | } 53 | 54 | > svg { 55 | display: inline-block; 56 | vertical-align: middle; 57 | fill: var(--theme-text-stress); 58 | transition: transitions(fill, 0.3s); 59 | } 60 | } 61 | } 62 | } 63 | 64 | /** 作者 widget */ 65 | .widget-author .author-box { 66 | display: flex; 67 | flex-direction: column; 68 | justify-content: center; 69 | position: relative; 70 | height: 64px; 71 | color: var(--theme-text-primary); 72 | 73 | &.avatar { 74 | padding-left: 74px; 75 | } 76 | 77 | .author-avatar { 78 | position: absolute; 79 | top: 0; 80 | bottom: 0; 81 | left: 0; 82 | width: 64px; 83 | height: 64px; 84 | } 85 | 86 | .author-name { 87 | height: 32px; 88 | line-height: 32px; 89 | font-weight: bolder; 90 | font-size: var(--font-stress-size); 91 | } 92 | 93 | .author-desc { 94 | height: 32px; 95 | line-height: 32px; 96 | border-top: 1px solid var(--theme-border-primary); 97 | } 98 | } 99 | 100 | /** 目录TOC widget */ 101 | .widget-toc { 102 | ul, ol { 103 | list-style: inherit; 104 | padding-left: 20px; 105 | 106 | > li { 107 | margin: 16px 0; 108 | 109 | &::marker { 110 | color: var(--theme-text-primary); 111 | } 112 | 113 | > a { 114 | font: var(--base-font); 115 | color: var(--theme-text-primary); 116 | transition: transitions(color, 0.3s); 117 | 118 | &:hover { 119 | color: var(--theme-text-active); 120 | } 121 | } 122 | } 123 | } 124 | } 125 | 126 | /** 相关文章 widget */ 127 | .widget-articles .post-list { 128 | list-style: none; 129 | 130 | .post-item { 131 | &:not(:last-child) { 132 | margin-bottom: 15px; 133 | } 134 | 135 | a { 136 | font: var(--base-font); 137 | color: var(--theme-text-active); 138 | font-weight: bolder; 139 | border-bottom: 2px solid #dde0e0; 140 | transition: transitions((color, border-color), 0.3s); 141 | 142 | &:hover { 143 | border-color: var(--theme-text-active); 144 | } 145 | } 146 | } 147 | } 148 | 149 | /** 分类列表 widget */ 150 | .widget-categories .categories-list { 151 | list-style: none; 152 | 153 | > li { 154 | display: flex; 155 | align-items: center; 156 | justify-content: space-between; 157 | line-height: 30px; 158 | padding-bottom: 6px; 159 | border-bottom: 1px solid var(--theme-border-secondary); 160 | transition: transitions(border-color, 0.3s); 161 | 162 | &:not(:last-child) { 163 | margin-bottom: 6px; 164 | } 165 | 166 | > a { 167 | color: var(--theme-text-primary); 168 | transition: transitions(color, 0.3s); 169 | } 170 | 171 | > span { 172 | display: inline-block; 173 | border-radius: 20px; 174 | color: var(--theme-text-light); 175 | background-color: var(--theme-text-active); 176 | width: 25px; 177 | height: 25px; 178 | text-align: center; 179 | line-height: 25px; 180 | font-size: 12px; 181 | transition: transitions((color, background-color), 0.3s); 182 | } 183 | } 184 | } 185 | 186 | /** 标签列表 widget */ 187 | .widget-tags .tags-list { 188 | display: flex; 189 | flex-wrap: wrap; 190 | gap: 3px; 191 | margin: 0 -10px; 192 | 193 | > a { 194 | display: block; 195 | padding: 8px 10px; 196 | color: var(--theme-text-primary); 197 | } 198 | } -------------------------------------------------------------------------------- /assets/ts/404.ts: -------------------------------------------------------------------------------- 1 | function throttle(fn: Function, delay: number) { 2 | let valid = true 3 | return function () { 4 | if (!valid) return 5 | valid = false 6 | setTimeout(() => { 7 | fn.apply(this, arguments) 8 | valid = true; 9 | }, delay) 10 | } 11 | } 12 | 13 | window.addEventListener('load', () => { 14 | let vw: number = window.innerWidth 15 | let vh: number = window.innerHeight 16 | let bg: Element = document.querySelector('.bg') 17 | 18 | const throttleReSize = throttle(() => { 19 | vw = window.innerWidth 20 | vh = window.innerHeight 21 | }, 300) 22 | 23 | window.addEventListener('resize', throttleReSize) 24 | 25 | window.addEventListener('mousemove', ({ clientX, clientY }) => { 26 | let ratoX = Number(clientX / vw * 0.5 * 100) 27 | let ratoY = Number(clientY / vh * 0.5 * 100) 28 | bg.style.backgroundPosition = `${ratoX}% ${ratoY}%` 29 | }, false) 30 | }) -------------------------------------------------------------------------------- /assets/ts/main.ts: -------------------------------------------------------------------------------- 1 | (function () { 2 | 3 | const currentTheme:string = window.localStorage.getItem('theme') || '' 4 | 5 | if (currentTheme && currentTheme !== 'auto') { 6 | switchTheme(currentTheme) 7 | } 8 | 9 | window.addEventListener('DOMContentLoaded', () => { 10 | /** moble click toggle menu */ 11 | const mobileMenuBtn:Element = document.querySelector('.header-nav--btn') 12 | mobileMenuBtn.addEventListener('click', function () { 13 | this.classList.toggle('open') 14 | }) 15 | 16 | /** theme change click */ 17 | const themeLightBtn = document.querySelector('#theme-light') 18 | const themeDarkBtn = document.querySelector('#theme-dark') 19 | const themeAuto = document.querySelector('#theme-auto') 20 | themeLightBtn.addEventListener('click', () => switchTheme('light')) 21 | themeDarkBtn.addEventListener('click', () => switchTheme('dark')) 22 | themeAuto.addEventListener('click', () => switchTheme('auto')) 23 | 24 | /** background image lazy */ 25 | const lazyBackgrounds = querySelectorArrs('[background-image-lazy]') 26 | let lazyBackgroundsCount = lazyBackgrounds.length 27 | if (lazyBackgroundsCount > 0) { 28 | let lazyBackgroundObserver = new IntersectionObserver(function(entries, observer) { 29 | entries.forEach(function({ isIntersecting, target }) { 30 | if (isIntersecting) { 31 | let img = target.dataset.img 32 | if (img) { 33 | target.style.backgroundImage = `url(${img})` 34 | } 35 | lazyBackgroundObserver.unobserve(target) 36 | lazyBackgroundsCount -- 37 | } 38 | if (lazyBackgroundsCount <= 0) { 39 | lazyBackgroundObserver.disconnect() 40 | } 41 | }) 42 | }) 43 | 44 | lazyBackgrounds.forEach(function(lazyBackground) { 45 | lazyBackgroundObserver.observe(lazyBackground) 46 | }) 47 | } 48 | 49 | /** aplayer init */ 50 | aplayerInit() 51 | /** dplayer init */ 52 | dplayerInit() 53 | }); 54 | })(); 55 | 56 | function toCamel(str:string) { 57 | const arrs = str.split('-') 58 | if (arrs.length === 1) return arrs[0] 59 | return arrs.reduce((accumulator:string, currentValue:string) => { 60 | return accumulator + currentValue.toLowerCase().replace(/( |^)[a-z]/g, v => v.toUpperCase()) 61 | }) 62 | } 63 | 64 | /** 65 | * 处理aplayer || dplayer 参数 66 | * @param el aplayer || dplayer dom 67 | * @returns 配置项参数 68 | */ 69 | function formatAttr(el:Element): object { 70 | const config = {} 71 | const numberList = ['lrcType'] 72 | const boolMap = new Map([ 73 | ['true', true], 74 | ['false', false], 75 | ]) 76 | const attrs = el.getAttributeNames().filter(key => key.startsWith('config-')) 77 | attrs.forEach(attr => { 78 | const key = toCamel(attr.replace('config-', '')) 79 | const value = el.getAttribute(attr) 80 | const toBool = boolMap.get(value) 81 | 82 | if (toBool !== undefined) { /** 处理bool值 */ 83 | config[key] = toBool 84 | } else if (numberList.includes(key)) { /** 处理number值 */ 85 | config[key] = parseInt(value) 86 | } else { /** string */ 87 | config[key] = value 88 | } 89 | }) 90 | return config 91 | } 92 | 93 | function querySelectorArrs (selector:string):Array { 94 | return Array.from(document.querySelectorAll(selector)) 95 | } 96 | 97 | function switchTheme (theme:string) { 98 | const rootDom:Element = document.documentElement 99 | if (theme === 'auto') { 100 | rootDom.classList.remove('theme-dark') 101 | rootDom.classList.remove('theme-light') 102 | } 103 | if (theme === 'dark') { 104 | rootDom.classList.remove('theme-light') 105 | rootDom.classList.add('theme-dark') 106 | } 107 | if (theme === 'light') { 108 | rootDom.classList.remove('theme-dark') 109 | rootDom.classList.add('theme-light') 110 | } 111 | window.localStorage.setItem('theme', theme) 112 | } 113 | 114 | function aplayerInit () { 115 | const aplayers = querySelectorArrs('.aplayer-box') 116 | if (aplayers.length && APlayer) { 117 | aplayers.forEach(el => { 118 | const params = { container: el, audio: { ...el.dataset } } 119 | const config = formatAttr(el) 120 | new APlayer(Object.assign({}, config, params)) 121 | }) 122 | } 123 | } 124 | 125 | function dplayerInit () { 126 | const dplayers = querySelectorArrs('.dplayer-box') 127 | if (dplayers.length && DPlayer) { 128 | dplayers.forEach(el => { 129 | const params = { container: el, video: { ...el.dataset } } 130 | const config = formatAttr(el) 131 | new DPlayer(Object.assign({}, config, params)) 132 | }) 133 | } 134 | } -------------------------------------------------------------------------------- /exampleSite/config.toml: -------------------------------------------------------------------------------- 1 | baseURL = "https://example.com" 2 | languageCode = "en-us" 3 | title = "梨花细雨不见鹿" 4 | theme = "kagome" 5 | paginate = 7 6 | copyright = "© 2021 kagome." 7 | hasCJKLanguage = true 8 | 9 | # 作者信息 10 | [author] 11 | name = "Sukoshi" 12 | email = "guanquanhong@163.com" 13 | description = "梅花鹿的角叫鹿角" 14 | avatar = "https://s.gravatar.com/avatar/7b5a0b07a98895278cfa862b1f32ae8f?s=200&r=g&d=retro" 15 | 16 | # 菜单/导航栏 17 | [menu] 18 | # 顶部导航栏 19 | [[menu.main]] 20 | identifier = "/" 21 | name = "HOME" 22 | url = "/" 23 | weight = 1 24 | [[menu.main]] 25 | identifier = "/posts" 26 | name = "POSTS" 27 | url = "/posts" 28 | weight = 2 29 | [[menu.main]] 30 | identifier = "/message" 31 | name = "MESSAGE" 32 | url = "/message" 33 | weight = 3 34 | [[menu.main]] 35 | identifier = "/link" 36 | name = "LINK" 37 | url = "/link" 38 | weight = 4 39 | 40 | # 底部社交图标 41 | [[menu.social]] 42 | identifier = "github" 43 | name = "github" 44 | url = "https://github.com/miiiku" 45 | weight = 1 46 | [[menu.social]] 47 | identifier = "twitter" 48 | name = "twitter" 49 | url = "https://twitter.com/guanquanhong" 50 | weight = 2 51 | [[menu.social]] 52 | identifier = "instagram" 53 | name = "instagram" 54 | url = "https://www.instagram.com/sukoshi_dayo/" 55 | weight = 3 56 | [[menu.social]] 57 | identifier = "weibo" 58 | name = "weibo" 59 | url = "https://weibo.com/u/5561168966" 60 | weight = 4 61 | [[menu.social]] 62 | identifier = "zhihu" 63 | name = "zhihu" 64 | url = "https://www.zhihu.com/people/miku-84" 65 | weight = 5 66 | 67 | # URL格式 68 | [permalinks] 69 | posts = "/:section/:year:month:day:15:04/" 70 | files = "/:section/:year:month:day:15:04/" 71 | docs = "/:section/:year:month:day:15:04/" 72 | 73 | # 主题相关配置项 74 | [params] 75 | keywords = ['theme', 'kagome'] 76 | description = "" 77 | mainSections = ["posts"] 78 | # 国内备案号 79 | beian = "" 80 | # TOC目录出现字符长度限制 81 | toc_show_len = 300 82 | 83 | [params.analytics] 84 | baidu = "" 85 | 86 | [params.widget] 87 | # 相关文章推荐数量 88 | articles_count = 6 89 | # 分类相关显示数量 90 | categories_count = 6 91 | # 标签相关显示数量 92 | tags_count = 12 93 | 94 | [params.aplayer] 95 | theme = "#b7daff" 96 | autoplay = false 97 | loop = "none" 98 | mutex = true 99 | 100 | [params.dplayer] 101 | theme = "#b7daff" 102 | autoplay = false 103 | loop = false 104 | mutex = true 105 | -------------------------------------------------------------------------------- /exampleSite/resources/_gen/assets/scss/scss/404/index.scss_b98b5e972f5f195c32bfc8ba6d50ffcd.content: -------------------------------------------------------------------------------- 1 | :root{--layout-max-width: 1200px;--base-font: var(--font-base-size) / var(--font-base-lh) 'Open Sans', sans-serif;--soft-shadow: 3px}@media screen and (min-width: 768px){:root{--layout-max-width: 1200px;--layout-padding-x: 20px;--font-large-size: 46px;--font-stress-size: 22px;--font-common-size: 16px;--font-base-size: 14px;--font-base-lh: 1.8;--content-large-padding: 40px 38px 46px;--content-primary-padding: 23px;--soft-large-radius: 24px;--soft-primary-radius: 12px;--soft-small-radius: 6px}}@media screen and (max-width: 767px){:root{--layout-max-width: 100%;--layout-padding-x: 10px;--font-large-size: 22px;--font-stress-size: 18px;--font-common-size: 14px;--font-base-size: 12px;--font-base-lh: 1.4;--content-large-padding: 18px 15px 20px;--content-primary-padding: 16px;--soft-large-radius: 16px;--soft-primary-radius: 10px;--soft-small-radius: 6px}}.theme-light:root{--theme-bg-primary: #f5f8fa;--theme-bg-high: #fff;--theme-bg-shadow: #dddfe1;--theme-bg-actvie1: #dddfe1;--theme-bg-actvie2: #fff;--theme-text-active: #f857a6;--theme-text-light: #fff;--theme-text-primary: #3e3e5f;--theme-text-low: #aeacb1;--theme-text-stress: #14281D;--theme-border-primary: #e1e4e8;--theme-border-secondary: #ebedef}.theme-dark:root{--theme-bg-primary: #1e2428;--theme-bg-high: #303a40;--theme-bg-shadow: #0c0e10;--theme-bg-actvie1: #1b2024;--theme-bg-actvie2: #20272b;--theme-text-active: #ca5388;--theme-text-light: #d7dfe6;--theme-text-primary: #adbac7;--theme-text-low: #444c56;--theme-text-stress: #cdd9e5;--theme-border-primary: #444c56;--theme-border-secondary: #373e47}@media (prefers-color-scheme: light){:root{--theme-bg-primary: #f5f8fa;--theme-bg-high: #fff;--theme-bg-shadow: #dddfe1;--theme-bg-actvie1: #dddfe1;--theme-bg-actvie2: #fff;--theme-text-active: #f857a6;--theme-text-light: #fff;--theme-text-primary: #3e3e5f;--theme-text-low: #aeacb1;--theme-text-stress: #14281D;--theme-border-primary: #e1e4e8;--theme-border-secondary: #ebedef}}@media (prefers-color-scheme: dark){:root{--theme-bg-primary: #1e2428;--theme-bg-high: #303a40;--theme-bg-shadow: #0c0e10;--theme-bg-actvie1: #1b2024;--theme-bg-actvie2: #20272b;--theme-text-active: #ca5388;--theme-text-light: #d7dfe6;--theme-text-primary: #adbac7;--theme-text-low: #444c56;--theme-text-stress: #cdd9e5;--theme-border-primary: #444c56;--theme-border-secondary: #373e47}}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;vertical-align:baseline;font-size:100%}html{box-sizing:border-box;font:var(--base-font);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{font-size:14px;line-height:1}*,*:before,*:after{box-sizing:inherit}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-spacing:0;border-collapse:collapse}img{max-width:100%}a{background-color:transparent;text-decoration:none;color:inherit}a:active,a:hover{outline:0}b,strong{font-weight:bold}i,em,dfn{font-style:italic}body{background-color:var(--theme-bg-primary);transition:background-color .3s ease-out}.text-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.center-bg{background-repeat:no-repeat;background-position:center;background-size:cover}.layout-padding{padding:var(--layout-padding-x)}.layout-margin{margin:var(--layout-padding-x)}.layout-block{width:100%;max-width:var(--layout-max-width);margin-left:auto;margin-right:auto}.content-padding-large{padding:var(--content-large-padding)}.content-padding-primary{padding:var(--content-primary-padding)}.soft-size--large[class*=soft-size--]{--radius: var(--soft-large-radius)}.soft-size--primary[class*=soft-size--]{--radius: var(--soft-primary-radius)}.soft-size--small[class*=soft-size--]{--radius: var(--soft-small-radius)}.soft-size--round[class*=soft-size--]{--radius: 50%}[class*=soft-style--]{transition:border-radius .3s ease-out,box-shadow .3s ease-out,background-image .3s ease-out}.soft-style--box[class*=soft-style--]{overflow:hidden;border-radius:var(--radius);background-color:var(--theme-bg-primary);box-shadow:var(--soft-shadow) var(--soft-shadow) calc(var(--soft-shadow) * 2) var(--theme-bg-shadow),calc(-1 * var(--soft-shadow)) calc(-1 * var(--soft-shadow)) calc(var(--soft-shadow) * 2) var(--theme-bg-high)}.soft-style--hover[class*=soft-style--]:hover{overflow:hidden;border-radius:var(--radius);background-color:var(--theme-bg-primary);box-shadow:var(--soft-shadow) var(--soft-shadow) calc(var(--soft-shadow) * 2) var(--theme-bg-shadow),calc(-1 * var(--soft-shadow)) calc(-1 * var(--soft-shadow)) calc(var(--soft-shadow) * 2) var(--theme-bg-high)}.soft-style--active[class*=soft-style--]:active{overflow:hidden;border-radius:var(--radius);background-color:var(--theme-bg-primary);background-image:linear-gradient(145deg, var(--theme-text-active1), var(--theme-text-active2));box-shadow:inset var(--soft-shadow) var(--soft-shadow) calc(var(--soft-shadow) * 2) var(--theme-bg-shadow),inset calc(-1 * var(--soft-shadow)) calc(-1 * var(--soft-shadow)) calc(var(--soft-shadow) * 2) var(--theme-bg-high)}.container{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100vw;height:100vh;background-color:var(--theme-bg-primary)}.bg-text{position:relative;text-align:center;font-family:'Big Shoulders Stencil Display', cursive;font-size:180px;color:var(--theme-text-primary);letter-spacing:24px;user-select:none}.bg-text .text{color:var(--theme-text-primary);text-shadow:2px 2px 4px var(--theme-bg-shadow),-2px -2px 4px var(--theme-bg-high)}.bg-text .bg{display:block;width:100%;height:100%;top:0;left:0;position:absolute;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;background-image:url("/image/404.png");background-size:150%;background-repeat:no-repeat;background-position:attr(x, y)}.btn-box{margin:20px 0}.btn-box a{margin:10px;padding:6px 12px;display:inline-flex;align-items:center;color:var(--theme-text-primary);transition:background-color .3s ease-out,box-shadow .3s ease-out}.btn-box a svg{width:32px;height:32px;margin-right:6px} 2 | -------------------------------------------------------------------------------- /exampleSite/resources/_gen/assets/scss/scss/404/index.scss_b98b5e972f5f195c32bfc8ba6d50ffcd.json: -------------------------------------------------------------------------------- 1 | {"Target":"assets/css/404.min.c62621dcff56c4d2e1c3367957ab3991ccd48062a838e71840adb258bea1f868.css","MediaType":"text/css","Data":{"Integrity":"sha256-xiYh3P9WxNLhwzZ5V6s5kczUgGKoOOcYQK2yWL6h+Gg="}} -------------------------------------------------------------------------------- /exampleSite/resources/_gen/assets/scss/scss/index/index.scss_f89e1ab8e79fb5b4e88c8331b38c808f.content: -------------------------------------------------------------------------------- 1 | :root{--layout-max-width: 1200px;--base-font: var(--font-base-size) / var(--font-base-lh) 'Open Sans', sans-serif;--soft-shadow: 3px}@media screen and (min-width: 768px){:root{--layout-max-width: 1200px;--layout-padding-x: 20px;--font-large-size: 46px;--font-stress-size: 22px;--font-common-size: 16px;--font-base-size: 14px;--font-base-lh: 1.8;--content-large-padding: 40px 38px 46px;--content-primary-padding: 23px;--soft-large-radius: 24px;--soft-primary-radius: 12px;--soft-small-radius: 6px}}@media screen and (max-width: 767px){:root{--layout-max-width: 100%;--layout-padding-x: 10px;--font-large-size: 22px;--font-stress-size: 18px;--font-common-size: 14px;--font-base-size: 12px;--font-base-lh: 1.4;--content-large-padding: 18px 15px 20px;--content-primary-padding: 16px;--soft-large-radius: 16px;--soft-primary-radius: 10px;--soft-small-radius: 6px}}.theme-light:root{--theme-bg-primary: #f5f8fa;--theme-bg-high: #fff;--theme-bg-shadow: #dddfe1;--theme-bg-actvie1: #dddfe1;--theme-bg-actvie2: #fff;--theme-text-active: #f857a6;--theme-text-light: #fff;--theme-text-primary: #3e3e5f;--theme-text-low: #aeacb1;--theme-text-stress: #14281D;--theme-border-primary: #e1e4e8;--theme-border-secondary: #ebedef}.theme-dark:root{--theme-bg-primary: #1e2428;--theme-bg-high: #303a40;--theme-bg-shadow: #0c0e10;--theme-bg-actvie1: #1b2024;--theme-bg-actvie2: #20272b;--theme-text-active: #ca5388;--theme-text-light: #d7dfe6;--theme-text-primary: #adbac7;--theme-text-low: #444c56;--theme-text-stress: #cdd9e5;--theme-border-primary: #444c56;--theme-border-secondary: #373e47}@media (prefers-color-scheme: light){:root{--theme-bg-primary: #f5f8fa;--theme-bg-high: #fff;--theme-bg-shadow: #dddfe1;--theme-bg-actvie1: #dddfe1;--theme-bg-actvie2: #fff;--theme-text-active: #f857a6;--theme-text-light: #fff;--theme-text-primary: #3e3e5f;--theme-text-low: #aeacb1;--theme-text-stress: #14281D;--theme-border-primary: #e1e4e8;--theme-border-secondary: #ebedef}}@media (prefers-color-scheme: dark){:root{--theme-bg-primary: #1e2428;--theme-bg-high: #303a40;--theme-bg-shadow: #0c0e10;--theme-bg-actvie1: #1b2024;--theme-bg-actvie2: #20272b;--theme-text-active: #ca5388;--theme-text-light: #d7dfe6;--theme-text-primary: #adbac7;--theme-text-low: #444c56;--theme-text-stress: #cdd9e5;--theme-border-primary: #444c56;--theme-border-secondary: #373e47}}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;vertical-align:baseline;font-size:100%}html{box-sizing:border-box;font:var(--base-font);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{font-size:14px;line-height:1}*,*:before,*:after{box-sizing:inherit}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-spacing:0;border-collapse:collapse}img{max-width:100%}a{background-color:transparent;text-decoration:none;color:inherit}a:active,a:hover{outline:0}b,strong{font-weight:bold}i,em,dfn{font-style:italic}body{background-color:var(--theme-bg-primary);transition:background-color .3s ease-out}.text-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.center-bg{background-repeat:no-repeat;background-position:center;background-size:cover}.layout-padding{padding:var(--layout-padding-x)}.layout-margin{margin:var(--layout-padding-x)}.layout-block{width:100%;max-width:var(--layout-max-width);margin-left:auto;margin-right:auto}.content-padding-large{padding:var(--content-large-padding)}.content-padding-primary{padding:var(--content-primary-padding)}.soft-size--large[class*=soft-size--]{--radius: var(--soft-large-radius)}.soft-size--primary[class*=soft-size--]{--radius: var(--soft-primary-radius)}.soft-size--small[class*=soft-size--]{--radius: var(--soft-small-radius)}.soft-size--round[class*=soft-size--]{--radius: 50%}[class*=soft-style--]{transition:border-radius .3s ease-out,box-shadow .3s ease-out,background-image .3s ease-out}.soft-style--box[class*=soft-style--]{overflow:hidden;border-radius:var(--radius);background-color:var(--theme-bg-primary);box-shadow:var(--soft-shadow) var(--soft-shadow) calc(var(--soft-shadow) * 2) var(--theme-bg-shadow),calc(-1 * var(--soft-shadow)) calc(-1 * var(--soft-shadow)) calc(var(--soft-shadow) * 2) var(--theme-bg-high)}.soft-style--hover[class*=soft-style--]:hover{overflow:hidden;border-radius:var(--radius);background-color:var(--theme-bg-primary);box-shadow:var(--soft-shadow) var(--soft-shadow) calc(var(--soft-shadow) * 2) var(--theme-bg-shadow),calc(-1 * var(--soft-shadow)) calc(-1 * var(--soft-shadow)) calc(var(--soft-shadow) * 2) var(--theme-bg-high)}.soft-style--active[class*=soft-style--]:active{overflow:hidden;border-radius:var(--radius);background-color:var(--theme-bg-primary);background-image:linear-gradient(145deg, var(--theme-text-active1), var(--theme-text-active2));box-shadow:inset var(--soft-shadow) var(--soft-shadow) calc(var(--soft-shadow) * 2) var(--theme-bg-shadow),inset calc(-1 * var(--soft-shadow)) calc(-1 * var(--soft-shadow)) calc(var(--soft-shadow) * 2) var(--theme-bg-high)}.header-container .header-inner{position:relative;display:flex;align-items:center;justify-content:space-between}.header-container .header-logo h1{font-size:var(--font-large-size);font-weight:bolder;font-family:monospace, sans-serif;white-space:nowrap;color:var(--theme-text-primary);transition:color .3s ease-out,text-shadow .3s ease-out;color:var(--theme-text-primary);text-shadow:2px 2px 4px var(--theme-bg-shadow),-2px -2px 4px var(--theme-bg-high)}.header-container .header-nav{padding-left:40px}.header-container .header-nav .header-nav--btn{position:relative;width:24px;height:24px;cursor:pointer;user-select:none}.header-container .header-nav .header-nav--btn.open div.btn-item{transition:transform 0.3s ease 0.3s}.header-container .header-nav .header-nav--btn.open div.btn-item::before{transition:transform 0.3s ease, opacity 0.3s ease 0.3s}.header-container .header-nav .header-nav--btn.open div.btn-item:nth-child(1){transform:rotate(45deg)}.header-container .header-nav .header-nav--btn.open div.btn-item:nth-child(1)::before{transform:translateY(0)}.header-container .header-nav .header-nav--btn.open div.btn-item:nth-child(2)::before{opacity:0}.header-container .header-nav .header-nav--btn.open div.btn-item:nth-child(3){transform:rotate(-45deg)}.header-container .header-nav .header-nav--btn.open div.btn-item:nth-child(3)::before{transform:translateY(0)}.header-container .header-nav .header-nav--btn .btn-item{position:absolute;top:0;left:0;width:100%;height:100%;transform-origin:center;transition:transform .3s ease-out}.header-container .header-nav .header-nav--btn .btn-item:nth-child(1):before{transform:translateY(-8px)}.header-container .header-nav .header-nav--btn .btn-item:nth-child(3):before{transform:translateY(8px)}.header-container .header-nav .header-nav--btn .btn-item::before{position:absolute;content:"";left:0;right:0;top:0;bottom:0;margin:auto;width:100%;height:2px;border-radius:2px;background-color:var(--theme-text-stress);transition:background-color 0.3s ease, transform 0.3s ease 0.3s, opacity 0.3s ease 0.3s}.header-container .header-nav a.list-item{display:inline-block;color:var(--theme-text-primary);font-size:var(--font-common-size);font-weight:bolder;overflow:hidden}@media screen and (min-width: 768px){.header-container .header-nav--btn{display:none}.header-container .header-nav--list{display:block}.header-container .header-nav--list .list-item{padding:8px 10px}}@media screen and (max-width: 767px){.header-container .header-inner{overflow:inherit !important}.header-container .header-nav--btn{display:block}.header-container .header-nav--btn.open+.header-nav--list{display:block}.header-container .header-nav--list{overflow:inherit !important;display:none;position:absolute;z-index:9;top:100%;right:28px;transform:translateY(-20px)}.header-container .header-nav--list::before,.header-container .header-nav--list::after{position:absolute;top:0;right:12px;content:"";display:block;width:10px;height:10px;transform-origin:center;transform:translate(50%, -50%) rotate(-45deg);background-color:var(--theme-bg-primary)}.header-container .header-nav--list::before{box-shadow:1px 1px calc(1px * 2) var(--theme-bg-shadow), calc(-1 * 1px) calc(-1 * 1px) calc(1px * 2) var(--theme-bg-high)}.header-container .header-nav--list>div{overflow:hidden;border-radius:var(--soft-small-radius);background-color:var(--theme-bg-primary);box-shadow:var(--soft-shadow) var(--soft-shadow) calc(var(--soft-shadow) * 2) var(--theme-bg-shadow), calc(-1 * var(--soft-shadow)) calc(-1 * var(--soft-shadow)) calc(var(--soft-shadow) * 2) var(--theme-bg-high);position:relative;padding:6px 8px}.header-container .header-nav--list a.list-item{display:block;text-align:left;padding:14px 12px;transition:color .3s ease-out}}.footer-container{text-align:center;padding:40px 0}.footer-container .social-icons{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;padding-bottom:20px}.footer-container .social-icons a{display:block;text-align:center;margin:10px;width:45px;height:45px;padding:10px}.footer-container .social-icons a:hover svg.icon{fill:var(--theme-text-stress)}.footer-container .social-icons a svg.icon{display:block;fill:var(--theme-text-low);transition:fill .3s ease-out}.footer-container .colour-bar{width:150px;max-width:76%;height:5px;background:linear-gradient(45deg, #D83A56 0, #D83A56 25%, #FF616D 25%, #FF616D 50%, #B6C9F0 50%, #B6C9F0 75%, #66DE93 75%, #66DE93 100%);margin:auto}.footer-container p{margin:6px 0;color:var(--theme-text-primary);line-height:var(--font-base-lh);transition:color .3s ease-out}.footer-container a{margin:0 3px;font-weight:bolder;color:var(--theme-text-stress);transition:color .3s ease-out}.footer-container a:hover{color:var(--theme-text-active)}.card-container{position:relative}.card-container.img{padding:0}.card-container.img .card-cover{position:relative;overflow:hidden}.card-container.img .card-cover>img{display:block;width:100%;max-height:380px;object-fit:cover}.card-container.img .card-text{position:absolute;bottom:0;left:0;right:0;padding:var(--content-large-padding)}.card-container .card-cover{position:absolute;top:0;right:0;bottom:0;left:0;background-repeat:no-repeat;background-position:center;background-size:cover;background-image:#ff5858;background-image:linear-gradient(1deg, #f857a6, #ff5858)}.card-container .card-cover::after{content:"";display:block;position:absolute;top:0;left:0;width:100%;height:100%;opacity:0.3;background-image:linear-gradient(234deg, #394245 0%, #000 100%)}.card-container .card-text{line-height:var(--font-base-lh);color:var(--theme-text-light);position:relative;transition:color .3s ease-out}.card-container .card-text .card-text--title{font-size:var(--font-stress-size);font-weight:bolder}.card-container .card-text .card-text--row{font-size:var(--font-common-size);margin-top:var(--layout-padding-x)}.card-container .card-text .card-text--tag{display:flex;flex-wrap:wrap;margin-top:18px;margin-left:-8px;margin-right:-8px}.card-container .card-text .card-text--tag a{border-radius:20px;padding:4px 8px;transition:color 0.3s ease, background-color 0.3s ease}.card-container .card-text .card-text--tag a::before{content:"#";margin-right:4px}.card-container .card-text .card-text--tag a:hover{color:var(--theme-text-active);background-color:#fff}.section-swiper{display:flex;overflow-x:auto;scroll-snap-type:x proximity}.section-swiper::-webkit-scrollbar{display:none}.section-swiper .swiper-item{padding:var(--layout-padding-x);scroll-snap-align:center}@media screen and (min-width: 768px){.section-swiper .swiper-item{width:25%;flex:0 0 25%;min-width:25%}}@media screen and (max-width: 767px){.section-swiper .swiper-item{width:50%;flex:1 1 50%;min-width:50%}}.article-list{display:flex;flex-wrap:wrap}.article-list .article-card{height:100%}.article-list .article-item{padding:var(--layout-padding-x);max-width:100%;flex:1 0 auto}@media screen and (min-width: 768px){.article-list .article-item{min-width:25%}}@media screen and (max-width: 767px){.article-list .article-item{width:100%;min-width:230px}}.article-list .article-item:nth-child(1n) .article-card .card-cover{background-color:#e77842;background-image:linear-gradient(45deg, #e77842, #f7c068)}.article-list .article-item:nth-child(2n) .article-card .card-cover{background-image:#ff5858;background-image:linear-gradient(1deg, #f857a6, #ff5858)}.article-list .article-item:nth-child(3n) .article-card .card-cover{background-color:#b53cff;background-image:linear-gradient(20deg, #b53cff, #f952ff)}.article-list .article-item:nth-child(4n) .article-card .card-cover{background-color:#6bd0ff;background-image:linear-gradient(40deg, #327ae7, #6bd0ff)}.article-list .article-item:nth-child(5n) .article-card .card-cover{background-color:#ffd62e;background-image:linear-gradient(40deg, #ffb040, #ffd62e)}.article-paging{display:flex;flex-wrap:wrap}.article-paging .post-paging--item{margin:var(--layout-padding-x);color:var(--theme-text-light);text-align:center;flex:1;transition:color .3s ease-out}.single-container{display:flex;align-items:flex-start;overflow:visible}.single-container .article-content{padding:var(--layout-padding-x)}.single-container .widget-info{position:sticky;top:0;width:360px;min-width:360px;display:flex;flex-direction:column}@media screen and (min-width: 768px){.single-container .article-info{flex:0 1 calc(100% - 360px);min-width:calc(100% - 360px)}.single-container .widget-info{display:flex}}@media screen and (max-width: 767px){.single-container .article-info{flex:1 1 100%;width:100%}.single-container .widget-info{display:none}}.links-content .links-wrap{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center}@media screen and (min-width: 768px){.links-content .link-item{max-width:100%;min-width:33.333%;flex:1 0 auto}}@media screen and (max-width: 767px){.links-content .link-item{max-width:100%;flex:1 1 50%}}.links-content .link-item>a{display:flex;align-items:center;transition:color .3s ease-out;height:100%}.links-content .link-item>a img{display:block;width:46px;min-width:46px;height:46px;margin-right:12px;object-fit:cover;flex:0 0 46px}.links-content .link-item>a div{overflow:hidden;line-height:var(--font-base-lh)}.links-content .link-item>a h4{font-weight:bold;color:var(--theme-text-stress)}.links-content .link-item>a p{color:var(--theme-text-primary)}.terms-container .terms-inner{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center}@media screen and (min-width: 768px){.terms-container .terms-inner .term-item{max-width:50%}}@media screen and (max-width: 767px){.terms-container .terms-inner .term-item{max-width:100%;flex:1 1 auto}}.terms-container .terms-inner .term-item>a{position:relative;display:block;height:100%;font-weight:bold;color:var(--theme-text-primary)}@media screen and (min-width: 768px){.terms-container .terms-inner .term-item>a{padding-right:100px}}@media screen and (max-width: 767px){.terms-container .terms-inner .term-item>a{padding-right:40px}}.terms-container .terms-inner .term-item>a::after{display:block;position:absolute;right:10px;bottom:10px;font-size:var(--font-large-size);line-height:1;content:attr(data-count);opacity:0.3}.markdown-body .octicon{display:inline-block;fill:currentColor;vertical-align:text-bottom}.markdown-body .anchor{float:left;line-height:1;margin-left:-20px;padding-right:4px}.markdown-body .anchor:focus{outline:none}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:#1b1f23;vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1:hover .anchor .octicon-link:before,.markdown-body h2:hover .anchor .octicon-link:before,.markdown-body h3:hover .anchor .octicon-link:before,.markdown-body h4:hover .anchor .octicon-link:before,.markdown-body h5:hover .anchor .octicon-link:before,.markdown-body h6:hover .anchor .octicon-link:before{width:16px;height:16px;content:' ';display:inline-block;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' width='16' height='16' aria-hidden='true'%3E%3Cpath fill-rule='evenodd' d='M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z'%3E%3C/path%3E%3C/svg%3E")}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:var(--theme-text-primary);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;font-size:var(--font-base-size);line-height:var(--font-base-lh);word-wrap:break-word;transition:color .3s ease-out}.markdown-body details{display:block}.markdown-body summary{display:list-item}.markdown-body a{background-color:initial}.markdown-body a:active,.markdown-body a:hover{outline-width:0}.markdown-body strong{font-weight:inherit;font-weight:bolder}.markdown-body h1{font-size:2em;margin:.67em 0}.markdown-body img{border-style:none}.markdown-body code,.markdown-body kbd,.markdown-body pre{font-family:monospace,monospace;font-size:1em}.markdown-body hr{box-sizing:initial;height:0;overflow:visible}.markdown-body input{font:inherit;margin:0}.markdown-body input{overflow:visible}.markdown-body [type=checkbox]{box-sizing:border-box;padding:0}.markdown-body *{box-sizing:border-box}.markdown-body input{font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body a{color:#0366d6;text-decoration:none}.markdown-body a:hover{text-decoration:underline}.markdown-body strong{font-weight:600}.markdown-body hr{height:0;margin:15px 0;overflow:hidden;background:transparent;border:0;border-bottom:1px solid var(--theme-border-primary);transition:border-color .3s ease-out}.markdown-body hr:after,.markdown-body hr:before{display:table;content:""}.markdown-body hr:after{clear:both}.markdown-body table{border-spacing:0;border-collapse:collapse}.markdown-body td,.markdown-body th{padding:0}.markdown-body details summary{cursor:pointer}.markdown-body kbd{display:inline-block;padding:3px 5px;font:11px SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;line-height:10px;color:#444d56;vertical-align:middle;background-color:#fafbfc;border:1px solid #d1d5da;border-radius:3px;box-shadow:inset 0 -1px 0 #d1d5da}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:0;margin-bottom:0}.markdown-body h1{font-size:32px}.markdown-body h1,.markdown-body h2{font-weight:600}.markdown-body h2{font-size:24px}.markdown-body h3{font-size:20px}.markdown-body h3,.markdown-body h4{font-weight:600}.markdown-body h4{font-size:16px}.markdown-body h5{font-size:14px}.markdown-body h5,.markdown-body h6{font-weight:600}.markdown-body h6{font-size:12px}.markdown-body p{margin-top:0;margin-bottom:10px}.markdown-body blockquote{margin:0}.markdown-body ol,.markdown-body ul{padding-left:0;margin-top:0;margin-bottom:0;list-style:initial}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body code,.markdown-body pre{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0}.markdown-body input::-webkit-inner-spin-button,.markdown-body input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none;appearance:none}.markdown-body :checked+.radio-label{position:relative;z-index:1;border-color:#0366d6}.markdown-body .border{border:1px solid #e1e4e8 !important}.markdown-body .border-0{border:0 !important}.markdown-body .border-bottom{border-bottom:1px solid #e1e4e8 !important}.markdown-body .rounded-1{border-radius:3px !important}.markdown-body .bg-white{background-color:#fff !important}.markdown-body .bg-gray-light{background-color:#fafbfc !important}.markdown-body .text-gray-light{color:#6a737d !important}.markdown-body .mb-0{margin-bottom:0 !important}.markdown-body .my-2{margin-top:8px !important;margin-bottom:8px !important}.markdown-body .pl-0{padding-left:0 !important}.markdown-body .py-0{padding-top:0 !important;padding-bottom:0 !important}.markdown-body .pl-1{padding-left:4px !important}.markdown-body .pl-2{padding-left:8px !important}.markdown-body .py-2{padding-top:8px !important;padding-bottom:8px !important}.markdown-body .pl-3,.markdown-body .px-3{padding-left:16px !important}.markdown-body .px-3{padding-right:16px !important}.markdown-body .pl-4{padding-left:24px !important}.markdown-body .pl-5{padding-left:32px !important}.markdown-body .pl-6{padding-left:40px !important}.markdown-body .f6{font-size:12px !important}.markdown-body .lh-condensed{line-height:1.25 !important}.markdown-body .text-bold{font-weight:600 !important}.markdown-body .pl-c{color:#6a737d}.markdown-body .pl-c1,.markdown-body .pl-s .pl-v{color:#005cc5}.markdown-body .pl-e,.markdown-body .pl-en{color:#6f42c1}.markdown-body .pl-s .pl-s1,.markdown-body .pl-smi{color:#24292e}.markdown-body .pl-ent{color:#22863a}.markdown-body .pl-k{color:#d73a49}.markdown-body .pl-pds,.markdown-body .pl-s,.markdown-body .pl-s .pl-pse .pl-s1,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sra,.markdown-body .pl-sr .pl-sre{color:#032f62}.markdown-body .pl-smw,.markdown-body .pl-v{color:#e36209}.markdown-body .pl-bu{color:#b31d28}.markdown-body .pl-ii{color:#fafbfc;background-color:#b31d28}.markdown-body .pl-c2{color:#fafbfc;background-color:#d73a49}.markdown-body .pl-c2:before{content:"^M"}.markdown-body .pl-sr .pl-cce{font-weight:700;color:#22863a}.markdown-body .pl-ml{color:#735c0f}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{font-weight:700;color:#005cc5}.markdown-body .pl-mi{font-style:italic;color:#24292e}.markdown-body .pl-mb{font-weight:700;color:#24292e}.markdown-body .pl-md{color:#b31d28;background-color:#ffeef0}.markdown-body .pl-mi1{color:#22863a;background-color:#f0fff4}.markdown-body .pl-mc{color:#e36209;background-color:#ffebda}.markdown-body .pl-mi2{color:#f6f8fa;background-color:#005cc5}.markdown-body .pl-mdr{font-weight:700;color:#6f42c1}.markdown-body .pl-ba{color:#586069}.markdown-body .pl-sg{color:#959da5}.markdown-body .pl-corl{text-decoration:underline;color:#032f62}.markdown-body .mb-0{margin-bottom:0 !important}.markdown-body .my-2{margin-bottom:8px !important}.markdown-body .my-2{margin-top:8px !important}.markdown-body .pl-0{padding-left:0 !important}.markdown-body .py-0{padding-top:0 !important;padding-bottom:0 !important}.markdown-body .pl-1{padding-left:4px !important}.markdown-body .pl-2{padding-left:8px !important}.markdown-body .py-2{padding-top:8px !important;padding-bottom:8px !important}.markdown-body .pl-3{padding-left:16px !important}.markdown-body .pl-4{padding-left:24px !important}.markdown-body .pl-5{padding-left:32px !important}.markdown-body .pl-6{padding-left:40px !important}.markdown-body .pl-7{padding-left:48px !important}.markdown-body .pl-8{padding-left:64px !important}.markdown-body .pl-9{padding-left:80px !important}.markdown-body .pl-10{padding-left:96px !important}.markdown-body .pl-11{padding-left:112px !important}.markdown-body .pl-12{padding-left:128px !important}.markdown-body hr{border-bottom-color:var(--theme-border-primary);transition:border-color .3s ease-out}.markdown-body kbd{display:inline-block;padding:3px 5px;font:11px SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;line-height:10px;color:#444d56;vertical-align:middle;background-color:#fafbfc;border:1px solid #d1d5da;border-radius:3px;box-shadow:inset 0 -1px 0 #d1d5da}.markdown-body:after,.markdown-body:before{display:table;content:""}.markdown-body:after{clear:both}.markdown-body>:first-child{margin-top:0 !important}.markdown-body>:last-child{margin-bottom:0 !important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body blockquote,.markdown-body details,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:16px}.markdown-body hr{height:.25em;padding:0;margin:24px 0;border:0;background-color:var(--theme-border-primary);transition:background-color .3s ease-out}.markdown-body blockquote{padding:0 1em;color:#6a737d;border-left:.25em solid #dfe2e5}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}.markdown-body h1{font-size:2em}.markdown-body h1,.markdown-body h2{padding-bottom:.3em;border-bottom:1px solid var(--theme-border-secondary)}.markdown-body h2{font-size:1.5em}.markdown-body h3{font-size:1.25em}.markdown-body h4{font-size:1em}.markdown-body h5{font-size:.875em}.markdown-body h6{font-size:.85em;color:#6a737d}.markdown-body ol,.markdown-body ul{padding-left:2em}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}.markdown-body li{word-wrap:break-all}.markdown-body li>p{margin-top:16px}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:600}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body table{display:block;width:100%;overflow:auto}.markdown-body table th{font-weight:600}.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #dfe2e5}.markdown-body table tr{background-color:#fff;border-top:1px solid #c6cbd1}.markdown-body table tr:nth-child(2n){background-color:#f6f8fa}.markdown-body img{max-width:100%;box-sizing:initial;background-color:#fff;overflow:hidden;border-radius:var(--soft-small-radius);background-color:var(--theme-bg-primary);box-shadow:var(--soft-shadow) var(--soft-shadow) calc(var(--soft-shadow) * 2) var(--theme-bg-shadow),calc(-1 * var(--soft-shadow)) calc(-1 * var(--soft-shadow)) calc(var(--soft-shadow) * 2) var(--theme-bg-high)}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body code{padding:.2em .4em;margin:0;font-size:85%;background-color:rgba(27,31,35,0.05);border-radius:3px}.markdown-body pre{word-wrap:normal}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:transparent;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f6f8fa;border-radius:3px}.markdown-body pre code{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:initial;border:0}.markdown-body .commit-tease-sha{display:inline-block;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:90%;color:#444d56}.markdown-body .full-commit .btn-outline:not(:disabled):hover{color:#005cc5;border-color:#005cc5}.markdown-body .blob-wrapper{overflow-x:auto;overflow-y:hidden}.markdown-body .blob-wrapper-embedded{max-height:240px;overflow-y:auto}.markdown-body .blob-num{width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.markdown-body .blob-num:hover{color:rgba(27,31,35,0.6)}.markdown-body .blob-num:before{content:attr(data-line-number)}.markdown-body .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.markdown-body .blob-code-inner{overflow:visible;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:12px;color:#24292e;word-wrap:normal;white-space:pre}.markdown-body .pl-token.active,.markdown-body .pl-token:hover{cursor:pointer;background:#ffea7f}.markdown-body .tab-size[data-tab-size="1"]{-moz-tab-size:1;tab-size:1}.markdown-body .tab-size[data-tab-size="2"]{-moz-tab-size:2;tab-size:2}.markdown-body .tab-size[data-tab-size="3"]{-moz-tab-size:3;tab-size:3}.markdown-body .tab-size[data-tab-size="4"]{-moz-tab-size:4;tab-size:4}.markdown-body .tab-size[data-tab-size="5"]{-moz-tab-size:5;tab-size:5}.markdown-body .tab-size[data-tab-size="6"]{-moz-tab-size:6;tab-size:6}.markdown-body .tab-size[data-tab-size="7"]{-moz-tab-size:7;tab-size:7}.markdown-body .tab-size[data-tab-size="8"]{-moz-tab-size:8;tab-size:8}.markdown-body .tab-size[data-tab-size="9"]{-moz-tab-size:9;tab-size:9}.markdown-body .tab-size[data-tab-size="10"]{-moz-tab-size:10;tab-size:10}.markdown-body .tab-size[data-tab-size="11"]{-moz-tab-size:11;tab-size:11}.markdown-body .tab-size[data-tab-size="12"]{-moz-tab-size:12;tab-size:12}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item+.task-list-item{margin-top:3px}.markdown-body .task-list-item input{margin:0 .2em .25em -1.6em;vertical-align:middle}.markdown-body .iframe-video{margin-bottom:20px;overflow:hidden;border-radius:var(--soft-small-radius);background-color:var(--theme-bg-primary);box-shadow:var(--soft-shadow) var(--soft-shadow) calc(var(--soft-shadow) * 2) var(--theme-bg-shadow),calc(-1 * var(--soft-shadow)) calc(-1 * var(--soft-shadow)) calc(var(--soft-shadow) * 2) var(--theme-bg-high)}.markdown-body .aplayer.aplayer-box{margin:0;margin-bottom:20px;background-color:var(--theme-bg-color);overflow:hidden;border-radius:var(--soft-small-radius);background-color:var(--theme-bg-primary);box-shadow:var(--soft-shadow) var(--soft-shadow) calc(var(--soft-shadow) * 2) var(--theme-bg-shadow),calc(-1 * var(--soft-shadow)) calc(-1 * var(--soft-shadow)) calc(var(--soft-shadow) * 2) var(--theme-bg-high)}.markdown-body .aplayer.aplayer-box .aplayer-info .aplayer-controller .aplayer-time{line-height:normal}.markdown-body .aplayer.aplayer-box .aplayer-lrc:before{background:linear-gradient(180deg, var(--theme-bg-color) 0, rgba(255,255,255,0))}.markdown-body .aplayer.aplayer-box .aplayer-lrc:after{background:linear-gradient(180deg, rgba(255,255,255,0) 0, var(--theme-bg-color))}.markdown-body .dplayer.dplayer-box{margin-bottom:20px;overflow:hidden;border-radius:var(--soft-small-radius);background-color:var(--theme-bg-primary);box-shadow:var(--soft-shadow) var(--soft-shadow) calc(var(--soft-shadow) * 2) var(--theme-bg-shadow),calc(-1 * var(--soft-shadow)) calc(-1 * var(--soft-shadow)) calc(var(--soft-shadow) * 2) var(--theme-bg-high)}.markdown-body .figure-image{margin-bottom:16px}.markdown-body .figure-image figcaption{margin-top:12px;text-align:center;color:var(--theme-text-low)}.aside-widget{margin:var(--layout-padding-x)}.aside-widget .widget-header{margin-bottom:20px}.aside-widget .widget-header .title{display:flex;align-items:center;padding-bottom:6px}.aside-widget .widget-header .title>span{color:var(--theme-text-stress);font-weight:500;font-size:var(--font-stress-size);letter-spacing:0.6px;text-transform:uppercase;transition:color .3s ease-out;color:var(--theme-text-primary);text-shadow:2px 2px 4px var(--theme-bg-shadow),-2px -2px 4px var(--theme-bg-high)}.aside-widget .widget-header::after{display:block;content:"";width:100%;height:2px;background-color:var(--theme-border-primary);transition:background-color .3s ease-out}.aside-widget .widget-footer{margin-top:8px;text-align:center}.aside-widget .widget-footer .more-link{color:var(--theme-text-stress);font:var(--base-font);transition:color .3s ease-out}.aside-widget .widget-footer .more-link.center{text-align:center}.aside-widget .widget-footer .more-link:hover{color:var(--theme-text-active)}.aside-widget .widget-footer .more-link:hover>svg{fill:var(--theme-text-active)}.aside-widget .widget-footer .more-link>svg{display:inline-block;vertical-align:middle;fill:var(--theme-text-stress);transition:fill .3s ease-out}.widget-author .author-box{display:flex;flex-direction:column;justify-content:center;position:relative;height:64px;color:var(--theme-text-primary)}.widget-author .author-box.avatar{padding-left:74px}.widget-author .author-box .author-avatar{position:absolute;top:0;bottom:0;left:0;width:64px;height:64px}.widget-author .author-box .author-name{height:32px;line-height:32px;font-weight:bolder;font-size:var(--font-stress-size)}.widget-author .author-box .author-desc{height:32px;line-height:32px;border-top:1px solid var(--theme-border-primary)}.widget-toc ul,.widget-toc ol{list-style:inherit;padding-left:20px}.widget-toc ul>li,.widget-toc ol>li{margin:16px 0}.widget-toc ul>li::marker,.widget-toc ol>li::marker{color:var(--theme-text-primary)}.widget-toc ul>li>a,.widget-toc ol>li>a{font:var(--base-font);color:var(--theme-text-primary);transition:color .3s ease-out}.widget-toc ul>li>a:hover,.widget-toc ol>li>a:hover{color:var(--theme-text-active)}.widget-articles .post-list{list-style:none}.widget-articles .post-list .post-item:not(:last-child){margin-bottom:15px}.widget-articles .post-list .post-item a{font:var(--base-font);color:var(--theme-text-active);font-weight:bolder;border-bottom:2px solid #dde0e0;transition:color .3s ease-out,border-color .3s ease-out}.widget-articles .post-list .post-item a:hover{border-color:var(--theme-text-active)}.widget-categories .categories-list{list-style:none}.widget-categories .categories-list>li{display:flex;align-items:center;justify-content:space-between;line-height:30px;padding-bottom:6px;border-bottom:1px solid var(--theme-border-secondary);transition:border-color .3s ease-out}.widget-categories .categories-list>li:not(:last-child){margin-bottom:6px}.widget-categories .categories-list>li>a{color:var(--theme-text-primary);transition:color .3s ease-out}.widget-categories .categories-list>li>span{display:inline-block;border-radius:20px;color:var(--theme-text-light);background-color:var(--theme-text-active);width:25px;height:25px;text-align:center;line-height:25px;font-size:12px;transition:color .3s ease-out,background-color .3s ease-out}.widget-tags .tags-list{display:flex;flex-wrap:wrap;gap:3px;margin:0 -10px}.widget-tags .tags-list>a{display:block;padding:8px 10px;color:var(--theme-text-primary)}.pagination-container{padding-top:16px;padding-bottom:16px}.pagination-container .pagination-list{display:flex;align-items:center;justify-content:center}.pagination-container .pagination-list li{padding:4px 6px;margin:8px;transition:color 0.3s ease;font-weight:bolder;font:var(--base-font);font-weight:bolder}.pagination-container .pagination-list li a{color:var(--theme-text-primary);transition:color .3s ease-out}.pagination-container .pagination-list li a:hover{color:var(--theme-text-active)}.pagination-container .pagination-list li span{color:var(--theme-text-low)} 2 | -------------------------------------------------------------------------------- /exampleSite/resources/_gen/assets/scss/scss/index/index.scss_f89e1ab8e79fb5b4e88c8331b38c808f.json: -------------------------------------------------------------------------------- 1 | {"Target":"assets/css/style.min.ed04846db99f4052c90d0c0a5f1d2dae1d62fedf7df9a2de82feaf3b4369721f.css","MediaType":"text/css","Data":{"Integrity":"sha256-7QSEbbmfQFLJDQwKXx0trh1i/t99+aLegv6vO0Npch8="}} -------------------------------------------------------------------------------- /i18n/en.yml: -------------------------------------------------------------------------------- 1 | categories: 2 | other: Categories 3 | 4 | tags: 5 | other: Tags 6 | 7 | toc: 8 | other: Toc 9 | 10 | related_posts: 11 | other: Related Posts 12 | 13 | show_all: 14 | other: show all 15 | 16 | search: 17 | other: Search 18 | 19 | comment: 20 | other: Comments 21 | 22 | newer: 23 | other: Newer 24 | 25 | older: 26 | other: Older 27 | 28 | theme: 29 | light: 30 | other: light 31 | 32 | dark: 33 | other: dark 34 | 35 | auto: 36 | other: auto 37 | 38 | total_count: 39 | other: "{{ . }} totals" 40 | 41 | children_total_count: 42 | other: "{{ . }} totals children" 43 | 44 | 404_page: 45 | btn1: 46 | other: Go Home 47 | btn2: 48 | other: Site Map 49 | -------------------------------------------------------------------------------- /i18n/ja.yml: -------------------------------------------------------------------------------- 1 | categories: 2 | other: カテゴリ 3 | 4 | tags: 5 | other: タグ 6 | 7 | toc: 8 | other: 目次 9 | 10 | related_posts: 11 | other: 関連の投稿 12 | 13 | show_all: 14 | other: すべてを表示 15 | 16 | search: 17 | other: 検索 18 | 19 | comment: 20 | other: コメント 21 | 22 | newer: 23 | other: 次の記事 24 | 25 | older: 26 | other: 前の記事 27 | 28 | theme: 29 | light: 30 | other: 明るい 31 | 32 | dark: 33 | other: 暗黒 34 | 35 | auto: 36 | other: 自動 37 | 38 | total_count: 39 | other: "合計{{ . }}つ" 40 | 41 | children_total_count: 42 | other: "合計{{ . }}サブモジュール" 43 | 44 | 404_page: 45 | btn1: 46 | other: ホームホーム 47 | btn2: 48 | other: サイトマップ 49 | -------------------------------------------------------------------------------- /i18n/zh-CN.yml: -------------------------------------------------------------------------------- 1 | categories: 2 | other: 分类 3 | 4 | tags: 5 | other: 聚合标签 6 | 7 | toc: 8 | other: 目录 9 | 10 | related_posts: 11 | other: 相关文章 12 | 13 | show_all: 14 | other: 显示全部 15 | 16 | search: 17 | other: 搜索 18 | 19 | comment: 20 | other: 留言 21 | 22 | newer: 23 | other: 上一篇 24 | 25 | older: 26 | other: 下一篇 27 | 28 | theme: 29 | light: 30 | other: 浅色 31 | 32 | dark: 33 | other: 深色 34 | 35 | auto: 36 | other: 自动 37 | 38 | total_count: 39 | other: 总计{{ . }}条 40 | 41 | children_total_count: 42 | other: 总计{{ . }}个子模块 43 | 44 | 404_page: 45 | btn1: 46 | other: 回到首页 47 | btn2: 48 | other: 站点地图 -------------------------------------------------------------------------------- /i18n/zh-TW.yml: -------------------------------------------------------------------------------- 1 | categories: 2 | other: 分類 3 | 4 | tags: 5 | other: 聚合標籤 6 | 7 | toc: 8 | other: 目錄 9 | 10 | related_posts: 11 | other: 最新文章 12 | 13 | show_all: 14 | other: 顯示全部 15 | 16 | search: 17 | other: 搜尋 18 | 19 | comment: 20 | other: 留言 21 | 22 | newer: 23 | other: 上壹篇 24 | 25 | older: 26 | other: 下壹篇 27 | 28 | theme: 29 | light: 30 | other: 淺色 31 | 32 | dark: 33 | other: 深色 34 | 35 | auto: 36 | other: 自動 37 | 38 | total_count: 39 | other: 總計{{ . }}條 40 | 41 | children_total_count: 42 | other: 總計{{ . }}個子模塊 43 | 44 | 404_page: 45 | btn1: 46 | other: 回到首頁 47 | btn2: 48 | other: 站點地圖 -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miiiku/hugo-theme-kagome/76f8e9ef8856909c4c557554da831eca723c3811/images/screenshot.png -------------------------------------------------------------------------------- /images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miiiku/hugo-theme-kagome/76f8e9ef8856909c4c557554da831eca723c3811/images/tn.png -------------------------------------------------------------------------------- /layouts/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{ if or .Params.author .Site.Author.name }} {{/* author */}} 9 | 10 | {{ end }} 11 | 12 | {{ if or .Keywords .Site.Params.keywords }} {{/* keywords */}} 13 | {{ $keywords := slice }} 14 | {{ with .Params.keywords }} 15 | {{ $keywords = . }} 16 | {{ else }} 17 | {{ with .Site.Params.keywords }} 18 | {{ $keywords = . }} 19 | {{ end }} 20 | {{ end }} 21 | 22 | {{ end }} 23 | 24 | {{ if or .Description .Site.Params.description }} {{/* description*/}} 25 | 26 | {{ end }} 27 | 28 | {{ $title := printf "%s 🌟 %s" "404" .Site.Title }} 29 | {{- $title -}} 30 | 31 | {{/* style */}} 32 | {{ $sass := resources.Get "scss/404/index.scss" }} 33 | {{ $options := (dict "targetPath" "assets/css/404.min.css" "outputStyle" "compressed") }} 34 | {{ $style := $sass | resources.ToCSS $options | resources.Fingerprint "sha256" }} 35 | 36 | 37 | {{/* script */}} 38 | {{- $js := resources.Get "ts/404.ts" -}} 39 | {{- $opts := dict "targetPath" "assets/js/404.min.js" "minify" hugo.IsProduction -}} 40 | {{- $script := $js | js.Build $opts | resources.Fingerprint "sha256" -}} 41 | 42 | 43 | 44 | 45 | 46 | 47 |
48 |
49 |

404

50 |

404

51 |
52 | 53 | 73 |
74 | 75 | {{- template "_internal/google_analytics.html" . -}} 76 | 77 | -------------------------------------------------------------------------------- /layouts/_default/_markup/render-image.html: -------------------------------------------------------------------------------- 1 | {{ if .Title }} 2 |
3 | {{ .PlainText | safeHTML }} 4 |
{{ .Title }}
5 |
6 | {{ else }} 7 |

{{ .PlainText | safeHTML }}

8 | {{ end }} -------------------------------------------------------------------------------- /layouts/_default/_markup/render-link.html: -------------------------------------------------------------------------------- 1 | {{ .Text | safeHTML }} -------------------------------------------------------------------------------- /layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{- partial "head.html" . -}} 4 | 5 | 6 | {{- partial "header.html" . -}} 7 |
8 | {{- block "main" . }}{{- end }} 9 |
10 | {{- partial "footer.html" . -}} 11 | 12 | {{- partial "footer-script" . -}} 13 | 14 | 15 | -------------------------------------------------------------------------------- /layouts/_default/list.html: -------------------------------------------------------------------------------- 1 |

list.html

2 | 3 | 4 | {{ .Kind }} -------------------------------------------------------------------------------- /layouts/_default/single-baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{- partial "head.html" . -}} 4 | 5 | 6 | {{- partial "header.html" . -}} 7 |
8 | 9 | 10 |
11 | 24 | 25 | {{- block "widget" . -}}{{- end -}} 26 |
27 |
28 | 29 | {{- partial "footer.html" . -}} 30 | 31 | {{- partial "footer-script" . -}} 32 | 33 | {{- partial "footer-single" . -}} 34 | 35 | 36 | -------------------------------------------------------------------------------- /layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{/* post single */}} 2 | {{ define "main" }} 3 | {{ $SingleDisable := .Params.Disable_comment }} {{/* 页面内控制是否禁用Disqus */}} 4 | {{ $ConfigDisable := .Site.Config.Privacy.Disqus.Disable }} {{/* config配置项控制是否禁用Disqus */}} 5 | {{ $Enable := $SingleDisable }} 6 | {{ if eq $Enable nil }} 7 | {{ $Enable = $ConfigDisable }} 8 | {{ end }} 9 | 10 | {{ if ne $Enable true }} 11 | {{- partial "disqus.html" . -}} 12 | {{ end }} 13 | 14 |
15 | {{ with .NextInSection }} 16 | {{ partial "card/card-paging.html" . }} 17 | {{ end }} 18 | {{ with .PrevInSection }} 19 | {{ partial "card/card-paging.html" . }} 20 | {{ end }} 21 |
22 | {{ end }} 23 | 24 | {{ define "widget" }} 25 | 36 | {{ end }} -------------------------------------------------------------------------------- /layouts/_default/term.html: -------------------------------------------------------------------------------- 1 | {{/* 某一分类的文章列表 */}} 2 | {{ define "main" }} 3 | {{ partial "card/card-banner.html" . }} 4 | 5 |
6 | {{ range .Pages }} 7 | {{ partial "card/card-article.html" . }} 8 | {{ end }} 9 |
10 | {{ end }} -------------------------------------------------------------------------------- /layouts/_default/terms.html: -------------------------------------------------------------------------------- 1 | {{/* taxonomies 下的某一分类 */}} 2 | {{/* 模版查找顺序: 分类名称.terms.html > terms.html */}} 3 | {{/* 4 | 如: 5 | [taxonomies] 6 | category = "categories" 7 | series = "series" 8 | tag = "tags" 9 | 10 | /categories => category.terms.html > terms.html 11 | /series => series.terms.html > terms.html 12 | /tags => tag.terms.html > terms.html 13 | */}} 14 | 15 | {{ define "main" }} 16 | {{ partial "card/card-banner.html" . }} 17 | 18 |
19 |
20 | {{ range .Pages }} 21 |
22 | {{ .Data.Term }} 23 |
24 | {{ end }} 25 |
26 |
27 | {{ end }} -------------------------------------------------------------------------------- /layouts/index.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ $mainSections := .Site.Params.mainSections | default (slice "posts") }} 3 | {{ $section := where .Site.RegularPages "Section" "in" $mainSections }} 4 | {{ $pag := .Paginate ($section) }} 5 | 6 |
7 | {{ range $pag.Pages }} 8 | {{ partial "card/card-article.html" . }} 9 | {{ end }} 10 |
11 | 12 | {{ partial "pagination.html" . }} 13 | {{ end }} -------------------------------------------------------------------------------- /layouts/page/link.html: -------------------------------------------------------------------------------- 1 | {{/* pages layout link */}} 2 | {{ define "main" }} 3 | 22 | {{ end }} 23 | 24 | {{ define "widget" }} 25 | 32 | {{ end }} -------------------------------------------------------------------------------- /layouts/page/message.html: -------------------------------------------------------------------------------- 1 | {{/* pages layout message */}} 2 | {{ define "main" }} 3 |
4 | {{ $SingleDisable := .Params.Disable_comment }} {{/* 页面内控制是否禁用Disqus */}} 5 | {{ if ne $SingleDisable true }} 6 | {{- partial "disqus.html" . -}} 7 | {{ end }} 8 |
9 | {{ end }} 10 | 11 | {{ define "widget" }} 12 | 19 | {{ end }} -------------------------------------------------------------------------------- /layouts/page/single.html: -------------------------------------------------------------------------------- 1 | {{/* pages single */}} 2 | {{ define "widget" }} 3 | 10 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/card/card-article.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |

{{ .Title }}

6 | 7 |

{{- .Date.Format "January 2, 2006" -}}

8 | 9 | {{ $taxo := "categories" }} 10 | {{ with .Param $taxo }} 11 |
    12 | {{ range $index, $director := . }} 13 | {{ with $.Site.GetPage (printf "/%s/%s" $taxo $director) -}} 14 |
  • {{ $director }}
  • 15 | {{- end -}} 16 | {{- end -}} 17 |
18 | {{ end }} 19 | 20 | {{ $taxo := "tags" }} 21 | {{ with .Param $taxo }} 22 |
    23 | {{ range $index, $director := . }} 24 | {{ with $.Site.GetPage (printf "/%s/%s" $taxo $director) -}} 25 |
  • {{ $director }}
  • 26 | {{- end -}} 27 | {{- end -}} 28 |
29 | {{ end }} 30 |
31 |
32 |
-------------------------------------------------------------------------------- /layouts/partials/card/card-banner.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | {{ if eq .Kind "taxonomy" }} {{/* 分类 banner */}} 5 |
6 |
7 |

{{ or .Title .Data.Plural }}

8 | {{ with .Params.description }} 9 |

{{ . }}

10 | {{ end }} 11 |

{{ i18n "total_count" (len .Data.Terms) }}

12 |
13 | {{ end }} 14 | 15 | {{ if eq .Kind "term" }} {{/* 某一分类下列表 banner */}} 16 |
17 |
18 |

{{ or .Title .Data.Term }}

19 | {{ with .Params.description }} 20 |

{{ . }}

21 | {{ end }} 22 |

{{ i18n "total_count" (len .Data.Pages) }}

23 |
24 | {{ end }} 25 | 26 | {{ if eq .Kind "page" }} {{/* 页面 banner */}} 27 |
28 |
29 |

{{ .Title }}

30 | 31 | {{ if .Section }} {{/* section single page */}} 32 |

{{ .Date.Format "2006-01-02 15:04" }}

33 | 34 | {{ $taxo := "categories" }} 35 | {{ with .Param $taxo }} 36 |
    37 | {{ range $index, $director := . }} 38 | {{ with $.Site.GetPage (printf "/%s/%s" $taxo $director) -}} 39 |
  • {{ $director }}
  • 40 | {{- end -}} 41 | {{- end -}} 42 |
43 | {{ end }} 44 | 45 | {{ $taxo := "tags" }} 46 | {{ with .Param $taxo }} 47 |
    48 | {{ range $index, $director := . }} 49 | {{ with $.Site.GetPage (printf "/%s/%s" $taxo $director) -}} 50 |
  • {{ $director }}
  • 51 | {{- end -}} 52 | {{- end -}} 53 |
54 | {{ end }} 55 | {{ else }} {{/* root single page */}} 56 | {{ with .Params.description }} 57 |

{{ . }}

58 | {{ end }} 59 | {{ end }} 60 |
61 | {{ end }} 62 | 63 | {{ if eq .Kind "section" }} {{/* 区分 banner */}} 64 |
65 |
66 | {{ with .Title }} {{/* title */}} 67 |

{{ . }}

68 | {{ end }} 69 | 70 | {{ with .Params.description }} {{/* desc */}} 71 |
{{ . }}
72 | {{ end }} 73 | 74 | {{ with len .RegularPages }} {{/* pages */}} 75 |

{{ i18n "total_count" . }}

76 | {{ end }} 77 | 78 | {{ with len .Sections }} {{/* children sections */}} 79 |

{{ i18n "children_total_count" . }}

80 | {{ end }} 81 |
82 | {{ end }} 83 |
84 |
-------------------------------------------------------------------------------- /layouts/partials/card/card-childer.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |

{{ .Title }}

6 |

{{ .Params.description }}

7 |
8 |
9 |
-------------------------------------------------------------------------------- /layouts/partials/card/card-cover.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | {{ with .Params.cover }} 5 | {{ . }} 6 | {{ end }} 7 |
8 | 9 |
10 |

{{ .Title }}

11 | {{ if eq .Type "page" }} 12 | {{ with .Params.description }} 13 |

{{ . }}

14 | {{ end }} 15 | {{ else }} 16 |

{{ .Date.Format "2006-01-02 15:04" }}

17 | 18 | {{ $taxo := "categories" }} 19 | {{ with .Param $taxo }} 20 |
    21 | {{ range $index, $director := . }} 22 | {{ with $.Site.GetPage (printf "/%s/%s" $taxo $director) -}} 23 |
  • {{ $director }}
  • 24 | {{- end -}} 25 | {{- end -}} 26 |
27 | {{ end }} 28 | 29 | {{ $taxo := "tags" }} 30 | {{ with .Param $taxo }} 31 |
    32 | {{ range $index, $director := . }} 33 | {{ with $.Site.GetPage (printf "/%s/%s" $taxo $director) -}} 34 |
  • {{ $director }}
  • 35 | {{- end -}} 36 | {{- end -}} 37 |
38 | {{ end }} 39 | {{ end }} 40 |
41 | 42 |
-------------------------------------------------------------------------------- /layouts/partials/card/card-paging.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

{{ .Title }}

5 |

{{ .Date.Format "2006-01-02 15:04" }}

6 |
7 |
-------------------------------------------------------------------------------- /layouts/partials/disqus.html: -------------------------------------------------------------------------------- 1 | {{ if .Site.DisqusShortname }} 2 |
3 |
4 | comments powered by Disqus 5 |
6 | 23 | 24 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/footer-script.html: -------------------------------------------------------------------------------- 1 | {{/* google analytics */}} 2 | {{- template "_internal/google_analytics.html" . -}} 3 | 4 | {{/* baidu analytics */}} 5 | {{ with .Site.Params.Analytics.baidu }} 6 | 18 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/footer-single.html: -------------------------------------------------------------------------------- 1 | {{/* math */}} 2 | {{ if and (eq .Kind "page") .Params.math }} 3 | 4 | {{ end }} 5 | 6 | {{/* aplery */}} 7 | {{ if and (eq .Kind "page") .Params.aplayer }} 8 | 9 | 10 | {{ end }} 11 | 12 | {{/* dplayer */}} 13 | {{ if and (eq .Kind "page") .Params.dplayer }} 14 | 15 | 16 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/footer.html: -------------------------------------------------------------------------------- 1 | 63 | -------------------------------------------------------------------------------- /layouts/partials/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{ if or .Params.author .Site.Author.name }} {{/* author */}} 7 | 8 | {{ end }} 9 | 10 | {{ if or .Keywords .Site.Params.keywords }} {{/* keywords */}} 11 | {{ $keywords := slice }} 12 | {{ with .Params.keywords }} 13 | {{ $keywords = . }} 14 | {{ else }} 15 | {{ with .Site.Params.keywords }} 16 | {{ $keywords = . }} 17 | {{ end }} 18 | {{ end }} 19 | 20 | {{ end }} 21 | 22 | {{ if or .Description .Site.Params.description }} {{/* description*/}} 23 | 24 | {{ end }} 25 | 26 | {{ hugo.Generator }} 27 | 28 | 29 | {{ $title := .Site.Title }} 30 | {{ with .Params.Title }} 31 | {{ $title = printf "%s 🌟 %s" . $title }} 32 | {{ end }} 33 | {{- $title -}} 34 | 35 | {{ template "_internal/opengraph.html" . }} 36 | {{ template "_internal/twitter_cards.html" . }} 37 | 38 | {{/* style */}} 39 | {{ $sass := resources.Get "scss/index/index.scss" }} 40 | {{ $options := dict "targetPath" "assets/css/style.min.css" "outputStyle" "compressed" }} 41 | {{ $style := $sass | resources.ToCSS $options | resources.Fingerprint "sha256" }} 42 | 43 | 44 | {{/* script */}} 45 | {{- $js := resources.Get "ts/main.ts" -}} 46 | {{- $opts := dict "targetPath" "assets/js/main.min.js" "minify" hugo.IsProduction -}} 47 | {{- $script := $js | js.Build $opts | resources.Fingerprint "sha256" -}} 48 | 49 | 50 | {{ with .OutputFormats.Get "rss" -}} 51 | {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} 52 | {{ end -}} 53 | -------------------------------------------------------------------------------- /layouts/partials/header.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 6 | 20 |
21 |
-------------------------------------------------------------------------------- /layouts/partials/pagination.html: -------------------------------------------------------------------------------- 1 | {{ $pag := $.Paginator }} 2 | {{ if gt $pag.TotalPages 1 -}} 3 |
4 | 5 | {{ $pagFirst := $pag.First }} 6 | {{ $pagLast := $pag.Last }} 7 | {{ $isFirst := eq $pagFirst.PageNumber $pag.PageNumber }} 8 | {{ $isLast := eq $pagLast.PageNumber $pag.PageNumber }} 9 | 10 | 60 |
61 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/widget/widget-articles.html: -------------------------------------------------------------------------------- 1 | {{ $articles := where (where .Site.RegularPages "Params.categories" "intersect" .Params.categories) ".File.UniqueID" "ne" .File.UniqueID }} 2 | 3 | {{ if eq (len $articles) 0 }} 4 | {{ $articles = where (where .Site.RegularPages "Params.tags" "intersect" .Params.tags) ".File.UniqueID" "ne" .File.UniqueID }} 5 | {{ end }} 6 | 7 | {{ if eq (len $articles) 0 }} 8 | {{ $articles = where (where .Site.RegularPages "Section" "ne" "") ".File.UniqueID" "ne" .File.UniqueID }} 9 | {{ end }} 10 | 11 | {{ if gt (len $articles) 0 }} 12 |
13 |

14 |
15 | {{ i18n "related_posts" }} 16 |
17 |

18 |
19 |
    20 | {{ $count := or .Site.Params.widget.articles_count 6 }} 21 | {{ range first $count $articles }} 22 |
  • {{ .Title }}
  • 23 | {{ end }} 24 |
25 |
26 |
27 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/widget/widget-author.html: -------------------------------------------------------------------------------- 1 | {{ if $.Site.Author }} 2 |
3 |
4 |
5 | {{ with $.Site.Author.avatar }} 6 | {{ $.Site.Author.name }} 7 | {{ end }} 8 |

{{ $.Site.Author.name }}

9 | {{ with $.Site.Author.description }} 10 |

{{ . }}

11 | {{ end }} 12 |
13 |
14 |
15 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/widget/widget-categories.html: -------------------------------------------------------------------------------- 1 | {{ $categories := .Site.Taxonomies.categories.ByCount }} 2 | {{ $count := or .Site.Params.widget.categories_count 6 }} 3 | {{ $len := len $categories }} 4 | 5 | {{ if gt $len 0 }} 6 |
7 |

8 |
9 | {{ i18n "categories" }} 10 |
11 |

12 |
13 |
    14 | {{ range first $count $categories }} 15 |
  • 16 | {{ .Page.Data.Term }} 17 | {{ len .Page.Pages }} 18 |
  • 19 | {{ end }} 20 |
21 |
22 | 23 | {{ if gt $len $count }} 24 | {{ $all_page := $.Site.GetPage (printf "/%s" "categories") }} 25 | 33 | {{ end }} 34 |
35 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/widget/widget-tags.html: -------------------------------------------------------------------------------- 1 | {{ $tags := .Site.Taxonomies.tags.ByCount }} 2 | {{ $count := or .Site.Params.widget.tags_count 12 }} 3 | {{ $len := len $tags }} 4 | 5 | {{ if gt $len 0 }} 6 |
7 |

8 |
9 | {{ i18n "tags" }} 10 |
11 |

12 |
13 |
14 | {{ range first $count $tags }} 15 | {{ .Page.Data.Term }} 16 | {{ end }} 17 |
18 |
19 | 20 | {{ if gt $len $count }} 21 | {{ $all_page := $.Site.GetPage (printf "/%s" "tags") }} 22 | 30 | {{ end }} 31 |
32 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/widget/widget-toc.html: -------------------------------------------------------------------------------- 1 | {{ $toc_show_len := or .Site.Params.toc_show_len 0 }} 2 | {{ if and (gt .WordCount $toc_show_len ) (.Params.toc) }} 3 |
4 |

5 |
6 | {{ i18n "toc" }} 7 |
8 |

9 |
10 | {{ .TableOfContents }} 11 |
12 |
13 | {{ end }} -------------------------------------------------------------------------------- /layouts/rss.xml: -------------------------------------------------------------------------------- 1 | {{- $pctx := . -}} 2 | {{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} 3 | {{- $pages := slice -}} 4 | {{- if or $.IsHome $.IsSection -}} 5 | {{- $pages = where $pctx.RegularPages "Type" "ne" "page" -}} 6 | {{- else -}} 7 | {{- $pages = $pctx.Pages -}} 8 | {{- end -}} 9 | {{- $limit := .Site.Config.Services.RSS.Limit -}} 10 | {{- if ge $limit 1 -}} 11 | {{- $pages = $pages | first $limit -}} 12 | {{- end -}} 13 | {{- printf "" | safeHTML }} 14 | 15 | 16 | {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} 17 | {{ .Permalink }} 18 | Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} 19 | Hugo -- gohugo.io{{ with .Site.LanguageCode }} 20 | {{.}}{{end}}{{ with .Site.Author.email }} 21 | {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} 22 | {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} 23 | {{.}}{{end}}{{ if not .Date.IsZero }} 24 | {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} 25 | {{- with .OutputFormats.Get "RSS" -}} 26 | {{ printf "" .Permalink .MediaType | safeHTML }} 27 | {{- end -}} 28 | {{ range $pages }} 29 | 30 | {{ .Title }} 31 | {{ .Permalink }} 32 | {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} 33 | {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} 34 | {{ .Permalink }} 35 | {{ .Summary | html }} 36 | 37 | {{ end }} 38 | 39 | -------------------------------------------------------------------------------- /layouts/section/section.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | 3 | {{ partial "card/card-banner.html" . }} 4 | 5 | {{ with .Sections }} 6 |
7 | {{ range . }} 8 | {{ partial "card/card-childer.html" . }} 9 | {{ end }} 10 |
11 | {{ end }} 12 | 13 |
14 | {{ range .Paginator.Pages }} 15 | {{ partial "card/card-article.html" . }} 16 | {{ end }} 17 |
18 | 19 | {{ partial "pagination.html" . }} 20 | {{ end }} -------------------------------------------------------------------------------- /layouts/shortcodes/aplayer.html: -------------------------------------------------------------------------------- 1 | {{- $url := .Get "url" | default (.Get 0) -}} 2 | {{- $name := .Get "name" | default (.Get 1) -}} 3 | {{- $artist := .Get "artist" | default (.Get 2) -}} 4 | 5 | {{- $cover := .Get "cover" | default $.Site.Params.aplayer.cover -}} 6 | {{- $lrc := .Get "lrc" | default $.Site.Params.aplayer.lrc -}} 7 | {{- $lrcType := .Get "lrcType" | default $.Site.Params.aplayer.lrcType -}} 8 | 9 | {{- $theme := .Get "theme" | default $.Site.Params.aplayer.theme -}} 10 | {{- $autoplay := .Get "autoplay" | default $.Site.Params.aplayer.autoplay -}} 11 | {{- $loop := .Get "loop" | default $.Site.Params.aplayer.loop -}} 12 | {{- $mutex := .Get "mutex" | default $.Site.Params.aplayer.mutex -}} 13 |
-------------------------------------------------------------------------------- /layouts/shortcodes/dplayer.html: -------------------------------------------------------------------------------- 1 | {{- $url := .Get "url" | default (.Get 0) -}} 2 | {{- $pic := .Get "pic" | default (.Get 1) -}} 3 | 4 | {{- $theme := .Get "theme" | default $.Site.Params.dplayer.theme -}} 5 | {{- $autoplay := .Get "autoplay" | default $.Site.Params.dplayer.autoplay -}} 6 | {{- $loop := .Get "loop" | default $.Site.Params.dplayer.loop -}} 7 | {{- $mutex := .Get "mutex" | default $.Site.Params.dplayer.mutex -}} 8 | 9 | 10 | 11 | 12 |
-------------------------------------------------------------------------------- /layouts/shortcodes/youtube.html: -------------------------------------------------------------------------------- 1 | {{- $pc := .Page.Site.Config.Privacy.YouTube -}} 2 | {{- if not $pc.Disable -}} 3 | {{- $ytHost := cond $pc.PrivacyEnhanced "www.youtube-nocookie.com" "www.youtube.com" -}} 4 | {{- $id := .Get "id" | default (.Get 0) -}} 5 | {{- $class := .Get "class" | default (.Get 1) -}} 6 | {{- $title := .Get "title" | default "YouTube Video" }} 7 |
8 | 9 |
10 | {{ end -}} -------------------------------------------------------------------------------- /static/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miiiku/hugo-theme-kagome/76f8e9ef8856909c4c557554da831eca723c3811/static/.DS_Store -------------------------------------------------------------------------------- /static/image/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miiiku/hugo-theme-kagome/76f8e9ef8856909c4c557554da831eca723c3811/static/image/.DS_Store -------------------------------------------------------------------------------- /static/image/404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miiiku/hugo-theme-kagome/76f8e9ef8856909c4c557554da831eca723c3811/static/image/404.png -------------------------------------------------------------------------------- /theme.toml: -------------------------------------------------------------------------------- 1 | # theme.toml template for a Hugo theme 2 | # See https://github.com/gohugoio/hugoThemes#themetoml for an example 3 | 4 | name = "Kagome" 5 | license = "MIT" 6 | licenselink = "https://github.com/miiiku/hugo-theme-kagome/blob/main/LICENSE" 7 | description = "一个卡片风格的Hugo主题" 8 | homepage = "https://github.com/miiiku/hugo-theme-kagome" 9 | tags = ['card', 'responsive', 'mobile', 'Neumorphism', 'blog'] 10 | features = ['posts', 'flex', 'card', 'Neumorphism', 'Soft UI', 'widgets'] 11 | min_version = "0.83.1" 12 | 13 | [author] 14 | name = "miiiku" 15 | homepage = "https://github.com/miiiku" 16 | 17 | # If porting an existing theme 18 | [original] 19 | name = "" 20 | homepage = "" 21 | repo = "" 22 | --------------------------------------------------------------------------------