├── .gitattributes ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug-report.md │ ├── feature-request.md │ ├── other.md │ └── question.md ├── config.yml └── workflows │ └── npmpublish.yml ├── .gitignore ├── .npmignore ├── .stylintrc ├── .travis.yml ├── LICENSE ├── README.md ├── _config.yml ├── index.js ├── languages ├── de.yml ├── default.yml ├── en.yml ├── es.yml ├── fr.yml ├── ja.yml ├── ko.yml ├── nl.yml ├── no.yml ├── pt.yml ├── ru.yml ├── vi.yml ├── zh-CN.yml └── zh-TW.yml ├── layout ├── _partial │ ├── ads.ejs │ ├── after-footer.ejs │ ├── archive-post.ejs │ ├── archive.ejs │ ├── article.ejs │ ├── ayer.ejs │ ├── baidu-analytics.ejs │ ├── broadcast.ejs │ ├── float-btns.ejs │ ├── footer.ejs │ ├── google-analytics.ejs │ ├── head.ejs │ ├── katex.ejs │ ├── lock.ejs │ ├── mathjax.ejs │ ├── modal.ejs │ ├── music.ejs │ ├── post │ │ ├── albums.ejs │ │ ├── author.ejs │ │ ├── busuanzi.ejs │ │ ├── category.ejs │ │ ├── clipboard.ejs │ │ ├── date.ejs │ │ ├── gallery.ejs │ │ ├── gitalk.ejs │ │ ├── justifiedGallery.ejs │ │ ├── nav.ejs │ │ ├── search.ejs │ │ ├── share.ejs │ │ ├── tag.ejs │ │ ├── title.ejs │ │ ├── tocbot.ejs │ │ ├── topping.ejs │ │ ├── twikoo.ejs │ │ ├── valine.ejs │ │ └── word.ejs │ ├── sidebar.ejs │ └── viewer.ejs ├── archive.ejs ├── categories.ejs ├── friends.ejs ├── index.ejs ├── layout.ejs ├── page.ejs ├── plain-page.ejs ├── post.ejs └── tags.ejs ├── logo.png ├── move_config.js ├── package.json ├── rollup.config.js ├── screenshots └── hexo-theme-ayer.png ├── scripts ├── default_config.js ├── events │ ├── index.js │ └── lib │ │ ├── hello.js │ │ └── merge-configs.js ├── filters │ ├── index.js │ └── meta_generator.js ├── helpers │ ├── ayer-plus-vendors.js │ └── wordcount.js ├── lib │ └── core.js └── utils │ ├── join-path.js │ └── object.js ├── source-src ├── css │ ├── _darkmode.styl │ ├── _extend.styl │ ├── _mixins.styl │ ├── _normalize.styl │ ├── _partial │ │ ├── ads.styl │ │ ├── albums.styl │ │ ├── apple.styl │ │ ├── archive.styl │ │ ├── article.styl │ │ ├── articles.styl │ │ ├── ayer.styl │ │ ├── categories.styl │ │ ├── float.styl │ │ ├── footer.styl │ │ ├── friends.styl │ │ ├── gallery.styl │ │ ├── gitalk.styl │ │ ├── highlight.styl │ │ ├── justifiedGallery.styl │ │ ├── layout.styl │ │ ├── lists.styl │ │ ├── mobile.styl │ │ ├── navbar.styl │ │ ├── pace.styl │ │ ├── reward.styl │ │ ├── search.styl │ │ ├── share.styl │ │ ├── sidebar.styl │ │ ├── tag.styl │ │ ├── tocbot.styl │ │ └── totop.styl │ ├── _remixicon.styl │ ├── _variables.styl │ └── style.styl ├── js │ ├── ayer.js │ └── share.js └── main.js └── source ├── 404.html ├── css ├── clipboard.styl ├── custom.styl └── fonts │ ├── remixicon.css │ ├── remixicon.eot │ ├── remixicon.svg │ ├── remixicon.ttf │ ├── remixicon.woff │ └── remixicon.woff2 ├── dist ├── main.css └── main.js ├── favicon.ico ├── images ├── 404.jpg ├── alipay.jpg ├── ayer-side.svg ├── ayer.png ├── ayer.svg ├── beian.png ├── cover1.jpg ├── cover2.jpg ├── cover3.jpg ├── cover4.jpg ├── cover5.jpg ├── cover6.jpg ├── cover7.jpg ├── forkme.png ├── gitee.png ├── github.png ├── hexo-tag-chart.png ├── hexo.png ├── mouse.cur ├── sponsor.jpg └── wechat.jpg └── js ├── busuanzi-2.3.pure.min.js ├── clickBoom1.js ├── clickBoom2.js ├── clickLove.js ├── dz.js ├── jquery-3.6.0.min.js ├── lazyload.min.js ├── search.js └── tocbot.min.js /.gitattributes: -------------------------------------------------------------------------------- 1 | *.html linguist-language=javascript 2 | *.stylus linguist-language=javascript 3 | *.ejs linguist-language=javascript -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: ayer # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: 13 | [ 14 | "https://shen-yu.github.io/images/wechat.jpg", 15 | "https://shen-yu.github.io/images/alipay.jpg", 16 | ] 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Something isn't working as expected 4 | title: "" 5 | labels: Bug 6 | assignees: "" 7 | --- 8 | 9 | Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate. 10 | 请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。 11 | 12 | ## Issue Checklist 13 | 14 | 15 | 16 | - [ ] I am using [the latest](https://github.com/Shen-Yu/hexo-theme-ayer) version of hexo-theme-ayer. 17 | - [ ] I have reviewed the latest Roadmap on GitHub and searched for current [Ayer Issues](https://github.com/Shen-Yu/hexo-theme-ayer/issues), which does not help me. 18 | 19 | --- 20 | 21 | ## Expected behavior 22 | 23 | ## Actual behavior 24 | 25 | 26 | 27 | - Links to demo site with this issue: N/A 28 | - Links to repository or source code of the blog: N/A 29 | 30 | ## Steps to reproduce the behavior 31 | 32 | 1. N/A 33 | 2. N/A 34 | 3. N/A 35 | 36 | ## Environment Information 37 | 38 | ### Node.js and NPM Information 39 | 40 | 41 | 42 | ``` 43 | 44 | ``` 45 | 46 | ### Package dependencies Information 47 | 48 | 49 | 50 | ``` 51 | 52 | ``` 53 | 54 | ### HTML Configuration 55 | 56 | 57 | 58 | ``` 59 | 60 | ``` 61 | 62 | ## Other Information 63 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Suggest an idea for this project 4 | title: "" 5 | labels: Feature Request 6 | assignees: "" 7 | --- 8 | 9 | Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate. 10 | 请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。 11 | 12 | ## Issue Checklist 13 | 14 | 15 | 16 | - [ ] I am using [the latest](https://github.com/Shen-Yu/hexo-theme-ayer) version of hexo-theme-ayer. 17 | - [ ] I have reviewed the latest Roadmap on GitHub and searched for current [Ayer Issues](https://github.com/Shen-Yu/hexo-theme-ayer/issues), which does not help me. 18 | 19 | --- 20 | 21 | ## Expected behavior 22 | 23 | ## Actual behavior 24 | 25 | 26 | 27 | - Links to demo site with this feature: N/A 28 | - Links to repository or source code of the blog: N/A 29 | 30 | ## Steps to reproduce the behavior 31 | 32 | 1. N/A 33 | 2. N/A 34 | 3. N/A 35 | 36 | ## Other Information 37 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/other.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Other 3 | about: Not a question, feature request or bug report 4 | title: "" 5 | labels: "" 6 | assignees: "" 7 | --- 8 | 9 | Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate. 10 | 请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。 11 | 12 | ## Issue Checklist 13 | 14 | 15 | 16 | - [ ] I am using [the latest](https://github.com/Shen-Yu/hexo-theme-ayer) version of hexo-theme-ayer. 17 | - [ ] I have reviewed the latest Roadmap on GitHub and searched for current [Ayer Issues](https://github.com/Shen-Yu/hexo-theme-ayer/issues), which does not help me. 18 | 19 | --- 20 | 21 | ## Other Information 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 3 | about: I have a question for Ayer 4 | title: "" 5 | labels: Question 6 | assignees: "" 7 | --- 8 | 9 | Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate. 10 | 请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。 11 | 12 | ## Issue Checklist 13 | 14 | 15 | 16 | - [ ] I am using [the latest](https://github.com/Shen-Yu/hexo-theme-ayer) version of hexo-theme-ayer. 17 | - [ ] I have reviewed the latest Roadmap on GitHub and searched for current [Ayer Issues](https://github.com/Shen-Yu/hexo-theme-ayer/issues), which does not help me. 18 | 19 | --- 20 | 21 | ## Expected behavior 22 | 23 | ## Actual behavior 24 | 25 | 26 | 27 | - Links to demo site with this issue: N/A 28 | - Links to repository or source code of the blog: N/A 29 | 30 | ## Steps to reproduce the behavior 31 | 32 | 1. N/A 33 | 2. N/A 34 | 3. N/A 35 | 36 | ## Environment Information 37 | 38 | ### Node.js and NPM Information 39 | 40 | 41 | 42 | ``` 43 | 44 | ``` 45 | 46 | ### Package dependencies Information 47 | 48 | 49 | 50 | ``` 51 | 52 | ``` 53 | 54 | ### HTML Configuration 55 | 56 | 57 | 58 | ``` 59 | 60 | ``` 61 | 62 | ### Ayer Configuration 63 | 64 | 65 | 66 | ``` 67 | 68 | ``` 69 | 70 | ## Other Information 71 | -------------------------------------------------------------------------------- /.github/config.yml: -------------------------------------------------------------------------------- 1 | # =============================================================================================== # 2 | # Configuration for welcome - https://github.com/behaviorbot/welcome 3 | 4 | # Comment to be posted to on first time issues 5 | newIssueWelcomeComment: > 6 | Thanks for opening this issue, maintainers will get back to you as soon as possible! 7 | # Comment to be posted to on PRs from first time contributors in your repository 8 | newPRWelcomeComment: > 9 | Thanks so much for opening your first PR here! 10 | # Comment to be posted to on pull requests merged by a first time user 11 | firstPRMergeComment: > 12 | Congrats on merging your first pull request here! :tada: How awesome! -------------------------------------------------------------------------------- /.github/workflows/npmpublish.yml: -------------------------------------------------------------------------------- 1 | # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages 3 | 4 | name: Node.js Package 5 | 6 | on: 7 | release: 8 | types: [created] 9 | 10 | jobs: 11 | publish-npm: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v2 15 | - uses: actions/setup-node@v1 16 | with: 17 | node-version: 12 18 | registry-url: https://registry.npmjs.org/ 19 | - run: npm publish 20 | env: 21 | NODE_AUTH_TOKEN: ${{secrets.npm_token}} 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .idea/ 3 | *.log 4 | *.iml 5 | yarn.lock 6 | package-lock.json 7 | node_modules/ 8 | .cache 9 | .history 10 | _bak.yml 11 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .cache/ 2 | .history/ 3 | .github/ 4 | _bak.yml -------------------------------------------------------------------------------- /.stylintrc: -------------------------------------------------------------------------------- 1 | { 2 | "blocks": false, 3 | "brackets": "never", 4 | "colons": false, 5 | "colors": "never", 6 | "commaSpace": false, 7 | "commentSpace": "never", 8 | "cssLiteral": "never", 9 | "customProperties": [], 10 | "depthLimit": false, 11 | "duplicates": false, 12 | "efficient": false, 13 | "exclude": [], 14 | "extendPref": false, 15 | "globalDupe": false, 16 | "groupOutputByFile": false, 17 | "indentPref": false, 18 | "leadingZero": "never", 19 | "maxErrors": false, 20 | "maxWarnings": false, 21 | "mixed": false, 22 | "mixins": [], 23 | "namingConvention": "lowercase-dash", 24 | "namingConventionStrict": false, 25 | "none": "never", 26 | "noImportant": false, 27 | "parenSpace": false, 28 | "placeholders": "always", 29 | "prefixVarsWithDollar": "always", 30 | "quotePref": false, 31 | "reporterOptions": { 32 | "columns": ["lineData", "severity", "description", "rule"], 33 | "columnSplitter": " ", 34 | "showHeaders": false, 35 | "truncate": false 36 | }, 37 | "semicolons": "never", 38 | "sortOrder": "never", 39 | "stackedProperties": false, 40 | "trailingWhitespace": "never", 41 | "universal": false, 42 | "valid": false, 43 | "zeroUnits": "never", 44 | "zIndexNormalize": false 45 | } -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: node 4 | 5 | cache: 6 | npm: true 7 | 8 | install: npm install 9 | 10 | script: npm run test -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The Star And Thank Author License (SATA) 2 | 3 | Copyright © 2019 Shen-Yu(shenyu@hotmail.com) 4 | 5 | Project Url: https://github.com/Shen-Yu/hexo-theme-ayer 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | And wait, the most important, you shall star/+1/like the project(s) in project url 18 | section above first, and then thank the author(s) in Copyright section. 19 | 20 | Here are some suggested ways: 21 | 22 | - Email the authors a thank-you letter, and make friends with him/her/them. 23 | - Report bugs or issues. 24 | - Tell friends what a wonderful project this is. 25 | - And, sure, you can just express thanks in your mind without telling the world. 26 | 27 | Contributors of this project by forking have the option to add his/her name and 28 | forked project url at copyright and project url sections, but shall not delete 29 | or modify anything else in these two sections. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 37 | THE SOFTWARE. -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # 侧边栏菜单 2 | menu: 3 | 主页: / 4 | 归档: /archives 5 | 分类: /categories 6 | 标签: /tags 7 | 旅行: /tags/旅行/ 8 | 摄影: http://shenyu-vip.lofter.com 9 | 友链: /friends 10 | 关于我: /2019/about 11 | 12 | # 站点次标题和打字动效 13 | # https://github.com/mattboldt/typed.js 14 | subtitle: 15 | enable: true # 是否开启动效 16 | text: 面朝大海,春暖花开 # 显示的文字 17 | text2: 愿你一生努力,一生被爱 # 滚动播放,如果不需要可以留空 18 | text3: 想要的都拥有,得不到的都释怀 # 最多支持三段文字 19 | startDelay: 0 # 延迟时间 20 | typeSpeed: 200 # 打字速度 21 | loop: true # 是否循环 22 | backSpeed: 100 # 回退速度 23 | showCursor: true # 是否显示光标 24 | 25 | # 网站图标和侧边栏logo 26 | favicon: /favicon.ico 27 | logo: /images/ayer-side.svg 28 | 29 | # 封面配置 30 | # enable-是否启用封面;path-封面背景图;logo-封面logo 31 | cover: 32 | enable: true 33 | path: /images/cover1.jpg # /source/images目录下附送多张美图,可更换 34 | logo: false #/images/ayer.svg,如果不要直接设置成false 35 | 36 | # 页面顶部进度条 37 | progressBar: true 38 | 39 | # 告示板模块 40 | broadcast: 41 | enable: true # true开启,false关闭 42 | type: 2 # 1:自定义输入,2:一言api(https://hitokoto.cn/) 43 | text: 一个安静优雅的hexo主题,快速且响应式。 # type为1时有效 44 | 45 | # 文章配置 46 | # 文章太长,截断按钮文字(在需要截断的行增加此标记:) 47 | excerpt_link: 阅读更多... 48 | # 如果你嫌每篇文章手动加more标记比较麻烦,又不想在首页全文显示,可以把excerpt_all设置成true,这样首页只会显示文章归档 49 | excerpt_all: false 50 | 51 | # 是否开启代码复制按钮 52 | copy_btn: true 53 | # 是否开启文章分享按钮 54 | share_enable: true 55 | # 国内的社交平台(If you are not in China, maybe you prefer to set:false) 56 | share_china: true 57 | # 文章分享文字 58 | share_text: 分享 59 | 60 | # 分页文字 61 | nav_text: 62 | page_prev: 上一页 63 | page_next: 下一页 64 | post_prev: 上一篇 65 | post_next: 下一篇 66 | 67 | # 文章页是否显示目录 68 | toc: true 69 | 70 | # 文章中的图片是否支持点击放大 71 | image_viewer: true 72 | 73 | # https://github.com/willin/hexo-wordcount 74 | # 是否开启字数统计(关闭请设置enable为false) 75 | # 也可以单独在md文件里Front-matter设置`no_word_count: true`属性,来自定义关闭字数统计 76 | word_count: 77 | enable: true 78 | # 只在文章详情显示(不在首页显示) 79 | only_article_visit: true 80 | 81 | # 打赏 82 | # 打赏type设定:0-关闭打赏; 1-文章对应的md文件里有reward:true属性,才有打赏; 2-所有文章均有打赏 83 | reward_type: 2 84 | # 打赏wording 85 | reward_wording: "请我喝杯咖啡吧~" 86 | # 支付宝二维码图片地址,跟你设置logo的方式一样。比如:/images/alipay.jpg 87 | alipay: /images/alipay.jpg 88 | # 微信二维码图片地址 89 | weixin: /images/wechat.jpg 90 | 91 | # 版权声明 92 | # 版权声明type设定:0-关闭版权声明; 1-文章对应的md文件里有copyright: true属性,才有版权声明; 2-所有文章均有版权声明 93 | copyright_type: 2 94 | 95 | # 是否启用搜索 96 | # 需要安装hexo-generator-searchdb(https://github.com/theme-next/hexo-generator-searchdb) 97 | search: true 98 | 99 | # RSS订阅(先安装hexo-generator-feed插件,再去博客根目录config进行配置) 100 | # 不想显示可以直接留空 101 | rss: /atom.xml 102 | 103 | # 是否启用黑夜模式开关 104 | darkmode: true 105 | 106 | # 动态背景效果: 0-关闭,1-动态线条(跟随鼠标) 107 | canvas_bg: 0 108 | 109 | # 自定义鼠标样式,直接替换/images/mouse.cur文件 110 | mouse: 111 | enable: false 112 | path: /images/mouse.cur 113 | 114 | # 鼠标点击效果:0-关闭,1-爱心,2-爆炸烟花,3-粒子烟花 115 | click_effect: 0 116 | 117 | # 页面宽度自定义(不建议修改,可能造成布局混乱),article_width文章宽度,sidebar_width侧边栏宽度 118 | layout: 119 | article_width: 80rem 120 | sidebar_width: 8rem 121 | 122 | # GitHub Ribbons-封面右上角的forkme,换样式直接在source/images目录下替换forkme图片 123 | github: 124 | # (关闭请设置为false) 125 | enable: true 126 | url: https://github.com/Shen-Yu/hexo-theme-ayer 127 | 128 | # 网易云音乐插件 129 | music: 130 | enable: false 131 | # 播放器尺寸类型(1:小尺寸、2:大尺寸) 132 | type: 1 133 | id: 22707008 # 网易云分享的音乐ID(更换音乐请更改此配置项) 134 | autoPlay: true # 是否开启自动播放 135 | 136 | # 访问量统计(不蒜子) 137 | busuanzi: 138 | enable: true 139 | 140 | # 友盟cnzz统计(url填js代码src链接) 141 | cnzz: 142 | enable: true 143 | url: https://s9.cnzz.com/z_stat.php?id=1278069914&web_id=1278069914 144 | 145 | # Google Analytics 146 | google_analytics: "" 147 | # 百度统计 148 | baidu_analytics: "" 149 | 150 | # Mathjax数学公式 151 | mathjax: false 152 | 153 | # Katex数学公式(allpost设置为false时只有头部设置math:true的文章才开启) 154 | # 需要更换hexo渲染器,npm un hexo-renderer-marked -S && npm i hexo-renderer-markdown-it-katex -S 155 | katex: 156 | enable: false # true 157 | allpost: true 158 | copy_tex: false 159 | 160 | # mermaid流程图 三个选项缺一不可(https://mermaid-js.github.io/mermaid/) 161 | mermaid: 162 | enable: false 163 | cdn: https://cdn.staticfile.org/mermaid/8.14.0/mermaid.min.js 164 | theme: forest 165 | 166 | # 网站成立年份(默认为 2019,若填入年份小于当前年份,则显示为 2018-2019 类似的格式) 167 | since: 2015 168 | 169 | # ICP备案信息尾部显示 170 | icp: 171 | enable: false 172 | url: "https://beian.miit.gov.cn/" # 备案链接 173 | text: "浙ICP备88888888" # 备案信息 174 | # 公安备案信息尾部显示 175 | gongan: 176 | enable: false 177 | img: /images/beian.png #公安备案图片 178 | url: "http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=01234567890123" #公安备案链接 179 | text: "浙公网安备01234567890123号" #公安备案信息 180 | 181 | # 友情链接 182 | friends_link: 183 | Ayer主题: #网站名称 184 | #网站地址 185 | url: https://github.com/Shen-Yu/hexo-theme-ayer 186 | #网站图片(可忽略不写) 187 | img: /images/ayer.png 188 | GitHub: 189 | url: https://github.com/Shen-Yu 190 | img: /images/github.png 191 | 码云: 192 | url: https://gitee.com/shen-yu 193 | img: /images/gitee.png 194 | Hexo官网: 195 | url: https://hexo.io 196 | img: /images/hexo.png 197 | Hexo图表插件: 198 | url: https://github.com/Shen-Yu/hexo-tag-chart 199 | img: /images/hexo-tag-chart.png 200 | 201 | # 评论:1、Valine(推荐);2、Gitalk;3、Twikoo; 202 | 203 | # 1、Valine[一款快速、简洁且高效的无后端评论系统](https://github.com/xCss/Valine) 204 | # 启用Valine必须先创建leancloud应用, 获取 id|key 填入即可 205 | leancloud: 206 | enable: false 207 | app_id: # 208 | app_key: # 209 | # Valine配置 210 | valine: 211 | enable: false # 是否启用 212 | avatar: monsterid # 头像样式(https://valine.js.org/avatar.html) 213 | placeholder: 给我的文章加点评论吧~ # placeholder 214 | 215 | # 2、Gitalk(https://github.com/gitalk/gitalk) 216 | gitalk: 217 | enable: false # true 218 | clientID: # GitHub Application Client ID 219 | clientSecret: # Client Secret 220 | repo: # Repository name 221 | owner: # GitHub ID 222 | admin: # GitHub ID 223 | 224 | # 3、Twikoo(https://github.com/imaegoo/twikoo) 225 | twikoo: 226 | enable: true 227 | envId: # 228 | 229 | # 首页广告配置 230 | # 可以根据需要自行增加ad_3,ad_4...,留空则不显示,建议图片和url不要带ad等关键词,否则可能会被adblock等插件屏蔽 231 | ads: 232 | ad_1: 233 | title: 云服务器限时秒杀 234 | img: https://pic.imgdb.cn/item/62174b452ab3f51d912a5ccc.jpg 235 | url: https://curl.qcloud.com/kvO7hb43 236 | width: 300 237 | ad_2: 238 | title: vultr优惠vps 239 | img: https://pic.imgdb.cn/item/62174b452ab3f51d912a5cd7.png 240 | url: https://www.vultr.com/?ref=8630075 241 | width: 300 242 | 243 | # 网站开启加密访问,密码可设置任何字符 244 | lock: 245 | enable: false 246 | password: 123456 247 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | // 这个文件用来防止 hexo 5.0.0以上 使用 "hexo clean" 命令报错。 2 | // This file is used to prevent hexo above 5.0.0 from using "hexo clean" command error. -------------------------------------------------------------------------------- /languages/de.yml: -------------------------------------------------------------------------------- 1 | categories: Kategorien 2 | search: Suche 3 | tags: Tags 4 | tagcloud: Tag Cloud 5 | tweets: Tweets 6 | prev: zurück 7 | next: weiter 8 | comment: Kommentare 9 | archive_a: Archiv 10 | archive_b: "Archive: %s" 11 | page: Seite %d 12 | recent_posts: letzter Beitrag 13 | newer: Neuer 14 | older: Älter 15 | share: Teilen 16 | powered_by: Powered by %s 17 | theme: Theme - %s 18 | rss_feed: RSS Feed 19 | category: Kategorie 20 | tag: Tag 21 | site_visitors: Visitors 22 | page_views: Views 23 | friends: Freunde 24 | 25 | post: 26 | word_count: Wortzahl 27 | read_time: Lesezeit 28 | minutes: Minuten 29 | reward: Belohnung 30 | sticky: Oben 31 | copyright_title: Copyright-Hinweis 32 | copyright_content: Sofern nicht anders angegeben, liegt das Urheberrecht aller Artikel in diesem Blog beim Autor. Nachdruck bitte Quelle angeben! 33 | 34 | lock: 35 | lock_info: Please enter password 36 | lock_error: Incorrect password, please try again 37 | confirm_text: Ok 38 | cancel_text: Cancel 39 | -------------------------------------------------------------------------------- /languages/default.yml: -------------------------------------------------------------------------------- 1 | categories: Categories 2 | search: Search 3 | tags: Tags 4 | tagcloud: Tag Cloud 5 | tweets: Tweets 6 | prev: Prev 7 | next: Next 8 | comment: Comments 9 | archive_a: Archives 10 | archive_b: "Archives: %s" 11 | page: Page %d 12 | recent_posts: Recent Posts 13 | newer: Newer 14 | older: Older 15 | share: Share 16 | powered_by: Powered by %s 17 | theme: Theme - %s 18 | rss_feed: RSS Feed 19 | category: Category 20 | tag: Tag 21 | site_visitors: Visitors 22 | page_views: Views 23 | friends: Friends 24 | 25 | post: 26 | word_count: Word count 27 | read_time: Reading time 28 | minutes: min 29 | reward: Donate 30 | sticky: Sticky 31 | copyright_title: Copyright 32 | copyright_content: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source. 33 | 34 | lock: 35 | lock_info: Please enter password 36 | lock_error: Incorrect password, please try again 37 | confirm_text: Ok 38 | cancel_text: Cancel 39 | -------------------------------------------------------------------------------- /languages/en.yml: -------------------------------------------------------------------------------- 1 | categories: Categories 2 | search: Search 3 | tags: Tags 4 | tagcloud: Tag Cloud 5 | tweets: Tweets 6 | prev: Prev 7 | next: Next 8 | comment: Comments 9 | archive_a: Archives 10 | archive_b: "Archives: %s" 11 | page: Page %d 12 | recent_posts: Recent Posts 13 | newer: Newer 14 | older: Older 15 | share: Share 16 | powered_by: Powered by %s 17 | theme: Theme - %s 18 | rss_feed: RSS Feed 19 | category: Category 20 | tag: Tag 21 | site_visitors: Visitors 22 | page_views: Views 23 | friends: Friends 24 | 25 | post: 26 | word_count: Word count 27 | read_time: Reading time 28 | minutes: min 29 | reward: Donate 30 | sticky: Sticky 31 | copyright_title: Copyright 32 | copyright_content: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source. 33 | 34 | lock: 35 | lock_info: Please enter password 36 | lock_error: Incorrect password, please try again 37 | confirm_text: Ok 38 | cancel_text: Cancel 39 | -------------------------------------------------------------------------------- /languages/es.yml: -------------------------------------------------------------------------------- 1 | categories: Categorías 2 | search: Buscar 3 | tags: Tags 4 | tagcloud: Nube de Tags 5 | tweets: Tweets 6 | prev: Previo 7 | next: Siguiente 8 | comment: Comentarios 9 | archive_a: Archivos 10 | archive_b: "Archivos: %s" 11 | page: Página %d 12 | recent_posts: Posts recientes 13 | newer: Nuevo 14 | older: Viejo 15 | share: Compartir 16 | powered_by: Powered by %s 17 | theme: Theme - %s 18 | rss_feed: RSS 19 | category: Categoría 20 | tag: Tag 21 | site_visitors: Visitors 22 | page_views: Views 23 | friends: Amigos 24 | 25 | post: 26 | word_count: El recuento de palabras 27 | read_time: Tiempo de lectura 28 | minutes: minutos 29 | reward: Recompensa 30 | sticky: Arriba 31 | copyright_title: Derechos de autor 32 | copyright_content: Los derechos de autor son propiedad del autor. Para reimpresiones comerciales, comuníquese con el autor para obtener autorización. Para reimpresiones no comerciales, indique la fuente. 33 | 34 | lock: 35 | lock_info: Please enter password 36 | lock_error: Incorrect password, please try again 37 | confirm_text: Ok 38 | cancel_text: Cancel 39 | -------------------------------------------------------------------------------- /languages/fr.yml: -------------------------------------------------------------------------------- 1 | categories: Catégories 2 | search: Rechercher 3 | tags: Mot-clés 4 | tagcloud: Nuage de mot-clés 5 | tweets: Tweets 6 | prev: Précédent 7 | next: Suivant 8 | comment: Commentaires 9 | archive_a: Archives 10 | archive_b: "Archives: %s" 11 | page: Page %d 12 | recent_posts: Articles récents 13 | newer: Récent 14 | older: Ancien 15 | share: Partager 16 | powered_by: Powered by %s 17 | theme: Theme - %s 18 | rss_feed: Flux RSS 19 | category: Catégorie 20 | tag: Mot-clé 21 | site_visitors: Visitors 22 | page_views: Views 23 | friends: Mes amis 24 | 25 | post: 26 | word_count: Nombre de mots 27 | read_time: Temps de lecture 28 | minutes: min 29 | reward: Récompense 30 | sticky: Haut 31 | copyright_title: Avis de copyright 32 | copyright_content: Le droit d'auteur appartient à l'auteur. Pour les réimpressions commerciales, veuillez contacter l'auteur pour autorisation. Pour les réimpressions non commerciales, veuillez indiquer la source. 33 | 34 | lock: 35 | lock_info: Please enter password 36 | lock_error: Incorrect password, please try again 37 | confirm_text: Ok 38 | cancel_text: Cancel 39 | -------------------------------------------------------------------------------- /languages/ja.yml: -------------------------------------------------------------------------------- 1 | categories: カテゴリ 2 | search: 検索 3 | tags: タグ 4 | tagcloud: タグクラウド 5 | tweets: ツイート 6 | prev: 戻る 7 | next: 次へ 8 | comment: コメント 9 | archive_a: アーカイブ 10 | archive_b: "アーカイブ: %s" 11 | page: ページ %d 12 | recent_posts: 最近の投稿 13 | newer: 次の記事 14 | older: 前の記事 15 | share: 共有 16 | powered_by: Powered by %s 17 | theme: Theme - %s 18 | rss_feed: RSSフィード 19 | category: カテゴリ 20 | tag: タグ 21 | site_visitors: Visitors 22 | page_views: Views 23 | friends: 友達 24 | 25 | post: 26 | word_count: 単語数 27 | read_time: 読書の時間 28 | minutes: 分 29 | reward: 報酬 30 | sticky: 上へ 31 | copyright_title: 著作権表示 32 | copyright_content: 著作権は著者が所有しています。商業版の複製については、承認について著者に連絡してください。非商業版の複製については、出典を明記してください。 33 | 34 | lock: 35 | lock_info: Please enter password 36 | lock_error: Incorrect password, please try again 37 | confirm_text: Ok 38 | cancel_text: Cancel 39 | -------------------------------------------------------------------------------- /languages/ko.yml: -------------------------------------------------------------------------------- 1 | categories: 카테고리 2 | search: 검색 3 | tags: 태그 4 | tagcloud: 태그 클라우드 5 | tweets: 트윗 6 | prev: 이전 7 | next: 다음 8 | comment: 댓글 9 | archive_a: 아카이브 10 | archive_b: "아카이브: %s" 11 | page: 페이지 %d 12 | recent_posts: 최근 포스트 13 | newer: 최신 14 | older: 이전 15 | share: 공유 16 | powered_by: Powered by %s 17 | theme: Theme - %s 18 | rss_feed: RSS Feed 19 | category: 카테고리 20 | tag: 태그 21 | site_visitors: Visitors 22 | page_views: Views 23 | friends: 친구 들 24 | 25 | post: 26 | word_count: 단어 수 27 | read_time: 독서 시간 28 | minutes: 분 29 | reward: 보상 30 | sticky: 톱 31 | copyright_title: 저작권 고지 32 | copyright_content: 저작권은 저자가 소유합니다. 상업용 재 인쇄의 경우 승인을 위해 저자에게 문의하십시오. 비상업적 재 인쇄의 경우 출처를 명시하십시오. 33 | 34 | lock: 35 | lock_info: Please enter password 36 | lock_error: Incorrect password, please try again 37 | confirm_text: Ok 38 | cancel_text: Cancel 39 | -------------------------------------------------------------------------------- /languages/nl.yml: -------------------------------------------------------------------------------- 1 | categories: Categorieën 2 | search: Zoeken 3 | tags: Labels 4 | tagcloud: Tag Cloud 5 | tweets: Tweets 6 | prev: Vorige 7 | next: Volgende 8 | comment: Commentaren 9 | archive_a: Archieven 10 | archive_b: "Archieven: %s" 11 | page: Pagina %d 12 | recent_posts: Recente berichten 13 | newer: Nieuwer 14 | older: Ouder 15 | share: Delen 16 | powered_by: Powered by %s 17 | theme: Theme - %s 18 | rss_feed: RSS Feed 19 | category: Categorie 20 | tag: Label 21 | site_visitors: Visitors 22 | page_views: Views 23 | friends: Vrienden 24 | 25 | post: 26 | word_count: Aantal woorden in artikel 27 | read_time: Leestijd 28 | minutes: min 29 | reward: Doneer 30 | sticky: Sticky 31 | copyright_title: Copyright melding 32 | copyright_content: Copyright is eigendom van de auteur. Neem voor commerciële herdrukken contact op met de auteur voor autorisatie. Geef de bron aan voor niet-commerciële herdrukken. 33 | 34 | lock: 35 | lock_info: Please enter password 36 | lock_error: Incorrect password, please try again 37 | confirm_text: Ok 38 | cancel_text: Cancel 39 | -------------------------------------------------------------------------------- /languages/no.yml: -------------------------------------------------------------------------------- 1 | categories: Kategorier 2 | search: Søk 3 | tags: Tags 4 | tagcloud: Tag Cloud 5 | tweets: Tweets 6 | prev: Forrige 7 | next: Neste 8 | comment: Kommentarer 9 | archive_a: Arkiv 10 | archive_b: "Arkiv: %s" 11 | page: Side %d 12 | recent_posts: Siste innlegg 13 | newer: Newer 14 | older: Older 15 | share: Share 16 | powered_by: Powered by %s 17 | theme: Theme - %s 18 | rss_feed: RSS Feed 19 | category: Category 20 | tag: Tag 21 | site_visitors: Visitors 22 | page_views: Views 23 | friends: Venner 24 | 25 | post: 26 | word_count: Ordtelling 27 | read_time: Lesetid 28 | minutes: min 29 | reward: Donere 30 | sticky: Sticky 31 | copyright_title: Opphavsrett 32 | copyright_content: Opphavsrett eies av forfatteren. For kommersielle opptrykk, vennligst kontakt forfatteren for godkjenning. For ikke-kommersiell uttrykk, vennligst oppgi kilden. 33 | 34 | lock: 35 | lock_info: Please enter password 36 | lock_error: Incorrect password, please try again 37 | confirm_text: Ok 38 | cancel_text: Cancel 39 | -------------------------------------------------------------------------------- /languages/pt.yml: -------------------------------------------------------------------------------- 1 | categories: Categorias 2 | search: Buscar 3 | tags: Tags 4 | tagcloud: Nuvem de Tags 5 | tweets: Tweets 6 | prev: Anterior 7 | next: Próximo 8 | comment: Comentários 9 | archive_a: Arquivos 10 | archive_b: "Arquivos: %s" 11 | page: Página %d 12 | recent_posts: Postagens Recentes 13 | newer: Mais Recente 14 | older: Mais Antigo 15 | share: Compartilhar 16 | powered_by: Powered by %s 17 | theme: Theme - %s 18 | rss_feed: Feed RSS 19 | category: Categoria 20 | tag: Tag 21 | site_visitors: Visitors 22 | page_views: Views 23 | friends: Amigos 24 | 25 | post: 26 | word_count: Word count 27 | read_time: Reading time 28 | minutes: min 29 | reward: Donate 30 | sticky: Sticky 31 | copyright_title: direito autoral 32 | copyright_content: Os direitos autorais são de propriedade do autor. Para reimpressões comerciais, entre em contato com o autor para obter autorização. Para reimpressões não comerciais, indique a fonte. 33 | 34 | lock: 35 | lock_info: Please enter password 36 | lock_error: Incorrect password, please try again 37 | confirm_text: Ok 38 | cancel_text: Cancel 39 | -------------------------------------------------------------------------------- /languages/ru.yml: -------------------------------------------------------------------------------- 1 | categories: Категории 2 | search: Поиск 3 | tags: Метки 4 | tagcloud: Облако меток 5 | tweets: Твиты 6 | prev: Назад 7 | next: Вперед 8 | comment: Комментарии 9 | archive_a: Архив 10 | archive_b: "Архив: %s" 11 | page: Страница %d 12 | recent_posts: Недавние записи 13 | newer: Следующий 14 | older: Предыдущий 15 | share: Поделиться 16 | powered_by: Powered by %s 17 | theme: Theme - %s 18 | rss_feed: RSS-каналы 19 | category: Категория 20 | tag: Метка 21 | site_visitors: Visitors 22 | page_views: Views 23 | friends: друзья 24 | 25 | post: 26 | word_count: Количество слов 27 | read_time: Время чтения 28 | minutes: минут 29 | reward: вознаграждение 30 | sticky: липкий 31 | copyright_title: Авторские права 32 | copyright_content: Авторские права принадлежат автору. Для коммерческих перепечаток, пожалуйста, свяжитесь с автором для авторизации. Для некоммерческих перепечаток, пожалуйста, укажите источник. 33 | 34 | lock: 35 | lock_info: Please enter password 36 | lock_error: Incorrect password, please try again 37 | confirm_text: Ok 38 | cancel_text: Cancel 39 | -------------------------------------------------------------------------------- /languages/vi.yml: -------------------------------------------------------------------------------- 1 | categories: Thể loại 2 | search: Tìm Kiếm 3 | tags: thẻ 4 | tagcloud: thẻ đám mây 5 | tweets: Tweets 6 | prev: trước 7 | next: kế tiếp 8 | comment: bình luận 9 | archive_a: Archives 10 | archive_b: "Archives: %s" 11 | page: Page %d 12 | recent_posts: Bài viết gần đây 13 | newer: mới hơn 14 | older: lớn hơn 15 | share: chia sẻ 16 | powered_by: Powered by %s 17 | theme: Theme - %s 18 | rss_feed: RSS Feed 19 | category: Thể loại 20 | tag: thẻ 21 | site_visitors: Visitors 22 | page_views: Views 23 | friends: Bạn 24 | 25 | post: 26 | word_count: Đếm từ 27 | read_time: Thời gian đọc 28 | minutes: min 29 | reward: tặng 30 | sticky: dính 31 | copyright_title: Bản quyền 32 | copyright_content: Bản quyền thuộc sở hữu của tác giả. Đối với tái bản thương mại, xin vui lòng liên hệ với tác giả cho phép. Đối với tái bản phi thương mại, xin vui lòng cho biết nguồn. 33 | 34 | lock: 35 | lock_info: Please enter password 36 | lock_error: Incorrect password, please try again 37 | confirm_text: Ok 38 | cancel_text: Cancel 39 | -------------------------------------------------------------------------------- /languages/zh-CN.yml: -------------------------------------------------------------------------------- 1 | categories: 分类 2 | search: 搜索 3 | tags: 标签 4 | tagcloud: 标签云 5 | tweets: 推文 6 | prev: 上一页 7 | next: 下一页 8 | comment: 留言 9 | archive_a: 归档 10 | archive_b: 归档:%s 11 | page: 第 %d 页 12 | recent_posts: 最新文章 13 | newer: Newer 14 | older: Older 15 | share: 分享 16 | powered_by: 由 %s 强力驱动 17 | theme: 主题 - %s 18 | rss_feed: RSS Feed 19 | category: Category 20 | tag: Tag 21 | site_visitors: 访问人数 22 | page_views: 浏览次数 23 | friends: 友情链接 24 | 25 | post: 26 | word_count: 字数统计 27 | read_time: 阅读时长 28 | minutes: 分钟 29 | reward: 打赏 30 | sticky: 置顶 31 | copyright_title: 版权声明 32 | copyright_content: 本博客所有文章除特别声明外,著作权归作者所有。转载请注明出处! 33 | 34 | lock: 35 | lock_info: 请输入访问密码 36 | lock_error: 密码错误,请重试 37 | confirm_text: 确定 38 | cancel_text: 取消 39 | -------------------------------------------------------------------------------- /languages/zh-TW.yml: -------------------------------------------------------------------------------- 1 | categories: 分類 2 | search: 搜尋 3 | tags: 標籤 4 | tagcloud: 標籤雲 5 | tweets: 推文 6 | prev: 上一頁 7 | next: 下一頁 8 | comment: 留言 9 | archive_a: 彙整 10 | archive_b: 彙整:%s 11 | page: 第 %d 頁 12 | recent_posts: 最新文章 13 | newer: Newer 14 | older: Older 15 | share: Share 16 | powered_by: Powered by %s 17 | theme: Theme - %s 18 | rss_feed: RSS Feed 19 | category: Category 20 | tag: Tag 21 | site_visitors: Visitors 22 | page_views: Views 23 | friends: 友情鏈接 24 | 25 | post: 26 | word_count: 字數統計 27 | read_time: 閱讀時長 28 | minutes: 分鐘 29 | reward: 打賞 30 | sticky: 置頂 31 | copyright_title: 版權聲明 32 | copyright_content: 本博客所有文章除特別聲明外,著作權歸作者所有。轉載請註明出處! 33 | 34 | lock: 35 | lock_info: 請輸入訪問密碼 36 | lock_error: 密碼錯誤,請重試 37 | confirm_text: 確定 38 | cancel_text: 取消 39 | -------------------------------------------------------------------------------- /layout/_partial/ads.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layout/_partial/after-footer.ejs: -------------------------------------------------------------------------------- 1 | <%- js('/js/jquery-3.6.0.min') %> <%- js('/js/lazyload.min') %> 2 | 3 | <% if (theme.toc && is_post() && !page.no_toc){ %> <%- js('/js/tocbot.min') %> 4 | 17 | <% } %> 18 | 19 | 23 | 24 | <%- js('dist/main') %> 25 | 26 | <% if (theme.image_viewer){ %> <%- partial('viewer') %> <% } %> 27 | 28 | <% if (theme.mathjax){ %> <%- partial('mathjax') %> 29 | 34 | <% } %> 35 | 36 | <% if (theme.katex.enable){ %> <%- partial('katex') %> <% } %> 37 | 38 | <% if (theme.busuanzi && theme.busuanzi.enable){ %> <%- 39 | js('/js/busuanzi-2.3.pure.min') %> <% } %> 40 | 41 | <% if (theme.click_effect===1){ %> <%- js('/js/clickLove') %> <% } %> 42 | 43 | <% if (theme.click_effect===2){ %> 44 | 45 | <%- js('/js/clickBoom1') %> <% } %> 46 | 47 | <% if (theme.click_effect===3){ %> <%- js('/js/clickBoom2') %> <% } %> 48 | 49 | <% if (theme.copy_btn == true) { %> <%- css('/css/clipboard') %> <%- 50 | partial('post/clipboard') %> <% } %> 51 | 52 | <% if (theme.canvas_bg == 1) { %> <%- js('/js/dz') %> <% } %> 53 | 58 | -------------------------------------------------------------------------------- /layout/_partial/archive-post.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | <%- partial('post/date', {class_name: 'archive-article-date', date_format: 'MM/DD'}) %> 5 | <%- partial('post/title', {class_name: 'archive-article-title'}) %> 6 |
7 | <% if(page.category){ %> 8 | <%- partial('post/category') %> 9 | <% } %> 10 | <% if(page.tag){ %> 11 | <%- partial('post/tag') %> 12 | <% } %> 13 |
14 |
-------------------------------------------------------------------------------- /layout/_partial/archive.ejs: -------------------------------------------------------------------------------- 1 |
2 | <% if (theme.ads && theme.ads.length != 0){ %> 3 | <%- partial('ads') %> 4 | <% } %> 5 | <% if (theme.broadcast.enable && pagination == 2){ %> 6 | <%- partial('_partial/broadcast') %> 7 | <% } %> 8 |
9 | <% 10 | var title = ''; 11 | if (page.category) title = page.category; 12 | if (page.tag) title = "#" + " " + page.tag; 13 | if (page.archive) { 14 | if (page.year) title = page.year + (page.month ? '/' + page.month : ''); 15 | else title = __('archive_a'); 16 | } 17 | %> 18 | <% if (pagination !== 2){ %> 19 |

<%- title %>

20 | <% } %> 21 | <% if (pagination == 2){ %> 22 | <% page.posts.each(function(post){ %> 23 | <%- partial('article', {post: post, index: true}) %> 24 | <% }) %> 25 |
26 | <% } else { %> 27 | <% var last; %> 28 | <% page.posts.each(function(post, i){ %> 29 | <% var year = post.date.year(); %> 30 | <% if (last != year){ %> 31 | <% if (last != null){ %> 32 | 33 | 34 | <% } %> 35 | <% last = year; %> 36 |
37 |
38 | <%= year %> 39 |
40 |
41 | <% } %> 42 | <%- partial('archive-post', {post: post, even: i % 2 == 0}) %> 43 | <% }) %> 44 | <% if (page.posts.length){ %> 45 |
46 |
47 | <% } %> 48 | <% } %> 49 | 50 | <% if (page.total > 1){ %> 51 | 61 | <% } %> 62 |
-------------------------------------------------------------------------------- /layout/_partial/article.ejs: -------------------------------------------------------------------------------- 1 |
8 |
9 | <% if (post.link || post.title){ %> 10 |
11 | <%- partial('post/title', {class_name: 'article-title'}) %> 12 | <%- partial('post/author', {class_name: 'article-author'}) %> 13 |
14 | <% } %> <% if (index || is_post()) { %> 15 | 21 | <% } %> <% if (theme.toc && is_post()){ %> <%- partial('post/tocbot') %> <% 22 | } %> <% if (theme.excerpt_all&&index){ %> <% }else{ %> 23 |
24 | <%- partial('post/justifiedGallery') %> <%- partial('post/gallery') %> <% 25 | if (post.excerpt && index){ %> <%- post.excerpt %> <% if 26 | (theme.excerpt_link){ %> 27 | <%= theme.excerpt_link %> 30 | <% } %> <% } else { %> <%- post.content %> <% } %> 31 | 32 | <% if ((theme.reward_type === 2 || (theme.reward_type === 1 && 33 | post.reward)) && !index && !post.no_reward){ %> 34 |
35 |
36 | <%= __('post.reward') %> 37 |
38 |
39 | <% } %> 40 |
41 | <% } %> 42 | 43 | 44 | <% if (((theme.copyright_type === 2) || (theme.copyright_type === 1 && 45 | post.copyright)) && !index){ %> 46 |
47 |
    48 |
  • 49 | 50 | <%= __('post.copyright_title') %>: 51 | <% if (post.copyright_content) { %> 52 | <%= post.copyright_content %> 53 | <% } else { %> 54 | <%= __('post.copyright_content') %> 55 | <% } %> 56 |
  • 57 |
58 |
59 | <% } %> 60 | 64 |
65 | 66 | <% if (!index){ %> <%- partial('post/nav') %> <% } %> <% if (theme.valine && 67 | theme.valine.enable && !post.no_valine){ %> <%- partial('post/valine', { key: 68 | post.slug, title: post.title, url: config.url+url_for(post.path) }) %> <% } %> 69 | <% if (is_post()) { %> <%- partial('post/gitalk') %> <% } %> 70 | <% if (is_post()) { %> <%- partial('post/twikoo') %> <% } %> 71 |
72 | -------------------------------------------------------------------------------- /layout/_partial/ayer.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.cover.enable) { %> 2 |
3 | <% if (theme.github.enable && theme.github.url){ %> 4 | <%# "GitHub Ribbons" %> 5 | Fork me on GitHub 8 | <% } %> 9 |
10 |
11 | image frame 12 |
13 |
14 |

<%= config.title %>

15 |
16 | <% if (theme.subtitle.enable) { %> 17 | 18 | <% }else{ %> 19 | <%= theme.subtitle.text %> 20 | <% } %> 21 |
22 |
23 | <% if (theme.cover.logo) { %> 24 | 29 | <% } %> 30 |
31 |
32 |
33 |
34 | 35 |
36 |
37 | <% } %> 38 | 39 | <% if (theme.subtitle.enable){ %> 40 | 41 | <% } %> 42 | 43 | 44 | <% if (theme.subtitle.enable){ %> 45 | 59 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/baidu-analytics.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.baidu_analytics){ %> 2 | 11 | <% } %> 12 | -------------------------------------------------------------------------------- /layout/_partial/broadcast.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.broadcast.type===1 && theme.broadcast.text){ %> 2 |
3 | 4 |
<%= theme.broadcast.text %>
5 |
6 | <% } %> 7 | <% if (theme.broadcast.type===2){ %> 8 |
9 | 10 |
11 |
12 | 20 | <% } %> 21 | -------------------------------------------------------------------------------- /layout/_partial/float-btns.ejs: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | <% if (theme.darkmode){ %> 5 |
6 | 7 |
8 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/footer.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layout/_partial/google-analytics.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.google_analytics){ %> 2 | 3 | 4 | 10 | <% } %> 11 | -------------------------------------------------------------------------------- /layout/_partial/head.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% if (config.language){ %> 4 | 5 | <% } else { %> 6 | 7 | <% }%> 8 | 9 | 10 | 11 | <% var title = page.title; if (is_archive()) { title = __('archive_a'); if 12 | (is_month()) { title += ': ' + page.year + '/' + page.month; } else if 13 | (is_year()) { title += ': ' + page.year; } } else if (is_category()) { 14 | title = page.category; } else if (is_tag()) { title = __('tag') + ': ' + 15 | page.tag; } %> <% if (page.keywords){ %> 16 | 20 | <% } else if (config.keywords){ %> 21 | 22 | <% } %> <% if (page.description){ %> 23 | 24 | <% } else if (config.description){ %> 25 | 26 | <% } %> 27 | 31 | <% if (title){ %><%= title %> | <% } %> <%= config.title %> 32 | <% if (theme.favicon){ %> 33 | 34 | <% } %> <%- css('dist/main') %> 35 | <%- css('css/fonts/remixicon') %> 36 | <%- css('css/custom') %> <% if (theme.progressBar){ %> 37 | 38 | <% } %> <%- partial('google-analytics') %> <%- partial('baidu-analytics') 39 | %> 40 | 44 | 45 | 46 | 47 | <% if (theme.mermaid.enable) { %> 48 | 49 | <% } %> 50 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /layout/_partial/katex.ejs: -------------------------------------------------------------------------------- 1 | <% if ( theme.katex.enable ) { %> 2 | <% if( theme.katex.allpost || page.math ) { %> 3 | 4 | 5 | 6 | <% if ( theme.katex.copy_tex ) { %> 7 | 8 | 9 | <% } %> 10 | <% } %> 11 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/lock.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.lock.enable){ %> 2 | 37 | <% } %> 38 | -------------------------------------------------------------------------------- /layout/_partial/mathjax.ejs: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /layout/_partial/modal.ejs: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |
5 | 6 |

