├── docs ├── Todo.md ├── Changelog.md ├── PreviewPhoto_首页预览图.md ├── pagefooter_页脚.md ├── widget_部件.md ├── navigation_导航栏.md ├── socail_社交.md ├── Hexo-Post-template.md ├── comment_评论.md ├── analytics_访问统计.md └── Home.md ├── screenshots └── daily.jpg ├── languages ├── zh-CN.yml ├── zh-TW.yml ├── en.yml └── default.yml ├── source ├── css │ ├── style.scss │ ├── _comment.scss │ ├── _archive.scss │ ├── _variables.scss │ ├── _mobile.scss │ ├── _nav.scss │ ├── _post.scss │ ├── _normalize.scss │ ├── _highlight.scss │ └── _daily.scss ├── images │ ├── arrow-left.svg │ ├── arrow-right.svg │ ├── menu.svg │ ├── github.svg │ ├── mail.svg │ ├── twitter.svg │ └── weibo.svg └── js │ └── app.js ├── layout ├── _partial │ ├── article-archive.ejs │ ├── pagination.ejs │ ├── comment.ejs │ ├── article-index.ejs │ ├── nav.ejs │ ├── footer.ejs │ ├── after-footer.ejs │ └── head.ejs ├── layout.ejs ├── index.ejs ├── tag.ejs ├── archive.ejs └── post.ejs ├── LICENSE ├── _config.yml └── README.md /docs/Todo.md: -------------------------------------------------------------------------------- 1 | - 添加访问统计 -------------------------------------------------------------------------------- /docs/Changelog.md: -------------------------------------------------------------------------------- 1 | - 2017-04-17 新增访问统计功能 2 | - 2016-09-07 更新归档页面:按年份分组展示 3 | - 2016-06-16 第一份提交 -------------------------------------------------------------------------------- /screenshots/daily.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glenhoooo/hexo-theme-Daily/HEAD/screenshots/daily.jpg -------------------------------------------------------------------------------- /languages/zh-CN.yml: -------------------------------------------------------------------------------- 1 | prev: 上一页 2 | next: 下一页 3 | comment: 留言 4 | archive_a: 归档 5 | archive_b: 归档:%s 6 | contact: 与我联系 7 | search: 站内搜索 8 | -------------------------------------------------------------------------------- /languages/zh-TW.yml: -------------------------------------------------------------------------------- 1 | prev: 上一頁 2 | next: 下一頁 3 | comment: 留言 4 | archive_a: 彙整 5 | archive_b: 彙整:%s 6 | contact: 與我聯系 7 | search: 站內搜索 8 | -------------------------------------------------------------------------------- /languages/en.yml: -------------------------------------------------------------------------------- 1 | prev: Older Posts 2 | next: Newer Posts 3 | comment: Comments 4 | archive_a: Archives 5 | archive_b: "Archives: %s" 6 | contact: Contact 7 | search: Search 8 | -------------------------------------------------------------------------------- /docs/PreviewPhoto_首页预览图.md: -------------------------------------------------------------------------------- 1 | ## 如何为文章添加首页预览图? 2 | 3 | 在你的 markdown 文章中添加 `photos` 变量,配置多张图则显示第一张。文章内容示例: 4 | 5 | https://github.com/GallenHu/hexo-theme-Daily/wiki/Hexo-Post-template -------------------------------------------------------------------------------- /languages/default.yml: -------------------------------------------------------------------------------- 1 | prev: Older Posts 2 | next: Newer Posts 3 | comment: Comments 4 | archive_a: Archives 5 | archive_b: "Archives: %s" 6 | contact: Contact 7 | search: Search 8 | -------------------------------------------------------------------------------- /docs/pagefooter_页脚.md: -------------------------------------------------------------------------------- 1 | ## 如何自定义页脚? 2 | How to customize page footer? 3 | 4 | 编辑站点的 `_config.yml`,添加 5 | ```yml 6 | footer: 你要自定义的内容(支持HTML标签) 7 | # 举例: 8 | # footer: Powered by Hexo with Theme Daily 9 | ``` 10 | -------------------------------------------------------------------------------- /source/css/style.scss: -------------------------------------------------------------------------------- 1 | @import './normalize'; 2 | @import './variables'; 3 | @import './daily'; 4 | @import './nav'; 5 | @import './post'; 6 | @import './highlight'; 7 | @import './archive'; 8 | @import './comment'; 9 | 10 | @import './mobile'; 11 | -------------------------------------------------------------------------------- /docs/widget_部件.md: -------------------------------------------------------------------------------- 1 | ## 如何自定义底部 widget? 2 | How to customize widget in footer? 3 | 4 | 在`_config.yml`文件中配置: 5 | ```yml 6 | # widget 7 | # title: 标题(如:关于本站/友情链接/关于作者...) 8 | # content: 内容(html标签) 9 | widget: 10 | title: 关于本站 11 | content:

替换为你的网站简介

