├── .github └── stale.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE.md ├── Makefile ├── README-zh.md ├── README.md ├── archetypes └── default.md ├── assets ├── js │ ├── even.js │ └── main.js └── sass │ ├── _base.scss │ ├── _common │ ├── _animation.scss │ ├── _normalize.scss │ └── _utils.scss │ ├── _custom │ └── _custom.scss │ ├── _iconfont.scss │ ├── _partial │ ├── _404.scss │ ├── _archive.scss │ ├── _back-to-top.scss │ ├── _footer.scss │ ├── _footer │ │ ├── _copyright.scss │ │ └── _social.scss │ ├── _header.scss │ ├── _header │ │ ├── _logo.scss │ │ └── _menu.scss │ ├── _language-selector.scss │ ├── _mobile.scss │ ├── _pagination.scss │ ├── _post.scss │ ├── _post │ │ ├── _admonition.scss │ │ ├── _code.scss │ │ ├── _content.scss │ │ ├── _copyright.scss │ │ ├── _footer.scss │ │ ├── _header.scss │ │ ├── _outdated.scss │ │ ├── _reward.scss │ │ └── _toc.scss │ ├── _slideout.scss │ └── _terms.scss │ ├── _variables.scss │ └── main.scss ├── exampleSite ├── config.toml └── content │ ├── about.md │ └── post │ ├── chinese-preview.md │ ├── english-preview.md │ ├── even-preview.md │ ├── hidden-post.md │ ├── japanese-preview.md │ ├── js-flowchart-diagrams.md │ ├── js-sequence-diagrams.md │ ├── shortcodes.md │ └── syntax-highlighting.md ├── i18n ├── de.yaml ├── en.yaml ├── es.yaml ├── fr.yaml ├── ja.yaml ├── oc.yaml ├── ru.yaml ├── tr.yaml ├── zh-CN.yaml └── zh-TW.yaml ├── images ├── screenshot.png ├── showcase.png └── tn.png ├── layouts ├── 404.html ├── _default │ ├── baseof.html │ ├── section.html │ ├── single.html │ ├── single.md │ ├── taxonomy.html │ └── terms.html ├── index.html ├── partials │ ├── comments.html │ ├── footer.html │ ├── head.html │ ├── header.html │ ├── header │ │ └── language-selector.html │ ├── post │ │ ├── copyright.html │ │ ├── outdated-info-warning.html │ │ ├── reward.html │ │ └── toc.html │ ├── scripts.html │ └── slideout.html ├── post │ ├── single.html │ └── summary.html ├── robots.txt ├── shortcodes │ ├── admonition.html │ ├── bilibili.html │ ├── center.html │ ├── left.html │ ├── music.html │ └── right.html └── sitemap.xml ├── netlify.toml ├── resources └── _gen │ └── assets │ └── scss │ └── sass │ ├── main.scss_48b060fe05b0a273d182ef83c0605941.content │ └── main.scss_48b060fe05b0a273d182ef83c0605941.json ├── static ├── android-chrome-192x192.png ├── android-chrome-512x512.png ├── apple-touch-icon.png ├── browserconfig.xml ├── favicon-16x16.png ├── favicon-32x32.png ├── favicon.ico ├── fonts │ ├── chancery │ │ ├── apple-chancery-webfont.eot │ │ ├── apple-chancery-webfont.svg │ │ ├── apple-chancery-webfont.ttf │ │ ├── apple-chancery-webfont.woff │ │ └── apple-chancery-webfont.woff2 │ └── iconfont │ │ ├── iconfont.eot │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ └── iconfont.woff ├── img │ ├── reward │ │ ├── alipay.png │ │ └── wechat.png │ └── spinner.svg ├── lib │ ├── fancybox │ │ ├── jquery.fancybox-3.1.20.min.css │ │ └── jquery.fancybox-3.1.20.min.js │ ├── flowchartDiagrams │ │ ├── flowchart-1.8.0.min.js │ │ └── raphael-2.2.7.min.js │ ├── highlight │ │ └── highlight.pack.js │ ├── jquery │ │ └── jquery-3.2.1.min.js │ ├── js-sequence-diagrams │ │ ├── danielbd.woff2 │ │ ├── sequence-diagram-2.0.1.min.css │ │ ├── sequence-diagram-2.0.1.min.js │ │ ├── snap.svg-0.5.1.min.js │ │ ├── underscore-1.8.3.min.js │ │ └── webfontloader-1.6.28.js │ ├── slideout │ │ └── slideout-1.0.1.min.js │ └── timeago │ │ ├── timeago-3.0.2.min.js │ │ └── timeago.locales-3.0.2.min.js ├── manifest.json ├── mstile-150x150.png ├── safari-pinned-tab.svg └── sitemap.xsl └── theme.toml /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 60 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 7 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - keep 8 | - pinned 9 | - security 10 | # Label to use when marking an issue as stale 11 | staleLabel: stale 12 | # Comment to post when marking an issue as stale. Set to `false` to disable 13 | markComment: > 14 | This issue has been automatically marked as stale because it has not had 15 | recent activity. It will be closed if no further activity occurs. Thank you 16 | for your contributions. 17 | 18 | If this is a **bug** and you can still reproduce this error on the master branch, 19 | please reply with all of the information you have about it in order to keep the issue open. 20 | # Comment to post when closing a stale issue. Set to `false` to disable 21 | closeComment: false 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .idea/ 3 | *.iml 4 | exampleSite/resources/ 5 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 olOwOlo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | 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, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | start: 2 | hugo server --source=exampleSite --themesDir=../.. --disableFastRender 3 | changelog: 4 | conventional-changelog -p angular -i CHANGELOG.md -s 5 | -------------------------------------------------------------------------------- /README-zh.md: -------------------------------------------------------------------------------- 1 | # hugo-theme-even 2 | 3 | [![GitHub contributors](https://img.shields.io/github/contributors/olOwOlo/hugo-theme-even.svg?colorB=green)](https://github.com/olOwOlo/hugo-theme-even/contributors) 4 | [![GitHub release](https://img.shields.io/github/release/olOwOlo/hugo-theme-even.svg?colorB=green)](https://github.com/olOwOlo/hugo-theme-even/releases) 5 | [![GitHub commits (since latest release)](https://img.shields.io/github/commits-since/olOwOlo/hugo-theme-even/latest.svg?colorB=green)](https://github.com/olOwOlo/hugo-theme-even/compare) 6 | [![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/olOwOlo/hugo-theme-even/blob/master/LICENSE.md) 7 | 8 | A super concise theme for Hugo 9 | 10 | > 该主题移植自 [hexo-theme-even](https://github.com/ahonn/hexo-theme-even) 11 | 12 | [在线预览 Demo](https://hugo-theme-even.netlify.app) 13 | 14 | ## Screenshots 15 | 16 | ![even-showcase](https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/master/images/showcase.png) 17 | 18 | ## Installation 19 | 20 | ```bash 21 | $ git clone https://github.com/olOwOlo/hugo-theme-even themes/even 22 | ``` 23 | 24 | **重要:** 在主题的 [`exampleSite`](https://github.com/olOwOlo/hugo-theme-even/tree/master/exampleSite) 目录下有一个 [`config.toml`](https://github.com/olOwOlo/hugo-theme-even/blob/master/exampleSite/config.toml) 文件,**将这个 [`config.toml`](https://github.com/olOwOlo/hugo-theme-even/blob/master/exampleSite/config.toml) 文件复制到你的站点目录下**,根据自己的需求更改即可。 25 | 26 | **重要:** 本主题用到了 [Hugo Pipes](https://gohugo.io/hugo-pipes/introduction/) 功能。如需修改 `assets` 目录下的文件,请安装 extended 版。 27 | 28 | **注意:** 对于这个主题,你应该使用 **post** 而不是 **posts**,即 `hugo new post/some-content.md`。 29 | 30 | ## Language Support 31 | 32 | > 翻译资源在 [`themes/even/i18n/`](https://github.com/olOwOlo/hugo-theme-even/tree/master/i18n) 文件夹(内置在主题中),以及站点根目录下的 `i18n/` 文件夹中。两个文件夹下的翻译资源将会被合并,且根目录下的优先级大于内置于主题中的。 33 | 34 | 只需要正确的设置 [`defaultContentLanguage`](https://github.com/olOwOlo/hugo-theme-even/blob/master/exampleSite/config.toml#L3) 的值即可使用翻译资源。 35 | 36 | ```toml 37 | defaultContentLanguage = "en" # en / zh-cn / other... 38 | ``` 39 | 40 | 同样也支持其他语言。举例来说,为支持德语,在站点根目录下创建 `/i18n/de.yaml` 文件。参考 [`en.yaml`](https://github.com/olOwOlo/hugo-theme-even/tree/master/i18n/en.yaml) 文件查看如何编写翻译资源。 41 | 42 | 附:在多语言模式下,当前正被用于渲染网站的语言会被用于匹配翻译资源。 43 | 44 | ## Favicon 45 | 46 | 为了定制 favicon,你需要在站点根目录的 `static` 文件夹下放置下述**所有**文件,这将覆盖 [`themes/even/static/`](https://github.com/olOwOlo/hugo-theme-even/tree/master/static) 文件夹下的那些文件。 47 | 48 | - android-chrome-192x192.png 49 | - android-chrome-512x512.png 50 | - apple-touch-icon.png 51 | - browserconfig.xml 52 | - favicon.ico 53 | - favicon-16x16.png 54 | - favicon-32x32.png 55 | - manifest.json 56 | - mstile-150x150.png 57 | - safari-pinned-tab.svg 58 | 59 | [favicon generator (Google)](https://www.google.com/search?q=favicon+generator) 能够帮助你生成这些文件。 60 | 61 | ## Front Matter 62 | 63 | 你可以通过 front-matter 针对每一篇文章单独进行设置。[`themes/even/archetypes/default.md`](https://github.com/olOwOlo/hugo-theme-even/tree/master/archetypes/default.md) 文件陈列了所有可用的参数。将该文件复制到站点根目录的 `archetypes` 文件夹下将会有所帮助。 64 | 65 | ## Shortcodes 66 | 67 | 主题提供了 `center`,` right`, `left`,` music`, `admonition` 这些 shortcodes,并支持为内置的 `figure` 设置 `center`,` right`, `left` 这三种 class 值。点击[这里](https://blog.olowolo.com/example-site/post/shortcodes/)查看详细内容。 68 | 69 | ## Theme Color 70 | 71 | 主题内置了五种颜色 ( Default | Mint Green | Cobalt Blue | Hot Pink | Dark Violet ),你可以通过改变 [`/assets/sass/_variable.scss`](https://github.com/olOwOlo/hugo-theme-even/blob/master/assets/sass/_variables.scss#L5-L8) 文件中 `$theme-color-config` 的值来改变主题的颜色。 72 | 73 | ## Update Theme 74 | 75 | ```bash 76 | cd ./themes/even/ 77 | git pull 78 | ``` 79 | 80 | **每当更新此主题时,都应检查 `CHANGELOG.md` 文件,可能会有一些重大更改。** 81 | 82 | 83 | ## License 84 | 85 | Released under the [MIT](https://github.com/olOwOlo/hugo-theme-even/blob/master/LICENSE.md) License. 86 | 87 | ## Acknowledgements 88 | 89 | - [ananke](https://github.com/budparr/gohugo-theme-ananke) 90 | - [hexo-theme-even](https://github.com/ahonn/hexo-theme-even) 91 | - [hugo-nuo](https://github.com/laozhu/hugo-nuo) 92 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hugo-theme-even 2 | 3 | [![GitHub contributors](https://img.shields.io/github/contributors/olOwOlo/hugo-theme-even.svg?colorB=green)](https://github.com/olOwOlo/hugo-theme-even/contributors) 4 | [![GitHub release](https://img.shields.io/github/release/olOwOlo/hugo-theme-even.svg?colorB=green)](https://github.com/olOwOlo/hugo-theme-even/releases) 5 | [![GitHub commits (since latest release)](https://img.shields.io/github/commits-since/olOwOlo/hugo-theme-even/latest.svg?colorB=green)](https://github.com/olOwOlo/hugo-theme-even/compare) 6 | [![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/olOwOlo/hugo-theme-even/blob/master/LICENSE.md) 7 | 8 | A super concise theme for Hugo 9 | 10 | > It's a port of the [hexo-theme-even](https://github.com/ahonn/hexo-theme-even) 11 | 12 | [Demo](https://hugo-theme-even.netlify.app) | [中文说明](https://github.com/olOwOlo/hugo-theme-even/blob/master/README-zh.md) 13 | 14 | ## Screenshots 15 | 16 | ![even-showcase](https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/master/images/showcase.png) 17 | 18 | ## Installation 19 | 20 | ```bash 21 | $ git clone https://github.com/olOwOlo/hugo-theme-even themes/even 22 | ``` 23 | 24 | **Important:** Take a look inside the [`exampleSite`](https://github.com/olOwOlo/hugo-theme-even/tree/master/exampleSite) folder of this theme. You'll find a file called [`config.toml`](https://github.com/olOwOlo/hugo-theme-even/blob/master/exampleSite/config.toml). **To use it, copy the [`config.toml`](https://github.com/olOwOlo/hugo-theme-even/blob/master/exampleSite/config.toml) in the root folder of your Hugo site.** Feel free to change it. 25 | 26 | **Important:** This theme uses [Hugo Pipes](https://gohugo.io/hugo-pipes/introduction/). Modifying contents in `assets` requires the extended version to be installed. 27 | 28 | **NOTE:** For this theme, you should use **post** instead of **posts**, namely `hugo new post/some-content.md`. 29 | 30 | ## Language Support 31 | 32 | > Translations are collected from the [`themes/even/i18n/`](https://github.com/olOwOlo/hugo-theme-even/tree/master/i18n) folder (built into the theme), as well as translations present in `i18n/` at the root of your project. The translations will be merged and take precedence over what is in the theme folder. 33 | 34 | To use the translations, just set a correct value for [`defaultContentLanguage`](https://github.com/olOwOlo/hugo-theme-even/blob/master/exampleSite/config.toml#L3). 35 | 36 | ```toml 37 | defaultContentLanguage = "en" # en / zh-cn / other... 38 | ``` 39 | 40 | Can also support any other languages as well. For example, to support german, create a file `/i18n/de.yaml` in the root folder of your Hugo site. For reference template you can see the [`en.yaml`](https://github.com/olOwOlo/hugo-theme-even/tree/master/i18n/en.yaml) file. 41 | 42 | P.S. In multilingual mode, the language which currently being used to render the website will be used. 43 | 44 | ### Language selector 45 | 46 | It is possible to enable language selector for multilingual site. It will be displayed in the header or in the slide menu. 47 | 48 | To enable it, set `showLanguageSelector` parameter to `true`. 49 | 50 | ```toml 51 | showLanguageSelector = true 52 | ``` 53 | 54 | ## Favicon 55 | 56 | In order to customize the favicon you need to place **all** the following files in the `static` folder at the root of your site, which will overwrite those files in the [`themes/even/static/`](https://github.com/olOwOlo/hugo-theme-even/tree/master/static) folder. 57 | 58 | - android-chrome-192x192.png 59 | - android-chrome-512x512.png 60 | - apple-touch-icon.png 61 | - browserconfig.xml 62 | - favicon.ico 63 | - favicon-16x16.png 64 | - favicon-32x32.png 65 | - manifest.json 66 | - mstile-150x150.png 67 | - safari-pinned-tab.svg 68 | 69 | A [favicon generator](https://www.google.com/search?q=favicon+generator) can help you generate these files. 70 | 71 | ## Front Matter 72 | 73 | You can customize something for a single content in the content's front-matter. The [`themes/even/archetypes/default.md`](https://github.com/olOwOlo/hugo-theme-even/tree/master/archetypes/default.md) shows all available params. Copy this file in the `archetypes` folder at the root of your project will be useful. 74 | 75 | ## Shortcodes 76 | 77 | This theme provides `center`,` right`, `left`,` music`, `admonition` shortcodes, and support `center`,` right`, `left` class for the built-in `figure`. See more information from [there](https://blog.olowolo.com/example-site/post/shortcodes/). 78 | 79 | ## Theme Color 80 | 81 | There are five built-in theme colors ( Default | Mint Green | Cobalt Blue | Hot Pink | Dark Violet ), you can config it by changing the `$theme-color-config` value in [`/assets/sass/_variable.scss`](https://github.com/olOwOlo/hugo-theme-even/blob/master/assets/sass/_variables.scss#L5-L8). 82 | 83 | ## Update Theme 84 | 85 | ```bash 86 | cd ./themes/even/ 87 | git pull 88 | ``` 89 | 90 | **Whenever you update this theme, you should check the `CHANGELOG.md` file, there may be some breaking changes.** 91 | 92 | ## License 93 | 94 | Released under the [MIT](https://github.com/olOwOlo/hugo-theme-even/blob/master/LICENSE.md) License. 95 | 96 | ## Acknowledgements 97 | 98 | - [ananke](https://github.com/budparr/gohugo-theme-ananke) 99 | - [hexo-theme-even](https://github.com/ahonn/hexo-theme-even) 100 | - [hugo-nuo](https://github.com/laozhu/hugo-nuo) 101 | -------------------------------------------------------------------------------- /archetypes/default.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .TranslationBaseName "-" " " | title }}" 3 | date: {{ .Date }} 4 | lastmod: {{ .Date }} 5 | draft: true 6 | keywords: [] 7 | description: "" 8 | tags: [] 9 | categories: [] 10 | author: "" 11 | 12 | # You can also close(false) or open(true) something for this content. 13 | # P.S. comment can only be closed 14 | comment: false 15 | toc: false 16 | autoCollapseToc: false 17 | postMetaInFooter: false 18 | hiddenFromHomePage: false 19 | # You can also define another contentCopyright. e.g. contentCopyright: "This is another copyright." 20 | contentCopyright: false 21 | reward: false 22 | mathjax: false 23 | mathjaxEnableSingleDollar: false 24 | mathjaxEnableAutoNumber: false 25 | 26 | # You unlisted posts you might want not want the header or footer to show 27 | hideHeaderAndFooter: false 28 | 29 | # You can enable or disable out-of-date content warning for individual post. 30 | # Comment this out to use the global config. 31 | #enableOutdatedInfoWarning: false 32 | 33 | flowchartDiagrams: 34 | enable: false 35 | options: "" 36 | 37 | sequenceDiagrams: 38 | enable: false 39 | options: "" 40 | 41 | --- 42 | 43 | 44 | -------------------------------------------------------------------------------- /assets/js/even.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const Even = {}; 4 | 5 | Even.backToTop = function() { 6 | const $backToTop = $('#back-to-top'); 7 | 8 | $(window).scroll(function() { 9 | if ($(window).scrollTop() > 100) { 10 | $backToTop.fadeIn(1000); 11 | } else { 12 | $backToTop.fadeOut(1000); 13 | } 14 | }); 15 | 16 | $backToTop.click(function() { 17 | $('body,html').animate({scrollTop: 0}); 18 | }); 19 | }; 20 | 21 | Even.mobileNavbar = function() { 22 | const $mobileNav = $('#mobile-navbar'); 23 | const $mobileNavIcon = $('.mobile-navbar-icon'); 24 | const slideout = new Slideout({ 25 | 'panel': document.getElementById('mobile-panel'), 26 | 'menu': document.getElementById('mobile-menu'), 27 | 'padding': 180, 28 | 'tolerance': 70, 29 | }); 30 | slideout.disableTouch(); 31 | 32 | $mobileNavIcon.click(function() { 33 | slideout.toggle(); 34 | }); 35 | 36 | slideout.on('beforeopen', function() { 37 | $mobileNav.addClass('fixed-open'); 38 | $mobileNavIcon.addClass('icon-click').removeClass('icon-out'); 39 | }); 40 | 41 | slideout.on('beforeclose', function() { 42 | $mobileNav.removeClass('fixed-open'); 43 | $mobileNavIcon.addClass('icon-out').removeClass('icon-click'); 44 | }); 45 | 46 | $('#mobile-panel').on('touchend', function() { 47 | slideout.isOpen() && $mobileNavIcon.click(); 48 | }); 49 | }; 50 | 51 | Even._initToc = function() { 52 | const SPACING = 20; 53 | const $toc = $('.post-toc'); 54 | const $footer = $('.post-footer'); 55 | 56 | if ($toc.length) { 57 | const minScrollTop = $toc.offset().top - SPACING; 58 | const maxScrollTop = $footer.offset().top - $toc.height() - SPACING; 59 | 60 | const tocState = { 61 | start: { 62 | 'position': 'absolute', 63 | 'top': minScrollTop, 64 | }, 65 | process: { 66 | 'position': 'fixed', 67 | 'top': SPACING, 68 | }, 69 | end: { 70 | 'position': 'absolute', 71 | 'top': maxScrollTop, 72 | }, 73 | }; 74 | 75 | $(window).scroll(function() { 76 | const scrollTop = $(window).scrollTop(); 77 | 78 | if (scrollTop < minScrollTop) { 79 | $toc.css(tocState.start); 80 | } else if (scrollTop > maxScrollTop) { 81 | $toc.css(tocState.end); 82 | } else { 83 | $toc.css(tocState.process); 84 | } 85 | }); 86 | } 87 | 88 | const HEADERFIX = 30; 89 | const $toclink = $('.toc-link'); 90 | const $headerlink = $('.headerlink'); 91 | const $tocLinkLis = $('.post-toc-content li'); 92 | 93 | const headerlinkTop = $.map($headerlink, function(link) { 94 | return $(link).offset().top; 95 | }); 96 | 97 | const headerLinksOffsetForSearch = $.map(headerlinkTop, function(offset) { 98 | return offset - HEADERFIX; 99 | }); 100 | 101 | const searchActiveTocIndex = function(array, target) { 102 | for (let i = 0; i < array.length - 1; i++) { 103 | if (target > array[i] && target <= array[i + 1]) return i; 104 | } 105 | if (target > array[array.length - 1]) return array.length - 1; 106 | return -1; 107 | }; 108 | 109 | $(window).scroll(function() { 110 | const scrollTop = $(window).scrollTop(); 111 | const activeTocIndex = searchActiveTocIndex(headerLinksOffsetForSearch, scrollTop); 112 | 113 | $($toclink).removeClass('active'); 114 | $($tocLinkLis).removeClass('has-active'); 115 | 116 | if (activeTocIndex !== -1 && $toclink[activeTocIndex] != null) { 117 | $($toclink[activeTocIndex]).addClass('active'); 118 | let ancestor = $toclink[activeTocIndex].parentNode; 119 | while (ancestor.tagName !== 'NAV') { 120 | $(ancestor).addClass('has-active'); 121 | ancestor = ancestor.parentNode.parentNode; 122 | } 123 | } 124 | }); 125 | }; 126 | 127 | Even.fancybox = function() { 128 | if ($.fancybox) { 129 | $('.post-content').each(function() { 130 | $(this).find('img').each(function() { 131 | $(this).wrap(``); 132 | }); 133 | }); 134 | 135 | $('.fancybox').fancybox({ 136 | selector: '.fancybox', 137 | protect: true, 138 | }); 139 | } 140 | }; 141 | 142 | Even.highlight = function() { 143 | const blocks = document.querySelectorAll('pre code'); 144 | for (let i = 0; i < blocks.length; i++) { 145 | const block = blocks[i]; 146 | const rootElement = block.parentElement; 147 | const lineCodes = block.innerHTML.split(/\n/); 148 | if (lineCodes[lineCodes.length - 1] === '') lineCodes.pop(); 149 | const lineLength = lineCodes.length; 150 | 151 | let codeLineHtml = ''; 152 | for (let i = 0; i < lineLength; i++) { 153 | codeLineHtml += `
${i + 1}
`; 154 | } 155 | 156 | let codeHtml = ''; 157 | for (let i = 0; i < lineLength; i++) { 158 | codeHtml += `
${lineCodes[i]}
`; 159 | } 160 | 161 | block.className += ' highlight'; 162 | const figure = document.createElement('figure'); 163 | figure.className = block.className; 164 | figure.innerHTML = `
${codeLineHtml}
${codeHtml}
`; 165 | 166 | rootElement.parentElement.replaceChild(figure, rootElement); 167 | } 168 | }; 169 | 170 | Even.chroma = function() { 171 | const blocks = document.querySelectorAll('.highlight > .chroma'); 172 | for (let i = 0; i < blocks.length; i++) { 173 | const block = blocks[i]; 174 | const afterHighLight = block.querySelector('pre.chroma > code[data-lang]'); 175 | const lang = afterHighLight ? afterHighLight.className : ''; 176 | block.className += ' ' + lang; 177 | } 178 | }; 179 | 180 | Even.toc = function() { 181 | const tocContainer = document.getElementById('post-toc'); 182 | if (tocContainer !== null) { 183 | const toc = document.getElementById('TableOfContents'); 184 | if (toc === null) { 185 | // toc = true, but there are no headings 186 | tocContainer.parentNode.removeChild(tocContainer); 187 | } else { 188 | this._refactorToc(toc); 189 | this._linkToc(); 190 | this._initToc(); 191 | } 192 | } 193 | }; 194 | 195 | Even._refactorToc = function(toc) { 196 | // when headings do not start with `h1` 197 | const oldTocList = toc.children[0]; 198 | let newTocList = oldTocList; 199 | let temp; 200 | while (newTocList.children.length === 1 201 | && (temp = newTocList.children[0].children[0]).tagName === 'UL') { 202 | newTocList = temp; 203 | } 204 | 205 | if (newTocList !== oldTocList) toc.replaceChild(newTocList, oldTocList); 206 | }; 207 | 208 | Even._linkToc = function() { 209 | const links = document.querySelectorAll('#TableOfContents a:first-child'); 210 | for (let i = 0; i < links.length; i++) links[i].className += ' toc-link'; 211 | 212 | for (let num = 1; num <= 6; num++) { 213 | const headers = document.querySelectorAll('.post-content>h' + num); 214 | for (let i = 0; i < headers.length; i++) { 215 | const header = headers[i]; 216 | header.innerHTML = `${header.innerHTML}`; 217 | } 218 | } 219 | }; 220 | 221 | Even.flowchart = function() { 222 | if (!window.flowchart) return; 223 | 224 | const blocks = document.querySelectorAll('pre code.language-flowchart, pre code.language-flow'); 225 | for (let i = 0; i < blocks.length; i++) { 226 | if (!window.hljs && i % 2 === 0) continue; 227 | 228 | const block = blocks[i]; 229 | const rootElement = window.hljs 230 | ? block.parentElement 231 | : block.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement; 232 | 233 | const container = document.createElement('div'); 234 | const id = `js-flowchart-diagrams-${i}`; 235 | container.id = id; 236 | container.className = 'align-center'; 237 | rootElement.parentElement.replaceChild(container, rootElement); 238 | 239 | const diagram = flowchart.parse(block.childNodes[0].nodeValue); 240 | diagram.drawSVG(id, window.flowchartDiagramsOptions ? window.flowchartDiagramsOptions : {}); 241 | } 242 | }; 243 | 244 | Even.sequence = function() { 245 | if (!window.Diagram) return; 246 | 247 | const blocks = document.querySelectorAll('pre code.language-sequence'); 248 | for (let i = 0; i < blocks.length; i++) { 249 | if (!window.hljs && i % 2 === 0) continue; 250 | 251 | const block = blocks[i]; 252 | const rootElement = window.hljs 253 | ? block.parentElement 254 | : block.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement; 255 | 256 | const container = document.createElement('div'); 257 | const id = `js-sequence-diagrams-${i}`; 258 | container.id = id; 259 | container.className = 'align-center'; 260 | rootElement.parentElement.replaceChild(container, rootElement); 261 | 262 | const diagram = Diagram.parse(block.childNodes[0].nodeValue); 263 | diagram.drawSVG(id, window.sequenceDiagramsOptions 264 | ? window.sequenceDiagramsOptions 265 | : {theme: 'simple'}); 266 | } 267 | }; 268 | 269 | Even.responsiveTable = function() { 270 | const tables = document.querySelectorAll('.post-content table:not(.lntable)'); 271 | for (let i = 0; i < tables.length; i++) { 272 | const table = tables[i]; 273 | const wrapper = document.createElement('div'); 274 | wrapper.className = 'table-wrapper'; 275 | table.parentElement.replaceChild(wrapper, table); 276 | wrapper.appendChild(table); 277 | } 278 | }; 279 | 280 | -------------------------------------------------------------------------------- /assets/js/main.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | Even.backToTop(); 3 | Even.mobileNavbar(); 4 | Even.toc(); 5 | Even.fancybox(); 6 | }); 7 | 8 | Even.responsiveTable(); 9 | Even.flowchart(); 10 | Even.sequence(); 11 | 12 | if (window.hljs) { 13 | hljs.initHighlighting(); 14 | Even.highlight(); 15 | } else { 16 | Even.chroma(); 17 | } 18 | 19 | -------------------------------------------------------------------------------- /assets/sass/_base.scss: -------------------------------------------------------------------------------- 1 | @import '_common/normalize'; 2 | 3 | html { 4 | font-size: $global-font-size; 5 | box-sizing: border-box; 6 | } 7 | 8 | body { 9 | padding: 0; 10 | margin: 0; 11 | font-family: $global-font-family; 12 | font-weight: normal; 13 | -webkit-font-smoothing: antialiased; 14 | -moz-osx-font-smoothing: grayscale; 15 | line-height: $global-lineheight; 16 | color: $global-font-color; 17 | background: $global-background; 18 | scroll-behavior: smooth; 19 | border-top: 3px solid $theme-color; 20 | } 21 | 22 | @include max-screen() { 23 | body { 24 | border-top: 0; 25 | } 26 | } 27 | 28 | ::selection { 29 | background: $theme-color; 30 | color: #fff; 31 | } 32 | 33 | // ::-webkit-scrollbar { 34 | // width: 8px; 35 | // height: 6px; 36 | // } 37 | 38 | // ::-webkit-scrollbar-thumb { 39 | // background: lighten($theme-color, 10%); 40 | // border-radius: 5px; 41 | // } 42 | 43 | // ::-webkit-scrollbar-track { 44 | // background: rgba(211, 211, 211, 0.4); 45 | // border-radius: 5px; 46 | // } 47 | 48 | img { 49 | max-width: 100%; 50 | height: auto; 51 | display: inline-block; 52 | vertical-align: middle; 53 | } 54 | 55 | a { 56 | color: $global-font-color; 57 | text-decoration: none; 58 | } 59 | 60 | @each $header, $size in $global-headings { 61 | #{$header} { 62 | font-size: $size; 63 | font-family: $global-serif-font-family; 64 | } 65 | } 66 | 67 | .container { 68 | margin: 0 auto; 69 | width: $global-body-width; 70 | } 71 | 72 | @include max-screen() { 73 | .container { 74 | width: 100%; 75 | box-shadow: -1px -5px 5px $gray; 76 | } 77 | } 78 | 79 | .content-wrapper { 80 | padding: $global-container-padding; 81 | } 82 | 83 | // make video fluid: 84 | // https://css-tricks.com/NetMag/FluidWidthVideo/Article-FluidWidthVideo.php 85 | // class video-container is the wrapper used by hexo youtube tag plugin 86 | .video-container { 87 | position: relative; 88 | padding-bottom: 56.25%; /* 16:9 */ 89 | padding-top: 25px; 90 | height: 0; 91 | } 92 | .video-container iframe { 93 | position: absolute; 94 | top: 0; 95 | left: 0; 96 | width: 100%; 97 | height: 100%; 98 | } -------------------------------------------------------------------------------- /assets/sass/_common/_animation.scss: -------------------------------------------------------------------------------- 1 | @mixin underline-from-center() { 2 | display: inline-block; 3 | vertical-align: middle; 4 | transform: translateZ(0); 5 | backface-visibility: hidden; 6 | box-shadow: 0 0 1px transparent; 7 | position: relative; 8 | overflow: hidden; 9 | 10 | &:before { 11 | content: ''; 12 | position: absolute; 13 | z-index: -1; 14 | height: 2px; 15 | bottom: 0; 16 | left: 51%; 17 | right: 51%; 18 | background: $theme-color; 19 | transition-duration: 0.2s; 20 | transition-property: right, left; 21 | transition-timing-function: ease-out; 22 | } 23 | 24 | &.active, 25 | &:active, 26 | &:focus, 27 | &:hover { 28 | &:before { 29 | right: 0; 30 | left: 0; 31 | } 32 | } 33 | } 34 | 35 | @mixin mobile-menu-icon() { 36 | @keyframes clickfirst { 37 | 0% { 38 | transform: translateY(6px) rotate(0deg); 39 | 40 | } 41 | 42 | 100% { 43 | transform: translateY(0) rotate(45deg); 44 | } 45 | } 46 | 47 | @keyframes clickmid { 48 | 0% { 49 | opacity: 1; 50 | } 51 | 52 | 100% { 53 | opacity: 0; 54 | } 55 | } 56 | 57 | @keyframes clicklast { 58 | 0% { 59 | transform: translateY(-6px) rotate(0deg); 60 | } 61 | 62 | 100% { 63 | transform: translateY(0) rotate(-45deg); 64 | } 65 | } 66 | 67 | @keyframes outfirst { 68 | 0% { 69 | transform: translateY(0) rotate(-45deg); 70 | } 71 | 72 | 100% { 73 | transform: translateY(-6px) rotate(0deg); 74 | } 75 | } 76 | 77 | @keyframes outmid { 78 | 0% { 79 | opacity: 0; 80 | } 81 | 82 | 100% { 83 | opacity: 1; 84 | } 85 | } 86 | 87 | @keyframes outlast { 88 | 0% { 89 | transform: translateY(0) rotate(45deg); 90 | } 91 | 92 | 100% { 93 | transform: translateY(6px) rotate(0deg); 94 | } 95 | } 96 | 97 | span { 98 | position: absolute; 99 | /* fallback for browsers which still doesn't support for `calc()` */ 100 | left: 15px; 101 | top: 25px; 102 | left: calc((100% - 20px) / 2); 103 | top: calc((100% - 1px) / 2); 104 | width: 20px; 105 | height: 1px; 106 | background-color: $theme-color; 107 | 108 | &:nth-child(1) { 109 | transform: translateY(6px) rotate(0deg); 110 | } 111 | 112 | &:nth-child(3) { 113 | transform: translateY(-6px) rotate(0deg); 114 | } 115 | } 116 | 117 | &.icon-click { 118 | span:nth-child(1) { 119 | animation-duration: 0.5s; 120 | animation-fill-mode: both; 121 | animation-name: clickfirst; 122 | } 123 | 124 | span:nth-child(2) { 125 | animation-duration: 0.2s; 126 | animation-fill-mode: both; 127 | animation-name: clickmid; 128 | } 129 | 130 | span:nth-child(3) { 131 | animation-duration: 0.5s; 132 | animation-fill-mode: both; 133 | animation-name: clicklast; 134 | } 135 | } 136 | 137 | &.icon-out { 138 | span:nth-child(1) { 139 | animation-duration: 0.5s; 140 | animation-fill-mode: both; 141 | animation-name: outfirst; 142 | } 143 | 144 | span:nth-child(2) { 145 | animation-duration: 0.2s; 146 | animation-fill-mode: both; 147 | animation-name: outmid; 148 | } 149 | 150 | span:nth-child(3) { 151 | animation-duration: 0.5s; 152 | animation-fill-mode: both; 153 | animation-name: outlast; 154 | } 155 | } 156 | } -------------------------------------------------------------------------------- /assets/sass/_common/_normalize.scss: -------------------------------------------------------------------------------- 1 | /*! normalize.css v3.0.2 | MIT License | git.io/normalize */ 2 | 3 | /** 4 | * 1. Set default font family to sans-serif. 5 | * 2. Prevent iOS text size adjust after orientation change, without disabling 6 | * user zoom. 7 | */ 8 | 9 | html { 10 | font-family: sans-serif; /* 1 */ 11 | -ms-text-size-adjust: 100%; /* 2 */ 12 | -webkit-text-size-adjust: 100%; /* 2 */ 13 | } 14 | 15 | /** 16 | * Remove default margin. 17 | */ 18 | 19 | body { 20 | margin: 0; 21 | } 22 | 23 | /* HTML5 display definitions 24 | ========================================================================== */ 25 | 26 | /** 27 | * Correct `block` display not defined for any HTML5 element in IE 8/9. 28 | * Correct `block` display not defined for `details` or `summary` in IE 10/11 29 | * and Firefox. 30 | * Correct `block` display not defined for `main` in IE 11. 31 | */ 32 | 33 | article, 34 | aside, 35 | details, 36 | figcaption, 37 | figure, 38 | footer, 39 | header, 40 | hgroup, 41 | main, 42 | menu, 43 | nav, 44 | section, 45 | summary { 46 | display: block; 47 | } 48 | 49 | /** 50 | * 1. Correct `inline-block` display not defined in IE 8/9. 51 | * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. 52 | */ 53 | 54 | audio, 55 | canvas, 56 | progress, 57 | video { 58 | display: inline-block; /* 1 */ 59 | vertical-align: baseline; /* 2 */ 60 | } 61 | 62 | /** 63 | * Prevent modern browsers from displaying `audio` without controls. 64 | * Remove excess height in iOS 5 devices. 65 | */ 66 | 67 | audio:not([controls]) { 68 | display: none; 69 | height: 0; 70 | } 71 | 72 | /** 73 | * Address `[hidden]` styling not present in IE 8/9/10. 74 | * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. 75 | */ 76 | 77 | [hidden], 78 | template { 79 | display: none; 80 | } 81 | 82 | /* Links 83 | ========================================================================== */ 84 | 85 | /** 86 | * Remove the gray background color from active links in IE 10. 87 | */ 88 | 89 | a { 90 | background-color: transparent; 91 | } 92 | 93 | /** 94 | * Improve readability when focused and also mouse hovered in all browsers. 95 | */ 96 | 97 | a:active, 98 | a:hover { 99 | outline: 0; 100 | } 101 | 102 | /* Text-level semantics 103 | ========================================================================== */ 104 | 105 | /** 106 | * Address styling not present in IE 8/9/10/11, Safari, and Chrome. 107 | */ 108 | 109 | abbr[title] { 110 | border-bottom: 1px dotted; 111 | } 112 | 113 | /** 114 | * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. 115 | */ 116 | 117 | b, 118 | strong { 119 | font-weight: bold; 120 | } 121 | 122 | /** 123 | * Address styling not present in Safari and Chrome. 124 | */ 125 | 126 | dfn { 127 | font-style: italic; 128 | } 129 | 130 | /** 131 | * Address variable `h1` font-size and margin within `section` and `article` 132 | * contexts in Firefox 4+, Safari, and Chrome. 133 | */ 134 | 135 | h1 { 136 | font-size: 2em; 137 | margin: 0.67em 0; 138 | } 139 | 140 | /** 141 | * Address styling not present in IE 8/9. 142 | */ 143 | 144 | mark { 145 | background: #ff0; 146 | color: #000; 147 | } 148 | 149 | /** 150 | * Address inconsistent and variable font size in all browsers. 151 | */ 152 | 153 | small { 154 | font-size: 80%; 155 | } 156 | 157 | /** 158 | * Prevent `sub` and `sup` affecting `line-height` in all browsers. 159 | */ 160 | 161 | sub, 162 | sup { 163 | font-size: 75%; 164 | line-height: 0; 165 | position: relative; 166 | vertical-align: baseline; 167 | } 168 | 169 | sup { 170 | top: -0.5em; 171 | } 172 | 173 | sub { 174 | bottom: -0.25em; 175 | } 176 | 177 | /* Embedded content 178 | ========================================================================== */ 179 | 180 | /** 181 | * Remove border when inside `a` element in IE 8/9/10. 182 | */ 183 | 184 | img { 185 | border: 0; 186 | } 187 | 188 | /** 189 | * Correct overflow not hidden in IE 9/10/11. 190 | */ 191 | 192 | svg:not(:root) { 193 | overflow: hidden; 194 | } 195 | 196 | /* Grouping content 197 | ========================================================================== */ 198 | 199 | /** 200 | * Address margin not present in IE 8/9 and Safari. 201 | */ 202 | 203 | figure { 204 | margin: 1em 40px; 205 | } 206 | 207 | /** 208 | * Address differences between Firefox and other browsers. 209 | */ 210 | 211 | hr { 212 | -moz-box-sizing: content-box; 213 | box-sizing: content-box; 214 | height: 0; 215 | } 216 | 217 | /** 218 | * Contain overflow in all browsers. 219 | */ 220 | 221 | pre { 222 | overflow: auto; 223 | } 224 | 225 | /** 226 | * Address odd `em`-unit font size rendering in all browsers. 227 | */ 228 | 229 | code, 230 | kbd, 231 | pre, 232 | samp { 233 | font-family: monospace, monospace; 234 | font-size: 1em; 235 | } 236 | 237 | /* Forms 238 | ========================================================================== */ 239 | 240 | /** 241 | * Known limitation: by default, Chrome and Safari on OS X allow very limited 242 | * styling of `select`, unless a `border` property is set. 243 | */ 244 | 245 | /** 246 | * 1. Correct color not being inherited. 247 | * Known issue: affects color of disabled elements. 248 | * 2. Correct font properties not being inherited. 249 | * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. 250 | */ 251 | 252 | button, 253 | input, 254 | optgroup, 255 | select, 256 | textarea { 257 | color: inherit; /* 1 */ 258 | font: inherit; /* 2 */ 259 | margin: 0; /* 3 */ 260 | } 261 | 262 | /** 263 | * Address `overflow` set to `hidden` in IE 8/9/10/11. 264 | */ 265 | 266 | button { 267 | overflow: visible; 268 | } 269 | 270 | /** 271 | * Address inconsistent `text-transform` inheritance for `button` and `select`. 272 | * All other form control elements do not inherit `text-transform` values. 273 | * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. 274 | * Correct `select` style inheritance in Firefox. 275 | */ 276 | 277 | button, 278 | select { 279 | text-transform: none; 280 | } 281 | 282 | /** 283 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 284 | * and `video` controls. 285 | * 2. Correct inability to style clickable `input` types in iOS. 286 | * 3. Improve usability and consistency of cursor style between image-type 287 | * `input` and others. 288 | */ 289 | 290 | button, 291 | html input[type="button"], /* 1 */ 292 | input[type="reset"], 293 | input[type="submit"] { 294 | -webkit-appearance: button; /* 2 */ 295 | cursor: pointer; /* 3 */ 296 | } 297 | 298 | /** 299 | * Re-set default cursor for disabled elements. 300 | */ 301 | 302 | button[disabled], 303 | html input[disabled] { 304 | cursor: default; 305 | } 306 | 307 | /** 308 | * Remove inner padding and border in Firefox 4+. 309 | */ 310 | 311 | button::-moz-focus-inner, 312 | input::-moz-focus-inner { 313 | border: 0; 314 | padding: 0; 315 | } 316 | 317 | /** 318 | * Address Firefox 4+ setting `line-height` on `input` using `!important` in 319 | * the UA stylesheet. 320 | */ 321 | 322 | input { 323 | line-height: normal; 324 | } 325 | 326 | /** 327 | * It's recommended that you don't attempt to style these elements. 328 | * Firefox's implementation doesn't respect box-sizing, padding, or width. 329 | * 330 | * 1. Address box sizing set to `content-box` in IE 8/9/10. 331 | * 2. Remove excess padding in IE 8/9/10. 332 | */ 333 | 334 | input[type="checkbox"], 335 | input[type="radio"] { 336 | box-sizing: border-box; /* 1 */ 337 | padding: 0; /* 2 */ 338 | } 339 | 340 | /** 341 | * Fix the cursor style for Chrome's increment/decrement buttons. For certain 342 | * `font-size` values of the `input`, it causes the cursor style of the 343 | * decrement button to change from `default` to `text`. 344 | */ 345 | 346 | input[type="number"]::-webkit-inner-spin-button, 347 | input[type="number"]::-webkit-outer-spin-button { 348 | height: auto; 349 | } 350 | 351 | /** 352 | * 1. Address `appearance` set to `searchfield` in Safari and Chrome. 353 | * 2. Address `box-sizing` set to `border-box` in Safari and Chrome 354 | * (include `-moz` to future-proof). 355 | */ 356 | 357 | input[type="search"] { 358 | -webkit-appearance: textfield; /* 1 */ 359 | -moz-box-sizing: content-box; 360 | -webkit-box-sizing: content-box; /* 2 */ 361 | box-sizing: content-box; 362 | } 363 | 364 | /** 365 | * Remove inner padding and search cancel button in Safari and Chrome on OS X. 366 | * Safari (but not Chrome) clips the cancel button when the search input has 367 | * padding (and `textfield` appearance). 368 | */ 369 | 370 | input[type="search"]::-webkit-search-cancel-button, 371 | input[type="search"]::-webkit-search-decoration { 372 | -webkit-appearance: none; 373 | } 374 | 375 | /** 376 | * Define consistent border, margin, and padding. 377 | */ 378 | 379 | fieldset { 380 | border: 1px solid #c0c0c0; 381 | margin: 0 2px; 382 | padding: 0.35em 0.625em 0.75em; 383 | } 384 | 385 | /** 386 | * 1. Correct `color` not being inherited in IE 8/9/10/11. 387 | * 2. Remove padding so people aren't caught out if they zero out fieldsets. 388 | */ 389 | 390 | legend { 391 | border: 0; /* 1 */ 392 | padding: 0; /* 2 */ 393 | } 394 | 395 | /** 396 | * Remove default vertical scrollbar in IE 8/9/10/11. 397 | */ 398 | 399 | textarea { 400 | overflow: auto; 401 | } 402 | 403 | /** 404 | * Don't inherit the `font-weight` (applied by a rule above). 405 | * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. 406 | */ 407 | 408 | optgroup { 409 | font-weight: bold; 410 | } 411 | 412 | /* Tables 413 | ========================================================================== */ 414 | 415 | /** 416 | * Remove most spacing between table cells. 417 | */ 418 | 419 | table { 420 | border-collapse: collapse; 421 | border-spacing: 0; 422 | } 423 | 424 | td, 425 | th { 426 | padding: 0; 427 | } -------------------------------------------------------------------------------- /assets/sass/_common/_utils.scss: -------------------------------------------------------------------------------- 1 | @mixin clearfix() { 2 | &:before, 3 | &:after { 4 | content: " "; 5 | display: table; 6 | } 7 | 8 | &:after { 9 | clear: both; 10 | } 11 | } 12 | 13 | @mixin min-screen($min-width: $global-body-width) { 14 | @media screen and (min-width: $min-width) { 15 | @content; 16 | } 17 | } 18 | 19 | @mixin max-screen($max-width: $global-body-width) { 20 | @media screen and (max-width: $max-width) { 21 | @content; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /assets/sass/_custom/_custom.scss: -------------------------------------------------------------------------------- 1 | // ============================== 2 | // Custom style 3 | // ============================== 4 | // You can override the variables in _variables.scss to customize the style 5 | -------------------------------------------------------------------------------- /assets/sass/_iconfont.scss: -------------------------------------------------------------------------------- 1 | // ============================== 2 | // Iconfont 3 | // ============================== 4 | 5 | @font-face { 6 | font-family: 'iconfont'; 7 | 8 | src: url('../fonts/iconfont/iconfont.eot'); 9 | src: url('../fonts/iconfont/iconfont.eot#iefix') format('embedded-opentype'), // not '?#iefix', because webpack will add '?hash=[hash]' 10 | url('../fonts/iconfont/iconfont.woff') format('woff'), 11 | url('../fonts/iconfont/iconfont.ttf') format('truetype'), 12 | url('../fonts/iconfont/iconfont.svg#iconfont') format('svg'); 13 | font-display: swap; 14 | } 15 | 16 | %base-iconfont { 17 | font-family: "iconfont" !important; 18 | speak: none; 19 | font-style: normal; 20 | font-weight: normal; 21 | font-variant: normal; 22 | text-transform: none; 23 | line-height: 1; 24 | 25 | -webkit-text-stroke-width: 0.2px; 26 | cursor: pointer; 27 | 28 | /* Enable Ligatures ================ */ 29 | letter-spacing: 0; 30 | font-feature-settings: "liga"; 31 | font-variant-ligatures: discretionary-ligatures; 32 | 33 | /* Better Font Rendering =========== */ 34 | -webkit-font-smoothing: antialiased; 35 | -moz-osx-font-smoothing: grayscale; 36 | } 37 | 38 | .iconfont { 39 | @extend %base-iconfont; 40 | } 41 | 42 | /* Social Icon */ 43 | .icon-bilibili:before { 44 | content: "\e900"; 45 | font-size: .9em; 46 | position: relative; 47 | top: -4px; 48 | } 49 | .icon-instagram:before { 50 | font-size: .95em; 51 | content: "\e611"; 52 | position: relative; 53 | top: 1px; 54 | } 55 | .icon-douban:before { 56 | content: "\e610"; 57 | position: relative; 58 | top: 2px; 59 | } 60 | .icon-tumblr:before { 61 | content: "\e69f"; 62 | font-size: .85em; 63 | position: relative; 64 | top: -2px; 65 | } 66 | .icon-linkedin:before { 67 | content: "\e60d"; 68 | position: relative; 69 | top: -2px; 70 | } 71 | .icon-twitter:before { 72 | content: "\e600"; 73 | } 74 | .icon-weibo:before { 75 | content: "\e602"; 76 | position: relative; 77 | top: 2px; 78 | } 79 | .icon-stack-overflow:before { 80 | content: "\e902"; 81 | font-size: .85em; 82 | position: relative; 83 | top: -4px; 84 | } 85 | .icon-email:before { 86 | content: "\e605"; 87 | position: relative; 88 | top: -2px; 89 | } 90 | .icon-facebook:before { 91 | content: "\e601"; 92 | font-size: .95em; 93 | position: relative; 94 | top: -2px; 95 | } 96 | .icon-gitlab:before { 97 | content: "\e901"; 98 | font-size: .9em; 99 | position: relative; 100 | top: -4px; 101 | } 102 | .icon-github:before { 103 | content: "\e606"; 104 | position: relative; 105 | top: -1px; 106 | } 107 | .icon-rss:before { 108 | content: "\e604"; 109 | } 110 | .icon-google:before { 111 | content: "\e609"; 112 | position: relative; 113 | top: 2px; 114 | } 115 | .icon-zhihu:before { 116 | content: "\e607"; 117 | font-size: .9em; 118 | } 119 | .icon-pocket:before { 120 | content: "\e856"; 121 | position: relative; 122 | top: 2px; 123 | } 124 | 125 | /* Generic Icon */ 126 | .icon-heart:before { 127 | content: "\e608"; 128 | } 129 | .icon-right:before { 130 | content: "\e60a"; 131 | } 132 | .icon-left:before { 133 | content: "\e60b"; 134 | } 135 | .icon-up:before { 136 | content: "\e60c"; 137 | } 138 | .icon-close:before { 139 | content: "\e60f"; 140 | } 141 | .icon-link:before { 142 | content: "\e909"; 143 | } 144 | 145 | /* Admonition Icon */ 146 | /* 147 | .icon-chevron-down:before { 148 | content: "\e908"; 149 | } 150 | .icon-format-quote:before { 151 | content: "\e904"; 152 | } 153 | .icon-pencil:before { 154 | content: "\e903"; 155 | } 156 | .icon-list-numbered:before { 157 | content: "\e9b9"; 158 | } 159 | .icon-list:before { 160 | content: "\e9bb"; 161 | } 162 | .icon-warning:before { 163 | content: "\ea07"; 164 | } 165 | .icon-question:before { 166 | content: "\ea09"; 167 | } 168 | .icon-info:before { 169 | content: "\ea0c"; 170 | } 171 | .icon-cross:before { 172 | content: "\ea0f"; 173 | } 174 | .icon-checkmark:before { 175 | content: "\ea10"; 176 | } 177 | .icon-fire:before { 178 | content: "\e905"; 179 | } 180 | .icon-danger:before { 181 | content: "\e905"; 182 | } 183 | .icon-flame:before { 184 | content: "\e905"; 185 | } 186 | .icon-hot:before { 187 | content: "\e905"; 188 | } 189 | .icon-bulb:before { 190 | content: "\e906"; 191 | } 192 | */ 193 | -------------------------------------------------------------------------------- /assets/sass/_partial/_404.scss: -------------------------------------------------------------------------------- 1 | // ============================== 2 | // Archive 3 | // ============================= 4 | 5 | .not-found { 6 | text-align: center; 7 | 8 | .error-emoji { 9 | color: #363636; 10 | font-size: 3rem; 11 | } 12 | 13 | .error-text { 14 | color: #797979; 15 | font-size: 1.25rem; 16 | } 17 | 18 | .error-link { 19 | margin-top: 2rem; 20 | 21 | a { 22 | color: $theme-color; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /assets/sass/_partial/_archive.scss: -------------------------------------------------------------------------------- 1 | // ============================== 2 | // Archive 3 | // ============================= 4 | 5 | .archive { 6 | margin: $archive-margin; 7 | max-width: $archive-max-width; 8 | 9 | .archive-title { 10 | font-family: $global-serif-font-family; 11 | 12 | &.tag, 13 | &.category { 14 | margin: 15px 0; 15 | } 16 | 17 | .archive-name { 18 | margin: 0; 19 | display: inline-block; 20 | font-weight: 400; 21 | font-size: $archive-name-font-size; 22 | line-height: $archive-name-font-size + 2px; 23 | } 24 | 25 | .archive-post-counter { 26 | color: $dark-gray; 27 | } 28 | } 29 | 30 | .collection-title { 31 | font-family: $global-serif-font-family; 32 | 33 | .archive-year { 34 | margin: 15px 0; 35 | font-weight: 400; 36 | font-size: $collection-title-font-size; 37 | line-height: $collection-title-font-size + 2px; 38 | } 39 | } 40 | 41 | .archive-post { 42 | padding: $archive-post-padding; 43 | border-left: $archive-post-border-left; 44 | 45 | .archive-post-time { 46 | margin-right: 10px; 47 | color: $dark-gray; 48 | } 49 | 50 | .archive-post-title { 51 | 52 | .archive-post-link { 53 | color: $theme-color; 54 | } 55 | } 56 | 57 | &::first-child { 58 | margin-top: 10px; 59 | } 60 | 61 | &:hover { 62 | border-left: $archive-post-hover-border-left; 63 | transition: $archive-post-hover-transition; 64 | transform: $archive-post-hover-transform; 65 | 66 | .archive-post-time { 67 | color: darken($dark-gray, 10%); 68 | } 69 | 70 | .archive-post-title .archive-post-link { 71 | color: darken($theme-color, 10%); 72 | } 73 | } 74 | } 75 | } 76 | 77 | @include max-screen() { 78 | .archive { 79 | margin-left: auto; 80 | margin-right: auto; 81 | 82 | .archive-title .archive-name { 83 | font-size: $archive-name-font-size - 4px; 84 | } 85 | 86 | .collection-title .archive-year { 87 | margin: 10px 0; 88 | font-size: $collection-title-font-size - 4px; 89 | } 90 | 91 | .archive-post { 92 | padding: $archive-post-mobile-padding; 93 | 94 | .archive-post-time { 95 | font-size: $archive-post-mobile-time-font-size; 96 | display: block; 97 | } 98 | } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /assets/sass/_partial/_back-to-top.scss: -------------------------------------------------------------------------------- 1 | // ============================== 2 | // Back to top 3 | // ============================= 4 | 5 | .back-to-top { 6 | display: none; 7 | position: fixed; 8 | right: 20px; 9 | bottom: 20px; 10 | transition-property: transform; 11 | transition-timing-function: ease-out; 12 | transition-duration: 0.3s; 13 | z-index: 10; 14 | 15 | &:hover { 16 | transform: translateY(-5px); 17 | } 18 | } 19 | 20 | @include max-screen() { 21 | .back-to-top { 22 | display: none !important; 23 | } 24 | } -------------------------------------------------------------------------------- /assets/sass/_partial/_footer.scss: -------------------------------------------------------------------------------- 1 | // ============================== 2 | // Post footer 3 | // ============================= 4 | 5 | .footer { 6 | margin-top: $footer-margin-top; 7 | 8 | @import "_footer/social"; 9 | @import "_footer/copyright"; 10 | } -------------------------------------------------------------------------------- /assets/sass/_partial/_footer/_copyright.scss: -------------------------------------------------------------------------------- 1 | // ============================== 2 | // Copyright 3 | // ============================= 4 | 5 | .copyright { 6 | margin: $copyright-margin; 7 | color: $dark-gray; 8 | text-align: center; 9 | font-family: $global-serif-font-family; 10 | 11 | .hexo-link, 12 | .theme-link { 13 | color: $theme-color; 14 | } 15 | 16 | .copyright-year { 17 | display: block; 18 | 19 | .heart { 20 | font-size: 14px; 21 | margin: 4px; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /assets/sass/_partial/_footer/_social.scss: -------------------------------------------------------------------------------- 1 | // ============================== 2 | // Social 3 | // ============================= 4 | 5 | .social-links { 6 | text-align: center; 7 | 8 | .iconfont { 9 | font-size: $social-icon-font-size; 10 | 11 | & + .iconfont { 12 | margin-left: $social-link-margin-left; 13 | } 14 | 15 | &:hover { 16 | color: $theme-color; 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /assets/sass/_partial/_header.scss: -------------------------------------------------------------------------------- 1 | // ============================== 2 | // Header 3 | // ============================== 4 | 5 | .header { 6 | @include clearfix; 7 | padding: $header-padding; 8 | 9 | @import '_header/logo'; 10 | @import '_header/menu'; 11 | 12 | .language-selector { 13 | float: right; 14 | } 15 | } 16 | 17 | @include max-screen() { 18 | .header { 19 | padding: 50px 0 0; 20 | text-align: center; 21 | 22 | .language-selector { 23 | display: none; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /assets/sass/_partial/_header/_logo.scss: -------------------------------------------------------------------------------- 1 | // ============================== 2 | // Logo 3 | // ============================= 4 | 5 | .logo-wrapper { 6 | float: left; 7 | 8 | .logo { 9 | font-size: $logo-font-size; 10 | font-family: $logo-font-family; 11 | } 12 | } 13 | 14 | @include max-screen() { 15 | .logo-wrapper { 16 | display: none; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /assets/sass/_partial/_header/_menu.scss: -------------------------------------------------------------------------------- 1 | // ============================== 2 | // Menu 3 | // ============================= 4 | 5 | .site-navbar { 6 | float: right; 7 | 8 | .menu { 9 | display: inline-block; 10 | position: relative; 11 | padding-left: 0; 12 | padding-right: 25px; 13 | font-family: $global-serif-font-family; 14 | 15 | .menu-item { 16 | display: inline-block; 17 | 18 | & + .menu-item { 19 | margin-left: $menu-item-margin-left;; 20 | } 21 | 22 | @include underline-from-center; 23 | } 24 | 25 | .menu-item-link { 26 | font-size: $menu-link-font-size; 27 | } 28 | } 29 | } 30 | 31 | @include max-screen() { 32 | .site-navbar { 33 | display: none; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /assets/sass/_partial/_language-selector.scss: -------------------------------------------------------------------------------- 1 | .language-selector { 2 | width: max-content; 3 | 4 | .languages-list { 5 | padding: 0; 6 | background: darken($deputy-color, 3%); 7 | 8 | .language-item { 9 | display: inline-block; 10 | list-style-type: none; 11 | text-transform: uppercase; 12 | font-family: $global-serif-font-family; 13 | font-size: 18px; 14 | padding: 0 10px; 15 | 16 | &.active { 17 | background: $theme-color; 18 | 19 | > a { 20 | color: #fff; 21 | } 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /assets/sass/_partial/_mobile.scss: -------------------------------------------------------------------------------- 1 | // ============================== 2 | // Mobile Navbar 3 | // ============================== 4 | 5 | .mobile-navbar { 6 | display: none; 7 | position: fixed; 8 | top: 0; 9 | left: 0; 10 | width: 100%; 11 | height: $mobile-navbar-height; 12 | background: $white; 13 | box-shadow: 0px 2px 2px $gray; 14 | text-align: center; 15 | transition: transform 300ms ease; 16 | z-index: 99; 17 | 18 | &.fixed-open { 19 | transform: translate3d(180px, 0px, 0px); 20 | } 21 | 22 | .mobile-header-logo { 23 | display: inline-block; 24 | margin-right: 50px; 25 | 26 | .logo { 27 | font-size: 22px; 28 | line-height: $mobile-navbar-height; 29 | font-family: $logo-font-family; 30 | } 31 | } 32 | 33 | .mobile-navbar-icon { 34 | color: $theme-color; 35 | height: $mobile-navbar-height; 36 | width: $mobile-navbar-height; 37 | font-size: 24px; 38 | text-align: center; 39 | float: left; 40 | position: relative; 41 | transition: background 0.5s; 42 | 43 | @include mobile-menu-icon(); 44 | } 45 | } 46 | 47 | .mobile-menu { 48 | background-color: rgba($deputy-color, 0.5); 49 | 50 | .mobile-menu-list { 51 | position: relative; 52 | list-style: none; 53 | margin-top: 50px; 54 | padding: 0; 55 | border-top: 1px solid $deputy-color; 56 | 57 | .mobile-menu-item { 58 | padding: 10px 30px; 59 | border-bottom: 1px solid $deputy-color; 60 | } 61 | 62 | a { 63 | font-size: 18px; 64 | font-family: $global-serif-font-family; 65 | 66 | &:hover { 67 | color: $theme-color; 68 | } 69 | } 70 | } 71 | } 72 | 73 | @include max-screen() { 74 | .mobile-navbar { 75 | display: block; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /assets/sass/_partial/_pagination.scss: -------------------------------------------------------------------------------- 1 | // ============================== 2 | // Pagination 3 | // ============================== 4 | 5 | .pagination { 6 | margin: $pagination-margin; 7 | @include clearfix; 8 | 9 | .prev, 10 | .next { 11 | font-weight: 600; 12 | font-size: $pagination-font-size; 13 | font-family: $global-serif-font-family; 14 | transition-property: transform; 15 | transition-timing-function: ease-out; 16 | transition-duration: 0.3s; 17 | } 18 | 19 | .prev { 20 | float: left; 21 | 22 | &:hover { 23 | color: $theme-color; 24 | transform: translateX(-4px); 25 | } 26 | } 27 | 28 | .next { 29 | float: right; 30 | 31 | &:hover { 32 | color: $theme-color; 33 | transform: translateX(4px); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /assets/sass/_partial/_post.scss: -------------------------------------------------------------------------------- 1 | // ============================== 2 | // Post 3 | // ============================== 4 | 5 | .posts { 6 | margin-bottom: $post-list-margin-bottom; 7 | border-bottom: $post-border; 8 | } 9 | 10 | .post { 11 | padding: $post-padding; 12 | 13 | & + .post { 14 | border-top: $post-border; 15 | } 16 | 17 | @import '_post/header'; 18 | @import '_post/toc'; 19 | @import '_post/content'; 20 | @import '_post/copyright'; 21 | @import '_post/reward'; 22 | @import '_post/footer'; 23 | @import '_post/outdated'; 24 | } 25 | -------------------------------------------------------------------------------- /assets/sass/_partial/_post/_admonition.scss: -------------------------------------------------------------------------------- 1 | .admonition { 2 | box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 3 | 0 1px 5px 0 rgba(0,0,0,.12), 4 | 0 3px 1px -2px rgba(0,0,0,.2); 5 | position: relative; 6 | margin: .9765em 0; 7 | padding: 0 .75rem; 8 | border-left: .25rem solid #448aff; 9 | border-radius: .125rem; 10 | overflow: auto; 11 | 12 | .admonition-title { 13 | margin: 0 -0.75rem; 14 | padding: .5rem .75rem .5rem 2.5rem; 15 | border-bottom: .1rem solid rgba(68,138,255,.1); 16 | background-color: rgba(68,138,255,.1); 17 | font-weight: 700; 18 | } 19 | 20 | .admonition-title:before { 21 | @extend %base-iconfont; 22 | cursor: auto; 23 | position: absolute; 24 | left: .75rem; 25 | top: .75rem; 26 | } 27 | 28 | &.note { 29 | border-left-color: #448aff; 30 | 31 | .admonition-title:before { 32 | color: #448aff; 33 | content: "\e903"; 34 | } 35 | } 36 | 37 | &.abstract { 38 | border-left-color: #00b0ff; 39 | 40 | .admonition-title { 41 | background-color: rgba(0,176,255,.1); 42 | } 43 | 44 | .admonition-title:before { 45 | color: #00b0ff; 46 | content: "\e9bb"; 47 | } 48 | } 49 | 50 | &.info { 51 | border-left-color: #00b8d4; 52 | 53 | .admonition-title { 54 | background-color: rgba(0,184,212,.1); 55 | } 56 | 57 | .admonition-title:before { 58 | color: #00b8d4; 59 | content: "\ea0c"; 60 | } 61 | } 62 | 63 | &.tip { 64 | border-left-color: #00bfa5; 65 | 66 | .admonition-title { 67 | background-color: rgba(0,191,165,.1); 68 | } 69 | 70 | .admonition-title:before { 71 | color: #00bfa5; 72 | content: "\e906"; 73 | } 74 | } 75 | 76 | &.success { 77 | border-left-color: #00c853; 78 | 79 | .admonition-title { 80 | background-color: rgba(0,200,83,.1); 81 | } 82 | 83 | .admonition-title:before { 84 | color: #00c853; 85 | content: "\ea10"; 86 | } 87 | } 88 | 89 | &.question { 90 | border-left-color: #64dd17; 91 | 92 | .admonition-title { 93 | background-color: rgba(100,221,23,.1); 94 | } 95 | 96 | .admonition-title:before { 97 | color: #64dd17; 98 | content: "\ea09"; 99 | } 100 | } 101 | 102 | &.warning { 103 | border-left-color: #ff9100; 104 | 105 | .admonition-title { 106 | background-color: rgba(255,145,0,.1); 107 | } 108 | 109 | .admonition-title:before { 110 | color: #ff9100; 111 | content: "\ea07"; 112 | } 113 | } 114 | 115 | &.failure { 116 | border-left-color: #ff5252; 117 | 118 | .admonition-title { 119 | background-color: rgba(255,82,82,.1); 120 | } 121 | 122 | .admonition-title:before { 123 | color: #ff5252; 124 | content: "\ea0f"; 125 | } 126 | } 127 | 128 | &.danger { 129 | border-left-color: #ff1744; 130 | 131 | .admonition-title { 132 | background-color: rgba(255,23,68,.1); 133 | } 134 | 135 | .admonition-title:before { 136 | color: #ff1744; 137 | content: "\e905"; 138 | } 139 | } 140 | 141 | &.bug { 142 | border-left-color: #f50057; 143 | 144 | .admonition-title { 145 | background-color: rgba(245,0,87,.1); 146 | } 147 | 148 | .admonition-title:before { 149 | color: #f50057; 150 | content: "\e907"; 151 | } 152 | } 153 | 154 | &.example { 155 | border-left-color: #651fff; 156 | 157 | .admonition-title { 158 | background-color: rgba(101,31,255,.1); 159 | } 160 | 161 | .admonition-title:before { 162 | color: #651fff; 163 | content: "\e9b9"; 164 | } 165 | } 166 | 167 | &.quote { 168 | border-left-color: #9e9e9e; 169 | 170 | .admonition-title { 171 | background-color: hsla(0,0%,62%,.1); 172 | } 173 | 174 | .admonition-title:before { 175 | color: #9e9e9e; 176 | content: "\e904"; 177 | } 178 | } 179 | 180 | &:last-child { 181 | margin-bottom: .75rem; 182 | } 183 | } 184 | 185 | details.admonition { 186 | summary { 187 | display: block; 188 | outline: none; 189 | cursor: pointer; 190 | 191 | &::-webkit-details-marker { 192 | display: none; 193 | } 194 | 195 | &:after { 196 | @extend %base-iconfont; 197 | position: absolute; 198 | top: .75rem; 199 | right: .75rem; 200 | color: rgba(0,0,0,.26); 201 | content: "\e908"; 202 | } 203 | } 204 | } 205 | 206 | details.admonition[open] { 207 | > summary:after { 208 | transform: rotate(180deg); 209 | } 210 | } 211 | -------------------------------------------------------------------------------- /assets/sass/_partial/_post/_code.scss: -------------------------------------------------------------------------------- 1 | code, pre { 2 | padding: 7px; 3 | font-size: $code-font-size; 4 | font-family: $code-font-family; 5 | background: $code-background; 6 | } 7 | 8 | code { 9 | padding: 3px 5px; 10 | border-radius: 4px; 11 | color: $code-color; 12 | } 13 | 14 | pre > code { 15 | display: block; 16 | } 17 | 18 | // highlight.js 19 | figure.highlight { 20 | margin: 1em 0; 21 | border-radius: 5px; 22 | overflow-x: auto; 23 | box-shadow: 1px 1px 2px rgba(0,0,0,0.125); 24 | position: relative; 25 | 26 | table { 27 | position: relative; 28 | 29 | &::after { 30 | position: absolute; 31 | top: 0; 32 | right: 0; 33 | left: 0; 34 | padding: 2px 7px; 35 | font-size: $code-font-size; 36 | font-weight: bold; 37 | color: darken($gray, 10%); 38 | background: darken($code-background, 3%); 39 | content: 'Code'; 40 | } 41 | } 42 | 43 | @each $sign, $text in $code-type-list { 44 | &.#{$sign} > table::after { 45 | content: $text; 46 | } 47 | } 48 | 49 | .code { 50 | pre { 51 | margin: 0; 52 | padding: 30px 10px 10px; 53 | } 54 | } 55 | 56 | .gutter { 57 | width: 10px; 58 | color: $gray; 59 | 60 | pre { 61 | margin: 0; 62 | padding: 30px 7px 10px; 63 | } 64 | } 65 | 66 | .line { 67 | // Fix code block null line height and 68 | // Synchronous gutter and code line highly. 69 | height: round($code-font-size * 1.5); 70 | } 71 | 72 | table, tr, td { 73 | margin: 0; 74 | padding: 0; 75 | width: 100%; 76 | border-collapse: collapse; 77 | } 78 | 79 | .code { 80 | .hljs-comment, 81 | .hljs-quote { 82 | color: map-get($code-highlight-color, comment); 83 | } 84 | 85 | .hljs-keyword, 86 | .hljs-selector-tag, 87 | .hljs-addition { 88 | color: map-get($code-highlight-color, keyword); 89 | } 90 | 91 | .hljs-number, 92 | .hljs-string, 93 | .hljs-meta .hljs-meta-string, 94 | .hljs-literal, 95 | .hljs-doctag, 96 | .hljs-regexp { 97 | color: map-get($code-highlight-color, number); 98 | } 99 | 100 | .hljs-title, 101 | .hljs-section, 102 | .hljs-name, 103 | .hljs-selector-id, 104 | .hljs-selector-class { 105 | color: map-get($code-highlight-color, title); 106 | } 107 | 108 | .hljs-attribute, 109 | .hljs-attr, 110 | .hljs-variable, 111 | .hljs-template-variable, 112 | .hljs-class .hljs-title, 113 | .hljs-type { 114 | color: map-get($code-highlight-color, attribute); 115 | } 116 | 117 | .hljs-symbol, 118 | .hljs-bullet, 119 | .hljs-subst, 120 | .hljs-meta, 121 | .hljs-meta .hljs-keyword, 122 | .hljs-selector-attr, 123 | .hljs-selector-pseudo, 124 | .hljs-link { 125 | color: map-get($code-highlight-color, symbol); 126 | } 127 | 128 | .hljs-built_in, 129 | .hljs-deletion { 130 | color: map-get($code-highlight-color, built_in); 131 | } 132 | 133 | .hljs-formula { 134 | background: map-get($code-highlight-color, formula); 135 | } 136 | 137 | .hljs-emphasis { 138 | font-style: italic; 139 | } 140 | 141 | .hljs-strong { 142 | font-weight: bold; 143 | } 144 | } 145 | } 146 | 147 | // chroma 148 | .highlight > .chroma { 149 | margin: 1em 0; 150 | border-radius: 5px; 151 | overflow-x: auto; 152 | box-shadow: 1px 1px 2px rgba(0,0,0,0.125); 153 | position: relative; 154 | background: $code-background; 155 | 156 | code { 157 | padding: 0; 158 | } 159 | 160 | table { 161 | position: relative; 162 | 163 | &::after { 164 | position: absolute; 165 | top: 0; 166 | right: 0; 167 | left: 0; 168 | padding: 2px 7px; 169 | font-size: $code-font-size; 170 | font-weight: bold; 171 | color: darken($gray, 10%); 172 | background: darken($code-background, 3%); 173 | content: 'Code'; 174 | } 175 | } 176 | 177 | @each $sign, $text in $code-type-list { 178 | &.#{$sign} > table::after { 179 | content: $text; 180 | } 181 | } 182 | 183 | .lntd { 184 | // Fix code block null line height and 185 | // Synchronous gutter and code line highly. 186 | line-height: round($code-font-size * 1.5); 187 | 188 | &:first-child { 189 | width: 10px; 190 | 191 | pre { 192 | margin: 0; 193 | padding: 30px 7px 10px; 194 | } 195 | } 196 | 197 | &:last-child { 198 | vertical-align: top; 199 | 200 | pre { 201 | margin: 0; 202 | padding: 30px 10px 10px; 203 | } 204 | } 205 | } 206 | 207 | table, tr, td { 208 | margin: 0; 209 | padding: 0; 210 | width: 100%; 211 | border-collapse: collapse; 212 | } 213 | 214 | /* LineNumbersTable */ .lnt { color: $gray; } 215 | /* LineHighlight */ .hl { display: block; width: 100%; background-color: #ffffcc } 216 | 217 | /* Keyword */ .k { color: #859900 } 218 | /* KeywordConstant */ .kc { color: #859900; font-weight: bold } 219 | /* KeywordDeclaration */ .kd { color: #859900 } 220 | /* KeywordNamespace */ .kn { color: #dc322f; font-weight: bold } 221 | /* KeywordPseudo */ .kp { color: #859900 } 222 | /* KeywordReserved */ .kr { color: #859900 } 223 | /* KeywordType */ .kt { color: #859900; font-weight: bold } 224 | /* Name */ .n { color: #268bd2 } 225 | /* NameAttribute */ .na { color: #268bd2 } 226 | /* NameBuiltin */ .nb { color: #cb4b16 } 227 | /* NameBuiltinPseudo */ .bp { color: #268bd2 } 228 | /* NameClass */ .nc { color: #cb4b16 } 229 | /* NameConstant */ .no { color: #268bd2 } 230 | /* NameDecorator */ .nd { color: #268bd2 } 231 | /* NameEntity */ .ni { color: #268bd2 } 232 | /* NameException */ .ne { color: #268bd2 } 233 | /* NameFunction */ .nf { color: #268bd2 } 234 | /* NameFunctionMagic */ .fm { color: #268bd2 } 235 | /* NameLabel */ .nl { color: #268bd2 } 236 | /* NameNamespace */ .nn { color: #268bd2 } 237 | /* NameOther */ .nx { color: #268bd2 } 238 | /* NameProperty */ .py { color: #268bd2 } 239 | /* NameTag */ .nt { color: #268bd2; font-weight: bold } 240 | /* NameVariable */ .nv { color: #268bd2 } 241 | /* NameVariableClass */ .vc { color: #268bd2 } 242 | /* NameVariableGlobal */ .vg { color: #268bd2 } 243 | /* NameVariableInstance */ .vi { color: #268bd2 } 244 | /* NameVariableMagic */ .vm { color: #268bd2 } 245 | /* Literal */ .l { color: #2aa198 } 246 | /* LiteralDate */ .ld { color: #2aa198 } 247 | /* LiteralString */ .s { color: #2aa198 } 248 | /* LiteralStringAffix */ .sa { color: #2aa198 } 249 | /* LiteralStringBacktick */ .sb { color: #2aa198 } 250 | /* LiteralStringChar */ .sc { color: #2aa198 } 251 | /* LiteralStringDelimiter */ .dl { color: #2aa198 } 252 | /* LiteralStringDoc */ .sd { color: #2aa198 } 253 | /* LiteralStringDouble */ .s2 { color: #2aa198 } 254 | /* LiteralStringEscape */ .se { color: #2aa198 } 255 | /* LiteralStringHeredoc */ .sh { color: #2aa198 } 256 | /* LiteralStringInterpol */ .si { color: #2aa198 } 257 | /* LiteralStringOther */ .sx { color: #2aa198 } 258 | /* LiteralStringRegex */ .sr { color: #2aa198 } 259 | /* LiteralStringSingle */ .s1 { color: #2aa198 } 260 | /* LiteralStringSymbol */ .ss { color: #2aa198 } 261 | /* LiteralNumber */ .m { color: #2aa198; font-weight: bold } 262 | /* LiteralNumberBin */ .mb { color: #2aa198; font-weight: bold } 263 | /* LiteralNumberFloat */ .mf { color: #2aa198; font-weight: bold } 264 | /* LiteralNumberHex */ .mh { color: #2aa198; font-weight: bold } 265 | /* LiteralNumberInteger */ .mi { color: #2aa198; font-weight: bold } 266 | /* LiteralNumberIntegerLong */ .il { color: #2aa198; font-weight: bold } 267 | /* LiteralNumberOct */ .mo { color: #2aa198; font-weight: bold } 268 | /* OperatorWord */ .ow { color: #859900 } 269 | /* Comment */ .c { color: #93a1a1; font-style: italic } 270 | /* CommentHashbang */ .ch { color: #93a1a1; font-style: italic } 271 | /* CommentMultiline */ .cm { color: #93a1a1; font-style: italic } 272 | /* CommentSingle */ .c1 { color: #93a1a1; font-style: italic } 273 | /* CommentSpecial */ .cs { color: #93a1a1; font-style: italic } 274 | /* CommentPreproc */ .cp { color: #93a1a1; font-style: italic } 275 | /* CommentPreprocFile */ .cpf { color: #93a1a1; font-style: italic } 276 | /* Generic */ .g { color: #d33682 } 277 | /* GenericDeleted */ .gd { color: #b58900 } 278 | /* GenericEmph */ .ge { color: #d33682 } 279 | /* GenericError */ .gr { color: #d33682 } 280 | /* GenericHeading */ .gh { color: #d33682 } 281 | /* GenericInserted */ .gi { color: #859900 } 282 | /* GenericOutput */ .go { color: #d33682 } 283 | /* GenericPrompt */ .gp { color: #d33682 } 284 | /* GenericStrong */ .gs { color: #d33682 } 285 | /* GenericSubheading */ .gu { color: #d33682 } 286 | /* GenericTraceback */ .gt { color: #d33682 } 287 | } 288 | -------------------------------------------------------------------------------- /assets/sass/_partial/_post/_content.scss: -------------------------------------------------------------------------------- 1 | // ============================== 2 | // Post content 3 | // ============================== 4 | 5 | .post-content { 6 | word-wrap: break-word; 7 | 8 | @for $i from 1 through 6 { 9 | h#{$i} { 10 | font-weight: 400; 11 | font-family: $global-serif-font-family; 12 | 13 | .anchor { 14 | float: left; 15 | line-height: 1; 16 | margin-left: -20px; 17 | padding-right: 4px; 18 | 19 | &:hover { 20 | border-bottom: initial; 21 | } 22 | 23 | .icon-link { 24 | visibility: hidden; 25 | font-size: 16px; 26 | display: contents; 27 | 28 | &:before { 29 | vertical-align: middle; 30 | } 31 | } 32 | } 33 | 34 | &:hover { 35 | .icon-link { 36 | visibility: visible; 37 | } 38 | } 39 | } 40 | } 41 | 42 | a { 43 | color: $theme-color; 44 | word-break: break-all; 45 | 46 | &:hover { 47 | border-bottom: $content-link-border; 48 | } 49 | 50 | &.fancybox { 51 | border: 0; 52 | } 53 | } 54 | 55 | blockquote { 56 | margin: 2em 0; 57 | padding: 10px 20px; 58 | position: relative; 59 | color: rgba(#34495e, 0.8); 60 | background-color: $content-blockquote-backgroud; 61 | border-left: $content-blockquote-border-left; 62 | box-shadow: 1px 1px 2px rgba(0,0,0,0.125); 63 | 64 | p { 65 | margin: 0; 66 | } 67 | } 68 | 69 | img { 70 | display: inline-block; 71 | max-width: 100%; 72 | } 73 | 74 | .table-wrapper { 75 | overflow-x: auto; 76 | 77 | > table { 78 | max-width: 100%; 79 | margin: 10px 0; 80 | border-spacing: 0; 81 | box-shadow: 2px 2px 3px rgba(0,0,0,.125); 82 | 83 | thead { 84 | background: $deputy-color; 85 | } 86 | 87 | th, td { 88 | padding: 5px 15px; 89 | border: 1px double $content-table-border-color; 90 | } 91 | 92 | tr:hover { 93 | background-color: $deputy-color; 94 | } 95 | } 96 | } 97 | 98 | @import 'code'; 99 | @import 'admonition'; 100 | 101 | .post-summary { 102 | margin-bottom: 1em; 103 | } 104 | 105 | .read-more { 106 | .read-more-link { 107 | color: $theme-color; 108 | font-size: 1.1em; 109 | font-family: $global-serif-font-family; 110 | 111 | &:hover { 112 | border-bottom: $post-readMore-border-bottom; 113 | } 114 | } 115 | } 116 | 117 | kbd { 118 | display: inline-block; 119 | padding: 0.25em; 120 | background-color: #fafafa; 121 | border: 1px solid #dbdbdb; 122 | border-bottom-color: #b5b5b5; 123 | border-radius: 3px; 124 | box-shadow: inset 0 -1px 0 #b5b5b5; 125 | font-size: 0.8em; 126 | line-height: 1.25; 127 | font-family: "SFMono-Regular","Liberation Mono","Roboto Mono",Menlo,Monaco,Consolas,"Courier New",Courier,monospace; 128 | color: #4a4a4a; 129 | } 130 | 131 | dl dt::after { 132 | content: ':'; 133 | } 134 | 135 | figure { 136 | &.center { 137 | text-align: center; 138 | } 139 | 140 | &.right { 141 | text-align: right; 142 | } 143 | 144 | &.left { 145 | text-align: left; 146 | } 147 | 148 | figcaption h4 { 149 | color: #b5b5b5; 150 | font-size: 0.9rem; 151 | } 152 | } 153 | 154 | hr { 155 | margin: 1rem 0; 156 | position: relative; 157 | border-top: 2px dashed $theme-color; 158 | border-bottom: none; 159 | } 160 | 161 | .footnote-ref { 162 | > a { 163 | font-weight: bold; 164 | margin-left: 3px; 165 | 166 | &:before { 167 | content: "["; 168 | } 169 | 170 | &:after { 171 | content: "]"; 172 | } 173 | } 174 | } 175 | 176 | .task-list { 177 | list-style: none; 178 | padding-left: 1.5rem; 179 | } 180 | 181 | .align-center { 182 | text-align: center; 183 | } 184 | 185 | .align-right { 186 | text-align: right; 187 | } 188 | 189 | .align-left { 190 | text-align: left; 191 | } 192 | 193 | .MJXc-display { 194 | overflow-x: auto; 195 | overflow-y: hidden; 196 | padding-right: 1px; 197 | } 198 | } 199 | -------------------------------------------------------------------------------- /assets/sass/_partial/_post/_copyright.scss: -------------------------------------------------------------------------------- 1 | .post-copyright { 2 | margin-top: 20px; 3 | padding-top: 10px; 4 | border-top: 1px dashed $light-gray; 5 | 6 | .copyright-item { 7 | margin: 5px 0; 8 | 9 | a { 10 | color: $theme-color; 11 | word-wrap: break-word; 12 | 13 | &:hover { 14 | border-bottom: $content-link-border; 15 | } 16 | } 17 | 18 | .item-title { 19 | display: inline-block; 20 | min-width: 5rem; 21 | margin-right: .5rem; 22 | text-align: right; 23 | 24 | &:after { 25 | content: " :"; 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /assets/sass/_partial/_post/_footer.scss: -------------------------------------------------------------------------------- 1 | // ============================== 2 | // Post footer 3 | // ============================== 4 | 5 | .post-footer { 6 | margin-top: $post-footer-margin-top; 7 | border-top: $post-footer-border-top; 8 | font-family: $global-serif-font-family; 9 | 10 | .post-tags { 11 | padding: $post-tags-padding; 12 | 13 | a { 14 | margin-right: 5px; 15 | color: $theme-color; 16 | word-break: break-all; 17 | 18 | &::before { 19 | content: '#'; 20 | } 21 | } 22 | } 23 | 24 | .post-nav { 25 | margin: 1em 0; 26 | @include clearfix; 27 | 28 | .prev, 29 | .next { 30 | font-weight: 600; 31 | font-size: $post-nav-font-size; 32 | font-family: $global-serif-font-family; 33 | transition-property: transform; 34 | transition-timing-function: ease-out; 35 | transition-duration: 0.3s; 36 | } 37 | 38 | .prev { 39 | float: left; 40 | 41 | &:hover { 42 | color: $theme-color; 43 | transform: translateX(-4px); 44 | } 45 | } 46 | 47 | .next { 48 | float: right; 49 | 50 | &:hover { 51 | color: $theme-color; 52 | transform: translateX(4px); 53 | } 54 | } 55 | 56 | .nav-mobile { 57 | display: none; 58 | } 59 | } 60 | } 61 | 62 | @include max-screen() { 63 | .post-footer { 64 | .post-nav { 65 | .nav-default { 66 | display: none; 67 | } 68 | 69 | .nav-mobile { 70 | display: inline; 71 | } 72 | } 73 | } 74 | } -------------------------------------------------------------------------------- /assets/sass/_partial/_post/_header.scss: -------------------------------------------------------------------------------- 1 | .post-header { 2 | margin-bottom: 20px; 3 | 4 | .post-title { 5 | margin: 0; 6 | font-size: $post-title-font-size; 7 | font-weight: $post-title-font-weight; 8 | font-family: $global-serif-font-family; 9 | } 10 | 11 | .post-link { 12 | @include underline-from-center; 13 | } 14 | 15 | .post-meta { 16 | font-size: 14px; 17 | color: $post-meta-font-color; 18 | 19 | .post-time { 20 | font-size: 15px; 21 | } 22 | 23 | .post-category { 24 | display: inline; 25 | 26 | a { 27 | color: inherit; 28 | 29 | &::before { 30 | content: '·'; 31 | } 32 | 33 | &:hover { 34 | color: $theme-color; 35 | } 36 | } 37 | } 38 | 39 | .more-meta { 40 | &::before { 41 | content: '·'; 42 | } 43 | } 44 | 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /assets/sass/_partial/_post/_outdated.scss: -------------------------------------------------------------------------------- 1 | .post-outdated { 2 | .hint { 3 | position: relative; 4 | margin-top: 20px; 5 | margin-bottom: 20px; 6 | padding: 5px 10px; 7 | border-left: 4px solid rgb(66, 172, 243); 8 | background-color: rgb(239, 245, 255); 9 | border-color: rgb(66, 172, 243); 10 | } 11 | 12 | .warn { 13 | position: relative; 14 | margin-top: 20px; 15 | margin-bottom: 20px; 16 | padding: 5px 10px; 17 | border-left: 4px solid #f9cf63; 18 | background-color: #ffffc0; 19 | border-color: #f9cf63; 20 | } 21 | } 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /assets/sass/_partial/_post/_reward.scss: -------------------------------------------------------------------------------- 1 | .post-reward { 2 | margin-top: 20px; 3 | padding-top: 10px; 4 | text-align: center; 5 | border-top: 1px dashed $light-gray; 6 | 7 | .reward-button { 8 | margin: 15px 0; 9 | padding: 3px 7px; 10 | display: inline-block; 11 | color: $theme-color; 12 | border: 1px solid $theme-color; 13 | border-radius: 5px; 14 | cursor: pointer; 15 | 16 | &:hover { 17 | color: $white; 18 | background-color: $theme-color; 19 | transition: 0.5s; 20 | } 21 | } 22 | 23 | #reward:checked { 24 | & ~ .qr-code { 25 | display: block; 26 | } 27 | 28 | & ~ .reward-button { 29 | display: none; 30 | } 31 | } 32 | 33 | .qr-code { 34 | display: none; 35 | 36 | .qr-code-image { 37 | display: inline-block; 38 | min-width: 200px; 39 | width: 40%; 40 | margin-top: 15px; 41 | 42 | span { 43 | display: inline-block; 44 | width: 100%; 45 | margin: 8px 0; 46 | } 47 | } 48 | 49 | .image { 50 | width: 200px; 51 | height: 200px; 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /assets/sass/_partial/_post/_toc.scss: -------------------------------------------------------------------------------- 1 | .post-toc { 2 | position: absolute; 3 | width: $post-toc-width; 4 | margin-left: $post-toc-margin-left; 5 | padding: 10px; 6 | font-family: $global-serif-font-family; 7 | border-radius: 5px; 8 | background: $post-toc-backgroud; 9 | box-shadow: 1px 1px 2px rgba(0,0,0,0.125); 10 | word-wrap: break-word; 11 | box-sizing: border-box; 12 | 13 | .post-toc-title { 14 | margin: 0 10px; 15 | font-size: $post-toc-title-size; 16 | font-weight: 400; 17 | text-transform: uppercase; 18 | } 19 | 20 | .post-toc-content { 21 | font-size: $post-toc-content; 22 | 23 | &.always-active ul { 24 | display: block; 25 | } 26 | 27 | >nav>ul { 28 | margin: 10px 0; 29 | } 30 | 31 | ul { 32 | padding-left: 20px; 33 | list-style: $post-toc-list-style; 34 | 35 | ul { 36 | padding-left: 15px; 37 | display: none; 38 | } 39 | 40 | .has-active > ul { 41 | display: block; 42 | } 43 | } 44 | 45 | .toc-link.active { 46 | color: $theme-color; 47 | } 48 | } 49 | } 50 | 51 | @include max-screen($toc-max-sreen-width) { 52 | .post-toc { 53 | display: none; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /assets/sass/_partial/_slideout.scss: -------------------------------------------------------------------------------- 1 | // ============================== 2 | // slideout (https://github.com/mango/slideout) 3 | // ============================== 4 | 5 | .slideout-menu { 6 | position: fixed; 7 | top: 0; 8 | left: 0px; 9 | bottom: 0; 10 | width: 180px; 11 | min-height: 100vh; 12 | overflow-y: hidden; 13 | -webkit-overflow-scrolling: touch; 14 | z-index: 0; 15 | display: none; 16 | 17 | .language-selector { 18 | padding-left: 30px; 19 | } 20 | } 21 | 22 | .slideout-panel { 23 | position: relative; 24 | z-index: 1; 25 | background-color: $white; 26 | min-height: 100vh; 27 | } 28 | 29 | .slideout-open, 30 | .slideout-open body, 31 | .slideout-open .slideout-panel { 32 | overflow: hidden; 33 | } 34 | 35 | .slideout-open .slideout-menu { 36 | display: block; 37 | } 38 | -------------------------------------------------------------------------------- /assets/sass/_partial/_terms.scss: -------------------------------------------------------------------------------- 1 | // ============================== 2 | // General Terms(tags, categories, etc.) 3 | // ============================= 4 | 5 | .terms { 6 | margin: 2em 0 3em; 7 | text-align: center; 8 | font-family: $global-serif-font-family; 9 | 10 | .terms-title { 11 | display: inline-block; 12 | font-size: $terms-title-size; 13 | color: $theme-color; 14 | border-bottom: $terms-title-border-bottom; 15 | } 16 | 17 | .terms-tags { 18 | margin: 10px 0; 19 | 20 | .terms-link { 21 | display: inline-block; 22 | position: relative; 23 | margin: $terms-link-margin; 24 | word-wrap: break-word; 25 | transition-duration: 0.2s; 26 | transition-property: transform; 27 | transition-timing-function: ease-out; 28 | 29 | .terms-count { 30 | display: inline-block; 31 | position: relative; 32 | top: -8px; 33 | right: -2px; 34 | color: $theme-color; 35 | font-size: $terms-count-font-size; 36 | } 37 | 38 | &:active, 39 | &:focus, 40 | &:hover { 41 | color: $theme-color; 42 | transform: scale(1.1); 43 | } 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /assets/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | // ============================== 2 | // Variables 3 | // ============================== 4 | 5 | // ========== Theme Color ========== // 6 | // Config here to change theme color 7 | // Default | Mint Green | Cobalt Blue | Hot Pink | Dark Violet 8 | $theme-color-config: 'Default'; 9 | 10 | // Default theme color map 11 | $theme-color-map: ( 12 | 'Default': #c05b4d #f8f5ec, 13 | 'Mint Green': #16982B #f5f5f5, 14 | 'Cobalt Blue': #0047AB #f0f2f5, 15 | 'Hot Pink': #FF69B4 #f8f5f5, 16 | 'Dark Violet': #9932CC #f5f4fa 17 | ); 18 | 19 | // Check theme color config. 20 | // if it does not exist, use default theme color. 21 | @if not(map-has-key($theme-color-map, $theme-color-config)) { 22 | $theme-color-config: 'Default'; 23 | } 24 | $theme-color-list: map-get($theme-color-map, $theme-color-config); 25 | 26 | // Default theme color of the site. 27 | $theme-color: nth($theme-color-list, 1) !default; 28 | 29 | // Deputy theme color of the site. 30 | $deputy-color: nth($theme-color-list, 2) !default; 31 | 32 | 33 | // ========== Color ========== // 34 | $black: #0a0a0a !default; 35 | $white: #fefefe !default; 36 | $light-gray: #e6e6e6 !default; 37 | $gray: #cacaca !default; 38 | $dark-gray: #8a8a8a !default; 39 | 40 | 41 | // ========== Global ========== // 42 | // Text color of the body. 43 | $global-font-color: #34495e !default; 44 | 45 | // Font size attribute applied to '' and ''. 46 | $global-font-size: 16px !default; 47 | 48 | // Global width of ''. 49 | $global-body-width: 800px !default; 50 | 51 | // Padding of container main 52 | $global-container-padding: 0 20px !default; 53 | 54 | // Default line height for all type. `$global-lineheight` is 24px while `$global-font-size` is 16px. 55 | $global-lineheight: 1.5 !default; 56 | 57 | // Font family of the site. 58 | $global-font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif !default; 59 | 60 | // Serif font family of the site. 61 | $global-serif-font-family: Athelas, STHeiti, Microsoft Yahei, serif !default; 62 | 63 | // Background color of the site. 64 | $global-background: $white !default; 65 | 66 | // Headings font size of the site. 67 | $global-headings: ( 68 | h1: 26px, 69 | h2: 24px, 70 | h3: 20px, 71 | h4: 16px, 72 | h5: 14px, 73 | h6: 14px 74 | ) !default; 75 | 76 | 77 | // ========== Header ========== // 78 | // Padding of the site header. 79 | $header-padding: 20px 20px !default; 80 | 81 | // Font family: Chancery 82 | @font-face { 83 | font-family: 'Chancery'; 84 | src: url('../fonts/chancery/apple-chancery-webfont.eot'); 85 | src: local('Apple Chancery'), url('../fonts/chancery/apple-chancery-webfont.eot?#iefix') format('embedded-opentype'), 86 | url('../fonts/chancery/apple-chancery-webfont.woff2') format('woff2'), 87 | url('../fonts/chancery/apple-chancery-webfont.woff') format('woff'), 88 | url('../fonts/chancery/apple-chancery-webfont.ttf') format('truetype'), 89 | url('../fonts/chancery/apple-chancery-webfont.svg#apple-chancery') format('svg'); 90 | font-weight: lighter; 91 | font-style: normal; 92 | font-display: swap; 93 | } 94 | 95 | // Font size of the logo. 96 | $logo-font-size: 48px !default; 97 | 98 | // Font family of the logo. 99 | $logo-font-family: 'Chancery', cursive, LiSu, sans-serif !default; 100 | 101 | // Margin of menu item. 102 | $menu-item-margin-left: 10px !default; 103 | 104 | // Margin of menu item in mobile. 105 | $menu-item-mobile-margin: 5px !default; 106 | 107 | // Font size of menu item link. 108 | $menu-link-font-size: 18px !default; 109 | 110 | // Height of the mobile header. 111 | $mobile-navbar-height: 50px !default; 112 | 113 | // ========== Post ========== // 114 | // Margin bottom of post list. 115 | $post-list-margin-bottom: 20px !default; 116 | 117 | // Padding of the post. 118 | $post-padding: 1.5em 0 !default; 119 | 120 | // Border top of the post + post. 121 | $post-border: 1px solid $light-gray !default; 122 | 123 | // Font size of post title. 124 | $post-title-font-size: 27px !default; 125 | 126 | // Font weight of post title. 127 | $post-title-font-weight: 400 !default; 128 | 129 | // Margin top of the post meta (post time). 130 | $post-meta-margin-top: 5px !default; 131 | 132 | // Font color of the post meta. 133 | $post-meta-font-color: $dark-gray !default; 134 | 135 | // Border bottom of the read more link when hover it. 136 | $post-readMore-border-bottom: 1px solid $theme-color !default; 137 | 138 | // Margin top of the post footer. 139 | $post-footer-margin-top: 20px !default; 140 | 141 | // Border top of post footer. 142 | $post-footer-border-top: 1px solid $light-gray !default; 143 | 144 | // Padding of the post tags. 145 | $post-tags-padding: 15px 0 !default; 146 | 147 | // Font size of post pagination. 148 | $post-nav-font-size: 18px !default; 149 | 150 | 151 | // ========== TOC ========== // 152 | // Width of the post toc. 153 | $post-toc-width: 200px !default; 154 | 155 | // Backgroud color of the post toc. 156 | $post-toc-backgroud: rgba($deputy-color, 0.6) !default; 157 | 158 | // Margin left of the post toc. 159 | $post-toc-margin-left: $global-body-width - 15px !default; 160 | 161 | // Font size of the post toc title. 162 | $post-toc-title-size: 20px !default; 163 | 164 | // Font size of the post toc content. 165 | $post-toc-content: 15px !default; 166 | 167 | // List style of the post toc list. 168 | $post-toc-list-style: square !default; 169 | 170 | // Max screen media of the post toc. 171 | $toc-max-sreen-width: 2 * $post-toc-width + $post-toc-margin-left !default; 172 | 173 | // ========== Content ========== // 174 | // Headings anchor. 175 | $content-headings-anchor: "" !default; 176 | 177 | // Border bottom of the link when hover it. 178 | $content-link-border: 1px solid $theme-color !default; 179 | 180 | // Background color of the blockquote. 181 | $content-blockquote-backgroud: rgba($theme-color, 0.05) !default; 182 | 183 | // Border left of the blockquote. 184 | $content-blockquote-border-left: 3px solid rgba($theme-color, 0.3) !default; 185 | 186 | // Border color of the table. 187 | $content-table-border-color: darken($deputy-color, 3%) !default; 188 | 189 | // ========== Code ========== // 190 | // Color of the code. 191 | $code-color: #c7254e !default; 192 | 193 | // Font size of code. 194 | $code-font-size: 0.9em !default; 195 | 196 | // Font family of the code. 197 | $code-font-family: Consolas, Monaco, Menlo, "DejaVu Sans Mono", 198 | "Bitstream Vera Sans Mono", "Courier New", monospace !default; 199 | 200 | // Color of code highlight, solarized. 201 | $code-highlight-color: ( 202 | comment: #93a1a1, 203 | keyword: #859900, 204 | number: #2aa198, 205 | title: #268bd2, 206 | attribute: #b58900, 207 | symbol: #cb4b16, 208 | built_in: #dc322f, 209 | formula: #eee8d5 210 | ) !default; 211 | 212 | // Code type list. 213 | $code-type-list: ( 214 | // Custom code type 215 | language-bash: "Bash", 216 | language-c: "C", 217 | language-cs: "C#", 218 | language-cpp: "C++", 219 | language-css: "CSS", 220 | language-coffeescript: "CoffeeScript", 221 | language-html: "HTML", 222 | language-xml: "XML", 223 | language-http: "HTTP", 224 | language-json: "JSON", 225 | language-java: "Java", 226 | language-js: "JavaScript", 227 | language-javascript: "JavaScript", 228 | language-makefile: "Makefile", 229 | language-markdown: "Markdown", 230 | language-objectivec: "Objective-C", 231 | language-php: "PHP", 232 | language-perl: "Perl", 233 | language-python: "Python", 234 | language-ruby: "Ruby", 235 | language-sql: "SQL", 236 | language-shell: "Shell", 237 | 238 | language-erlang: "Erlang", 239 | language-go: "Go", 240 | language-go-html-template: "Go HTML Template", 241 | language-groovy: "Groovy", 242 | language-haskell: "Haskell", 243 | language-kotlin: "Kotlin", 244 | language-clojure: "Clojure", 245 | language-less: "Less", 246 | language-lisp: "Lisp", 247 | language-lua: "Lua", 248 | language-matlab: "Matlab", 249 | language-rust: "Rust", 250 | language-scss: "Scss", 251 | language-scala: "Scala", 252 | language-swift: "Swift", 253 | language-typescript: "TypeScript", 254 | language-yml: "YAML", 255 | language-yaml: "YAML", 256 | language-toml: "TOML", 257 | language-diff: "Diff" 258 | ) !default; 259 | 260 | // Color of the code background. 261 | $code-background: $deputy-color !default; 262 | 263 | 264 | // ========== Pagination ========== // 265 | // Margin of the pagination. 266 | $pagination-margin: 2em 0 !default; 267 | 268 | // Font size of the pagination (Without post, post pagination see line 140). 269 | $pagination-font-size: 20px !default; 270 | 271 | 272 | // ========== Footer ========== // 273 | // Margin top of the footer. 274 | $footer-margin-top: 2em !default; 275 | 276 | // Margin left of the social link. 277 | $social-link-margin-left: 10px !default; 278 | 279 | // Font size of the social icon. 280 | $social-icon-font-size: 30px !default; 281 | 282 | // Margin of the copyright. 283 | $copyright-margin: 10px 0 !default; 284 | 285 | 286 | // ========== Archive ========== // 287 | // Margin of the archive. 288 | $archive-margin: 2em 0px !default; 289 | 290 | // Max width of the archive. 291 | $archive-max-width: 550px !default; 292 | 293 | // Font size of the archive name. 294 | $archive-name-font-size: 30px !default; 295 | 296 | // Font size of the collection title. 297 | $collection-title-font-size: 28px !default; 298 | 299 | // Padding of the archive post. 300 | $archive-post-padding: 3px 20px !default; 301 | 302 | // Padding of the archive post in mobile. 303 | $archive-post-mobile-padding: 5px 10px !default; 304 | 305 | // Font size of the archive post time in mobile. 306 | $archive-post-mobile-time-font-size: 13px !default; 307 | 308 | // Border left of the archive post, use $archive-post-hover-border-left when hover it. 309 | $archive-post-border-left: 1px solid $gray !default; 310 | $archive-post-hover-border-left: 3px solid $theme-color !default; 311 | 312 | // Transition of the archive post when hover it. 313 | $archive-post-hover-transition: 0.2s ease-out !default; 314 | 315 | // Transform of the archive post when hover it. 316 | $archive-post-hover-transform: translateX(4px) !default; 317 | 318 | // ========== General Terms ========== // 319 | // Font size of the terms title. 320 | $terms-title-size: 18px !default; 321 | 322 | // Border bottom of the terms title. 323 | $terms-title-border-bottom: 2px solid $theme-color !default; 324 | 325 | // Margin of the terms link. 326 | $terms-link-margin: 5px 10px !default; 327 | 328 | // Font size of the terms count 329 | $terms-count-font-size: 12px !default; 330 | -------------------------------------------------------------------------------- /assets/sass/main.scss: -------------------------------------------------------------------------------- 1 | @import "_custom/custom"; 2 | @import "_variables"; 3 | 4 | @import "_common/utils"; 5 | @import "_common/animation"; 6 | 7 | @import "_base"; 8 | @import "_iconfont"; 9 | @import "_partial/header"; 10 | @import "_partial/post"; 11 | @import "_partial/pagination"; 12 | @import "_partial/footer"; 13 | @import "_partial/archive"; 14 | @import "_partial/terms"; 15 | @import "_partial/slideout"; 16 | @import "_partial/mobile"; 17 | @import "_partial/back-to-top"; 18 | @import "_partial/404"; 19 | @import "_partial/language-selector"; 20 | -------------------------------------------------------------------------------- /exampleSite/content/about.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "About" 3 | date: 2017-08-20T21:38:52+08:00 4 | lastmod: 2017-08-28T21:41:52+08:00 5 | menu: "main" 6 | weight: 50 7 | 8 | --- 9 | 10 | Hugo is a static site engine written in Go. 11 | 12 | 13 | It makes use of a variety of open source projects including: 14 | 15 | * [Cobra](https://github.com/spf13/cobra) 16 | * [Viper](https://github.com/spf13/viper) 17 | * [J Walter Weatherman](https://github.com/spf13/jWalterWeatherman) 18 | * [Cast](https://github.com/spf13/cast) 19 | 20 | Learn more and contribute on [GitHub](https://github.com/gohugoio). 21 | 22 | -------------------------------------------------------------------------------- /exampleSite/content/post/chinese-preview.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "[中文] 《长恨歌》" 3 | date: 2017-08-30T01:37:56+08:00 4 | lastmod: 2017-08-30T01:37:56+08:00 5 | draft: false 6 | tags: ["preview", "中文", "tag-1"] 7 | categories: ["中文"] 8 | author: "Wikipedia" 9 | 10 | contentCopyright: 'Creative Commons Attribution-ShareAlike License' 11 | 12 | --- 13 | 14 | >《长恨歌》是中国唐朝诗人白居易的一首长篇叙事诗。 15 | 16 | # 第一段:贵妃受宠爱 17 | 18 | 汉皇重色思倾国,御宇多年求不得。杨家有女初长成,养在深闺人未识。 19 | 20 | 天生丽质难自弃,一朝选在君王侧。回眸一笑百媚生,六宫粉黛无颜色。 21 | 22 | 春寒赐浴华清池,温泉水滑洗凝脂。侍儿扶起娇无力,始是新承恩泽时。 23 | 24 | 云鬓花颜金步摇,芙蓉帐暖度春宵。春宵苦短日高起,从此君王不早朝。 25 | 26 | 承欢侍宴无闲暇,春从春游夜专夜。后宫佳丽三千人,三千宠爱在一身。 27 | 28 | 金屋妆成娇侍夜,玉楼宴罢醉和春。姊妹弟兄皆列士,可怜光彩生门户。 29 | 30 | 遂令天下父母心,不重生男重生女。骊宫高处入青云,仙乐风飘处处闻。 31 | 32 | 缓歌慢舞凝丝竹,尽日君王看不足。渔阳鼙鼓动地来,惊破霓裳羽衣曲。 33 | 34 | # 第二段:马嵬惊变 35 | 36 | 九重城阙烟尘生,千乘万骑西南行。翠华摇摇行复止,西出都门百余里。 37 | 38 | 六军不发无奈何,宛转蛾眉马前死。花钿委地无人收,翠翘金雀玉搔头。 39 | 40 | 君王掩面救不得,回看血泪相和流。黄埃散漫风萧索,云栈萦纡登剑阁。 41 | 42 | 峨嵋山下少人行,旌旗无光日色薄。蜀江水碧蜀山青,圣主朝朝暮暮情。 43 | 44 | 行宫见月伤心色,夜雨闻铃肠断声。 45 | 46 | # 第三段:玄宗皇帝思念 47 | 48 | 天旋地转回龙驭,到此踌躇不能去。马嵬坡下泥土中,不见玉颜空死处。 49 | 50 | 君臣相顾尽霑衣,东望都门信马归。归来池苑皆依旧,太液芙蓉未央柳。 51 | 52 | 芙蓉如面柳如眉,对此如何不泪垂。春风桃李花开日,秋雨梧桐叶落时。 53 | 54 | 西宫南内多秋草,落叶满阶红不扫。梨园弟子白发新,椒房阿监青娥老。 55 | 56 | 夕殿萤飞思悄然,孤灯挑尽未成眠。迟迟钟鼓初长夜,耿耿星河欲曙天。 57 | 58 | 鸳鸯瓦冷霜华重,翡翠衾寒谁与共。悠悠生死别经年,魂魄不曾来入梦。 59 | 60 | # 第四段:仙界寻妃 61 | 62 | 临邛道士鸿都客,能以精诚致魂魄。为感君王辗转思,遂教方士殷勤觅。 63 | 64 | 排空驭气奔如电,升天入地求之遍。上穷碧落下黄泉,两处茫茫皆不见。 65 | 66 | 忽闻海上有仙山,山在虚无缥缈间。楼阁玲珑五云起,其中绰约多仙子。 67 | 68 | 中有一人字太真,雪肤花貌参差是。金阙西厢叩玉扃,转教小玉报双成。 69 | 70 | 闻道汉家天子使,九华帐里梦魂惊。揽衣推枕起徘徊,珠箔银屏迤逦开。 71 | 72 | 云髻(鬓?)半偏新睡觉,花冠不整下堂来。风吹仙袂飘飘(飖)举,犹似霓裳羽衣舞。 73 | 74 | 玉容寂寞泪阑干,梨花一枝春带雨。含情凝睇谢君王,一别音容两渺茫。 75 | 76 | 昭阳殿里恩爱绝,蓬莱宫中日月长。回头下望人寰处,不见长安见尘雾。 77 | 78 | 唯将旧物表深情,钿合金钗寄将去。钗留一股合一扇,钗擘黄金合分钿。 79 | 80 | 但教心似金钿坚,天上人间会相见。临别殷勤重寄词,词中有誓两心知。 81 | 82 | 七月七日长生殿,夜半无人私语时。在天愿作比翼鸟,在地愿为连理枝。 83 | 84 | 天长地久有时尽,此恨绵绵无绝期。 85 | -------------------------------------------------------------------------------- /exampleSite/content/post/hidden-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "This is a hidden post." 3 | date: 2018-03-08T17:40:19+08:00 4 | lastmod: 2018-03-08T22:01:19+08:00 5 | draft: false 6 | author: 'Halulu' 7 | 8 | hiddenFromHomePage: true 9 | --- 10 | 11 | This post is hidden from the home page. 12 | 13 | 14 | 15 | But you can see it in archives, rss or other pages. -------------------------------------------------------------------------------- /exampleSite/content/post/japanese-preview.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "[日本語] 敬語体系" 3 | date: 2017-08-30T01:53:34+08:00 4 | lastmod: 2017-08-30T01:53:34+08:00 5 | draft: false 6 | keywords: [] 7 | description: "" 8 | tags: ["preview", "日本語", "tag-4"] 9 | categories: ["日本語"] 10 | author: "Wikipedia" 11 | 12 | contentCopyright: 'Creative Commons Attribution-ShareAlike License' 13 | 14 | --- 15 | 16 | > 日本語の敬語体系は、一般に、大きく尊敬語・謙譲語・丁寧語に分類される。文化審議会国語分科会は、2007年2月に「敬語の指針」を答申し、これに丁重語および美化語を含めた5分類を示している。 17 | 18 | # 尊敬語 19 | 20 | 尊敬語は、動作の主体を高めることで、主体への敬意を表す言い方である。動詞に「お(ご)~になる」を付けた形、また、助動詞「(ら)れる」を付けた形などが用いられる。たとえば、動詞「取る」の尊敬形として、「(先生が)お取りになる」「(先生が)取られる」などが用いられる。 21 | 22 | 語によっては、特定の尊敬語が対応するものもある。たとえば、「言う」の尊敬語は「おっしゃる」、「食べる」の尊敬語は「召し上がる」、「行く・来る・いる」の尊敬語は「いらっしゃる」である。 23 | 24 | # 謙譲語 25 | 26 | 謙譲語は、古代から基本的に動作の客体への敬意を表す言い方であり、現代では「動作の主体を低める」と解釈するほうがよい場合がある。動詞に「お~する」「お~いたします」(謙譲語+丁寧語)をつけた形などが用いられる。たとえば、「取る」の謙譲形として、「お取りする」などが用いられる。 27 | 28 | 語によっては、特定の謙譲語が対応するものもある。たとえば、「言う」の謙譲語は「申し上げる」、「食べる」の謙譲語は「いただく」、「(相手の所に)行く」の謙譲語は「伺う」「参上する」「まいる」である。 29 | 30 | なお、「夜も更けてまいりました」の「まいり」など、謙譲表現のようでありながら、誰かを低めているわけではない表現がある。これは、「夜も更けてきた」という話題を丁重に表現することによって、聞き手への敬意を表すものである。宮地裕は、この表現に使われる語を、特に「丁重語」と称している[104][105]。丁重語にはほかに「いたし(マス)」「申し(マス)」「存じ(マス)」「小生」「小社」「弊社」などがある。文化審議会の「敬語の指針」でも、「明日から海外へまいります」の「まいり」のように、相手とは関りのない自分側の動作を表現する言い方を丁重語としている。 31 | 32 | # 丁寧語 33 | 34 | 丁寧語は、文末を丁寧にすることで、聞き手への敬意を表すものである。動詞・形容詞の終止形で終わる常体に対して、名詞・形容動詞語幹などに「です」を付けた形(「学生です」「きれいです」)や、動詞に「ます」をつけた形(「行きます」「分かりました」)等の丁寧語を用いた文体を敬体という。 35 | 36 | 一般に、目上の人には丁寧語を用い、同等・目下の人には丁寧語を用いないといわれる。しかし、実際の言語生活に照らして考えれば、これは事実ではない。母が子を叱るとき、「お母さんはもう知りませんよ」と丁寧語を用いる場合ももある。丁寧語が用いられる多くの場合は、敬意や謝意の表現とされるが、、稀に一歩引いた心理的な距離をとろうとする場合もある。 37 | 38 | 「お弁当」「ご飯」などの「お」「ご」も、広い意味では丁寧語に含まれるが、宮地裕は特に「美化語」と称して区別する[104][105]。相手への丁寧の意を示すというよりは、話し手が自分の言葉遣いに配慮した表現である。したがって、「お弁当食べようよ。」のように、丁寧体でない文でも美化語を用いることがある。文化審議会の「敬語の指針」でも「美化語」を設けている。 39 | -------------------------------------------------------------------------------- /exampleSite/content/post/js-flowchart-diagrams.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "JS Flowchart Diagrams" 3 | date: 2015-03-04T21:57:50+08:00 4 | draft: false 5 | 6 | flowchartDiagrams: 7 | enable: true 8 | options: "{ 9 | 'x': 0, 10 | 'y': 0, 11 | 'line-width': 3, 12 | 'line-length': 50, 13 | 'text-margin': 10, 14 | 'font-size': 14, 15 | 'font-color': 'black', 16 | 'line-color': 'black', 17 | 'element-color': 'black', 18 | 'fill': 'white', 19 | 'yes-text': 'yes', 20 | 'no-text': 'no', 21 | 'arrow-end': 'block', 22 | 'scale': 1, 23 | 'i-am-a-comment-1': 'Do not use //!', 24 | 'i-am-a-comment-2': 'style symbol types', 25 | 'symbols': { 26 | 'start': { 27 | 'font-color': 'red', 28 | 'element-color': 'green', 29 | 'fill': 'yellow' 30 | }, 31 | 'end': { 32 | 'class': 'end-element' 33 | } 34 | }, 35 | 'i-am-a-comment-3': 'even flowstate support ;-)', 36 | 'flowstate': { 37 | 'request': {'fill': 'blue'} 38 | } 39 | }" 40 | --- 41 | 42 | ## Usage 43 | 44 | ```flow 45 | st=>start: Start|past:>http://www.google.com[blank] 46 | e=>end: End:>http://www.google.com 47 | op1=>operation: My Operation|past 48 | op2=>operation: Stuff|current 49 | sub1=>subroutine: My Subroutine|invalid 50 | cond=>condition: Yes 51 | or No?|approved:>http://www.google.com 52 | c2=>condition: Good idea|rejected 53 | io=>inputoutput: catch something...|request 54 | 55 | st->op1(right)->cond 56 | cond(yes, right)->c2 57 | cond(no)->sub1(left)->op1 58 | c2(yes)->io->e 59 | c2(no)->op2->e 60 | ``` 61 | 62 | 63 | 64 | {{< highlight "linenos=table" >}} 65 | ```flow 66 | st=>start: Start|past:>http://www.google.com[blank] 67 | e=>end: End:>http://www.google.com 68 | op1=>operation: My Operation|past 69 | op2=>operation: Stuff|current 70 | sub1=>subroutine: My Subroutine|invalid 71 | cond=>condition: Yes 72 | or No?|approved:>http://www.google.com 73 | c2=>condition: Good idea|rejected 74 | io=>inputoutput: catch something...|request 75 | 76 | st->op1(right)->cond 77 | cond(yes, right)->c2 78 | cond(no)->sub1(left)->op1 79 | c2(yes)->io->e 80 | c2(no)->op2->e 81 | ``` 82 | {{< / highlight >}} 83 | 84 | ## Legacy Usage 85 | 86 | ```flowchart 87 | st=>start: Start|past:>http://www.google.com[blank] 88 | e=>end: End:>http://www.google.com 89 | op1=>operation: My Operation|past 90 | op2=>operation: Stuff|current 91 | sub1=>subroutine: My Subroutine|invalid 92 | cond=>condition: Yes 93 | or No?|approved:>http://www.google.com 94 | c2=>condition: Good idea|rejected 95 | io=>inputoutput: catch something...|request 96 | 97 | st->op1(right)->cond 98 | cond(yes, right)->c2 99 | cond(no)->sub1(left)->op1 100 | c2(yes)->io->e 101 | c2(no)->op2->e 102 | ``` 103 | 104 | ```flowchart 105 | st=>start: Start|past:>http://www.google.com[blank] 106 | e=>end: End:>http://www.google.com 107 | op1=>operation: My Operation|past 108 | op2=>operation: Stuff|current 109 | sub1=>subroutine: My Subroutine|invalid 110 | cond=>condition: Yes 111 | or No?|approved:>http://www.google.com 112 | c2=>condition: Good idea|rejected 113 | io=>inputoutput: catch something...|request 114 | 115 | st->op1(right)->cond 116 | cond(yes, right)->c2 117 | cond(no)->sub1(left)->op1 118 | c2(yes)->io->e 119 | c2(no)->op2->e 120 | ``` 121 | 122 | ## Configuration 123 | 124 | Configure for all home and regular pages: 125 | 126 | ```toml 127 | [params.flowchartDiagrams] 128 | enable = true 129 | options = "" 130 | ``` 131 | 132 | Configure for a single post in the front matter (**Params in front matter have higher precedence**): 133 | 134 | ```yaml 135 | flowchartDiagrams: 136 | enable: true 137 | options: "{ 138 | 'x': 0, 139 | 'y': 0, 140 | 'line-width': 3, 141 | 'line-length': 50, 142 | 'text-margin': 10, 143 | 'font-size': 14, 144 | 'font-color': 'black', 145 | 'line-color': 'black', 146 | 'element-color': 'black', 147 | 'fill': 'white', 148 | 'yes-text': 'yes', 149 | 'no-text': 'no', 150 | 'arrow-end': 'block', 151 | 'scale': 1, 152 | 'i-am-a-comment-1': 'Do not use /​/!', 153 | 'i-am-a-comment-2': 'style symbol types', 154 | 'symbols': { 155 | 'start': { 156 | 'font-color': 'red', 157 | 'element-color': 'green', 158 | 'fill': 'yellow' 159 | }, 160 | 'end': { 161 | 'class': 'end-element' 162 | } 163 | }, 164 | 'i-am-a-comment-3': 'even flowstate support ;-)', 165 | 'flowstate': { 166 | 'request': {'fill': 'blue'} 167 | } 168 | }" 169 | ``` 170 | 171 | See more information from https://github.com/adrai/flowchart.js. 172 | -------------------------------------------------------------------------------- /exampleSite/content/post/js-sequence-diagrams.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "JS Sequence Diagrams" 3 | date: 2015-03-04T21:57:45+08:00 4 | draft: false 5 | 6 | sequenceDiagrams: 7 | enable: true 8 | options: "{theme: 'hand'}" 9 | --- 10 | 11 | ## Usage 12 | 13 | ```sequence 14 | Andrew->China: Says Hello 15 | Note right of China: China thinks\nabout it 16 | China-->Andrew: How are you? 17 | Andrew->>China: I am good thanks! 18 | ``` 19 | 20 | 21 | 22 | ```sequence 23 | Andrew->China: Says Hello 24 | Note right of China: China thinks\nabout it 25 | China-->Andrew: How are you? 26 | Andrew->>China: I am good thanks! 27 | ``` 28 | 29 | ## Configuration 30 | 31 | Configure for all home and regular pages: 32 | 33 | ```toml 34 | [params.sequenceDiagrams] 35 | enable = true 36 | options = "{theme: 'hand'}" 37 | ``` 38 | 39 | Configure for a single post in the front matter (**Params in front matter have higher precedence**): 40 | 41 | ```yaml 42 | sequenceDiagrams: 43 | enable: true 44 | options: "{theme: 'hand'}" 45 | ``` 46 | 47 | ### Options 48 | 49 | ```js 50 | options = { 51 | // Change the styling of the diagram, typically one of 'simple', 'hand'. New themes can be registered with registerTheme(...). 52 | theme: string, 53 | 54 | // CSS style to apply to the diagram's svg tag. (Only supported if using snap.svg) 55 | css_class: string, 56 | } 57 | ``` 58 | 59 | See more information from https://github.com/bramp/js-sequence-diagrams. 60 | 61 | ## Examples 62 | 63 | ```sequence 64 | Title: Here is a title 65 | A->B: Normal line 66 | B-->C: Dashed line 67 | C->>D: Open arrow 68 | D-->>A: Dashed open arrow 69 | ``` 70 | 71 | ```sequence 72 | Title: Here is a title 73 | A->B: Normal line 74 | B-->C: Dashed line 75 | C->>D: Open arrow 76 | D-->>A: Dashed open arrow 77 | ``` 78 | 79 | --- 80 | 81 | ```sequence 82 | # Example of a comment. 83 | Note left of A: Note to the\n left of A 84 | Note right of A: Note to the\n right of A 85 | Note over A: Note over A 86 | Note over A,B: Note over both A and B 87 | ``` 88 | 89 | ```sequence 90 | # Example of a comment. 91 | Note left of A: Note to the\n left of A 92 | Note right of A: Note to the\n right of A 93 | Note over A: Note over A 94 | Note over A,B: Note over both A and B 95 | ``` 96 | -------------------------------------------------------------------------------- /exampleSite/content/post/shortcodes.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Shortcodes" 3 | date: 2016-08-30T16:01:23+08:00 4 | lastmod: 2018-02-01T18:01:23+08:00 5 | draft: false 6 | tags: ["shortcodes"] 7 | categories: ["shortcodes"] 8 | 9 | --- 10 | 11 | # Admonition 12 | 13 | {{% admonition note "I'm title!" false %}} 14 | biu biu biu. 15 | 16 | {{% admonition type="note" title="note" details="true" %}} 17 | biu biu biu. 18 | {{% /admonition %}} 19 | 20 | {{% admonition example %}} 21 | Without title. 22 | {{% /admonition %}} 23 | 24 | {{% /admonition %}} 25 | 26 | ```markdown 27 | {{%/* admonition note "I'm title!" false */%}} 28 | biu biu biu. 29 | 30 | {{%/* admonition type="note" title="note" details="true" */%}} 31 | biu biu biu. 32 | {{%/* /admonition */%}} 33 | 34 | {{%/* admonition example */%}} 35 | Without title. 36 | {{%/* /admonition */%}} 37 | 38 | {{%/* /admonition */%}} 39 | ``` 40 | 41 | 42 | 43 | {{% admonition abstract abstract %}} 44 | biu biu biu. 45 | {{% /admonition %}} 46 | 47 | ```markdown 48 | {{%/* admonition abstract abstract */%}} 49 | biu biu biu. 50 | {{%/* /admonition */%}} 51 | ``` 52 | 53 | {{% admonition info "info" %}} 54 | biu biu biu. 55 | {{% /admonition %}} 56 | 57 | {{% admonition tip "tip" %}} 58 | biu biu biu. 59 | {{% /admonition %}} 60 | 61 | {{% admonition success "success" %}} 62 | biu biu biu. 63 | {{% /admonition %}} 64 | 65 | {{% admonition question "question" %}} 66 | biu biu biu. 67 | {{% /admonition %}} 68 | 69 | {{% admonition warning "warning" %}} 70 | biu biu biu. 71 | {{% /admonition %}} 72 | 73 | {{% admonition failure "failure" %}} 74 | biu biu biu. 75 | {{% /admonition %}} 76 | 77 | {{% admonition danger "danger" %}} 78 | biu biu biu. 79 | {{% /admonition %}} 80 | 81 | {{% admonition bug "bug" %}} 82 | biu biu biu. 83 | {{% /admonition %}} 84 | 85 | {{% admonition example "example" %}} 86 | biu biu biu. 87 | {{% /admonition %}} 88 | 89 | {{% admonition quote "quote" %}} 90 | biu biu biu. 91 | {{% /admonition %}} 92 | 93 | # center, right, left 94 | 95 | ```markdown 96 | ## default 97 | ![img](/path/to/img.gif "img") 98 | 99 | {{%/* center */%}} 100 | ## center 101 | ![img](/path/to/img.gif "img") 102 | {{%/* /center */%}} 103 | 104 | {{%/* right */%}} 105 | ## right 106 | ![img](/path/to/img.gif "img") 107 | {{%/* /right */%}} 108 | 109 | {{%/* left */%}} 110 | ## left 111 | ![img](/path/to/img.gif "img") 112 | {{%/* /left */%}} 113 | ``` 114 | 115 | ## default 116 | ![img](https://wx1.sinaimg.cn/small/006SToa6ly1fm07summ2gj30qo0qomzu.jpg "img") 117 | 118 | {{% center %}} 119 | ## center 120 | ![img](https://wx1.sinaimg.cn/small/006SToa6ly1fm07summ2gj30qo0qomzu.jpg "img") 121 | {{% /center %}} 122 | 123 | {{% right %}} 124 | ## right 125 | ![img](https://wx1.sinaimg.cn/small/006SToa6ly1fm07summ2gj30qo0qomzu.jpg "img") 126 | {{% /right %}} 127 | 128 | {{% left %}} 129 | ## left 130 | ![img](https://wx1.sinaimg.cn/small/006SToa6ly1fm07summ2gj30qo0qomzu.jpg "img") 131 | {{% /left %}} 132 | 133 | --- 134 | 135 | ## figure with class 136 | 137 | ``` 138 | {{%/* figure src="/path/to/img.gif" title="default" alt="img" */%}} 139 | {{%/* figure class="center" src="/path/to/img.gif" title="center" alt="img" */%}} 140 | {{%/* figure class="right" src="/path/to/img.gif" title="right" alt="img" */%}} 141 | {{%/* figure class="left" src="/path/to/img.gif" title="left" alt="img" */%}} 142 | ``` 143 | 144 | {{% figure src="https://wx1.sinaimg.cn/small/006SToa6ly1fm07summ2gj30qo0qomzu.jpg" title="default" alt="img" %}} 145 | {{% figure class="center" src="https://wx1.sinaimg.cn/small/006SToa6ly1fm07summ2gj30qo0qomzu.jpg" title="center" alt="img" %}} 146 | {{% figure class="right" src="https://wx1.sinaimg.cn/small/006SToa6ly1fm07summ2gj30qo0qomzu.jpg" title="right" alt="img" %}} 147 | {{% figure class="left" src="https://wx1.sinaimg.cn/small/006SToa6ly1fm07summ2gj30qo0qomzu.jpg" title="left" alt="img" %}} 148 | 149 | --- 150 | 151 | ``` 152 | {{%/* center */%}} 153 | 154 | ## hybrid in center 155 | {{%/* figure src="/path/to/img.gif" title="default" alt="img" */%}} 156 | {{%/* figure class="right" src="/path/to/img.gif" title="right" alt="img" */%}} 157 | 158 | {{%/* left */%}} 159 | {{%/* figure src="/path/to/img.gif" title="default in left" alt="img" */%}} 160 | {{%/* /left */%}} 161 | 162 | {{%/* /center */%}} 163 | ``` 164 | 165 | {{% center %}} 166 | ## hybrid in center 167 | {{% figure src="https://wx1.sinaimg.cn/small/006SToa6ly1fm07summ2gj30qo0qomzu.jpg" title="default" alt="img" %}} 168 | {{% figure class="right" src="https://wx1.sinaimg.cn/small/006SToa6ly1fm07summ2gj30qo0qomzu.jpg" title="right" alt="img" %}} 169 | {{% left %}} 170 | {{% figure src="https://wx1.sinaimg.cn/small/006SToa6ly1fm07summ2gj30qo0qomzu.jpg" title="default in left" alt="img" %}} 171 | {{% /left %}} 172 | {{% /center %}} 173 | 174 | --- 175 | 176 | # Music 163 177 | 178 | ## Params 179 | - `id` 180 | - required param 181 | - you can extract from music url 182 | - url format http://music.163.com/#/song?id=28196554 183 | 184 | - Fiddle `auto` 185 | - optional param 186 | - default value 0 187 | - you can overwrite it with 1 188 | 189 | ## Examples 190 | 191 | - Simple 192 | 193 | ``` 194 | {{%/* music "28196554" */%}} 195 | {{%/* music "28196554" "1" */%}} 196 | ``` 197 | 198 | - Named Params 199 | 200 | ``` 201 | {{%/* music id="28196554" */%}} 202 | {{%/* music id="28196554" auto="1" */%}} 203 | ``` 204 | 205 | - Example 206 | 207 | ``` 208 | {{%/* music "28196554" */%}} 209 | ``` 210 | 211 | {{%/* music "28196554" */%}} 212 | 213 | 218 | -------------------------------------------------------------------------------- /exampleSite/content/post/syntax-highlighting.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Syntax Highlighting" 3 | date: 2011-08-30T16:01:23+08:00 4 | lastmod: 2018-11-05T16:01:23+08:00 5 | draft: false 6 | tags: ["preview", "Syntax Highlighting", "tag-5"] 7 | categories: ["Syntax Highlighting"] 8 | 9 | toc: false 10 | 11 | --- 12 | 13 | 14 | ```js 15 | function helloWorld () { 16 | alert("Hello, World!") 17 | } 18 | ``` 19 | 20 | 21 | 22 | ```java 23 | public class HelloWorld { 24 | public static void main(String[] args) { 25 | System.out.println("Hello, World!"); 26 | } 27 | } 28 | ``` 29 | 30 | ```kotlin 31 | package hello 32 | 33 | fun main(args: Array) { 34 | println("Hello World!") 35 | } 36 | ``` 37 | 38 | ```c 39 | #include 40 | 41 | /* Hello */ 42 | int main(void){ 43 | printf("Hello, World!"); 44 | return 0; 45 | } 46 | ``` 47 | 48 | ```cpp 49 | // 'Hello World!' program 50 | 51 | #include 52 | 53 | int main(){ 54 | std::cout << "Hello World!" << std::endl; 55 | return 0; 56 | } 57 | ``` 58 | 59 | ```cs 60 | using System; 61 | class HelloWorld{ 62 | public static void Main(){ 63 | System.Console.WriteLine("Hello, World!"); 64 | } 65 | } 66 | ``` 67 | 68 | ```html 69 | 70 | 71 | Hello, World! 72 | 73 | 74 | ``` 75 | 76 | ```go 77 | package main 78 | import fmt "fmt" 79 | 80 | func main() 81 | { 82 | fmt.Printf("Hello, World!\n"); 83 | } 84 | ``` 85 | 86 | ```scala 87 | object HelloWorld with Application { 88 | Console.println("Hello, World!"); 89 | } 90 | ``` 91 | 92 | ```php 93 | 96 | ``` 97 | 98 | ```python 99 | print("Hello, World!") 100 | ``` 101 | 102 | ```clojure 103 | (defn hello-world 104 | "A function print 'Hello world'." 105 | [] 106 | (prn "Hello world")) 107 | ``` 108 | 109 | ```go-html-template 110 | 111 | 112 | 113 | {{ .Title }} 114 | 115 | 116 |