<%= theme.reward_wording%>

7 |
8 | <% if(theme.alipay) {%> 9 |
10 | 11 | 支付宝 12 |
13 | <% } %> 14 | <% if(theme.weixin) {%> 15 |
16 | 17 | 微信 18 |
19 | <% } %> 20 |
21 |
-------------------------------------------------------------------------------- /layout/_partial/music.ejs: -------------------------------------------------------------------------------- 1 |
2 | <%# "bottom:120px; left:auto;position:fixed; width:85%" %> 3 | <% var defaultHeight = theme.music.type == 1 ? '32' : '66'; %> 4 | <% var defaultIframeHeight = theme.music.type == 1 ? '52' : '86'; %> 5 | 7 |
8 | 9 | -------------------------------------------------------------------------------- /layout/_partial/post/albums.ejs: -------------------------------------------------------------------------------- 1 | <% if (post.albums && post.albums.length){ %> 2 |
3 | 16 |
17 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/post/author.ejs: -------------------------------------------------------------------------------- 1 | <% if (post.authors && post.authors.length){ %> 2 |
style="text-align: center" <% }%>> 3 | 作者:<% for (var i = 0; i < post.authors.length - 1; i++) { %> 4 | <%= post.authors[i]%> , 5 | <% }%> <%= post.authors[post.authors.length - 1] %> 6 |
7 | 8 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/post/busuanzi.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%- __('site_visitors') %>: 3 | | 4 | <%- __('page_views') %>: 5 | -------------------------------------------------------------------------------- /layout/_partial/post/category.ejs: -------------------------------------------------------------------------------- 1 | <% if (post.categories && post.categories.length){ %> 2 |
3 | <%- list_categories(post.categories, { 4 | show_count: false, 5 | class: 'article-category', 6 | style: 'none', 7 | separator: ' / ' 8 | }) %> 9 |
10 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/post/clipboard.ejs: -------------------------------------------------------------------------------- 1 | 2 | 55 | -------------------------------------------------------------------------------- /layout/_partial/post/date.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /layout/_partial/post/gallery.ejs: -------------------------------------------------------------------------------- 1 | <% if (post.photos && post.photos.length){ %> 2 |
3 |
4 | <% post.photos.forEach(function(photo, i){ %> 5 | <% if (index){ %> 6 | 7 | 8 | 9 | <% } else { %> 10 | 11 | <% } %> 12 | <% }) %> 13 |
14 |
15 | <% } %> 16 | -------------------------------------------------------------------------------- /layout/_partial/post/gitalk.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.gitalk.enable && post.comments) { %> 2 |
3 | <%- css('https://cdn.staticfile.org/gitalk/1.7.2/gitalk.min.css') %> 4 | <%- js('https://cdn.staticfile.org/gitalk/1.7.2/gitalk.min.js') %> 5 | <%- js('https://cdn.staticfile.org/blueimp-md5/2.19.0/js/md5.min.js') %> 6 | 21 | <% } %> 22 | -------------------------------------------------------------------------------- /layout/_partial/post/justifiedGallery.ejs: -------------------------------------------------------------------------------- 1 | <% if (post.albums && post.albums.length){ %> 2 | 9 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/post/nav.ejs: -------------------------------------------------------------------------------- 1 | <% if (post.prev || post.next){ %> 2 | 22 | <% } %> 23 | -------------------------------------------------------------------------------- /layout/_partial/post/search.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layout/_partial/post/share.ejs: -------------------------------------------------------------------------------- 1 | <% 2 | var sUrl = url.replace(/index\.html$/, ''); 3 | sUrl = /^(http:|https:)\/\//.test(sUrl) ? sUrl : 'http:' + sUrl; 4 | %> 5 |
6 | 7 | 8 | <%- theme.share_text %> 9 | 10 |
11 | 12 | 40 |
41 |
42 | 43 |
44 | 45 |

扫一扫,分享到微信

46 |
47 | 微信分享二维码 48 |
49 |
50 | 51 |
-------------------------------------------------------------------------------- /layout/_partial/post/tag.ejs: -------------------------------------------------------------------------------- 1 | <% if (post.tags && post.tags.length){ %> 2 | <%- list_tags(post.tags, { 3 | show_count: false, 4 | class: 'article-tag' 5 | }) %> 6 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/post/title.ejs: -------------------------------------------------------------------------------- 1 | <% if (post.link){ %> 2 |

3 | 6 |

7 | <% } else if (post.title){ %> <% if (index){ %> 8 |

9 | <%= post.title %><%- partial('topping') %> 11 |

12 | <% } else { %> 13 |

14 | <%= post.title %> 15 |

16 | <% } %> <% } %> 17 | -------------------------------------------------------------------------------- /layout/_partial/post/tocbot.ejs: -------------------------------------------------------------------------------- 1 | <% if (post.toc != false && toc(page.content).length!==0){ %> 2 |
3 | <% } %> 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /layout/_partial/post/topping.ejs: -------------------------------------------------------------------------------- 1 | <% if (is_home() && post.top) { %> 2 | <%= __('post.sticky') %> 3 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/post/twikoo.ejs: -------------------------------------------------------------------------------- 1 | <% if (!index && theme.twikoo && theme.twikoo.enable){ %> 2 | 3 |
4 | 9 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/post/valine.ejs: -------------------------------------------------------------------------------- 1 | <% if (!index && theme.leancloud && theme.leancloud.enable && post.comments){ %> 2 | 3 |
4 |
5 |
6 | 7 | 8 | 25 | 48 | <% } %> 49 | -------------------------------------------------------------------------------- /layout/_partial/post/word.ejs: -------------------------------------------------------------------------------- 1 | <% if (!theme.word_count.only_article_visit || (!index && theme.word_count.only_article_visit)){ %> 2 |
3 | 4 | 9 | 10 | 11 | 12 |   |   13 | 18 | 19 |
20 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/sidebar.ejs: -------------------------------------------------------------------------------- 1 | 2 | 16 | 32 |
33 | <%- partial('post/search') %> 34 |
-------------------------------------------------------------------------------- /layout/_partial/viewer.ejs: -------------------------------------------------------------------------------- 1 | 2 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /layout/archive.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/archive', {pagination: config.archive, index: true}) %> -------------------------------------------------------------------------------- /layout/categories.ejs: -------------------------------------------------------------------------------- 1 |
2 | <% if (site.categories.length){ %> 3 |

<%= __('categories') %>

4 |
5 | <%- list_categories() %> 6 |
7 | <% } %> 8 |
-------------------------------------------------------------------------------- /layout/friends.ejs: -------------------------------------------------------------------------------- 1 |
2 | <% if(theme.friends_link && theme.friends_link.length != 0){ %> 3 |

<%= __('friends') %>

4 | 19 | <%}%> 20 |
-------------------------------------------------------------------------------- /layout/index.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/ayer') %> 2 |
3 | <%- partial('_partial/archive', {pagination: 2, index: true}) %> 4 |
5 | -------------------------------------------------------------------------------- /layout/layout.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/head') %> 2 | 3 | 4 |
5 | <% if (theme.click_effect===2){ %> 6 | 7 | 16 | <% } %> 17 | <% if (theme.click_effect===3){ %> 18 | 20 | <% } %> 21 |
22 | <%- body %> 23 | <%- partial('_partial/footer', null, {cache: !config.relative_link}) %> 24 |
25 |
26 | <%- partial('_partial/float-btns') %> 27 |
28 | 31 | <%- partial('_partial/modal') %> 32 | <%- partial('_partial/after-footer') %> 33 | 34 | <% if (theme.music&&theme.music.enable){ %> 35 | <%- partial('_partial/music') %> 36 | <% } %> 37 | <%- partial('_partial/lock') %> 38 |
39 | 40 | 41 | -------------------------------------------------------------------------------- /layout/page.ejs: -------------------------------------------------------------------------------- 1 |
2 | <%- partial('_partial/article', {post: page, index: false}) %> 3 |
-------------------------------------------------------------------------------- /layout/plain-page.ejs: -------------------------------------------------------------------------------- 1 |
2 |

<%= page.title %>

3 | <%- page.content %> 4 |
5 | -------------------------------------------------------------------------------- /layout/post.ejs: -------------------------------------------------------------------------------- 1 |
2 | <%- partial('_partial/article', {post: page, index: false}) %> 3 |
-------------------------------------------------------------------------------- /layout/tags.ejs: -------------------------------------------------------------------------------- 1 |
2 | <% if (site.tags.length){ %> 3 |

<%= __('tags') %>

4 | <%- list_tags({show_count: theme.show_count}) %> 5 | <% } %> 6 |
7 | 8 | -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/logo.png -------------------------------------------------------------------------------- /move_config.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | 3 | if (fs.existsSync('../hexo/package.json')) { 4 | const version = JSON.parse(fs.readFileSync('../hexo/package.json')).version 5 | if (version.split('.')[0] === '5') { 6 | const configPath = '../../_config.ayer.yml' 7 | if (!fs.existsSync(configPath)) { 8 | fs.writeFileSync(configPath, fs.readFileSync('./_config.yml')) 9 | } 10 | fs.unlinkSync('./_config.yml') 11 | } 12 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hexo-theme-ayer", 3 | "version": "1.9.7-0", 4 | "description": "a clean and elegant theme for hexo.", 5 | "scripts": { 6 | "dev": "rollup -c -w", 7 | "build": "rollup -c", 8 | "postinstall": "node ./move_config.js", 9 | "test": "stylint source-src/css/style.styl -c .stylintrc" 10 | }, 11 | "source": "source-src/main.js", 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/Shen-Yu/hexo-theme-ayer.git" 15 | }, 16 | "keywords": [ 17 | "hexo", 18 | "theme", 19 | "blog", 20 | "ayer" 21 | ], 22 | "author": "Shen-Yu ", 23 | "license": "SATA", 24 | "bugs": { 25 | "url": "https://github.com/Shen-Yu/hexo-theme-ayer/issues", 26 | "email": "shenyu@hotmail.com" 27 | }, 28 | "homepage": "https://shen-yu.gitee.io/", 29 | "devDependencies": { 30 | "autoprefixer": "^9.8.6", 31 | "rollup": "^2.50.2", 32 | "rollup-plugin-styles": "^3.14.1", 33 | "rollup-plugin-terser": "^7.0.2", 34 | "stylint": "^2.0.0" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import autoprefixer from "autoprefixer"; 2 | import styles from "rollup-plugin-styles"; 3 | import { terser } from "rollup-plugin-terser"; 4 | 5 | export default { 6 | input: "source-src/main.js", 7 | output: { 8 | dir: "source/dist", 9 | format: "iife", 10 | assetFileNames: "[name][extname]", 11 | }, 12 | plugins: [ 13 | styles({ mode: "extract", minimize: true, plugins: [autoprefixer()] }), 14 | terser(), 15 | ], 16 | }; 17 | -------------------------------------------------------------------------------- /screenshots/hexo-theme-ayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/screenshots/hexo-theme-ayer.png -------------------------------------------------------------------------------- /scripts/default_config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | // 生成meta `generator` 5 | meta_generator: true 6 | }; 7 | -------------------------------------------------------------------------------- /scripts/events/index.js: -------------------------------------------------------------------------------- 1 | /* global hexo */ 2 | 3 | "use strict"; 4 | 5 | hexo.on("generateBefore", () => { 6 | require("./lib/merge-configs")(hexo); 7 | }); 8 | 9 | hexo.on("generateAfter", () => { 10 | require("./lib/hello")(hexo); 11 | }); 12 | -------------------------------------------------------------------------------- /scripts/events/lib/hello.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = (hexo) => { 4 | const isZh = hexo.theme.i18n.languages[0].search(/zh-CN/i) !== -1; 5 | if (isZh) { 6 | hexo.log.info(` 7 | ------------------------------------------------ 8 | | | 9 | | __ ________ _____ | 10 | | /\\\\ \\ / / ____| __ \\ | 11 | | / \\\\ \\_/ /| |__ | |__) | | 12 | | / /\\ \\\\ / | __| | _ / | 13 | | / ____ \\| | | |____| | \\ \\ | 14 | | /_/ \\_\\_| |______|_| \\_\\ | 15 | | | 16 | | 感谢使用 Ayer 主题 ! | 17 | | 文档: https://shen-yu.gitee.io/2019/ayer/ | 18 | | | 19 | ------------------------------------------------ 20 | `); 21 | } else { 22 | hexo.log.info(` 23 | ---------------------------------------------------- 24 | | | 25 | | __ ________ _____ | 26 | | /\\\\ \\ / / ____| __ \\ | 27 | | / \\\\ \\_/ /| |__ | |__) | | 28 | | / /\\ \\\\ / | __| | _ / | 29 | | / ____ \\| | | |____| | \\ \\ | 30 | | /_/ \\_\\_| |______|_| \\_\\ | 31 | | | 32 | | Thank you for using Ayer theme ! | 33 | | Docs: https://github.com/Shen-Yu/hexo-theme-ayer | 34 | | | 35 | ---------------------------------------------------- 36 | `); 37 | } 38 | }; 39 | -------------------------------------------------------------------------------- /scripts/events/lib/merge-configs.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | const objUtil = require("../../utils/object"); 4 | const { isNotEmptyObject } = require("../../utils/object"); 5 | 6 | module.exports = (hexo) => { 7 | const isZh = hexo.theme.i18n.languages[0].search(/zh-CN/i) !== -1; 8 | 9 | if (isNotEmptyObject(hexo.config.theme_config)) { 10 | hexo.theme.config = objUtil.merge( 11 | {}, 12 | hexo.theme.config, 13 | hexo.config.theme_config 14 | ); 15 | if (isZh) { 16 | hexo.log.info("[Ayer] 读取 _config.yml 中 theme_config 配置项覆盖配置"); 17 | } else { 18 | hexo.log.info( 19 | "[Ayer] Merge theme config from theme_config in _config.yml" 20 | ); 21 | } 22 | } 23 | 24 | hexo.log.debug( 25 | "[Ayer] Output theme config:\n", 26 | JSON.stringify(hexo.theme.config, undefined, 2) 27 | ); 28 | }; 29 | -------------------------------------------------------------------------------- /scripts/filters/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const metaGeneratorPath = './meta_generator'; 4 | 5 | module.exports = hexo => { 6 | /* const { 7 | filter 8 | } = hexo.extend; */ 9 | // filter.register('after_render:html', require('./meta_generator')); 10 | }; 11 | 12 | // 保持过滤器最先执行 13 | hexo.extend.filter.register('after_render:html', require(metaGeneratorPath), 1); 14 | -------------------------------------------------------------------------------- /scripts/filters/meta_generator.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const defaultConfig = require('../default_config'); 4 | 5 | function hexoMetaGeneratorInject(data) { 6 | const config = defaultConfig; 7 | if (!config.meta_generator || !data || 8 | data.match(/`; 13 | 14 | return data.replace('', '' + hexoGeneratorTag); 15 | } 16 | 17 | module.exports = hexoMetaGeneratorInject; 18 | -------------------------------------------------------------------------------- /scripts/helpers/ayer-plus-vendors.js: -------------------------------------------------------------------------------- 1 | /* global hexo */ 2 | 3 | 'use strict'; 4 | 5 | /** 自定义链接生成 */ 6 | hexo.extend.helper.register('ayer_plus_vendors', function (url) { 7 | if (url.startsWith('//')) return url; 8 | return this.url_for(`${url}`); 9 | }); 10 | -------------------------------------------------------------------------------- /scripts/helpers/wordcount.js: -------------------------------------------------------------------------------- 1 | var util = require('hexo-util'); 2 | var stripHTML = util.stripHTML; 3 | 4 | var counter = function (content) { 5 | content = stripHTML(content); 6 | const cn = (content.match(/[\u4E00-\u9FA5]/g) || []).length; 7 | const en = (content.replace(/[\u4E00-\u9FA5]/g, '').match(/[a-zA-Z0-9_\u0392-\u03c9\u0400-\u04FF]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af\u0400-\u04FF]+|[\u00E4\u00C4\u00E5\u00C5\u00F6\u00D6]+|\w+/g) || []).length; 8 | return [cn, en]; 9 | }; 10 | 11 | hexo.extend.helper.register('min2read', function (content, { 12 | cn = 300, 13 | en = 160 14 | } = {}) { 15 | var len = counter(content); 16 | var readingTime = len[0] / cn + len[1] / en; 17 | return readingTime < 1 ? '1' : parseInt(readingTime, 10); 18 | }); 19 | 20 | hexo.extend.helper.register('wordcount', function (content) { 21 | var len = counter(content); 22 | var count = len[0] + len[1]; 23 | if (count < 1000) { 24 | return count; 25 | } 26 | return Math.round(count / 100) / 10 + 'k'; 27 | }); 28 | 29 | hexo.extend.helper.register('totalcount', function (site) { 30 | var count = 0; 31 | site.posts.forEach(function (post) { 32 | var len = counter(post.content); 33 | count += len[0] + len[1]; 34 | }); 35 | if (count < 1000) { 36 | return count; 37 | } 38 | return Math.round(count / 100) / 10 + 'k'; 39 | }); 40 | -------------------------------------------------------------------------------- /scripts/lib/core.js: -------------------------------------------------------------------------------- 1 | /* global hexo */ 2 | 3 | 'use strict'; 4 | 5 | // Hexo事件:https://hexo.io/zh-cn/api/events 6 | 7 | /** 在静态文件生成前发布 */ 8 | hexo.on('generateBefore', () => { 9 | // Merge config. 10 | //require('./../filters/index')(hexo); 11 | }); 12 | 13 | /** 在文章文件建立后发布。该事件返回文章参数。 */ 14 | hexo.on('new', function (post) { 15 | //console.log(post) 16 | }); 17 | 18 | /** 在文章开始渲染前执行 */ 19 | hexo.extend.filter.register('before_post_render', function (data) { 20 | //var config = hexo.config; 21 | //console.log(3); 22 | //console.log(config); 23 | //console.log(hexo.theme.config); 24 | 25 | }); 26 | -------------------------------------------------------------------------------- /scripts/utils/join-path.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const joinPath = function(base, relative) { 4 | if (relative && /^https*:\/\//.test(relative)) { 5 | return relative; 6 | } 7 | return relative 8 | ? base.replace(/\/+$/, '') + '/' + relative.replace(/^\/+/, '') 9 | : base; 10 | }; 11 | 12 | module.exports = joinPath; 13 | -------------------------------------------------------------------------------- /scripts/utils/object.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const isObject = (obj) => { 4 | return obj && typeof obj === 'object' && !Array.isArray(obj); 5 | }; 6 | 7 | const isNotEmptyObject = (obj) => { 8 | return obj && typeof obj === 'object' && Object.getOwnPropertyNames(obj).length !== 0; 9 | }; 10 | 11 | const merge = (target, ...sources) => { 12 | for (const source of sources) { 13 | for (const key in source) { 14 | if (!Object.prototype.hasOwnProperty.call(source, key)) { 15 | continue; 16 | } 17 | if (isObject(target[key]) && isObject(source[key])) { 18 | merge(target[key], source[key]); 19 | } else { 20 | target[key] = source[key]; 21 | } 22 | } 23 | } 24 | return target; 25 | }; 26 | 27 | module.exports = { 28 | isObject, 29 | isNotEmptyObject, 30 | merge 31 | }; 32 | -------------------------------------------------------------------------------- /source-src/css/_darkmode.styl: -------------------------------------------------------------------------------- 1 | darkmode() 2 | background: rgba(0,0,0,.6) 3 | * 4 | color: #f2f2f2 5 | .article-entry code 6 | background: darken(#ddd,10%) !important 7 | color: #c7254e !important 8 | .article-header .article-title,.share-outer i,.category-list .category-list-item i,.category-list a:hover .category-list-item,.article-date, .article-category .article-category-link, .archive-year-wrap .archive-year, .archive-article-date,a.toc-link,.tag-list > .tag-list-item:before,.article-tag-list:before 9 | color: darken(#fff,10%) !important 10 | .share-icons a i,.float_btns i,#reward .reward-p,#reward .reward-p i,.local-search-input 11 | color: darken(#999,20%) !important 12 | .is-position-fixed 13 | background-color transparent 14 | .v * 15 | color: #555 !important 16 | .tag-list > .tag-list-item .tag-list-link,.article-tag-list .article-tag-list-link 17 | background: darken(#fff,10%) !important 18 | color: #555 !important 19 | #vcomments-box #vcomments 20 | background-color rgba(255,255,255,.1) !important 21 | * 22 | color #f1f1f1 !important 23 | .v .vbtn 24 | background-color: transparent !important 25 | .v .vlist .vcard .vhead .vsys 26 | border: 1px solid #f1f1f1 !important 27 | background-color: transparent !important 28 | input::-webkit-input-placeholder 29 | color: #ccc; 30 | input::-moz-input-placeholder 31 | color: #ccc; 32 | input::-ms-input-placeholder 33 | color: #ccc; 34 | .categories-box a 35 | color: #f2f2f2; 36 | #friends_link .friends_li a 37 | background-color rgba(255,255,255,.15) 38 | color: #fff; -------------------------------------------------------------------------------- /source-src/css/_extend.styl: -------------------------------------------------------------------------------- 1 | $block-caption 2 | text-decoration none 3 | color sea-lighter 4 | &:hover 5 | color sea-lighter 6 | 7 | $block 8 | border-radius 4px 9 | 10 | $base-style 11 | h1, h2, h3, h4, h5, h6 12 | margin 2.5rem 0 1.5rem 13 | hr 14 | height border-width 15 | background-color border-color 16 | border none 17 | padding 0 18 | margin 1.5rem 0 19 | strong 20 | font-weight bold 21 | em, cite 22 | font-style italic 23 | sup, sub 24 | font-size 75% 25 | line-height 0 26 | position relative 27 | vertical-align baseline 28 | sup 29 | top -.5rem 30 | sub 31 | bottom -.25rem 32 | small 33 | font-size 85% 34 | acronym, abbr 35 | border-bottom border-width border-color dotted 36 | ul, ol, dl 37 | margin 1.5rem 0 1.5rem 2rem 38 | 39 | p, table, blockquote 40 | margin 1.5rem 0 41 | 42 | img, video 43 | max-width 100% 44 | height auto 45 | display block 46 | margin auto 47 | iframe 48 | border none 49 | table 50 | width 100% 51 | max-width 70rem 52 | border 1px solid #dedede 53 | margin 15px auto 54 | border-collapse collapse 55 | empty-cells show 56 | th,td 57 | border 1px solid #dedede 58 | padding 5px 10px 59 | th 60 | font-weight bold 61 | text-align center !important 62 | background rgba(158, 188, 226, .2) 63 | white-space nowrap 64 | td:nth-child(1) 65 | white-space nowrap 66 | 67 | blockquote 68 | display block 69 | padding 0 1.5rem 70 | width 100% 71 | overflow auto 72 | border-left .3rem water solid 73 | color sea-lighter 74 | > :first-child 75 | margin-top 0; 76 | > :last-child 77 | margin-bottom 0; 78 | footer 79 | cite 80 | &:before 81 | content "—" 82 | padding 0 .5rem 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /source-src/css/_mixins.styl: -------------------------------------------------------------------------------- 1 | clearfix() 2 | &::before, &::after 3 | content "" 4 | display table 5 | clear both 6 | 7 | hide-text() 8 | text-indent: 100% 9 | white-space: nowrap 10 | overflow: hidden 11 | 12 | list-unstyled() 13 | list-style none 14 | padding-left 0 15 | margin-left 0 16 | 17 | // Center 18 | center() 19 | top 50% 20 | left 50% 21 | transform translate(-50%, -50%) 22 | 23 | // Horizontal Center 24 | center-x() 25 | left 50% 26 | transform translateX(-50%) 27 | 28 | // Vertical Center 29 | center-y() 30 | top 50% 31 | transform translateY(-50%) 32 | 33 | 34 | border-radius(n) 35 | -webkit-border-radius n 36 | -moz-border-radius n 37 | border-radius n 38 | 39 | border-top-radius(n) 40 | border-top-left-radius n 41 | border-top-right-radius n 42 | 43 | border-right-radius(n) 44 | border-top-right-radius n 45 | border-bottom-right-radius n 46 | 47 | border-bottom-radius(n) 48 | border-bottom-left-radius n 49 | border-bottom-right-radius n 50 | 51 | transition(transition) 52 | transition transition 53 | 54 | rounded-circle(size) 55 | width size 56 | height size 57 | border-radius size / 2 58 | 59 | // Media queries 60 | -------------------------------------------------------------------------------- /source-src/css/_normalize.styl: -------------------------------------------------------------------------------- 1 | /*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */ 2 | 3 | /* Document 4 | ========================================================================== */ 5 | 6 | /** 7 | * 1. Correct the line height in all browsers. 8 | * 2. Prevent adjustments of font size after orientation changes in iOS. 9 | */ 10 | 11 | html 12 | line-height 1.15 /* 1 */ 13 | -webkit-text-size-adjust 100% /* 2 */ 14 | 15 | /* Sections 16 | ========================================================================== */ 17 | 18 | /** 19 | * Remove the margin in all browsers. 20 | */ 21 | 22 | body 23 | margin 0 24 | 25 | /** 26 | * Correct the font size and margin on `h1` elements within `section` and 27 | * `article` contexts in Chrome, Firefox, and Safari. 28 | */ 29 | 30 | h1 31 | font-size 30px 32 | h2 33 | font-size 28px 34 | h3 35 | font-size 26px 36 | h4 37 | font-size 24px 38 | h5 39 | font-size 21px 40 | h6 41 | font-size 18px 42 | 43 | /* Grouping content 44 | ========================================================================== */ 45 | 46 | /** 47 | * 1. Add the correct box sizing in Firefox. 48 | * 2. Show the overflow in Edge and IE. 49 | */ 50 | 51 | hr 52 | box-sizing content-box /* 1 */ 53 | height 0 /* 1 */ 54 | overflow visible /* 2 */ 55 | 56 | /** 57 | * 1. Correct the inheritance and scaling of font size in all browsers. 58 | * 2. Correct the odd `em` font sizing in all browsers. 59 | */ 60 | 61 | pre 62 | font-family monospace, monospace /* 1 */ 63 | font-size 1em /* 2 */ 64 | 65 | /* Text-level semantics 66 | ========================================================================== */ 67 | 68 | /** 69 | * Remove the gray background on active links in IE 10. 70 | */ 71 | 72 | a 73 | background-color transparent 74 | 75 | /** 76 | * 1. Remove the bottom border in Chrome 57- 77 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 78 | */ 79 | 80 | abbr[title] 81 | border-bottom none /* 1 */ 82 | text-decoration underline /* 2 */ 83 | text-decoration underline dotted /* 2 */ 84 | 85 | /** 86 | * Add the correct font weight in Chrome, Edge, and Safari. 87 | */ 88 | 89 | b, 90 | strong 91 | font-weight bolder 92 | 93 | /** 94 | * 1. Correct the inheritance and scaling of font size in all browsers. 95 | * 2. Correct the odd `em` font sizing in all browsers. 96 | */ 97 | 98 | code, 99 | kbd, 100 | samp 101 | font-family monospace, monospace /* 1 */ 102 | font-size 1em /* 2 */ 103 | 104 | /** 105 | * Add the correct font size in all browsers. 106 | */ 107 | 108 | small 109 | font-size 80% 110 | 111 | /** 112 | * Prevent `sub` and `sup` elements from affecting the line height in 113 | * all browsers. 114 | */ 115 | 116 | sub, 117 | sup 118 | font-size 75% 119 | line-height 0 120 | position relative 121 | vertical-align baseline 122 | 123 | sub 124 | bottom -0.25em 125 | 126 | sup 127 | top -0.5em 128 | 129 | /* Embedded content 130 | ========================================================================== */ 131 | 132 | /** 133 | * Remove the border on images inside links in IE 10. 134 | */ 135 | 136 | img 137 | border-style none 138 | 139 | /* Forms 140 | ========================================================================== */ 141 | 142 | /** 143 | * 1. Change the font styles in all browsers. 144 | * 2. Remove the margin in Firefox and Safari. 145 | */ 146 | 147 | button, 148 | input, 149 | optgroup, 150 | select, 151 | textarea 152 | font-family inherit /* 1 */ 153 | font-size 100% /* 1 */ 154 | line-height 1.15 /* 1 */ 155 | margin 0 /* 2 */ 156 | 157 | /** 158 | * Show the overflow in IE. 159 | * 1. Show the overflow in Edge. 160 | */ 161 | 162 | button, 163 | input /* 1 */ 164 | overflow visible 165 | 166 | /** 167 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 168 | * 1. Remove the inheritance of text transform in Firefox. 169 | */ 170 | 171 | button, 172 | select /* 1 */ 173 | text-transform none 174 | 175 | /** 176 | * Correct the inability to style clickable types in iOS and Safari. 177 | */ 178 | 179 | button, 180 | [type="button"], 181 | [type="reset"], 182 | [type="submit"] 183 | -webkit-appearance button 184 | 185 | /** 186 | * Remove the inner border and padding in Firefox. 187 | */ 188 | 189 | button::-moz-focus-inner, 190 | [type="button"]::-moz-focus-inner, 191 | [type="reset"]::-moz-focus-inner, 192 | [type="submit"]::-moz-focus-inner 193 | border-style none 194 | padding 0 195 | 196 | /** 197 | * Restore the focus styles unset by the previous rule. 198 | */ 199 | 200 | button:-moz-focusring, 201 | [type="button"]-moz-focusring, 202 | [type="reset"]-moz-focusring, 203 | [type="submit"]-moz-focusring 204 | outline 1px dotted ButtonText 205 | 206 | /** 207 | * Correct the padding in Firefox. 208 | */ 209 | 210 | fieldset 211 | padding 0.35em 0.75em 0.625em 212 | 213 | /** 214 | * 1. Correct the text wrapping in Edge and IE. 215 | * 2. Correct the color inheritance from `fieldset` elements in IE. 216 | * 3. Remove the padding so developers are not caught out when they zero out 217 | * `fieldset` elements in all browsers. 218 | */ 219 | 220 | legend 221 | box-sizing border-box /* 1 */ 222 | color inherit /* 2 */ 223 | display table /* 1 */ 224 | max-width 100% /* 1 */ 225 | padding 0 /* 3 */ 226 | white-space normal /* 1 */ 227 | 228 | /** 229 | * Add the correct vertical alignment in Chrome, Firefox, and Opera. 230 | */ 231 | 232 | progress 233 | vertical-align baseline 234 | 235 | /** 236 | * Remove the default vertical scrollbar in IE 10+. 237 | */ 238 | 239 | textarea 240 | overflow auto 241 | 242 | /** 243 | * 1. Add the correct box sizing in IE 10. 244 | * 2. Remove the padding in IE 10. 245 | */ 246 | 247 | [type="checkbox"], 248 | [type="radio"] 249 | box-sizing border-box /* 1 */ 250 | padding 0 /* 2 */ 251 | 252 | /** 253 | * Correct the cursor style of increment and decrement buttons in Chrome. 254 | */ 255 | 256 | [type="number"]::-webkit-inner-spin-button, 257 | [type="number"]::-webkit-outer-spin-button 258 | height auto 259 | 260 | /** 261 | * 1. Correct the odd appearance in Chrome and Safari. 262 | * 2. Correct the outline style in Safari. 263 | */ 264 | 265 | [type="search"] 266 | -webkit-appearance textfield /* 1 */ 267 | outline-offset -2px /* 2 */ 268 | 269 | /** 270 | * Remove the inner padding in Chrome and Safari on macOS. 271 | */ 272 | 273 | [type="search"]::-webkit-search-decoration 274 | -webkit-appearance none 275 | 276 | /** 277 | * 1. Correct the inability to style clickable types in iOS and Safari. 278 | * 2. Change font properties to `inherit` in Safari. 279 | */ 280 | 281 | ::-webkit-file-upload-button 282 | -webkit-appearance button /* 1 */ 283 | font inherit /* 2 */ 284 | 285 | /* Interactive 286 | ========================================================================== */ 287 | 288 | /* 289 | * Add the correct display in Edge, IE 10+, and Firefox. 290 | */ 291 | 292 | details 293 | display block 294 | 295 | /* 296 | * Add the correct display in all browsers. 297 | */ 298 | 299 | summary 300 | display list-item 301 | 302 | /* Misc 303 | ========================================================================== */ 304 | 305 | /** 306 | * Add the correct display in IE 10+. 307 | */ 308 | 309 | template 310 | display none 311 | 312 | /** 313 | * Add the correct display in IE 10. 314 | */ 315 | 316 | [hidden] 317 | display none -------------------------------------------------------------------------------- /source-src/css/_partial/ads.styl: -------------------------------------------------------------------------------- 1 | .ads 2 | position absolute 3 | right 0 4 | top 50px 5 | z-index 2 6 | transform translateX(110%) 7 | ul,li 8 | list-unstyled() 9 | img 10 | display block 11 | margin-bottom 15px 12 | 13 | @media (max-width: 768px) 14 | .ads 15 | display none -------------------------------------------------------------------------------- /source-src/css/_partial/albums.styl: -------------------------------------------------------------------------------- 1 | 2 | .article-albums 3 | position relative 4 | 5 | .article-albums-photos 6 | position relative 7 | display flex 8 | flex-wrap wrap 9 | list-unstyled() 10 | clearfix() 11 | &::after 12 | content: '' 13 | flex-grow 999999999 14 | .article-albums-item 15 | position relative 16 | flex-grow 1 17 | margin .5rem 18 | overflow hidden 19 | img 20 | object-fit cover 21 | max-width 100% 22 | min-width 100% 23 | vertical-align: center 24 | .article-albums-caption 25 | display block 26 | width 100% 27 | padding 1rem 0 28 | text-align center 29 | 30 | // Media Query 31 | @media (min-width: 576px) 32 | .article-albums-item 33 | img 34 | height 32rem 35 | .article-albums-caption 36 | position absolute 37 | bottom 0 38 | left 0 39 | width 100% 40 | background-color rgba(black, .5) 41 | background linear-gradient(to top, rgba(black, .5), transparent) 42 | color white 43 | padding 1rem 44 | opacity 0 45 | transform translateY(100%) 46 | transition(transition-base) 47 | &:hover 48 | .article-albums-caption 49 | opacity 1 50 | transform translateY(0) 51 | 52 | @media (min-width: 768px) 53 | .article-albums-item 54 | img 55 | height 20rem 56 | -------------------------------------------------------------------------------- /source-src/css/_partial/apple.styl: -------------------------------------------------------------------------------- 1 | 2 | // apple product 3 | // 4 | // macbook air 5 | color-macbook = white 6 | color-macbook-darken = darken(color-macbook, 5%) 7 | 8 | // 9 | // browser 10 | color-browser-light = white 11 | color-browser-btns = 12 | close #eb6b60 13 | minimize #f4be4f 14 | maximize #66c655 15 | 16 | scrolling-wrap-height = 30rem 17 | 18 | // 19 | // macbook air 20 | .macbook 21 | position relative 22 | .macbook-screen 23 | position relative 24 | background-color transparent 25 | border-style solid 26 | border-color color-macbook 27 | border-radius 1rem 28 | border-width 1.25rem 29 | box-shadow 0 1rem 3rem rgba(black, .15), 0 0 .5rem rgba(black, .15) inset 30 | 31 | .macbook-keyboard 32 | display none 33 | position relative 34 | box-sizing content-box 35 | background-color color-macbook 36 | border-bottom solid .75rem color-macbook-darken 37 | border-bottom-radius(50%) 38 | margin -.5rem -5rem 0 39 | height .5rem 40 | box-shadow 0 .5rem 3rem rgba(0,0,0,.15) 41 | &::before 42 | content '' 43 | position absolute 44 | center-x() 45 | background linear-gradient(90deg, color-macbook-darken, color-macbook, color-macbook-darken) 46 | box-shadow 0 0 .1rem rgba(0, 0, 0, .05) inset 47 | width 20% 48 | height .3rem 49 | border-radius .125rem 50 | 51 | 52 | // 53 | @media (min-width: 768px) 54 | .macbook 55 | .macbook-screen 56 | border-width 2rem 1.25rem 1.25rem 57 | .macbook-keyboard 58 | display block 59 | 60 | // 61 | // markdown article 62 | .macbook-wrap 63 | padding 1rem 9rem 64 | 65 | // 66 | // markdown article shwo scrolling page 67 | @keyframes scrolling-animation 68 | 0% 69 | top 0 70 | 10% 71 | top 0 72 | transform translateY(0) 73 | 30% 74 | transform translateY(-35%) 75 | 60% 76 | transform translateY(-75%) 77 | 90% 78 | transform translateY(-100%) 79 | 100% 80 | transform translateY(-100%) 81 | 82 | .scrolling-wrap 83 | min-height scrolling-wrap-height 84 | overflow hidden 85 | .scrolling 86 | position absolute 87 | top scrolling-wrap-height 88 | width 100% 89 | animation scrolling-animation 10s ease-in-out 1s infinite 90 | -------------------------------------------------------------------------------- /source-src/css/_partial/archive.styl: -------------------------------------------------------------------------------- 1 | .archives-wrap 2 | position relative 3 | clearfix() 4 | &:first-child 5 | margin-top 3rem 6 | &:last-child 7 | margin-bottom 3rem 8 | 9 | .archive-year-wrap 10 | position absolute 11 | top 0 12 | left 0 13 | width years-width 14 | .archive-year 15 | position relative 16 | display inline-block 17 | @extend $block-caption 18 | &::after 19 | content '' 20 | position absolute 21 | left 0 22 | bottom 0 23 | height .15rem 24 | background-color sea-lighter 25 | width 100% 26 | 27 | .archives 28 | margin-left years-width 29 | border-left border-width border-color dashed 30 | padding-left 3rem 31 | clearfix() 32 | 33 | .archive-article 34 | avoid-column-break() 35 | 36 | .archive-article-inner 37 | @extend $block 38 | margin-bottom 1.5rem 39 | 40 | .archive-article-header 41 | display table-row 42 | > a, > h2 43 | display table-cell 44 | h2 45 | margin 0 46 | padding-left 3rem 47 | .archive-article-title 48 | text-decoration: none 49 | font-size 1.8rem 50 | 51 | .archive-article-footer 52 | margin-top: 1.5rem 53 | 54 | .archive-article-date 55 | position relative 56 | display: block 57 | @extend $block-caption 58 | &::before 59 | content '' 60 | position absolute 61 | top 50% 62 | left -3.5rem 63 | margin-top -.5rem 64 | rounded-circle(1rem) 65 | background-color border-color 66 | 67 | .page-type-title 68 | margin 0 69 | padding 3rem 0 70 | 71 | .page-nav 72 | clearfix() 73 | margin: 3rem auto 5rem 74 | text-align: center 75 | overflow: hidden 76 | font-size: 115% 77 | a, span 78 | padding: 1rem 1.5rem 79 | line-height: 1 80 | a 81 | text-decoration: none 82 | .prev 83 | float: left 84 | border-radius: 6px 85 | border: 1px solid 86 | .next 87 | float: right 88 | border-radius: 6px 89 | border: 1px solid 90 | .page-number 91 | display: inline-block 92 | @media mq-mobile 93 | display: none 94 | .current 95 | font-weight: bold 96 | .space 97 | color: border-color -------------------------------------------------------------------------------- /source-src/css/_partial/article.styl: -------------------------------------------------------------------------------- 1 | 2 | .article 3 | padding 5rem 0 3rem 4 | font-size 110% 5 | .sea-center 6 | text-align center 7 | color black 8 | &::after 9 | border-bottom: 2px dashed water; 10 | content: ''; 11 | width: 100px; 12 | display: block; 13 | margin: .2em auto 0; 14 | height: 2px 15 | //.article-inner 16 | // overflow hidden 17 | 18 | .article-topping 19 | display inline-block 20 | margin-left 10px 21 | padding 0 10px 22 | border-radius 4px 23 | font-style normal 24 | font-size 12px 25 | background-color #ea434a 26 | color #fff 27 | height 22px 28 | line-height 24px 29 | transform translateY(-8px) 30 | 31 | 32 | .article-meta 33 | clearfix() 34 | 35 | .article-date 36 | @extend $block-caption 37 | &::before 38 | content '\eaf2' 39 | margin-right .15rem 40 | font-family remixicon 41 | opacity .5 42 | 43 | .article-category 44 | display inline-block 45 | margin-left 1.5rem 46 | &:before 47 | content "\efde" 48 | font-family remixicon 49 | margin-right .15rem 50 | opacity 0.6 51 | .article-category-link 52 | @extend $block-caption 53 | 54 | .archive-article-header 55 | + .article-category 56 | margin-left 0 57 | 58 | .article-entry 59 | font-size 103% 60 | margin-top .5rem 61 | line-height 1.6 62 | clearfix() 63 | @extend $base-style 64 | color body-color 65 | .pullquote 66 | text-align left 67 | width 45% 68 | margin 0 69 | &.left 70 | margin-left 0.5em 71 | margin-right 1em 72 | &.right 73 | margin-right 0.5em 74 | margin-left 1em 75 | .caption 76 | color froth 77 | display block 78 | font-size 0.9em 79 | margin-top 0.5em 80 | position relative 81 | text-align center 82 | // http://webdesignerwall.com/tutorials/css-elastic-videos 83 | .video-container 84 | position relative 85 | padding-top (9 / 16 * 100) % // 16:9 ratio 86 | height 0 87 | overflow hidden 88 | iframe, object, embed 89 | position absolute 90 | top 0 91 | left 0 92 | width 100% 93 | height 100% 94 | margin-top 0 95 | 96 | .article-header 97 | position relative 98 | h1, h2 99 | margin 0 100 | .article-title 101 | display block 102 | font-size 34px 103 | font-weight bold 104 | margin-bottom 3rem 105 | text-decoration none 106 | color body-color 107 | padding-left 2rem 108 | border-left 4px solid body-color 109 | .article-author 110 | display block 111 | font-size 20px 112 | margin-bottom 3rem 113 | text-decoration none 114 | color body-color 115 | padding-left 2rem 116 | 117 | .article-footer 118 | clearfix() 119 | 120 | .declare 121 | margin 0 0 1rem 122 | padding-bottom 1rem 123 | color #999 124 | border-bottom 1px solid #f6f6f6 125 | ul 126 | list-style none 127 | li 128 | list-style none 129 | 130 | // Tags 131 | .article-tag-list 132 | list-unstyled() 133 | margin 0 134 | &:before 135 | color: tag-color 136 | content "\eec3" 137 | font-family remixicon 138 | margin-right .5rem 139 | .article-tag-list-item 140 | display inline-block 141 | padding-right 1rem 142 | .article-tag-list-link 143 | font-size: 11px 144 | text-decoration: none 145 | display: block; 146 | color: white; 147 | float: left; 148 | height 18px 149 | line-height 18px 150 | padding 0px 8px; 151 | position: relative; 152 | border-radius: 9px; 153 | background-color tag-color 154 | 155 | .article-comment-link 156 | float right 157 | &:before 158 | content "\ee0d" 159 | font-family remixicon 160 | padding-right 8px 161 | 162 | .article-share-link 163 | cursor pointer 164 | float right 165 | margin-left 20px 166 | &:before 167 | content "\ef76" 168 | font-family remixicon 169 | padding-right 6px 170 | 171 | // Nav Older & Newer 172 | .article-nav 173 | clearfix() 174 | position relative 175 | padding-top 1.5rem 176 | margin 1rem 0 2rem 177 | border-top border-width solid #eee 178 | 179 | .article-nav-link 180 | display block 181 | text-decoration none 182 | &:first-child 183 | float left 184 | &:last-child 185 | float right 186 | text-align right 187 | 188 | .article-nav-caption 189 | color sea-lighter 190 | 191 | .article-nav-title 192 | font-size inherit 193 | 194 | // Share 195 | .article-share-box 196 | position absolute 197 | display none 198 | background white 199 | border-radius(.4rem) 200 | box-shadow 1px 2px 10px rgba(0, 0, 0, 0.2) 201 | border-radius 3px 202 | margin-left -145px 203 | overflow hidden 204 | z-index 1 205 | &.on 206 | display block 207 | 208 | .article-share-input 209 | width 100% 210 | background none 211 | box-sizing border-box 212 | padding 0 1.5rem 213 | outline none 214 | border none 215 | border-bottom border-width border-color solid 216 | height 3.6rem 217 | line-height 3.6rem 218 | 219 | .article-share-links 220 | clearfix() 221 | 222 | $article-share-link 223 | position relative 224 | display block 225 | float left 226 | width 5rem 227 | height 3.6rem 228 | color body-color 229 | text-align center 230 | text-decoration none 231 | &:before 232 | font-size 20px 233 | font-family remixicon 234 | absolute-center(font-size-base) 235 | &:hover 236 | color white 237 | 238 | .article-share-twitter 239 | @extend $article-share-link 240 | &:before 241 | content "\f068" 242 | &:hover 243 | background twitter-color 244 | text-shadow 0 1px darken(twitter-color, 20%) 245 | 246 | .article-share-facebook 247 | @extend $article-share-link 248 | &:before 249 | content "\ec30" 250 | &:hover 251 | background facebook-color 252 | text-shadow 0 1px darken(facebook-color, 20%) 253 | 254 | .article-share-pinterest 255 | @extend $article-share-link 256 | &:before 257 | content "\eea8" 258 | &:hover 259 | background pinterest-color 260 | text-shadow 0 1px darken(pinterest-color, 20%) 261 | 262 | .article-share-google 263 | @extend $article-share-link 264 | &:before 265 | content "\ed15" 266 | &:hover 267 | background google-color 268 | text-shadow 0 1px darken(google-color, 20%) 269 | 270 | .pswp__caption__center 271 | text-align center !important 272 | 273 | @import "tocbot" 274 | @import "gallery" 275 | @import "albums" 276 | @import "justifiedGallery" -------------------------------------------------------------------------------- /source-src/css/_partial/articles.styl: -------------------------------------------------------------------------------- 1 | .articles 2 | .article 3 | padding 4.5rem 0 4 | &:not(:last-child) 5 | border-bottom border-width #ddd solid 6 | .article-entry 7 | margin-top 1rem 8 | padding 0 2rem 2rem 9 | border 1px dashed lighten(tag-color,80%) 10 | .article-more-link 11 | display inline-block 12 | float right 13 | background-color body-color 14 | padding .5rem 1rem 15 | border-radius 4px 16 | color white !important 17 | text-decoration none 18 | .article-gallery 19 | margin-top 1.5rem 20 | .article-footer 21 | margin-top 1rem 22 | -------------------------------------------------------------------------------- /source-src/css/_partial/ayer.styl: -------------------------------------------------------------------------------- 1 | @keyframes down 2 | 0% 3 | margin-bottom 0 4 | opacity 1 5 | 100% 6 | margin-bottom -15px 7 | opacity .1 8 | // 9 | .cover-frame 10 | position relative 11 | min-width 100% 12 | height 100vh 13 | .bg-box 14 | width 100% 15 | height 100% 16 | &>img 17 | display block 18 | width 100vw 19 | height 100vh 20 | object-fit cover 21 | object-position center center 22 | .cover-inner 23 | position absolute 24 | top 50% 25 | left 50% 26 | transform translate(-50%, -100%) 27 | h1 28 | font-family: Titillium Web,PingFang SC,Hiragino Sans GB,"Microsoft JhengHei","Microsoft YaHei",Helvetica Neue,Helvetica,Arial,sans-serif 29 | font-size 7rem 30 | margin 0 31 | opacity .95 32 | #subtitle-box 33 | font-family: Titillium Web,PingFang SC,Hiragino Sans GB,"Microsoft JhengHei","Microsoft YaHei",Helvetica Neue,Helvetica,Arial,sans-serif 34 | font-size 3rem 35 | margin .5rem 0 1.5rem 36 | a, & 37 | color white 38 | text-decoration none 39 | video, img 40 | position relative 41 | .cover-logo 42 | width cover-logo-size 43 | 44 | 45 | .cover-learn-more 46 | position absolute 47 | z-index 1 48 | bottom 10px 49 | left 0 50 | width 100% 51 | a > i 52 | font-size 3rem 53 | color white 54 | animation down 1s linear infinite 55 | &:hover 56 | color sea 57 | 58 | .float_btns 59 | position sticky 60 | bottom 10rem 61 | right 50px 62 | z-index 9996 63 | text-align center 64 | transform scale(1.2) 65 | width: 50px 66 | float: right 67 | 68 | #mask 69 | position fixed 70 | left 0 71 | top 0 72 | width 100% 73 | height 100% 74 | background-color rgba(0,0,0,.8) 75 | z-index 9998 76 | display none 77 | 78 | .word_count 79 | margin-top 5px 80 | color darken(gray,30%) 81 | padding-bottom 1rem 82 | border-bottom 1px solid darken(froth-light,2%) 83 | 84 | // Media Query 85 | @media (max-width: 768px) 86 | .cover-inner 87 | transform translate(-50%, -70%); 88 | width 100% 89 | h1 90 | font-size 4.5rem 91 | #subtitle-box 92 | font-size 2rem 93 | 94 | .float_btns 95 | right 10px -------------------------------------------------------------------------------- /source-src/css/_partial/categories.styl: -------------------------------------------------------------------------------- 1 | // Categories 2 | .categories-box 3 | max-width 320px 4 | margin-right -.5rem 5 | margin-left -.5rem 6 | border-left 1px solid #eee 7 | span 8 | padding-left: 5px; 9 | color: #aaa; 10 | font-size: 14px 11 | ul li, ol li 12 | list-unstyled() 13 | margin: 15px 0; 14 | padding-left: 15px; 15 | padding-bottom: 12px; 16 | font-size: 16px; 17 | font-weight: 500; 18 | word-wrap: break-word; 19 | border-bottom: 1px solid #eee; 20 | &:last-child 21 | margin-bottom 0 22 | border-bottom 0 solid #000 23 | i 24 | font-style normal 25 | margin-left 10px 26 | color: darken(water,45%) 27 | a 28 | display inline-block 29 | vertical-align middle 30 | text-decoration: none 31 | color: body-color 32 | &:hover 33 | opacity .8 34 | &:before 35 | content "\efde" 36 | font-family remixicon 37 | margin-right .5rem 38 | display inline-block 39 | vertical-align middle 40 | ul ul,ol ul,ul ol,ol ol 41 | list-unstyled() 42 | margin 0 20px 43 | ul ul li,ol ul li,ul ol li,ol ol li 44 | list-unstyled() 45 | border: none; 46 | padding-bottom: 0; 47 | .category-list-count:before, .tag-list-count:before, .archive-list-count:before 48 | content: "("; 49 | .category-list-count:after, .tag-list-count:after, .archive-list-count:after 50 | content: ")"; 51 | 52 | 53 | -------------------------------------------------------------------------------- /source-src/css/_partial/float.styl: -------------------------------------------------------------------------------- 1 | 2 | .float-left 3 | float: left !important; 4 | 5 | .float-right 6 | float: right !important; 7 | 8 | .float-none 9 | float: none !important; -------------------------------------------------------------------------------- /source-src/css/_partial/footer.styl: -------------------------------------------------------------------------------- 1 | @keyframes footerHeartBeat 2 | 0% 3 | transform: scale(1) 4 | 50% 5 | transform: scale(1.2) 6 | 100% 7 | transform: scale(1) 8 | 9 | .footer 10 | border-top 2px solid #f6f6f6 11 | padding 3rem 0 12 | font-size 115% 13 | .outer 14 | &>ul 15 | position relative 16 | display flex 17 | justify-content center 18 | li 19 | display inline-block 20 | padding .3rem 0 21 | a 22 | text-decoration none 23 | .division 24 | display inline 25 | margin 0 5px 26 | i 27 | margin 0 2px 28 | font-style normal 29 | transform translateY(2px) 30 | span 31 | margin-right 6px 32 | 33 | .heart_icon 34 | display: inline-block; 35 | margin: 0 0.4rem; 36 | font-size: 1em; 37 | color: #f00; 38 | -webkit-animation: footerHeartBeat 1.2s infinite; 39 | -moz-animation: footerHeartBeat 1.2s infinite; 40 | -o-animation: footerHeartBeat 1.2s infinite; 41 | -ms-animation: footerHeartBeat 1.2s infinite; 42 | animation: footerHeartBeat 1.2s infinite; 43 | animation-duration: 1.2s; 44 | animation-timing-function: ease; 45 | animation-delay: 0s; 46 | animation-iteration-count: infinite; 47 | animation-direction: normal; 48 | animation-fill-mode: none; 49 | animation-play-state: running; 50 | animation-name: footerHeartBeat; -------------------------------------------------------------------------------- /source-src/css/_partial/friends.styl: -------------------------------------------------------------------------------- 1 | // friends 2 | #friends_link 3 | .friends_li 4 | list-style none 5 | float left 6 | a 7 | padding 15px 25px 8 | display flex 9 | align-items center 10 | justify-content space-between 11 | font-size 17px 12 | text-decoration none 13 | background-color rgba(6,129,208,.1) 14 | color #000 15 | border-radius 6px 16 | margin-right 20px 17 | margin-bottom 20px 18 | img 19 | display inline-block 20 | width 40px 21 | height 40px 22 | border-radius 50% 23 | margin-right 10px 24 | i 25 | font-size 25px 26 | width 40px 27 | height 40px 28 | &:hover 29 | background-color rgba(6,129,208,.15) 30 | -------------------------------------------------------------------------------- /source-src/css/_partial/gallery.styl: -------------------------------------------------------------------------------- 1 | 2 | .article-gallery 3 | position: relative 4 | 5 | .article-gallery-photos 6 | position: relative 7 | overflow: hidden 8 | 9 | .article-gallery-img 10 | display: none 11 | max-width: 100% 12 | &:first-child 13 | display: block 14 | &.loaded 15 | position: absolute 16 | display: block 17 | img 18 | display: block 19 | max-width: 100% 20 | margin: 0 auto -------------------------------------------------------------------------------- /source-src/css/_partial/gitalk.styl: -------------------------------------------------------------------------------- 1 | .gitalk,.markdown-body 2 | font-size font-size-base!important 3 | 4 | .gt-container 5 | .gt-avatar.gt-comment-avatar 6 | img 7 | border-radius 50%!important -------------------------------------------------------------------------------- /source-src/css/_partial/highlight.styl: -------------------------------------------------------------------------------- 1 | highlight-background = #2d2d2d 2 | highlight-code = #f2f2f2 3 | highlight-code-color = #c7254e 4 | highlight-current-line = grey 5 | highlight-selection = #000 6 | highlight-foreground = #dedede 7 | highlight-comment = #8e908c 8 | highlight-red = #f2777a 9 | highlight-orange = #f99157 10 | highlight-yellow = #ffcc66 11 | highlight-green = #99cc99 12 | highlight-aqua = #66cccc 13 | highlight-blue = #6699cc 14 | highlight-purple = #cc99cc 15 | 16 | .article-entry pre, 17 | .article-entry .highlight { 18 | background: highlight-background; 19 | margin: 10px 0; 20 | padding: 10px 10px; 21 | overflow: hidden; 22 | overflow-x: auto; 23 | color: highlight-foreground; 24 | font-size: 0.9em; 25 | line-height: 1.5; 26 | 27 | /** 滚动条整体部分 */ 28 | &::-webkit-scrollbar { 29 | height: 10px; 30 | width: 7px; 31 | background: rgba(0, 0, 0, 0.1); 32 | /* 高宽分别对应横竖滚动条的尺寸 */ 33 | /* width: 10px; 34 | height: 10px; 35 | background: #ccc; 36 | border-radius: 0; */ 37 | } 38 | 39 | &::-webkit-scrollbar:hover { 40 | background: rgba(0, 0, 0, 0.2); 41 | } 42 | 43 | /* 滚动条里面小方块 */ 44 | &::-webkit-scrollbar-thumb { 45 | background: rgba(0, 0, 0, 0.3); 46 | -webkit-border-radius: 6px; 47 | -moz-border-radius: 6px; 48 | -ms-border-radius: 6px; 49 | -o-border-radius: 6px; 50 | border-radius: 6px; 51 | } 52 | 53 | &::-webkit-scrollbar-thumb:hover { 54 | -webkit-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25); 55 | /* Webkit browsers */ 56 | -moz-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25); 57 | /* Firefox */ 58 | -ms-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25); 59 | /* IE9 */ 60 | -o-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25); 61 | /* Opera(Old) */ 62 | box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25); 63 | /* IE9+, News */ 64 | background-color: rgba(0, 0, 0, 0.4); 65 | } 66 | 67 | /** 滚动条里面的轨道 */ 68 | &::-webkit-scrollbar-track { 69 | /* box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); */ 70 | background: #ededed; 71 | border-radius: 10px; 72 | } 73 | 74 | } 75 | 76 | .article-entry .highlight .gutter pre, 77 | .article-entry .highlight .gutter pre .line, 78 | .article-entry .gist .gist-file .gist-data .line-numbers { 79 | /* color: #666; */ 80 | color: highlight-current-line; 81 | } 82 | 83 | .article-entry pre, 84 | .article-entry code { 85 | font-family: Consolas,Monaco,"Andale Mono","Ubuntu Mono",monospace 86 | } 87 | 88 | .article-entry code { 89 | background: #eee; 90 | color: highlight-code-color; 91 | padding: 0 0.3em; 92 | border: none; 93 | } 94 | 95 | .article-entry pre code { 96 | background: none; 97 | text-shadow: none; 98 | padding: 0; 99 | color: highlight-foreground; 100 | } 101 | 102 | .article-entry .highlight { 103 | border-radius: 4px; 104 | } 105 | 106 | .article-entry .highlight pre { 107 | border: none; 108 | margin: 0; 109 | padding: 0; 110 | } 111 | 112 | .article-entry .highlight table { 113 | margin: 0; 114 | width: auto; 115 | border: none; 116 | } 117 | 118 | .article-entry .highlight td { 119 | border: none; 120 | padding: 0; 121 | } 122 | 123 | .article-entry .highlight figcaption { 124 | color: highlight-comment; 125 | line-height: 1em; 126 | margin-bottom: 1em; 127 | } 128 | 129 | .article-entry .highlight figcaption:before, 130 | .article-entry .highlight figcaption:after { 131 | content: ""; 132 | display: table; 133 | } 134 | 135 | .article-entry .highlight figcaption:after { 136 | clear: both; 137 | } 138 | 139 | .article-entry .highlight figcaption a { 140 | float: right; 141 | } 142 | 143 | .article-entry .highlight .gutter pre { 144 | text-align: right; 145 | padding-right: 20px; 146 | } 147 | 148 | .article-entry .highlight .gutter pre .line { 149 | text-shadow: none; 150 | } 151 | 152 | .article-entry .highlight .line { 153 | color: highlight-foreground; 154 | min-height: 19px; 155 | } 156 | 157 | .article-entry .gist { 158 | margin: 0 -20px; 159 | border-style: solid; 160 | border-color: #ddd; 161 | border-width: 1px 0; 162 | background: #272822; 163 | padding: 15px 20px 15px 0; 164 | } 165 | 166 | .article-entry .gist .gist-file { 167 | border: none; 168 | font-family: "Source Code Pro", Consolas, Monaco, Menlo, Consolas, monospace; 169 | margin: 0; 170 | } 171 | 172 | .article-entry .gist .gist-file .gist-data { 173 | background: none; 174 | border: none; 175 | } 176 | 177 | .article-entry .gist .gist-file .gist-data .line-numbers { 178 | background: none; 179 | border: none; 180 | padding: 0 20px 0 0; 181 | } 182 | 183 | .article-entry .gist .gist-file .gist-data .line-data { 184 | padding: 0 !important; 185 | } 186 | 187 | .article-entry .gist .gist-file .highlight { 188 | margin: 0; 189 | padding: 0; 190 | border: none; 191 | } 192 | 193 | .article-entry .gist .gist-file .gist-meta { 194 | background: #272822; 195 | color: highlight-comment; 196 | font: 0.85em "Helvetica Neue", Helvetica, Arial, sans-serif; 197 | text-shadow: 0 0; 198 | padding: 0; 199 | margin-top: 1em; 200 | margin-left: 20px; 201 | } 202 | 203 | .article-entry .gist .gist-file .gist-meta a { 204 | color: #258fb8; 205 | font-weight: normal; 206 | } 207 | 208 | .article-entry .gist .gist-file .gist-meta a:hover { 209 | text-decoration: underline; 210 | } 211 | 212 | pre .comment { 213 | /* color: #75715e; */ 214 | color: highlight-green 215 | } 216 | 217 | pre .keyword, 218 | pre .function .keyword, 219 | pre .class .params { 220 | color: #66d9ef; 221 | } 222 | 223 | pre .tag, 224 | pre .doctype, 225 | pre .params, 226 | pre .function, 227 | pre .css .value { 228 | color: highlight-foreground; 229 | } 230 | 231 | pre .css~* .tag, 232 | pre .title, 233 | pre .at_rule, 234 | pre .at_rule .keyword, 235 | pre .preprocessor, 236 | pre .preprocessor .keyword { 237 | color: #f92672; 238 | } 239 | 240 | pre .attribute, 241 | pre .built_in, 242 | pre .class, 243 | pre .css~* .class, 244 | pre .function .title { 245 | color: #a6e22e; 246 | } 247 | 248 | pre .value, 249 | pre .string { 250 | color: highlight-foreground; 251 | } 252 | 253 | pre .number { 254 | color: highlight-purple 255 | } 256 | 257 | pre .id, 258 | pre .css~* .id { 259 | color: #fd971f; 260 | } 261 | -------------------------------------------------------------------------------- /source-src/css/_partial/justifiedGallery.styl: -------------------------------------------------------------------------------- 1 | /* 2 | * Justified Gallery - v4.0.0-alpha 3 | * http://miromannino.com/projects/justified-gallery/ 4 | * Copyright (c) 2019 Miro Mannino 5 | * Licensed under the MIT license. 6 | */ 7 | 8 | .justified-gallery 9 | width 100% 10 | position relative 11 | overflow hidden 12 | > a, > div, > figure 13 | position absolute 14 | display inline-block 15 | overflow hidden 16 | background gray /* To have gray placeholders while the gallery is loading with waitThumbnailsLoad = false */ 17 | opacity 1 18 | margin 0 19 | padding 0 20 | > img, > a > img, > svg, > a > svg 21 | position absolute 22 | top 50% 23 | left 50% 24 | margin 0 25 | padding 0 26 | border none 27 | opacity 1 28 | > .caption 29 | display none 30 | position absolute 31 | right 0 32 | bottom 0 33 | left 0 34 | padding 1rem 35 | background-color rgba(black, .5) 36 | background linear-gradient(to top, rgba(black, .5), transparent) 37 | color white 38 | &.caption-visible 39 | display initial 40 | > .jg-entry-visible 41 | opacity 1 42 | background none 43 | > img, > a > img, > svg, > a > svg 44 | opacity 1 45 | -webkit-transition opacity 500ms ease-in 46 | -moz-transition opacity 500ms ease-in 47 | -o-transition opacity 500ms ease-in 48 | transition opacity 500ms ease-in 49 | > .jg-filtered 50 | display none 51 | > .spinner 52 | position absolute 53 | bottom 0 54 | margin-left -24px 55 | padding 10px 0 10px 0 56 | left 50% 57 | opacity 1 58 | overflow initial 59 | > span 60 | display inline-block 61 | opacity 1 62 | width 8px 63 | height 8px 64 | margin 0 4px 0 4px 65 | background-color #000 66 | border-radius 6px 67 | -------------------------------------------------------------------------------- /source-src/css/_partial/layout.styl: -------------------------------------------------------------------------------- 1 | // Layout 2 | #app 3 | height 100% 4 | width 100% 5 | position relative 6 | overflow hidden 7 | 8 | .cover 9 | position relative 10 | padding 0 11 | margin-bottom 3rem 12 | text-align center 13 | .forkMe 14 | position absolute 15 | z-index 999 16 | top 0 17 | right 0 18 | 19 | .content, .sidebar 20 | &.anim 21 | transition(transition-base) 22 | 23 | .content 24 | position relative 25 | z-index 1 26 | margin-left 0 27 | height 100% 28 | width 100% 29 | overflow-y scroll 30 | overflow-x: hidden 31 | -webkit-overflow-scrolling touch 32 | &.on 33 | margin-left 0 !important 34 | 35 | .sidebar 36 | position fixed 37 | z-index 9 38 | left - aside-width 39 | bottom 0 40 | width aside-width 41 | height 100% 42 | background-color rgba(0,0,0,.8) 43 | &.on 44 | left 0 45 | 46 | .navbar-toggle 47 | position absolute 48 | top gutter-width 49 | left: gutter-width + aside-width 50 | border none 51 | height 4rem 52 | width 4rem 53 | border-radius 50% 54 | background-color rgba(black, .5) 55 | color white 56 | transition(transition-base) 57 | opacity .5 58 | &:hover 59 | opacity 1 60 | &::before 61 | content '\ee09' 62 | font-family remixicon 63 | font-size larger 64 | 65 | .wrap, .outer 66 | position relative 67 | width 100% 68 | padding-right gutter-width 69 | padding-left gutter-width 70 | margin auto 71 | min-height calc( 100% - 157px ) 72 | clearfix() 73 | 74 | .local-search 75 | width 100% 76 | 77 | #main 78 | position relative 79 | 80 | 81 | // Media Query 82 | @media (min-width: 768px) 83 | .cover 84 | margin-bottom 0 85 | height 100% 86 | 87 | .wrap, .outer 88 | width wrap-width 89 | padding-right 0 90 | padding-left 0 91 | .local-search 92 | width wrap-width 93 | 94 | .content 95 | &.on 96 | transform: none 97 | 98 | @media (max-width: 768px) 99 | .cover 100 | .forkMe 101 | display none 102 | .content 103 | &.on 104 | margin-left -1px !important 105 | .sidebar 106 | background-color body-color 107 | .navbar-toggle 108 | transform: scale(1.1) -------------------------------------------------------------------------------- /source-src/css/_partial/lists.styl: -------------------------------------------------------------------------------- 1 | .list-unstyled 2 | list-unstyled() -------------------------------------------------------------------------------- /source-src/css/_partial/mobile.styl: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source-src/css/_partial/navbar.styl: -------------------------------------------------------------------------------- 1 | .navbar 2 | position relative 3 | padding-top 3rem 4 | text-align center 5 | .nav 6 | list-unstyled() 7 | .nav-item-link 8 | display block 9 | padding 1rem 10 | color #bbb 11 | text-decoration none 12 | cursor pointer 13 | &:hover 14 | opacity .8 15 | background-color body-color 16 | &.nav-main 17 | height 60vh 18 | overflow-y scroll 19 | scrollbar-width none 20 | -ms-overflow-style none 21 | &::-webkit-scrollbar 22 | width 0px 23 | height 0px 24 | .nav-item-link 25 | i 26 | font-size 1rem 27 | display block 28 | line-height 1 29 | .navbar-bottom 30 | position absolute 31 | bottom 0 32 | width 100% 33 | font-size 2rem 34 | .logo 35 | text-align center 36 | margin-bottom 2rem 37 | img 38 | width logo-size 39 | 40 | 41 | -------------------------------------------------------------------------------- /source-src/css/_partial/pace.styl: -------------------------------------------------------------------------------- 1 | 2 | .pace 3 | -webkit-pointer-events none 4 | pointer-events none 5 | -webkit-user-select none 6 | -moz-user-select none 7 | user-select none 8 | .pace-progress 9 | position fixed 10 | z-index 2000 11 | top 0 12 | right 100% 13 | width 100% 14 | height .2rem 15 | background-color sea-blue 16 | 17 | .pace-inactive 18 | display none 19 | 20 | @media (max-width: 768px) 21 | .pace 22 | display none 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /source-src/css/_partial/reward.styl: -------------------------------------------------------------------------------- 1 | #reward-out 2 | position: relative 3 | width: 100% 4 | 5 | #reward-btn 6 | position relative 7 | display inline-block 8 | height 36px 9 | line-height 36px 10 | margin 60px 0 11 | padding 0 20px 12 | font-size 18px 13 | color #fff 14 | background body-color 15 | text-decoration none 16 | border-radius 4px 17 | margin-left 50% 18 | transform translateX(-50%) 19 | box-shadow 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12) 20 | transition(.4s ease-in-out) 21 | cursor pointer 22 | &:hover, 23 | &:active 24 | box-shadow 0 6px 12px rgba(0, 0, 0, 0.2), 0 4px 15px rgba(0, 0, 0, 0.2) 25 | 26 | #reward 27 | position absolute 28 | z-index 9999 29 | left 50% 30 | top 20% 31 | transform translateX(-50%) 32 | margin 60px 0 33 | padding 0px 20px 20px 34 | background-color lighten(water,30%) 35 | display none 36 | &.ready { 37 | visibility: hidden; 38 | display: block; 39 | transform: translate(-50%, -100%); 40 | transition: .3s; 41 | } 42 | 43 | &.in { 44 | visibility: visible; 45 | opacity: 1; 46 | transform: translate(-50%, 0); 47 | } 48 | .close 49 | height 28px 50 | line-height 28px 51 | width 28px 52 | display block 53 | text-align center 54 | position absolute 55 | right: -12px; 56 | top: -10px; 57 | border-radius: 50% 58 | background-color body-color 59 | cursor pointer 60 | i 61 | font-size: 20px 62 | color white 63 | .reward-p 64 | color body-color 65 | font-weight bold 66 | font-size 20px 67 | text-align center 68 | text-shadow 1px 1px 1px main-color 69 | i 70 | margin 0 10px 71 | transform translateY(2px) 72 | .reward-box 73 | display: flex 74 | justify-content space-between 75 | width 100% 76 | .reward-item 77 | text-align center 78 | margin: 0 10px 79 | .reward-type 80 | font-size 16px 81 | display block 82 | color black 83 | margin-top 10px 84 | .reward-img 85 | display block 86 | width 12rem 87 | height 12rem 88 | border-radius 3px 89 | 90 | @media (max-width: 768px) 91 | #reward 92 | padding 0 10px 10px 93 | .reward-img 94 | max-width 10rem 95 | max-height 10rem 96 | margin 0 5px -------------------------------------------------------------------------------- /source-src/css/_partial/search.styl: -------------------------------------------------------------------------------- 1 | 2 | .search-form-wrap 3 | width 100% 4 | position fixed 5 | top -100% 6 | right aside-width 7 | left 0 8 | opacity 0 9 | transition(.3s) 10 | &.on 11 | top 0 12 | opacity 1 13 | 14 | //------------- 15 | .local-search 16 | position relative 17 | margin 0 auto 18 | padding 1rem 3rem 19 | background-color rgba(body-color,.9) 20 | box-shadow 0 1rem 3rem rgba(sea, .05) 21 | max-height 100vh 22 | overflow-y auto 23 | 24 | .local-search-input 25 | font-size 120% 26 | border 0 27 | border-radius(.4rem) 28 | width 100% 29 | padding 1rem 1.5rem 30 | outline: none 31 | &::-webkit-search-results-decoration 32 | &::-webkit-search-cancel-button 33 | -webkit-appearance: none 34 | 35 | .local-search-close 36 | position absolute 37 | top 1.85rem 38 | right 4.25rem 39 | display block 40 | height 2rem 41 | width 2rem 42 | padding 0 43 | border none 44 | border-radius(50%) 45 | color white 46 | text-align center 47 | cursor pointer 48 | &::before 49 | font-size: 150% 50 | content '\eb52' 51 | font-family remixicon 52 | 53 | // 搜索结果 54 | .local-search-result 55 | text-align left 56 | 57 | .search-result-list 58 | list-unstyled() 59 | li 60 | padding 1.5rem 0 61 | &:not(:last-child) 62 | border-bottom border-width border-color solid 63 | 64 | .search-result-title 65 | font-size 1.6rem 66 | font-weight bold 67 | .search-result 68 | color white 69 | padding-top .5rem 70 | margin 0 71 | max-height 12rem 72 | overflow hidden 73 | em.search-keyword 74 | font-style normal 75 | color link-color 76 | 77 | .search-result-empty 78 | padding 2.6rem 0 0 79 | color white 80 | p 81 | text-align center 82 | -------------------------------------------------------------------------------- /source-src/css/_partial/share.styl: -------------------------------------------------------------------------------- 1 | .share-wrap { 2 | min-height: 20px; 3 | display: none; 4 | position: relative; 5 | z-index: 1; 6 | right: 0; 7 | bottom: 0; 8 | width: 250px; 9 | background-color #f5f5f5; 10 | border-radius: 2px; 11 | .arrow { 12 | position: absolute; 13 | z-index: -1; 14 | top: -3px; 15 | right:20px; 16 | display: block; 17 | width 10px; 18 | height 10px; 19 | transform: rotate(45deg); 20 | background-color #f5f5f5; 21 | } 22 | } 23 | 24 | .share-btn { 25 | float: right; 26 | position: relative; 27 | } 28 | .share-outer { 29 | display: flex; 30 | justify-content: flex-end; 31 | border: none; 32 | text-shadow: none; 33 | text-decoration: none; 34 | width auto; 35 | color: link-color; 36 | height: 28px; 37 | line-height: 26px; 38 | i{ 39 | font-size: 18px; 40 | margin-right 5px; 41 | color lighten(link-color,30%) 42 | } 43 | &:hover { 44 | transform: none; 45 | cursor: pointer; 46 | } 47 | } 48 | 49 | .share-icons { 50 | display: flex; 51 | justify-content: flex-end; 52 | align-items: center; 53 | flex-wrap: wrap; 54 | 55 | a { 56 | border-radius: 50%; 57 | display: inline-block; 58 | vertical-align: middle; 59 | zoom: 1; 60 | margin: 3px; 61 | transition: 0.3s; 62 | text-align: center; 63 | color: main-color; 64 | width: 28px; 65 | height: 28px; 66 | line-height: 26px; 67 | font-size: 13px; 68 | i { 69 | font-size: 24px 70 | } 71 | &.weibo { 72 | color weibo-color 73 | } 74 | &.weixin { 75 | color wechat-color 76 | } 77 | &.qq { 78 | color qq-color 79 | } 80 | &.douban { 81 | color douban-color 82 | } 83 | &.twitter { 84 | color twitter-color 85 | } 86 | &.facebook { 87 | color facebook-color 88 | } 89 | &.google { 90 | color google-color 91 | } 92 | &:active { 93 | color: ocean; 94 | } 95 | 96 | &:hover { 97 | transform: scale(1.2); 98 | } 99 | } 100 | } 101 | 102 | .wx-share-modal { 103 | position: fixed; 104 | top: 24%; 105 | left: 50%; 106 | z-index: 9999; 107 | padding: 20px; 108 | text-align: center; 109 | color: #727272; 110 | background: #fff; 111 | border-radius: 4px; 112 | box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12); 113 | opacity: 0; 114 | transform: translate(-50%, -200%); 115 | 116 | p { 117 | margin-bottom: 10px; 118 | } 119 | 120 | &.ready { 121 | visibility: 0; 122 | display: block; 123 | transform: translate(-50%, -100%); 124 | transition: .3s; 125 | } 126 | 127 | &.in { 128 | display: block; 129 | visibility: visible; 130 | opacity: 1; 131 | transform: translate(-50%, 0); 132 | } 133 | 134 | .modal-close { 135 | position: absolute; 136 | right: 15px; 137 | top: 15px; 138 | color: rgba(0, 0, 0, .2); 139 | font-size: 16px; 140 | line-height: 20px; 141 | i{ 142 | font-size: 24px; 143 | } 144 | 145 | &:hover, 146 | &:active { 147 | color: rgba(0, 0, 0, .4); 148 | } 149 | } 150 | } 151 | 152 | #share-mask{ 153 | position: fixed; 154 | width: 100%; 155 | height: 100%; 156 | left: 0; 157 | top: 0; 158 | background-color rgba(0,0,0,.6); 159 | z-index: 999; 160 | display: none; 161 | } -------------------------------------------------------------------------------- /source-src/css/_partial/sidebar.styl: -------------------------------------------------------------------------------- 1 | @import "navbar" 2 | @import "totop" -------------------------------------------------------------------------------- /source-src/css/_partial/tag.styl: -------------------------------------------------------------------------------- 1 | // Tags 2 | 3 | .tag-list 4 | list-unstyled() 5 | margin-right -.5rem 6 | margin-left -.5rem 7 | > .tag-list-item 8 | display inline-block 9 | padding .5rem 1rem 10 | font-size 120% 11 | &:before 12 | content "\eec3" 13 | font-family remixicon 14 | margin-right .5rem 15 | display inline-block 16 | vertical-align middle 17 | color: tag-color 18 | .tag-list-link 19 | display inline-block 20 | vertical-align middle 21 | text-decoration: none 22 | height 30px 23 | line-height 30px 24 | padding: 0 15px 25 | font-size: 1.5rem 26 | border-radius: 15px 27 | background-color tag-color 28 | color white 29 | box-shadow: 0 3px 5px rgba(0,0,0,0.12) 30 | transition: .2s 31 | &:hover 32 | transform: scale(1.1) 33 | -------------------------------------------------------------------------------- /source-src/css/_partial/tocbot.styl: -------------------------------------------------------------------------------- 1 | 2 | .tocbot 3 | padding 20px 4 | position absolute 5 | right -28rem 6 | top 14rem 7 | font-size 80% 8 | opacity .95 9 | max-width 255px 10 | border-radius 8px 11 | >.toc-list 12 | position relative 13 | overflow-x hidden 14 | overflow-y scroll 15 | max-height 70vh 16 | 17 | >.toc-list::-webkit-scrollbar 18 | width 4px 19 | 20 |   >.toc-list::-webkit-scrollbar-thumb 21 | border-radius 10px 22 | -webkit-box-shadow inset 0 0 5px rgba(0,0,0,0.2) 23 | background rgba(0,0,0,0.2) 24 | 25 |   >.toc-list::-webkit-scrollbar-track 26 | -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2) 27 | border-radius: 0 28 | background: rgba(0,0,0,0.1) 29 | 30 | 31 | 32 | .toc-list 33 | list-unstyled() 34 | padding-left 1rem 35 | 36 | 37 | a.toc-link 38 | height 100% 39 | color sea-dark 40 | text-decoration none 41 | font-size 115% 42 | 43 | 44 | .is-collapsible 45 | max-height 1000px 46 | overflow hidden 47 | transition all 300ms ease-in-out 48 | 49 | 50 | .is-collapsed 51 | max-height 0 52 | 53 | 54 | .is-position-fixed 55 | position fixed !important 56 | top 0 57 | right 6rem 58 | background-color #fff 59 | z-index 996 60 | 61 | // Left line before pseudo element. 62 | .toc-link::before 63 | background-color water 64 | content ' ' 65 | display inline-block 66 | height inherit 67 | left 0 68 | margin-top -1px 69 | position absolute 70 | width 2px 71 | 72 | .is-active-link::before 73 | background-color sea-blue 74 | 75 | .is-active-link 76 | font-weight 700 -------------------------------------------------------------------------------- /source-src/css/_partial/totop.styl: -------------------------------------------------------------------------------- 1 | 2 | @keyframes rocket { 3 | 0% { 4 | transform translateY(0) 5 | opacity 1; 6 | } 7 | 45% { 8 | transform translateY(-3.2rem) 9 | opacity 0; 10 | } 11 | 55% { 12 | transform translateY(3.2rem) 13 | opacity 0; 14 | } 15 | 100% { 16 | transform translateY(0) 17 | opacity 1; 18 | } 19 | } 20 | 21 | .totop,.todark 22 | position relative 23 | display block 24 | overflow hidden 25 | cursor pointer 26 | rounded-circle(3.2rem) 27 | background-color darken(froth-light,2%) 28 | line-height 3rem 29 | opacity .6 30 | transition(opacity 1s ease) 31 | &:hover 32 | opacity 1 33 | 34 | .totop 35 | margin-bottom .8rem 36 | &:hover > i { 37 | animation rocket .3s ease-in-out 38 | } -------------------------------------------------------------------------------- /source-src/css/_remixicon.styl: -------------------------------------------------------------------------------- 1 | /* 2 | * Remix Icon v2.1.0 3 | * https://remixicon.com 4 | * https://github.com/Remix-Design/RemixIcon 5 | * 6 | * Copyright RemixIcon.com 7 | * Released under the Apache License Version 2.0 8 | * 9 | * Date: 2019-11-03 10 | */ 11 | 12 | // variables 13 | remixicon-font-path = './remixicon/fonts/' !default; 14 | 15 | @font-face 16 | font-family: remixicon; 17 | src: url(remixicon-font-path +'remixicon.eot'); /* IE9*/ 18 | src: url(remixicon-font-path +'remixicon.eot#iefix') format('embedded-opentype'), /* IE6-IE8 */ 19 | url(remixicon-font-path +'remixicon.woff2') format("woff2"), 20 | url(remixicon-font-path +'remixicon.woff') format("woff"), 21 | url(remixicon-font-path +'remixicon.ttf') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ 22 | url(remixicon-font-path +'remixicon.svg#remixicon') format('svg'); /* iOS 4.1- */ 23 | font-display: swap; 24 | 25 | 26 | [class^="ri-"], [class*=" ri-"] 27 | display inline-block; 28 | font-family: 'remixicon' !important; 29 | font-style: normal; 30 | -webkit-font-smoothing: antialiased; 31 | -moz-osx-font-smoothing: grayscale; 32 | -------------------------------------------------------------------------------- /source-src/css/_variables.styl: -------------------------------------------------------------------------------- 1 | // Config 2 | support-for-ie = false 3 | vendor-prefixes = webkit moz ms official 4 | 5 | // Fonts 6 | font-size-browser = 62.5% 7 | font-size-base = 1.4rem 8 | font-family-base = "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif 9 | font-line-height = 1.7 10 | 11 | // Colors 12 | black = #000000 13 | water = #cce5ff 14 | water-green = #9c9 15 | sea-blue = #3d85c6 16 | sea-dark = #172d3e 17 | sea = #1e3e3f 18 | sea-light = #253145 19 | sea-lighter = #5c6b72 20 | gray = #adb5bd 21 | froth-light = #f4f4f4 22 | froth = #999 23 | white = #ffffff 24 | sand-light = #9c8079 25 | sand = #9e6a4d 26 | sand-dark = #5c5858 27 | sand-gray = #bbb 28 | red = #ea434a 29 | 30 | // Share Colors 31 | weibo-color = #d81e06 32 | wechat-color = #51c332 33 | qq-color = #4cafe9 34 | douban-color = #05b711 35 | twitter-color = #00aced 36 | facebook-color = #3b5998 37 | pinterest-color = #cb2027 38 | google-color = #dd4b39 39 | 40 | // Link Colors 41 | link-color = #0681d0 42 | link-hover-color = lighten(link-color, 20%) 43 | link-active-color = darken(link-color, 5%) 44 | disabled-color = gray 45 | 46 | // Body Colors 47 | body-background = white 48 | body-color = darken(sand-dark,30%) 49 | main-color = darken(water,20%) 50 | tag-color = lighten(body-color,15%) 51 | 52 | // Border 53 | border-radius = 0.4rem 54 | border-width = 0.1rem 55 | border-color = froth 56 | 57 | // Layout 58 | aside-width = 8rem 59 | wrap-width = 70rem 60 | years-width = 6rem 61 | logo-size = 4.2rem 62 | cover-logo-size = 6rem 63 | 64 | gutter-width = 1.5rem 65 | 66 | // Breakpoints 67 | breakpoints = ( 68 | xs = 0, 69 | sm = 576px, 70 | md = 768px, 71 | lg = 992px, 72 | xl = 1200px 73 | ) 74 | 75 | // Transition 76 | transition-slow = all .7s ease-in-out 0s 77 | transition-fast = all .1s ease-in-out 0s 78 | transition-base = all .3s ease-in-out 79 | transition-fade = opacity .15s linear 80 | transition-collapse = height .35s ease 81 | -------------------------------------------------------------------------------- /source-src/css/style.styl: -------------------------------------------------------------------------------- 1 | @import "_variables" 2 | @import "_mixins" 3 | @import "_normalize" 4 | @import "_darkmode" 5 | 6 | *, 7 | *::before 8 | *::after 9 | box-sizing border-box 10 | 11 | html, body 12 | height: 100% 13 | 14 | html 15 | font-size font-size-browser 16 | -webkit-text-size-adjust 100% 17 | -ms-text-size-adjust 100% 18 | -ms-overflow-style scrollbar 19 | -webkit-tap-highlight-color transparent 20 | 21 | body 22 | position relative 23 | background-color body-background 24 | font-family font-family-base 25 | font-size font-size-base 26 | line-height font-line-height 27 | color body-color 28 | padding 0 29 | margin 0 30 | overflow-x hidden 31 | text-size-adjust 100% 32 | //Dark Mode 33 | &.darkmode 34 | darkmode() 35 | 36 | a 37 | color link-color 38 | &:hover 39 | color link-hover-color 40 | &:active 41 | color link-active-color 42 | &.disabled 43 | color disabled-color 44 | ul, menu, dir 45 | margin 0 46 | padding 0 47 | img 48 | max-width 100% 49 | 50 | button 51 | outline: 0 52 | cursor pointer 53 | 54 | @import "_extend" 55 | @import "_partial/layout" 56 | @import "_partial/lists" 57 | @import "_partial/categories" 58 | @import "_partial/tag" 59 | @import "_partial/ayer" 60 | @import "_partial/search" 61 | @import "_partial/article" 62 | @import "_partial/articles" 63 | @import "_partial/archive" 64 | @import "_partial/footer" 65 | @import "_partial/float" 66 | @import "_partial/highlight" 67 | @import "_partial/mobile" 68 | @import "_partial/pace" 69 | @import "_partial/gitalk" 70 | @import "_partial/apple" 71 | @import "_partial/reward" 72 | @import "_partial/share" 73 | @import "_partial/friends" 74 | @import "_partial/ads" 75 | 76 | if sidebar 77 | @import "_partial/sidebar" 78 | 79 | //Media Query 80 | @media (max-width: 768px) 81 | html 82 | font-size: 60% -------------------------------------------------------------------------------- /source-src/js/ayer.js: -------------------------------------------------------------------------------- 1 | (function ($) { 2 | // Search 3 | let $searchWrap = $(".search-form-wrap"), 4 | isSearchAnim = false, 5 | searchAnimDuration = 200; 6 | 7 | const startSearchAnim = () => { 8 | isSearchAnim = true; 9 | }; 10 | 11 | const stopSearchAnim = (callback) => { 12 | setTimeout(function () { 13 | isSearchAnim = false; 14 | callback && callback(); 15 | }, searchAnimDuration); 16 | }; 17 | 18 | $(".nav-item-search").on("click", () => { 19 | if (isSearchAnim) return; 20 | startSearchAnim(); 21 | $searchWrap.addClass("on"); 22 | stopSearchAnim(function () { 23 | $(".local-search-input").focus(); 24 | }); 25 | }); 26 | 27 | $(document).on("mouseup", (e) => { 28 | const _con = $(".local-search"); 29 | if (!_con.is(e.target) && _con.has(e.target).length === 0) { 30 | $searchWrap.removeClass("on"); 31 | } 32 | }); 33 | 34 | // Not recommended in mobile, /search.xml is actually large. 35 | if ($(".local-search").length) { 36 | $.getScript("/js/search.js", function () { 37 | searchFunc("/search.xml", "local-search-input", "local-search-result"); 38 | }); 39 | } 40 | 41 | // Mobile Detect 42 | const isMobile = { 43 | Android: function () { 44 | return navigator.userAgent.match(/Android/i); 45 | }, 46 | BlackBerry: function () { 47 | return navigator.userAgent.match(/BlackBerry/i); 48 | }, 49 | iOS: function () { 50 | return navigator.userAgent.match(/iPhone|iPad|iPod/i); 51 | }, 52 | Opera: function () { 53 | return navigator.userAgent.match(/Opera Mini/i); 54 | }, 55 | Windows: function () { 56 | return navigator.userAgent.match(/IEMobile/i); 57 | }, 58 | any: function () { 59 | return ( 60 | isMobile.Android() || 61 | isMobile.BlackBerry() || 62 | isMobile.iOS() || 63 | isMobile.Opera() || 64 | isMobile.Windows() 65 | ); 66 | }, 67 | }; 68 | 69 | // Share 70 | $(".share-outer").on("click", () => $(".share-wrap").fadeToggle()); 71 | 72 | // Lazyload 73 | $("img.lazy").lazyload({ 74 | effect: "fadeIn", 75 | }); 76 | 77 | // JustifiedGallery 78 | $("#gallery").justifiedGallery({ 79 | rowHeight: 200, 80 | margins: 5, 81 | }); 82 | 83 | // ScrollDown 84 | $(document).ready(function ($) { 85 | $(".anchor").on("click", function (e) { 86 | e.preventDefault(); 87 | $("main").animate({ scrollTop: $(".cover").height() }, "smooth"); 88 | }); 89 | }); 90 | 91 | // To Top 92 | (() => { 93 | // When to show the scroll link 94 | // higher number = scroll link appears further down the page 95 | const upperLimit = 1000; 96 | 97 | // Our scroll link element 98 | const scrollElem = $("#totop"); 99 | 100 | // Scroll to top speed 101 | const scrollSpeed = 1000; 102 | 103 | // Show and hide the scroll to top link based on scroll position 104 | scrollElem.hide(); 105 | $(".content").on("scroll", () => { 106 | const scrollTop = $(".content").scrollTop(); 107 | if (scrollTop > upperLimit) { 108 | $(scrollElem).stop().fadeTo(200, 0.6); // fade back in 109 | } else { 110 | $(scrollElem).stop().fadeTo(200, 0); // fade out 111 | } 112 | }); 113 | 114 | // Scroll to top animation on click 115 | $(scrollElem).on("click", () => { 116 | $(".content").animate({ scrollTop: 0 }, scrollSpeed); 117 | return false; 118 | }); 119 | })(); 120 | 121 | // Caption 122 | $(".article-entry").each(function (i) { 123 | $(this) 124 | .find("img") 125 | .each(function () { 126 | if ($(this).parent().is("a")) return; 127 | 128 | const { alt } = this; 129 | 130 | if (alt) $(this).after('' + alt + ""); 131 | }); 132 | }); 133 | 134 | // Mobile Nav 135 | const $content = $(".content"), 136 | $sidebar = $(".sidebar"); 137 | 138 | $(".navbar-toggle").on("click", () => { 139 | $(".content,.sidebar").addClass("anim"); 140 | $content.toggleClass("on"); 141 | $sidebar.toggleClass("on"); 142 | }); 143 | 144 | // Reward 145 | $("#reward-btn").on("click", () => { 146 | $("#reward").fadeIn(150); 147 | $("#mask").fadeIn(150); 148 | }); 149 | $("#reward .close, #mask").on("click", () => { 150 | $("#mask").fadeOut(100); 151 | $("#reward").fadeOut(100); 152 | }); 153 | 154 | // DarkMode 155 | if (sessionStorage.getItem("darkmode") == 1) { 156 | $("body").addClass("darkmode"); 157 | $("#todark i").removeClass("ri-moon-line").addClass("ri-sun-line"); 158 | } else { 159 | $("body").removeClass("darkmode"); 160 | $("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line"); 161 | } 162 | $("#todark").on("click", () => { 163 | if (sessionStorage.getItem("darkmode") == 1) { 164 | $("body").removeClass("darkmode"); 165 | $("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line"); 166 | sessionStorage.removeItem("darkmode"); 167 | } else { 168 | $("body").addClass("darkmode"); 169 | $("#todark i").removeClass("ri-moon-line").addClass("ri-sun-line"); 170 | sessionStorage.setItem("darkmode", 1); 171 | } 172 | }); 173 | 174 | // ShowThemeInConsole 175 | const ayerInfo = "主题不错?⭐star 支持一下 ->"; 176 | const ayerURL = "https://github.com/Shen-Yu/hexo-theme-ayer"; 177 | const ayerNameStr = 178 | "\n\n _ __ _______ _____ \n / \\ \\ \\ / / ____| _ \\ \n / _ \\ \\ V /| _| | |_) | \n / ___ \\ | | | |___| _ < \n /_/ \\_\\ _| |_____|_| \\__\\ \n"; 179 | const ayerInfoStyle = 180 | "background-color: #49b1f5; color: #fff; padding: 8px; font-size: 14px;"; 181 | const ayerURLStyle = 182 | "background-color: #ffbca2; padding: 8px; font-size: 14px;"; 183 | const ayerNameStyle = "background-color: #eaf8ff;"; 184 | 185 | console.log( 186 | "%c%s%c%s%c%s", 187 | ayerInfoStyle, 188 | ayerInfo, 189 | ayerURLStyle, 190 | ayerURL, 191 | ayerNameStyle, 192 | ayerNameStr 193 | ); 194 | })(jQuery); 195 | 196 | // Tracking 197 | !(function (p) { 198 | "use strict"; 199 | !(function (t) { 200 | var s = window, 201 | e = document, 202 | i = p, 203 | c = "".concat( 204 | "https:" === e.location.protocol ? "https://" : "http://", 205 | "sdk.51.la/js-sdk-pro.min.js" 206 | ), 207 | n = e.createElement("script"), 208 | r = e.getElementsByTagName("script")[0]; 209 | (n.type = "text/javascript"), 210 | n.setAttribute("charset", "UTF-8"), 211 | (n.async = !0), 212 | (n.src = c), 213 | (n.id = "LA_COLLECT"), 214 | (i.d = n); 215 | var o = function () { 216 | s.LA.ids.push(i); 217 | }; 218 | s.LA ? s.LA.ids && o() : ((s.LA = p), (s.LA.ids = []), o()), 219 | r.parentNode.insertBefore(n, r); 220 | })(); 221 | })({ id: "JGjrOr2rebvP6q2a", ck: "JGjrOr2rebvP6q2a" }); 222 | -------------------------------------------------------------------------------- /source-src/js/share.js: -------------------------------------------------------------------------------- 1 | 2 | function generate(url, opts) { 3 | var url = url.replace(/<%-sUrl%>/g, encodeURIComponent(opts.sUrl)) 4 | .replace(/<%-sTitle%>/g, encodeURIComponent(opts.sTitle)) 5 | .replace(/<%-sDesc%>/g, encodeURIComponent(opts.sDesc)) 6 | .replace(/<%-sPic%>/g, encodeURIComponent(opts.sPic)); 7 | window.open(url); 8 | } 9 | 10 | function showWX() { 11 | $('.wx-share-modal').addClass('in ready') 12 | $('#share-mask').show() 13 | } 14 | 15 | function hideWX() { 16 | $('.wx-share-modal').removeClass('in ready') 17 | $('#share-mask').hide() 18 | } 19 | 20 | function handleClick(type, opts) { 21 | if (type === 'weibo') { 22 | generate('http://service.weibo.com/share/share.php?url=<%-sUrl%>&title=<%-sTitle%>&pic=<%-sPic%>', opts) 23 | } else if (type === 'qq') { 24 | generate('http://connect.qq.com/widget/shareqq/index.html?url=<%-sUrl%>&title=<%-sTitle%>&source=<%-sDesc%>', opts) 25 | } else if (type === 'douban') { 26 | generate('https://www.douban.com/share/service?image=<%-sPic%>&href=<%-sUrl%>&name=<%-sTitle%>&text=<%-sDesc%>', opts) 27 | } else if (type === 'qzone') { 28 | generate('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=<%-sUrl%>&title=<%-sTitle%>&pics=<%-sPic%>&summary=<%-sDesc%>', opts) 29 | } else if (type === 'facebook') { 30 | generate('https://www.facebook.com/sharer/sharer.php?u=<%-sUrl%>', opts) 31 | } else if (type === 'twitter') { 32 | generate('https://twitter.com/intent/tweet?text=<%-sTitle%>&url=<%-sUrl%>', opts) 33 | } else if (type === 'google') { 34 | generate('https://plus.google.com/share?url=<%-sUrl%>', opts) 35 | } else if (type === 'weixin') { 36 | showWX(); 37 | } 38 | } 39 | 40 | const share_init = () => { 41 | let $sns = document.querySelectorAll('.share-sns'); 42 | if (!$sns || $sns.length === 0) return; 43 | let sUrl = window.location.href; 44 | let sTitle = document.querySelector('title').innerHTML; 45 | let $img = document.querySelectorAll('.article-entry img'); 46 | let sPic = $img.length ? document.querySelector('.article-entry img').getAttribute('src') : ''; 47 | if ((sPic !== '') && !/^(http:|https:)?\/\//.test(sPic)) { 48 | sPic = window.location.origin + sPic 49 | } 50 | $sns.forEach(($em) => { 51 | $em.onclick = (e) => { 52 | let type = $em.getAttribute('data-type') 53 | handleClick(type, { 54 | sUrl: sUrl, 55 | sPic: sPic, 56 | sTitle: sTitle, 57 | sDesc: sTitle 58 | }) 59 | } 60 | }) 61 | 62 | document.querySelector('#mask').onclick = hideWX 63 | document.querySelector('.modal-close').onclick = hideWX 64 | } 65 | 66 | share_init() -------------------------------------------------------------------------------- /source-src/main.js: -------------------------------------------------------------------------------- 1 | import "./css/style.styl"; 2 | import "./js/ayer"; 3 | import "./js/share"; 4 | -------------------------------------------------------------------------------- /source/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 404 6 | 7 | 8 | 12 | 50 | 51 | 52 | 53 |
54 | 55 | 59 | 60 |
61 |
62 |

404
Not Found!

63 |

64 | Please check it, Maybe you should read 65 | Hexo and 66 | Ayer Docs 67 | carefully. 68 |

69 |

70 | 亲,获取不到该路径的页面呢,请检查一下哦,可能你还需要仔细阅读 71 | Hexo 和 72 | Ayer 的说明文档~ 73 |

74 |
75 | 76 |
77 |
78 | 79 | 80 | -------------------------------------------------------------------------------- /source/css/clipboard.styl: -------------------------------------------------------------------------------- 1 | // 代码块复制按钮 2 | if hexo-config('copy_btn') == true 3 | .highlight 4 | position: relative 5 | 6 | .btn-copy 7 | z-index: 1 8 | display: inline-block 9 | cursor: pointer 10 | border: none 11 | disable-user-select() 12 | -webkit-appearance: none 13 | font-size: 12px 14 | font-weight: bold 15 | padding: 3px 6px 16 | >i 17 | margin-right: 4px 18 | font-size: 10px 19 | transform: translateY(1px); 20 | color: #333 21 | background: rgba(255,255,255,.8) 22 | border-radius: 2px 23 | position: absolute 24 | top: 0 25 | right: 0 26 | opacity: 0 27 | transition: all linear .2s 28 | &:hover 29 | background: rgba(255,255,255,.7) 30 | 31 | .highlight:hover .btn-copy 32 | opacity: 1 33 | 34 | .article pre:hover .btn-copy 35 | opacity: 1 36 | -------------------------------------------------------------------------------- /source/css/custom.styl: -------------------------------------------------------------------------------- 1 | $wrap-width = convert(hexo-config('layout.article_width')) 2 | $aside-width = convert(hexo-config('layout.sidebar_width')) 3 | $mouse-url = convert(hexo-config('mouse.path')) 4 | 5 | if hexo-config('mouse.enable') 6 | body 7 | cursor: url($mouse-url),auto; 8 | 9 | .sidebar 10 | left - $aside-width 11 | width $aside-width 12 | &.on 13 | left 0 14 | .content 15 | &.on 16 | margin-left 0 !important 17 | .navbar-toggle 18 | left 1.5rem + $aside-width 19 | .search-form-wrap 20 | right $aside-width 21 | 22 | @media(min-width: 768px) 23 | .outer, .wrap 24 | width $wrap-width !important 25 | @media(max-width: 768px) 26 | .tocbot 27 | display none !important 28 | .sidebar 29 | left 0 30 | &.on 31 | left - $aside-width 32 | .content 33 | transform translateX($aside-width) 34 | &.on 35 | transform translateX(0) 36 | 37 | -------------------------------------------------------------------------------- /source/css/fonts/remixicon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/css/fonts/remixicon.eot -------------------------------------------------------------------------------- /source/css/fonts/remixicon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/css/fonts/remixicon.ttf -------------------------------------------------------------------------------- /source/css/fonts/remixicon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/css/fonts/remixicon.woff -------------------------------------------------------------------------------- /source/css/fonts/remixicon.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/css/fonts/remixicon.woff2 -------------------------------------------------------------------------------- /source/dist/main.js: -------------------------------------------------------------------------------- 1 | !function(){"use strict";var e;function t(e,t){e=e.replace(/<%-sUrl%>/g,encodeURIComponent(t.sUrl)).replace(/<%-sTitle%>/g,encodeURIComponent(t.sTitle)).replace(/<%-sDesc%>/g,encodeURIComponent(t.sDesc)).replace(/<%-sPic%>/g,encodeURIComponent(t.sPic));window.open(e)}function o(){$(".wx-share-modal").removeClass("in ready"),$("#share-mask").hide()}function s(e,o){"weibo"===e?t("http://service.weibo.com/share/share.php?url=<%-sUrl%>&title=<%-sTitle%>&pic=<%-sPic%>",o):"qq"===e?t("http://connect.qq.com/widget/shareqq/index.html?url=<%-sUrl%>&title=<%-sTitle%>&source=<%-sDesc%>",o):"douban"===e?t("https://www.douban.com/share/service?image=<%-sPic%>&href=<%-sUrl%>&name=<%-sTitle%>&text=<%-sDesc%>",o):"qzone"===e?t("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=<%-sUrl%>&title=<%-sTitle%>&pics=<%-sPic%>&summary=<%-sDesc%>",o):"facebook"===e?t("https://www.facebook.com/sharer/sharer.php?u=<%-sUrl%>",o):"twitter"===e?t("https://twitter.com/intent/tweet?text=<%-sTitle%>&url=<%-sUrl%>",o):"google"===e?t("https://plus.google.com/share?url=<%-sUrl%>",o):"weixin"===e&&($(".wx-share-modal").addClass("in ready"),$("#share-mask").show())}!function(e){let t=e(".search-form-wrap"),o=!1;e(".nav-item-search").on("click",(()=>{var s;o||(o=!0,t.addClass("on"),s=function(){e(".local-search-input").focus()},setTimeout((function(){o=!1,s&&s()}),200))})),e(document).on("mouseup",(o=>{const s=e(".local-search");s.is(o.target)||0!==s.has(o.target).length||t.removeClass("on")})),e(".local-search").length&&e.getScript("/js/search.js",(function(){searchFunc("/search.xml","local-search-input","local-search-result")})),e(".share-outer").on("click",(()=>e(".share-wrap").fadeToggle())),e("img.lazy").lazyload({effect:"fadeIn"}),e("#gallery").justifiedGallery({rowHeight:200,margins:5}),e(document).ready((function(e){e(".anchor").on("click",(function(t){t.preventDefault(),e("main").animate({scrollTop:e(".cover").height()},"smooth")}))})),(()=>{const t=e("#totop");t.hide(),e(".content").on("scroll",(()=>{e(".content").scrollTop()>1e3?e(t).stop().fadeTo(200,.6):e(t).stop().fadeTo(200,0)})),e(t).on("click",(()=>(e(".content").animate({scrollTop:0},1e3),!1)))})(),e(".article-entry").each((function(t){e(this).find("img").each((function(){if(e(this).parent().is("a"))return;const{alt:t}=this;t&&e(this).after(''+t+"")}))}));const s=e(".content"),r=e(".sidebar");e(".navbar-toggle").on("click",(()=>{e(".content,.sidebar").addClass("anim"),s.toggleClass("on"),r.toggleClass("on")})),e("#reward-btn").on("click",(()=>{e("#reward").fadeIn(150),e("#mask").fadeIn(150)})),e("#reward .close, #mask").on("click",(()=>{e("#mask").fadeOut(100),e("#reward").fadeOut(100)})),1==sessionStorage.getItem("darkmode")?(e("body").addClass("darkmode"),e("#todark i").removeClass("ri-moon-line").addClass("ri-sun-line")):(e("body").removeClass("darkmode"),e("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line")),e("#todark").on("click",(()=>{1==sessionStorage.getItem("darkmode")?(e("body").removeClass("darkmode"),e("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line"),sessionStorage.removeItem("darkmode")):(e("body").addClass("darkmode"),e("#todark i").removeClass("ri-moon-line").addClass("ri-sun-line"),sessionStorage.setItem("darkmode",1))}));console.log("%c%s%c%s%c%s","background-color: #49b1f5; color: #fff; padding: 8px; font-size: 14px;","主题不错?⭐star 支持一下 ->","background-color: #ffbca2; padding: 8px; font-size: 14px;","https://github.com/Shen-Yu/hexo-theme-ayer","background-color: #eaf8ff;","\n\n _ __ _______ _____ \n / \\ \\ \\ / / ____| _ \\ \n / _ \\ \\ V /| _| | |_) | \n / ___ \\ | | | |___| _ < \n /_/ \\_\\ _| |_____|_| \\__\\ \n")}(jQuery),e={id:"JGjrOr2rebvP6q2a",ck:"JGjrOr2rebvP6q2a"},function(t){var o=window,s=document,r=e,n="".concat("https:"===s.location.protocol?"https://":"http://","sdk.51.la/js-sdk-pro.min.js"),a=s.createElement("script"),c=s.getElementsByTagName("script")[0];a.type="text/javascript",a.setAttribute("charset","UTF-8"),a.async=!0,a.src=n,a.id="LA_COLLECT",r.d=a;var i=function(){o.LA.ids.push(r)};o.LA?o.LA.ids&&i():(o.LA=e,o.LA.ids=[],i()),c.parentNode.insertBefore(a,c)}();(()=>{let e=document.querySelectorAll(".share-sns");if(!e||0===e.length)return;let t=window.location.href,r=document.querySelector("title").innerHTML,n=document.querySelectorAll(".article-entry img").length?document.querySelector(".article-entry img").getAttribute("src"):"";""===n||/^(http:|https:)?\/\//.test(n)||(n=window.location.origin+n),e.forEach((e=>{e.onclick=o=>{s(e.getAttribute("data-type"),{sUrl:t,sPic:n,sTitle:r,sDesc:r})}})),document.querySelector("#mask").onclick=o,document.querySelector(".modal-close").onclick=o})()}(); 2 | -------------------------------------------------------------------------------- /source/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/favicon.ico -------------------------------------------------------------------------------- /source/images/404.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/images/404.jpg -------------------------------------------------------------------------------- /source/images/alipay.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/images/alipay.jpg -------------------------------------------------------------------------------- /source/images/ayer-side.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/images/ayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/images/ayer.png -------------------------------------------------------------------------------- /source/images/ayer.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/images/beian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/images/beian.png -------------------------------------------------------------------------------- /source/images/cover1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/images/cover1.jpg -------------------------------------------------------------------------------- /source/images/cover2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/images/cover2.jpg -------------------------------------------------------------------------------- /source/images/cover3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/images/cover3.jpg -------------------------------------------------------------------------------- /source/images/cover4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/images/cover4.jpg -------------------------------------------------------------------------------- /source/images/cover5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/images/cover5.jpg -------------------------------------------------------------------------------- /source/images/cover6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/images/cover6.jpg -------------------------------------------------------------------------------- /source/images/cover7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/images/cover7.jpg -------------------------------------------------------------------------------- /source/images/forkme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/images/forkme.png -------------------------------------------------------------------------------- /source/images/gitee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/images/gitee.png -------------------------------------------------------------------------------- /source/images/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/images/github.png -------------------------------------------------------------------------------- /source/images/hexo-tag-chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/images/hexo-tag-chart.png -------------------------------------------------------------------------------- /source/images/hexo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/images/hexo.png -------------------------------------------------------------------------------- /source/images/mouse.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/images/mouse.cur -------------------------------------------------------------------------------- /source/images/sponsor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/images/sponsor.jpg -------------------------------------------------------------------------------- /source/images/wechat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shen-yu/hexo-theme-ayer/4b6891732f923f32ccc558e1252a854e6c31e31d/source/images/wechat.jpg -------------------------------------------------------------------------------- /source/js/busuanzi-2.3.pure.min.js: -------------------------------------------------------------------------------- 1 | var bszCaller,bszTag;!function(){var c,d,e,a=!1,b=[];ready=function(c){return a||"interactive"===document.readyState||"complete"===document.readyState?c.call(document):b.push(function(){return c.call(this)}),this},d=function(){for(var a=0,c=b.length;c>a;a++)b[a].apply(document);b=[]},e=function(){a||(a=!0,d.call(window),document.removeEventListener?document.removeEventListener("DOMContentLoaded",e,!1):document.attachEvent&&(document.detachEvent("onreadystatechange",e),window==window.top&&(clearInterval(c),c=null)))},document.addEventListener?document.addEventListener("DOMContentLoaded",e,!1):document.attachEvent&&(document.attachEvent("onreadystatechange",function(){/loaded|complete/.test(document.readyState)&&e()}),window==window.top&&(c=setInterval(function(){try{a||document.documentElement.doScroll("left")}catch(b){return}e()},5)))}(),bszCaller={fetch:function(a,b){var c="BusuanziCallback_"+Math.floor(1099511627776*Math.random());window[c]=this.evalCall(b),a=a.replace("=BusuanziCallback","="+c),scriptTag=document.createElement("SCRIPT"),scriptTag.type="text/javascript",scriptTag.defer=!0,scriptTag.src=a,document.getElementsByTagName("HEAD")[0].appendChild(scriptTag)},evalCall:function(a){return function(b){ready(function(){try{a(b),scriptTag.parentElement.removeChild(scriptTag)}catch(c){bszTag.hides()}})}}},bszCaller.fetch("//busuanzi.ibruce.info/busuanzi?jsonpCallback=BusuanziCallback",function(a){bszTag.texts(a),bszTag.shows()}),bszTag={bszs:["site_pv","page_pv","site_uv"],texts:function(a){this.bszs.map(function(b){var c=document.getElementById("busuanzi_value_"+b);c&&(c.innerHTML=a[b])})},hides:function(){this.bszs.map(function(a){var b=document.getElementById("busuanzi_container_"+a);b&&(b.style.display="none")})},shows:function(){this.bszs.map(function(a){var b=document.getElementById("busuanzi_container_"+a);b&&(b.style.display="inline")})}}; -------------------------------------------------------------------------------- /source/js/clickBoom1.js: -------------------------------------------------------------------------------- 1 | const numberOfParticules = 20; 2 | 3 | const minOrbitRadius = 50; 4 | const maxOrbitRadius = 100; 5 | 6 | const minCircleRadius = 10; 7 | const maxCircleRadius = 20; 8 | 9 | const minAnimeDuration = 900; 10 | const maxAnimeDuration = 1500; 11 | 12 | const minDiffuseRadius = 50; 13 | const maxDiffuseRadius = 100; 14 | 15 | let canvasEl = document.querySelector(".fireworks"); 16 | let ctx = canvasEl.getContext("2d"); 17 | let pointerX = 0; 18 | let pointerY = 0; 19 | 20 | let tap = 21 | "ontouchstart" in window || navigator.msMaxTouchPoints 22 | ? "touchstart" 23 | : "mousedown"; 24 | 25 | // sea blue 26 | let colors = ["127, 180, 226", "157, 209, 243", "204, 229, 255"]; 27 | 28 | function setCanvasSize() { 29 | canvasEl.width = window.innerWidth; 30 | canvasEl.height = window.innerHeight; 31 | canvasEl.style.width = window.innerWidth + "px"; 32 | canvasEl.style.height = window.innerHeight + "px"; 33 | } 34 | 35 | function updateCoords(e) { 36 | pointerX = e.clientX || e.touches[0].clientX; 37 | pointerY = e.clientY || e.touches[0].clientY; 38 | } 39 | 40 | function setParticuleDirection(p) { 41 | let angle = (anime.random(0, 360) * Math.PI) / 180; 42 | let value = anime.random(minDiffuseRadius, maxDiffuseRadius); 43 | let radius = [-1, 1][anime.random(0, 1)] * value; 44 | return { 45 | x: p.x + radius * Math.cos(angle), 46 | y: p.y + radius * Math.sin(angle), 47 | }; 48 | } 49 | 50 | function createParticule(x, y) { 51 | let p = {}; 52 | p.x = x; 53 | p.y = y; 54 | p.color = 55 | "rgba(" + 56 | colors[anime.random(0, colors.length - 1)] + 57 | "," + 58 | anime.random(0.2, 0.8) + 59 | ")"; 60 | p.radius = anime.random(minCircleRadius, maxCircleRadius); 61 | p.endPos = setParticuleDirection(p); 62 | p.draw = function () { 63 | ctx.beginPath(); 64 | ctx.arc(p.x, p.y, p.radius, 0, 2 * Math.PI, true); 65 | ctx.fillStyle = p.color; 66 | ctx.fill(); 67 | }; 68 | return p; 69 | } 70 | 71 | function createCircle(x, y) { 72 | let p = {}; 73 | p.x = x; 74 | p.y = y; 75 | p.color = "#000"; 76 | p.radius = 0.1; 77 | p.alpha = 0.5; 78 | p.lineWidth = 6; 79 | p.draw = function () { 80 | ctx.globalAlpha = p.alpha; 81 | ctx.beginPath(); 82 | ctx.arc(p.x, p.y, p.radius, 0, 2 * Math.PI, true); 83 | ctx.lineWidth = p.lineWidth; 84 | ctx.strokeStyle = p.color; 85 | ctx.stroke(); 86 | ctx.globalAlpha = 1; 87 | }; 88 | return p; 89 | } 90 | 91 | function renderParticule(anim) { 92 | for (let i = 0; i < anim.animatables.length; i++) { 93 | anim.animatables[i].target.draw(); 94 | } 95 | } 96 | 97 | function animateParticules(x, y) { 98 | let circle = createCircle(x, y); 99 | let particules = []; 100 | for (let i = 0; i < numberOfParticules; i++) { 101 | particules.push(createParticule(x, y)); 102 | } 103 | anime 104 | .timeline() 105 | .add({ 106 | targets: particules, 107 | x: function (p) { 108 | return p.endPos.x; 109 | }, 110 | y: function (p) { 111 | return p.endPos.y; 112 | }, 113 | radius: 0.1, 114 | duration: anime.random(minAnimeDuration, maxAnimeDuration), 115 | easing: "easeOutExpo", 116 | update: renderParticule, 117 | }) 118 | .add({ 119 | targets: circle, 120 | radius: anime.random(minOrbitRadius, maxOrbitRadius), 121 | lineWidth: 0, 122 | alpha: { 123 | value: 0, 124 | easing: "linear", 125 | duration: anime.random(600, 800), 126 | }, 127 | duration: anime.random(1200, 1800), 128 | easing: "easeOutExpo", 129 | update: renderParticule, 130 | offset: 0, 131 | }); 132 | } 133 | 134 | let render = anime({ 135 | duration: Infinity, 136 | update: function () { 137 | ctx.clearRect(0, 0, canvasEl.width, canvasEl.height); 138 | }, 139 | }); 140 | 141 | document.addEventListener( 142 | tap, 143 | function (e) { 144 | render.play(); 145 | updateCoords(e); 146 | animateParticules(pointerX, pointerY); 147 | }, 148 | false 149 | ); 150 | 151 | setCanvasSize(); 152 | window.addEventListener("resize", setCanvasSize, false); 153 | -------------------------------------------------------------------------------- /source/js/clickBoom2.js: -------------------------------------------------------------------------------- 1 | class Circle { 2 | constructor({ origin, speed, color, angle, context }) { 3 | this.origin = origin; 4 | this.position = { ...this.origin }; 5 | this.color = color; 6 | this.speed = speed; 7 | this.angle = angle; 8 | this.context = context; 9 | this.renderCount = 0; 10 | } 11 | 12 | draw() { 13 | this.context.fillStyle = this.color; 14 | this.context.beginPath(); 15 | this.context.arc(this.position.x, this.position.y, 2, 0, Math.PI * 2); 16 | this.context.fill(); 17 | } 18 | 19 | move() { 20 | this.position.x = Math.sin(this.angle) * this.speed + this.position.x; 21 | this.position.y = 22 | Math.cos(this.angle) * this.speed + 23 | this.position.y + 24 | this.renderCount * 0.3; 25 | this.renderCount++; 26 | } 27 | } 28 | 29 | class Boom { 30 | constructor({ origin, context, circleCount = 10, area }) { 31 | this.origin = origin; 32 | this.context = context; 33 | this.circleCount = circleCount; 34 | this.area = area; 35 | this.stop = false; 36 | this.circles = []; 37 | } 38 | 39 | randomArray(range) { 40 | const length = range.length; 41 | const randomIndex = Math.floor(length * Math.random()); 42 | return range[randomIndex]; 43 | } 44 | 45 | randomColor() { 46 | const range = ["8", "9", "A", "B", "C", "D", "E", "F"]; 47 | return ( 48 | "#" + 49 | this.randomArray(range) + 50 | this.randomArray(range) + 51 | this.randomArray(range) + 52 | this.randomArray(range) + 53 | this.randomArray(range) + 54 | this.randomArray(range) 55 | ); 56 | } 57 | 58 | randomRange(start, end) { 59 | return (end - start) * Math.random() + start; 60 | } 61 | 62 | init() { 63 | for (let i = 0; i < this.circleCount; i++) { 64 | const circle = new Circle({ 65 | context: this.context, 66 | origin: this.origin, 67 | color: this.randomColor(), 68 | angle: this.randomRange(Math.PI - 1, Math.PI + 1), 69 | speed: this.randomRange(1, 6), 70 | }); 71 | this.circles.push(circle); 72 | } 73 | } 74 | 75 | move() { 76 | this.circles.forEach((circle, index) => { 77 | if ( 78 | circle.position.x > this.area.width || 79 | circle.position.y > this.area.height 80 | ) { 81 | return this.circles.splice(index, 1); 82 | } 83 | circle.move(); 84 | }); 85 | if (this.circles.length == 0) { 86 | this.stop = true; 87 | } 88 | } 89 | 90 | draw() { 91 | this.circles.forEach((circle) => circle.draw()); 92 | } 93 | } 94 | 95 | class CursorSpecialEffects { 96 | constructor() { 97 | this.computerCanvas = document.createElement("canvas"); 98 | this.renderCanvas = document.createElement("canvas"); 99 | 100 | this.computerContext = this.computerCanvas.getContext("2d"); 101 | this.renderContext = this.renderCanvas.getContext("2d"); 102 | 103 | this.globalWidth = window.innerWidth; 104 | this.globalHeight = window.innerHeight; 105 | 106 | this.booms = []; 107 | this.running = false; 108 | } 109 | 110 | handleMouseDown(e) { 111 | const boom = new Boom({ 112 | origin: { x: e.clientX, y: e.clientY }, 113 | context: this.computerContext, 114 | area: { 115 | width: this.globalWidth, 116 | height: this.globalHeight, 117 | }, 118 | }); 119 | boom.init(); 120 | this.booms.push(boom); 121 | this.running || this.run(); 122 | } 123 | 124 | handlePageHide() { 125 | this.booms = []; 126 | this.running = false; 127 | } 128 | 129 | init() { 130 | const style = this.renderCanvas.style; 131 | style.position = "fixed"; 132 | style.top = style.left = 0; 133 | style.zIndex = "99999"; 134 | style.pointerEvents = "none"; 135 | 136 | style.width = 137 | this.renderCanvas.width = 138 | this.computerCanvas.width = 139 | this.globalWidth; 140 | style.height = 141 | this.renderCanvas.height = 142 | this.computerCanvas.height = 143 | this.globalHeight; 144 | 145 | document.body.append(this.renderCanvas); 146 | 147 | window.addEventListener("mousedown", this.handleMouseDown.bind(this)); 148 | window.addEventListener("pagehide", this.handlePageHide.bind(this)); 149 | } 150 | 151 | run() { 152 | this.running = true; 153 | if (this.booms.length == 0) { 154 | return (this.running = false); 155 | } 156 | 157 | requestAnimationFrame(this.run.bind(this)); 158 | 159 | this.computerContext.clearRect(0, 0, this.globalWidth, this.globalHeight); 160 | this.renderContext.clearRect(0, 0, this.globalWidth, this.globalHeight); 161 | 162 | this.booms.forEach((boom, index) => { 163 | if (boom.stop) { 164 | return this.booms.splice(index, 1); 165 | } 166 | boom.move(); 167 | boom.draw(); 168 | }); 169 | this.renderContext.drawImage( 170 | this.computerCanvas, 171 | 0, 172 | 0, 173 | this.globalWidth, 174 | this.globalHeight 175 | ); 176 | } 177 | } 178 | 179 | const cursorSpecialEffects = new CursorSpecialEffects(); 180 | cursorSpecialEffects.init(); 181 | -------------------------------------------------------------------------------- /source/js/clickLove.js: -------------------------------------------------------------------------------- 1 | !function(e,t,a){function n(){c(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"),o(),r()}function r(){for(var e=0;ea||i.x<0?-1:1,i.ya*=i.y>c||i.y<0?-1:1,r.fillRect(i.x-0.5,i.y-0.5,1,1),e=x+1;e=n.max/2&&(i.x-=0.03*o,i.y-=0.03*m),t=(n.max-l)/n.max,r.beginPath(),r.lineWidth=t/2,r.strokeStyle="rgba("+d.c+","+(t+0.2)+")",r.moveTo(i.x,i.y),r.lineTo(n.x,n.y),r.stroke()))}}),x(i)}var a,c,u,m=document.createElement("canvas"),d=t(),l="c_n"+d.l,r=m.getContext("2d"),x=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(n){window.setTimeout(n,1000/45)},w=Math.random,y={x:null,y:null,max:20000};m.id=l,m.style.cssText="position:fixed;top:0;left:0;z-index:"+d.z+";opacity:"+d.o,e("body")[0].appendChild(m),o(),window.onresize=o,window.onmousemove=function(n){n=n||window.event,y.x=n.clientX,y.y=n.clientY},window.onmouseout=function(){y.x=null,y.y=null};for(var s=[],f=0;d.n>f;f++){var h=w()*a,g=w()*c,v=2*w()-1,p=2*w()-1;s.push({x:h,y:g,xa:v,ya:p,max:6000})}u=s.concat([y]),setTimeout(function(){i()},100)}!isMobile.any()&&dz(); -------------------------------------------------------------------------------- /source/js/lazyload.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * An jQuery | zepto plugin for lazy loading images. 3 | * author -> jieyou 4 | * see https://github.com/jieyou/lazyload 5 | * use some tuupola's code https://github.com/tuupola/jquery_lazyload (BSD) 6 | * use component's throttle https://github.com/component/throttle (MIT) 7 | */ 8 | !function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(window.jQuery||window.Zepto)}(function(t,e){var a,r,n=window,o=t(n),l={threshold:0,failure_limit:0,event:"scroll",effect:"show",effect_params:null,container:n,data_attribute:"original",data_srcset_attribute:"original-srcset",skip_invisible:!0,appear:i,load:i,vertical_only:!1,check_appear_throttle_time:300,url_rewriter_fn:i,no_fake_img_loader:!1,placeholder_data_img:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC",placeholder_real_img:"http://ditu.baidu.cn/yyfm/lazyload/0.0.1/img/placeholder.png"};function i(){}function c(t,e){return(e._$container==o?("innerHeight"in n?n.innerHeight:o.height())+o.scrollTop():e._$container.offset().top+e._$container.height())<=t.offset().top-e.threshold}function f(t,e){return(e._$container==o?o.scrollTop():e._$container.offset().top)>=t.offset().top+e.threshold+t.height()}function _(e,a){var r=0;e.each(function(l,i){var _=e.eq(l);if(!(_.width()<=0&&_.height()<=0||"none"===_.css("display")))if(a.vertical_only)if(f(_,a));else if(c(_,a)){if(++r>a.failure_limit)return!1}else d();else if(f(_,a)||function(e,a){return(a._$container==o?t.fn.scrollLeft?o.scrollLeft():n.pageXOffset:a._$container.offset().left)>=e.offset().left+a.threshold+e.width()}(_,a));else if(c(_,a)||function(e,a){return(a._$container==o?o.width()+(t.fn.scrollLeft?o.scrollLeft():n.pageXOffset):a._$container.offset().left+a._$container.width())<=e.offset().left-a.threshold}(_,a)){if(++r>a.failure_limit)return!1}else d();function d(){_.trigger("_lazyload_appear"),r=0}})}function d(t){return t.filter(function(e){return!t.eq(e).data("_lazyload_loadStarted")})}r=Object.prototype.toString,a=function(t){return r.call(t).replace("[object ","").replace("]","")},t.fn.hasOwnProperty("lazyload")||(t.fn.lazyload=function(e){var r,c,f,s=this;return t.isPlainObject(e)||(e={}),t.each(l,function(r,i){var c=a(e[r]);-1!=t.inArray(r,["threshold","failure_limit","check_appear_throttle_time"])?"String"==c?e[r]=parseInt(e[r],10):"Number"!=c&&(e[r]=i):"container"==r?(e.hasOwnProperty(r)?e[r]==n||e[r]==document?e._$container=o:e._$container=t(e[r]):e._$container=o,delete e.container):!l.hasOwnProperty(r)||e.hasOwnProperty(r)&&c==a(l[r])||(e[r]=i)}),r="scroll"==e.event,f=0==e.check_appear_throttle_time?_:function(t,e){var a,r,n,o,l=0;return function(){a=this,r=arguments;var t=new Date-l;return o||(t>=e?i():o=setTimeout(i,e-t)),n};function i(){o=0,l=+new Date,n=t.apply(a,r),a=null,r=null}}(_,e.check_appear_throttle_time),c=r||"scrollstart"==e.event||"scrollstop"==e.event,s.each(function(a,r){var n=this,o=s.eq(a),l=o.attr("src"),f=o.attr("data-"+e.data_attribute),_=e.url_rewriter_fn==i?f:e.url_rewriter_fn.call(n,o,f),u=o.attr("data-"+e.data_srcset_attribute),h=o.is("img");if(o.data("_lazyload_loadStarted")||l==_)return o.data("_lazyload_loadStarted",!0),void(s=d(s));o.data("_lazyload_loadStarted",!1),h&&!l&&o.one("error",function(){o.attr("src",e.placeholder_real_img)}).attr("src",e.placeholder_data_img),o.one("_lazyload_appear",function(){var a,r=t.isArray(e.effect_params);function l(){a&&o.hide(),h?(u&&o.attr("srcset",u),_&&o.attr("src",_)):o.css("background-image",'url("'+_+'")'),a&&o[e.effect].apply(o,r?e.effect_params:[]),s=d(s)}o.data("_lazyload_loadStarted")||(a="show"!=e.effect&&t.fn[e.effect]&&(!e.effect_params||r&&0==e.effect_params.length),e.appear!=i&&e.appear.call(n,o,s.length,e),o.data("_lazyload_loadStarted",!0),e.no_fake_img_loader||u?(e.load!=i&&o.one("load",function(){e.load.call(n,o,s.length,e)}),l()):t("").one("load",function(){l(),e.load!=i&&e.load.call(n,o,s.length,e)}).attr("src",_))}),c||o.on(e.event,function(){o.data("_lazyload_loadStarted")||o.trigger("_lazyload_appear")})}),c&&e._$container.on(e.event,function(){f(s,e)}),o.on("resize load",function(){f(s,e)}),t(function(){f(s,e)}),this})}); -------------------------------------------------------------------------------- /source/js/search.js: -------------------------------------------------------------------------------- 1 | // A local search script with the help of [hexo-generator-search](https://github.com/PaicHyperionDev/hexo-generator-search) 2 | // Copyright (C) 2015 3 | // Joseph Pan 4 | // Shuhao Mao 5 | // This library is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as 7 | // published by the Free Software Foundation; either version 2.1 of the 8 | // License, or (at your option) any later version. 9 | // 10 | // This library is distributed in the hope that it will be useful, but 11 | // WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | // Lesser General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public 16 | // License along with this library; if not, write to the Free Software 17 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 18 | // 02110-1301 USA 19 | // 20 | 21 | var searchFunc = function (path, search_id, content_id) { 22 | 'use strict'; 23 | var BTN = ""; 24 | $.ajax({ 25 | url: path, 26 | dataType: "xml", 27 | success: function (xmlResponse) { 28 | // get the contents from search data 29 | var datas = $("entry", xmlResponse).map(function () { 30 | return { 31 | title: $("title", this).text(), 32 | content: $("content", this).text(), 33 | url: $("url", this).text() 34 | }; 35 | }).get(); 36 | 37 | var $input = document.getElementById(search_id); 38 | var $resultContent = document.getElementById(content_id); 39 | 40 | $input.addEventListener('input', function () { 41 | var str = '
    '; 42 | var keywords = this.value.trim().toLowerCase().split(/[\s]+/); 43 | $resultContent.innerHTML = ""; 44 | if (this.value.trim().length <= 0) { 45 | return; 46 | } 47 | // perform local searching 48 | datas.forEach(function (data) { 49 | var isMatch = true; 50 | // var content_index = []; 51 | if (!data.title || data.title.trim() === '') { 52 | data.title = "Untitled"; 53 | } 54 | var data_title = data.title.trim().toLowerCase(); 55 | var data_content = data.content.trim().replace(/<[^>]+>/g, "").toLowerCase(); 56 | var data_url = data.url; 57 | var index_title = -1; 58 | var index_content = -1; 59 | var first_occur = -1; 60 | // only match artiles with not empty contents 61 | if (data_content !== '') { 62 | keywords.forEach(function (keyword, i) { 63 | index_title = data_title.indexOf(keyword); 64 | index_content = data_content.indexOf(keyword); 65 | 66 | if (index_title < 0 && index_content < 0) { 67 | isMatch = false; 68 | } else { 69 | if (index_content < 0) { 70 | index_content = 0; 71 | } 72 | if (i == 0) { 73 | first_occur = index_content; 74 | } 75 | // content_index.push({index_content:index_content, keyword_len:keyword_len}); 76 | } 77 | }); 78 | } else { 79 | isMatch = false; 80 | } 81 | // show search results 82 | if (isMatch) { 83 | str += "
  • " + data_title + ""; 84 | var content = data.content.trim().replace(/<[^>]+>/g, ""); 85 | if (first_occur >= 0) { 86 | // cut out 100 characters 87 | var start = first_occur - 20; 88 | var end = first_occur + 80; 89 | 90 | if (start < 0) { 91 | start = 0; 92 | } 93 | 94 | if (start == 0) { 95 | end = 100; 96 | } 97 | 98 | if (end > content.length) { 99 | end = content.length; 100 | } 101 | 102 | var match_content = content.substr(start, end); 103 | 104 | // highlight all keywords 105 | keywords.forEach(function (keyword) { 106 | var regS = new RegExp(keyword, "gi"); 107 | match_content = match_content.replace(regS, "" + keyword + ""); 108 | }); 109 | 110 | str += "

    " + match_content + "...

    " 111 | } 112 | str += "
  • "; 113 | } 114 | }); 115 | str += "
"; 116 | if (str.indexOf('
  • ') === -1) { 117 | return $resultContent.innerHTML = BTN + "

    没有找到内容,更换下搜索词试试吧~

    "; 118 | } 119 | $resultContent.innerHTML = BTN + str; 120 | }); 121 | } 122 | }); 123 | $(document).on('click', '#local-search-close', function () { 124 | $('#local-search-input').val(''); 125 | $('#local-search-result').html(''); 126 | }); 127 | }; -------------------------------------------------------------------------------- /source/js/tocbot.min.js: -------------------------------------------------------------------------------- 1 | !function(e){function t(o){if(n[o])return n[o].exports;var l=n[o]={i:o,l:!1,exports:{}};return e[o].call(l.exports,l,l.exports,t),l.l=!0,l.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){(function(o){var l,r,i;!function(n,o){r=[],l=o(n),void 0!==(i="function"==typeof l?l.apply(t,r):l)&&(e.exports=i)}(void 0!==o?o:this.window||this.global,function(e){"use strict";function t(){for(var e={},t=0;te.fixedSidebarOffset?-1===n.className.indexOf(e.positionFixedClass)&&(n.className+=p+e.positionFixedClass):n.className=n.className.split(p+e.positionFixedClass).join("")}function i(t){var n=0;return t!=document.querySelector(e.contentSelector&&null!=t)&&(n=t.offsetTop,e.hasInnerContainers&&(n+=i(t.offsetParent))),n}function s(t){if(e.scrollContainer&&document.querySelector(e.scrollContainer))var n=document.querySelector(e.scrollContainer).scrollTop;else var n=document.documentElement.scrollTop||m.scrollTop;e.positionFixedSelector&&r();var o,l=t;if(h&&null!==document.querySelector(e.tocSelector)&&l.length>0){f.call(l,function(t,r){if(i(t)>n+e.headingsOffset+10){return o=l[0===r?r:r-1],!0}if(r===l.length-1)return o=l[l.length-1],!0});var s=document.querySelector(e.tocSelector).querySelectorAll("."+e.linkClass);d.call(s,function(t){t.className=t.className.split(p+e.activeLinkClass).join("")});var a=document.querySelector(e.tocSelector).querySelectorAll("."+e.listItemClass);d.call(a,function(t){t.className=t.className.split(p+e.activeListItemClass).join("")});var u=document.querySelector(e.tocSelector).querySelector("."+e.linkClass+".node-name--"+o.nodeName+'[href="#'+o.id+'"]');-1===u.className.indexOf(e.activeLinkClass)&&(u.className+=p+e.activeLinkClass);var C=u.parentNode;C&&-1===C.className.indexOf(e.activeListItemClass)&&(C.className+=p+e.activeListItemClass);var v=document.querySelector(e.tocSelector).querySelectorAll("."+e.listClass+"."+e.collapsibleClass);d.call(v,function(t){-1===t.className.indexOf(e.isCollapsedClass)&&(t.className+=p+e.isCollapsedClass)}),u.nextSibling&&-1!==u.nextSibling.className.indexOf(e.isCollapsedClass)&&(u.nextSibling.className=u.nextSibling.className.split(p+e.isCollapsedClass).join("")),c(u.parentNode.parentNode)}}function c(t){return-1!==t.className.indexOf(e.collapsibleClass)&&-1!==t.className.indexOf(e.isCollapsedClass)?(t.className=t.className.split(p+e.isCollapsedClass).join(""),c(t.parentNode.parentNode)):t}function a(t){var n=t.target||t.srcElement;"string"==typeof n.className&&-1!==n.className.indexOf(e.linkClass)&&(h=!1)}function u(){h=!0}var d=[].forEach,f=[].some,m=document.body,h=!0,p=" ";return{enableTocAnimation:u,disableTocAnimation:a,render:n,updateToc:s}}},function(e,t){e.exports=function(e){function t(e){return e[e.length-1]}function n(e){return+e.nodeName.split("H").join("")}function o(t){var o={id:t.id,children:[],nodeName:t.nodeName,headingLevel:n(t),textContent:t.textContent.trim()};return e.includeHtml&&(o.childNodes=t.childNodes),o}function l(l,r){for(var i=o(l),s=n(l),c=r,a=t(c),u=a?a.headingLevel:0,d=s-u;d>0;)a=t(c),a&&void 0!==a.children&&(c=a.children),d--;return s>=e.collapseDepth&&(i.isCollapsed=!0),c.push(i),c}function r(t,n){var o=n;e.ignoreSelector&&(o=n.split(",").map(function(t){return t.trim()+":not("+e.ignoreSelector+")"}));try{return document.querySelector(t).querySelectorAll(o)}catch(e){return console.warn("Element not found: "+t),null}}function i(e){return s.call(e,function(e,t){return l(o(t),e.nest),e},{nest:[]})}var s=[].reduce;return{nestHeadingsArray:i,selectHeadings:r}}},function(e,t){function n(e){function t(e){return"a"===e.tagName.toLowerCase()&&(e.hash.length>0||"#"===e.href.charAt(e.href.length-1))&&(n(e.href)===s||n(e.href)+"#"===s)}function n(e){return e.slice(0,e.lastIndexOf("#"))}function l(e){var t=document.getElementById(e.substring(1));t&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())}!function(){document.documentElement.style}();var r=e.duration,i=e.offset,s=location.hash?n(location.href):location.href;!function(){function n(n){!t(n.target)||n.target.className.indexOf("no-smooth-scroll")>-1||"#"===n.target.href.charAt(n.target.href.length-2)&&"!"===n.target.href.charAt(n.target.href.length-1)||-1===n.target.className.indexOf(e.linkClass)||o(n.target.hash,{duration:r,offset:i,callback:function(){l(n.target.hash)}})}document.body.addEventListener("click",n,!1)}()}function o(e,t){function n(e){i=e-r,window.scrollTo(0,c.easing(i,s,u,d)),i