12 | ``` -------------------------------------------------------------------------------- /docs/navigation_导航栏.md: -------------------------------------------------------------------------------- 1 | ## 如何自定义右上角导航栏? 2 | 3 | How to customize the navigation bar ? 4 | 5 | 在 `_config.yml` 中配置: 6 | ```yml 7 | # nav 8 | # NavName: your-folder-name 9 | # NavName2: your-folder-name2 10 | nav: 11 | Home: . 12 | Archive: archives 13 | About: about 14 | ``` -------------------------------------------------------------------------------- /source/css/_comment.scss: -------------------------------------------------------------------------------- 1 | #comment #ds-thread #ds-reset a.ds-like-thread-button { 2 | background-color: #fff; 3 | background-image: none; 4 | } 5 | #comment #ds-reset .ds-gradient-bg { 6 | background: none; 7 | } 8 | #comment #ds-thread #ds-reset .ds-powered-by { 9 | display: none; 10 | } 11 | -------------------------------------------------------------------------------- /docs/socail_社交.md: -------------------------------------------------------------------------------- 1 | ## 如何修改「与我联系」栏目中的内容? 2 | How to modify socail fields ? 3 | 4 | 编辑站点的 `_config.yml`,添加或修改 `social` 字段: 5 | ``` 6 | social: 7 | github: https://github.com/yourid 8 | weibo: http://weibo.com/yourid 9 | mail: mailto:yourmail@gmail.com 10 | twitter: https://twitter.com/yourid 11 | ``` -------------------------------------------------------------------------------- /docs/Hexo-Post-template.md: -------------------------------------------------------------------------------- 1 | ## 文章模板 2 | 3 | ``` 4 | title: 标题 5 | date: 2015-02-09 22:01 6 | modified: 2016-05-14 17:40 7 | tag: 8 | - 前端开发 9 | - CSS 10 | 11 | photos: 12 | - http://i.imgur.com/0dZAI8y.jpg 13 | --- 14 | 15 | 引言(简介) 16 | 17 | 18 | 19 | 详细内容 20 | balabalabalabalabalabalabalabalabala 21 | ``` -------------------------------------------------------------------------------- /source/css/_archive.scss: -------------------------------------------------------------------------------- 1 | .archive { 2 | padding-bottom: 60px; 3 | 4 | h2.year { 5 | color: #444444; 6 | } 7 | 8 | ul.list { 9 | padding-left: 50px; 10 | li { 11 | padding: 10px 0; 12 | line-height: 1.5; 13 | } 14 | } 15 | .date { 16 | margin-right: 30px; 17 | color: #7f8c8d; 18 | } 19 | } -------------------------------------------------------------------------------- /layout/_partial/article-archive.ejs: -------------------------------------------------------------------------------- 1 | <% posts.forEach(function(item) { %> 2 |
  • 3 | 4 | <%= item.date.format(config.date_format) %> 5 | 6 | 7 | <%- item.title || theme.default_post_title || "Untitled" %> 8 | 9 |
  • 10 | <% }); %> 11 | -------------------------------------------------------------------------------- /docs/comment_评论.md: -------------------------------------------------------------------------------- 1 | ## 如何在文章中添加评论? 2 | How to add comment field in your article? 3 | 4 | 编辑站点的 `_config.yml` ,添加 `disqus_shortname` 字段,设置如下 5 | ```yml 6 | disqus_shortname: your-disqus-shortname 7 | # 多说评论则替换成如下配置:(不建议使用) 8 | # duoshuo_shortname: your-duoshuo-shortname 9 | ``` 10 | 如需取消某个页面的评论,在md文件的front-matter中增加 11 | Disable comment in a page by this config 12 | ``` 13 | comments: false 14 | ``` -------------------------------------------------------------------------------- /layout/layout.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%- partial('_partial/head') %> 6 | 7 | 8 | 9 | 10 | <%- partial('_partial/nav') %> 11 | 12 | 13 | <%- body %> 14 | 15 | 16 | <%- partial('_partial/footer') %> 17 | 18 | 19 | <%- partial('_partial/after-footer') %> 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /source/css/_variables.scss: -------------------------------------------------------------------------------- 1 | // colors 2 | $color-title: #000; 3 | $color-text: #3a3a3a; 4 | $grey-border: #dcdcdc; 5 | $table-border-color: #ddd; 6 | $table-row-odd-bg-color: #f9f9f9; 7 | $table-row-hover-bg-color: #f5f5f5; 8 | $table-cell-border-right-color: #eee; 9 | 10 | // lenght 11 | $header-height: 70px; 12 | $nav-padding-top: 25px; 13 | $container-width: 600px; 14 | $inside-wrapper-width: 920px; 15 | $icon-size: 20px; 16 | $table-width: 100%; 17 | $table-font-size: 14px; 18 | $table-cell-padding: 8px; 19 | -------------------------------------------------------------------------------- /layout/index.ejs: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | <% page.posts.each(function(item, itemIndex){ %> 4 | <% if (itemIndex % 2 === 0) { %> 5 |
    6 | <%- partial('_partial/article-index', {item: item}) %> 7 |
    8 | <% } else { %> 9 |
    10 | <%- partial('_partial/article-index', {item: item}) %> 11 |
    12 | <% } %> 13 | <% }); %> 14 | 15 | <%- partial('_partial/pagination') %> 16 |
    17 |
    -------------------------------------------------------------------------------- /docs/analytics_访问统计.md: -------------------------------------------------------------------------------- 1 | ## 百度统计 2 | 1. 登录 [百度统计](http://tongji.baidu.com/),定位到站点的代码获取页面 3 | 2. 复制 hm.js? 后面那串统计脚本 id,如下图所示 4 | 3. 编辑根目录下的配置文件 `_config.yml`, 添加/修改字段 `baidu_analytics`,值设置成你的百度统计脚本 id。 5 | 6 | ![img](http://theme-next.iissnan.com/uploads/five-minutes-setup/analytics-baidu-id.png) 7 | 8 | ## Google Analytics 9 | 1. 登录 [谷歌分析](https://analytics.google.com),获取到你的跟踪 ID,如:`UA-97471234-1` 10 | 2. 编辑根目录下的配置文件 `_config.yml`, 添加/修改字段 `google_analytics `,值设置成你的跟踪 ID 11 | 12 | ## 配置示例: 13 | 14 | ```yml 15 | # 百度统计 16 | baidu_analytics: d746c8559f0fadb1401723e8606ea2ef 17 | # Google Analytics 18 | google_analytics: UA-97471234-1 19 | ``` -------------------------------------------------------------------------------- /layout/_partial/pagination.ejs: -------------------------------------------------------------------------------- 1 | <% if (page.prev || page.next){ %> 2 |
    3 | 19 |
    20 | <% } %> 21 | -------------------------------------------------------------------------------- /source/images/arrow-left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /source/images/arrow-right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /layout/_partial/comment.ejs: -------------------------------------------------------------------------------- 1 | <% if (page.comments){ %> 2 |
    3 | 4 | 5 | <% if(config.disqus_shortname) { %> 6 |
    7 | 14 | 15 |
    16 | <% } else if (config.duoshuo_shortname) { %> 17 | 18 |
    19 | 20 | <% } %> 21 |
    22 | <% } %> 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Gallen.Hu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docs/Home.md: -------------------------------------------------------------------------------- 1 | Welcome to the hexo-theme-Daily wiki! 2 | 3 | ## 如何自定义底部widget? 4 | :point_right: [How to customize widget in footer?](./widget_%E9%83%A8%E4%BB%B6.md) 5 | 6 | ## 如何在文章中添加评论? 7 | :point_right: [How to add comment field in your article? ](./comment_%E8%AF%84%E8%AE%BA.md) 8 | 9 | ## 如何自定义页脚? 10 | :point_right: [How to customize page footer? ](./pagefooter_%E9%A1%B5%E8%84%9A.md) 11 | 12 | ## 如何修改「与我联系」栏目中的内容? 13 | :point_right: [How to modify socail fields ?](./socail_%E7%A4%BE%E4%BA%A4.md) 14 | 15 | ## 如何为文章添加首页预览图? 16 | :point_right:[How to configure preview photo in homepage ?](./PreviewPhoto_%E9%A6%96%E9%A1%B5%E9%A2%84%E8%A7%88%E5%9B%BE.md) 17 | 18 | ## 如何自定义右上角导航栏? 19 | :point_right:[How to customize the navigation bar ?](./navigation_%E5%AF%BC%E8%88%AA%E6%A0%8F.md) 20 | 21 | ## _config.yml 示例 22 | :point_right: [_config.yml example](https://github.com/Hinpc/hexo-blog-generator/blob/master/_config.yml) 23 | 24 | ## 文章模板示例 25 | :point_right: [Article template](./Hexo-Post-template.md) 26 | 27 | ## Demo 站点源码 28 | (他部署在**二级目录**,请注意`_config.yml`中`url`和`root`的配置) 29 | 30 | :point_right: Source code of Demo site: 31 | 32 | https://github.com/Hinpc/Daily -------------------------------------------------------------------------------- /source/images/menu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /layout/tag.ejs: -------------------------------------------------------------------------------- 1 | <% 2 | // tag 与 archive 基本一致,区别是: 3 | // 1. archive 使用的 site.posts, tag使用的是page.posts; 4 | // 2. tag 有分页。 (如果使用page.posts, hexo 默认使用config里的[per_page]来配置archive和tag分页) 5 | var title = ''; 6 | if (page.category) title = page.category; 7 | if (page.tag) title = "#" + page.tag; 8 | if (page.archive) { 9 | if (page.year) title = page.year + (page.month ? '/' + page.month : ''); 10 | else title = __('archive_a'); 11 | } 12 | %> 13 | 14 | 15 |
    16 |
    17 |

    <%- title %>

    18 |
    19 |
    20 | 21 | <% var groupObj = _.groupBy(page.posts.toArray(), function(p){return -p.date.format('YYYY')}) %> 22 | <% for (var year in groupObj){ %> 23 |

    <%- -year %>

    24 |
      25 | <%- partial('_partial/article-archive', {posts: groupObj[year]}) %> 26 |
    27 | <% } %> 28 |
    29 |
    30 |
    31 | <%- partial('_partial/pagination') %> 32 |
    33 | -------------------------------------------------------------------------------- /layout/_partial/article-index.ejs: -------------------------------------------------------------------------------- 1 | <% 2 | var isFullUrl = function(str) { 3 | return /^(https:|http:|ftp:)?\/\//.test(str); 4 | }; 5 | %> 6 | 7 | 8 |
    9 |
    10 | <% if (item.photos.length) { %> 11 | <% var thumb = item.photos[0]; %> 12 | <% var thumbUrl = isFullUrl(thumb) ? thumb : url_for(thumb) %> 13 | 14 | 15 | <%- item.title %> 16 | 17 | <% } %> 18 |

    19 | 20 | <%- item.title || theme.default_post_title || "Untitled" %> 21 | 22 |

    23 | <% if (item.excerpt){ %> 24 |
    25 |

    26 | <%- item.excerpt %> 27 |

    28 |
    29 | <% } %> 30 | 31 |

    32 | <%= item.date.format(config.date_format) %> 33 |

    34 | 41 |
    42 |
    -------------------------------------------------------------------------------- /layout/_partial/nav.ejs: -------------------------------------------------------------------------------- 1 | 36 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # basic 2 | title: Daily 3 | subtitle: Minimalism, simplicity and refined details 4 | favicon: https://hexo.io/icon/favicon-96x96.png 5 | 6 | # avatar: images/avatar.png 7 | # banner_small: images/banner-small.png 8 | # banner_large: images/banner-large.png 9 | logo: https://hexo.io/logo.svg 10 | 11 | # disqus 12 | #disqus_shortname: drakeleung 13 | 14 | highlight: 15 | enable: true 16 | line_number: false 17 | auto_detect: false 18 | tab_replace: 19 | 20 | # nav # 21 | nav: 22 | home: . 23 | archive: archives 24 | # about: about 25 | # rss: atom.xml 26 | 27 | # hexo-renderer-sass 28 | node_sass: 29 | outputStyle: nested 30 | precision: 5 31 | sourceComments: false 32 | 33 | # Default post title 34 | default_post_title: Untitled 35 | 36 | # social 37 | social: 38 | github: https://github.com/GallenHu 39 | # weibo: http://weibo.com/10010800 40 | # mail: mailto:gallenhu@foxmail.com 41 | # twitter: https://twitter.com/GallenHu 42 | 43 | # widget 44 | # title: 标题 45 | # content: 内容 46 | widget: 47 | title: 关于本站 48 | content: 49 | 50 | footer: Powered by Hexo with Theme Daily 51 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hexo-theme-Daily 2 | 3 | ![GitHub version](https://img.shields.io/github/v/release/gallenhu/hexo-theme-Daily?color=success) 4 | ![](https://img.shields.io/badge/license-MIT-000000.svg) 5 | 6 | A simple theme for Hexo(version 4.x). Demo: :point_right: [Demo Site](https://hinpc.github.io/Daily/) or [国内访问](http://gallenhu.gitee.io/daily/) :point_left: 7 | 8 | ## ScreenShot 9 | ![Daily](screenshots/daily.jpg) 10 | 11 | ## Usage 12 | 0. (Optional) Specify Hexo version in the `root` directory 13 | 14 | ❗️ This theme maximum supported hexo version 4 15 | 16 | ```sh 17 | $ hexo version # check version 18 | $ npm i hexo@4.2 19 | ``` 20 | 21 | 1. In the `root` directory: 22 | ```sh 23 | $ git clone https://github.com/GallenHu/hexo-theme-Daily.git themes/Daily 24 | $ npm install --save hexo-renderer-sass 25 | ``` 26 | 27 | 2. Change the `theme` property in the `config.yml` file. 28 | ```yml 29 | # theme: landscape 30 | theme: Daily 31 | ``` 32 | 33 | 3. Run: 34 | ```sh 35 | $ hexo server 36 | ``` 37 | 38 | ## Documentation 39 | [文档](/docs/Home.md) 40 | 41 | ## Browser Support 42 | ![IE9+](https://img.shields.io/badge/IE9+-success?style=flat&logo=internet-explorer&cacheSeconds=36000) 43 | 44 | ## Inspired by 45 | WordPress theme [Daily](http://www.robertbrodziak.com/en/free-wordpress-themes/daily-theme/) 46 | Any Question,Please Contact: gallenhu#foxmail.com 47 | -------------------------------------------------------------------------------- /source/js/app.js: -------------------------------------------------------------------------------- 1 | var appDaily = { 2 | baiduSearch: function(words) { 3 | var key = 'site:' + window.location.host + '%20' + words.replace(/\s/g, '%20'); 4 | var url = 'https://www.baidu.com/baidu?tn=baidu&ie=utf-8&word='; 5 | 6 | window.open(url + key, '_blank'); 7 | }, 8 | googleSearch: function(words) { 9 | var key = 'site:' + window.location.host + '%20' + words.replace(/\s/g, '%20'); 10 | var url = 'https://www.google.com/search?q='; 11 | 12 | window.open(url + key, '_blank'); 13 | }, 14 | submitSearch: function(search_engines) { 15 | var $ipt = document.getElementById('homeSearchInput'); 16 | 17 | if (search_engines === 'baidu') { 18 | this.baiduSearch($ipt.value.trim()); 19 | } else { 20 | this.googleSearch($ipt.value.trim()); 21 | } 22 | 23 | return false; 24 | }, 25 | bindToggleButton: function() { 26 | var btn = document.querySelector('.menu-toggle'); 27 | var nav = document.querySelector('.navbar'); 28 | 29 | btn.addEventListener('click', function() { 30 | var c = nav.getAttribute('class') || ''; 31 | 32 | if (c.indexOf('show-force') !== -1) { 33 | nav.setAttribute('class', c.replace(/show-force/, '').trim()); 34 | } else { 35 | nav.setAttribute('class', (c + ' show-force').trim()); 36 | } 37 | }); 38 | } 39 | }; 40 | 41 | appDaily.bindToggleButton(); 42 | -------------------------------------------------------------------------------- /layout/archive.ejs: -------------------------------------------------------------------------------- 1 | <% 2 | // use "site.posts" to make all articles in one page. (Need not install hexo-generator-archive) 3 | var title = ''; 4 | if (page.category) title = page.category; 5 | if (page.tag) title = "#" + page.tag; 6 | if (page.archive) { 7 | if (page.year) title = page.year + (page.month ? '/' + page.month : ''); 8 | else title = __('archive_a'); 9 | } 10 | %> 11 | 12 | 13 |
    14 |
    15 |

    <%- title %>

    16 |
    17 |
    18 | 22 | <% 23 | var groupObj = _.groupBy(site.posts.toArray(), function(p){return p.date.format('YYYY')}); 24 | var groupArr = []; 25 | for (var year in groupObj){ 26 | var postsInThisYear = groupObj[year]; 27 | var sortedPosts = _.sortBy(postsInThisYear, function(p) { return p.date.format('MMDD') }); 28 | groupArr.push({ 29 | year: year, 30 | posts: sortedPosts.reverse() 31 | }); 32 | } 33 | %> 34 | 35 | <% groupArr.reverse().forEach(function(item) { %> 36 |

    <%- item.year %>

    37 |
      38 | <%- partial('_partial/article-archive', {posts: item.posts}) %> 39 |
    40 | <% }) %> 41 |
    42 |
    43 |
    44 |
    45 | -------------------------------------------------------------------------------- /source/images/github.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/css/_mobile.scss: -------------------------------------------------------------------------------- 1 | @media screen and (max-width: 767px) { 2 | .logo a img { 3 | height: 36px; 4 | } 5 | .site-content { 6 | min-height: auto; 7 | .content-area { 8 | padding-top: 0; 9 | } 10 | } 11 | .site-header { 12 | position: relative; 13 | .navbar { 14 | display: none; 15 | float: none; 16 | position: absolute; 17 | left: 0; 18 | top: $header-height; 19 | padding: 15px 0 15px 30px; 20 | width: 100%; 21 | background: #efefef; 22 | border-bottom: 1px solid $grey-border; 23 | box-shadow: 0 2px 3px #dfdfdf; 24 | z-index: 9999; 25 | ul { 26 | li { 27 | width: 100%; 28 | padding: 10px 0; 29 | &::before { 30 | display: none; 31 | } 32 | } 33 | } 34 | } 35 | .button-wrap { 36 | display: block; 37 | } 38 | } 39 | 40 | .post { 41 | .nav-links { 42 | display: none; 43 | } 44 | } 45 | 46 | .footer-widgets { 47 | .row { 48 | .col-1-1, 49 | .col-1-2, 50 | .col-1-3, 51 | .col-1-4 { 52 | float: none; 53 | width: auto; 54 | margin-bottom: 50px; 55 | } 56 | } 57 | } 58 | 59 | .archive ul.list { 60 | padding-left: 20px; 61 | } 62 | 63 | } 64 | 65 | 66 | @media screen and (max-width: 320px) { 67 | .container { 68 | padding-left: 20px; 69 | padding-right: 20px; 70 | } 71 | .site-header, 72 | .page .site-header, 73 | .home.paged .site-header { 74 | padding-left: 20px; 75 | padding-right: 20px; 76 | 77 | } 78 | .footer-widgets .inside-wrapper { 79 | padding-left: 5px; 80 | padding-right: 5px; 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /source/images/mail.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layout/post.ejs: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 4 |
    5 |
    6 | 7 |
    8 |

    9 | <%- page.title || theme.default_post_title || "Untitled" %> 10 | <% if (page.subtitle && page.subtitle.length) { %> 11 |

    <%- page.subtitle %>

    12 | <% } %> 13 |

    14 |

    15 | <%= page.date.format(config.date_format) %> 16 |

    17 | 26 |
    27 | 28 |
    29 | <%- page.content %> 30 |
    31 |
    32 |
    33 | 34 |
    35 | <%- partial('_partial/comment', { 36 | shortname: config.disqus_shortname 37 | }) %> 38 |
    39 | 40 | 52 | 53 |
    54 |
    55 | -------------------------------------------------------------------------------- /source/css/_nav.scss: -------------------------------------------------------------------------------- 1 | .site-header { 2 | width: 100%; 3 | background: #fff; 4 | border-bottom: 1px solid #dcdcdc; 5 | z-index: 30; 6 | position: fixed; 7 | top: 0; 8 | left: 0; 9 | padding-left: 50px; 10 | padding-right: 50px; 11 | height: 70px; 12 | -moz-box-sizing: border-box; 13 | -webkit-box-sizing: border-box; 14 | box-sizing: border-box; 15 | .button-wrap { 16 | display: none; 17 | float: right; 18 | padding-top: $nav-padding-top; 19 | } 20 | .menu-toggle { 21 | width: 20px; 22 | height: 20px; 23 | background: url("../images/menu.svg") center no-repeat; 24 | text-indent: -99999px; 25 | overflow: hidden; 26 | border: none; 27 | box-shadow: none; 28 | outline: none; 29 | opacity: 0.25; 30 | } 31 | } 32 | .header-inside { 33 | display: block; 34 | position: relative; 35 | height: 100%; 36 | width: 100%; 37 | } 38 | .logo { 39 | display: block; 40 | position: absolute; 41 | top: 50%; 42 | transform: translateY(-50%); 43 | vertical-align: middle; 44 | a { 45 | display: block; 46 | img { 47 | display: block; 48 | height: $header-height - 10px; 49 | } 50 | } 51 | } 52 | .navbar { 53 | float: right; 54 | padding-top: $nav-padding-top; 55 | ul { 56 | &:after { 57 | content: ''; 58 | display: block; 59 | clear: both; 60 | height: 0; 61 | visibility: hidden; 62 | } 63 | li { 64 | position: relative; 65 | float: left; 66 | margin-left: 20px; 67 | a { 68 | text-decoration: none; 69 | line-height: 1.5; 70 | &:hover { 71 | opacity: 1; 72 | } 73 | } 74 | } 75 | } 76 | } 77 | 78 | .navbar ul li:before { 79 | position: absolute; 80 | bottom: 0px; 81 | left: 0; 82 | content: ""; 83 | width: 0%; 84 | height: 1px; 85 | background: #7e7e7e; 86 | display: block; 87 | -webkit-transition: width 0.25s ease; 88 | transition: width 0.25s ease; 89 | } 90 | .navbar ul li:hover:before { 91 | width: 100%; 92 | } 93 | -------------------------------------------------------------------------------- /layout/_partial/footer.ejs: -------------------------------------------------------------------------------- 1 | 2 | 44 | 45 | 54 | -------------------------------------------------------------------------------- /source/css/_post.scss: -------------------------------------------------------------------------------- 1 | .post { 2 | padding-top: 70px; 3 | padding-bottom: 70px; 4 | .nav-links { 5 | a { 6 | text-decoration: none; 7 | color: #3a3a3a; 8 | text-transform: uppercase; 9 | letter-spacing: 0.2em; 10 | font-family: -apple-system, BlinkMacSystemFont,"Helvetica Neue","PingFang-SC-Regular","STHeiti", "Helvetica","Arial","Verdana","sans-serif","Microsoft YaHei"; 11 | font-size: 0.750em; 12 | } 13 | .meta-arraw { 14 | opacity: 0.8; 15 | } 16 | .nav-previous { 17 | position: fixed; 18 | bottom: 64px; 19 | left: 50px; 20 | z-index: 29; 21 | } 22 | .nav-next { 23 | position: fixed; 24 | bottom: 64px; 25 | right: 50px; 26 | z-index: 29; 27 | } 28 | } 29 | 30 | table { 31 | width: $table-width; 32 | border-collapse: collapse; 33 | border-spacing: 0; 34 | border: 1px solid $table-border-color; 35 | font-size: $table-font-size; 36 | word-wrap: break-all; 37 | } 38 | table>tbody>tr { 39 | &:nth-of-type(odd) { background-color: $table-row-odd-bg-color; } 40 | &:hover { background-color: $table-row-hover-bg-color; } 41 | } 42 | 43 | caption, th, td { 44 | padding: $table-cell-padding; 45 | text-align: left; 46 | vertical-align: middle; 47 | font-weight: normal; 48 | } 49 | 50 | th, td { 51 | border-bottom: 3px solid $table-border-color; 52 | border-right: 1px solid $table-cell-border-right-color; 53 | } 54 | 55 | th { 56 | padding-bottom: 10px; 57 | font-weight: 700; 58 | } 59 | 60 | td { border-bottom-width: 1px; } 61 | } 62 | .entry-content { 63 | font-family: -apple-system, BlinkMacSystemFont,"Helvetica Neue","PingFang-SC-Regular","STHeiti", "Helvetica","Arial","Verdana","sans-serif","Microsoft YaHei"; 64 | line-height: 1.7; 65 | word-wrap: break-word; 66 | ol, 67 | ul { 68 | margin: 0 0 1.5em 3em; 69 | } 70 | ul { 71 | list-style: disc; 72 | } 73 | blockquote { 74 | color: #aaa; 75 | margin: 1em 0; 76 | padding: 0 0 0 30px; 77 | border-left: 4px solid #aaa; 78 | } 79 | p img { 80 | display: block; 81 | margin: 0 auto; 82 | } 83 | a:link { 84 | color: #3769c9; 85 | } 86 | a:visited { 87 | color: #3769c9; 88 | } 89 | a:active, 90 | a:focus, 91 | a:hover { 92 | color: #3769c9; 93 | opacity: 0.8; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /layout/_partial/after-footer.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%- js('js/app.js') %> 3 | <%if (config.disqus_shortname){ %> 4 | 19 | <% } else if (config.duoshuo_shortname) { %> 20 | 21 | 32 | 33 | <% } %> 34 | <%if (config.baidu_analytics) { %> 35 | 36 | 45 | 46 | <% } %> 47 | <%if (config.google_analytics) { %> 48 | 49 | 59 | 60 | <% } %> 61 | -------------------------------------------------------------------------------- /layout/_partial/head.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <% if (page.description){ %> 7 | 8 | <% } else if (config.description){ %> 9 | 10 | <% } %> 11 | 12 | 13 | <% if (config.author){ %> 14 | 15 | <% } %> 16 | 17 | 18 | <% if (page.title){ %> 19 | 20 | <% } else { %> 21 | 22 | <% } %> 23 | 24 | <% if (page.description){ %> 25 | 26 | <% } else if (config.description) { %> 27 | 28 | <% } %> 29 | 30 | 31 | 32 | <% if(page.title) { %> 33 | 34 | <% } else { %> 35 | 36 | <% } %> 37 | 38 | <% if (page.share_cover) { %> 39 | 40 | <% } else if (config.cover) { %> 41 | 42 | <% } %> 43 | 44 | 45 | 46 | 47 | <% 48 | var title = []; 49 | if (page.title) title.push(page.title); 50 | if (page.category) title.push(page.category); 51 | if (page.tag) title.push(page.tag); 52 | if (page.archive) { 53 | if (page.year) title.push(__('archive_b', page.year + (page.month ? '/' + page.month : ''))); 54 | else title.push(__('archive_a')); 55 | } 56 | title.push(config.title); 57 | if (is_home() && config.subtitle) title.push(config.subtitle); 58 | %> 59 | <%= title.join(' - ') %> 60 | 61 | 62 | 63 | 64 | 65 | <%- css('css/style') %> 66 | 67 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /source/images/twitter.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/css/_normalize.scss: -------------------------------------------------------------------------------- 1 | html { 2 | font-family: sans-serif; 3 | -webkit-text-size-adjust: 100%; 4 | -ms-text-size-adjust: 100%; 5 | } 6 | body { 7 | margin: 0; 8 | } 9 | article, 10 | aside, 11 | details, 12 | figcaption, 13 | figure, 14 | footer, 15 | header, 16 | main, 17 | menu, 18 | nav, 19 | section, 20 | summary { 21 | display: block; 22 | } 23 | audio, 24 | canvas, 25 | progress, 26 | video { 27 | display: inline-block; 28 | vertical-align: baseline; 29 | } 30 | audio:not([controls]) { 31 | display: none; 32 | height: 0; 33 | } 34 | [hidden], 35 | template { 36 | display: none; 37 | } 38 | a { 39 | background-color: transparent; 40 | } 41 | a:active, 42 | a:hover { 43 | outline: 0; 44 | } 45 | abbr[title] { 46 | border-bottom: 1px dotted; 47 | } 48 | b, 49 | strong { 50 | font-weight: bold; 51 | } 52 | dfn { 53 | font-style: italic; 54 | } 55 | h1 { 56 | font-size: 2em; 57 | margin: 0.67em 0; 58 | } 59 | mark { 60 | background: #ff0; 61 | color: #000; 62 | } 63 | small { 64 | font-size: 80%; 65 | } 66 | sub, 67 | sup { 68 | font-size: 75%; 69 | line-height: 0; 70 | position: relative; 71 | vertical-align: baseline; 72 | } 73 | sup { 74 | top: -0.5em; 75 | } 76 | sub { 77 | bottom: -0.25em; 78 | } 79 | img { 80 | border: 0; 81 | } 82 | svg:not(:root) { 83 | overflow: hidden; 84 | } 85 | figure { 86 | margin: 1em 40px; 87 | } 88 | hr { 89 | box-sizing: content-box; 90 | height: 0; 91 | } 92 | pre { 93 | overflow: auto; 94 | } 95 | code, 96 | kbd, 97 | pre, 98 | samp { 99 | font-family: monospace, monospace; 100 | font-size: 1em; 101 | } 102 | button, 103 | input, 104 | optgroup, 105 | select, 106 | textarea { 107 | color: inherit; 108 | font: inherit; 109 | margin: 0; 110 | } 111 | button { 112 | overflow: visible; 113 | } 114 | button, 115 | select { 116 | text-transform: none; 117 | } 118 | button, 119 | html input[type="button"], 120 | input[type="reset"], 121 | input[type="submit"] { 122 | -webkit-appearance: button; 123 | cursor: pointer; 124 | } 125 | button[disabled], 126 | html input[disabled] { 127 | cursor: default; 128 | } 129 | button::-moz-focus-inner, 130 | input::-moz-focus-inner { 131 | border: 0; 132 | padding: 0; 133 | } 134 | input { 135 | line-height: normal; 136 | } 137 | input[type="checkbox"], 138 | input[type="radio"] { 139 | box-sizing: border-box; 140 | padding: 0; 141 | } 142 | input[type="number"]::-webkit-inner-spin-button, 143 | input[type="number"]::-webkit-outer-spin-button { 144 | height: auto; 145 | } 146 | input[type="search"]::-webkit-search-cancel-button, 147 | input[type="search"]::-webkit-search-decoration { 148 | -webkit-appearance: none; 149 | } 150 | fieldset { 151 | border: 1px solid #c0c0c0; 152 | margin: 0 2px; 153 | padding: 0.35em 0.625em 0.75em; 154 | } 155 | legend { 156 | border: 0; 157 | padding: 0; 158 | } 159 | textarea { 160 | overflow: auto; 161 | } 162 | optgroup { 163 | font-weight: bold; 164 | } 165 | table { 166 | border-collapse: collapse; 167 | border-spacing: 0; 168 | } 169 | td, 170 | th { 171 | padding: 0; 172 | } 173 | -------------------------------------------------------------------------------- /source/images/weibo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/css/_highlight.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * From https://github.com/pinggod/hexo-theme-apollo/blob/master/source/scss/_partial/post.scss 3 | */ 4 | code, 5 | pre { 6 | font-size: 0.8em; 7 | background-color: #f8f8f8; 8 | font-family: 'Roboto Mono', Monaco, courier, monospace; 9 | } 10 | 11 | code { 12 | padding: 0.2em 0.4em; 13 | background-color: #efefef; 14 | border-radius: 3px; 15 | } 16 | 17 | pre { 18 | .line { 19 | min-height: 1em; 20 | } 21 | } 22 | 23 | .highlight { 24 | position: relative; 25 | margin: 1em 0; 26 | border-radius: 2px; 27 | line-height: 1.1em; 28 | overflow-x: auto; 29 | table, tr, td { 30 | width: 100%; 31 | border-collapse: collapse; 32 | padding: 0; 33 | margin: 0; 34 | background-color: #f8f8f8; 35 | border: 1px solid #eee; 36 | } 37 | table>tbody>tr { 38 | &:nth-of-type(odd) { background-color: #f8f8f8; } 39 | &:hover { background-color: #f8f8f8; } 40 | } 41 | .gutter { 42 | display: none; 43 | width: 1%; 44 | // min-width: 50px; 45 | padding-right: 10px; 46 | padding-left: 10px; 47 | box-sizing: border-box; 48 | font-family: "SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace; 49 | font-size: 12px; 50 | line-height: 20px; 51 | text-align: right; 52 | white-space: nowrap; 53 | -webkit-user-select: none; 54 | -moz-user-select: none; 55 | -ms-user-select: none; 56 | user-select: none; 57 | } 58 | .gutter pre { 59 | padding: 0; 60 | margin: 0; 61 | color: rgba(27,31,35,0.3); 62 | } 63 | .code pre { 64 | padding: 1.2em 1.4em; 65 | line-height: 1.5em; 66 | margin: 0; 67 | } 68 | } 69 | 70 | .has_line_number .highlight .gutter { display: table-cell; } 71 | 72 | %code-base { 73 | position: absolute; 74 | top: 0; 75 | right: 0; 76 | color: #ccc; 77 | text-align: right; 78 | font-size: 0.75em; 79 | padding: 5px 10px 0; 80 | line-height: 15px; 81 | height: 15px; 82 | font-weight: 600; 83 | } 84 | 85 | @mixin code-signs($keys) { 86 | @each $key in $keys { 87 | .highlight.#{$key} .code:after { 88 | content: to-upper-case($key); 89 | @extend %code-base; 90 | } 91 | } 92 | } 93 | 94 | $signs: ("html", "js", "bash", "css", "scss","diff", "java", "xml", "python", "json", "swift", "ruby", "perl", "php", "c", "java", "cpp", "ts"); 95 | @include code-signs($signs); 96 | 97 | .highlight.cpp .code:after { 98 | content: 'C++'; 99 | } 100 | 101 | pre { 102 | color: #525252; 103 | .function .keyword, 104 | .constant { 105 | color: #0092db; 106 | } 107 | .keyword, 108 | .attribute { 109 | color: #e96900; 110 | } 111 | .number, 112 | .literal { 113 | color: #ae81ff; 114 | } 115 | .tag, 116 | .tag .title, 117 | .change, 118 | .winutils, 119 | .flow, 120 | .lisp .title, 121 | .clojure .built_in, 122 | .nginx .title, 123 | .tex .special { 124 | color: #2973b7; 125 | } 126 | .symbol, 127 | .symbol .string, 128 | .value, 129 | .regexp { 130 | color: #42b983; 131 | } 132 | .title { 133 | color: #83B917; 134 | } 135 | .tag .value, 136 | .string, 137 | .subst, 138 | .haskell .type, 139 | .preprocessor, 140 | .ruby .class .parent, 141 | .built_in, 142 | .sql .aggregate, 143 | .django .template_tag, 144 | .django .variable, 145 | .smalltalk .class, 146 | .javadoc, 147 | .django .filter .argument, 148 | .smalltalk .localvars, 149 | .smalltalk .array, 150 | .attr_selector, 151 | .pseudo, 152 | .addition, 153 | .stream, 154 | .envvar, 155 | .apache .tag, 156 | .apache .cbracket, 157 | .tex .command, 158 | .prompt { 159 | color: #42b983; 160 | } 161 | .comment, 162 | .java .annotation, 163 | .python .decorator, 164 | .template_comment, 165 | .pi, 166 | .doctype, 167 | .shebang, 168 | .apache .sqbracket, 169 | .tex .formula { 170 | color: #b3b3b3; 171 | } 172 | .deletion { 173 | color: #BA4545; 174 | } 175 | .coffeescript .javascript, 176 | .javascript .xml, 177 | .tex .formula, 178 | .xml .javascript, 179 | .xml .vbscript, 180 | .xml .css, 181 | .xml .cdata { 182 | opacity: 0.5; 183 | } 184 | } 185 | -------------------------------------------------------------------------------- /source/css/_daily.scss: -------------------------------------------------------------------------------- 1 | body, 2 | html { 3 | height: 100%; 4 | } 5 | /*-------------------------------------------------------------- 6 | Reset 7 | --------------------------------------------------------------*/ 8 | a, 9 | abbr, 10 | acronym, 11 | address, 12 | applet, 13 | big, 14 | blockquote, 15 | body, 16 | caption, 17 | cite, 18 | code, 19 | dd, 20 | del, 21 | dfn, 22 | div, 23 | dl, 24 | dt, 25 | em, 26 | fieldset, 27 | font, 28 | form, 29 | h1, 30 | h2, 31 | h3, 32 | h4, 33 | h5, 34 | h6, 35 | html, 36 | iframe, 37 | ins, 38 | kbd, 39 | label, 40 | legend, 41 | li, 42 | object, 43 | ol, 44 | p, 45 | pre, 46 | q, 47 | s, 48 | samp, 49 | small, 50 | span, 51 | strike, 52 | strong, 53 | sub, 54 | sup, 55 | table, 56 | tbody, 57 | td, 58 | tfoot, 59 | th, 60 | thead, 61 | tr, 62 | tt, 63 | ul, 64 | var { 65 | border: 0; 66 | font-family: inherit; 67 | font-size: 100%; 68 | font-style: inherit; 69 | font-weight: inherit; 70 | margin: 0; 71 | outline: 0; 72 | padding: 0; 73 | vertical-align: baseline; 74 | } 75 | /*-------------------------------------------------------------- 76 | Typography 77 | --------------------------------------------------------------*/ 78 | button, 79 | input, 80 | select, 81 | textarea { 82 | color: $color-text; 83 | font-family: 'Open sans',sans-serif; 84 | font-size: 100%; 85 | line-height: 1.5; 86 | } 87 | h1, 88 | h2, 89 | h3, 90 | h4, 91 | h5, 92 | h6 { 93 | clear: both; 94 | font-weight: bold; 95 | margin: 1.5em 0 1em; 96 | } 97 | p { 98 | margin: 1em 0; 99 | line-height: 1.5; 100 | } 101 | b, 102 | strong { 103 | font-weight: bold; 104 | } 105 | cite, 106 | dfn, 107 | em, 108 | i { 109 | font-style: italic; 110 | } 111 | address { 112 | margin: 0 0 1.5em; 113 | } 114 | pre { 115 | background: #eee; 116 | font-family: "Courier 10 Pitch", Courier, monospace; 117 | font-size: 15px; 118 | font-size: 1.5rem; 119 | line-height: 1.6; 120 | margin-bottom: 1.6em; 121 | max-width: 100%; 122 | overflow: auto; 123 | padding: 1.6em; 124 | } 125 | code, 126 | kbd, 127 | tt, 128 | var { 129 | font: 15px Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; 130 | } 131 | abbr, 132 | acronym { 133 | border-bottom: 1px dotted #666; 134 | cursor: help; 135 | } 136 | ins, 137 | mark { 138 | background: #fff9c0; 139 | text-decoration: none; 140 | } 141 | sub, 142 | sup { 143 | font-size: 75%; 144 | height: 0; 145 | line-height: 0; 146 | position: relative; 147 | vertical-align: baseline; 148 | } 149 | sup { 150 | bottom: 1ex; 151 | } 152 | sub { 153 | top: 0.5ex; 154 | } 155 | small { 156 | font-size: 75%; 157 | } 158 | big { 159 | font-size: 125%; 160 | } 161 | /*-------------------------------------------------------------- 162 | Elements 163 | --------------------------------------------------------------*/ 164 | a#more, 165 | hr { 166 | display: block; 167 | height: 1px; 168 | border: 0; 169 | border-top: #d3d3d3 1px solid; 170 | margin: 40px 0; 171 | padding: 0; 172 | } 173 | ol, 174 | ul { 175 | margin: 0; 176 | } 177 | ul { 178 | list-style: none; 179 | } 180 | ol { 181 | list-style: decimal; 182 | } 183 | li > ol, 184 | li > ul { 185 | margin-bottom: 0; 186 | margin-left: 1.5em; 187 | } 188 | dt { 189 | font-weight: bold; 190 | } 191 | dd { 192 | margin: 0 1.5em 1.5em; 193 | } 194 | img { 195 | height: auto; 196 | /* Make sure images are scaled correctly. */ 197 | max-width: 100%; 198 | /* Adhere to container width. */ 199 | } 200 | figure { 201 | margin: 0; 202 | } 203 | table { 204 | margin: 0 0 1.5em; 205 | width: 100%; 206 | } 207 | th { 208 | font-weight: bold; 209 | } 210 | h1, h2, h3, h4 { 211 | font-family: -apple-system, BlinkMacSystemFont,"Helvetica Neue","PingFang-SC-Regular","STHeiti", "Helvetica","Arial","Verdana","sans-serif","Microsoft YaHei"; } 212 | h1 { 213 | font-size: 1.250em; } 214 | 215 | h1:hover { 216 | opacity: 0.7; } 217 | 218 | h2 { 219 | font-size: 1.2em;} 220 | 221 | h3 { 222 | font-weight: bold; 223 | font-size: 18px; } 224 | 225 | h4 { 226 | font-size: 0.875em; } 227 | blockquote p { 228 | margin: 0; 229 | } 230 | strong { 231 | font-weight: bold; 232 | } 233 | em { 234 | font-style: italic; 235 | } 236 | /*-------------------------------------------------------------- 237 | Links 238 | --------------------------------------------------------------*/ 239 | a { 240 | color: $color-text; 241 | text-decoration: none; 242 | } 243 | a:visited { 244 | color: $color-text; 245 | } 246 | a:active, 247 | a:focus, 248 | a:hover { 249 | color: $color-text; 250 | opacity: 0.8; 251 | } 252 | /*-------------------------------------------------------------- 253 | Grad 254 | --------------------------------------------------------------*/ 255 | .row { 256 | width: 100%; 257 | display: block; 258 | box-sizing: border-box; 259 | &:after { 260 | content: ""; 261 | display: table; 262 | clear: both; 263 | } 264 | } 265 | @for $i from 1 through 10 { 266 | .col-1-#{$i} { 267 | width: 100% / $i; 268 | float: left; 269 | padding: 0 15px; 270 | box-sizing: border-box; 271 | } 272 | } 273 | /*-------------------------------------------------------------- 274 | Common 275 | --------------------------------------------------------------*/ 276 | .show-force { 277 | display: block !important; 278 | } 279 | /*-------------------------------------------------------------- 280 | Content 281 | --------------------------------------------------------------*/ 282 | .site-content { 283 | min-height: calc(100% - 274px); 284 | } 285 | .content-area { 286 | padding-top: $header-height; 287 | } 288 | .error404 .content-area, 289 | .page .content-area { 290 | padding-top: 120px; 291 | } 292 | .odd { 293 | background: #f5f5f5; 294 | position: relative; 295 | } 296 | .even { 297 | background: white; 298 | position: relative; 299 | } 300 | .container { 301 | max-width: $container-width; 302 | margin: 0 auto; 303 | padding-left: 50px; 304 | padding-right: 50px; 305 | } 306 | .inside-wrapper { 307 | max-width: $inside-wrapper-width; 308 | margin: 0 auto; 309 | padding: 0 50px; 310 | } 311 | .attachment-post-thumbnail { 312 | margin: 0 auto 35px; 313 | transition: opacity 0.7s; 314 | display: block; 315 | &:hover { 316 | opacity: 0.7; 317 | } 318 | } 319 | .entry-title { 320 | font-family: -apple-system, BlinkMacSystemFont,"Helvetica Neue","PingFang-SC-Regular","STHeiti", "Helvetica","Arial","Verdana","sans-serif","Microsoft YaHei"; 321 | letter-spacing: 0.2em; 322 | color: #000; 323 | text-align: center; 324 | margin-bottom: 27px; 325 | font-weight: 700; 326 | font-size: 1.25em; 327 | a { 328 | color: #000; 329 | font-weight: 700; 330 | text-decoration: none; 331 | } 332 | &:after { 333 | content: ""; 334 | height: 2px; 335 | width: 50px; 336 | background: black; 337 | display: block; 338 | margin: 20px auto 0; 339 | } 340 | &:hover { 341 | opacity: 0.7; 342 | } 343 | } 344 | .home .entry-content { 345 | margin: 1.5em 0; 346 | p { 347 | text-align: center; 348 | } 349 | } 350 | .posted-on { 351 | text-align: center; 352 | font-family: -apple-system, BlinkMacSystemFont,"Helvetica Neue","PingFang-SC-Regular","STHeiti", "Helvetica","Arial","Verdana","sans-serif","Microsoft YaHei"; 353 | font-size: 0.688em; 354 | text-transform: uppercase; 355 | letter-spacing: 0.2em; 356 | } 357 | .tags-links { 358 | text-align: center; 359 | font-family: -apple-system, BlinkMacSystemFont,"Helvetica Neue","PingFang-SC-Regular","STHeiti", "Helvetica","Arial","Verdana","sans-serif","Microsoft YaHei"; 360 | font-size: 0.800em; 361 | font-style: normal; 362 | margin-bottom: 30px; 363 | a { 364 | margin: 0 5px; 365 | font-style: italic; 366 | } 367 | } 368 | .pager { 369 | padding: 1.5em 0; 370 | &:after { 371 | visibility: hidden; 372 | display: block; 373 | font-size: 0; 374 | content: " "; 375 | clear: both; 376 | height: 0; 377 | } 378 | &:hover { 379 | .meta-arraw { 380 | opacity: 0.8; 381 | } 382 | } 383 | .previous { 384 | float: right; 385 | text-align: right; 386 | width: 50%; 387 | } 388 | .next { 389 | float: left; 390 | width: 50%; 391 | } 392 | a { 393 | text-decoration: none; 394 | color: #3a3a3a; 395 | text-transform: uppercase; 396 | letter-spacing: 0.2em; 397 | font-family: -apple-system, BlinkMacSystemFont,"Helvetica Neue","PingFang-SC-Regular","STHeiti", "Helvetica","Arial","Verdana","sans-serif","Microsoft YaHei"; 398 | font-size: 0.750em; 399 | } 400 | } 401 | .meta-arraw { 402 | width: 10px; 403 | height: 17px; 404 | background: url("../images/arrow-left.svg") no-repeat; 405 | display: inline-block; 406 | margin-bottom: -4px; 407 | margin-right: 5px; 408 | opacity: 0.3; 409 | transition: opacity 0.5s ease; 410 | } 411 | .meta-arraw-left { 412 | background: url("../images/arrow-left.svg") no-repeat; 413 | } 414 | .meta-arraw-right { 415 | background: url("../images/arrow-right.svg") no-repeat; 416 | } 417 | /*-------------------------------------------------------------- 418 | Comment 419 | --------------------------------------------------------------*/ 420 | #comment { 421 | margin-top: 70px; 422 | } 423 | 424 | /*-------------------------------------------------------------- 425 | Footer 426 | --------------------------------------------------------------*/ 427 | .footer-widgets { 428 | font-size: 0.750em; 429 | z-index: 2; 430 | position: relative; 431 | background: #fff; 432 | border-top: 1px solid #dcdcdc; 433 | border-bottom: 1px solid #dcdcdc; 434 | padding-top: 50px; 435 | padding-bottom: 40px; 436 | text-align: center; 437 | } 438 | .widget-title { 439 | text-transform: uppercase; 440 | letter-spacing: 0.2em; 441 | margin: 0 0 20px; 442 | text-align: center; 443 | } 444 | .widget-text { 445 | input[type="text"] { 446 | width: 200px; 447 | color: #111; 448 | border: 1px solid #E6E6E6; 449 | border-radius: 3px; 450 | padding: 3px; 451 | } 452 | input[type="submit"] { 453 | border: 1px solid; 454 | border-color: #ccc #ccc #bbb; 455 | border-radius: 3px; 456 | background: #e6e6e6; 457 | color: rgba(0, 0, 0, 0.8); 458 | cursor: pointer; 459 | -webkit-appearance: button; 460 | font-size: 0.8rem; 461 | line-height: 1; 462 | padding: 0.6em 1em 0.4em; 463 | } 464 | } 465 | .custom-widget-content { 466 | p { 467 | text-align: left; 468 | } 469 | ul { 470 | list-style: disc; 471 | display: inline-block; 472 | } 473 | } 474 | .icon { 475 | display: inline-block; 476 | width: $icon-size; 477 | height: $icon-size; 478 | background-repeat: no-repeat; 479 | background-size: 100%; 480 | text-indent: -999em; 481 | @each $social in github, weibo, mail, twitter { 482 | &.icon-#{$social} { 483 | background-image: url('../images/#{$social}.svg'); 484 | } 485 | } 486 | &:hover { 487 | opacity: 0.7; 488 | } 489 | } 490 | .site-info { 491 | text-align: center; 492 | font-size: 0.750em; 493 | padding-bottom: 20px; 494 | padding-top: 20px; 495 | color: #a2a2a2; 496 | .split { 497 | margin: 0 2px; 498 | } 499 | a { 500 | text-decoration: none; 501 | color: #666666; 502 | } 503 | } 504 | --------------------------------------------------------------------------------