{{ .Title }}

117 | {{ .Content }} 118 | 119 | 120 | ``` 121 | 122 | ```go-html-template 123 | {{ partial "header.html" . }} 124 | 125 |

posts

126 | {{ range first 10 .Data.Pages }} 127 | {{ if eq .Type "post"}} 128 |

{{ .Title }}

129 | {{ end }} 130 | {{ end }} 131 | 132 |

pages

133 | {{ range .Data.Pages }} 134 | {{ if or (eq .Type "page") (eq .Type "about") }} 135 |

{{ .Type }} - {{ .Title }} - {{ .RelPermalink }}

136 | {{ end }} 137 | {{ end }} 138 | 139 | {{ partial "footer.html" . }} 140 | ``` 141 | 142 | --- 143 | 144 | Detect the language 145 | 146 | ``` 147 | package hello 148 | 149 | fun main(args: Array) { 150 | println("Hello World!") 151 | } 152 | ``` 153 | 154 | ``` 155 | 158 | ``` 159 | 160 | --- 161 | 162 | By `{{}}..{{}}` 163 | 164 | {{< highlight go-html-template "linenos=table,hl_lines=1 3-7,linenostart=199" >}} 165 |
166 |
167 |

{{ .Title }}

168 | {{ range .Data.Pages }} 169 | {{ .Render "summary"}} 170 | {{ end }} 171 |
172 |
173 | {{< / highlight >}} 174 | -------------------------------------------------------------------------------- /i18n/de.yaml: -------------------------------------------------------------------------------- 1 | # ===== title ===== 2 | archive: 3 | other: "Archiv" 4 | 5 | tags: 6 | other: "Tags" 7 | 8 | categories: 9 | other: "Kategorien" 10 | 11 | # ===== footer ===== 12 | powered: 13 | other: "Powered by %s" 14 | 15 | theme: 16 | other: "Theme" 17 | 18 | siteUV: 19 | other: "site uv: %s" 20 | 21 | sitePV: 22 | other: "site pv: %s" 23 | 24 | pagePV: 25 | other: "%s mal gelesen" 26 | 27 | # ===== post ===== 28 | prevPage: 29 | other: "vorher" 30 | 31 | nextPage: 32 | other: "nächstes" 33 | 34 | prevPost: 35 | other: "vorher" 36 | 37 | nextPost: 38 | other: "nächstes" 39 | 40 | toc: 41 | other: "Inhalt" 42 | 43 | readMore: 44 | other: "Weiterlesen..." 45 | 46 | reward: 47 | other: "Belohnung" 48 | 49 | rewardAlipay: 50 | other: "alipay" 51 | 52 | rewardWechat: 53 | other: "wechat" 54 | 55 | wordCount: 56 | one: "{{ .Count }} Wort" 57 | other: "{{ .Count }} Wörter" 58 | 59 | readingTime: 60 | one: "{{ .Count }} Min Lesezeit" 61 | other: "{{ .Count }} Min Lesezeit" 62 | 63 | outdatedInfoWarningBefore: 64 | other: "[HINWEIS] aktualisiert " 65 | 66 | outdatedInfoWarningAfter: 67 | other: ". Der Inhalt dieses Artikels kann veraltet sein." 68 | 69 | # ===== content license ===== 70 | author: 71 | other: "Autor" 72 | 73 | lastMod: 74 | other: "letzte Änderung" 75 | 76 | markdown: 77 | other: "Markdown" 78 | 79 | seeMarkDown: 80 | other: "Die Markdown Version »" 81 | 82 | license: 83 | other: "Lizenz" 84 | 85 | # ===== counter ===== 86 | archiveCounter: 87 | one: "{{ .Count }} Aritkel in Summe" 88 | other: "{{ .Count }} Artikel in Summe" 89 | 90 | tagCounter: 91 | one: "{{ .Count }} Tag in Summe" 92 | other: "{{ .Count }} Tags in Summe" 93 | 94 | zeroTagCounter: 95 | other: "Keine Tags" 96 | 97 | categoryCounter: 98 | one: "{{ .Count }} Kategorie in Summe" 99 | other: "{{ .Count }} Kategorien in Summe" 100 | 101 | zeroCategoryCounter: 102 | other: "Keine Kategorien" 103 | -------------------------------------------------------------------------------- /i18n/en.yaml: -------------------------------------------------------------------------------- 1 | # ===== title ===== 2 | archive: 3 | other: "Archive" 4 | 5 | tags: 6 | other: "Tags" 7 | 8 | categories: 9 | other: "Categories" 10 | 11 | # ===== footer ===== 12 | powered: 13 | other: "Powered by %s" 14 | 15 | theme: 16 | other: "Theme" 17 | 18 | siteUV: 19 | other: "site uv: %s" 20 | 21 | sitePV: 22 | other: "site pv: %s" 23 | 24 | pagePV: 25 | other: "%s times read" 26 | 27 | # ===== post ===== 28 | prevPage: 29 | other: "Prev" 30 | 31 | nextPage: 32 | other: "Next" 33 | 34 | prevPost: 35 | other: "Prev" 36 | 37 | nextPost: 38 | other: "Next" 39 | 40 | toc: 41 | other: "Contents" 42 | 43 | readMore: 44 | other: "Read more..." 45 | 46 | reward: 47 | other: "Reward" 48 | 49 | rewardAlipay: 50 | other: "alipay" 51 | 52 | rewardWechat: 53 | other: "wechat" 54 | 55 | wordCount: 56 | one: "{{ .Count }} word" 57 | other: "{{ .Count }} words" 58 | 59 | readingTime: 60 | one: "{{ .Count }} min read" 61 | other: "{{ .Count }} mins read" 62 | 63 | outdatedInfoWarningBefore: 64 | other: "[NOTE] Updated " 65 | 66 | outdatedInfoWarningAfter: 67 | other: ". This article may have outdated content or subject matter." 68 | 69 | # ===== content license ===== 70 | author: 71 | other: "Author" 72 | 73 | lastMod: 74 | other: "LastMod" 75 | 76 | markdown: 77 | other: "Markdown" 78 | 79 | seeMarkDown: 80 | other: "The Markdown version »" 81 | 82 | license: 83 | other: "License" 84 | 85 | # ===== counter ===== 86 | archiveCounter: 87 | one: "{{ .Count }} Post In Total" 88 | other: "{{ .Count }} Posts In Total" 89 | 90 | tagCounter: 91 | one: "{{ .Count }} Tag In Total" 92 | other: "{{ .Count }} Tags In Total" 93 | 94 | zeroTagCounter: 95 | other: "No tags" 96 | 97 | categoryCounter: 98 | one: "{{ .Count }} Category In Total" 99 | other: "{{ .Count }} Categories In Total" 100 | 101 | zeroCategoryCounter: 102 | other: "No categories" 103 | -------------------------------------------------------------------------------- /i18n/es.yaml: -------------------------------------------------------------------------------- 1 | # ===== title ===== 2 | archive: 3 | other: "Archivo" 4 | 5 | tags: 6 | other: "Etiquetas" 7 | 8 | categories: 9 | other: "Categorías" 10 | 11 | # ===== footer ===== 12 | powered: 13 | other: "Creado con %s" 14 | 15 | theme: 16 | other: "Tema" 17 | 18 | siteUV: 19 | other: "sitio uv: %s" 20 | 21 | sitePV: 22 | other: "sitio pv: %s" 23 | 24 | pagePV: 25 | other: "%s leido" 26 | 27 | # ===== post ===== 28 | prevPage: 29 | other: "Previo" 30 | 31 | nextPage: 32 | other: "Siguiente" 33 | 34 | prevPost: 35 | other: "Previo" 36 | 37 | nextPost: 38 | other: "Siguiente" 39 | 40 | toc: 41 | other: "Contenidos" 42 | 43 | readMore: 44 | other: "Leer mas..." 45 | 46 | reward: 47 | other: "Reward" 48 | 49 | rewardAlipay: 50 | other: "alipay" 51 | 52 | rewardWechat: 53 | other: "wechat" 54 | 55 | wordCount: 56 | one: "{{ .Count }} palabra" 57 | other: "{{ .Count }} palabras" 58 | 59 | readingTime: 60 | one: "{{ .Count }} min lectura" 61 | other: "{{ .Count }} mins lectura" 62 | 63 | outdatedInfoWarningBefore: 64 | other: "[NOTE] Updated " 65 | 66 | outdatedInfoWarningAfter: 67 | other: ". This article may have outdated content or subject matter." 68 | 69 | # ===== content license ===== 70 | author: 71 | other: "Autor" 72 | 73 | lastMod: 74 | other: "Ultima modificación" 75 | 76 | markdown: 77 | other: "Markdown" 78 | 79 | seeMarkDown: 80 | other: "Versión Markdown »" 81 | 82 | license: 83 | other: "Licencia" 84 | 85 | # ===== counter ===== 86 | archiveCounter: 87 | one: "{{ .Count }} Post en Total" 88 | other: "{{ .Count }} Posts en Total" 89 | 90 | tagCounter: 91 | one: "{{ .Count }} Tag en Total" 92 | other: "{{ .Count }} Tags en Total" 93 | 94 | zeroTagCounter: 95 | other: "No tags" 96 | 97 | categoryCounter: 98 | one: "{{ .Count }} Categoria en Total" 99 | other: "{{ .Count }} Categorias en Total" 100 | 101 | zeroCategoryCounter: 102 | other: "No categorias" 103 | -------------------------------------------------------------------------------- /i18n/fr.yaml: -------------------------------------------------------------------------------- 1 | # ===== title ===== 2 | archive: 3 | other: "Archive" 4 | 5 | tags: 6 | other: "Tags" 7 | 8 | categories: 9 | other: "Catégories" 10 | 11 | # ===== footer ===== 12 | powered: 13 | other: "Propulsé par %s" 14 | 15 | theme: 16 | other: "Thème" 17 | 18 | siteUV: 19 | other: "site uv: %s" 20 | 21 | sitePV: 22 | other: "site pv: %s" 23 | 24 | pagePV: 25 | other: "%s temps de lecture" 26 | 27 | # ===== post ===== 28 | prevPage: 29 | other: "Plus récents" 30 | 31 | nextPage: 32 | other: "Plus vieux" 33 | 34 | prevPost: 35 | other: "Précédent" 36 | 37 | nextPost: 38 | other: "Suivant" 39 | 40 | toc: 41 | other: "Contenu" 42 | 43 | readMore: 44 | other: "Lire la suite..." 45 | 46 | reward: 47 | other: "Reward" 48 | 49 | rewardAlipay: 50 | other: "alipay" 51 | 52 | rewardWechat: 53 | other: "wechat" 54 | 55 | wordCount: 56 | one: "{{ .Count }} mots" 57 | other: "{{ .Count }} mots" 58 | 59 | readingTime: 60 | one: "{{ .Count }} min de lecture" 61 | other: "{{ .Count }} mins de lecture" 62 | 63 | outdatedInfoWarningBefore: 64 | other: "[NOTE] Updated " 65 | 66 | outdatedInfoWarningAfter: 67 | other: ". This article may have outdated content or subject matter." 68 | 69 | # ===== content license ===== 70 | author: 71 | other: "Auteur" 72 | 73 | lastMod: 74 | other: "Modifié" 75 | 76 | markdown: 77 | other: "Markdown" 78 | 79 | seeMarkDown: 80 | other: "Version de Markdown »" 81 | 82 | license: 83 | other: "Licence" 84 | 85 | # ===== counter ===== 86 | archiveCounter: 87 | one: "{{ .Count }} Articles au total" 88 | other: "{{ .Count }} Articles au total" 89 | 90 | tagCounter: 91 | one: "{{ .Count }} Tag au total" 92 | other: "{{ .Count }} Tags au total" 93 | 94 | zeroTagCounter: 95 | other: "Aucun tag" 96 | 97 | categoryCounter: 98 | one: "{{ .Count }} Catégorie au total" 99 | other: "{{ .Count }} Catégories au total" 100 | 101 | zeroCategoryCounter: 102 | other: "Aucune catégorie" 103 | -------------------------------------------------------------------------------- /i18n/ja.yaml: -------------------------------------------------------------------------------- 1 | # ===== title ===== 2 | archive: 3 | other: "アーカイブ" 4 | 5 | tags: 6 | other: "タグ" 7 | 8 | categories: 9 | other: "カテゴリ" 10 | 11 | # ===== footer ===== 12 | powered: 13 | other: "Powered by %s" 14 | 15 | theme: 16 | other: "Theme" 17 | 18 | siteUV: 19 | other: "総訪問者数: %s" 20 | 21 | sitePV: 22 | other: "総ページビュー: %s" 23 | 24 | pagePV: 25 | other: "ページビュー: %s" 26 | 27 | # ===== post ===== 28 | prevPage: 29 | other: "前へ" 30 | 31 | nextPage: 32 | other: "次へ" 33 | 34 | prevPost: 35 | other: "前の記事へ" 36 | 37 | nextPost: 38 | other: "次の記事へ" 39 | 40 | toc: 41 | other: "コンテンツ" 42 | 43 | readMore: 44 | other: "続きを読む..." 45 | 46 | reward: 47 | other: "Reword" 48 | 49 | rewardAlipay: 50 | other: "alipay" 51 | 52 | rewardWechat: 53 | other: "wechat" 54 | 55 | wordCount: 56 | one: "{{ .Count }} 文字" 57 | other: "{{ .Count }} 文字" 58 | 59 | readingTime: 60 | one: "読了時間: {{ .Count }} 分" 61 | other: "読了時間: {{ .Count }} 分" 62 | 63 | outdatedInfoWarningBefore: 64 | other: "【注意】最後更新日は " 65 | 66 | outdatedInfoWarningAfter: 67 | other: "のため、記事の内容が古い可能性があります。" 68 | 69 | # ===== content license ===== 70 | author: 71 | other: "作成者" 72 | 73 | lastMod: 74 | other: "最終更新時刻" 75 | 76 | markdown: 77 | other: "Markdown" 78 | 79 | seeMarkDown: 80 | other: "Markdownで本文を見る »" 81 | 82 | license: 83 | other: "ライセンス" 84 | 85 | # ===== counter ===== 86 | archiveCounter: 87 | one: "投稿数: {{ .Count }} 記事" 88 | other: "投稿数: {{ .Count }} 記事" 89 | 90 | tagCounter: 91 | one: "タグ: {{ .Count }}" 92 | other: "タグ: {{ .Count }}" 93 | 94 | zeroTagCounter: 95 | other: "タグなし" 96 | 97 | categoryCounter: 98 | one: "カテゴリ: {{ .Count }}" 99 | other: "カテゴリ: {{ .Count }}" 100 | 101 | zeroCategoryCounter: 102 | other: "カテゴリなし" 103 | -------------------------------------------------------------------------------- /i18n/oc.yaml: -------------------------------------------------------------------------------- 1 | # ===== title ===== 2 | archive: 3 | other: "Archius" 4 | 5 | tags: 6 | other: "Etiquetas" 7 | 8 | categories: 9 | other: "Categorias" 10 | 11 | # ===== footer ===== 12 | powered: 13 | other: "Propulsat per %s" 14 | 15 | theme: 16 | other: "Tèma" 17 | 18 | siteUV: 19 | other: "site uv: %s" 20 | 21 | sitePV: 22 | other: "site pv: %s" 23 | 24 | pagePV: 25 | other: "%s temps de lectura" 26 | 27 | # ===== post ===== 28 | prevPage: 29 | other: "Prec." 30 | 31 | nextPage: 32 | other: "Seguent" 33 | 34 | prevPost: 35 | other: "Precedent" 36 | 37 | nextPost: 38 | other: "Seguent" 39 | 40 | toc: 41 | other: "Ensenhador" 42 | 43 | readMore: 44 | other: "Ne legir mai..." 45 | 46 | reward: 47 | other: "Reward" 48 | 49 | rewardAlipay: 50 | other: "alipay" 51 | 52 | rewardWechat: 53 | other: "wechat" 54 | 55 | wordCount: 56 | one: "{{ .Count }} mot" 57 | other: "{{ .Count }} mots" 58 | 59 | readingTime: 60 | one: "{{ .Count }} minuta de lectura" 61 | other: "{{ .Count }} minutas de lectura" 62 | 63 | outdatedInfoWarningBefore: 64 | other: "[NOTE] Actualizat " 65 | 66 | outdatedInfoWarningAfter: 67 | other: ". This article may have outdated content or subject matter." 68 | 69 | # ===== content license ===== 70 | author: 71 | other: "Autor" 72 | 73 | lastMod: 74 | other: "LastMod" 75 | 76 | markdown: 77 | other: "Markdown" 78 | 79 | seeMarkDown: 80 | other: "Version de Markdown »" 81 | 82 | license: 83 | other: "Licénsia" 84 | 85 | # ===== counter ===== 86 | archiveCounter: 87 | one: "{{ .Count }} publication al total" 88 | other: "{{ .Count }} publicacions al total" 89 | 90 | tagCounter: 91 | one: "{{ .Count }} etiqueta al total" 92 | other: "{{ .Count }} etiquetas al total" 93 | 94 | zeroTagCounter: 95 | other: "No tags" 96 | 97 | categoryCounter: 98 | one: "{{ .Count }} categoria al total" 99 | other: "{{ .Count }} categorias al total" 100 | 101 | zeroCategoryCounter: 102 | other: "Cap de categoria" 103 | -------------------------------------------------------------------------------- /i18n/ru.yaml: -------------------------------------------------------------------------------- 1 | # ===== title ===== 2 | archive: 3 | other: "Архив" 4 | 5 | tags: 6 | other: "Теги" 7 | 8 | categories: 9 | other: "Категории" 10 | 11 | # ===== footer ===== 12 | powered: 13 | other: "Создано с помощью %s" 14 | 15 | theme: 16 | other: "Тема" 17 | 18 | siteUV: 19 | other: "Просмотров страниц: %s" 20 | 21 | sitePV: 22 | other: "Уникальных посетителей: %s" 23 | 24 | pagePV: 25 | other: "Прочитано раз: %s" 26 | 27 | # ===== post ===== 28 | prevPage: 29 | other: "Назад" 30 | 31 | nextPage: 32 | other: "Вперёд" 33 | 34 | prevPost: 35 | other: "Предыдущий" 36 | 37 | nextPost: 38 | other: "Следующий" 39 | 40 | toc: 41 | other: "Содержание" 42 | 43 | readMore: 44 | other: "Читать дальше..." 45 | 46 | reward: 47 | other: "Наградить" 48 | 49 | rewardAlipay: 50 | other: "alipay" 51 | 52 | rewardWechat: 53 | other: "wechat" 54 | 55 | wordCount: 56 | one: "{{ .Count }} слово" 57 | few: "{{ .Count }} слова" 58 | many: "{{ .Count }} слов" 59 | 60 | readingTime: 61 | other: "{{ .Count }} мин. на прочтение" 62 | 63 | outdatedInfoWarningBefore: 64 | other: "[ВНИМАНИЕ] Обновлено " 65 | 66 | outdatedInfoWarningAfter: 67 | other: ". Содержание этой статьи может быть устаревшим." 68 | 69 | # ===== content license ===== 70 | author: 71 | other: "Автор" 72 | 73 | lastMod: 74 | other: "Последнее изменение" 75 | 76 | markdown: 77 | other: "Markdown" 78 | 79 | seeMarkDown: 80 | other: "Версия Markdown »" 81 | 82 | license: 83 | other: "Лицензия" 84 | 85 | # ===== counter ===== 86 | archiveCounter: 87 | one: "{{ .Count }} публикация" 88 | few: "{{ .Count }} публикации" 89 | many: "{{ .Count }} пибликаций" 90 | 91 | tagCounter: 92 | one: "{{ .Count }} тег" 93 | few: "{{ .Count }} тега" 94 | many: "{{ .Count }} тегов" 95 | 96 | zeroTagCounter: 97 | other: "Нет тегов" 98 | 99 | categoryCounter: 100 | one: "{{ .Count }} категория" 101 | few: "{{ .Count }} категории" 102 | many: "{{ .Count }} категорий" 103 | 104 | zeroCategoryCounter: 105 | other: "Нет категорий" 106 | -------------------------------------------------------------------------------- /i18n/tr.yaml: -------------------------------------------------------------------------------- 1 | # ===== title ===== 2 | archive: 3 | other: "Arşiv" 4 | 5 | tags: 6 | other: "Etiketler" 7 | 8 | categories: 9 | other: "Kategoriler" 10 | 11 | # ===== footer ===== 12 | powered: 13 | other: "%s tarafından desteklenmektedir" 14 | 15 | theme: 16 | other: "Tema" 17 | 18 | siteUV: 19 | other: "site uv: %s" 20 | 21 | sitePV: 22 | other: "site pv: %s" 23 | 24 | pagePV: 25 | other: "okuma süresi: %s" 26 | 27 | # ===== post ===== 28 | prevPage: 29 | other: "Önceki" 30 | 31 | nextPage: 32 | other: "Sonraki" 33 | 34 | prevPost: 35 | other: "Önceki" 36 | 37 | nextPost: 38 | other: "Sonraki" 39 | 40 | toc: 41 | other: "İçerikler" 42 | 43 | readMore: 44 | other: "Daha fazla..." 45 | 46 | reward: 47 | other: "Ödül" 48 | 49 | rewardAlipay: 50 | other: "alipay" 51 | 52 | rewardWechat: 53 | other: "wechat" 54 | 55 | wordCount: 56 | one: "{{ .Count }} kelime" 57 | other: "{{ .Count }} kelime" 58 | 59 | readingTime: 60 | one: "{{ .Count }} dakikalık okuma süresi" 61 | other: "{{ .Count }} dakikalık okuma süresi" 62 | 63 | outdatedInfoWarningBefore: 64 | other: "[NOT] Güncellendi " 65 | 66 | outdatedInfoWarningAfter: 67 | other: ". Bu makale güncel olmayan içeriğe veya konuya sahip olabilir." 68 | 69 | # ===== content license ===== 70 | author: 71 | other: "Yazar" 72 | 73 | lastMod: 74 | other: "LastMod" 75 | 76 | markdown: 77 | other: "Markdown" 78 | 79 | seeMarkDown: 80 | other: "Markdown sürümü »" 81 | 82 | license: 83 | other: "Lisans" 84 | 85 | # ===== counter ===== 86 | archiveCounter: 87 | one: "Toplam {{ .Count }} gönderi" 88 | other: "Toplam {{ .Count }} gönderi" 89 | 90 | tagCounter: 91 | one: "Toplam {{ .Count }} etiket" 92 | other: "Toplam {{ .Count }} etiket" 93 | 94 | zeroTagCounter: 95 | other: "Etiket yok" 96 | 97 | categoryCounter: 98 | one: "Toplam {{ .Count }} kategori" 99 | other: "Toplam {{ .Count }} kategori" 100 | 101 | zeroCategoryCounter: 102 | other: "Kategori yok" 103 | -------------------------------------------------------------------------------- /i18n/zh-CN.yaml: -------------------------------------------------------------------------------- 1 | # ===== title ===== 2 | archive: 3 | other: "归档" 4 | 5 | tags: 6 | other: "标签" 7 | 8 | categories: 9 | other: "分类" 10 | 11 | # ===== footer ===== 12 | powered: 13 | other: "由 %s 强力驱动" 14 | 15 | theme: 16 | other: "主题" 17 | 18 | siteUV: 19 | other: "本站总访客数 %s 人" 20 | 21 | sitePV: 22 | other: "本站总访问量 %s 次" 23 | 24 | pagePV: 25 | other: "%s 次阅读" 26 | 27 | # ===== post ===== 28 | prevPage: 29 | other: "上一页" 30 | 31 | nextPage: 32 | other: "下一页" 33 | 34 | prevPost: 35 | other: "上一篇" 36 | 37 | nextPost: 38 | other: "下一篇" 39 | 40 | toc: 41 | other: "文章目录" 42 | 43 | readMore: 44 | other: "阅读更多" 45 | 46 | reward: 47 | other: "赞赏支持" 48 | 49 | rewardAlipay: 50 | other: "支付宝打赏" 51 | 52 | rewardWechat: 53 | other: "微信打赏" 54 | 55 | wordCount: 56 | one: "约 {{ .Count }} 字" 57 | other: "约 {{ .Count }} 字" 58 | 59 | readingTime: 60 | one: "预计阅读 {{ .Count }} 分钟" 61 | other: "预计阅读 {{ .Count }} 分钟" 62 | 63 | outdatedInfoWarningBefore: 64 | other: "【注意】最后更新于 " 65 | 66 | outdatedInfoWarningAfter: 67 | other: ",文中内容可能已过时,请谨慎使用。" 68 | 69 | # ===== content license ===== 70 | author: 71 | other: "文章作者" 72 | 73 | lastMod: 74 | other: "上次更新" 75 | 76 | markdown: 77 | other: "原始文档" 78 | 79 | seeMarkDown: 80 | other: "查看本文 Markdown 版本 »" 81 | 82 | license: 83 | other: "许可协议" 84 | 85 | # ===== counter ===== 86 | archiveCounter: 87 | one: "共计 {{ .Count }} 篇文章" 88 | other: "共计 {{ .Count }} 篇文章" 89 | 90 | tagCounter: 91 | one: "共计 {{ .Count }} 个标签" 92 | other: "共计 {{ .Count }} 个标签" 93 | 94 | zeroTagCounter: 95 | other: "暂无标签" 96 | 97 | categoryCounter: 98 | one: "共计 {{ .Count }} 个分类" 99 | other: "共计 {{ .Count }} 个分类" 100 | 101 | zeroCategoryCounter: 102 | other: "暂无分类" 103 | -------------------------------------------------------------------------------- /i18n/zh-TW.yaml: -------------------------------------------------------------------------------- 1 | # ===== title ===== 2 | archive: 3 | other: "歸檔" 4 | 5 | tags: 6 | other: "標簽" 7 | 8 | categories: 9 | other: "分類" 10 | 11 | # ===== footer ===== 12 | powered: 13 | other: "由 %s 強力驅動" 14 | 15 | theme: 16 | other: "主題" 17 | 18 | siteUV: 19 | other: "本站總訪客數 %s 人" 20 | 21 | sitePV: 22 | other: "本站總訪問量 %s 次" 23 | 24 | pagePV: 25 | other: "%s 次閱讀" 26 | 27 | # ===== post ===== 28 | prevPage: 29 | other: "上一頁" 30 | 31 | nextPage: 32 | other: "下一頁" 33 | 34 | prevPost: 35 | other: "上一篇" 36 | 37 | nextPost: 38 | other: "下一篇" 39 | 40 | toc: 41 | other: "文章目錄" 42 | 43 | readMore: 44 | other: "閱讀更多" 45 | 46 | reward: 47 | other: "讚賞支持" 48 | 49 | rewardAlipay: 50 | other: "支付寶贊助" 51 | 52 | rewardWechat: 53 | other: "微信贊助" 54 | 55 | wordCount: 56 | one: "約 {{ .Count }} 字" 57 | other: "約 {{ .Count }} 字" 58 | 59 | readingTime: 60 | one: "預計閱讀 {{ .Count }} 分鐘" 61 | other: "預計閱讀 {{ .Count }} 分鐘" 62 | 63 | outdatedInfoWarningBefore: 64 | other: "注意:最後更新於 " 65 | 66 | outdatedInfoWarningAfter: 67 | other: ",文中內容可能已過時,請謹慎參考。" 68 | 69 | # ===== content license ===== 70 | author: 71 | other: "文章作者" 72 | 73 | lastMod: 74 | other: "上次更新" 75 | 76 | markdown: 77 | other: "原始文檔" 78 | 79 | seeMarkDown: 80 | other: "查看本文 Markdown 版本 »" 81 | 82 | license: 83 | other: "許可證" 84 | 85 | # ===== counter ===== 86 | archiveCounter: 87 | one: "共計 {{ .Count }} 篇文章" 88 | other: "共計 {{ .Count }} 篇文章" 89 | 90 | tagCounter: 91 | one: "共計 {{ .Count }} 個標籤" 92 | other: "共計 {{ .Count }} 個標籤" 93 | 94 | zeroTagCounter: 95 | other: "暫無標籤" 96 | 97 | categoryCounter: 98 | one: "共計 {{ .Count }} 個分類" 99 | other: "共計 {{ .Count }} 個分類" 100 | 101 | zeroCategoryCounter: 102 | other: "暫無分類" 103 | -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/e03080913d6148d055471f76027a33f28234cb32/images/screenshot.png -------------------------------------------------------------------------------- /images/showcase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/e03080913d6148d055471f76027a33f28234cb32/images/showcase.png -------------------------------------------------------------------------------- /images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/e03080913d6148d055471f76027a33f28234cb32/images/tn.png -------------------------------------------------------------------------------- /layouts/404.html: -------------------------------------------------------------------------------- 1 | {{- define "title" }}404 page not found - {{ .Site.Title }}{{ end -}} 2 | 3 | {{- define "content" -}} 4 |
5 |

6 |

/* 404 page not found. */

7 | 8 |
9 | 18 | {{- end -}} 19 | -------------------------------------------------------------------------------- /layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | {{ if ne .Site.Params.version "4.x" -}} 2 | {{ errorf "\n\nThere are two possible situations that led to this error:\n 1. You haven't copied the config.toml yet. See https://github.com/olOwOlo/hugo-theme-even#installation \n 2. You have an incompatible update. See https://github.com/olOwOlo/hugo-theme-even/blob/master/CHANGELOG.md#400-2018-11-06 \n\n有两种可能的情况会导致这个错误发生:\n 1. 你还没有复制 config.toml 参考 https://github.com/olOwOlo/hugo-theme-even/blob/master/README-zh.md#installation \n 2. 你进行了一次不兼容的更新 参考 https://github.com/olOwOlo/hugo-theme-even/blob/master/CHANGELOG.md#400-2018-11-06 \n" -}} 3 | {{ end -}} 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{- block "title" . -}} 11 | {{ if .IsPage }}{{ .Title }} - {{ .Site.Title }}{{ else }}{{ .Site.Title }}{{ end }} 12 | {{- end -}} 13 | 14 | {{ partial "head.html" . }} 15 | 16 | 17 | {{ partial "slideout.html" . }} 18 |
19 | {{ if not .Params.hideHeaderAndFooter -}} 20 | 23 | {{- end }} 24 | 25 |
26 |
27 |
28 | {{ block "content" . }}{{ end }} 29 |
30 | {{ partial "comments.html" . }} 31 |
32 |
33 | 34 | {{ if not .Params.hideHeaderAndFooter -}} 35 |
36 | {{ partial "footer.html" . }} 37 |
38 | {{- end }} 39 | 40 |
41 | 42 |
43 |
44 | {{ partial "scripts.html" . }} 45 | 46 | 47 | -------------------------------------------------------------------------------- /layouts/_default/section.html: -------------------------------------------------------------------------------- 1 | {{- define "title" }}{{ T "archive" }} - {{ .Site.Title }}{{ end -}} 2 | 3 | {{- define "content" }} 4 | {{- $paginator := .Paginate .Data.Pages.ByDate.Reverse .Site.Params.archivePaginate }} 5 |
6 | {{- if and (not $paginator.HasPrev) .Site.Params.showArchiveCount }} 7 |
8 | 9 | {{ T "archiveCounter" (len .Data.Pages) }} 10 | 11 |
12 | {{- end -}} 13 | 14 | {{- range $index, $element := $paginator.Pages -}} 15 | {{- $thisYear := $element.Date.Format "2006" }} 16 | {{- $lastElement := $index | add -1 | index $paginator.Pages }} 17 | {{- if or (eq $index 0) ( ne ($lastElement.Date.Format "2006") $thisYear ) }} 18 |
19 |

{{ $thisYear }}

20 |
21 | {{- end }} 22 | 23 |
24 | 25 | {{ $element.Date.Format "01-02" }} 26 | 27 | 28 | 29 | {{ .Title }} 30 | 31 | 32 |
33 | {{- end -}} 34 |
35 | 36 | 50 | {{- end }} 51 | -------------------------------------------------------------------------------- /layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ define "content" -}} 2 |
3 |
4 | {{ .Content }} 5 |
6 |
7 | {{- end }} -------------------------------------------------------------------------------- /layouts/_default/single.md: -------------------------------------------------------------------------------- 1 | {{ .RawContent }} -------------------------------------------------------------------------------- /layouts/_default/taxonomy.html: -------------------------------------------------------------------------------- 1 | {{- define "title" }}{{ .Title }} · {{ .Site.Title }}{{ end -}} 2 | 3 | {{- define "content" }} 4 | {{- $paginator := .Paginate .Data.Pages .Site.Params.archivePaginate -}} 5 |
6 | {{ if not $paginator.HasPrev -}} 7 | {{ if eq .Data.Plural "tags" -}} 8 |
9 |

{{ .Title }}

10 |
11 | {{- else if eq .Data.Plural "categories" -}} 12 |
13 |

{{ .Title }}

14 |
15 | {{- end }} 16 | {{- end }} 17 | 18 | {{ range $paginator.Pages -}} 19 |
20 | 21 | {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} 22 | 23 | 24 | 25 | {{ .Title }} 26 | 27 | 28 |
29 | {{- end }} 30 |
31 | 32 | 46 | {{- end }} 47 | -------------------------------------------------------------------------------- /layouts/_default/terms.html: -------------------------------------------------------------------------------- 1 | {{- define "title" }}{{ T .Data.Plural }} - {{ .Site.Title }}{{ end -}} 2 | 3 | {{- define "content" -}} 4 | {{ $name := .Data.Plural -}} 5 | {{ $terms := .Data.Terms.ByCount -}} 6 | {{ $length := len $terms -}} 7 | {{ if eq $name "categories" -}} 8 |
9 |
10 | {{ if eq $length 0 -}} 11 | {{ T "zeroCategoryCounter" }} 12 | {{- else -}} 13 | {{ T "categoryCounter" $length }} 14 | {{- end }} 15 |
16 |
17 | {{ range $key, $value := $terms -}} 18 | 19 | {{ $value.Term }} 20 | {{ len $value.Pages }} 21 | 22 | {{ end -}} 23 |
24 |
25 | {{- else if eq $name "tags" -}} 26 |
27 |
28 | {{ if eq $length 0 -}} 29 | {{ T "zeroTagCounter" }} 30 | {{- else -}} 31 | {{ T "tagCounter" $length }} 32 | {{- end }} 33 |
34 |
35 | {{- range $key, $value := $terms }} 36 | 37 | {{ $value.Term }} 38 | {{ len $value.Pages }} 39 | 40 | {{ end -}} 41 |
42 |
43 | {{- end }} 44 | {{- end }} 45 | -------------------------------------------------------------------------------- /layouts/index.html: -------------------------------------------------------------------------------- 1 | {{- define "content" -}} 2 |
3 | {{/* (index .Site.Paginate) */}} 4 | {{- $paginator := .Paginate (where (where .Site.RegularPages "Type" "post") ".Params.hiddenfromhomepage" "!=" true) }} 5 | {{- range $paginator.Pages -}} 6 | {{ .Render "summary" }} 7 | {{ end -}} 8 |
9 | 10 | 24 | {{- end -}} 25 | -------------------------------------------------------------------------------- /layouts/partials/comments.html: -------------------------------------------------------------------------------- 1 | {{ if and .IsPage (ne .Params.comment false) -}} 2 | 3 | {{- if .Site.Config.Services.Disqus.Shortname -}} 4 |
5 | 17 | 18 | {{- end -}} 19 | 20 | 21 | {{- if and .Site.Params.changyanAppid .Site.Params.changyanAppkey -}} 22 |
23 | 33 | {{- end -}} 34 | 35 | 36 | {{- if .Site.Params.livereUID -}} 37 |
38 | 51 | 52 |
53 | {{- end -}} 54 | 55 | 56 | {{- if .Site.Params.gitment.owner -}} 57 |
58 | 59 | 60 | 75 | 76 | {{- end -}} 77 | 78 | 79 | {{- if .Site.Params.gitalk.owner -}} 80 |
81 | 82 | 83 | 96 | 97 | {{- end }} 98 | 99 | 100 | {{- if .Site.Params.valine.enable -}} 101 | 102 | {{- if .Site.Params.valine.visitor -}} 103 | 104 | 105 | 0 106 |

107 |
108 | {{- end }} 109 |
110 | 111 | 112 | 124 | {{- end }} 125 | 126 | 127 | {{- if .Site.Params.utterances.owner}} 128 | 135 | 136 | {{- end }} 137 | 138 | {{- end }} 139 | -------------------------------------------------------------------------------- /layouts/partials/footer.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 53 | -------------------------------------------------------------------------------- /layouts/partials/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | {{- if .Description -}} 16 | 17 | {{- else if .IsPage -}} 18 | 19 | {{- else if .Site.Params.description -}} 20 | 21 | {{- end -}} 22 | 23 | {{- if .Keywords -}} 24 | {{ $length := len .Keywords | add -1 -}} 25 | 26 | {{- else if .Site.Params.keywords -}} 27 | {{ $length := len .Site.Params.keywords | add -1 -}} 28 | 29 | {{- end }} 30 | 31 | 32 | {{ with .Site.Params.baiduVerification }}{{ end }} 33 | {{ with .Site.Params.googleVerification }}{{ end }} 34 | 35 | 36 | 37 | 38 | 39 | 40 | {{- with .OutputFormats.Get "RSS" }} 41 | 42 | 43 | {{- end -}} 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | {{- if .Site.Params.debug -}} 54 | 55 | 56 | {{- end -}} 57 | 58 | 59 | {{- if .Site.Params.busuanzi.enable -}} 60 | 61 | {{- end -}} 62 | 63 | 64 | {{ $style := resources.Get "sass/main.scss" | toCSS | minify | fingerprint }} 65 | 66 | {{ if .Site.Params.publicCDN.enable -}} 67 | {{ if .Site.Params.fancybox }}{{ .Site.Params.publicCDN.fancyboxCSS | safeHTML }}{{ end }} 68 | {{- else -}} 69 | {{ if .Site.Params.fancybox }}{{ end }} 70 | {{- end -}} 71 | 72 | 73 | {{ range .Site.Params.customCSS -}} 74 | 75 | {{ end }} 76 | 77 | {{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/spf13/hugo/blob/master/tpl/tplimpl/template_embedded.go#L158 */}} 78 | {{- template "_internal/opengraph.html" . -}} 79 | {{- template "_internal/schema.html" . -}} 80 | {{- template "_internal/twitter_cards.html" . -}} 81 | 82 | 83 | {{ `` | safeHTML }} 86 | 87 | {{ `` | safeHTML }} 91 | -------------------------------------------------------------------------------- /layouts/partials/header.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | {{ partial "header/language-selector.html" . }} 12 | 13 | 22 | -------------------------------------------------------------------------------- /layouts/partials/header/language-selector.html: -------------------------------------------------------------------------------- 1 | 8 | {{ if (and (hugo.IsMultilingual) ($.Site.Params.showLanguageSelector)) }} 9 |
10 |
    11 | {{ range $homeTranslation := .Site.Home.AllTranslations }} 12 | {{ $active := eq $homeTranslation.Language $.Site.Language }} 13 | {{ $pageTranslation := (index (where $.Page.AllTranslations "Language.Lang" "eq" $homeTranslation.Language.Lang) 0) }} 14 | 15 |
  • 16 | {{ with $pageTranslation }} 17 | {{ .Language.Lang }} 18 | {{ else }} 19 | {{ .Language.Lang }} 20 | {{ end }} 21 |
  • 22 | {{ end }} 23 |
24 |
25 | {{ end }} 26 | -------------------------------------------------------------------------------- /layouts/partials/post/copyright.html: -------------------------------------------------------------------------------- 1 | {{ if or .Params.postMetaInFooter (and .Site.Params.postMetaInFooter (ne .Params.postMetaInFooter false)) -}} 2 |
3 | 7 | 14 | {{ if $.Site.Params.linkToMarkDown -}} 15 | {{ with $.OutputFormats.Get "markdown" -}} 16 | 20 | {{- end }} 21 | {{- end }} 22 | {{ if or .Params.contentCopyright (and .Site.Params.contentCopyright (ne .Params.contentCopyright false)) -}} 23 | 33 | {{- end }} 34 |
35 | {{- end }} 36 | -------------------------------------------------------------------------------- /layouts/partials/post/outdated-info-warning.html: -------------------------------------------------------------------------------- 1 | {{- if or .Params.enableOutdatedInfoWarning (and .Site.Params.outdatedInfoWarning.enable (ne .Params.enableOutdatedInfoWarning false)) }} 2 | {{- $daysAgo := div (sub now.Unix .Lastmod.Unix) 86400 }} 3 | {{- $hintThreshold := .Site.Params.outdatedInfoWarning.hint | default 30 }} 4 | {{- $warnThreshold := .Site.Params.outdatedInfoWarning.warn | default 180 }} 5 | 6 | {{- $updateTime := .Lastmod }} 7 | {{- if .GitInfo }} 8 | {{- if lt .GitInfo.AuthorDate.Unix .Lastmod.Unix }} 9 | {{- $updateTime := .GitInfo.AuthorDate }} 10 | {{- end }} 11 | {{- end -}} 12 | 13 | {{- if gt $daysAgo $hintThreshold }} 14 |
15 | {{- if gt $daysAgo $warnThreshold }} 16 |
17 | {{- else }} 18 |
19 | {{- end }} 20 |

{{ T "outdatedInfoWarningBefore" -}} 21 | 22 | {{- dateFormat "January 2, 2006" $updateTime -}} 23 | {{ T "outdatedInfoWarningAfter" -}} 24 |

25 |
26 |
27 | {{- end -}} 28 | {{- end -}} 29 | -------------------------------------------------------------------------------- /layouts/partials/post/reward.html: -------------------------------------------------------------------------------- 1 | {{ if or .Params.reward (and .Site.Params.reward.enable (ne .Params.reward false)) -}} 2 |
3 | 4 | 5 |
6 | {{ $qrCode := .Site.Params.reward }} 7 | {{ with $qrCode.wechat -}} 8 | 12 | {{- end }} 13 | {{ with $qrCode.alipay -}} 14 | 18 | {{- end }} 19 |
20 |
21 | {{- end }} -------------------------------------------------------------------------------- /layouts/partials/post/toc.html: -------------------------------------------------------------------------------- 1 | {{ if or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) -}} 2 |
3 |

{{ T "toc" }}

4 | {{- $globalAutoCollapseToc := .Site.Params.autoCollapseToc | default false }} 5 |
6 | {{.TableOfContents}} 7 |
8 |
9 | {{- end }} -------------------------------------------------------------------------------- /layouts/partials/scripts.html: -------------------------------------------------------------------------------- 1 | 2 | {{- if .Site.Params.highlightInClient -}} 3 | 4 | {{- end -}} 5 | 6 | 7 | {{- if .Site.Params.publicCDN.enable }} 8 | {{ .Site.Params.publicCDN.jquery | safeHTML }} 9 | {{ .Site.Params.publicCDN.slideout | safeHTML }} 10 | {{ if .Site.Params.fancybox }}{{ .Site.Params.publicCDN.fancyboxJS | safeHTML }}{{ end }} 11 | {{- else -}} 12 | 13 | 14 | {{ if .Site.Params.fancybox }}{{ end }} 15 | {{- end -}} 16 | 17 | 18 | {{- if and (or .Params.enableOutdatedInfoWarning (and .Site.Params.outdatedInfoWarning.enable (ne .Params.enableOutdatedInfoWarning false))) (or .IsPage .IsHome) }} 19 | {{- if .Site.Params.publicCDN.enable }} 20 | {{ .Site.Params.publicCDN.timeagoJS | safeHTML }} 21 | {{ .Site.Params.publicCDN.timeagoLocalesJS | safeHTML }} 22 | {{- else }} 23 | 24 | 25 | {{- end }} 26 | 31 | {{- end -}} 32 | 33 | 34 | {{- if and (or .Params.flowchartDiagrams.enable (and .Site.Params.flowchartDiagrams.enable (ne .Params.flowchartDiagrams.enable false))) (or .IsPage .IsHome) -}} 35 | 42 | {{- if .Site.Params.publicCDN.enable -}} 43 | {{ .Site.Params.publicCDN.flowchartDiagramsJS | safeHTML }} 44 | {{- else -}} 45 | 46 | 47 | {{- end -}} 48 | {{- end -}} 49 | 50 | 51 | {{- if and (or .Params.sequenceDiagrams.enable (and .Site.Params.sequenceDiagrams.enable (ne .Params.sequenceDiagrams.enable false))) (or .IsPage .IsHome) -}} 52 | 59 | {{- if .Site.Params.publicCDN.enable -}} 60 | {{ .Site.Params.publicCDN.sequenceDiagramsJS | safeHTML }} 61 | {{ .Site.Params.publicCDN.sequenceDiagramsCSS | safeHTML }} 62 | {{- else -}} 63 | 64 | 65 | 66 | 67 | 68 | {{- end -}} 69 | {{- end }} 70 | {{ $even := resources.Get "js/even.js" }} 71 | {{ $main := resources.Get "js/main.js" }} 72 | {{ $js := slice $even $main | resources.Concat "js/main.js" | minify | fingerprint }} 73 | 74 | 75 | {{- if and (or .Params.mathjax (and .Site.Params.mathjax (ne .Params.mathjax false))) (or .IsPage .IsHome) }} 76 | 88 | {{ if .Site.Params.mathjaxUseLocalFiles -}} 89 | 90 | {{- else -}} 91 | 92 | {{- end }} 93 | {{- end }} 94 | 95 | 96 | {{- if (in (slice (getenv "HUGO_ENV") hugo.Environment) "production") | and .Site.Config.Services.GoogleAnalytics.ID -}} 97 | {{ template "_internal/google_analytics.html" . }} 98 | {{- end -}} 99 | 100 | {{- with .Site.Params.baiduAnalytics -}} 101 | 111 | {{- end }} 112 | 113 | 114 | {{- if .Site.Params.baiduPush -}} 115 | 130 | {{- end }} 131 | 132 | 133 | {{ range .Site.Params.customJS -}} 134 | 135 | {{ end }} 136 | -------------------------------------------------------------------------------- /layouts/partials/slideout.html: -------------------------------------------------------------------------------- 1 | 17 | 28 | -------------------------------------------------------------------------------- /layouts/post/single.html: -------------------------------------------------------------------------------- 1 | {{ define "content" -}} 2 |
3 | 4 |
5 |

{{ .Title }}

6 | 7 | 25 |
26 | 27 | 28 | {{- partial "post/toc.html" . -}} 29 | 30 | 31 | {{- partial "post/outdated-info-warning.html" . -}} 32 | 33 | 34 |
35 | {{ .Content }} 36 |
37 | 38 | 39 | {{- partial "post/copyright.html" . -}} 40 | 41 | 42 | {{- partial "post/reward.html" . -}} 43 | 44 | 71 |
72 | {{- end }} 73 | -------------------------------------------------------------------------------- /layouts/post/summary.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{ .Title }}

4 | 18 |
19 | 20 |
21 |
22 | {{ .Summary }} 23 |
24 |
25 | {{ T "readMore" }} 26 |
27 |
28 |
29 | -------------------------------------------------------------------------------- /layouts/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Sitemap: {{ "sitemap.xml" | absURL }} 3 | -------------------------------------------------------------------------------- /layouts/shortcodes/admonition.html: -------------------------------------------------------------------------------- 1 | {{ if .IsNamedParams -}} 2 | 3 | {{ if eq (.Get "details") "true" -}} 4 | 5 |
6 | {{- with .Get "title" }}{{ . }}{{ end }} 7 | {{ .Inner }} 8 |
9 | 10 | {{- else -}} 11 | 12 |
13 | {{- with .Get "title" }}

{{ . }}

{{ end }} 14 | {{ .Inner }} 15 |
16 | 17 | {{- end }} 18 | 19 | {{- else -}} 20 | 21 | {{ if eq (.Get 2) "true" -}} 22 | 23 |
24 | {{- with .Get 1 }}{{ . }}{{ end }} 25 | {{ .Inner }} 26 |
27 | 28 | {{- else -}} 29 | 30 |
31 | {{- with .Get 1 }}

{{ . }}

{{ end }} 32 | {{ .Inner }} 33 |
34 | 35 | {{- end }} 36 | 37 | {{- end }} -------------------------------------------------------------------------------- /layouts/shortcodes/bilibili.html: -------------------------------------------------------------------------------- 1 | 2 | {{ $videoID := index .Params 0 }} 3 | {{ $pageNum := index .Params 1 | default 1 }} 4 | 5 | {{ if (findRE "^[bB][vV][0-9a-zA-Z]+$" $videoID) }} 6 |
7 | {{ else }} 8 |
9 | {{ end }} 10 | 11 | 24 | -------------------------------------------------------------------------------- /layouts/shortcodes/center.html: -------------------------------------------------------------------------------- 1 |
2 | {{ .Inner }} 3 |
-------------------------------------------------------------------------------- /layouts/shortcodes/left.html: -------------------------------------------------------------------------------- 1 |
2 | {{ .Inner }} 3 |
-------------------------------------------------------------------------------- /layouts/shortcodes/music.html: -------------------------------------------------------------------------------- 1 | {{/* 2 | ## Music 163 3 | 4 | ### Params: 5 | 6 | - `id` 7 | 8 | required param 9 | you can extract from music url 10 | url format "http://music.163.com/#/song?id=3950552" 11 | 12 | - Fiddle `auto` 13 | 14 | optional param 15 | default value 0 16 | you can overwrite it with 1 17 | 18 | ### Examples: 19 | 20 | - Simple 21 | 22 | {{% music "3950552" %}} 23 | {{% music "3950552" "1" %}} 24 | 25 | - Named Params 26 | 27 | {{% music id="3950552" %}} 28 | {{% music id="3950552" auto="1" %}} 29 | 30 | */}} 31 | 32 | {{- /* DEFAULTS */ -}} 33 | {{ $auto := "0" }} 34 | 35 | {{- if .IsNamedParams -}} 36 | 37 | 47 | 48 | {{- else -}} 49 | 50 | 60 | 61 | {{- end -}} 62 | -------------------------------------------------------------------------------- /layouts/shortcodes/right.html: -------------------------------------------------------------------------------- 1 |
2 | {{ .Inner }} 3 |
-------------------------------------------------------------------------------- /layouts/sitemap.xml: -------------------------------------------------------------------------------- 1 | {{ "" | safeHTML }} 2 | 3 | {{ range .Data.Pages }} 4 | 5 | {{ .Permalink }}{{ if not .Lastmod.IsZero }} 6 | {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} 7 | {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} 8 | {{ .Sitemap.Priority }}{{ end }} 9 | 10 | {{ end }} 11 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | publish = "exampleSite/public" 3 | command = "hugo -s exampleSite" 4 | 5 | [build.environment] 6 | HUGO_THEME = "repo" 7 | HUGO_THEMESDIR = "/opt/build" 8 | HUGO_VERSION = "0.136.5" 9 | 10 | [context.production.environment] 11 | HUGO_BASEURL = "https://hugo-theme-even.netlify.app/" 12 | 13 | [context.deploy-preview] 14 | command = "hugo -s exampleSite -b $DEPLOY_PRIME_URL" 15 | 16 | [[headers]] 17 | for = "/*" 18 | [headers.values] 19 | Cache-Control = "public, max-age=600" 20 | 21 | [[headers]] 22 | for = "*.(css|js|woff|woff2|ttf|png|jpg|jpeg)" 23 | [headers.values] 24 | Cache-Control = "public, max-age=2592000" 25 | -------------------------------------------------------------------------------- /resources/_gen/assets/scss/sass/main.scss_48b060fe05b0a273d182ef83c0605941.json: -------------------------------------------------------------------------------- 1 | {"Target":"sass/main.min.b5a744db6de49a86cadafb3b70f555ab443f83c307a483402259e94726b045ff.css","MediaType":"text/css","Data":{"Integrity":"sha256-tadE223kmobK2vs7cPVVq0Q/g8MHpINAIlnpRyawRf8="}} -------------------------------------------------------------------------------- /static/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/e03080913d6148d055471f76027a33f28234cb32/static/android-chrome-192x192.png -------------------------------------------------------------------------------- /static/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/e03080913d6148d055471f76027a33f28234cb32/static/android-chrome-512x512.png -------------------------------------------------------------------------------- /static/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/e03080913d6148d055471f76027a33f28234cb32/static/apple-touch-icon.png -------------------------------------------------------------------------------- /static/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #b91d47 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /static/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/e03080913d6148d055471f76027a33f28234cb32/static/favicon-16x16.png -------------------------------------------------------------------------------- /static/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/e03080913d6148d055471f76027a33f28234cb32/static/favicon-32x32.png -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/e03080913d6148d055471f76027a33f28234cb32/static/favicon.ico -------------------------------------------------------------------------------- /static/fonts/chancery/apple-chancery-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/e03080913d6148d055471f76027a33f28234cb32/static/fonts/chancery/apple-chancery-webfont.eot -------------------------------------------------------------------------------- /static/fonts/chancery/apple-chancery-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/e03080913d6148d055471f76027a33f28234cb32/static/fonts/chancery/apple-chancery-webfont.ttf -------------------------------------------------------------------------------- /static/fonts/chancery/apple-chancery-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/e03080913d6148d055471f76027a33f28234cb32/static/fonts/chancery/apple-chancery-webfont.woff -------------------------------------------------------------------------------- /static/fonts/chancery/apple-chancery-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/e03080913d6148d055471f76027a33f28234cb32/static/fonts/chancery/apple-chancery-webfont.woff2 -------------------------------------------------------------------------------- /static/fonts/iconfont/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/e03080913d6148d055471f76027a33f28234cb32/static/fonts/iconfont/iconfont.eot -------------------------------------------------------------------------------- /static/fonts/iconfont/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/e03080913d6148d055471f76027a33f28234cb32/static/fonts/iconfont/iconfont.ttf -------------------------------------------------------------------------------- /static/fonts/iconfont/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/e03080913d6148d055471f76027a33f28234cb32/static/fonts/iconfont/iconfont.woff -------------------------------------------------------------------------------- /static/img/reward/alipay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/e03080913d6148d055471f76027a33f28234cb32/static/img/reward/alipay.png -------------------------------------------------------------------------------- /static/img/reward/wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/e03080913d6148d055471f76027a33f28234cb32/static/img/reward/wechat.png -------------------------------------------------------------------------------- /static/img/spinner.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /static/lib/js-sequence-diagrams/danielbd.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/e03080913d6148d055471f76027a33f28234cb32/static/lib/js-sequence-diagrams/danielbd.woff2 -------------------------------------------------------------------------------- /static/lib/js-sequence-diagrams/sequence-diagram-2.0.1.min.css: -------------------------------------------------------------------------------- 1 | /** js sequence diagrams 2 | * https://bramp.github.io/js-sequence-diagrams/ 3 | * (c) 2012-2017 Andrew Brampton (bramp.net) 4 | * Simplified BSD license. 5 | */ 6 | @font-face{font-family:'danielbd';src:url(danielbd.woff2) format('woff2'),url(danielbd.woff) format('woff');font-weight:normal;font-style:normal} -------------------------------------------------------------------------------- /static/lib/js-sequence-diagrams/webfontloader-1.6.28.js: -------------------------------------------------------------------------------- 1 | /* Web Font Loader v1.6.28 - (c) Adobe Systems, Google. License: Apache 2.0 */(function(){function aa(a,b,c){return a.call.apply(a.bind,arguments)}function ba(a,b,c){if(!a)throw Error();if(2=b.f?e():a.fonts.load(fa(b.a),b.h).then(function(a){1<=a.length?d():setTimeout(f,25)},function(){e()})}f()}),e=null,f=new Promise(function(a,d){e=setTimeout(d,b.f)});Promise.race([f,d]).then(function(){e&&(clearTimeout(e),e=null);b.g(b.a)},function(){b.j(b.a)})};function Q(a,b,c,d,e,f,g){this.v=a;this.B=b;this.c=c;this.a=d;this.s=g||"BESbswy";this.f={};this.w=e||3E3;this.u=f||null;this.m=this.j=this.h=this.g=null;this.g=new M(this.c,this.s);this.h=new M(this.c,this.s);this.j=new M(this.c,this.s);this.m=new M(this.c,this.s);a=new G(this.a.c+",serif",J(this.a));a=O(a);this.g.a.style.cssText=a;a=new G(this.a.c+",sans-serif",J(this.a));a=O(a);this.h.a.style.cssText=a;a=new G("serif",J(this.a));a=O(a);this.j.a.style.cssText=a;a=new G("sans-serif",J(this.a));a= 6 | O(a);this.m.a.style.cssText=a;N(this.g);N(this.h);N(this.j);N(this.m)}var R={D:"serif",C:"sans-serif"},S=null;function T(){if(null===S){var a=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);S=!!a&&(536>parseInt(a[1],10)||536===parseInt(a[1],10)&&11>=parseInt(a[2],10))}return S}Q.prototype.start=function(){this.f.serif=this.j.a.offsetWidth;this.f["sans-serif"]=this.m.a.offsetWidth;this.A=q();U(this)}; 7 | function la(a,b,c){for(var d in R)if(R.hasOwnProperty(d)&&b===a.f[R[d]]&&c===a.f[R[d]])return!0;return!1}function U(a){var b=a.g.a.offsetWidth,c=a.h.a.offsetWidth,d;(d=b===a.f.serif&&c===a.f["sans-serif"])||(d=T()&&la(a,b,c));d?q()-a.A>=a.w?T()&&la(a,b,c)&&(null===a.u||a.u.hasOwnProperty(a.a.c))?V(a,a.v):V(a,a.B):ma(a):V(a,a.v)}function ma(a){setTimeout(p(function(){U(this)},a),50)}function V(a,b){setTimeout(p(function(){v(this.g.a);v(this.h.a);v(this.j.a);v(this.m.a);b(this.a)},a),0)};function W(a,b,c){this.c=a;this.a=b;this.f=0;this.m=this.j=!1;this.s=c}var X=null;W.prototype.g=function(a){var b=this.a;b.g&&w(b.f,[b.a.c("wf",a.c,J(a).toString(),"active")],[b.a.c("wf",a.c,J(a).toString(),"loading"),b.a.c("wf",a.c,J(a).toString(),"inactive")]);K(b,"fontactive",a);this.m=!0;na(this)}; 8 | W.prototype.h=function(a){var b=this.a;if(b.g){var c=y(b.f,b.a.c("wf",a.c,J(a).toString(),"active")),d=[],e=[b.a.c("wf",a.c,J(a).toString(),"loading")];c||d.push(b.a.c("wf",a.c,J(a).toString(),"inactive"));w(b.f,d,e)}K(b,"fontinactive",a);na(this)};function na(a){0==--a.f&&a.j&&(a.m?(a=a.a,a.g&&w(a.f,[a.a.c("wf","active")],[a.a.c("wf","loading"),a.a.c("wf","inactive")]),K(a,"active")):L(a.a))};function oa(a){this.j=a;this.a=new ja;this.h=0;this.f=this.g=!0}oa.prototype.load=function(a){this.c=new ca(this.j,a.context||this.j);this.g=!1!==a.events;this.f=!1!==a.classes;pa(this,new ha(this.c,a),a)}; 9 | function qa(a,b,c,d,e){var f=0==--a.h;(a.f||a.g)&&setTimeout(function(){var a=e||null,m=d||null||{};if(0===c.length&&f)L(b.a);else{b.f+=c.length;f&&(b.j=f);var h,l=[];for(h=0;ht._tolerance?t.open():t.close()}t._moved=false};this.panel.addEventListener(f.end,this._onTouchEndFn);this._onTouchMoveFn=function(e){if(r||t._preventOpen||typeof e.touches==="undefined"||d(e.target)){return}var n=e.touches[0].clientX-t._startOffsetX;var i=t._currentOffsetX=n;if(Math.abs(i)>t._padding){return}if(Math.abs(n)>20){t._opening=true;var o=n*t._orientation;if(t._opened&&o>0||!t._opened&&o<0){return}if(!t._moved){t.emit("translatestart")}if(o<=0){i=n+t._padding*t._orientation;t._opening=false}if(!(t._moved&&u.classList.contains("slideout-open"))){u.classList.add("slideout-open")}t.panel.style[h+"transform"]=t.panel.style.transform="translateX("+i+"px)";t.emit("translate",i);t._moved=true}};this.panel.addEventListener(f.move,this._onTouchMoveFn);return this};_.prototype.enableTouch=function(){this._touch=true;return this};_.prototype.disableTouch=function(){this._touch=false;return this};_.prototype.destroy=function(){this.close();a.removeEventListener(f.move,this._preventMove);this.panel.removeEventListener(f.start,this._resetTouchFn);this.panel.removeEventListener("touchcancel",this._onTouchCancelFn);this.panel.removeEventListener(f.end,this._onTouchEndFn);this.panel.removeEventListener(f.move,this._onTouchMoveFn);a.removeEventListener("scroll",this._onScrollFn);this.open=this.close=function(){};return this};e.exports=_},{decouple:2,emitter:3}],2:[function(t,e,n){"use strict";var i=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function o(t,e,n){var o,s=false;function r(t){o=t;a()}function a(){if(!s){i(u);s=true}}function u(){n.call(t,o);s=false}t.addEventListener(e,r,false);return r}e.exports=o},{}],3:[function(t,e,n){"use strict";var i=function(t,e){if(!(t instanceof e)){throw new TypeError("Cannot call a class as a function")}};n.__esModule=true;var o=function(){function t(){i(this,t)}t.prototype.on=function e(t,n){this._eventCollection=this._eventCollection||{};this._eventCollection[t]=this._eventCollection[t]||[];this._eventCollection[t].push(n);return this};t.prototype.once=function n(t,e){var n=this;function i(){n.off(t,i);e.apply(this,arguments)}i.listener=e;this.on(t,i);return this};t.prototype.off=function o(t,e){var n=undefined;if(!this._eventCollection||!(n=this._eventCollection[t])){return this}n.forEach(function(t,i){if(t===e||t.listener===e){n.splice(i,1)}});if(n.length===0){delete this._eventCollection[t]}return this};t.prototype.emit=function s(t){var e=this;for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o=p[o]&&o(0===o?9:1)&&(o+=1),l[n](t,o,a)[i].replace("%s",t)}function r(e,n){return((n=n?t(n):new Date)-t(e))/1e3}function o(t){for(var e=1,n=0,r=Math.abs(t);t>=p[n]&&n1&&(n+="s"),[t+" "+n+" ago","in "+t+" "+n]},zh_CN:function(t,e){if(0===e)return["刚刚","片刻后"];var n=s[parseInt(e/2)];return[t+n+"前",t+n+"后"]}},p=[60,60,24,7,365/7/12,12],h=6,m="data-tid",w={};return c.prototype.doRender=function(t,e,i){var a,c=r(e,this.nowDate),d=this;t.innerHTML=n(c,i,this.defaultLocale),w[a=setTimeout(function(){d.doRender(t,e,i),delete w[a]},Math.min(1e3*o(c),2147483647))]=0,u(t,a)},c.prototype.format=function(t,e){return n(r(t,this.nowDate),e,this.defaultLocale)},c.prototype.render=function(t,e){void 0===t.length&&(t=[t]);for(var n=0,r=t.length;n 2 | 4 | 7 | 8 | Created by potrace 1.11, written by Peter Selinger 2001-2013 9 | 10 | 12 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /static/sitemap.xsl: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | XML Sitemap 12 | 13 | 65 | 66 | 67 |
68 |

XML Sitemap

69 |

70 | This is a sitemap generated by Hugo to allow search engines to discover this blog's content. 71 |

72 |

73 | The xsl style copy from Ghost. 74 |

75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 97 | 100 | 103 | 106 | 107 | 108 | 109 |
URL ( total)PrioCh. Freq.Last Modified
90 | 91 | 92 | 93 | 94 | 95 | 96 | 98 | 99 | 101 | 102 | 104 | 105 |
110 |
111 | 112 | 113 | 114 |
115 |
-------------------------------------------------------------------------------- /theme.toml: -------------------------------------------------------------------------------- 1 | # theme.toml template for a Hugo theme 2 | # See https://github.com/gohugoio/hugoThemes#themetoml for an example 3 | 4 | name = "Even" 5 | license = "MIT" 6 | licenselink = "https://github.com/olOwOlo/hugo-theme-even/blob/master/LICENSE.md" 7 | description = "A super concise theme for Hugo" 8 | homepage = "https://github.com/olOwOlo/hugo-theme-even" 9 | tags = ["responsive", "blog", "simple", "clean", "highlight.js", "syntax highlighting"] 10 | features = ["responsive", "blog", "simple", "clean", "highlight.js", "syntax highlighting"] 11 | min_version = "0.60.0" 12 | 13 | [author] 14 | name = "olOwOlo" 15 | homepage = "https://github.com/olOwOlo" 16 | 17 | # If porting an existing theme 18 | [original] 19 | name = "hexo-theme-even" 20 | homepage = "http://www.ahonn.me/" 21 | repo = "https://github.com/ahonn/hexo-theme-even" 22 | --------------------------------------------------------------------------------