├── .gitignore ├── layout ├── page.ejs ├── post.ejs ├── index.ejs ├── tag.ejs ├── archive.ejs ├── category.ejs ├── _partial │ ├── post │ │ ├── tag.ejs │ │ ├── category.ejs │ │ ├── title.ejs │ │ ├── date.ejs │ │ ├── share.ejs │ │ └── nav.ejs │ ├── ie-updater.ejs │ ├── scrolling-button.ejs │ ├── comments │ │ ├── youyan.ejs │ │ ├── click2show.ejs │ │ ├── duoshuo.ejs │ │ ├── disqus.ejs │ │ └── count-comment.ejs │ ├── google-analytics.ejs │ ├── mathjax.ejs │ ├── archive-post.ejs │ ├── after-footer.ejs │ ├── page.ejs │ ├── tab-title-change.ejs │ ├── background.ejs │ ├── post-nav-button.ejs │ ├── toc.ejs │ ├── header.ejs │ ├── archive.ejs │ ├── open-in-new-tab.ejs │ ├── mobile-nav.ejs │ ├── tag-cloud-page.ejs │ ├── footer.ejs │ ├── article.ejs │ ├── head.ejs │ └── left-col.ejs └── layout.ejs ├── source ├── img │ ├── CSDN.png │ ├── V2EX.png │ ├── 博客园.png │ ├── 新浪微博.png │ ├── 知乎.png │ ├── 简书.png │ ├── 虾米音乐.png │ ├── 豆瓣.png │ ├── AcFun.png │ ├── Coding.png │ ├── LOFTER.png │ ├── Quora.png │ ├── avatar.png │ ├── 网易云音乐.png │ ├── Plunker.png │ ├── bilibili.png │ ├── niconico.png │ ├── TiddlyWiki.png │ ├── SegmentFault.png │ └── scrollbar_arrow.png ├── background │ ├── bg-1.jpg │ ├── bg-2.jpg │ ├── bg-3.jpg │ ├── bg-4.jpg │ ├── bg-5.jpg │ ├── bg-6.jpg │ └── backup │ │ ├── bg-1.jpg │ │ ├── bg-2.jpg │ │ ├── bg-3.jpg │ │ └── bg-4.jpg ├── apple-touch-icon.png ├── css │ ├── _partial │ │ ├── wheelmenu.styl │ │ ├── footer.styl │ │ ├── page.styl │ │ ├── customise │ │ │ ├── inline-code.styl │ │ │ ├── color-scheme.styl │ │ │ ├── list.styl │ │ │ ├── blockquote.styl │ │ │ ├── heading.styl │ │ │ ├── social-icon.styl │ │ │ └── code-block.styl │ │ ├── share.styl │ │ ├── scroll.styl │ │ ├── search.styl │ │ ├── mobile-slider.styl │ │ ├── toc.styl │ │ ├── instagram.styl │ │ ├── archive.styl │ │ ├── header.styl │ │ ├── highlight.styl │ │ ├── mobile.styl │ │ ├── tagcloud.styl │ │ ├── article.styl │ │ └── main.styl │ ├── _util │ │ ├── mixin.styl │ │ └── grid.styl │ ├── _extend.styl │ ├── style.styl │ └── _variables.styl └── js │ ├── toc.js │ ├── instagram.js │ ├── search.js │ ├── mobile.js │ ├── GithubRepoWidget.js │ ├── main.js │ └── pc.js ├── .github └── ISSUE_TEMPLATE.md ├── package.json ├── languages ├── default.yml ├── zh-Hans.yml ├── zh-Hant-HK.yml ├── zh-Hant-TW.yml └── en.yml ├── README.md └── _config.yml /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *.db 3 | 4 | *.DS_Store 5 | -------------------------------------------------------------------------------- /layout/page.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/article', {post: page, index: false}) %> -------------------------------------------------------------------------------- /layout/post.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/article', {post: page, index: false}) %> -------------------------------------------------------------------------------- /layout/index.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/archive', {pagination: 2, index: true}) %> -------------------------------------------------------------------------------- /layout/tag.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/archive', {pagination: config.tag, index: true}) %> -------------------------------------------------------------------------------- /layout/archive.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/archive', {pagination: config.archive, index: true}) %> -------------------------------------------------------------------------------- /layout/category.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/archive', {pagination: config.category, index: true}) %> -------------------------------------------------------------------------------- /source/img/CSDN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/img/CSDN.png -------------------------------------------------------------------------------- /source/img/V2EX.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/img/V2EX.png -------------------------------------------------------------------------------- /source/img/博客园.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/img/博客园.png -------------------------------------------------------------------------------- /source/img/新浪微博.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/img/新浪微博.png -------------------------------------------------------------------------------- /source/img/知乎.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/img/知乎.png -------------------------------------------------------------------------------- /source/img/简书.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/img/简书.png -------------------------------------------------------------------------------- /source/img/虾米音乐.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/img/虾米音乐.png -------------------------------------------------------------------------------- /source/img/豆瓣.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/img/豆瓣.png -------------------------------------------------------------------------------- /source/img/AcFun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/img/AcFun.png -------------------------------------------------------------------------------- /source/img/Coding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/img/Coding.png -------------------------------------------------------------------------------- /source/img/LOFTER.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/img/LOFTER.png -------------------------------------------------------------------------------- /source/img/Quora.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/img/Quora.png -------------------------------------------------------------------------------- /source/img/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/img/avatar.png -------------------------------------------------------------------------------- /source/img/网易云音乐.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/img/网易云音乐.png -------------------------------------------------------------------------------- /source/img/Plunker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/img/Plunker.png -------------------------------------------------------------------------------- /source/img/bilibili.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/img/bilibili.png -------------------------------------------------------------------------------- /source/img/niconico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/img/niconico.png -------------------------------------------------------------------------------- /source/background/bg-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/background/bg-1.jpg -------------------------------------------------------------------------------- /source/background/bg-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/background/bg-2.jpg -------------------------------------------------------------------------------- /source/background/bg-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/background/bg-3.jpg -------------------------------------------------------------------------------- /source/background/bg-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/background/bg-4.jpg -------------------------------------------------------------------------------- /source/background/bg-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/background/bg-5.jpg -------------------------------------------------------------------------------- /source/background/bg-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/background/bg-6.jpg -------------------------------------------------------------------------------- /source/img/TiddlyWiki.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/img/TiddlyWiki.png -------------------------------------------------------------------------------- /source/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/apple-touch-icon.png -------------------------------------------------------------------------------- /source/img/SegmentFault.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/img/SegmentFault.png -------------------------------------------------------------------------------- /source/img/scrollbar_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/img/scrollbar_arrow.png -------------------------------------------------------------------------------- /source/background/backup/bg-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/background/backup/bg-1.jpg -------------------------------------------------------------------------------- /source/background/backup/bg-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/background/backup/bg-2.jpg -------------------------------------------------------------------------------- /source/background/backup/bg-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/background/backup/bg-3.jpg -------------------------------------------------------------------------------- /source/background/backup/bg-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOxFIVE/hexo-theme-yelee/HEAD/source/background/backup/bg-4.jpg -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | > 建议阅读:[在 Stack Overflow 提问的检查表](http://t.cn/R5tOIdv) 2 | > Recommended Reading: [STACK OVERFLOW QUESTION CHECKLIST](http://tinyurl.com/stack-checklist) -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hexo-site", 3 | "version": "2.8.3", 4 | "private": true, 5 | "dependencies": { 6 | "hexo-renderer-ejs": "*", 7 | "hexo-renderer-stylus": "*", 8 | "hexo-renderer-marked": "*" 9 | } 10 | } -------------------------------------------------------------------------------- /layout/_partial/post/tag.ejs: -------------------------------------------------------------------------------- 1 | <% if (post.tags && post.tags.length){ %> 2 |
3 | <%- list_tags(post.tags, { 4 | show_count: false, 5 | class: 'article-tag' 6 | }) %> 7 |
8 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/ie-updater.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.ie_updater.on) { %> 2 | 6 | <% } %> -------------------------------------------------------------------------------- /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 | <% } %> 11 | -------------------------------------------------------------------------------- /layout/_partial/scrolling-button.ejs: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 |
-------------------------------------------------------------------------------- /layout/_partial/comments/youyan.ejs: -------------------------------------------------------------------------------- 1 |
2 | 9 | <%- partial('click2show') %> 10 |
11 |
-------------------------------------------------------------------------------- /layout/layout.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/head') %> 2 | 3 |
4 |
5 | <%- partial('_partial/left-col', null, {cache: !config.relative_link}) %> 6 |
7 |
8 | <%- partial('_partial/mobile-nav', null, {cache: !config.relative_link}) %> 9 |
<%- body %>
10 | <%- partial('_partial/footer') %> 11 |
12 | <%- partial('_partial/after-footer') %> 13 |
14 | 15 | -------------------------------------------------------------------------------- /layout/_partial/post/title.ejs: -------------------------------------------------------------------------------- 1 | <% if (post.link){ %> 2 |

3 | 4 |

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

8 | <%= post.title %> 9 |

10 | <% } else { %> 11 |

12 | <%= post.title %> 13 |

14 | <% } %> 15 | <% } %> -------------------------------------------------------------------------------- /source/css/_partial/wheelmenu.styl: -------------------------------------------------------------------------------- 1 | /* Required Stylesheets */ 2 | .wheel-button { 3 | position: relative; 4 | } 5 | 6 | .wheel { 7 | margin: 0; 8 | padding: 0; 9 | list-style: none; 10 | width: 200px; /* this will determine the diameter of the circle */ 11 | height: 200px; /* this will determine the diameter of the circle */ 12 | visibility: hidden; 13 | position: relative; 14 | display: none; 15 | } 16 | 17 | .wheel li { 18 | overflow: hidden; 19 | float:left; 20 | } 21 | 22 | .wheel li a { 23 | display: block; 24 | } -------------------------------------------------------------------------------- /layout/_partial/google-analytics.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.google_analytics){ %> 2 | 3 | 13 | 14 | <% } %> 15 | -------------------------------------------------------------------------------- /layout/_partial/mathjax.ejs: -------------------------------------------------------------------------------- 1 | 17 | 18 | 20 | -------------------------------------------------------------------------------- /layout/_partial/archive-post.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 7 | <%- partial('post/title', {class_name: 'archive-article-title'}) %> 8 | 12 |
13 |
14 |
15 |
-------------------------------------------------------------------------------- /layout/_partial/after-footer.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.github_widget){ %> 2 | <%- js('js/GithubRepoWidget') %> 3 | <% } %> 4 | 5 | <%- partial('_partial/background') %> 6 | <%- partial('comments/count-comment') %> 7 | <%- partial('google-analytics') %> 8 | <% if (theme.mathjax){ %> 9 | <%- partial('mathjax') %> 10 | <% } %> 11 | <%- partial('scrolling-button') %> 12 | <%- partial('open-in-new-tab', { 13 | global: theme.open_in_new.global 14 | }) %> 15 | <%- partial('tab-title-change') %> 16 | -------------------------------------------------------------------------------- /layout/_partial/page.ejs: -------------------------------------------------------------------------------- 1 | 17 | 18 | <% if (page.path === "tags/index.html"){ %> 19 | 20 | <%- partial('tag-cloud-page') %> 21 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/tab-title-change.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.tab_title_change.on) { %> 2 | 18 | <% } %> -------------------------------------------------------------------------------- /source/css/_partial/footer.styl: -------------------------------------------------------------------------------- 1 | #footer 2 | font-size: .8rem; 3 | font-family: font-chs, sans-serif; 4 | text-shadow: 0 1px #fff; 5 | position: absolute; 6 | bottom: 20px; 7 | opacity: 0.75; 8 | width: 100%; 9 | text-align: center; 10 | .footer-left 11 | float left 12 | .footer-right 13 | float right 14 | .outer 15 | padding: 0 30px; 16 | .fa-heart 17 | color red 18 | animation-duration 1.1s 19 | #busuanzi_value_site_uv 20 | ,#busuanzi_container_page_pv 21 | font-family font-mono 22 | .visit 23 | font-size .88rem 24 | .fa 25 | padding-right .25em 26 | color gray 27 | #site-visit:hover 28 | ,#page-visit:hover 29 | color black 30 | .fa 31 | color #333 32 | -------------------------------------------------------------------------------- /source/css/_util/mixin.styl: -------------------------------------------------------------------------------- 1 | // http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/ 2 | hide-text() 3 | text-indent: 100% 4 | white-space: nowrap 5 | overflow: hidden 6 | 7 | // http://codepen.io/shshaw/full/gEiDt 8 | absolute-center(width, height = width) 9 | // margin: auto 10 | // position: absolute 11 | // top: 50% 12 | // top: 0 13 | // left: 0 14 | // bottom: 0 15 | // right: 0 16 | // width: width 17 | // height: height 18 | // overflow: auto 19 | width: width 20 | height: height 21 | position: absolute 22 | top: 50% 23 | left: 50% 24 | margin-top: width * -0.5 25 | margin-left: height * -0.5 26 | 27 | avoid-column-break() 28 | vendor("column-break-inside", avoid, only: webkit) 29 | page-break-inside: avoid // for firefox 30 | overflow: hidden // fix for firefox 31 | break-inside: avoid-column 32 | -------------------------------------------------------------------------------- /languages/default.yml: -------------------------------------------------------------------------------- 1 | # zh-Hans: Chinese (Simplified) 大陆简体 2 | index: 3 | menu: 菜单 4 | tags: 标签 5 | friends: 友情链接 6 | about: 关于我 7 | more: more 8 | copy: 复制 9 | 10 | toc: 11 | title: 文章目录 12 | hide: 隐藏目录 13 | show: 显示目录 14 | 15 | visit_counter: 16 | site: 本站到访数 17 | page: 本页阅读量 18 | 19 | copyright_info: 20 | title: 本文标题 21 | author: 文章作者 22 | date: 发布时间 23 | updated: 最后更新 24 | url: 原始链接 25 | from: "原文:" 26 | by: "作者:" 27 | license: 许可协议 28 | cc: "署名-非商用-相同方式共享 4.0" 29 | notice: "转载请保留原文链接及作者。" 30 | 31 | tooltip: 32 | tocButton: 点击按钮隐藏或者显示文章目录 33 | back2home: 回到主页 34 | nextPost: 下一篇 35 | prePost: 上一篇 36 | miniArchives: 文章列表 37 | back2top: 返回顶部 38 | jump2comments: 查看评论 39 | go2bottom: 转到底部 40 | copyPath: 点击复制文章链接 41 | Hexo: "快速、简洁且高效的博客框架" 42 | Yelee: 简而不减 Hexo 双栏博客主题 43 | 44 | tag_cloud: 45 | already: 已有 46 | categories: 个分类, 47 | total: 共计 48 | tags: 个标签 -------------------------------------------------------------------------------- /languages/zh-Hans.yml: -------------------------------------------------------------------------------- 1 | # zh-Hans: Chinese (Simplified) 大陆简体 2 | index: 3 | menu: 菜单 4 | tags: 标签 5 | friends: 友情链接 6 | about: 关于我 7 | more: 阅读全文 8 | copy: 复制 9 | 10 | toc: 11 | title: 文章目录 12 | hide: 隐藏目录 13 | show: 显示目录 14 | 15 | visit_counter: 16 | site: 本站到访数 17 | page: 本页阅读量 18 | 19 | copyright_info: 20 | title: 本文标题 21 | author: 文章作者 22 | date: 发布时间 23 | updated: 最后更新 24 | url: 原始链接 25 | from: "原文:" 26 | by: "作者:" 27 | license: 许可协议 28 | cc: "署名-非商用-相同方式共享 4.0" 29 | notice: "转载请保留原文链接及作者。" 30 | 31 | tooltip: 32 | tocButton: 点击按钮隐藏或者显示文章目录 33 | back2home: 回到主页 34 | nextPost: 下一篇 35 | prePost: 上一篇 36 | miniArchives: 文章列表 37 | back2top: 返回顶部 38 | jump2comments: 查看评论 39 | go2bottom: 转到底部 40 | copyPath: 点击复制文章链接 41 | Hexo: "快速、简洁且高效的博客框架" 42 | Yelee: 简而不减 Hexo 双栏博客主题 43 | 44 | tag_cloud: 45 | already: 已有 46 | categories: 个分类, 47 | total: 共计 48 | tags: 个标签 -------------------------------------------------------------------------------- /languages/zh-Hant-HK.yml: -------------------------------------------------------------------------------- 1 | # zh-Hant-HK: Chinese (Traditional) 港澳繁體 2 | index: 3 | menu: 菜單 4 | tags: 標籤 5 | friends: 友情鏈接 6 | about: 關於我 7 | more: 查看全文 8 | copy: 複製 9 | 10 | toc: 11 | title: 文章目錄 12 | hide: 隱藏目錄 13 | show: 顯示目錄 14 | 15 | visit_counter: 16 | site: 本站到訪數 17 | page: 本頁閱讀量 18 | 19 | copyright_info: 20 | title: 本文標題 21 | author: 文章作者 22 | date: 發布時間 23 | updated: 最後更新 24 | url: 原始鏈接 25 | from: "原文:" 26 | by: "作者:" 27 | license: 許可協議 28 | cc: "姓名標示-非商業性-相同方式分享 4.0 國際" 29 | notice: "轉載請保留原文鏈接及作者。" 30 | 31 | tooltip: 32 | tocButton: 點擊按鈕隱藏或者顯示文章目錄 33 | back2home: 回到主頁 34 | nextPost: 下一篇 35 | prePost: 上一篇 36 | miniArchives: 文章列表 37 | back2top: 返回頂部 38 | jump2comments: 查看評論 39 | go2bottom: 轉到底部 40 | copyPath: 點擊複製文章鏈接 41 | Hexo: "快速、簡潔且高效的博客框架" 42 | Yelee: 簡而不減 Hexo 雙欄博客主題 43 | 44 | tag_cloud: 45 | already: 已有 46 | categories: 個分類, 47 | total: 共計 48 | tags: 個標籤 -------------------------------------------------------------------------------- /languages/zh-Hant-TW.yml: -------------------------------------------------------------------------------- 1 | # zh-Hant-TW: Chinese (Traditional) 台灣正體 2 | index: 3 | menu: 菜單 4 | tags: 標籤 5 | friends: 友情鏈接 6 | about: 關於我 7 | more: 查看全文 8 | copy: 複製 9 | 10 | toc: 11 | title: 文章目錄 12 | hide: 隱藏目錄 13 | show: 顯示目錄 14 | 15 | visit_counter: 16 | site: 本站到訪數 17 | page: 本頁閱讀量 18 | 19 | copyright_info: 20 | title: 本文標題 21 | author: 文章作者 22 | date: 發布時間 23 | updated: 最後更新 24 | url: 原始鏈接 25 | from: "原文:" 26 | by: "作者:" 27 | license: 許可協議 28 | cc: "姓名標示-非商業性-相同方式分享 4.0 國際" 29 | notice: "轉載請保留原文鏈接及作者。" 30 | 31 | tooltip: 32 | tocButton: 點擊按鈕隱藏或者顯示文章目錄 33 | back2home: 回到主頁 34 | nextPost: 下一篇 35 | prePost: 上一篇 36 | miniArchives: 文章列表 37 | back2top: 返回頂部 38 | jump2comments: 查看評論 39 | go2bottom: 轉到底部 40 | copyPath: 點擊複製文章鏈接 41 | Hexo: "快速、簡單且強大的網誌框架" 42 | Yelee: 簡而不減 Hexo 雙欄網誌主題 43 | 44 | tag_cloud: 45 | already: 已有 46 | categories: 個分類, 47 | total: 共計 48 | tags: 個標籤 -------------------------------------------------------------------------------- /layout/_partial/post/date.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <% if ((is_home() || (is_post() && !theme.preload_comment)) && theme.show_count && (theme.disqus.on || theme.duoshuo.on || config.disqus_shortname)) { %> 6 | 7 | 8 | 9 | <% if (theme.duoshuo.on) { %> 10 | data-thread-key="<%=post.path%>" <% } %>> 11 | <% } %> 12 | <% if (theme.disqus.on || config.disqus_shortname) { %> 13 | 14 | <% } %> 15 | 16 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/comments/click2show.ejs: -------------------------------------------------------------------------------- 1 | <% if (!theme.preload_comment) { %> 2 | 9 | 26 | <% } else { %> 27 | 28 | <% } %> -------------------------------------------------------------------------------- /source/css/_partial/page.styl: -------------------------------------------------------------------------------- 1 | #page-nav{ 2 | text-align: center; 3 | margin-top: 30px; 4 | .page-number{ 5 | width: 20px; 6 | height: 20px; 7 | background: #4d4d4d; 8 | -webkit-border-radius: 50%; 9 | -moz-border-radius: 50%; 10 | border-radius: 50%; 11 | display: inline-block; 12 | color: #fff; 13 | line-height: 20px; 14 | font-size: 12px; 15 | margin: 0 3px 30px; 16 | &:hover{ 17 | background: #5e5e5e; 18 | } 19 | } 20 | .current{ 21 | background: #88acdb; 22 | cursor: default; 23 | &:hover{ 24 | background: #88acdb; 25 | } 26 | } 27 | .extend{ 28 | color: #4d4d4d; 29 | margin: 0 27px; 30 | opacity: 0; 31 | &:hover{ 32 | color: #5e5e5e; 33 | } 34 | } 35 | &:hover{ 36 | .extend{ 37 | opacity: 1; 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /layout/_partial/background.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.background_image){ %> 2 | 17 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/post-nav-button.ejs: -------------------------------------------------------------------------------- 1 | <% if (is_post()){ %> 2 | 3 |
4 | <% if (post.prev){ %> 5 | 6 | 7 | 8 | <% } else { %> 9 | 10 | <% } %> 11 | 12 | 13 | 14 | <% if (post.next){ %> 15 | 16 | 17 | 18 | <% } else { %> 19 | 20 | <% } %> 21 |
22 | 23 | <%- list_posts({amount: 999}) %> 24 | 25 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/toc.ejs: -------------------------------------------------------------------------------- 1 | <% if (!index && ((post.toc != false && !is_page() && theme.toc.on) || post.toc)) { %> 2 |
3 | <%= __('toc.title') %> 4 | <% if ((theme.toc.list_number && post.toc_list_number != false) || post.toc_list_number) { %> 5 | <%- toc(post.content) %> 6 | <% } else { %> 7 | <%- toc(post.content, {list_number: false}) %> 8 | <% } %> 9 |
10 | 20 | 21 | 22 | 23 | 26 | <% } %> -------------------------------------------------------------------------------- /languages/en.yml: -------------------------------------------------------------------------------- 1 | # en: English 2 | index: 3 | menu: Menu 4 | tags: Tags 5 | friends: Friends 6 | about: About Me 7 | more: more 8 | copy: Copy 9 | 10 | # Tables of Contents 11 | toc: 12 | title: Contents 13 | hide: Hide 14 | show: Show 15 | 16 | visit_counter: 17 | site: Site Visitors 18 | page: Page Hits 19 | 20 | copyright_info: 21 | title: Title 22 | author: Author 23 | date: Created 24 | updated: Updated 25 | url: Full URL 26 | from: From 27 | by: By 28 | license: License 29 | cc: "CC BY-NC-SA 4.0" 30 | notice: "Keep Link & Author if Distribute." 31 | 32 | tooltip: 33 | tocButton: Show or Hide Table of Contents 34 | back2home: Back to Homepage 35 | nextPost: Next 36 | prePost: Pre 37 | miniArchives: Mini Archives 38 | back2top: Back to Top 39 | jump2comments: Comments 40 | go2bottom: Go to Bottom 41 | copyPath: "Copy Article's Link & Author" 42 | Hexo: "A fast, simple & powerful blog framework" 43 | Yelee: Another simple and elegant theme for Hexo 44 | 45 | tag_cloud: 46 | already: " " 47 | categories: Categories, 48 | total: " " 49 | tags: Tags -------------------------------------------------------------------------------- /layout/_partial/header.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/css/_partial/customise/inline-code.styl: -------------------------------------------------------------------------------- 1 | .article-entry code 2 | color gray 3 | background rgba(248, 237, 223, .5) 4 | padding .05em .3em 5 | border-radius 3px 6 | box-shadow 1px 1px 1px rgba(0,0,0, .08) 7 | if highlight_style 8 | var inline_code = hexo-config("highlight_style.inline_code") 9 | color white 10 | if !inline_code 11 | color gray 12 | if inline_code 13 | background rgba(153, 204, 153, .7) 14 | if inline_code == "2" 15 | color #f48385 16 | background rgba(199,38,79,0.07) 17 | if inline_code == "3" 18 | color gray 19 | background rgba(255, 250, 165, .7) 20 | if inline_code == "4" 21 | background rgba(136, 172, 219, .65) 22 | if inline_code == "5" 23 | background rgba(239, 117, 34, .42) 24 | if inline_code == "6" 25 | background rgba(217, 83, 79, .45) 26 | if inline_code == "7" 27 | background rgba(129, 138, 145, .35) 28 | if inline_code == "8" 29 | background rgba(91, 192, 222, .6) 30 | if inline_code == "9" 31 | background rgba(250, 250, 250, .6) -------------------------------------------------------------------------------- /source/css/_partial/customise/color-scheme.styl: -------------------------------------------------------------------------------- 1 | color-scheme = hexo-config("color_scheme") 2 | background-image = hexo-config("background_image") 3 | 4 | if !background-image 5 | body 6 | background lightgray 7 | 8 | #container .left-col 9 | background white 10 | 11 | .article 12 | background white 13 | .article-inner 14 | margin-bottom 1em 15 | .article-more-link a 16 | opacity .9 17 | 18 | .tagcloud a 19 | opacity .9 20 | 21 | #header .header-nav .social li 22 | opacity .8 23 | 24 | .archives-wrap 25 | background white 26 | 27 | .scroll a .fa 28 | color white 29 | 30 | .post-nav-button 31 | background #ececec 32 | 33 | #post-nav-button a 34 | background rgba(215, 216, 215, .5) 35 | 36 | .post-list 37 | background white 38 | 39 | #article-nav 40 | background rgba(158,188,226,.9) 41 | 42 | 43 | if color-scheme == "yilia" 44 | body 45 | background gray 46 | 47 | .article-header 48 | border-left 5px solid #666 49 | 50 | .article-more-link a 51 | background #4d4d4d 52 | font-size .8em 53 | -------------------------------------------------------------------------------- /layout/_partial/archive.ejs: -------------------------------------------------------------------------------- 1 | <% if (pagination == 2){ %> 2 | <% page.posts.each(function(post){ %> 3 | <%- partial('article', {post: post, index: true}) %> 4 | <% }) %> 5 | <% if (page.total > 1){ %> 6 | 12 | <% } %> 13 | <% } else { %> 14 | <% var last; %> 15 | <% page.posts.each(function(post, i){ %> 16 | <% var year = post.date.year(); %> 17 | <% if (last != year){ %> 18 | <% if (last != null){ %> 19 | 20 | <% } %> 21 | <% last = year; %> 22 |
23 |
24 | <%= year %> 25 |
26 |
27 | <% } %> 28 | <%- partial('archive-post', {post: post, even: i % 2 == 0}) %> 29 | <% }) %> 30 | <% if (page.posts.length){ %> 31 |
32 | <% } %> 33 | 34 | <% if (page.total > 1){ %> 35 | 41 | <% } %> 42 | 43 | <% } %> -------------------------------------------------------------------------------- /source/css/_extend.styl: -------------------------------------------------------------------------------- 1 | $block-caption 2 | text-decoration: none 3 | text-transform: uppercase 4 | letter-spacing: 2px 5 | color: color-grey 6 | margin-bottom: 1em 7 | margin-left: 5px 8 | line-height: 1em 9 | text-shadow: 0 1px #fff 10 | font-weight: bold 11 | 12 | $block 13 | background: #fff 14 | box-shadow: 1px 2px 3px #ddd 15 | border: 1px solid color-border 16 | border-radius: 3px 17 | 18 | $base-style 19 | h1 20 | font-size: 2em 21 | h2 22 | font-size: 1.5em 23 | h3 24 | font-size: 1.3em 25 | h4 26 | font-size: 1.2em 27 | h5 28 | font-size: 1em 29 | h6 30 | font-size: 1em 31 | color: color-grey 32 | hr 33 | border: 1px dashed color-border 34 | strong 35 | font-weight: bold 36 | em, cite 37 | font-style: italic 38 | sup, sub 39 | font-size: 0.75em 40 | line-height: 0 41 | position: relative 42 | vertical-align: baseline 43 | sup 44 | top: -0.5em 45 | sub 46 | bottom: -0.2em 47 | small 48 | font-size: 0.85em 49 | acronym, abbr 50 | border-bottom: 1px dotted 51 | ul, ol, dl 52 | margin: 0 20px 53 | line-height: line-height 54 | ul, ol 55 | ul, ol 56 | margin-top: 0 57 | margin-bottom: 0 58 | ul 59 | list-style: disc 60 | ol 61 | list-style: decimal 62 | dt 63 | font-weight: bold -------------------------------------------------------------------------------- /source/css/_partial/customise/list.styl: -------------------------------------------------------------------------------- 1 | list_style = hexo-config("list_style") 2 | 3 | li 4 | margin .1em 5 | font-size 1rem 6 | 7 | ul, ol 8 | margin 10px 0 9 | li.task-list 10 | list-style none 11 | margin-left 0 12 | &::before 13 | display none 14 | 15 | li ul, li ol 16 | margin-left 30px 17 | 18 | if !list_style 19 | ul > li:before 20 | content "" 21 | background #dedede 22 | 23 | ul > li:before 24 | display inline-block 25 | content "" 26 | width .4em 27 | height .4em 28 | margin-right .5em 29 | margin-bottom .11em 30 | border 1px solid #d3d3d3 31 | border-radius 50% 32 | background #d3d3d3 33 | 34 | css-list = 1 disc, 2 circle, 3 square 35 | 36 | for i in css-list 37 | if list_style == i[0] 38 | ul > li 39 | margin-left 1.1em 40 | list-style-type i[1] 41 | 42 | icon-list = 4 f054, 5 f0a4, 6 f0fe, 43 | 7 f061, 8 f0a9, 9 f005, 44 | 10 f006, 11 f192, 12 f05b 45 | 46 | for i in icon-list 47 | if list_style == i[0] 48 | ul > li 49 | list-style none 50 | margin 0 51 | ul > li:before 52 | content "\" + i[1] 53 | font-family FontAwesome 54 | font-size .8em 55 | margin-right .5em 56 | color #c8c8c8 57 | -------------------------------------------------------------------------------- /source/css/_util/grid.styl: -------------------------------------------------------------------------------- 1 | ///////////////// 2 | // Semantic.gs // for Stylus: http://learnboost.github.com/stylus/ 3 | ///////////////// 4 | 5 | // Utility function — you should never need to modify this 6 | // _gridsystem-width = (column-width + gutter-width) * columns 7 | gridsystem-width(_columns = columns) 8 | (column-width + gutter-width) * _columns 9 | 10 | // Set @total-width to 100% for a fluid layout 11 | // total-width = gridsystem-width(columns) 12 | total-width = 100% 13 | 14 | ////////// 15 | // GRID // 16 | ////////// 17 | 18 | body 19 | clearfix() 20 | width: 100% 21 | 22 | row(_columns = columns) 23 | clearfix() 24 | display: block 25 | width: total-width * ((gutter-width + gridsystem-width(_columns)) / gridsystem-width(_columns)) 26 | margin: 0 total-width * (((gutter-width * .5) / gridsystem-width(_columns)) * -1) 27 | 28 | column(x, _columns = columns) 29 | display: inline 30 | float: left 31 | width: total-width * ((((gutter-width + column-width) * x) - gutter-width) / gridsystem-width(_columns)) 32 | margin: 0 total-width * ((gutter-width * .5) / gridsystem-width(_columns)) 33 | 34 | push(offset = 1) 35 | margin-left: total-width * (((gutter-width + column-width) * offset) / gridsystem-width(columns)) 36 | 37 | pull(offset = 1) 38 | margin-right: total-width * (((gutter-width + column-width) * offset) / gridsystem-width(columns)) -------------------------------------------------------------------------------- /source/css/_partial/share.styl: -------------------------------------------------------------------------------- 1 | baidu-share = hexo-config("share.baidu") 2 | addthis-share = hexo-config("share.addthis") 3 | 4 | .share 5 | padding-left 40px 6 | margin 1em auto .5em 7 | opacity i-opacity 8 | &:hover 9 | opacity 1 10 | 11 | if baidu-share 12 | .bdsharebuttonbox 13 | a, .bds_more 14 | width 30px 15 | height @width !important 16 | line-height @height 17 | text-align center 18 | padding-left 0 !important 19 | font-size .68*@width !important 20 | text-decoration none 21 | color white !important 22 | box-shadow 1px 1px 1px rgba(0,0,0, .1), 1px 1px 1px rgba(0,0,0, .3) 23 | &:hover 24 | transform scale(1.1) 25 | color @color 26 | 27 | // http://share.baidu.com/help/webid 28 | font-logo = bds_tsina #db332f, 29 | bds_sqq #1cbcef, 30 | bds_copy #8f8f8f, 31 | bds_mail #6fc0e4, 32 | bds_weixin #8cdc49, 33 | bds_more #8cbcf5, 34 | bds_twi #21abf4 35 | for i in font-logo 36 | .{i[0]} 37 | background i[1] !important 38 | 39 | if addthis-share 40 | .addthis_sharing_toolbox 41 | margin-top .5em 42 | margin-left -2px -------------------------------------------------------------------------------- /layout/_partial/post/share.ejs: -------------------------------------------------------------------------------- 1 | 2 |
3 | <% if (theme.share.baidu) { %> 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 17 | <% } %> 18 | 19 | <% if (theme.share.addthis) { %> 20 |
21 | <% } %> 22 |
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /layout/_partial/comments/duoshuo.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 29 | <%- partial('click2show') %> 30 |
-------------------------------------------------------------------------------- /layout/_partial/comments/disqus.ejs: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 16 | <%- partial('click2show') %> 17 |
18 | 19 | <% if (!theme.preload_comment) { %> 20 | // Add comment count 21 | 22 | 23 | 24 | 34 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/open-in-new-tab.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/css/_partial/customise/blockquote.styl: -------------------------------------------------------------------------------- 1 | blockquote 2 | padding .4em 20px 3 | margin .5em auto 4 | border-left 4px solid rgba(147, 181, 224, .4) 5 | background rgba(255,255,255,0.4) 6 | box-shadow 1px 1px 1px rgba(0,0,0, .1) 7 | p 8 | margin .4em auto 9 | blockquote 10 | border-left none 11 | footer 12 | font-style italic 13 | cite::before 14 | content "—" 15 | padding 0 .3em 16 | 17 | 18 | blockquote_style = hexo-config("blockquote_style.on") 19 | blockquote = hexo-config("blockquote_style.blockquote") 20 | 21 | if blockquote_style 22 | if blockquote 23 | border-left 5px solid rgba(112, 134, 142, .85) 24 | background rgba(255, 255, 255, .7) 25 | if blockquote == "2" 26 | border-left 10px solid rgba(102,128,153,0.08) 27 | background rgba(102,128,153,0.08) 28 | if blockquote == "3" 29 | border-left 5px solid rgba(255, 224, 112, .6) 30 | background rgba(255, 244, 204, .6) 31 | if blockquote == "4" 32 | border-left 5px solid rgba(85, 138, 187, .8) 33 | background rgba(255, 255, 255, .7) 34 | if blockquote == "5" 35 | border-left-color #ddd 36 | background none 37 | if blockquote == "6" 38 | border-left 5px solid rgba(0, 153, 100, .62) 39 | padding 10.5px 21px 40 | background none 41 | if blockquote == "7" 42 | border-left 3px solid rgba(0,0,0,0.8) 43 | background none -------------------------------------------------------------------------------- /layout/_partial/mobile-nav.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/css/_partial/scroll.styl: -------------------------------------------------------------------------------- 1 | /* 设置滚动条的样式 */ 2 | ::-webkit-scrollbar { 3 | width: 10px; 4 | height: 10px; 5 | } 6 | 7 | ::-webkit-scrollbar-button { 8 | width: 0; 9 | height: 0; 10 | } 11 | 12 | ::-webkit-scrollbar-button:start:increment,::-webkit-scrollbar-button:end:decrement { 13 | display: none; 14 | } 15 | 16 | ::-webkit-scrollbar-corner { 17 | display: block; 18 | } 19 | 20 | ::-webkit-scrollbar-thumb { 21 | border-radius: 8px; 22 | background-color: rgba(0,0,0,.2); 23 | } 24 | 25 | ::-webkit-scrollbar-thumb:hover { 26 | border-radius: 8px; 27 | background-color: rgba(0,0,0,.5); 28 | } 29 | 30 | ::-webkit-scrollbar-track,::-webkit-scrollbar-thumb { 31 | border-right: 1px solid transparent; 32 | border-left: 1px solid transparent; 33 | } 34 | 35 | ::-webkit-scrollbar-track:hover { 36 | background-color: rgba(0,0,0,.15); 37 | } 38 | ::-webkit-scrollbar-button:start { 39 | width: 10px; 40 | height: 10px; 41 | background: url(../img/scrollbar_arrow.png) no-repeat 0 0; 42 | } 43 | 44 | ::-webkit-scrollbar-button:start:hover { 45 | background: url(../img/scrollbar_arrow.png) no-repeat -15px 0; 46 | } 47 | 48 | ::-webkit-scrollbar-button:start:active { 49 | background: url(../img/scrollbar_arrow.png) no-repeat -30px 0; 50 | } 51 | 52 | ::-webkit-scrollbar-button:end { 53 | width: 10px; 54 | height: 10px; 55 | background: url(../img/scrollbar_arrow.png) no-repeat 0 -18px; 56 | } 57 | 58 | ::-webkit-scrollbar-button:end:hover { 59 | background: url(../img/scrollbar_arrow.png) no-repeat -15px -18px; 60 | } 61 | 62 | ::-webkit-scrollbar-button:end:active { 63 | background: url(../img/scrollbar_arrow.png) no-repeat -30px -18px; 64 | } -------------------------------------------------------------------------------- /layout/_partial/tag-cloud-page.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | <%- list_categories({depth: 1}) %> 4 | 5 |

6 | 7 |
8 | <%- tagcloud({ 9 | min_font: 16, 10 | max_font: 35, 11 | amount: 999, 12 | color: true, 13 | start_color: 'gray', 14 | end_color: 'black', 15 | }) %> 16 |
17 | 57 | 58 | 59 |

60 | <%= __('tag_cloud.already') %><%= __('tag_cloud.categories') %> 61 | <%= __('tag_cloud.total') %><%= __('tag_cloud.tags') %> 62 |

63 | -------------------------------------------------------------------------------- /layout/_partial/comments/count-comment.ejs: -------------------------------------------------------------------------------- 1 | <% if (is_home() && theme.show_count) { %> 2 | <% if (theme.duoshuo.on) { %> 3 | 23 | <% } %> 24 | 25 | <% if (theme.disqus.on || config.disqus_shortname) { %> 26 | 27 | 41 | <% } %> 42 | <% } %> -------------------------------------------------------------------------------- /source/css/_partial/search.styl: -------------------------------------------------------------------------------- 1 | .search 2 | width 68% 3 | height 18px 4 | margin-top 1px 5 | padding 0 6 | font-family inherit 7 | border 2px solid transparent 8 | border-bottom 2px solid lightgray 9 | border-radius 2px 10 | opacity .65 11 | background none 12 | &:hover 13 | border 2px solid lightgray 14 | opacity 1 15 | box-shadow 0 0 10px rgba(0, 0, 0, .3) 16 | 17 | #search-form .fa-times 18 | display none 19 | padding 1px .7em 20 | box-shadow: 0 0 3px rgba(0, 0, 0, .15) 21 | cursor pointer 22 | color gray 23 | &:active 24 | background lightgray 25 | &:hover 26 | zoom 1.1 27 | padding 1px .6em 28 | border: 1px solid lightgray 29 | box-shadow: 0 0 6px rgba(0, 0, 0, .25) 30 | 31 | #local-search-result 32 | margin auto -12% auto -6% 33 | font-size .9rem 34 | text-align left 35 | word-break break-all 36 | ul.search-result-list li:hover 37 | font-weight normal 38 | li 39 | margin .5em auto 40 | border-bottom 2px solid lightgray 41 | .search-result-list li:hover 42 | background rgba(158,188,226,0.21) 43 | box-shadow 0 0 5px rgba(0, 0, 0, .2) 44 | a.search-result-title 45 | line-height 1.2 46 | font-weight bold 47 | color #708090 48 | p.search-result 49 | margin .4em auto 50 | line-height 1.2rem 51 | max-height @line-height * 3rem 52 | overflow hidden 53 | font-size .8rem 54 | text-align justify 55 | color gray 56 | em.search-keyword 57 | color #f58e90 58 | border-bottom: 1px dashed @color 59 | font-weight: bold 60 | font-size .85rem 61 | 62 | p.no-result 63 | display none 64 | margin 2em 0 2em 6% 65 | padding-bottom .5em 66 | text-align left 67 | color gray 68 | font-family font-serif serif 69 | border-bottom 2px solid lightgray -------------------------------------------------------------------------------- /source/css/_partial/customise/heading.styl: -------------------------------------------------------------------------------- 1 | heading_style = hexo-config("heading_style") 2 | all_heading = "h1, h2, h3, h4, h5, h6" 3 | 4 | if !heading_style 5 | h1 6 | margin-top 30px 7 | h2 8 | margin .5em auto 9 | color rgb(102, 190, 102) 10 | padding-bottom 5px 11 | border-bottom 1px solid #ddd 12 | text-align center 13 | font-size 1.5rem 14 | &:hover 15 | color #88acdb 16 | &::before, &::after 17 | content " —— " 18 | font-family Arial 19 | h3 20 | margin .5em auto 21 | color #438aac 22 | background rgba(243,248,253,0.6) 23 | border 1px solid #d2e8fa 24 | padding .2em .6em 25 | box-shadow: 1px 1px 1px rgba(0,0,0, .15) 26 | &:hover a 27 | text-decoration underline 28 | &::after 29 | content " >" 30 | h4, h5, h6 31 | margin-top 20px 32 | color #574c4c 33 | padding-bottom 5px 34 | border-bottom 1px solid #ddd 35 | 36 | if heading_style == 1 37 | {all_heading} 38 | margin-top 20px 39 | color #574C4C 40 | padding-bottom 5px 41 | border-bottom 1px solid #ddd 42 | h1 43 | margin-top 30px 44 | 45 | if heading_style == 2 46 | {all_heading} 47 | margin-top 1em 48 | margin-bottom 16px 49 | font-weight bold 50 | line-height 1.4 51 | color #333 52 | font-family "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" 53 | h1, h2 54 | padding-bottom .3em 55 | border-bottom 1px solid #eee 56 | 57 | heading = 2.25 1.2, 1.75 1.225, 1.5 1.43, 1.25 1.1 58 | for x, i in heading 59 | h{i+1} 60 | font-size x[0]rem 61 | line-height x[1] 62 | 63 | h1 64 | margin .67em 0 65 | h5, h6 66 | font-size 1rem 67 | h6 68 | color #777 -------------------------------------------------------------------------------- /layout/_partial/footer.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/css/_partial/mobile-slider.styl: -------------------------------------------------------------------------------- 1 | #viewer{ 2 | position: fixed; 3 | z-index: 1000000; 4 | top: 0; 5 | bottom: 0; 6 | left: 0; 7 | right: 0; 8 | overflow: hidden; 9 | } 10 | #viewer-box{ 11 | display: flex; 12 | width: 100%; 13 | height: 100%; 14 | position: relative; 15 | color: #ccc; 16 | -webkit-transform: translate3d(-100%, 0, 0 ); 17 | -webkit-transition: -webkit-transform .25s ease-in-out; 18 | .viewer-box-l{ 19 | background: rgba(20,20,20,0.9); 20 | width: 80%; 21 | height: auto; 22 | flex-grow: 0; 23 | min-width: 8em; 24 | max-width: 23em; 25 | .viewer-box-wrap{ 26 | margin: 20px 10px 0px 20px; 27 | } 28 | .viewer-title{ 29 | line-height: 32px; 30 | &:before{ 31 | content: ""; 32 | width: 6px; 33 | height: 6px; 34 | border: 1px solid #999; 35 | -webkit-border-radius: 10px; 36 | border-radius: 10px; 37 | background: #aaa; 38 | display: inline-block; 39 | margin-right: 10px; 40 | } 41 | } 42 | .viewer-div{ 43 | border-bottom: 1px dotted #666; 44 | padding-bottom: 13px; 45 | line-height: 20px; 46 | &:last-child{ 47 | border-bottom: none; 48 | } 49 | .switch-friends-link{ 50 | line-height: 20px; 51 | } 52 | } 53 | } 54 | .viewer-box-r{ 55 | flex-grow: 1 56 | width: auto 57 | height: auto 58 | background: rgba(0,0,0,0) 59 | &:hover { 60 | cursor: w-resize 61 | } 62 | } 63 | } 64 | #viewer-box.anm-swipe{ 65 | -webkit-transform: translate3d(0, 0, 0); 66 | .viewer-box-r{ 67 | background: rgba(0,0,0,0); 68 | } 69 | } 70 | .hide{ 71 | display: none; 72 | } 73 | #viewer-box .viewer-list{ 74 | margin: 0; 75 | padding: 0; 76 | height: 100%; 77 | overflow: hidden; 78 | } -------------------------------------------------------------------------------- /layout/_partial/post/nav.ejs: -------------------------------------------------------------------------------- 1 | <% if ((post.original != false && !is_page() && theme.copyright) || post.original){ %> 2 | 16 | <% } %> 17 | 18 | <% if (post.prev || post.next){ %> 19 | 35 | <% } %> -------------------------------------------------------------------------------- /source/css/_partial/toc.styl: -------------------------------------------------------------------------------- 1 | #tocButton 2 | position fixed 3 | left left-col-width - 80px 4 | top toc-top + 7 5 | font-size .9em 6 | font-weight bold 7 | font-family inherit 8 | color lightgray 9 | cursor pointer 10 | background none 11 | border none 12 | outline none 13 | -webkit-appearance none 14 | &:hover 15 | color: #88acdb 16 | 17 | .toc-article 18 | position fixed 19 | width left-col-width - 70px 20 | top toc-top 21 | bottom 1em 22 | left 0 23 | margin-left 0 24 | padding 6px 10px 10px 50 - (base-font-size - 16)*2 25 | border-radius 2.8% 26 | overflow auto 27 | 28 | #toc 29 | font-size .9rem 30 | line-height 1.65em 31 | .toc-title 32 | font-weight bold 33 | color gray 34 | &.clickable 35 | cursor pointer 36 | &:hover 37 | color #88acdb 38 | &:active 39 | color lightgray 40 | 41 | ol.toc 42 | margin-left 0 43 | padding .7em 44 | padding-right 0 45 | li.toc-item 46 | list-style-type none 47 | i 48 | display inline-block 49 | margin-left -.9em 50 | width .9em 51 | color hsl(0, 0%, 70%) 52 | font-weight: bold 53 | cursor pointer 54 | &:hover 55 | color black 56 | i.hide 57 | display none 58 | &:hover 59 | background none 60 | 61 | a.toc-link 62 | color: gray 63 | &:visited 64 | color rgba(244, 131, 133, 1) 65 | &:hover 66 | color #88acdb 67 | text-decoration none 68 | background rgba(158, 188, 226, .21) 69 | 70 | ol.toc-child 71 | padding-left 1.25em 72 | margin 4px 0 73 | 74 | 75 | if toc-nowrap 76 | a.toc-link 77 | display inline-block 78 | width 100% 79 | text-overflow ellipsis 80 | white-space nowrap 81 | overflow-x hidden 82 | li.toc-item 83 | line-height: 1.45em 84 | & > i 85 | position: relative 86 | bottom: .35em -------------------------------------------------------------------------------- /source/css/style.styl: -------------------------------------------------------------------------------- 1 | @import "nib" 2 | @import "_variables" 3 | @import "_util/mixin" 4 | @import "_util/grid" 5 | 6 | global-reset() 7 | 8 | ol{ 9 | list-style: decimal; 10 | padding-left: 20px; 11 | } 12 | ul{ 13 | list-style: none; 14 | } 15 | input, button 16 | margin: 0 17 | padding: 0 18 | &::-moz-focus-inner 19 | border: 0 20 | padding: 0 21 | 22 | html 23 | font-size base-font-size 24 | 25 | body 26 | font-family: font-sans, font-chs, sans-serif; 27 | background: #fff; 28 | text-rendering: optimizeLegibility; 29 | -moz-osx-font-smoothing: grayscale; 30 | -moz-font-feature-settings: "liga" on; 31 | color: #333 32 | -webkit-overflow-scrolling: touch 33 | 34 | ::selection 35 | background: rgba(147, 181, 224, .6); 36 | color: white; 37 | 38 | h2,h3,h4,h5,h6 { 39 | font-family: font-serif, serif; 40 | font-weight bold 41 | } 42 | h1,h2,h3{ 43 | display: block; 44 | } 45 | h1 { 46 | font-size: 1.6rem; 47 | font-family: "Segoe UI", font-sans, font-chs, sans-serif; 48 | } 49 | h2 { 50 | font-size:1.4rem 51 | } 52 | h3 { 53 | font-size:1.15rem 54 | } 55 | h4,h5,h6{ 56 | font-size:1rem 57 | } 58 | 59 | a { 60 | text-decoration:none; 61 | outline-width:0; 62 | color:#258fb8; 63 | outline: none; 64 | } 65 | 66 | .alignleft { 67 | float:left 68 | } 69 | .alignright { 70 | float:right 71 | } 72 | .clearfix { 73 | *zoom:1 74 | } 75 | .clearfix:after { 76 | content:""; 77 | display:table; 78 | clear:both 79 | } 80 | .inner { 81 | width:1000px; 82 | margin:0 auto 83 | } 84 | .hide{ 85 | display: none; 86 | } 87 | @media screen and (max-width:1040px) { 88 | .inner { 89 | width:100% 90 | } 91 | } 92 | 93 | @import "_extend" 94 | @import "_partial/main" 95 | @import "_partial/archive" 96 | @import "_partial/article" 97 | @import "_partial/archive" 98 | @import "_partial/highlight" 99 | @import "_partial/footer" 100 | 101 | if share 102 | @import "_partial/share" 103 | 104 | @import "_partial/page" 105 | @import "_partial/instagram" 106 | @import "_partial/tagcloud" 107 | @import "_partial/scroll" 108 | @import "_partial/mobile-slider" 109 | 110 | if search 111 | @import "_partial/search" 112 | 113 | @import "_partial/customise/color-scheme" 114 | 115 | if sidebar 116 | @import "_partial/sidebar" -------------------------------------------------------------------------------- /source/css/_variables.styl: -------------------------------------------------------------------------------- 1 | // Config 2 | support-for-ie = false 3 | vendor-prefixes = webkit moz ms official 4 | 5 | // Colors 6 | color-default = #555 7 | color-grey = #999 8 | color-border = #ddd 9 | color-link = #258fb8 10 | color-background = #eee 11 | color-sidebar-text = #777 12 | color-widget-background = #ddd 13 | color-widget-border = #ccc 14 | color-footer-background = #262a30 15 | color-mobile-nav-background = #191919 16 | color-twitter = #00aced 17 | color-facebook = #3b5998 18 | color-pinterest = #cb2027 19 | color-google = #dd4b39 20 | 21 | // Fonts 22 | font-chs = "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "WenQuanYi Micro Hei" // sans-serif 23 | font-sans = "Lucida Grande", Verdana, "Helvetica Neue", Arial // sans-serif 24 | font-serif = Times, Georgia // serif 25 | font-mono = Menlo, Consolas, "Source Code Pro", Inconsolata, Monaco // monospace 26 | font-icon = FontAwesome 27 | base-font-size = hexo-config("base_font_size")px 28 | font-size = 14px 29 | line-height = 1.6em 30 | line-height-title = 1.1em 31 | 32 | // Header 33 | logo-size = 40px 34 | subtitle-size = 16px 35 | banner-height = 300px 36 | banner-url = "images/banner.jpg" 37 | 38 | sidebar = hexo-config("sidebar") 39 | 40 | // Layout 41 | block-margin = 50px 42 | article-padding = 20px 43 | mobile-nav-width = 280px 44 | main-column = 9 45 | sidebar-column = 3 46 | 47 | if sidebar and sidebar isnt bottom 48 | _sidebar-column = sidebar-column 49 | else 50 | _sidebar-column = 0 51 | 52 | // Grids 53 | column-width = 80px 54 | gutter-width = 20px 55 | columns = main-column + _sidebar-column 56 | 57 | // Media queries 58 | mq-mobile = "screen and (max-width: 479px)" 59 | mq-tablet = "screen and (min-width: 480px) and (max-width: 767px)" 60 | mq-normal = "screen and (min-width: 768px)" 61 | 62 | hover-color = #9c9 63 | left-col-width = hexo-config("left_col_width")px 64 | 65 | // Background Color 66 | left-col-color = rgba(255,255,255,.85) 67 | mid-col-color = rgba(255,255,255,.8) 68 | article-color = rgba(255,255,255,.45) 69 | archives-color = rgba(255,255,255,.4) 70 | 71 | root-url = hexo-config("root_url") 72 | i-opacity = .75 73 | toc-top = 378px 74 | 75 | share = hexo-config("share.on") 76 | search = hexo-config("search.on") 77 | toc-nowrap = hexo-config("toc.nowrap") 78 | 79 | color-scheme = hexo-config("color_scheme") 80 | background-image = hexo-config("background_image") 81 | color-list = #88acdb, lightsalmon, lightcoral, #76becc, #918597, #6fc0e4, rosybrown 82 | if color-scheme == "yilia" 83 | color-list = #ba8f6c #ff945c #7B5D5F #f5c7b7 #cfb7c4 #918597 rosybrown -------------------------------------------------------------------------------- /source/css/_partial/instagram.styl: -------------------------------------------------------------------------------- 1 | #post-instagram{ 2 | .article-entry{ 3 | padding-right: 0; 4 | } 5 | padding: 30px; 6 | } 7 | .instagram{ 8 | position: relative; 9 | min-height: 500px; 10 | } 11 | .instagram .open-ins{ 12 | display: block; 13 | padding: 10px 0; 14 | position: absolute; 15 | right: 28px; 16 | top: -75px; 17 | color: #333; 18 | &:hover{ 19 | color: #657b83; 20 | } 21 | } 22 | .instagram .year{ 23 | display: inline; 24 | } 25 | .instagram .album h1 em{ 26 | font-style: normal; 27 | font-size: 14px; 28 | margin-left: 10px; 29 | } 30 | .instagram .album ul{ 31 | min-height: 149px; 32 | padding-top: 17px; 33 | border-bottom: 1px solid #ddd; 34 | list-style: none; 35 | } 36 | .instagram .album li{ 37 | position: relative; 38 | display: inline-block; 39 | min-width: 157px; 40 | margin: 0; 41 | &:before{ 42 | display: none; 43 | } 44 | } 45 | 46 | 47 | .instagram .album div.img-box{ 48 | position: relative; 49 | margin: 0 20px 10px; 50 | -webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.4), 0 1px 0 1px rgba(255,255,255,0.1); 51 | -moz-box-shadow: 0 1px 0 rgba(255,255,255,0.4), 0 1px 0 1px rgba(255,255,255,0.1); 52 | box-shadow: 0 1px 0 rgba(255,255,255,0.4), 0 1px 0 1px rgba(255,255,255,0.1); 53 | } 54 | .instagram .album div.img-box .img-bg{ 55 | position: absolute; 56 | top: 0; 57 | left: 0; 58 | bottom: 0px; 59 | width: 100%; 60 | margin: -5px; 61 | padding: 5px; 62 | background: rgba(204, 204, 204, 0.8) ; 63 | -webkit-box-shadow: 0 0 0 1px rgba(0,0,0,.04), 0 1px 5px rgba(0,0,0,0.1); 64 | -moz-box-shadow: 0 0 0 1px rgba(0,0,0,.04), 0 1px 5px rgba(0,0,0,0.1); 65 | box-shadow: 0 0 0 1px rgba(0,0,0,.04), 0 1px 5px rgba(0,0,0,0.1); 66 | -webkit-transition: all 0.15s ease-out 0.1s; 67 | -moz-transition: all 0.15s ease-out 0.1s; 68 | -o-transition: all 0.15s ease-out 0.1s; 69 | transition: all 0.15s ease-out 0.1s; 70 | opacity: 0.2; 71 | cursor: pointer; 72 | display: block; 73 | } 74 | .instagram .album div.img-box .img-bg:hover{ 75 | opacity: 0; 76 | } 77 | .instagram .album div.img-box img{ 78 | width: 100%; 79 | height: auto; 80 | display: block; 81 | } 82 | @media screen and (max-width:600px) { 83 | .instagram .album ul { 84 | margin-left: 0; 85 | padding: 0; 86 | text-align: center; 87 | } 88 | .instagram .album li { 89 | max-width: 300px; 90 | } 91 | .instagram .album div.img-box{ 92 | margin: 0; 93 | } 94 | } -------------------------------------------------------------------------------- /source/css/_partial/customise/social-icon.styl: -------------------------------------------------------------------------------- 1 | #header .header-nav .social 2 | margin-top 10px 3 | text-align center 4 | font-family Arial 5 | a 6 | width base-font-size + 21 7 | height @width 8 | border-radius 50% 9 | margin 0 2px 6px 10 | vertical-align middle 11 | font-size .66*@width 12 | line-height @width 13 | text-align center 14 | color white 15 | background #6f7170 16 | opacity i-opacity 17 | box-shadow 1px 2px 2px rgba(0,0,0, .1), 1px 1px 3px rgba(0,0,0, .3) 18 | &:hover 19 | opacity 1 20 | transform scale(1.1) 21 | 22 | img-logo = "新浪微博" #ecc260 80, 23 | "知乎" #0078d8 90, 24 | "豆瓣" #06c611 88, 25 | V2EX #e4cdb4 78, 26 | TiddlyWiki #6283dd 82, 27 | "简书" #e99888 82, 28 | SegmentFault #018f56 80, 29 | "网易云音乐" #e51e02 80, 30 | "虾米音乐" #ff6a00 82, 31 | CSDN red 82, 32 | "博客园" #217ed4 95, 33 | Plunker black 90, 34 | LOFTER #316061 75, 35 | Coding white 88, 36 | bilibili #f589a0 100, 37 | AcFun #fbc054 90, 38 | niconico white 70, 39 | Quora #b92b27 103 40 | 41 | for i in img-logo 42 | .{i[0]} 43 | background url(root-url + '/img/' + i[0] + '.png') center no-repeat i[1] 44 | background-size i[2] + "%" 45 | 46 | .GitHub 47 | background url(//cdn.bootcss.com/logos/0.2.0/github-octocat.svg) no-repeat white 48 | background-size 90% 49 | background-position 50% 100% 50 | 51 | .CodePen 52 | background url(//cdn.bootcss.com/logos/0.2.0/codepen-icon.svg) no-repeat black 53 | background-size 70% 54 | background-position 50% 50% 55 | 56 | // icon from Font Awesome 57 | font-logo = RSS f09e #ef7522, 58 | Google f1a0 #c83d20, 59 | Twitter f099 #55cff8, 60 | LinkedIn f0e1 #005a87, 61 | Email f003 #6fc0e4, 62 | Facebook f09a #3b5998, 63 | QQ f1d6 #1cbcef, 64 | '微信' f1d7 #8cdc49, 65 | PayPal f1ed #03a4e4, 66 | StackOverflow f16c #f48024, 67 | Instagram f16d #bab0a6, 68 | Flickr f16e #0365c8, 69 | reddit f281 #0278d1, 70 | Medium f23a #00ab6b, 71 | Tumblr f173 #3a5976, 72 | _500px f26e #0099e5 73 | 74 | for i in font-logo 75 | .{i[0]} 76 | background i[2] 77 | &::before 78 | content '\' + i[1] -------------------------------------------------------------------------------- /source/css/_partial/customise/code-block.styl: -------------------------------------------------------------------------------- 1 | // https://github.com/chriskempson/tomorrow-theme 2 | 3 | // Tomorrow 4 | highlight-background = rgba(249, 249, 249, .5) 5 | highlight-current-line = #efefef 6 | highlight-selection = #d6d6d6 7 | highlight-foreground = #4d4d4c 8 | highlight-comment = #8e908c 9 | highlight-red = #c82829 10 | highlight-orange = #f5871f 11 | highlight-yellow = #eab700 12 | highlight-green = #718c00 13 | highlight-aqua = #3e999f 14 | highlight-blue = #4271ae 15 | highlight-purple = #8959a8 16 | 17 | highlight_style = hexo-config("highlight_style.on") 18 | code_block = hexo-config("highlight_style.code_block") 19 | 20 | if highlight_style 21 | 22 | // Tomorrow Night Eighties 23 | if code_block 24 | highlight-background = rgba(51, 51, 51, .85) 25 | highlight-current-line = #393939 26 | highlight-selection = #515151 27 | highlight-foreground = #cccccc 28 | highlight-comment = #999999 29 | highlight-red = #f2777a 30 | highlight-orange = #f99157 31 | highlight-yellow = #ffcc66 32 | highlight-green = #99cc99 33 | highlight-aqua = #66cccc 34 | highlight-blue = #6699cc 35 | highlight-purple = #cc99cc 36 | 37 | // Tomorrow Night 38 | if code_block == "2" 39 | highlight-background = rgba(32, 34, 37, .85) 40 | highlight-current-line = #282a2e 41 | highlight-selection = #373b41 42 | highlight-foreground = #c5c8c6 43 | highlight-comment = #969896 44 | highlight-red = #cc6666 45 | highlight-orange = #de935f 46 | highlight-yellow = #f0c674 47 | highlight-green = #b5bd68 48 | highlight-aqua = #8abeb7 49 | highlight-blue = #81a2be 50 | highlight-purple = #b294bb 51 | 52 | // Tomorrow Night Blue 53 | if code_block == "3" 54 | highlight-background = rgba(0, 40, 91, .8) 55 | highlight-current-line = #00346e 56 | highlight-selection = #003f8e 57 | highlight-foreground = #ffffff 58 | highlight-comment = #7285b7 59 | highlight-red = #ff9da4 60 | highlight-orange = #ffc58f 61 | highlight-yellow = #ffeead 62 | highlight-green = #d1f1a9 63 | highlight-aqua = #99ffff 64 | highlight-blue = #bbdaff 65 | highlight-purple = #ebbbff 66 | 67 | // Tomorrow Night Bright 68 | if code_block == "4" 69 | highlight-background = rgba(0, 0, 0, .67) 70 | highlight-current-line = #2a2a2a 71 | highlight-selection = #424242 72 | highlight-foreground = #eaeaea 73 | highlight-comment = #969896 74 | highlight-red = #d54e53 75 | highlight-orange = #e78c45 76 | highlight-yellow = #e7c547 77 | highlight-green = #b9ca4a 78 | highlight-aqua = #70c0b1 79 | highlight-blue = #7aa6da 80 | highlight-purple = #c397d8 -------------------------------------------------------------------------------- /layout/_partial/article.ejs: -------------------------------------------------------------------------------- 1 |
2 | <%if(post.noDate != "true"){%> 3 |
4 | <%- partial('post/date', {class_name: 'article-date', date_format: null}) %> 5 |
6 | <%}%> 7 |
8 | <% if (theme.fancybox){ %> 9 | 10 | <% } %> 11 | <% if (post.link || post.title){ %> 12 |
13 | <%- partial('post/title', {class_name: 'article-title'}) %> 14 |
15 | <% if (!index){ %> 16 | 21 | <% } %> 22 | <% } %> 23 |
24 | <% if (index && (post.description || post.excerpt)){ %> 25 | <% if (post.description){ %> 26 | <%- post.description %> 27 | <% } else { %> 28 | <%- post.excerpt %> 29 | <% } %> 30 | <% } else { %> 31 | <% if (is_page()){ %> 32 | <%- partial('_partial/page') %> 33 | <% } %> 34 | <%- post.content %> 35 | <% } %> 36 |
37 | <% if (index){ %> 38 | 53 | <% } %> 54 |
55 | <% if (!index){ %> 56 | <%- partial('post/nav') %> 57 | <% } %> 58 |
59 | <%- partial('_partial/toc') %> 60 | 61 | <% if (!index && theme.share.on && (post.share != false || post.share)){ %> 62 | <%- partial('post/share') %> 63 | <% } %> 64 | 65 | <% if (!index && post.comments){ %> 66 | <% if (theme.duoshuo.on) { %> 67 | <%- partial('comments/duoshuo', { 68 | key: post.path, 69 | title: post.title, 70 | url: config.url+url_for(post.path), 71 | }) %> 72 | <% } else if (theme.youyan.on) { %> 73 | <%- partial('comments/youyan') %> 74 | <% } else if (theme.disqus.on) { %> 75 | <%- partial('comments/disqus', { 76 | shortname: theme.disqus.shortname 77 | }) %> 78 | <% } else if (config.disqus_shortname) { %> 79 | <%- partial('comments/disqus', { 80 | shortname: config.disqus_shortname 81 | }) %> 82 | <% } %> 83 | <% } %> 84 | 85 | <%- partial('_partial/post-nav-button') %> 86 | 87 | <% if (!index) { %> 88 | 93 | <% } %> -------------------------------------------------------------------------------- /source/css/_partial/archive.styl: -------------------------------------------------------------------------------- 1 | .archives-wrap{ 2 | position: relative; 3 | margin: 0 30px; 4 | padding-right: 1.5em; 5 | border-bottom: 1px solid #eee; 6 | background: #fff; 7 | &:first-child{ 8 | margin-top: 30px; 9 | } 10 | &:last-child{ 11 | margin-bottom: 80px; 12 | } 13 | .archive-year-wrap{ 14 | line-height: 35px; 15 | width: 200px; 16 | position: absolute; 17 | padding-top: 20px; 18 | font-size: 1.8em; 19 | } 20 | .archive-year-wrap a{ 21 | color: #666; 22 | font-weight: bold; 23 | padding-left: 48px; 24 | } 25 | } 26 | 27 | .archives { 28 | position:relative; 29 | .article-info{ 30 | border: none; 31 | } 32 | .archive-article { 33 | margin-left:160px; 34 | padding:0.5em 0; 35 | border-bottom: 1px solid #eee; 36 | border-top: 1px solid #fff; 37 | position: relative; 38 | &:first-child{ 39 | border-top: 1em; 40 | padding-top: 20px; 41 | } 42 | &:last-child{ 43 | border-bottom: none; 44 | } 45 | } 46 | 47 | .archive-article-title { 48 | font-size: (18/16)rem; 49 | color: #333; 50 | transition: color 0.3s; 51 | &:hover{ 52 | color: #657b83; 53 | } 54 | span{ 55 | display: block; 56 | color: #a8a8a8; 57 | font-size: 12px; 58 | line-height: 14px; 59 | height: 7px; 60 | padding-left: 2px; 61 | &:before{ 62 | display: inline-block; 63 | content: "“"; 64 | font-family: serif; 65 | font-size: 30px; 66 | float: left; 67 | margin: 4px 4px 0 -12px; 68 | color: #c8c8c8; 69 | } 70 | } 71 | } 72 | } 73 | 74 | .archive-article-inner{ 75 | .archive-article-header{ 76 | position: relative; 77 | } 78 | .article-meta{ 79 | position: relative; 80 | float: right; 81 | margin-top: -(5/18)rem 82 | padding-right 0 83 | color: #555; 84 | background: none; 85 | text-align: right; 86 | width: auto; 87 | .article-date{ 88 | time{ 89 | color: #aaa; 90 | } 91 | } 92 | .archive-article-date, .article-tag-list{ 93 | margin-right: 1em; 94 | display: -moz-inline-stack; 95 | display: inline-block; 96 | vertical-align: middle; 97 | zoom: 1; 98 | color: #666; 99 | font-size: 14px; 100 | } 101 | .archive-article-date{ 102 | cursor: default; 103 | font-size: (14/16)rem; 104 | margin-bottom: 5px; 105 | margin-top: -10px; 106 | time{ 107 | &:before { 108 | content: "\f073"; 109 | color: #999; 110 | position: relative; 111 | margin-right: 10px; 112 | font: base-font-size FontAwesome; 113 | } 114 | } 115 | } 116 | .article-category{ 117 | &:before{ 118 | float: left; 119 | margin-top: 1px; 120 | left: 15px; 121 | } 122 | .article-category-link{ 123 | width: auto; 124 | max-width: 83px; 125 | padding-left: 10px; 126 | } 127 | } 128 | .article-tag-list{ 129 | margin-top: 0px; 130 | &:before{ 131 | left: 15px; 132 | } 133 | .article-tag-list-item{ 134 | display: inline-block; 135 | width: auto; 136 | max-width: 83px; 137 | padding-left: 8px; 138 | font-size: 12px; 139 | } 140 | } 141 | } 142 | } 143 | 144 | .archives-wrap { 145 | background: archives-color; 146 | .archives { 147 | background: transparent; 148 | } 149 | } 150 | -------------------------------------------------------------------------------- /source/css/_partial/header.styl: -------------------------------------------------------------------------------- 1 | #header 2 | height: banner-height 3 | position: relative 4 | border-bottom: 1px solid color-border 5 | &:before, &:after 6 | content: "" 7 | position: absolute 8 | left: 0 9 | right: 0 10 | height: 40px 11 | &:before 12 | top: 0 13 | background: linear-gradient(rgba(0, 0, 0, 0.2), transparent) 14 | &:after 15 | bottom: 0 16 | background: linear-gradient(transparent, rgba(0, 0, 0, 0.2)) 17 | 18 | #header-outer 19 | height: 100% 20 | position: relative 21 | 22 | #header-inner 23 | position: relative 24 | overflow: hidden 25 | 26 | #banner 27 | position: absolute 28 | top: 0 29 | left: 0 30 | width: 100% 31 | height: 100% 32 | background: url(banner-url) center #000 33 | background-size: cover 34 | z-index: -1 35 | 36 | #header-title 37 | text-align: center 38 | height: logo-size 39 | position: absolute 40 | top: 50% 41 | left: 0 42 | margin-top: logo-size * -0.5 43 | 44 | $logo-text 45 | text-decoration: none 46 | color: #fff 47 | font-weight: 300 48 | text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) 49 | 50 | #logo 51 | @extend $logo-text 52 | font-size: logo-size 53 | line-height: logo-size 54 | letter-spacing: 2px 55 | 56 | #subtitle 57 | @extend $logo-text 58 | font-size: subtitle-size 59 | line-height: subtitle-size 60 | letter-spacing: 1px 61 | 62 | #subtitle-wrap 63 | margin-top: subtitle-size 64 | 65 | #main-nav 66 | float: left 67 | margin-left: -15px 68 | 69 | $nav-link 70 | float: left 71 | color: #fff 72 | opacity: 0.6 73 | text-decoration: none 74 | text-shadow: 0 1px rgba(0, 0, 0, 0.2) 75 | transition: opacity 0.2s 76 | display: block 77 | padding: 20px 15px 78 | &:hover 79 | opacity: 1 80 | 81 | .nav-icon 82 | @extend $nav-link 83 | font-family: font-icon 84 | text-align: center 85 | font-size: font-size 86 | width: font-size 87 | height: font-size 88 | padding: 20px 15px 89 | position: relative 90 | cursor: pointer 91 | 92 | .main-nav-link 93 | @extend $nav-link 94 | font-weight: 300 95 | letter-spacing: 1px 96 | @media mq-mobile 97 | display: none 98 | 99 | #main-nav-toggle 100 | display: none 101 | &:before 102 | content: "\f0c9" 103 | @media mq-mobile 104 | display: block 105 | 106 | #sub-nav 107 | float: right 108 | margin-right: -15px 109 | 110 | #nav-rss-link 111 | &:before 112 | content: "\f09e" 113 | 114 | #nav-search-btn 115 | &:before 116 | content: "\f002" 117 | 118 | #search-form-wrap 119 | position: absolute 120 | top: 15px 121 | width: 150px 122 | height: 30px 123 | right: -150px 124 | opacity: 0 125 | transition: 0.2s ease-out 126 | &.on 127 | opacity: 1 128 | right: 0 129 | @media mq-mobile 130 | width: 100% 131 | right: -100% 132 | 133 | .search-form 134 | position: absolute 135 | top: 0 136 | left: 0 137 | right: 0 138 | background: #fff 139 | padding: 5px 15px 140 | border-radius: 15px 141 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.3) 142 | 143 | .search-form-input 144 | border: none 145 | background: none 146 | color: color-default 147 | width: 100% 148 | font: 13px font-sans 149 | outline: none 150 | &::-webkit-search-results-decoration 151 | &::-webkit-search-cancel-button 152 | -webkit-appearance: none 153 | 154 | .search-form-submit 155 | position: absolute 156 | top: 50% 157 | right: 10px 158 | margin-top: -7px 159 | font: 13px font-icon 160 | border: none 161 | background: none 162 | color: #bbb 163 | cursor: pointer 164 | &:hover, &:focus 165 | color: #777 -------------------------------------------------------------------------------- /source/css/_partial/highlight.styl: -------------------------------------------------------------------------------- 1 | @require "customise/code-block" 2 | 3 | $code-block 4 | background: highlight-background 5 | margin: auto 6 | padding: .35em 1.5em 7 | border-style: solid 8 | border-color: color-border 9 | border-width: 1px 10 | overflow: auto 11 | color: highlight-foreground 12 | line-height: 1.3rem 13 | 14 | $line-numbers 15 | color: lightgray 16 | font-size: .85rem 17 | 18 | .article-entry 19 | pre, code 20 | font-family: font-mono, monospace, font-chs 21 | font-size: 1em 22 | pre 23 | @extend $code-block 24 | code 25 | text-shadow none 26 | padding 0 27 | background none 28 | color highlight-foreground 29 | box-shadow none 30 | .highlight 31 | @extend $code-block 32 | border-radius: 2px 33 | max-height: 50em 34 | margin-top: .5em 35 | margin-bottom: 1em 36 | overflow: auto 37 | box-shadow: 1px 1px 1px rgba(0,0,0, .05) 38 | pre 39 | background: none 40 | border: none 41 | margin: 0 42 | padding: 0 43 | table 44 | margin: 0 45 | width: auto 46 | td 47 | border: none 48 | padding: 0 49 | figcaption 50 | clearfix() 51 | font-size: 0.85em 52 | color: highlight-comment 53 | line-height: 1em 54 | margin-bottom: 1em 55 | a 56 | float: right 57 | .gutter pre 58 | @extend $line-numbers 59 | text-align: right 60 | padding-right: 1em 61 | .line 62 | line-height 1.3rem 63 | .gist 64 | margin: 0 article-padding * -1 65 | border-style: solid 66 | border-color: color-border 67 | border-width: 1px 0 68 | background: highlight-background 69 | padding: 15px article-padding 15px 0 70 | .gist-file 71 | border: none 72 | font-family: font-mono monospace 73 | margin: 0 74 | .gist-data 75 | background: none 76 | border: none 77 | .line-numbers 78 | @extend $line-numbers 79 | background: none 80 | border: none 81 | padding: 0 20px 0 0 82 | .line-data 83 | padding: 0 !important 84 | .highlight 85 | margin: 0 86 | padding: 0 87 | border: none 88 | .gist-meta 89 | background: highlight-background 90 | color: highlight-comment 91 | font: 0.85em font-sans 92 | text-shadow: 0 0 93 | padding: 0 94 | margin-top: 1em 95 | margin-left: article-padding 96 | a 97 | color: color-link 98 | font-weight: normal 99 | &:hover 100 | text-decoration: underline 101 | 102 | @require "customise/inline-code.styl" 103 | 104 | pre 105 | .comment 106 | .title 107 | color: highlight-comment 108 | .variable 109 | .attribute 110 | .tag 111 | .regexp 112 | .ruby .constant 113 | .xml .tag .title 114 | .xml .pi 115 | .xml .doctype 116 | .html .doctype 117 | .css .id 118 | .css .class 119 | .css .pseudo 120 | color: highlight-red 121 | .number 122 | .preprocessor 123 | .built_in 124 | .literal 125 | .params 126 | .constant 127 | color: highlight-orange 128 | .class 129 | .ruby .class .title 130 | .css .rules .attribute 131 | color: highlight-green 132 | .string 133 | .value 134 | .inheritance 135 | .header 136 | .ruby .symbol 137 | .xml .cdata 138 | color: highlight-green 139 | .css .hexcolor 140 | color: highlight-aqua 141 | .function 142 | .python .decorator 143 | .python .title 144 | .ruby .function .title 145 | .ruby .title .keyword 146 | .perl .sub 147 | .javascript .title 148 | .coffeescript .title 149 | color: highlight-blue 150 | .keyword 151 | .javascript .function 152 | color: highlight-purple -------------------------------------------------------------------------------- /source/js/toc.js: -------------------------------------------------------------------------------- 1 | define(function (){ 2 | 3 | var toggleTocArea = function(){ 4 | var valueHide = yiliaConfig.toc[0]; 5 | var valueShow = yiliaConfig.toc[1]; 6 | if ($(".left-col").is(":hidden")) { 7 | $("#tocButton").attr("value", valueShow); 8 | } 9 | $("#tocButton").click(function() { 10 | if ($("#toc").is(":hidden")) { 11 | $("#tocButton").attr("value", valueHide); 12 | $("#toc").slideDown(320); 13 | $(".switch-btn, .switch-area").fadeOut(300); 14 | } 15 | else { 16 | $("#tocButton").attr("value", valueShow); 17 | $("#toc").slideUp(350); 18 | $(".switch-btn, .switch-area").fadeIn(500); 19 | } 20 | }) 21 | }() 22 | 23 | var HideTOCifNoHeader = function(){ 24 | if (!$(".toc").length) { 25 | $("#toc, #tocButton").hide(); 26 | $(".switch-btn, .switch-area").show(); 27 | } 28 | }() 29 | 30 | var $itemHasChild = $("#toc .toc-item:has(> .toc-child)"); 31 | var $titleHasChild = $itemHasChild.children(".toc-link"); 32 | $itemHasChild.prepend(""); 33 | 34 | var clickIcon = function(){ 35 | $("#toc .toc-item > i").click(function(){ 36 | $(this).siblings(".toc-child").slideToggle(100); 37 | $(this).toggleClass("hide"); 38 | $(this).siblings("i").toggleClass("hide"); 39 | }) 40 | }() 41 | 42 | var clickTitle = function(){ 43 | $titleHasChild.dblclick(function(){ 44 | $(this).siblings(".toc-child").hide(100); 45 | $(this).siblings("i").toggleClass("hide"); 46 | }) 47 | // After dblclick enent 48 | $titleHasChild.click(function(){ 49 | var $curentTocChild = $(this).siblings(".toc-child"); 50 | if ($curentTocChild.is(":hidden")) { 51 | $curentTocChild.show(100); 52 | $(this).siblings("i").toggleClass("hide"); 53 | } 54 | }) 55 | }() 56 | 57 | var clickTocTitle = function(){ 58 | var $iconToExpand = $(".toc-item > .fa-caret-right"); 59 | var $iconToFold = $(".toc-item > .fa-caret-down"); 60 | var $subToc = $titleHasChild.next(".toc-child"); 61 | $iconToExpand.addClass("hide"); 62 | 63 | var $tocTitle = $("#toc .toc-title"); 64 | if ($titleHasChild.length) { 65 | $tocTitle.addClass("clickable"); 66 | $tocTitle.click(function(){ 67 | if ($subToc.is(":hidden")) { 68 | $subToc.show(150); 69 | $iconToExpand.removeClass("hide"); 70 | $iconToFold.addClass("hide"); 71 | } else { 72 | $subToc.hide(100); 73 | $iconToExpand.addClass("hide"); 74 | $iconToFold.removeClass("hide"); 75 | } 76 | }) 77 | // TOC on mobile 78 | if ($(".left-col").is(":hidden")) { 79 | $("#container .toc-article .toc").css("padding-left", "1.4em"); 80 | $("#container .toc-article .toc-title").css("display", "initial"); 81 | } 82 | } 83 | }() 84 | 85 | var TocNoWarp = function(cond){ 86 | if (cond) { 87 | var $tocLink = $(".toc li a"); 88 | $tocLink.each(function(){ 89 | var title = $(this).find('.toc-text').text(); 90 | // Find elements with ellipsis 91 | if (this.offsetWidth < this.scrollWidth) { 92 | $(this).attr("title", title); 93 | if (!!$().tooltip) { $(this).tooltip() } 94 | } 95 | }) 96 | var isSafari = !!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/); 97 | if (isSafari) { 98 | $("#toc .toc-item i").css("bottom", ".1em"); 99 | } 100 | } 101 | } 102 | TocNoWarp(yiliaConfig.toc[2]); 103 | 104 | }) 105 | -------------------------------------------------------------------------------- /layout/_partial/head.ejs: -------------------------------------------------------------------------------- 1 | 2 | lang="<%= page.lang %>"<% } %>> 3 | 4 | <%- partial('ie-updater') %> 5 | 6 | 7 | 8 | 9 | 10 | 11 | <% if (is_home()){ %> 12 | <% if (theme.baidu_site) { %> 13 | 14 | <% } %> 15 | <% if (theme.google_site) { %> 16 | 17 | <% } %> 18 | <% } %> 19 | 20 | <%- open_graph({twitter_id: theme.twitter, google_plus: theme.google_plus, fb_admins: theme.fb_admins, fb_app_id: theme.fb_app_id}) %> 21 | 22 | 23 | 24 | <% if (theme.rss){ %> 25 | 26 | <% } %> 27 | 28 | <% if (theme.favicon){ %> 29 | 30 | <% } %> 31 | 32 | <% if (theme.animate){ %> 33 | 34 | <% } %> 35 | 36 | <% if (theme.fancybox){ %> 37 | 38 | <% } %> 39 | 40 | <% if (theme.progressBar.on) { %> 41 | 42 | 43 | <% } %> 44 | 45 | <%- css('css/style') %> 46 | 47 | <% if (is_home() && theme.animate){ %> 48 | 49 | <% } %> 50 | 51 | 52 | 53 | <% var title = page.title; 54 | if ( is_archive() ) { 55 | title = 'Archives'; 56 | if ( is_month() ){ 57 | title += ': ' + page.year + '/' + page.month; 58 | } else if (is_year()){ 59 | title += ': ' + page.year; 60 | } 61 | } else if ( is_category() ){ 62 | title = 'Category: ' + page.category; 63 | } else if ( is_tag() ){ 64 | title = 'Tag: ' + page.tag; 65 | } %> 66 | <% if ( title ){ %><%= title %> | <% } %><%= config.title %> 67 | 68 | 69 | 70 | 71 | 85 | 86 | <% if (theme.jquery_ui) { %> 87 | 90 | <% } else { %> 91 | 92 | <% } %> 93 | 94 | <% if (theme.root_url){ %> 95 | 96 | <% } else {%> 97 | 98 | <% } %> 99 | 100 | <% if (theme.share.on && theme.share.addthis){ %> 101 | 102 | <% } %> 103 | 104 | <% if (theme.baidu_tongji){ %> 105 | 114 | <% } %> 115 | 116 | -------------------------------------------------------------------------------- /source/js/instagram.js: -------------------------------------------------------------------------------- 1 | var Instagram = (function(){ 2 | 3 | var _collection = []; 4 | 5 | var preLoad = function(data){ 6 | for(var em in data){ 7 | for(var i=0,len=data[em].srclist.length;i\ 22 | \ 23 | \ 24 | '; 25 | } 26 | $('

'+data[em].year+''+data[em].month+'月

\ 27 | \ 28 |
').appendTo($(".instagram")); 29 | } 30 | 31 | $(".instagram").lazyload(); 32 | changeSize(); 33 | 34 | setTimeout(function(){ 35 | preLoad(data); 36 | },3000); 37 | 38 | $("a[rel=example_group]").fancybox(); 39 | } 40 | 41 | var replacer = function(str){ 42 | if(str.indexOf("outbound-distilleryimage") >= 0 ){ 43 | var cdnNum = str.match(/outbound-distilleryimage([\s\S]*?)\//)[1]; 44 | var arr = str.split("/"); 45 | return "http://distilleryimage"+cdnNum+".ak.instagram.com/"+arr[arr.length-1]; 46 | }else{ 47 | var url = "http://photos-g.ak.instagram.com/hphotos-ak-xpf1/"; 48 | var arr = str.split("/"); 49 | return url+arr[arr.length-1]; 50 | } 51 | } 52 | 53 | var ctrler = function(data){ 54 | var imgObj = {}; 55 | for(var i=0,len=data.length;i 4 | // Shuhao Mao 5 | // Edited by MOxFIVE 6 | 7 | var searchFunc = function(path, search_id, content_id) { 8 | 'use strict'; 9 | $.ajax({ 10 | url: path, 11 | dataType: "xml", 12 | success: function( xmlResponse ) { 13 | // get the contents from search data 14 | var datas = $( "entry", xmlResponse ).map(function() { 15 | return { 16 | title: $( "title", this ).text(), 17 | content: $("content",this).text(), 18 | url: $( "url" , this).text() 19 | }; 20 | }).get(); 21 | var $input = document.getElementById(search_id); 22 | var $resultContent = document.getElementById(content_id); 23 | $input.addEventListener('input', function(){ 24 | var str='
    '; 25 | var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/); 26 | $resultContent.innerHTML = ""; 27 | if (this.value.trim().length <= 0) { 28 | return; 29 | } 30 | // perform local searching 31 | datas.forEach(function(data) { 32 | var isMatch = true; 33 | var content_index = []; 34 | var data_title = data.title.trim().toLowerCase(); 35 | var data_content = data.content.trim().replace(/<[^>]+>/g,"").toLowerCase(); 36 | var data_url = data.url; 37 | var index_title = -1; 38 | var index_content = -1; 39 | var first_occur = -1; 40 | // only match artiles with not empty titles and contents 41 | if(data_title != '' && data_content != '') { 42 | keywords.forEach(function(keyword, i) { 43 | index_title = data_title.indexOf(keyword); 44 | index_content = data_content.indexOf(keyword); 45 | if( index_title < 0 && index_content < 0 ){ 46 | isMatch = false; 47 | } else { 48 | if (index_content < 0) { 49 | index_content = 0; 50 | } 51 | if (i == 0) { 52 | first_occur = index_content; 53 | } 54 | } 55 | }); 56 | } 57 | // show search results 58 | if (isMatch) { 59 | str += "
  • "+ "> " + data_title +""; 60 | var content = data.content.trim().replace(/<[^>]+>/g,""); 61 | if (first_occur >= 0) { 62 | // cut out characters 63 | var start = first_occur - 6; 64 | var end = first_occur + 6; 65 | if(start < 0){ 66 | start = 0; 67 | } 68 | if(start == 0){ 69 | end = 10; 70 | } 71 | if(end > content.length){ 72 | end = content.length; 73 | } 74 | var match_content = content.substr(start, end); 75 | // highlight all keywords 76 | keywords.forEach(function(keyword){ 77 | var regS = new RegExp(keyword, "gi"); 78 | match_content = match_content.replace(regS, ""+keyword+""); 79 | }); 80 | 81 | str += "

    " + match_content +"...

    " 82 | } 83 | } 84 | }); 85 | $resultContent.innerHTML = str; 86 | }); 87 | } 88 | }); 89 | } 90 | -------------------------------------------------------------------------------- /layout/_partial/left-col.ejs: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 116 |
    -------------------------------------------------------------------------------- /source/js/mobile.js: -------------------------------------------------------------------------------- 1 | define([], function(){ 2 | var _isShow = false; 3 | var $tag, $aboutme, $friends; 4 | 5 | var ctn,radio,scaleW,idx,basicwrap; 6 | 7 | //第一步 -- 初始化 8 | var reset = function() { 9 | //设定窗口比率 10 | radio = document.body.scrollHeight/document.body.scrollWidth; 11 | //设定一页的宽度 12 | scaleW = document.body.scrollWidth; 13 | //设定初始的索引值 14 | idx = 0; 15 | }; 16 | //第一步 -- 组合 17 | var combine = function(){ 18 | if($tag){ 19 | document.getElementById("js-mobile-tagcloud").innerHTML = $tag.innerHTML; 20 | } 21 | if($aboutme){ 22 | document.getElementById("js-mobile-aboutme").innerHTML = $aboutme.innerHTML; 23 | } 24 | if($friends){ 25 | document.getElementById("js-mobile-friends").innerHTML = $friends.innerHTML; 26 | } 27 | } 28 | //第三步 -- 根据数据渲染DOM 29 | var renderDOM = function(){ 30 | //生成节点 31 | var $viewer = document.createElement("div"); 32 | $viewer.id = "viewer"; 33 | $viewer.className = "hide"; 34 | $tag = document.getElementById("js-tagcloud"); 35 | $aboutme = document.getElementById("js-aboutme"); 36 | $friends = document.getElementById("js-friends"); 37 | function menuList(name) { 38 | return $("link.menu-list").attr(name); 39 | }; 40 | var tagStr = $tag?''+ menuList("tags") + '
    ':""; 41 | var friendsStr = $friends?''+ menuList("friends") + '
    ':""; 42 | var aboutmeStr = $aboutme?''+ menuList("about") + '
    ':""; 43 | 44 | $viewer.innerHTML = '
    \ 45 |
    \ 46 |
    '+aboutmeStr+friendsStr+tagStr+'
    \ 47 |
    \ 48 |
    \ 49 |
    '; 50 | 51 | //主要图片节点 52 | document.getElementsByTagName("body")[0].appendChild($viewer); 53 | var wrap = document.getElementById("viewer-box"); 54 | basicwrap = wrap; 55 | wrap.style.height = document.body.scrollHeight + 'px'; 56 | }; 57 | 58 | var show = function(target, idx){ 59 | document.getElementById("viewer").className = ""; 60 | setTimeout(function(){ 61 | basicwrap.className = "anm-swipe"; 62 | },0); 63 | _isShow = true; 64 | document.ontouchstart=function(e){ 65 | if(e.target.tagName != "A"){ 66 | return false; 67 | } 68 | } 69 | } 70 | 71 | var hide = function(){ 72 | document.getElementById("viewer-box").className = ""; 73 | _isShow = false; 74 | document.ontouchstart=function(){ 75 | return true; 76 | } 77 | } 78 | 79 | //第四步 -- 绑定 DOM 事件 80 | var bindDOM = function(){ 81 | var scaleW = scaleW; 82 | 83 | //滑动隐藏 84 | document.getElementById("viewer-box").addEventListener("webkitTransitionEnd", function(){ 85 | 86 | if(_isShow == false){ 87 | document.getElementById("viewer").className = "hide"; 88 | _isShow = true; 89 | }else{ 90 | } 91 | 92 | }, false); 93 | 94 | //点击展示和隐藏 95 | ctn.addEventListener("touchend", function(){ 96 | show(); 97 | }, false); 98 | 99 | var $right = document.getElementsByClassName("viewer-box-r")[0]; 100 | var touchStartTime; 101 | var touchEndTime; 102 | $right.addEventListener("touchstart", function(){ 103 | touchStartTime = + new Date(); 104 | }, false); 105 | $right.addEventListener("touchend", function(){ 106 | touchEndTime = + new Date(); 107 | if(touchEndTime - touchStartTime < 300){ 108 | hide(); 109 | } 110 | touchStartTime = 0; 111 | touchEndTime = 0; 112 | }, false); 113 | 114 | $(".slider-trigger").click(function(){ 115 | show(); 116 | }) 117 | $(".viewer-box-r").click(function(){ 118 | hide(); 119 | }) 120 | 121 | //滚动样式 122 | var $overlay = $("#mobile-nav .overlay"); 123 | var $header = $(".js-mobile-header"); 124 | window.onscroll = function(){ 125 | var scrollTop = document.documentElement.scrollTop + document.body.scrollTop; 126 | if(scrollTop >= 69){ 127 | $overlay.addClass("fixed"); 128 | }else{ 129 | $overlay.removeClass("fixed"); 130 | } 131 | if(scrollTop >= 160){ 132 | $header.removeClass("hide").addClass("fixed"); 133 | }else{ 134 | $header.addClass("hide").removeClass("fixed"); 135 | } 136 | }; 137 | $header[0].addEventListener("touchstart", function(){ 138 | $('html, body').animate({scrollTop:0}, 'slow'); 139 | }, false); 140 | }; 141 | 142 | return{ 143 | init: function(){ 144 | //构造函数需要的参数 145 | ctn = document.getElementsByClassName("slider-trigger")[0]; 146 | //构造四步 147 | reset(); 148 | renderDOM(); 149 | combine(); 150 | bindDOM(); 151 | resetTags(); 152 | } 153 | } 154 | }) -------------------------------------------------------------------------------- /source/css/_partial/mobile.styl: -------------------------------------------------------------------------------- 1 | .left-col { 2 | display: none; 3 | } 4 | .mid-col { 5 | left: 0; 6 | } 7 | #header{ 8 | .header-nav{ 9 | position: relative; 10 | } 11 | .header-menu { 12 | line-height: 1.3 13 | min-height 3rem 14 | } 15 | } 16 | .header-author{ 17 | &.fixed{ 18 | position: fixed; 19 | top: -8px; 20 | width: 100%; 21 | color: #ddd; 22 | a { 23 | color: white; 24 | } 25 | } 26 | } 27 | .overlay{ 28 | .slider-trigger{ 29 | position: absolute; 30 | z-index: 101; 31 | bottom: 0; 32 | left: 0; 33 | width: 42px; 34 | height: 42px; 35 | &:hover{ 36 | background: #444; 37 | } 38 | &:before{ 39 | color: #ddd; 40 | content: "\f00b"; 41 | font: 16px FontAwesome; 42 | width: 16px; 43 | height: 16px; 44 | margin-left: 9px; 45 | margin-top: 14px; 46 | display: block; 47 | } 48 | } 49 | } 50 | .article-header{ 51 | border-left: none; 52 | padding: 0; 53 | border-bottom: 1px dotted #ddd; 54 | h1{ 55 | margin-bottom: 2px; 56 | } 57 | } 58 | #header .header-subtitle{ 59 | padding: 0 3em; 60 | font-size: 1em; 61 | } 62 | 63 | .article-info-index.article-info{ 64 | padding-top: 10px; 65 | margin: 0; 66 | border-top: 1px solid #ddd; 67 | } 68 | .article-info-post.article-info{ 69 | margin: 0; 70 | padding-top: 10px; 71 | border: none; 72 | } 73 | 74 | #viewer-box .viewer-box-l{ 75 | font-size: 14px; 76 | } 77 | .article{ 78 | margin: (10/16)rem 10px; 79 | .article-entry{ 80 | padding-left: 0; 81 | padding-right: 0; 82 | .highlight { 83 | padding .35em .6em 84 | } 85 | } 86 | .article-title{ 87 | display: block; 88 | margin: 0; 89 | font-size 1.5rem 90 | font-weight bold 91 | } 92 | .article-meta{ 93 | display: none; 94 | } 95 | } 96 | 97 | .article-inner { 98 | padding: 12px; 99 | } 100 | 101 | .archive-article-inner .article-meta { 102 | top: 0; 103 | margin-top: .5em; 104 | } 105 | 106 | .archives { 107 | .archive-article { 108 | padding: 0; 109 | } 110 | .archive-article-date { 111 | margin-right: 0; 112 | } 113 | .article-info { 114 | display: none; 115 | } 116 | } 117 | 118 | .archive-article-inner .article-meta .archive-article-date 119 | 120 | .share{ 121 | padding: 3px 10px; 122 | } 123 | .duoshuo { 124 | padding: 0 13px; 125 | } 126 | #disqus_thread { 127 | padding: 0 13px; 128 | } 129 | 130 | #mobile-nav{ 131 | display: block; 132 | } 133 | 134 | #page-nav .extend{ 135 | opacity: 1; 136 | } 137 | 138 | #page-nav { 139 | margin-top: 1em; 140 | .page-number { 141 | margin-bottom: 1.5em; 142 | } 143 | } 144 | 145 | .instagram .open-ins{ 146 | left: 2px; 147 | top: -30px; 148 | color: #aaa; 149 | } 150 | .info-on-right{ 151 | float: initial; 152 | } 153 | .archives-wrap{ 154 | margin: 10px 10px 0px; 155 | padding: 10px; 156 | padding-right: 0; 157 | .archive-year-wrap{ 158 | position: relative; 159 | padding: 0 0 0 0; 160 | a{ 161 | padding: 0 0 0 0; 162 | } 163 | } 164 | h1 { 165 | font-size: 1.2em; 166 | margin-bottom: .3em; 167 | } 168 | } 169 | .archives{ 170 | .archive-article{ 171 | padding: 10px 0; 172 | margin-left: 0; 173 | } 174 | } 175 | 176 | #footer { 177 | .footer-left{ 178 | float: initial; 179 | margin-bottom: .5em; 180 | } 181 | .footer-right{ 182 | float: initial; 183 | margin-bottom: 1em; 184 | } 185 | .visit { 186 | margin: 0; 187 | } 188 | } 189 | 190 | .article-category::before{ 191 | display: none; 192 | } 193 | .article-tag::before { 194 | display: none; 195 | } 196 | .article-meta time:before { 197 | display: none; 198 | } 199 | .visit { 200 | margin-top: 1em; 201 | } 202 | 203 | #tocButton { 204 | z-index: 100; 205 | position: fixed; 206 | left: .5em; 207 | top: auto; /*In order to cover style in article.styl*/ 208 | bottom: 10px; 209 | padding: .2em .4em; 210 | border-radius: 6px; 211 | border-style : outset; 212 | background: rgba(255, 255, 255, .7); 213 | font-size: 1em; 214 | font-weight: bold; 215 | color: gray; 216 | &:hover { 217 | color: #88acdb; 218 | font-size: 1em; 219 | } 220 | } 221 | 222 | .toc-article { 223 | display: none; 224 | z-index: 99 225 | left: 0; 226 | top: 38%; 227 | bottom: 1em; 228 | height: auto; 229 | max-height: 58%; 230 | width: none; 231 | width: auto; 232 | min-width: 7em; 233 | max-width: 61.8%; 234 | overflow: auto; 235 | margin-left: 0; 236 | padding: 10px; 237 | padding-left: 0; 238 | border-radius: 2.8%; 239 | background: none; 240 | font-size: 1em; 241 | line-height: 1.25em; 242 | .toc-title { 243 | display: none; 244 | padding: .3em; 245 | color: white; 246 | background: lightgray; 247 | border-radius 3px 248 | } 249 | .toc { 250 | padding: 0.5em; 251 | } 252 | ol { 253 | margin: 0; 254 | padding: 0.5em; 255 | border-radius: 5px; 256 | background: rgba(255, 255, 255, .85); 257 | ol { 258 | padding: 0.1em 0; 259 | padding-left: 1.2em; 260 | } 261 | } 262 | a { 263 | color: #767676; 264 | } 265 | } 266 | 267 | if toc-nowrap 268 | li.toc-item 269 | line-height: 1.2 270 | 271 | .copyright { 272 | width: 90%; 273 | padding: .5em .8em; 274 | } 275 | 276 | .scroll { 277 | right: 1.2em; 278 | li { 279 | font-size: 1.7em; 280 | } 281 | } 282 | 283 | .hide-labels { 284 | z-index: 100; 285 | position: fixed; 286 | left: .5em; 287 | top: auto; 288 | bottom: 10px; 289 | padding: .2em .4em; 290 | border-radius: 6px; 291 | border-style : outset; 292 | opacity: .9; 293 | background: rgba(255, 255, 255, .8); 294 | font-weight: bold; 295 | color: gray; 296 | } 297 | 298 | #post-nav-button { 299 | display: none; 300 | } 301 | 302 | .post-list { 303 | visibility: hidden; 304 | } 305 | 306 | /*多说 UA*/ 307 | .ua { 308 | display: none !important; 309 | } 310 | 311 | if hexo-config("github_widget") 312 | .github-text 313 | display none 314 | 315 | .copyright 316 | font-size 16px 317 | .copy-path 318 | display none 319 | 320 | // Tags Cloud Page 321 | .tags a 322 | line-height 45px -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

    2 | 3 | 4 | 5 |

    6 | 7 |   Theme **Yelee** relies on [Hexo-Theme-Yilia][1], thanks for the author [Litten][2]. Fix some bugs, change lots of styles, add several features. And then I made the theme. Yelee is mainly designed for fluent text reading. I change styles and add functions, meanwhile, try hard to keep this theme simple, stupid and clear. Theme DEMO: [MOxFIVE's Blog][3] 8 | 9 | [1]: https://github.com/litten/hexo-theme-yilia 10 | [2]: https://github.com/litten 11 | [3]: http://moxfive.xyz 12 | 13 |

    14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |

    23 | 24 |

    25 | 26 | 27 | 28 |

    29 | 30 |

    31 | 32 | Yelee 主题使用说明 [简中] 33 | 34 |
    35 | 36 | 文档 GitHub 仓库 37 | 38 |

    39 | ### Installation 40 | 41 | ``` 42 | git clone https://github.com/MOxFIVE/hexo-theme-yelee.git themes/yelee 43 | ``` 44 | 45 | Change theme field in Hexo root's _config.yml file. 46 | 47 | ``` 48 | theme: yelee 49 | ``` 50 | 51 | ### Update 52 | 53 | ``` 54 | cd themes/yelee 55 | git pull 56 | ``` 57 | 58 | ### New Features [DEMO](http://moxfive.xyz/yelee/new-features.html) 59 | | - | En | 60 | |:-:|:-------------------------------:| 61 | | 1 | Flexible table of contents | 62 | | 2 | Transparent & Random background | 63 | | 3 | Scrolling button | 64 | | 4 | Copyright info. | 65 | | 5 | Post navigation button | 66 | | 6 | Site counter | 67 | | 7 | i18n, multi-language | 68 | | 8 | Local Site Search | 69 | | 9 | Load Comment dynamically | 70 | 71 | ### Configuration 72 | 73 | #### Internationalization 74 | Use internationalization to present your site in different languages. 75 | 76 | https://hexo.io/docs/internationalization.html 77 | 78 | ```yaml 79 | # Hexo Configuration 80 | ## Docs: http://hexo.io/docs/configuration.html 81 | 82 | # Site 83 | language: en 84 | ``` 85 | 86 | ##### Available Languages 87 | 88 | | Code | - | - | Contributor(s) | 89 | |----------------|:-----------------------:|:----------:|:--------------:| 90 | | **en** | English | 英语 | MOxFIVE | 91 | | **zh-Hans** | Chinese (Simplified) | 大陆简体 | MOxFIVE | 92 | | **zh-Hant-HK** | Chinese (Traditional) | 港澳繁體 | MOxFIVE | 93 | | **zh-Hant-TW** | Chinese (Traditional) | 台灣正體 | MOxFIVE | 94 | 95 | > **Any Contribution is Welcome!** 96 | 97 | #### 0. Post Excerpt 98 | There are two ways to show excerpt in homepage. 99 | 100 | - a: 101 | 102 | ``` diff 103 | title: Hello World 104 | date: 2015-12-03 00:00:00 105 | --- 106 | 107 | + 108 | 109 | ``` 110 | - b: description in Front-matter 111 | 112 | ``` diff 113 | title: Hello World 114 | date: 2015-12-03 00:00:00 115 | + description: "Welcome to Hexo! This is your very first post." 116 | --- 117 | 118 | ``` 119 | 120 | > Description only support plain text 121 | 122 | > Set the value of description with quotes to avoid unexpected error `:` 123 | 124 | 125 | 126 | #### 1. About Page: 127 | cd to your hexo folder and run this code: 128 | 129 | 130 | ``` 131 | hexo new page about 132 | ``` 133 | 134 | #### 2. Tags Cloud Page: 135 | 136 | ``` 137 | hexo new page tags 138 | ``` 139 | 140 | > Post with several categories [issue#4](https://github.com/MOxFIVE/hexo-theme-yelee/issues/4) 141 | 142 | #### 3. Background image: 143 | 144 | Find or change background images in folder: 145 | 146 | > `/yelee/source/background/` 147 | 148 | Setting in `themes/yelee/_config.yml`: 149 | 150 | ` 151 | background_image: 5 152 | ` 153 | 154 | - Default value is 5, free to modify the number 155 | 156 | - "5": show 5 images form bg-1.jpg to bg-5.jpg in `/yelee/source/background/` 157 | 158 | - "0": remove background image and use white-gray theme 159 | 160 | > [Saving JPEGs for the Web: Setting Photoshop Up for Progressive JPEGs](http://peteschuster.com/2013/01/saving-jpegs-for-the-web-setting-photoshop-up-for-progressive-jpegs/) 161 | 162 | > Optimize images with PhotoShop (JPEG, Quality 0, Progressive) 163 | 164 | #### 4. Highlight Style: 165 | Set inline_code to style highlight text & Chose a highlight theme for code block. 166 | 167 | ``` 168 | highlight_style: 169 | #on: true 170 | inline_code: 1 171 | code_block: 1 172 | ``` 173 | 174 | Set `on: true` to enable this feature 175 | 176 | highlight theme from https://github.com/chriskempson/tomorrow-theme 177 | 178 | #### 5. Comment: 179 | Disqus, duoshuo and youyan is supported, enable ONE of them in theme's "_config.yml". 180 | 181 | 182 | #### 6. Table of Contents: 183 | 184 | Remove toc and the button via putting `toc: false` before "---" at [post].md. 185 | 186 | Hide toc in default 187 | 188 | > Set `toc: false` in `yelee/_config.yml`. 189 | 190 | (*Set `toc: true` in front-matter to show it in certain post*) 191 | 192 | 193 | #### 7. Copyright info.: 194 | 195 | Hide this via putting `original: false` to post's front-matter. 196 | 197 | Hide Copyright info. in default 198 | 199 | > Set `copyright: false` in `yelee/_config.yml`. 200 | 201 | (*Set `original: true` in front-matter to show it in certain post*) 202 | 203 | #### 8. 404 Page: 204 | 205 | ``` 206 | hexo new page 404 207 | ``` 208 | And then set `permalink: /404` in `/source/404/index.md` front matter. 209 | 210 | #### 9. RSS Feed: 211 | 212 | Install plugin: [hexo-generator-feed](https://github.com/hexojs/hexo-generator-feed) 213 | 214 | #### 10. Sitemap for SEO: 215 | 216 | Install plugin: [hexo-generator-seo-friendly-sitemap](https://github.com/ludoviclefevre/hexo-generator-seo-friendly-sitemap) 217 | 218 | Baidu: [hexo-generator-baidu-sitemap](https://github.com/coneycode/hexo-generator-baidu-sitemap) 219 | 220 | #### 11. Apple Touch icon: 221 | 222 | The Path is `/yelee/source/apple-touch-icon.png` 223 | 224 | [Recommended size: 180*180](https://realfavicongenerator.net/blog/apple-touch-icon-the-good-the-bad-the-ugly/) 225 | -------------------------------------------------------------------------------- /source/js/GithubRepoWidget.js: -------------------------------------------------------------------------------- 1 | /*! 2 | GitHub-Repo-Widget.js - Not depend on jQuery or Other Framework. 3 | License: MIT 4 | */ 5 | (function() { 6 | var rendered = 'github-widget-rendered', 7 | cssStr = '.path-divider{margin:0 .25em}.github-box *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}.github-box{font-family:helvetica,arial,sans-serif;font-size:13px;line-height:18px;background:#fafafa;border:1px solid #ddd;color:#666;border-radius:3px}.github-box a{color:#4183c4;border:0;text-decoration:none}.github-box .github-box-title{position:relative;border-bottom:1px solid #ddd;border-radius:3px 3px 0 0;background:#fcfcfc;background:-moz-linear-gradient(#fcfcfc,#ebebeb);background:-webkit-linear-gradient(#fcfcfc,#ebebeb);}.github-box .github-box-title h3{word-wrap:break-word;font-family:helvetica,arial,sans-serif;font-weight:normal;font-size:16px;color:gray;margin:0;padding:10px 10px 10px 30px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAXBAMAAAD0LQLXAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAASUExURQAAAL29vc3NzcLCwsjIyNbW1pvTNOEAAAABdFJOUwBA5thmAAAATElEQVQI12MIFoQAEQZFYwcGEGBkUDRUQLCcsYjRXhbqKkEGZQYGqJgSnKXCwGgsAGYpqyobG4WGhioyhBhDgClI3EQAqpaZwQBEAQARmA4G2o55nQAAAABJRU5ErkJggg==) 7px center no-repeat; width: auto;}.github-box .github-box-title h3 .repo{font-weight:bold}.github-box .github-box-title .github-stats{float:right;position:absolute;top:8px;right:10px;font-size:11px;font-weight:bold;line-height:21px;height:auto;min-height:21px}.github-box .github-box-title .github-stats a{display:inline-block;height:21px;color:#666;border:1px solid #ddd;border-radius:3px;padding:0 5px 0 18px;background: white url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAqBAMAAABB12bjAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAYUExURf///5mZmdbW1u/v7/r6+rGxscXFxaSkpHLccIMAAABsSURBVBjTY2CgBmBODTOAsFgSi9TFHMBMc1Fmk8BiEItJUMhQWFFQAZXJoC7q7FJYhNBmgG7YQAIWMYTvEExXIbh8oAJWQQe4IGsIlKmowAZVwaKowgxlMgkKmwtCjRAUYBSEqnVkYBAm39EALMwNXwql3eYAAAAASUVORK5CYII=) no-repeat}.github-box .github-box-title .github-stats .watchers{border-right:1px solid #ddd}.github-box .github-box-title .github-stats .forks{background-position:-4px -21px;padding-left:15px}.github-box .github-box-content{padding:10px;font-weight:300}.github-box .github-box-content p{margin:0}.github-box .github-box-content .link{font-weight:bold}.github-box .github-box-download{position:relative;border-top:1px solid #ddd;background:white;border-radius:0 0 3px 3px;padding:10px;height:auto;min-height:24px;}.github-box .github-box-download .updated{word-wrap:break-word;margin:0;font-size:11px;color:#666;line-height:24px;font-weight:300;width:auto}.github-box .github-box-download .updated strong{font-weight:bold;color:#000}.github-box .github-box-download .download{float:right;position:absolute;top:10px;right:10px;height:24px;line-height:24px;font-size:12px;color:#666;font-weight:bold;text-shadow:0 1px 0 rgba(255,255,255,0.9);padding:0 10px;border:1px solid #ddd;border-bottom-color:#bbb;border-radius:3px;background:#f5f5f5;background:-moz-linear-gradient(#f5f5f5,#e5e5e5);background:-webkit-linear-gradient(#f5f5f5,#e5e5e5);}.github-box .github-box-download .download:hover{color:#527894;border-color:#cfe3ed;border-bottom-color:#9fc7db;background:#f1f7fa;background:-moz-linear-gradient(#f1f7fa,#dbeaf1);background:-webkit-linear-gradient(#f1f7fa,#dbeaf1);}@media (max-width: 767px) {.github-box .github-box-title{height:auto;min-height:60px}.github-box .github-box-title h3 .repo{display:block}.github-box .github-box-title .github-stats a{display:block;clear:right;float:right;}.github-box .github-box-download{height:auto;min-height:46px;}.github-box .github-box-download .download{top:32px;}}'; 8 | function _getAttribute(node, name, defaultValue) { 9 | return node.getAttribute(name) || defaultValue; 10 | } 11 | function _querySelector(dom, sel) { 12 | return dom.querySelector(sel); 13 | } 14 | function _setHtml(dom, h) { 15 | dom.innerHTML = h; 16 | } 17 | function _appendCss() { 18 | var x = document.createElement('div'); 19 | x.innerHTML = 'x'; 20 | document.getElementsByTagName('head')[0].appendChild(x.lastChild); 21 | } 22 | function _renderGitHubWidget(repoEle, repo) { 23 | repo = JSON.parse(repo); 24 | _setHtml(_querySelector(repoEle, '.watchers'), repo.watchers); 25 | _setHtml(_querySelector(repoEle, '.forks'), repo.forks); 26 | _setHtml(_querySelector(repoEle, '.description span'), repo.description); 27 | _setHtml(_querySelector(repoEle, '.updated'), 'Latest commit to the ' + repo.default_branch+ ' branch on ' + repo.pushed_at.substring(0, 10) + ''); 28 | 29 | if(repo.homepage !== null) { 30 | _setHtml(_querySelector(repoEle, '.link'), ''+ repo.homepage +''); 31 | } 32 | repoEle.setAttribute(rendered, '1'); 33 | } 34 | function _ajaxReq(repoEle, repo) { 35 | var xmlhttp; 36 | if (window.XMLHttpRequest) { 37 | //code for IE7,firefox chrome and above 38 | xmlhttp = new XMLHttpRequest(); 39 | } else { 40 | //code for Internet Explorer 41 | xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); 42 | } 43 | xmlhttp.onreadystatechange = function() { 44 | if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 45 | _renderGitHubWidget(repoEle, xmlhttp.responseText); 46 | } else { 47 | } 48 | }; 49 | xmlhttp.open('GET', 'https://api.github.com/repos/' + repo, true); 50 | xmlhttp.send(); 51 | } 52 | function _init() { 53 | var github_eles = document.querySelectorAll('.github-widget'), repoEle, repo, vendorName, repoName, vendorUrl, repoUrl, widget; 54 | for (var i = 0; i < github_eles.length; i++) { 55 | repoEle = github_eles[i]; 56 | if (! _getAttribute(repoEle, rendered, '')) { 57 | repo = _getAttribute(repoEle, 'data-repo', ''), 58 | vendorName = repo.split('/')[0], 59 | repoName = repo.split('/')[1], 60 | vendorUrl = 'http://github.com/' + vendorName, 61 | repoUrl = 'http://github.com/' + vendorName + '/' + repoName; 62 | 63 | widget = '
    '+ 64 | '
    '+ 65 | '

    '+ 66 | '' + vendorName + ''+ 67 | '/'+ 68 | '' + repoName + ''+ 69 | '

    '+ 70 | '
    '+ 71 | 'Star '+ 72 | '?'+ 73 | ' Fork '+ 74 | '?'+ 75 | '
    '+ 76 | '
    '+ 77 | '
    '+ 78 | '

    Read More

    '+ 79 | ''+ 80 | '
    '+ 81 | '
    '+ 82 | '
    '+ 83 | 'Download as zip'+ 84 | '
    '+ 85 | '
    '; 86 | _setHtml(repoEle, widget); 87 | _ajaxReq(repoEle, repo); 88 | } 89 | } 90 | } 91 | _appendCss(); 92 | _init(); 93 | window.GithubRepoWidget = { 94 | init: _init 95 | }; 96 | })(); -------------------------------------------------------------------------------- /source/js/main.js: -------------------------------------------------------------------------------- 1 | require([], function (){ 2 | 3 | var isMobileInit = false; 4 | var loadMobile = function(){ 5 | require([yiliaConfig.rootUrl + 'js/mobile.js'], function(mobile){ 6 | mobile.init(); 7 | isMobileInit = true; 8 | }) 9 | } 10 | var isPCInit = false; 11 | var loadPC = function(){ 12 | require([yiliaConfig.rootUrl + 'js/pc.js'], function(pc){ 13 | pc.init(); 14 | isPCInit = true; 15 | }) 16 | } 17 | 18 | var browser = { 19 | versions: function() { 20 | var u = window.navigator.userAgent; 21 | return { 22 | trident: u.indexOf('Trident') > -1, //IE内核 23 | presto: u.indexOf('Presto') > -1, //opera内核 24 | webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核 25 | gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核 26 | mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端 27 | ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端 28 | android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器 29 | iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, //是否为iPhone或者安卓QQ浏览器 30 | iPad: u.indexOf('iPad') > -1, //是否为iPad 31 | webApp: u.indexOf('Safari') == -1 ,//是否为web应用程序,没有头部与底部 32 | weixin: u.indexOf('MicroMessenger') == -1 //是否为微信浏览器 33 | }; 34 | }() 35 | } 36 | 37 | $(window).bind("resize", function() { 38 | if (isMobileInit && isPCInit) { 39 | $(window).unbind("resize"); 40 | return; 41 | } 42 | var w = $(window).width(); 43 | if (w >= 700) { 44 | loadPC(); 45 | } else { 46 | loadMobile(); 47 | } 48 | }); 49 | 50 | if(!!browser.versions.mobile || $(window).width() < 800){ 51 | loadMobile(); 52 | } else { 53 | loadPC(); 54 | } 55 | 56 | resetTags = function(){ 57 | var tags = $(".tagcloud a"); 58 | for(var i = 0; i < tags.length; i++){ 59 | var num = Math.floor(Math.random()*7); 60 | tags.eq(i).addClass("color" + num); 61 | } 62 | $(".article-category a:nth-child(-n+2)").attr("class", "color0"); 63 | } 64 | 65 | // fancyBox 66 | if(!!yiliaConfig.fancybox){ 67 | require([yiliaConfig.fancybox_js], function(pc){ 68 | var isFancy = $(".isFancy"); 69 | if(isFancy.length != 0){ 70 | var imgArr = $(".article-inner img"); 71 | for(var i=0,len=imgArr.length;i"+title+""); 80 | } 81 | $(".article-inner .fancy-ctn").fancybox({ type: "image" }); 82 | } 83 | }) 84 | } 85 | 86 | // Animate on Homepage 87 | if(!!yiliaConfig.animate) { 88 | if(!!yiliaConfig.isHome) { 89 | require([yiliaConfig.scrollreveal], function (ScrollReveal) { 90 | var animationNames = [ 91 | "pulse", "fadeIn","fadeInRight", "flipInX", "lightSpeedIn","rotateInUpLeft", "slideInUp","zoomIn", 92 | ], 93 | len = animationNames.length, 94 | randomAnimationName = animationNames[Math.ceil(Math.random() * len) - 1]; 95 | 96 | // Fallback (CSS3 keyframe, requestAnimationFrame) 97 | if (!window.requestAnimationFrame) { 98 | $('.body-wrap > article').css({opacity: 1}); 99 | if (navigator.userAgent.match(/Safari/i)) { 100 | function showArticle(){ 101 | $(".article").each(function(){ 102 | if( $(this).offset().top <= $(window).scrollTop()+$(window).height() && !($(this).hasClass('show')) ) { 103 | $(this).removeClass("hidden").addClass("show"); 104 | $(this).addClass("is-hiddened"); 105 | } else { 106 | if(!$(this).hasClass("is-hiddened")) { 107 | $(this).addClass("hidden"); 108 | } 109 | } 110 | }) 111 | } 112 | $(window).on('scroll', function(){ 113 | showArticle(); 114 | }); 115 | showArticle(); 116 | } 117 | return; 118 | } 119 | 120 | var animateScope = ".body-wrap > article"; 121 | var $firstArticle = $(".body-wrap > article:first-child"); 122 | if ($firstArticle.height() > $(window).height()) { 123 | var animateScope = ".body-wrap > article:not(:first-child)"; 124 | $firstArticle.css({opacity: 1}); 125 | } 126 | ScrollReveal({ 127 | duration: 0, 128 | afterReveal: function (domEl) { 129 | $(domEl).addClass('animated ' + randomAnimationName).css({opacity: 1}) 130 | } 131 | }).reveal(animateScope); 132 | }) 133 | } else { 134 | $('.body-wrap > article').css({opacity: 1}); 135 | } 136 | } 137 | 138 | // TOC 139 | if (yiliaConfig.toc) { 140 | require(['toc'], function(){ }) 141 | } 142 | 143 | // Random Color 边栏顶部随机颜色 144 | var colorList = ["#6da336", "#ff945c", "#66CC66", "#99CC99", "#CC6666", "#76becc", "#c99979", "#918597", "#4d4d4d"]; 145 | var id = Math.ceil(Math.random()*(colorList.length-1)); 146 | // PC 147 | $("#container .left-col .overlay").css({"background-color": colorList[id],"opacity": .3}); 148 | // Mobile 149 | $("#container #mobile-nav .overlay").css({"background-color": colorList[id],"opacity": .7}); 150 | 151 | // Table 152 | $("table").wrap("
    "); 153 | 154 | // Hide Comment Button 155 | $(document).ready(function() { 156 | if ($("#comments").length < 1) { 157 | $("#scroll > a:nth-child(2)").hide(); 158 | } 159 | }) 160 | 161 | // Hide Labels 162 | if(yiliaConfig.isArchive || yiliaConfig.isTag || yiliaConfig.isCategory) { 163 | $(document).ready(function() { 164 | $("#footer").after(""); 165 | $(".hide-labels").click(function() { 166 | $(".article-info").toggle(200); 167 | }) 168 | }) 169 | } 170 | 171 | // Task lists in markdown 172 | $('ul > li').each(function() { 173 | var taskList = { 174 | field: this.textContent.substring(0, 2), 175 | check: function(str) { 176 | var re = new RegExp(str); 177 | return this.field.match(re); 178 | } 179 | } 180 | 181 | var string = ["[ ]", ["[x]", "checked"]]; 182 | var checked = taskList.check(string[1][0]); 183 | var unchecked = taskList.check(string[0]); 184 | 185 | var $current = $(this); 186 | function update(str, check) { 187 | var click = ["disabled", ""]; 188 | $current.html($current.html().replace( 189 | str, "") 190 | ) 191 | } 192 | 193 | if (checked || unchecked) { 194 | this.classList.add("task-list"); 195 | if (checked) { 196 | update(string[1][0], string[1][1]); 197 | this.classList.add("check"); 198 | } else { 199 | update(string[0], ""); 200 | } 201 | } 202 | }) 203 | 204 | }) -------------------------------------------------------------------------------- /source/js/pc.js: -------------------------------------------------------------------------------- 1 | define([], function(){ 2 | 3 | var Tips = (function(){ 4 | 5 | var $tipBox = $(".tips-box"); 6 | 7 | return { 8 | show: function(){ 9 | $tipBox.removeClass("hide"); 10 | }, 11 | hide: function(){ 12 | $tipBox.addClass("hide"); 13 | }, 14 | init: function(){ 15 | 16 | } 17 | } 18 | })(); 19 | 20 | var slide = function(idx){ 21 | // 修复IE10+切换无效的bug 22 | var $wrap = $(".switch-wrap"), 23 | transform = [ 24 | '-webkit-transform: translate(-' + idx * 100 + '%, 0);', 25 | '-moz-transform: translate(-' + idx * 100 + '%, 0);', 26 | '-o-transform: translate(-' + idx * 100 + '%, 0);', 27 | '-ms-transform: translate(-' + idx * 100 + '%, 0);', 28 | 'transform: translate(-' + idx * 100 + '%, 0);' 29 | ]; 30 | $wrap[0].style.cssText = transform.join(''); 31 | $(".icon-wrap").addClass("hide"); 32 | $(".icon-wrap").eq(idx).removeClass("hide"); 33 | } 34 | 35 | var bind = function(){ 36 | var switchBtn = $("#myonoffswitch"); 37 | var tagcloud = $(".second-part"); 38 | var navDiv = $(".first-part"); 39 | switchBtn.click(function(){ 40 | if(switchBtn.hasClass("clicked")){ 41 | switchBtn.removeClass("clicked"); 42 | tagcloud.removeClass("turn-left"); 43 | navDiv.removeClass("turn-left"); 44 | }else{ 45 | switchBtn.addClass("clicked"); 46 | tagcloud.addClass("turn-left"); 47 | navDiv.addClass("turn-left"); 48 | resetTags(); 49 | } 50 | }); 51 | 52 | var timeout; 53 | var isEnterBtn = false; 54 | var isEnterTips = false; 55 | 56 | $(".icon").bind("mouseenter", function(){ 57 | isEnterBtn = true; 58 | Tips.show(); 59 | }).bind("mouseleave", function(){ 60 | isEnterBtn = false; 61 | setTimeout(function(){ 62 | if(!isEnterTips){ 63 | Tips.hide(); 64 | } 65 | }, 100); 66 | }); 67 | 68 | $(".tips-box").bind("mouseenter", function(){ 69 | isEnterTips = true; 70 | Tips.show(); 71 | }).bind("mouseleave", function(){ 72 | isEnterTips = false; 73 | setTimeout(function(){ 74 | if(!isEnterBtn){ 75 | Tips.hide(); 76 | } 77 | }, 100); 78 | }); 79 | 80 | $(".tips-inner li").bind("click", function(){ 81 | var idx = $(this).index(); 82 | slide(idx); 83 | Tips.hide(); 84 | }); 85 | } 86 | 87 | var miniArchives = function(){ 88 | if(yiliaConfig.isPost) { 89 | $(".post-list").addClass("toc-article"); 90 | $("#post-nav-button > a:nth-child(2)").click(function() { 91 | $("#post-nav-button .fa-bars,#post-nav-button .fa-times").toggle(); 92 | $(".post-list").toggle(300); 93 | if ($(".toc").length > 0) { 94 | $("#toc, #tocButton").toggle(200, function() { 95 | if ($(".switch-area").is(":visible")) { 96 | $("#toc, .switch-btn, .switch-area").toggle(); 97 | $("#tocButton").attr("value", yiliaConfig.toc[0]); 98 | } 99 | }); 100 | } 101 | else { 102 | $(".switch-btn, .switch-area").fadeToggle(300); 103 | } 104 | }); 105 | } 106 | }() 107 | 108 | if (yiliaConfig.jquery_ui[0]) { 109 | var tooltip = function(){ 110 | require([yiliaConfig.jquery_ui[1]], function(){ 111 | var loadCSS = function (url, num) { 112 | var link = document.createElement("link"); 113 | link.rel = "stylesheet"; 114 | link.href = url; 115 | var head = document.querySelector("head"); 116 | head.insertBefore(link, head.childNodes[num]); 117 | } 118 | loadCSS(yiliaConfig.jquery_ui[2], 25); 119 | if (!$().tooltip) return; 120 | if (navigator.userAgent.match(/(iPhone|iPad|Android|ios|PlayBook|Touch)/i)) return; 121 | $("[title]").tooltip({ 122 | show: { 123 | effect: 'blind', 124 | delay: 250, 125 | duration: 55, 126 | } 127 | }) 128 | $("#scroll").tooltip({ 129 | show: { 130 | effect: 'clip', 131 | delay: 600, 132 | duration: 50, 133 | } 134 | }) 135 | $("#tocButton, #comments").tooltip({ 136 | show: { 137 | delay: 1200, 138 | } 139 | }) 140 | $(".ds-replybox form").off("tooltip") 141 | $("#post-nav-button").tooltip({ 142 | show: { 143 | effect: 'clip', 144 | delay: 280, 145 | duration: 65, 146 | } 147 | }) 148 | $("#post-nav-button > a:nth-child(2)").tooltip({ 149 | show: { 150 | delay: 1500, 151 | } 152 | }) 153 | $(".social").tooltip({ 154 | show: { 155 | effect: 'scale', 156 | delay: 350, 157 | duration: 70, 158 | } 159 | }) 160 | }) 161 | }() 162 | } 163 | 164 | if (yiliaConfig.search) { 165 | var search = function(){ 166 | require([yiliaConfig.rootUrl + 'js/search.js'], function(){ 167 | var inputArea = document.querySelector("#local-search-input"); 168 | var $HideWhenSearch = $("#toc, #tocButton, .post-list, #post-nav-button a:nth-child(2)"); 169 | var $resetButton = $("#search-form .fa-times"); 170 | var $resultArea = $("#local-search-result"); 171 | 172 | var getSearchFile = function(){ 173 | var search_path = "search.xml"; 174 | var path = yiliaConfig.rootUrl + search_path; 175 | searchFunc(path, 'local-search-input', 'local-search-result'); 176 | } 177 | 178 | var getFileOnload = inputArea.getAttribute('searchonload'); 179 | if (yiliaConfig.search && getFileOnload === "true") { 180 | getSearchFile(); 181 | } else { 182 | inputArea.onfocus = function(){ getSearchFile() } 183 | } 184 | 185 | var HideTocArea = function(){ 186 | $HideWhenSearch.css("visibility","hidden"); 187 | $resetButton.show(); 188 | } 189 | inputArea.oninput = function(){ HideTocArea() } 190 | inputArea.onkeydown = function(){ if(event.keyCode==13) return false} 191 | 192 | resetSearch = function(){ 193 | $HideWhenSearch.css("visibility","initial"); 194 | $resultArea.html(""); 195 | document.querySelector("#search-form").reset(); 196 | $resetButton.hide(); 197 | $(".no-result").hide(); 198 | } 199 | 200 | $resultArea.bind("DOMNodeRemoved DOMNodeInserted", function(e) { 201 | if (!$(e.target).text()) { 202 | $(".no-result").show(200); 203 | } else { 204 | $(".no-result").hide(); 205 | } 206 | }) 207 | }) 208 | }() 209 | } 210 | 211 | return { 212 | init: function(){ 213 | resetTags(); 214 | bind(); 215 | Tips.init(); 216 | } 217 | } 218 | }); 219 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # Theme Version | 当前版本 2 | Yelee: "3.5" 3 | 4 | # >>> Basic Setup | 基础设置 <<< 5 | 6 | # Header | 主菜单 7 | ## About Page: `hexo new page about` 8 | ## Tags Cloud Page: `hexo new page tags` 9 | menu: 10 | 主页: / 11 | 所有文章: /archives/ 12 | #随笔: /tags/随笔 13 | 标签云: /tags/ 14 | 关于我: /about/ 15 | 16 | # Link to your avatar | 填写头像地址 17 | avatar: /img/avatar.png 18 | 19 | # Small icon of Your site | 站点小图标地址 20 | favicon: /favicon.png 21 | 22 | # Internationalization | 主题语言 23 | ## Change Language in SITE's _config.yml | 在站点配置中切换语言 24 | ## https://hexo.io/docs/internationalization.html 25 | ## Available Languages: en, zh-Hans, zh-Hant-TW, zh-Hant-HK 26 | 27 | # Subdirectory | 子目录 28 | ## If your site' url is 'http://yoursite.com/blog', set root_url as '/blog/' 29 | ## 网站若存放在子目录,请按上面格式填写 30 | ## https://hexo.io/docs/configuration.html#URL 31 | root_url: 32 | 33 | # Year of Site Creation | 网站成立年份 34 | since: 2016 35 | 36 | # Social info. Bar | 社交信息展示 37 | ## Keep "mailto:" in Email | 设置 Email 时保留 "mailto:" 38 | ## Encrypt email 加密邮件地址 http://ctrlq.org/encode/ 39 | ## RSS requires a plugin to take effect | 使用 RSS 需先安装对应插件 40 | ## https://github.com/hexojs/hexo-generator-feed 41 | 42 | subnav: 43 | Email: "mailto:123@123.com" 44 | #新浪微博: "sina weibo" 45 | GitHub: "#" 46 | #V2EX: "#" 47 | RSS: "/atom.xml" 48 | #知乎: "zhihu" 49 | #豆瓣: "douban" 50 | #简书: "jianshu" 51 | #SegmentFault: "" 52 | #博客园: "cnblogs" 53 | #CSDN: "" 54 | #Coding: "" 55 | #网易云音乐: "netease" 56 | #虾米音乐: "xiami" 57 | #bilibili: "" 58 | #AcFun: "" 59 | #niconico: "" 60 | #Quora: "" 61 | #Facebook: "#" 62 | #Google: "#" 63 | #Twitter: "#" 64 | #LinkedIn: "#" 65 | #QQ: "#" 66 | #微信: "Wechat" 67 | #PayPal: "#" 68 | #StackOverflow: "#" 69 | #CodePen: "" 70 | #Plunker: "" 71 | #Instagram: "#" 72 | #LOFTER: "" 73 | #Flickr: "#" 74 | #reddit: "" 75 | #Medium: "" 76 | #TiddlyWiki: "" 77 | #Tumblr: "" 78 | #_500px: "" 79 | 80 | # >>> Conments 评论系统 <<< 81 | # Chose ONE as your comment system and keep others disable. 82 | # 选一个作为网站评论系统,其他保持禁用。 83 | 84 | preload_comment: true 85 | ## false: 当点击评论条等区域时再加载评论模块 86 | ## false: load comment's section until u click/hover on the bar/icon 87 | 88 | show_count: false 89 | ## 是否在主页文章标题旁显示评论数(多说、Disqus) 90 | ## Add comment count after article title 91 | 92 | disqus: 93 | #on: true 94 | shortname: 95 | # https://help.disqus.com/customer/en/portal/articles/466208-what-s-a-shortname- 96 | # It is unnecessary to enable disqus here if 97 | # you have set "disqus_shortname" in your site's "_config.yml" 98 | 99 | duoshuo: 100 | #on: true 101 | domain: 102 | # 是否开启多说评论,http://duoshuo.com/create-site/ 103 | # 使用上面网址登陆你的多说,然后创建站点,在 domain 中填入你设定的域名前半部分 104 | # http://<要填的部分>.duoshuo.com (domain只填上<>里的内容,不要填整个网址) 105 | 106 | youyan: 107 | #on: true 108 | id: 109 | # 是否开启友言评论,http://www.uyan.cc/index.php 110 | # id 中填写你的友言用户数字ID,注册后进入后台管理即可查看 111 | # 友言服务在 Web 环境下运行,普通本地环境无法查看,请部署后在线上测试。 112 | 113 | 114 | # >>> Style Customisation 样式自定义 <<< 115 | 116 | # Background | 背景 117 | ## "5": show images form bg-1.jpg to bg-5.jpg in `/yelee/source/background/` 118 | ## "5": 显示`/yelee/source/background/`文件夹中 bg-1.jpg 到 bg-5.jpg 这5张图片 119 | ## "0": white-gray background | 淳朴灰白背景 120 | background_image: 5 121 | 122 | # Base Font Size | 字号调节 123 | base_font_size: 16 #px, 16 - 24 124 | 125 | ## General Color Scheme | 主题配色方案 126 | ## 可用值 Value: yilia 127 | color_scheme: 128 | 129 | highlight_style: 130 | #on: true 131 | inline_code: 1 # Value: 0 - 9 可选 132 | code_block: 1 # Value: 0 - 4 133 | # Set inline_code to style highlight text 134 | # Chose a highlight theme for code block 135 | # 通过 inline_code 切换内置文本高亮样式 136 | # 通过 code_block 切换内置代码高亮配色主题 137 | 138 | blockquote_style: 139 | #on: true 140 | blockquote: 1 # Value: 0 - 7 可选 141 | # 自定义文章「引用部分」的样式 142 | 143 | # Headings Style | 标题风格 144 | ## 0-Yelee, 1-Yilia, 2-GitHub 145 | heading_style: 0 # Value: 0 - 2 146 | 147 | ## List style type (ul) | 无序列表项标记样式 148 | list_style: 0 # value: 0 - 12 可选 149 | 150 | # 左边栏宽度 px 151 | left_col_width: 300 152 | 153 | # Copyright info. of post | 文末版权信息 154 | copyright: true 155 | 156 | # Table of contents | 文章目录 157 | toc: 158 | on: true 159 | list_number: true # 目录序号 160 | max_depth: 3 # 1 - 6 (h1-h6) 目录最大级数 161 | nowrap: false # Keep title on same line | 目录标题不换行 162 | 163 | # 是否开启主页及加载头像时的动画效果 164 | # Animation in Homepage and Loading avatar 165 | animate: true 166 | 167 | # Load jQuery UI to style tooltips 168 | # 工具提示框样式美化 169 | jquery_ui: false 170 | 171 | # Max width of right cloumn | 限制右侧内容的宽带 172 | limit_article_width: 173 | on: false 174 | max_width: 60 # em 175 | 176 | # >>> Small features | 小功能设置 <<< 177 | 178 | # 是否开启边栏多标签切换 179 | # Birdhouse button in left column 180 | tagcloud: true 181 | 182 | # Blogroll, Link exchange | 友情链接 183 | friends: 184 | Hexo: https://hexo.io 185 | GitHub: https://pages.github.com/ 186 | MOxFIVE: http://moxfive.xyz/ 187 | #friends: false 188 | 189 | #是否开启“关于我”。 190 | aboutme: 专注于前端 191 | #aboutme: false 192 | 193 | # Open link in a new tab | 是否在新窗口打开链接 194 | ## `global` 0: Set separately, 1: Open all in new 2: Open all in current 195 | ## `global` 0: 分开设置, 1: 全部在新标签打开, 2: 全部在"当前"标签打开 196 | open_in_new: 197 | global: 0 # 0-2 198 | title: false # article title in homepage 主页文章标题 199 | post: false # link within post/page 正文中的链接 200 | tags: false # 标签 201 | categories: false # 分类 202 | article_nav: false # 导航 203 | archives: true # 归档 204 | mini_archives: true # 迷你归档 205 | menu: false # 边栏菜单 206 | friends: true # 友情链接 207 | socail: true # 社交图标 208 | 209 | # Customize feed link 自定义订阅地址 210 | rss: /atom.xml 211 | 212 | # Update Reminder for IE6/7/8 213 | # 针对 IE6/7/8 的升级浏览器提示 214 | ie_updater: 215 | on: true 216 | link: //outdatedbrowser.com/ 217 | ## http://browsehappy.com/ 218 | ## http://outdatedbrowser.com/ 219 | 220 | # Tab Title Change | 标签页标题切换 221 | tab_title_change: 222 | on: false 223 | left_tab_title: '(つェ⊂) 我藏好了哦~ ' 224 | return_tab_title: '(*´∇`*) 被你发现啦~ ' 225 | 226 | 227 | # >>> Vendors | 第三方工具 & 服务 <<< 228 | 229 | # Local Site Search | 本地站内搜索 230 | ## Insatall below plugin to take effect | 使用搜索需先安装对应插件 231 | ## https://github.com/PaicHyperionDev/hexo-generator-search 232 | search: 233 | #on: true 234 | onload: false 235 | ## true: get search.xml file when the page has loaded 236 | ## false: get the file when search box gets focus 237 | 238 | # images viewer | 图片浏览器 239 | ## http://www.fancyapps.com/fancybox/ 240 | fancybox: true 241 | 242 | # Display Math(LaTeX, MathML...) | 数学公式支持 243 | ## https://www.mathjax.org/ 244 | mathjax: false 245 | 246 | # Socail Share | 是否开启分享 247 | share: 248 | on: true 249 | baidu: true 250 | addthis: false 251 | addthis_pubid: "ra-56ff76c972fc0cf9" 252 | ## Go to www.addthis.com/dashboard to get your pubid (in src of Code) 253 | ## and customize AddThis share buttons 254 | 255 | # 百度、谷歌站长验证。填写 HTML 标签 content 256 | # Site Verification for Google and Baidu. HTML label content. 257 | baidu_site: 258 | google_site: 259 | 260 | # Fill in Google Analytics tracking ID, #e.g. UA-XXXXX-X 261 | google_analytics: 262 | 263 | # 百度统计 http://sitecenter.baidu.com/sc-web/ 264 | # 查看代码,填入 //hm.baidu.com/hm.js? 之后的内容 265 | baidu_tongji: 266 | 267 | # 不蒜子网站计数设置 268 | # http://ibruce.info/2015/04/04/busuanzi/ 269 | visit_counter: 270 | on: true 271 | site_visit: true 272 | page_visit: true 273 | 274 | # GitHub Repo Widget 275 | # https://github.com/hustcc/GitHub-Repo-Widget.js 276 | github_widget: false 277 | 278 | # Progress Bar | 页面加载进度条 279 | # Demo: http://github.hubspot.com/pace/docs/welcome/ 280 | # type: barber-shop|big-counter|bounce|center-atom|center-circle| 281 | # center-radar|center-simple|corner-indicator|flash|flat-top| 282 | # loading-bar|mac-osx|minimal 283 | # color: black|blue|green|orange|pink|purple|red|silver|white|yellow| 284 | progressBar: 285 | on: true 286 | type: "minimal" # Keep Quotes | 保留引号避免出错 287 | color: blue 288 | 289 | CDN: 290 | jquery: //cdn.bootcss.com/jquery/2.2.4/jquery.min.js 291 | require: //cdn.bootcss.com/require.js/2.2.0/require.min.js 292 | fontawesome: //cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css 293 | fancybox_js: //cdn.bootcss.com/fancybox/2.1.5/jquery.fancybox.min.js 294 | fancybox_css: //cdn.bootcss.com/fancybox/2.1.5/jquery.fancybox.min.css 295 | animate_css: //cdn.bootcss.com/animate.css/3.5.1/animate.min.css 296 | jquery_ui_js: //cdn.bootcss.com/jqueryui/1.10.4/jquery-ui.min.js 297 | jquery_ui_css: //cdn.bootcss.com/jqueryui/1.10.4/css/jquery-ui.min.css 298 | pace_js: //cdn.bootcss.com/pace/1.0.2/pace.min.js 299 | clipboard: //cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js 300 | mathjax: //cdn.bootcss.com/mathjax/2.6.1/MathJax.js 301 | scrollreveal: //cdn.bootcss.com/scrollReveal.js/3.1.4/scrollreveal.min.js -------------------------------------------------------------------------------- /source/css/_partial/tagcloud.styl: -------------------------------------------------------------------------------- 1 | .switch-btn { 2 | margin: 0 auto; 3 | margin-top: 23px; 4 | position: relative; 5 | width: 70px; 6 | text-align: center; 7 | .tips-box{ 8 | position: relative; 9 | .tips-arrow{ 10 | width: 0; 11 | height: 0; 12 | border-left: 5px solid transparent; 13 | border-right: 5px solid transparent; 14 | border-bottom: 6px solid #000; 15 | opacity: 0.8; 16 | position: absolute; 17 | top: -6px; 18 | left: 30px; 19 | } 20 | .tips-inner{ 21 | padding: 5px 8px 4px 8px; 22 | background-color: black; 23 | color: white; 24 | width: 80px; 25 | text-align: center; 26 | border-radius: 3px; 27 | opacity: 0.8; 28 | position: absolute; 29 | z-index: 99; 30 | left: -13px; 31 | li{ 32 | padding: 4px 0; 33 | cursor: pointer; 34 | font-size: (13/16)rem; 35 | line-height 1.15 36 | color: #ddd; 37 | &:hover{ 38 | background: #111; 39 | } 40 | } 41 | } 42 | } 43 | .icon{ 44 | height: 32px; 45 | width: 32px; 46 | background: #cecece; 47 | border-radius: 100px; 48 | position: relative; 49 | overflow: hidden; 50 | display: inline-block; 51 | padding: 10px; 52 | transform: scale(0.6); 53 | cursor: pointer; 54 | } 55 | 56 | .icon-ctn { 57 | width: 34px; 58 | height: 34px; 59 | position: relative; 60 | overflow: hidden; 61 | .birdhouse { 62 | width: 0; 63 | height: 0; 64 | position: absolute; 65 | top: 0; 66 | left: 0; 67 | border-style: solid; 68 | border-color: transparent transparent #4d4d4d transparent; 69 | border-width: 0 16px 14px; 70 | &:after { 71 | content: ''; 72 | position: absolute; 73 | top: 12px; 74 | left: -12px; 75 | border-style: solid; 76 | border-color: #4d4d4d transparent transparent transparent; 77 | border-width: 100px 12px; 78 | } 79 | } 80 | .birdhouse_holes { 81 | width: 12px; 82 | height: 12px; 83 | background: #ddd; 84 | position: absolute; 85 | -webkit-border-radius: 60px; 86 | -moz-border-radius: 60px; 87 | border-radius: 60px; 88 | left: 10px; 89 | top: 8px; 90 | &:after { 91 | content: ''; 92 | position: absolute; 93 | width: 4px; 94 | height: 4px; 95 | background: #ccc; 96 | bottom: -8px; 97 | left: 4px; 98 | -webkit-border-radius: 60px; 99 | -moz-border-radius: 60px; 100 | border-radius: 60px; 101 | } 102 | } 103 | .ribbon { 104 | width: 12px; 105 | height: 20px; 106 | background: #333; 107 | margin: 2px 0 0 10px; 108 | &:after{ 109 | content: ''; 110 | position: absolute; 111 | left: 10px; 112 | top: 16px; 113 | width: 0; 114 | height: 0; 115 | border: solid #333; 116 | border-color: transparent #333 transparent #333; 117 | border-width: 6px 6px 8px 6px; 118 | } 119 | } 120 | .loopback_l { 121 | width: 10px; 122 | height: 5px; 123 | border-style: solid; 124 | border-width: 0px 3px 3px 3px; 125 | border-color: #333; 126 | border-radius: 0 0 50px 50px; 127 | position: absolute; 128 | top: 16px; 129 | left: 1px; 130 | &:before { 131 | content: ''; 132 | position: absolute; 133 | width: 0; 134 | height: 0; 135 | border-style: solid; 136 | border-width: 4px; 137 | border-color: transparent transparent transparent #333; 138 | bottom: 7px; 139 | left: 5px; 140 | } 141 | &:after { 142 | content: ''; 143 | width: 5px; 144 | height: 5px; 145 | border-style: solid; 146 | border-width: 3px 0 0 3px; 147 | border-color: #333; 148 | border-radius: 50px 0 0 0; 149 | position: absolute; 150 | left: -3px; 151 | bottom: 5px; 152 | } 153 | } 154 | .loopback_r { 155 | width: 10px; 156 | height: 5px; 157 | border-style: solid; 158 | border-width: 3px 3px 0 3px; 159 | border-color: #333; 160 | border-radius: 50px 50px 0 0; 161 | position: absolute; 162 | top: 8px; 163 | right: 2px; 164 | &:before { 165 | content: ''; 166 | position: absolute; 167 | width: 0; 168 | height: 0; 169 | border-style: solid; 170 | border-width: 4px; 171 | border-color: transparent #333 transparent transparent; 172 | top: 7px; 173 | right: 5px; 174 | } 175 | &:after { 176 | content: ''; 177 | width: 5px; 178 | height: 5px; 179 | border-style: solid; 180 | border-width: 0 3px 3px 0; 181 | border-color: #333; 182 | border-radius: 0 0 50px 0; 183 | position: absolute; 184 | left: 5px; 185 | top: 5px; 186 | } 187 | } 188 | .user { 189 | width: 12px; 190 | height: 14px; 191 | background: #333; 192 | border-radius: 5px 5px 0 0; 193 | margin-left: 10px; 194 | margin-top: 2px; 195 | &:before { 196 | content: ''; 197 | width: 0px; 198 | height: 0px; 199 | position: absolute; 200 | top: 17px; 201 | left: 0px; 202 | border-style: solid; 203 | border-color: transparent transparent #333 transparent; 204 | border-width: 0 16px 6px 16px; 205 | } 206 | &:after { 207 | content: ''; 208 | width: 8px; 209 | height: 5px; 210 | background: #333; 211 | position: absolute; 212 | margin-top: 13px; 213 | margin-left: -4px; 214 | } 215 | } 216 | .shoulder { 217 | width: 32px; 218 | height: 6px; 219 | background: #333; 220 | position: absolute; 221 | bottom: 6px; 222 | } 223 | } 224 | } 225 | 226 | #header .tagcloud a 227 | color #fff 228 | 229 | .tagcloud a 230 | display inline-block 231 | text-decoration none 232 | font-weight normal 233 | font-size .75rem 234 | color #fff 235 | height 1.125rem 236 | line-height 1.125rem 237 | float left 238 | padding 0 5px 0 10px 239 | position relative 240 | border-radius 0 5px 5px 0 241 | margin 5px 9px 5px 8px 242 | opacity i-opacity 243 | font-family font-chs font-sans 244 | 245 | for color, i in color-list 246 | &.color{i} 247 | background color 248 | &::before 249 | border-right-color color 250 | 251 | &:hover 252 | opacity 1 253 | transform scale(1.06) 254 | background-color hover-color 255 | border-color hover-color 256 | &::before 257 | border-right-color hover-color 258 | &:before 259 | content " " 260 | width 0 261 | height 0 262 | position absolute 263 | top 0 264 | left -1.1rem 265 | border .5625rem solid transparent 266 | &:after 267 | content " " 268 | width 4px 269 | height 4px 270 | background-color #fff 271 | border-radius 4px 272 | box-shadow 0 0 0 1px rgba(0,0,0,.3) 273 | position absolute 274 | top .4375rem 275 | left 2px 276 | 277 | .article-tag::before, 278 | .article-category::before 279 | float left 280 | color #999 281 | font base-font-size FontAwesome 282 | margin-right 5px 283 | margin-top (1/3)rem 284 | 285 | .article-tag::before 286 | content "\f02b" 287 | margin-left 1em 288 | 289 | .article-category::before 290 | content "\f02d" 291 | 292 | .article-pop-out 293 | float left 294 | &:before 295 | color #999 296 | content "\f08d" 297 | font base-font-size FontAwesome 298 | float left 299 | margin-right 5px 300 | margin-top (1/3)rem 301 | &:after 302 | float left 303 | content "" 304 | margin-right 20px 305 | margin-top 9px 306 | -------------------------------------------------------------------------------- /source/css/_partial/article.styl: -------------------------------------------------------------------------------- 1 | .body-wrap 2 | if hexo-config("limit_article_width.on") 3 | max-width hexo-config("limit_article_width.max_width")em 4 | margin auto 5 | 6 | margin-bottom 126px 7 | overflow hidden 8 | 9 | 10 | .article { 11 | margin: 30px; 12 | margin-bottom: 5px; 13 | position: relative; 14 | background: article-color; 15 | -webkit-transition: all 0.2s ease-in; 16 | &.show{ 17 | visibility: visible; 18 | -webkit-animation: cd-bounce-1 0.6s; 19 | -moz-animation: cd-bounce-1 0.6s; 20 | animation: cd-bounce-1 0.6s; 21 | } 22 | &.hidden{ 23 | visibility: hidden; 24 | } 25 | img{ 26 | max-width: 100%; 27 | margin: .5em auto; 28 | } 29 | } 30 | 31 | @-webkit-keyframes cd-bounce-1 { 32 | 0% { 33 | opacity: 0; 34 | -webkit-transform: scale(1); 35 | } 36 | 60% { 37 | opacity: 1; 38 | -webkit-transform: scale(1.01); 39 | } 40 | 100% { 41 | -webkit-transform: scale(1); 42 | } 43 | } 44 | @-moz-keyframes cd-bounce-1 { 45 | 0% { 46 | opacity: 0; 47 | -moz-transform: scale(1); 48 | } 49 | 60% { 50 | opacity: 1; 51 | -moz-transform: scale(1.01); 52 | } 53 | 100% { 54 | -moz-transform: scale(1); 55 | } 56 | } 57 | @keyframes cd-bounce-1 { 58 | 0% { 59 | opacity: 0; 60 | -webkit-transform: scale(1); 61 | -moz-transform: scale(1); 62 | -ms-transform: scale(1); 63 | -o-transform: scale(1); 64 | transform: scale(1); 65 | } 66 | 60% { 67 | opacity: 1; 68 | -webkit-transform: scale(1.01); 69 | -moz-transform: scale(1.01); 70 | -ms-transform: scale(1.01); 71 | -o-transform: scale(1.01); 72 | transform: scale(1.01); 73 | } 74 | 100% { 75 | -webkit-transform: scale(1); 76 | -moz-transform: scale(1); 77 | -ms-transform: scale(1); 78 | -o-transform: scale(1); 79 | transform: scale(1); 80 | } 81 | } 82 | .article-index{ 83 | margin-left: 200px; 84 | padding: 15px 0; 85 | margin-right: 75px; 86 | .brief{ 87 | display: block; 88 | color: #a8a8a8; 89 | font-size: 12px; 90 | line-height: 14px; 91 | height: 7px; 92 | padding-left: 2px; 93 | &:before{ 94 | display: inline-block; 95 | content: "“"; 96 | font-family: serif; 97 | font-size: 30px; 98 | float: left; 99 | margin: 4px 4px 0 -12px; 100 | color: #c8c8c8; 101 | } 102 | } 103 | } 104 | 105 | .article-title { 106 | color: #696969; 107 | margin-left: 0px; 108 | font-weight: 400; 109 | line-height: 1.3; 110 | margin-bottom: 20px; 111 | -webkit-transition: color 0.3s; 112 | -moz-transition: color 0.3s; 113 | -o-transition: color 0.3s; 114 | transition: color 0.3s; 115 | &:hover{ 116 | color: #B0A0AA; 117 | } 118 | } 119 | .article-inner{ 120 | position: relative; 121 | margin-bottom: 0px; 122 | padding-bottom: .5em; 123 | word-break: break-word; 124 | box-shadow: 3px 2px 8px rgba(0,0,0, .07); 125 | } 126 | .article-header{ 127 | border-left: 6px solid #eee; 128 | padding: 15px 8.2em 15px 25px; 129 | &:hover { 130 | border-left: 5px solid #9c9; 131 | }; 132 | } 133 | .article-info { 134 | li:hover { 135 | background: none; 136 | } 137 | } 138 | .article-info-index.article-info{ 139 | padding-top: 20px; 140 | margin: 30px 30px 0 30px; 141 | border-top: 1px solid #ddd; 142 | } 143 | .article-info-post.article-info{ 144 | padding: 0 145 | border: none; 146 | margin: -30px 0 20px 30px; 147 | } 148 | .article-entry{ 149 | @require "customise/blockquote" 150 | line-height: 1.65em; 151 | padding:0 2em; 152 | font-size 1rem 153 | a:hover { 154 | text-decoration: underline; 155 | color: #9c9; 156 | } 157 | p{ 158 | margin: .85em auto; 159 | line-height: 1.7; 160 | } 161 | em { 162 | font-style: italic; 163 | } 164 | video{ 165 | max-width: 100%; 166 | } 167 | strong { 168 | font-weight: bold; 169 | } 170 | li strong { 171 | color: #708090; 172 | } 173 | .caption{ 174 | display: block; 175 | font-size: 0.8em; 176 | color: #aaa; 177 | } 178 | hr{ 179 | height: 0; 180 | margin-top: 20px; 181 | margin-bottom: 20px; 182 | border-left: 0; 183 | border-right: 0; 184 | border-top: 1px solid #DDD; 185 | border-bottom: 1px solid #FFF; 186 | } 187 | .table-area { 188 | overflow: auto; 189 | } 190 | table{ 191 | width:100%; 192 | max-width: 65em; 193 | border: 1px solid #dedede; 194 | margin: 15px auto; 195 | border-collapse:collapse; 196 | empty-cells:show; 197 | tr,td{ 198 | height:35px; 199 | } 200 | th { 201 | font-weight: bold; 202 | text-align: center; 203 | background: rgba(158, 188, 226, .2); 204 | white-space: nowrap; 205 | } 206 | tbody{ 207 | tr:hover{ 208 | background: #efefef; 209 | } 210 | } 211 | td,th{ 212 | border: 1px solid #dedede; 213 | padding: 0 10px; 214 | } 215 | tr:nth-child(2n) { 216 | background: rgba(158, 188, 226, .12); 217 | } 218 | td:nth-child(1){ 219 | white-space: nowrap; 220 | } 221 | } 222 | @import "customise/list" 223 | @import "customise/heading" 224 | figure{ 225 | table { 226 | border: none; 227 | width: auto; 228 | margin: 0; 229 | tbody{ 230 | tr:hover{ 231 | background: none; 232 | } 233 | } 234 | } 235 | } 236 | } 237 | 238 | .article-meta 239 | position absolute 240 | right 0 241 | top 23px 242 | width 9rem 243 | padding-right 1.2rem 244 | font-size 0.875rem 245 | text-align right 246 | z-index 1 247 | time 248 | color #aaa 249 | float right 250 | &:before 251 | margin-top 0px 252 | margin-right 4px 253 | content "\f073" 254 | font 1em FontAwesome 255 | color #999 256 | a:nth-child(2) 257 | &:hover 258 | color #258fb8 259 | font-size 110% 260 | i 261 | vertical-align top 262 | clear right 263 | float right 264 | padding-top .45rem 265 | color #999 266 | 267 | .article-more-link { 268 | float: right; 269 | margin-top: 5px; 270 | a { 271 | padding: 2px 4px; 272 | -webkit-border-radius: 2px; 273 | -moz-border-radius: 2px; 274 | border-radius: 2px; 275 | background: #88acdb; 276 | color: #fff; 277 | font-size: .9rem; 278 | line-height: 1em; 279 | white-space: nowrap; 280 | transition: background 0.3s; 281 | opacity: i-opacity; 282 | &:hover { 283 | background: hover-color; 284 | opacity: 1; 285 | } 286 | &.hidden { 287 | visibility: hidden; 288 | } 289 | } 290 | &:hover { 291 | transform: scale(1.06); 292 | } 293 | } 294 | 295 | #article-nav { 296 | display: table; 297 | width: 100%; 298 | height: 2.5em; 299 | margin: 1em auto; 300 | font-size 1rem 301 | background: rgba(158, 188, 226, i-opacity); 302 | &:hover { 303 | background: #93b5e0; 304 | } 305 | } 306 | 307 | .article-nav-title { 308 | display: table-cell; 309 | vertical-align: middle; 310 | a { 311 | color: white; 312 | } 313 | a:hover { 314 | font-style: italic; 315 | } 316 | } 317 | 318 | #article-nav-older { 319 | padding-right: 1em; 320 | text-align: right; 321 | &::after { 322 | padding-left:0.5em; 323 | content:"→"; 324 | color: white; 325 | font-weight: bold; 326 | font-family: Calibri; 327 | } 328 | } 329 | 330 | #article-nav-newer { 331 | padding-left: 1em; 332 | text-align: left; 333 | &::before { 334 | padding-right:0.5em; 335 | content:"←"; 336 | color: white; 337 | font-weight: bold; 338 | font-family: Calibri; 339 | } 340 | } 341 | 342 | #intro { 343 | display: inline; 344 | font-weight: normal; 345 | font-size: inherit; 346 | opacity: 0; 347 | color: white; 348 | &::before, &::after { 349 | content: none; 350 | } 351 | } 352 | 353 | li:hover { 354 | background: rgba(158, 188, 226, .21); 355 | } 356 | .article-entry > ol:last-child { 357 | > li:nth-child(2n) { 358 | background: rgba(158, 188, 226, .12); 359 | }; 360 | li { 361 | word-break: break-all; 362 | }; 363 | li:hover { 364 | background: #F0F0F0; 365 | }; 366 | } 367 | 368 | @import "toc" 369 | 370 | .copyright { 371 | width: 85%; 372 | max-width: 45em; 373 | margin: 1.2em auto 0; 374 | padding: .5em 1.8em; 375 | border: 1px solid lightgray; 376 | font-size: .93rem; 377 | line-height: 1.6em; 378 | word-break: break-all; 379 | background: rgba(255, 255, 255, .4); 380 | span { 381 | display: inline-block; 382 | width: 5.8em; 383 | color: #B5B5B5; 384 | font-weight: bold; 385 | } 386 | a { 387 | color: gray; 388 | &:hover { 389 | color: #a3d2a3; 390 | text-decoration: underline; 391 | } 392 | } 393 | &:hover .fa-clipboard { 394 | color: black; 395 | } 396 | .copy-path { 397 | margin-left: 1em; 398 | width 1em 399 | &:hover { 400 | color: gray; 401 | cursor: pointer; 402 | } 403 | } 404 | } 405 | 406 | aside.comment-bar 407 | display block 408 | cursor pointer 409 | background rgba(white, .3) 410 | padding .5rem 411 | box-shadow 3px 2px 8px rgba(black, .07) 412 | text-align center 413 | font-size 2rem 414 | i.fa-spinner 415 | display none 416 | a 417 | display inline-block 418 | width 3em 419 | span 420 | font-size 1.5rem 421 | &:active 422 | background none -------------------------------------------------------------------------------- /source/css/_partial/main.styl: -------------------------------------------------------------------------------- 1 | #container{ 2 | //position:relative; 3 | min-height:100%; 4 | #mobile-nav{ 5 | display: none; 6 | .overlay{ 7 | height: 110px; 8 | position: absolute; 9 | width: 100%; 10 | background: #4d4d4d; 11 | &.fixed{ 12 | position: fixed; 13 | height: 42px; 14 | z-index: 99; 15 | } 16 | } 17 | #header{ 18 | padding: 10px 0 0 0; 19 | .profilepic{ 20 | display: block; 21 | position: relative; 22 | z-index: 100; 23 | } 24 | .header-menu{ 25 | height: auto; 26 | margin: 10px; 27 | ul{ 28 | text-align: center; 29 | cursor: default; 30 | } 31 | li{ 32 | display: inline-block; 33 | margin: 3px; 34 | } 35 | } 36 | } 37 | } 38 | .left-col { 39 | background: left-col-color; 40 | width: left-col-width; 41 | position:fixed; 42 | opacity:1; 43 | transition:all .2s ease-in; 44 | height:100%; 45 | overflow-y: auto; 46 | .overlay{ 47 | width: 100%; 48 | height: 180px; 49 | background-color: black; 50 | position: absolute; 51 | opacity: 0.7; 52 | } 53 | .intrude-less { 54 | width: 76%; 55 | text-align: center; 56 | margin: 112px auto 0; 57 | } 58 | li:hover { 59 | background: none; 60 | font-weight: bold; 61 | }; 62 | } 63 | .mid-col { 64 | position:absolute; 65 | right:0; 66 | min-height:100%; 67 | background: mid-col-color; 68 | left: left-col-width; 69 | width: auto; 70 | } 71 | 72 | @media screen and (max-width:1040px) { 73 | 74 | }@media screen and (max-width:800px) { 75 | @import "_partial/mobile" 76 | } 77 | } 78 | .header-author{ 79 | text-align: center; 80 | margin: 13px 0; 81 | font-family: font-serif, serif; 82 | font-size: base-font-size + 14; 83 | transition: 0.3s; 84 | } 85 | #header{ 86 | width:100%; 87 | a { 88 | color: #696969; 89 | &:hover { 90 | color: #B0A0AA; 91 | } 92 | } 93 | .profilepic{ 94 | text-align: center; 95 | display: block; 96 | border: 5px solid #fff; 97 | border-radius: 50%; 98 | width: 128 + base-font-size - 16; 99 | height: @width; 100 | margin: 0 auto; 101 | position: relative; 102 | overflow: hidden; 103 | background: #88acdb; 104 | -webkit-box-orient: horizontal; 105 | -webkit-box-pack: center; 106 | -webkit-box-align: center; 107 | text-align: center; 108 | img{ 109 | width: 100%; 110 | height: 100%; 111 | border-radius: 50%; 112 | animation-duration: .4s; 113 | animation-delay: .3s; 114 | -webkit-animation-duration: .4s; 115 | -webkit-animation-delay: .3s; 116 | } 117 | &:hover { 118 | background: white; 119 | border: 5px solid #88acdb; 120 | box-shadow: 0 0 1.5em #88acdb; 121 | animation: profilepic .15s linear infinite alternate; 122 | -webkit-animation: profilepic .15s linear infinite alternate; 123 | } 124 | @keyframes profilepic { 125 | 0% { 126 | right: 4px; 127 | top: 1x; 128 | } 129 | 100% { 130 | right: 0px; 131 | top: -1px; 132 | } 133 | } 134 | } 135 | .header-subtitle{ 136 | text-align: center; 137 | color:#999; 138 | font-size: (14/16)rem; 139 | line-height: 1.75; 140 | overflow: hidden; 141 | text-overflow: ellipsis; 142 | display: -webkit-box; 143 | -webkit-line-clamp: 2; 144 | -webkit-box-orient: vertical; 145 | } 146 | .header-menu{ 147 | menu-line-height = (28/16)rem 148 | font-weight: 550; 149 | line-height: menu-line-height; 150 | font-family: inherit; 151 | cursor: pointer; 152 | text-transform: uppercase; 153 | float: none; 154 | min-height: @line-height * 3; 155 | max-height: @line-height * 5; 156 | overflow: visible; 157 | text-align: center; 158 | display: -webkit-box; 159 | -webkit-box-orient: horizontal; 160 | -webkit-box-pack: center; 161 | -webkit-box-align: center; 162 | li{ 163 | cursor: default; 164 | a{ 165 | font-size: (14/16)rem; 166 | min-width: left-col-width; 167 | } 168 | } 169 | } 170 | .switch-area{ 171 | position: relative; 172 | width: 100%; 173 | overflow: hidden; 174 | min-height: 260px; 175 | font-size: (14/16)rem; 176 | .switch-wrap{ 177 | transition: transform .3s ease-in; 178 | position: relative; 179 | } 180 | } 181 | .turn-left{ 182 | transform: translate(-100%, 0 ); 183 | } 184 | .header-nav{ 185 | width: 100%; 186 | position: absolute; 187 | transition: transform .3s ease-in; 188 | } 189 | .switch-part{ 190 | width: 100%; 191 | position: absolute; 192 | } 193 | .switch-part1{ 194 | left: 0; 195 | } 196 | .switch-part2{ 197 | left: 100%; 198 | overflow-y: auto; 199 | max-height: 260px; 200 | font-size (12/16)rem 201 | } 202 | .switch-part3{ 203 | left: 200%; 204 | line-height: 1.6; 205 | overflow-y: auto; 206 | max-height: 260px; 207 | .switch-friends-link{ 208 | display: inline-block; 209 | margin-right: 9px; 210 | border-radius: 3px; 211 | padding: 5px; 212 | &:hover{ 213 | background: #88acdb; 214 | color: #fff; 215 | } 216 | } 217 | } 218 | .switch-part4{ 219 | left: 300%; 220 | text-align: left; 221 | line-height: 30px; 222 | } 223 | } 224 | 225 | @require "customise/social-icon" 226 | 227 | .duoshuo { 228 | padding: 0 40px; 229 | } 230 | 231 | #disqus_thread { 232 | padding: 0 40px; 233 | } 234 | 235 | #scroll{ 236 | right: 0; 237 | } 238 | 239 | .scroll { 240 | z-index: 999; 241 | position: fixed; 242 | top: 61.8%; 243 | text-align: center; 244 | line-height: 42px; 245 | a { 246 | display: block; 247 | width: 29px; 248 | height: 42px; 249 | font-size: 28px; 250 | background: rgba(215, 216, 215, .4); 251 | .fa { 252 | color: rgba(255, 255, 255, .8); 253 | } 254 | &:hover { 255 | background: rgba(147, 181, 224, .3) !important; 256 | .fa { 257 | color: white; 258 | } 259 | } 260 | } 261 | a:not(:last-child) { 262 | border-bottom: 1px solid white; 263 | } 264 | } 265 | 266 | .hide-labels { 267 | position: fixed; 268 | left: left-col-width + 78px; 269 | top: 30px; 270 | padding: 1px; 271 | border: none; 272 | border-radius: 5px; 273 | cursor: pointer; 274 | outline: none; 275 | font-family: inherit; 276 | font-size: .9em; 277 | font-weight: bold; 278 | color: #666; 279 | background: none; 280 | opacity: .32; 281 | -webkit-appearance: none; 282 | &:hover { 283 | color: #88acdb; 284 | opacity: 1; 285 | } 286 | } 287 | 288 | #post-nav-button { 289 | left: left-col-width; 290 | top: 61.8%; 291 | a { 292 | border-bottom-color: transparent; 293 | background: none; 294 | cursor: pointer; 295 | .fa-times { 296 | display: none; 297 | } 298 | } 299 | } 300 | 301 | .post-list { 302 | display: none; 303 | text-align: left; 304 | font-size: .9em; 305 | line-height: 1.3em; 306 | list-style: decimal; 307 | li { 308 | margin: .4em 0 .1em .7em; 309 | a { 310 | color: gray; 311 | &:hover { 312 | color: ; 313 | text-decoration: none; 314 | } 315 | } 316 | &:hover { 317 | background: ; 318 | a { 319 | color: #88acdb; 320 | } 321 | }; 322 | } 323 | } 324 | 325 | if hexo-config("github_widget") 326 | .article-entry .github-widget 327 | h3::after 328 | content none 329 | .github-box 330 | font-size (13/16)rem 331 | .github-box-title 332 | h3 333 | font-size 1rem 334 | .github-stats 335 | font-size (11/16)rem 336 | .updated 337 | font-size (11/16)rem 338 | .download 339 | font-size (12/16)rem 340 | 341 | if hexo-config("jquery_ui") 342 | .ui-tooltip 343 | padding 6px 344 | max-width 30em 345 | box-shadow 0 0 .8em rgba(0, 0, 0, .6) 346 | color white 347 | font-family font-sans, font-chs, sans-serif 348 | font-size .9em 349 | background rgba(0, 0, 0, .65) 350 | 351 | body .ui-tooltip 352 | border 1px solid white 353 | 354 | 355 | if hexo-config("progressBar.on") && hexo-config("progressBar.type") == "minimal" 356 | bar-color = hexo-config("progressBar.color") 357 | if bar-color == "blue" 358 | .pace .pace-progress 359 | background #77b6ff 360 | box-shadow 0 0 10px rgba(@background, .7) 361 | 362 | .article-entry ul > li, 363 | .share, 364 | .article-category::before, 365 | .article-tag::before, 366 | .article-meta time:before 367 | text-rendering auto 368 | -webkit-font-smoothing antialiased 369 | -moz-osx-font-smoothing grayscale 370 | 371 | .youyan 372 | padding 20px 40px 373 | @media (max-width: 767px) 374 | .youyan 375 | padding 20px 10px 376 | --------------------------------------------------------------------------------