├── .gitignore ├── LICENSE ├── README.md ├── _config.yml ├── languages ├── default.yml ├── pt-BR.yml ├── zh-CN.yml └── zh-TW.yml ├── layout ├── _partial │ ├── after_footer.ejs │ ├── archive.ejs │ ├── article.ejs │ ├── footer.ejs │ ├── head.ejs │ ├── index.ejs │ ├── index_pagination.ejs │ ├── navigation.ejs │ ├── post │ │ ├── analytics.ejs │ │ ├── bdshare.ejs │ │ ├── category.ejs │ │ ├── comment.ejs │ │ ├── comment_footer.ejs │ │ ├── entry.ejs │ │ ├── jiathis.ejs │ │ ├── meta.ejs │ │ ├── pagination.ejs │ │ ├── recommended_posts.ejs │ │ ├── share.ejs │ │ ├── slogan.ejs │ │ ├── tag.ejs │ │ ├── title.ejs │ │ └── title_top.ejs │ ├── search.ejs │ └── sidebar.ejs ├── _widget │ ├── category.ejs │ ├── links.ejs │ ├── recent_comments.ejs │ ├── recent_posts.ejs │ ├── rss.ejs │ ├── search.ejs │ └── tagcloud.ejs ├── archive.ejs ├── categories.ejs ├── index.ejs ├── layout.ejs ├── page.ejs ├── post.ejs └── tags.ejs ├── package.json └── source ├── css ├── comment.css ├── font-awesome.css ├── google-fonts.css ├── highlight-default.min.css ├── highlight.css ├── responsive.css ├── style.css └── themes │ ├── bootstrap.css │ ├── cerulean.css │ ├── common.css │ ├── cosmo.css │ ├── cyborg.css │ ├── darkly.css │ ├── default.css │ ├── flatly.css │ ├── journal.css │ ├── lumen.css │ ├── paper.css │ ├── readable.css │ ├── sandstone.css │ ├── simplex.css │ ├── slate.css │ ├── spacelab.css │ ├── superhero.css │ ├── united.css │ └── yeti.css ├── fancybox ├── blank.gif ├── fancybox_loading.gif ├── fancybox_loading@2x.gif ├── fancybox_overlay.png ├── fancybox_sprite.png ├── fancybox_sprite@2x.png ├── jquery.fancybox.css └── jquery.fancybox.pack.js ├── fonts ├── FontAwesome.otf ├── fontawesome-webfont.eot ├── fontawesome-webfont.svg ├── fontawesome-webfont.ttf ├── fontawesome-webfont.woff └── google-fonts │ ├── 0AKsP294HTD-nvJgucYTaIbN6UDyHWBl620a-IRfuBk.woff │ ├── 0XxGQsSc1g4rdRdjJKZrNBsxEYwM7FgeyaSgU71cLG0.woff │ ├── 2UX7WLTfW3W8TclTUvlFyQ.woff │ ├── LKf8nhXsWg5ybwEGXk8UBQ.woff │ ├── PIPMHY90P7jtyjpXuZ2cLD8E0i7KZn-EPnyo3HZu7kw.woff │ ├── UyYrYy3ltEffJV9QueSi4RdbPw3QSf9R-kE0EsQUn2A.woff │ ├── cj2hUnSRBhwmSPr9kS5899kZXW4sYc4BjuAIFc1SXII.woff │ └── lILlYDvubYemzYzN7GbLkHhCUOGz7vYGh680lGh-uXM.woff ├── img ├── github-sprite.png ├── glyphicons-halflings-white.png ├── glyphicons-halflings.png ├── grid-18px-masked.png └── grid-baseline-20px.png └── js ├── bootstrap.min.js ├── comment.js ├── gallery.js ├── highlight.min.js ├── jquery-2.0.3.min.js ├── jquery.imagesloaded.min.js ├── main.js ├── marked.js ├── search.js ├── spin.min.js └── timeago.min.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Joseph Pan 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Hexo-Theme-Freemind 2 | === 3 | 4 | ![screenshots](http://wzpan.github.io/hexo-theme-freemind-blog/images/screenshots.png) 5 | 6 | Freemind aims at fully taking advantages of Bootstrap. 7 | 8 | * [Demo](http://hahack.com/hexo-theme-freemind-blog/) 9 | * [Q&A](http://hahack.com/hexo-theme-freemind-blog/2014/03/16/qna/) 10 | * [Tag Plugins](http://hahack.com/hexo-theme-freemind-blog/2014/03/16/tag-plugins/) 11 | * [Color Themes](http://hahack.com/hexo-theme-freemind-blog/2016/01/30/color-themes/) 12 | * [Readme in Chinese](http://hahack.com/codes/hexo-theme-freemind/) 13 | 14 | ## Requirements ## 15 | 16 | * Hexo >= 3.0 17 | * [hexo-tag-bootstrap](https://github.com/wzpan/hexo-tag-bootstrap) >= 0.0.8 (optional) 18 | 19 | ## Features ## 20 | 21 | * **Bootstrap** - get the power of Twitter Bootstrap with minimal hassle; 22 | * **2 columns layout** - the most traditional and comfortable blog layout; 23 | * **Tag plugins** - luxuriant Bootstrap tag plugins, provided by my another project [hexo-tag-bootstrap](https://github.com/wzpan/hexo-tag-bootstrap). Including: 24 | - textcolor - a paragraph of text with specified color; 25 | - button - a button with target links, text and specified color; 26 | - label - a label with text and specified color; 27 | - badge - a badge with text; 28 | - alert - alert messages with text and specified color; 29 | * **Local Search Engine** - a built-in local search engine, with the help of my another project [hexo-generator-search](https://github.com/paichyperiondev/hexo-generator-search). 30 | * **Color Themes** - luxuriant Bootswatch color themes for choice; 31 | * **Pin to top** - able to pin any article to the top of the first index page; 32 | * **Built-in Comment System** - a comment system based on my another project [comment.js](https://github.com/wzpan/comment.js). 33 | 34 | ![color themes](http://wzpan.github.io/hexo-theme-freemind-blog/images/color-themes.gif) 35 | 36 | ## Install ## 37 | 38 | 1) install theme: 39 | 40 | ``` sh 41 | $ git clone https://github.com/wzpan/hexo-theme-freemind.git themes/freemind 42 | ``` 43 | 44 | 2) install [hexo-tag-bootstrap](https://github.com/wzpan/hexo-tag-bootstrap) (*optional*): 45 | 46 | ``` sh 47 | $ npm install hexo-tag-bootstrap --save 48 | ``` 49 | 50 | 3) install [hexo-generator-search](https://github.com/paichyperiondev/hexo-generator-search) (*optional*): 51 | 52 | ``` sh 53 | $ npm install hexo-generator-search --save 54 | ``` 55 | 56 | 4) install [hexo-recommended-posts](https://github.com/huiwang/hexo-recommended-posts) (*optional*): 57 | 58 | ``` sh 59 | $ npm install hexo-recommended-posts --save 60 | ``` 61 | 62 | 5) Create pages 63 | 64 | Freemind offers you the customized Categories, Tags and About pages. But you need to manually create these page at your 'source' folder. 65 | 66 | For example, to create a `Categories` page, you may create a `index.html` file at `source/categories/` folder with the following contents: 67 | 68 | ``` 69 | title: Categories 70 | layout: categories 71 | --- 72 | ``` 73 | 74 | Tags and About pages are created in a similar way, except that the layouts are `tags` and `page` respectively. 75 | 76 | Alternatively you can create About page using the following command: 77 | 78 | ``` sh 79 | $ hexo new page about 80 | ``` 81 | 82 | Note that only About page can be created in that way. 83 | 84 | ## Enable ## 85 | 86 | Modify `theme` setting in your `_config.yml` to `freemind`. 87 | 88 | ## Update ## 89 | 90 | ``` sh 91 | $ cd themes/freemind 92 | $ git pull 93 | ``` 94 | 95 | ## Configuration ## 96 | 97 | ``` 98 | slogan: Yet another bootstrap theme. 99 | 100 | theme: bootstrap 101 | inverse: true 102 | # whether to show h2 and h3 titles in excerpts 103 | show_title_in_excerpt: false 104 | 105 | menu: 106 | - title: Archives 107 | url: archives 108 | intro: All the articles. 109 | icon: fa fa-archive 110 | - title: Categories 111 | url: categories 112 | intro: All the categories. 113 | icon: fa fa-folder 114 | - title: Tags 115 | url: tags 116 | intro: All the tags. 117 | icon: fa fa-tags 118 | - title: About 119 | url: about 120 | intro: About me. 121 | icon: fa fa-user 122 | 123 | links: 124 | - title: My Github 125 | url: http://www.github.com/wzpan 126 | intro: My Github account. 127 | icon: fa fa-github 128 | - title: My LinkedIn 129 | url: http://www.linkedin.com/in/hahack 130 | intro: My Linkin account. 131 | icon: fa fa-linkedin 132 | 133 | widgets: 134 | - search 135 | - recent_comments 136 | - category 137 | - tagcloud 138 | - recent_posts 139 | - links 140 | #- rss # uncomment this to show an RSS button in the sidebar 141 | 142 | rss: atom.xml 143 | favicon: favicon.png 144 | fancybox: true 145 | duoshuo_shortname: 146 | 147 | # Recommended posts 148 | # Dependency: https://github.com/huiwang/hexo-recommended-posts 149 | recommended_posts: 150 | enabled: false 151 | 152 | # analytics 153 | google_analytics: 154 | enable: false 155 | siteid: 156 | baidu_tongji: 157 | enable: false 158 | siteid: 159 | 160 | # Search 161 | swiftype_key: 162 | 163 | # share button 164 | bdshare: true 165 | jiathis: false 166 | 167 | # built-in comment system 168 | comment_js: 169 | type: "github" 170 | user: "your-account" 171 | repo: "your-repo" 172 | client_id: "xxxxxx" 173 | client_secret: "xxxxxx" 174 | count: 5 175 | 176 | # If you prefer to use gitalk for comments, please uncomment the following, fill in the fields, and comment out the comment_js above. 177 | #comment_gitalk: 178 | # client_id: "" 179 | # client_secret: "" 180 | # repo: "" 181 | # user: "" 182 | ``` 183 | 184 | * **slogan** - slogan display at the index page 185 | * **theme** - which color theme to use 186 | * **inverse** - whether to use inverse navbar color 187 | * **menu** - Navigation menu 188 | * **links** - reference links at the links widget 189 | * **widgets** - Widgets displaying in sidebar 190 | * **rss** - RSS link 191 | * **fancybox** - Enable [Fancybox](http://fancyapps.com/fancybox/) 192 | * **duoshuo_shortname** - DuoShuo ID, if you prefer to use duoshuo instead of Disqus 193 | * **recommended_posts** - Enable recommended posts 194 | * **analytics** - Analytics ID. Supports both Google Analytics and Baidu Tongji. 195 | * **swiftype_key** - Swifttype key to enable local searching. Leave it blank or comment this line if you want to use build-in local search engine. 196 | * **bdshare** - Baidu share button at the bottom of article. 197 | * **jiathis** - jiathis share button at the bottom of article. 198 | * **comment_js** - settings for [comment.js](http://github.com/wzpan/comment.js). 199 | * `type`: the site as the backend. Currently supports Github and OSChina. 200 | * `user`: your site's user account. 201 | * `repo`: your repo for comment issue tracking. 202 | * `client_id`(optional but recommended): the client id of your OAuth App. 203 | * `client_secret`(optional but recommended): the client secret of your OAuth App. 204 | * `count`(optional): the maximize length of the comment list. Default value is 5. 205 | * **comment_gitalk** - settings for [Gitalk](https://github.com/gitalk/gitalk). Gitalk creates an issue for each page in a GitHub repo, and the visitor's comments are stored as comments to the issues. 206 | * `client_id`: the Client ID for GitHub Application. 207 | * `client_secret`: the Client Secret for GitHub Application. 208 | * `repo`: your GitHub repo to store comments. 209 | * `user`: the username of your GitHub account. 210 | 211 | 212 | If you prefer to use disqus, the setting of disqus should be placed at your **root** `_config.yml`: 213 | 214 | ``` 215 | # Disqus 216 | disqus_shortname: 217 | ``` 218 | 219 | ## Front-Matter ## 220 | 221 | There are some new front-matter settings in Freemind that you can use to decorate your articles. 222 | 223 | * **description** - a short description about the articles that will be display at the top of the post 224 | * **feature** - sets a feature image that will be show at the index page 225 | * **toc** - renders a table of contents 226 | * **top** - pin the article to top if it is set to `true` 227 | * **issue_id** - comment.js `issue_id` for explicitly point out which Github issue should be connect to your post. For most situations you don't need it unless the post doesn't link to the issue you want. 228 | 229 | For example: 230 | 231 | ``` 232 | title: Tag Plugins 233 | date: 2014-03-16 10:17:16 234 | tags: plugins 235 | categories: Docs 236 | description: Introduce tag plugins in freemind. 237 | feature: images/tag-plugins/plugins.jpg 238 | toc: true 239 | --- 240 | ``` 241 | 242 | ## License ## 243 | 244 | This theme is provided under [MIT License](http://opensource.org/licenses/MIT). 245 | 246 | ## People Using Freemind ## 247 | 248 | see [Examples](https://github.com/wzpan/freemind/wiki/Examples). 249 | 250 | ## Credits ## 251 | 252 | * The theme is built based on [Twitter-Bootstrap 3.1.1](getbootstrap.com/3.1.1/); 253 | * The beautiful icons are from [Font Awesome](http://fortawesome.github.io/Font-Awesome/icons/). 254 | * Build-in color themes are from [Bootswatch](bootswatch.com). 255 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | slogan: "Yet another bootstrap theme." 2 | 3 | theme: cerulean 4 | inverse: true 5 | # whether to show h2 and h3 titles in excerpts 6 | show_title_in_excerpt: false 7 | 8 | menu: 9 | - title: Archives 10 | url: archives 11 | intro: "All the articles." 12 | icon: "fa fa-archive" 13 | - title: Categories 14 | url: categories 15 | intro: "All the categories." 16 | icon: "fa fa-folder" 17 | - title: Tags 18 | url: tags 19 | intro: "All the tags." 20 | icon: "fa fa-tags" 21 | - title: About 22 | url: about 23 | intro: "About me." 24 | icon: "fa fa-user" 25 | 26 | links: 27 | - title: Freemind 28 | url: https://github.com/wzpan/freemind/ 29 | intro: "Freemind's Github repository." 30 | icon: "fa fa-github" 31 | - title: "My Github" 32 | url: http://www.github.com/wzpan 33 | intro: "My Github account." 34 | icon: "fa fa-github" 35 | - title: "My LinkedIn" 36 | url: http://www.linkedin.com/in/hahack 37 | intro: "My Linkin account." 38 | icon: "fa fa-linkedin" 39 | 40 | widgets: 41 | - search 42 | - recent_comments 43 | - category 44 | - tagcloud 45 | - recent_posts 46 | - links 47 | #- rss # uncomment this to show an RSS button in the sidebar 48 | 49 | rss: atom.xml 50 | fancybox: true 51 | favicon: favicon.png 52 | duoshuo_shortname: #freemindtheme 53 | 54 | # Recommended posts 55 | # Dependency: https://github.com/huiwang/hexo-recommended-posts 56 | recommended_posts: 57 | enabled: false 58 | 59 | # Analytics 60 | google_analytics: 61 | enable: false 62 | siteid: 63 | baidu_tongji: 64 | enable: false 65 | siteid: 66 | 67 | # search 68 | # swiftype_key: ZP2ZSuHgipSZfRyU8uTR 69 | 70 | # share widgets 71 | bdshare: true 72 | jiathis: false 73 | 74 | # built-in comment system 75 | comment_js: 76 | type: "github" 77 | user: "wzpan" 78 | repo: "hexo-theme-freemind-blog" 79 | client_id: "bf7d4ba11877db88543e" 80 | client_secret: "bff8a6b06b745c0bfcdccbe225623ea8e2a057bb" 81 | count: 5 82 | 83 | # If you want to use gitalk for comments, please uncomment the following, fill in the fields, and comment out the comment_js above. 84 | #comment_gitalk: 85 | # client_id: "" 86 | # client_secret: "" 87 | # repo: "" 88 | # user: "" 89 | -------------------------------------------------------------------------------- /languages/default.yml: -------------------------------------------------------------------------------- 1 | categories: Categories 2 | search: Search 3 | tags: Tags 4 | tagcloud: "Tag Cloud" 5 | tweets: Tweets 6 | prev: Prev 7 | next: Next 8 | comment: Comments 9 | archive_a: Archives 10 | archive_b: "Archives: %s" 11 | page: "Page %d" 12 | recent_posts: "Recent Posts" 13 | description: Description 14 | read_more: "Read More" 15 | links: Links 16 | top: Pin 17 | no_comment: "No comments yet. Press the button and go to comment now!" 18 | go_to_comment: "Go to comment" 19 | recent_comments: "Recent Comments" 20 | recommended_posts: "Recommended Posts" 21 | -------------------------------------------------------------------------------- /languages/pt-BR.yml: -------------------------------------------------------------------------------- 1 | categories: Categorias 2 | search: Busca 3 | tags: Tags 4 | tagcloud: "Tag Cloud" 5 | tweets: Tweets 6 | prev: Anterior 7 | next: "Próximo" 8 | comment: "Comentários" 9 | archive_a: Arquivos 10 | archive_b: "Arquivos: %s" 11 | page: "Página %d" 12 | recent_posts: "Posts recentes" 13 | description: "Descrição" 14 | read_more: "Leia Mais" 15 | links: Links 16 | top: "Início" 17 | 18 | -------------------------------------------------------------------------------- /languages/zh-CN.yml: -------------------------------------------------------------------------------- 1 | categories: 分类 2 | search: 搜索 3 | tags: 标签 4 | tagcloud: 标签云 5 | tweets: 推文 6 | prev: 上一页 7 | next: 下一页 8 | comment: 留言 9 | archive_a: 归档 10 | archive_b: "归档:%s" 11 | page: "第 %d 页" 12 | recent_posts: 最新文章 13 | description: 摘要 14 | read_more: 阅读此文 15 | links: 链接 16 | top: 置顶 17 | no_comment: "暂时还没有留言呢,点击下面的按钮去留言吧!" 18 | go_to_comment: "去留言" 19 | recent_comments: "最新留言" 20 | recommended_posts: "推荐文章" 21 | -------------------------------------------------------------------------------- /languages/zh-TW.yml: -------------------------------------------------------------------------------- 1 | categories: 分類 2 | search: 搜尋 3 | tags: 標籤 4 | tagcloud: 標籤雲 5 | tweets: 推文 6 | prev: 上一頁 7 | next: 下一頁 8 | comment: 留言 9 | archive_a: 彙整 10 | archive_b: "彙整:%s" 11 | page: "第 %d 頁" 12 | recent_posts: 最新文章 13 | description: 描述 14 | read_more: 閱讀本文 15 | links: 鏈接 16 | top: 置頂 17 | -------------------------------------------------------------------------------- /layout/_partial/after_footer.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | <% if (theme.fancybox){ %> 13 | 14 | 15 | 20 | <% } %> 21 | 22 | <% if (config.search) { %> 23 | 31 | <% } %> 32 | 33 | 34 | <% if (theme.comment_js) { %> 35 | 50 | <% } %> 51 | -------------------------------------------------------------------------------- /layout/_partial/archive.ejs: -------------------------------------------------------------------------------- 1 | <% 2 | var title = ''; 3 | var posts = site.posts; 4 | if (page.category) { 5 | title = page.category; 6 | posts = page.posts; 7 | } 8 | if (page.tag) { 9 | title = page.tag; 10 | posts = page.posts; 11 | } 12 | if (page.archive){ 13 | if (page.year) title = page.year + (page.month ? '/' + page.month : ''); 14 | else { 15 | title = __('archive_a'); 16 | posts = site.posts; 17 | } 18 | } 19 | var year, month; 20 | var last_year = 1970; 21 | var is_first_year = 1; 22 | %> 23 | 24 | 25 | 28 | 29 |
30 | 31 | <% if (theme.widgets.length) { %> 32 |
33 | <% } else { %> 34 |
35 | <% } %> 36 | 37 | 38 | 39 | <% if (page.category || page.tag) { %> 40 | 41 |
42 | <% page.posts.each(function(item){ %> 43 | <%- partial('post/title', {item: item, index: true}) %> 44 | <%- partial('post/entry', {item: item, index: true}) %> 45 | <% }); %> 46 |
47 |
48 |
49 | <%- partial('index_pagination') %> 50 |
51 |
52 | <% } else { %> 53 |
54 | <% posts.sort('date', -1).each(function(item){ %> 55 | <% 56 | year = item.date.toDate().getFullYear(); 57 | month = item.date.toDate().getMonth(); 58 | %> 59 | <% if (year != last_year){ %> 60 | <% if (!is_first_year) { %> 61 | 62 | <% } %> 63 | <% is_first_year = 0 %> 64 |

<%= year %>

65 | 82 |
83 | <% } %> 84 | 85 |
86 | 87 | <% if (theme.widgets.length) { %> 88 | <%- partial('sidebar') %> 89 | <% } %> 90 | 91 | -------------------------------------------------------------------------------- /layout/_partial/article.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('post/title', {item: item, index: false}) %> 2 | 3 | <% if (item.shadow ) { %> 4 | 11 | <% } %> 12 | 13 | 14 |
15 | 16 | <% if (post) { %> 17 |
18 |
19 | <% } else { %> 20 |
21 | <% } %> 22 | 23 | 24 |
25 | <% if (item.description) { %> 26 |
27 | <%- markdown(item.description) %> 28 |
29 | <% } %> 30 | 31 | <%- item.content %> 32 |
33 | 34 | 35 | <% if (post && theme.recommended_posts.enabled) { %> 36 | <%- partial('post/recommended_posts', {page: item, site: site}) %> 37 | <% } %> 38 | 39 |
40 |
41 | <%- partial('post/pagination', {page: item}) %> 42 |
43 |
44 | 45 | 46 | <% if (post) { %> 47 | <%- partial('post/bdshare', {page: item}) %> 48 | <%- partial('post/jiathis', {page: item}) %> 49 | <% } %> 50 | 51 | 52 | <%- partial('post/comment', {page: item}) %> 53 |
54 | 55 | <% if (post) { %> 56 |
57 | <%- partial('post/meta', {item: item}) %> 58 |
59 | <% } %> 60 | 61 |
62 | <%- partial('post/comment_footer', {page: item}) %> 63 | -------------------------------------------------------------------------------- /layout/_partial/footer.ejs: -------------------------------------------------------------------------------- 1 |

<% if (config.author){ %> 2 | © <%= new Date().getFullYear() %> <%= config.author %> 3 | <% } else { %> 4 | © <%= new Date().getFullYear() %> <%= config.title %> 5 | <% } %> 6 | with help from Hexo and Twitter Bootstrap. Theme by Freemind. 7 |

-------------------------------------------------------------------------------- /layout/_partial/head.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% 4 | var title = []; 5 | if (page.current > 1) title.push(__('page', page.current)); 6 | if (page.title) title.push(page.title); 7 | if (page.category) title.push(page.category); 8 | if (page.tag) title.push(page.tag); 9 | if (page.archive){ 10 | if (page.year) title.push(__('archive_b', page.year + (page.month ? '/' + page.month : ''))); 11 | else title.push(__('archive_a')); 12 | } 13 | title.push(config.title); 14 | %> 15 | <%= title.join(' | ') %> 16 | <% if (config.author){ %><% } %> 17 | <% if (page.description){ %> 18 | 19 | <% } else if (config.description){ %> 20 | 21 | <% } else if (page.excerpt){ %> 22 | 23 | <% } else if (page.content){ %> 24 | 25 | <% } %> 26 | <% if (page.keywords){ %><% } %> 27 | 28 | 29 | <% if (page.title){ %><% } %> 30 | 31 | 32 | <% if(page.cover) { %> 33 | 34 | <% } else { %> 35 | 36 | <% } %> 37 | 38 | <% if (theme.rss){ %> 39 | 40 | <% } %> 41 | <% if (theme.favicon){ %> 42 | 43 | <% } %> 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 59 | 60 | 61 | <% if (theme.comment_js) { %> 62 | 63 | 64 | 65 | 66 | 67 | <% } %> 68 | <% if (theme.comment_gitalk) { %> 69 | 70 | 71 | <% } %> 72 | 73 | <%- partial('post/analytics') %> 74 | 75 | 76 | -------------------------------------------------------------------------------- /layout/_partial/index.ejs: -------------------------------------------------------------------------------- 1 |
2 | 3 | <% if (theme.widgets.length) { %> 4 |
5 | <% } else { %> 6 |
7 | <% } %> 8 | 9 | <%- partial('post/slogan') %> 10 | 11 |
12 | 13 | 14 | 15 | <% if (page.current == 1) { %> 16 | <% site.posts.each(function(item){ %> 17 | <% if (item.top) { %> 18 | <%- partial('post/title_top', {item: item, index: index}) %> 19 | <%- partial('post/entry', {item: item, index: index}) %> 20 | <% } %> 21 | <% }); %> 22 | <% } %> 23 | 24 | <% page.posts.each(function(item){ %> 25 | <% if (!item.top) { %> 26 | <%- partial('post/title', {item: item, index: index}) %> 27 | <%- partial('post/entry', {item: item, index: index}) %> 28 | <% } %> 29 | <% }); %> 30 | 31 |
32 | 33 | 34 |
35 |
36 | <%- partial('index_pagination') %> 37 |
38 |
39 | 40 | 41 | 42 |
43 | 44 | <% if (theme.widgets.length) { %> 45 | <%- partial('sidebar') %> 46 | <% } %> 47 | 48 |
49 | -------------------------------------------------------------------------------- /layout/_partial/index_pagination.ejs: -------------------------------------------------------------------------------- 1 | 20 | -------------------------------------------------------------------------------- /layout/_partial/navigation.ejs: -------------------------------------------------------------------------------- 1 | 23 |
24 | -------------------------------------------------------------------------------- /layout/_partial/post/analytics.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.google_analytics.enable){ %> 2 | 10 | <% } %> 11 | 12 | <% if (theme.baidu_tongji.enable){ %> 13 | 22 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/post/bdshare.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.bdshare){ %> 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 17 | <% } %> 18 | -------------------------------------------------------------------------------- /layout/_partial/post/category.ejs: -------------------------------------------------------------------------------- 1 | <% 2 | var cats = []; 3 | item.categories.forEach(function(cat){ 4 | cats.push('
  • ' + cat.name + '' + cat.length + '
  • '); 5 | }); 6 | %> 7 |
  • 8 | <%- cats.join(' ') %> 9 |
  • 10 | -------------------------------------------------------------------------------- /layout/_partial/post/comment.ejs: -------------------------------------------------------------------------------- 1 | <% if (page.comment){ %> 2 |
    3 |

    <%= __('comment') %>

    4 | <% if (theme.comment_js) { %> 5 |
    6 |
    7 | 24 | <% } else if(theme.duoshuo_shortname) { %> 25 |
    26 | <% } else if(config.disqus_shortname) { %> 27 |
    28 | 29 |
    30 | <% } else if(theme.comment_gitalk) { %> 31 |
    32 | 45 | <% } %> 46 |
    47 | <% } %> 48 | -------------------------------------------------------------------------------- /layout/_partial/post/comment_footer.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.duoshuo_shortname) { %> 2 | 13 | <% } else if (config.disqus_shortname){ %> 14 | 24 | <% } %> 25 | -------------------------------------------------------------------------------- /layout/_partial/post/entry.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.show_title_in_excerpt) { %> 2 |
    3 | <% } else { %> 4 |
    5 | <% } %> 6 |
    7 | <% if (item.feature ) { %> 8 | <% if (config.post_asset_folder){ %> 9 |
    <%= item.title %> 10 | <% } else { %> 11 |
    <%= item.title %> 12 | <% } %> 13 |
    14 | <% } %> 15 | <% if (item.excerpt && index) { %> 16 | <%- item.excerpt %> 17 | <% } else { %> 18 | <%- item.content %> 19 | <% } %> 20 |
    21 | <%= __('read_more') %> 22 |
    23 | -------------------------------------------------------------------------------- /layout/_partial/post/jiathis.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.jiathis){ %> 2 | 3 |
    4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
    14 | 15 | 16 |
    17 | <% } %> 18 | -------------------------------------------------------------------------------- /layout/_partial/post/meta.ejs: -------------------------------------------------------------------------------- 1 |
    2 | 3 | 4 | <% if (item.date) { %> 5 |
    6 | 7 | <%= item.date.format(config.date_format) %> 8 |
    9 | <% } %> 10 | 11 | 12 | <% if (item.categories && item.categories.length ) { %> 13 |
    14 | 15 |
      16 | <%- partial('category') %> 17 |
    18 |
    19 | <% } %> 20 | 21 | 22 | <% if(item.tags && item.tags.length ){ %> 23 |
    24 | 25 |
      26 | <%- partial('tag') %> 27 |
    28 |
    29 | <% } %> 30 | 31 | 32 |
    33 | <% if(item.toc){ %> 34 | 35 |
    36 | <%- toc(item.content, {class: "toc-article", list_number:false}) %> 37 |
    38 | <% } %> 39 |
    40 | 41 |
    42 | 43 |
    44 | -------------------------------------------------------------------------------- /layout/_partial/post/pagination.ejs: -------------------------------------------------------------------------------- 1 | 20 | -------------------------------------------------------------------------------- /layout/_partial/post/recommended_posts.ejs: -------------------------------------------------------------------------------- 1 | <% var post_list = recommended_posts(page, site) %> 2 | <% if(post_list.length > 0) { %> 3 | 11 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/post/share.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.addthis.enable){ %> 2 |
    3 | <% if (theme.addthis.facebook){ %> 4 | 5 | <% } %> 6 | <% if (theme.addthis.twitter){ %> 7 | 8 | <% } %> 9 | <% if (theme.addthis.google){ %> 10 | 11 | <% } %> 12 | <% if (theme.addthis.pinterest){ %> 13 | 14 | <% } %> 15 | 16 |
    17 | 18 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/post/slogan.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.slogan) { %> 2 |
    3 | 4 | <%= theme.slogan %> 5 |
    6 | <% } %> 7 | -------------------------------------------------------------------------------- /layout/_partial/post/tag.ejs: -------------------------------------------------------------------------------- 1 | <% 2 | var tags = []; 3 | item.tags.forEach(function(tag){ 4 | tags.push('
  • ' + tag.name + '' + tag.length + '
  • '); 5 | }); 6 | %> 7 | <%- tags.join(' ') %> 8 | -------------------------------------------------------------------------------- /layout/_partial/post/title.ejs: -------------------------------------------------------------------------------- 1 | <% if (item.link) { %> 2 | <% if (item.title){ %> 3 |

    <%= item.title %>

    4 | <% } else { %> 5 |

    <%= item.link %>

    6 | <% } %> 7 | <% } else { %> 8 | <% if (index) { %> 9 | 10 |

    11 |
    <%= item.date.format(config.date_format) %>
    12 |
    title="<%= item.description %>"<% } %>><%= item.title %>
    13 |

    14 | <% } else { %> 15 | 18 | <% } %> 19 | <% } %> 20 | -------------------------------------------------------------------------------- /layout/_partial/post/title_top.ejs: -------------------------------------------------------------------------------- 1 | <% if (item.link) { %> 2 | <% if (item.title){ %> 3 |

    <%= item.title %>

    4 | <% } else { %> 5 |

    <%= item.link %>

    6 | <% } %> 7 | <% } else { %> 8 | <% if (index) { %> 9 | 10 |

    11 |
    <%= item.date.format(config.date_format) %>
    12 |
    title="<%= item.description %>"<% } %> class="article-title-text"><%= item.title %><%= __('top') %>
    13 |

    14 | <% } else { %> 15 | 18 | <% } %> 19 | <% } %> 20 | -------------------------------------------------------------------------------- /layout/_partial/search.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.swiftype_key) { %> 2 | 10 | <% } %> 11 | 12 | -------------------------------------------------------------------------------- /layout/_partial/sidebar.ejs: -------------------------------------------------------------------------------- 1 |
    2 | 7 |
    8 | -------------------------------------------------------------------------------- /layout/_widget/category.ejs: -------------------------------------------------------------------------------- 1 | <% if (site.categories.length){ %> 2 |
    3 |

    <%= __('categories') %>

    4 | 9 |
    10 | <% } %> -------------------------------------------------------------------------------- /layout/_widget/links.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.links.length){ %> 2 |
    3 |

    <%= __('links') %>

    4 | 9 |
    10 | <% } %> 11 | -------------------------------------------------------------------------------- /layout/_widget/recent_comments.ejs: -------------------------------------------------------------------------------- 1 |
    2 | <% if(theme.comment_js) { %> 3 |

    <%= __('recent_comments') %>

    4 |
    5 | 16 | <% } %> 17 |
    18 | -------------------------------------------------------------------------------- /layout/_widget/recent_posts.ejs: -------------------------------------------------------------------------------- 1 | <% if (site.posts.length){ %> 2 |
    3 |

    <%= __('recent_posts') %>

    4 | 11 |
    12 | <% } %> -------------------------------------------------------------------------------- /layout/_widget/rss.ejs: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | RSS 4 |
    5 |
    6 | -------------------------------------------------------------------------------- /layout/_widget/search.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.swiftype_key) { %> 2 | 7 | <% } else { %> 8 | 14 | <% } %> 15 | -------------------------------------------------------------------------------- /layout/_widget/tagcloud.ejs: -------------------------------------------------------------------------------- 1 | <% if (site.tags.length){ %> 2 |
    3 |

    <%= __('tagcloud') %>

    4 | 12 |
    13 | <% } %> 14 | -------------------------------------------------------------------------------- /layout/archive.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/archive') %> -------------------------------------------------------------------------------- /layout/categories.ejs: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 |
    7 | 8 | <% if (theme.widgets.length) { %> 9 |
    10 | <% } else { %> 11 |
    12 | <% } %> 13 | 14 | 15 | 16 | <% if (site.categories.length) { %> 17 |
    18 | 23 |
    24 | 25 |
    26 | <% site.categories.sort('name').each(function(item){ %> 27 |

    <%= item.name %>

    28 | 36 | <% }); %> 37 | 38 |
    39 | <% } %> 40 | 41 |
    42 | 43 | <% if (theme.widgets.length) { %> 44 | <%- partial('_partial/sidebar') %> 45 | <% } %> 46 | 47 |
    48 | -------------------------------------------------------------------------------- /layout/index.ejs: -------------------------------------------------------------------------------- 1 | 4 | 5 | <%- partial('_partial/index', {index: true}) %> 6 | -------------------------------------------------------------------------------- /layout/layout.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%- partial('_partial/head') %> 4 | 5 | <%- partial('_partial/navigation') %> 6 |
    7 |
    8 | <%- body %> 9 |
    10 |
    11 |
    12 |
    <%- partial('_partial/footer') %>
    13 |
    14 | <%- partial('_partial/search') %> 15 | <%- partial('_partial/after_footer') %> 16 | 17 | -------------------------------------------------------------------------------- /layout/page.ejs: -------------------------------------------------------------------------------- 1 | <% if (!page.hasOwnProperty('comment')) { page.comment = false; } %> 2 | 3 | <%- partial('_partial/article', {item: page, post: false}) %> 4 | -------------------------------------------------------------------------------- /layout/post.ejs: -------------------------------------------------------------------------------- 1 | <% if (!page.hasOwnProperty('comment')) { page.comment = true; } %> 2 | 3 | <%- partial('_partial/article', {item: page, post: true}) %> 4 | -------------------------------------------------------------------------------- /layout/tags.ejs: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 |
    7 | 8 | <% if (theme.widgets.length) { %> 9 |
    10 | <% } else { %> 11 |
    12 | <% } %> 13 | 14 | 15 | 16 | <% if (site.tags.length){ %> 17 |
    18 | 23 |
    24 | 25 |
    26 | <% site.tags.sort('name').each(function(item){ %> 27 | 28 |

    <%= item.name %>

    29 | 41 | <% }); %> 42 | 43 |
    44 | 45 | <% } %> 46 | 47 |
    48 | 49 | <% if (theme.widgets.length) { %> 50 | <%- partial('_partial/sidebar') %> 51 | <% } %> 52 | 53 |
    54 | -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /source/css/comment.css: -------------------------------------------------------------------------------- 1 | .discussion-timeline { 2 | position: relative; 3 | float: left; 4 | width: 100%; 5 | /*background-color: #fff;*/ 6 | border-bottom: 2px solid #e6ebf1; 7 | margin-bottom: 14px; 8 | } 9 | 10 | .discussion-timeline::before { 11 | position: absolute; 12 | top: 0; 13 | bottom: 0; 14 | left: 79px; 15 | display: block; 16 | width: 2px; 17 | content: ""; 18 | background-color: #e6ebf1; 19 | } 20 | 21 | .timeline-comment.current-user { 22 | border-color: #c0d3eb; 23 | } 24 | 25 | 26 | .timeline-comment.current-user .timeline-comment-header { 27 | background-color: #f1f8ff; 28 | border-bottom-color: #c0d3eb; 29 | } 30 | 31 | .timeline-comment { 32 | position: relative; 33 | background-color: #fff; 34 | border: 1px solid #d1d5da; 35 | border-radius: 3px; 36 | } 37 | 38 | 39 | .timeline-comment-wrapper:first-child { 40 | margin-top: 0; 41 | } 42 | 43 | .timeline-comment-wrapper { 44 | position: relative; 45 | padding-left: 60px; 46 | margin-top: 15px; 47 | margin-bottom: 15px; 48 | /*border-top: 2px solid #fff;*/ 49 | /*border-bottom: 2px solid #fff;*/ 50 | } 51 | 52 | .timeline-comment-wrapper .timeline-comment.current-user::before { 53 | border-width: 8px; 54 | border-right-color: #c0d3eb; 55 | } 56 | 57 | .timeline-comment-wrapper .timeline-comment.current-user::after { 58 | margin-top: 1px; 59 | margin-left: 2px; 60 | border-width: 7px; 61 | border-right-color: #f1f8ff; 62 | } 63 | 64 | .timeline-comment-wrapper .timeline-comment.current-user::after, .timeline-comment-wrapper .timeline-comment.current-user::before { 65 | position: absolute; 66 | top: 11px; 67 | right: 100%; 68 | left: -16px; 69 | display: block; 70 | width: 0; 71 | height: 0; 72 | pointer-events: none; 73 | content: " "; 74 | border-color: transparent; 75 | border-style: solid solid outset; 76 | } 77 | 78 | .timeline-comment-wrapper>.timeline-comment::before, .timeline-new-comment .timeline-comment::before { 79 | border-width: 8px; 80 | border-right-color: #d1d5da; 81 | } 82 | 83 | .timeline-comment-wrapper>.timeline-comment::after, .timeline-new-comment .timeline-comment::after { 84 | margin-top: 1px; 85 | margin-left: 2px; 86 | border-width: 7px; 87 | border-right-color: #f6f8fa; 88 | } 89 | 90 | .timeline-comment-wrapper>.timeline-comment::after, .timeline-comment-wrapper>.timeline-comment::before, .timeline-new-comment .timeline-comment::after, .timeline-new-comment .timeline-comment::before { 91 | position: absolute; 92 | top: 11px; 93 | right: 100%; 94 | left: -16px; 95 | display: block; 96 | width: 0; 97 | height: 0; 98 | pointer-events: none; 99 | content: " "; 100 | border-color: transparent; 101 | border-style: solid solid outset; 102 | } 103 | 104 | .timeline-comment-avatar { 105 | float: left; 106 | margin-left: -60px; 107 | border-radius: 3px!important; 108 | } 109 | 110 | .avatar { 111 | margin-top: 0px; 112 | display: inline-block; 113 | overflow: hidden; 114 | line-height: 1; 115 | vertical-align: middle; 116 | border-radius: 3px; 117 | } 118 | 119 | .avatar-parent-child { 120 | position: relative; 121 | } 122 | 123 | .rounded-1 { 124 | border-radius: 3px !important; 125 | } 126 | 127 | .timeline-comment-header { 128 | padding-right: 15px; 129 | padding-left: 15px; 130 | color: #586069; 131 | background-color: #f6f8fa; 132 | border-bottom: 1px solid #d1d5da; 133 | border-top-left-radius: 3px; 134 | border-top-right-radius: 3px; 135 | line-height: 1em!important; 136 | } 137 | 138 | .timeline-comment-header h3 { 139 | margin-top: 0; 140 | margin-bottom: 0; 141 | color: #586069; 142 | line-height: 40px; 143 | } 144 | 145 | .timeline-comment-header a { 146 | color: #586069; 147 | } 148 | 149 | .timeline-comment-actions { 150 | float: right; 151 | margin-right: -5px; 152 | margin-left: 10px; 153 | } 154 | 155 | .timeline-comment-label { 156 | float: right; 157 | padding: 2px 5px; 158 | margin: 8px 0 0 10px; 159 | font-size: 12px; 160 | cursor: default; 161 | border: 1px solid rgba(27,31,35,0.1); 162 | border-radius: 3px; 163 | } 164 | 165 | .comment-widget-content a { 166 | word-wrap: break-word; 167 | } 168 | 169 | .comment-widget-content blockquote { 170 | margin-left: 30px; 171 | margin-bottom: 0; 172 | padding: 0 0; 173 | } 174 | 175 | .comment-widget-content blockquote p { 176 | margin-left: 10px!important; 177 | font-size: 1em; 178 | color: #555; 179 | } 180 | 181 | .timeline-comment-header-text { 182 | max-width: 78%; 183 | } 184 | 185 | .text-normal { 186 | font-weight: normal !important; 187 | } 188 | 189 | .f5 { 190 | font-size: 14px !important; 191 | } 192 | 193 | .tooltipped { 194 | position: relative; 195 | } 196 | 197 | .comment-body { 198 | width: 100%; 199 | padding: 15px; 200 | overflow: visible; 201 | font-size: 14px; 202 | } 203 | 204 | .markdown-body { 205 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; 206 | font-size: 16px; 207 | line-height: 1.5; 208 | word-wrap: break-word; 209 | } 210 | 211 | .d-block { 212 | display: block !important; 213 | border-bottom: 0px; 214 | } 215 | 216 | .markdown-body>*:last-child { 217 | margin-bottom: 0 !important; 218 | } 219 | 220 | .markdown-body>*:first-child { 221 | margin-top: 0 !important; 222 | } 223 | 224 | .markdown-body ul, .markdown-body ol { 225 | padding-left: 2em; 226 | } 227 | 228 | .markdown-body p, .markdown-body blockquote, .markdown-body ul, .markdown-body ol, .markdown-body dl, .markdown-body table, .markdown-body pre { 229 | margin-top: 0; 230 | margin-bottom: 16px; 231 | padding-right: 20px; 232 | } 233 | 234 | .reorderable-task-lists .markdown-body ol:not(.contains-task-list) li, .reorderable-task-lists .markdown-body ul:not(.contains-task-list) li { 235 | margin-left: 0; 236 | } 237 | 238 | .reorderable-task-lists .markdown-body li:not(.task-list-item) { 239 | margin-left: 26px; 240 | } 241 | 242 | .markdown-body li+li { 243 | margin-top: 0.25em; 244 | } 245 | 246 | .markdown-body img { 247 | max-width: 100%; 248 | box-sizing: content-box; 249 | /*background-color: #fff;*/ 250 | } 251 | 252 | .comment-count { 253 | color: #555; 254 | font-weight: bold; 255 | padding: 12px 0; 256 | } 257 | 258 | .no-comment { 259 | opacity: .6; 260 | line-height: 107px; 261 | text-align: center; 262 | } 263 | 264 | .discussion-item { 265 | position: relative; 266 | padding-left: 25px; 267 | margin: 15px 0 15px 79px; 268 | } 269 | 270 | .discussion-item-header:last-child { 271 | padding-bottom: 0; 272 | } 273 | 274 | .discussion-item-header { 275 | min-height: 30px; 276 | padding-top: 5px; 277 | padding-bottom: 5px; 278 | line-height: 20px; 279 | color: #586069; 280 | word-wrap: break-word; 281 | } 282 | 283 | .discussion-item-icon { 284 | float: left; 285 | width: 32px; 286 | height: 32px; 287 | margin-top: -7px; 288 | margin-left: -40px; 289 | line-height: 28px; 290 | color: #586069; 291 | text-align: center; 292 | background-color: #e6ebf1; 293 | /*border: 2px solid #fff;*/ 294 | border-radius: 50%; 295 | } 296 | 297 | .discussion-item-header .avatar { 298 | width: 16px; 299 | height: 16px; 300 | display: inline-block; 301 | overflow: hidden; 302 | line-height: 1; 303 | vertical-align: middle; 304 | border-radius: 3px; 305 | } 306 | 307 | .discussion-timeline-actions { 308 | /*background-color: #fff;*/ 309 | border-top: 2px solid #e6ebf1; 310 | height: 10px; 311 | } 312 | 313 | .goto-comment { 314 | margin-top: 10px; 315 | text-align: right; 316 | } 317 | 318 | #loading-spin { 319 | text-align: center; 320 | height: 100px; 321 | margin-left: auto; 322 | margin-right: auto; 323 | } 324 | 325 | #recent-comments .comment-widget-head { 326 | margin-left: -15px; 327 | margin-right: -15px; 328 | } 329 | 330 | #recent-comments .comment-widget-head::before { 331 | content: " "; 332 | display: table; 333 | } 334 | 335 | 336 | #recent-comments .comment-widget-head::after { 337 | content: " "; 338 | display: table; 339 | } 340 | 341 | #recent-comments .comment-widget-avatar { 342 | position: relative; 343 | min-height: 1px; 344 | padding-left: 15px; 345 | padding-right: 30px; 346 | float: left; 347 | } 348 | 349 | #recent-comments .comment-widget-avatar .avatar { 350 | margin-bottom: 5px; 351 | display: block; 352 | } 353 | 354 | #recent-comments .comment-widget-body { 355 | position: relative; 356 | top: -5px; 357 | left: -15px; 358 | } 359 | 360 | #recent-comments .comment-widget-user{ 361 | margin-top: 0px; 362 | } 363 | 364 | #recent-comments .comment-widget-content img{ 365 | display: none; 366 | } 367 | 368 | #recent-comments .comment-item p { 369 | margin: 0 0; 370 | } 371 | 372 | #recent-comments .comment-widget-content { 373 | font-size: 14px; 374 | } 375 | 376 | #recent-comments .comment-widget-content p{ 377 | margin-left: 30px; 378 | } 379 | 380 | #recent-comments .comment-widget-meta { 381 | position: relative; 382 | top: -25px; 383 | } 384 | 385 | #recent-comments .comment-widget-title { 386 | font-size: 12px; 387 | } 388 | 389 | #recent-comments .comment-widget-date { 390 | font-size: 12px; 391 | } 392 | 393 | .octicon { 394 | vertical-align: text-bottom; 395 | display: inline-block; 396 | vertical-align: text-top; 397 | fill: currentColor; 398 | } 399 | 400 | .discussion-item-icon { 401 | float: left; 402 | width: 32px; 403 | height: 32px; 404 | margin-top: -7px; 405 | margin-left: -40px; 406 | line-height: 28px; 407 | color: #586069; 408 | text-align: center; 409 | background-color: #e6ebf1; 410 | border: 2px solid #fff; 411 | border-radius: 50%; 412 | } 413 | -------------------------------------------------------------------------------- /source/css/google-fonts.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Droid Serif'; 3 | font-style: normal; 4 | font-weight: 400; 5 | src: local('Droid Serif'), local('DroidSerif'), url('../fonts/google-fonts/0AKsP294HTD-nvJgucYTaIbN6UDyHWBl620a-IRfuBk.woff') format('woff'); 6 | } 7 | @font-face { 8 | font-family: 'Droid Serif'; 9 | font-style: italic; 10 | font-weight: 400; 11 | src: local('Droid Serif Italic'), local('DroidSerif-Italic'), url('../fonts/google-fonts/cj2hUnSRBhwmSPr9kS5899kZXW4sYc4BjuAIFc1SXII.woff') format('woff'); 12 | } 13 | @font-face { 14 | font-family: 'PT Sans'; 15 | font-style: normal; 16 | font-weight: 400; 17 | src: local('PT Sans'), local('PTSans-Regular'), url('../fonts/google-fonts/LKf8nhXsWg5ybwEGXk8UBQ.woff') format('woff'); 18 | } 19 | @font-face { 20 | font-family: 'PT Sans'; 21 | font-style: normal; 22 | font-weight: 700; 23 | src: local('PT Sans Bold'), local('PTSans-Bold'), url('../fonts/google-fonts/0XxGQsSc1g4rdRdjJKZrNBsxEYwM7FgeyaSgU71cLG0.woff') format('woff'); 24 | } 25 | @font-face { 26 | font-family: 'PT Sans'; 27 | font-style: italic; 28 | font-weight: 400; 29 | src: local('PT Sans Italic'), local('PTSans-Italic'), url('../fonts/google-fonts/PIPMHY90P7jtyjpXuZ2cLD8E0i7KZn-EPnyo3HZu7kw.woff') format('woff'); 30 | } 31 | @font-face { 32 | font-family: 'PT Sans'; 33 | font-style: italic; 34 | font-weight: 700; 35 | src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url('../fonts/google-fonts/lILlYDvubYemzYzN7GbLkHhCUOGz7vYGh680lGh-uXM.woff') format('woff'); 36 | } 37 | @font-face { 38 | font-family: 'PT Sans Narrow'; 39 | font-style: normal; 40 | font-weight: 400; 41 | src: local('PT Sans Narrow'), local('PTSans-Narrow'), url('../fonts/google-fonts/UyYrYy3ltEffJV9QueSi4RdbPw3QSf9R-kE0EsQUn2A.woff') format('woff'); 42 | } 43 | @font-face { 44 | font-family: 'Roboto'; 45 | font-style: normal; 46 | font-weight: 400; 47 | src: local('Roboto Regular'), local('Roboto-Regular'), url('../fonts/google-fonts/2UX7WLTfW3W8TclTUvlFyQ.woff') format('woff'); 48 | } -------------------------------------------------------------------------------- /source/css/highlight-default.min.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:0.5em;background:#F0F0F0}.hljs,.hljs-subst{color:#444}.hljs-comment{color:#888888}.hljs-keyword,.hljs-attribute,.hljs-selector-tag,.hljs-meta-keyword,.hljs-doctag,.hljs-name{font-weight:bold}.hljs-type,.hljs-string,.hljs-number,.hljs-selector-id,.hljs-selector-class,.hljs-quote,.hljs-template-tag,.hljs-deletion{color:#880000}.hljs-title,.hljs-section{color:#880000;font-weight:bold}.hljs-regexp,.hljs-symbol,.hljs-variable,.hljs-template-variable,.hljs-link,.hljs-selector-attr,.hljs-selector-pseudo{color:#BC6060}.hljs-literal{color:#78A960}.hljs-built_in,.hljs-bullet,.hljs-code,.hljs-addition{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta-string{color:#4d99bf}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold} -------------------------------------------------------------------------------- /source/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Code, Pre [landscape](http://goo.gl/hnwXeD) */ 2 | 3 | /* highlight */ 4 | 5 | pre, .highlight { 6 | background: #333 !important; 7 | margin: 0.5em 0; 8 | padding: 1em 2%; 9 | overflow: auto; 10 | color: #ccc!important; 11 | font-size: 14px; 12 | text-shadow: none; 13 | -webkit-border-radius: 4px; 14 | -moz-border-radius: 4px; 15 | border-radius: 4px; 16 | border-style: solid; 17 | border-color: #ddd; 18 | border-width: 1px 0; 19 | line-height: 20px; 20 | } 21 | 22 | code { 23 | background: #eee; 24 | border: 1px solid #d6d6d6; 25 | padding: 0 5px; 26 | margin: 0 2px; 27 | font-size: 90%; 28 | text-shadow: 0 1px #fff; 29 | word-break: break-all; 30 | word-wrap: break-word; 31 | white-space: normal; 32 | } 33 | 34 | .highlight .gutter pre{ 35 | text-align: left; 36 | padding-right: 20px; 37 | width: 100%; 38 | color: #666; 39 | } 40 | 41 | pre, 42 | code { 43 | font-family: Menlo, "Bitstream Vera Sans Mono", "DejaVu Sans Mono", Monaco, Consolas, monospace; 44 | } 45 | 46 | pre code { 47 | background: none; 48 | text-shadow: none; 49 | padding: 0; 50 | } 51 | 52 | .highlight pre { 53 | border: none; 54 | margin: 0; 55 | padding: 0; 56 | white-space: pre; 57 | } 58 | 59 | .highlight table { 60 | margin: 0; 61 | width: auto; 62 | } 63 | 64 | .highlight td { 65 | border: none; 66 | padding: 0; 67 | } 68 | 69 | 70 | /* figcaption */ 71 | 72 | .highlight figcaption { 73 | zoom: 1; 74 | font-size: 0.85em; 75 | color: #999; 76 | line-height: 1em; 77 | margin-bottom: 1em; 78 | } 79 | .highlight figcaption:before, 80 | .highlight figcaption:after { 81 | content: ""; 82 | display: table; 83 | } 84 | .highlight figcaption:after { 85 | clear: both; 86 | } 87 | .highlight figcaption a { 88 | float: right; 89 | } 90 | 91 | pre .comment, 92 | pre .title { 93 | color: #999; 94 | } 95 | pre .variable, 96 | pre .attribute, 97 | pre .tag, 98 | pre .regexp, 99 | pre .ruby .constant, 100 | pre .xml .tag .title, 101 | pre .xml .pi, 102 | pre .xml .doctype, 103 | pre .html .doctype, 104 | pre .css .id, 105 | pre .css .class, 106 | pre .css .pseudo { 107 | color: #f2777a!important; 108 | } 109 | pre .number, 110 | pre .preprocessor, 111 | pre .built_in, 112 | pre .literal, 113 | pre .params, 114 | pre .constant { 115 | color: #f99157!important; 116 | } 117 | pre .class, 118 | pre .ruby .class .title, 119 | pre .css .rules .attribute { 120 | color: #9c9!important; 121 | } 122 | pre .string, 123 | pre .value, 124 | pre .inheritance, 125 | pre .header, 126 | pre .ruby .symbol, 127 | pre .xml .cdata { 128 | color: #9c9!important; 129 | } 130 | pre .css .hexcolor { 131 | color: #6cc!important; 132 | } 133 | pre .function, 134 | pre .python .decorator, 135 | pre .python .title, 136 | pre .ruby .function .title, 137 | pre .ruby .title .keyword, 138 | pre .perl .sub, 139 | pre .javascript .title, 140 | pre .coffeescript .title { 141 | color: #69c!important; 142 | } 143 | pre .keyword, 144 | pre .javascript .function { 145 | color: #c9c!important; 146 | } 147 | -------------------------------------------------------------------------------- /source/css/responsive.css: -------------------------------------------------------------------------------- 1 | /* Responsive 2 | -------------------------------------------------- */ 3 | 4 | /* Desktop large 5 | ------------------------- */ 6 | @media (min-width: 1200px) { 7 | .page .entry .thumbnail{ 8 | float: right; 9 | width: 300px; 10 | } 11 | } 12 | 13 | /* Desktop 14 | ------------------------- */ 15 | @media (min-width: 980px) and (max-width: 1199px) { 16 | .page .entry .thumbnail{ 17 | float: right; 18 | width: 31.623931623931625%; 19 | *width: 31.570740134569924%; 20 | } 21 | } 22 | 23 | /* Tablet to desktop 24 | ------------------------- */ 25 | @media (min-width: 768px) and (max-width: 979px) { 26 | .page .entry .thumbnail{ 27 | float: right; 28 | width: 200px; 29 | } 30 | } 31 | 32 | /* Tablet 33 | ------------------------- */ 34 | @media (min-width: 481px) and (max-width: 767px) { 35 | .page .entry .thumbnail{ 36 | float: right; 37 | width: 31.491712707182323%; 38 | *width: 31.43852121782062%; 39 | } 40 | } 41 | 42 | @media (max-width: 480px) { 43 | .page .entry .thumbnail{ 44 | margin-left: 0; 45 | } 46 | } -------------------------------------------------------------------------------- /source/css/style.css: -------------------------------------------------------------------------------- 1 | /* ============================================================================= 2 | container 3 | ========================================================================== */ 4 | 5 | .container-narrow { 6 | margin: 0 auto; 7 | max-width:970px; 8 | } 9 | 10 | .container-narrow > footer { 11 | margin-top: 20px; 12 | text-align: center; 13 | } 14 | .container-narrow > footer p { 15 | padding: 5px; 16 | display: inline-block; 17 | -webkit-border-radius: 6px; 18 | -moz-border-radius: 6px; 19 | border-radius: 6px; 20 | } 21 | 22 | /* ============================================================================= 23 | Body and structure 24 | ========================================================================== */ 25 | 26 | body { 27 | position: relative; 28 | padding-top: 40px; 29 | background-color: #fff; 30 | background-image: url(../img/grid-18px-masked.png); 31 | background-repeat: repeat-x; 32 | background-position: 0 40px; 33 | padding-bottom: 70px; 34 | } 35 | 36 | .content { 37 | padding: 20px; 38 | margin-left: -20px; /* negative indent the amount of the padding to maintain the grid system */ 39 | margin-right: -20px; /* negative indent the amount of the padding to maintain the grid system */ 40 | -webkit-border-radius: 6px 6px 6px 6px; 41 | -moz-border-radius: 6px 6px 6px 6px; 42 | border-radius: 6px 6px 6px 6px; 43 | -webkit-box-shadow: 0 2px 10px rgba(0,0,0,.75); 44 | -moz-box-shadow: 0 2px 102px rgba(0,0,0,.75); 45 | box-shadow: 0 2px 10px rgba(0,0,0,.75); 46 | } 47 | 48 | #sidebar { 49 | font-size: 0.9em; 50 | } 51 | 52 | a { 53 | word-break: break-word; 54 | } 55 | 56 | /* ============================================================================= 57 | page, post 58 | ========================================================================== */ 59 | 60 | .post{ 61 | font-size: 1.2em; 62 | } 63 | 64 | .page{ 65 | font-size: 16px; 66 | } 67 | 68 | .page, .post{ 69 | line-height: 1.5em; 70 | font-family: 'Open Sans',"Helvetica Neue", "Helvetica","Microsoft YaHei", "WenQuanYi Micro Hei",Arial, sans-serif; 71 | } 72 | 73 | .post .date { 74 | margin-bottom:20px; 75 | font-weight:bold; 76 | } 77 | 78 | .mypage { 79 | padding-bottom: 30px; 80 | border-bottom: 1px solid #ccc; 81 | } 82 | 83 | /* ============================================================================= 84 | navbar 85 | ========================================================================== */ 86 | 87 | .navbar-brand { 88 | text-shadow: 0 1px 0 rgba(255,255,255,.1), 0 0 30px rgba(255,255,255,.125); 89 | -webkit-transition: all .2s linear; 90 | -moz-transition: all .2s linear; 91 | transition: all .2s linear; 92 | } 93 | 94 | .navbar-brand:hover { 95 | text-decoration: none; 96 | text-shadow: 0 1px 0 rgba(255,255,255,.1), 0 0 30px rgba(255,255,255,.4); 97 | } 98 | 99 | 100 | /* ============================================================================= 101 | pagination 102 | ========================================================================== */ 103 | 104 | .pagination { 105 | margin: 10px 0; 106 | } 107 | 108 | .pagination a{ 109 | color:#555; 110 | } 111 | 112 | 113 | /* ============================================================================= 114 | List 115 | ========================================================================== */ 116 | 117 | li i { 118 | margin-right: 5px; 119 | margin-left: 5px; 120 | } 121 | 122 | .listing-item { 123 | line-height: 24px; 124 | } 125 | 126 | /* ============================================================================= 127 | widget and tag box 128 | ========================================================================== */ 129 | 130 | .meta-widget { 131 | margin: 10px 0; 132 | } 133 | 134 | .meta-widget a{ 135 | color:#555; 136 | } 137 | 138 | .tag_box { 139 | margin:0; 140 | overflow:hidden; 141 | } 142 | .tag_box li { 143 | line-height:28px; 144 | } 145 | .tag_box li i { 146 | opacity:0.9; 147 | } 148 | .tag_box.inline li { 149 | float:left; 150 | } 151 | .tag_box a { 152 | padding: 2px 6px; 153 | margin: 2px; 154 | background: #e5e5e5; 155 | color:#555; 156 | border-radius: 3px; 157 | text-decoration:none; 158 | border:1px dashed #bbb; 159 | } 160 | .tag_box a span{ 161 | vertical-align:super; 162 | font-size:0.8em; 163 | } 164 | .tag_box a:hover { 165 | background-color:#397bdd; 166 | color:#FFF; 167 | } 168 | .tag_box a.active { 169 | background:#57A957; 170 | border:1px solid #4C964D; 171 | color:#FFF; 172 | } 173 | 174 | .widget { 175 | padding-bottom: 25px; 176 | border-bottom: 1px solid #e0e0e0; 177 | } 178 | 179 | #local-search-result { 180 | scroll:auto; 181 | overflow:auto; 182 | max-height:3in; 183 | } 184 | 185 | ul.search-result-list { 186 | padding-left: 10px; 187 | } 188 | 189 | a.search-result-title { 190 | font-weight: bold; 191 | } 192 | 193 | p.search-result { 194 | color=#555; 195 | } 196 | 197 | em.search-keyword { 198 | border-bottom: 1px dashed #4088b8; 199 | font-weight: bold; 200 | } 201 | 202 | .tagcloud .entry{ 203 | width: 100%; 204 | } 205 | 206 | .archive-title:before { 207 | font-family: FontAwesome; 208 | content: '\f187 '; 209 | } 210 | 211 | .archive-title-tag:before { 212 | font-family: FontAwesome; 213 | content: '\f02c '; 214 | } 215 | 216 | .archive-title-category:before { 217 | font-family: FontAwesome; 218 | content: '\f07b '; 219 | } 220 | 221 | /* ============================================================================= 222 | hyper links 223 | ========================================================================== */ 224 | 225 | a.label-anchor { 226 | position: relative; 227 | display: block; 228 | text-align: right; 229 | width: 200px; 230 | left: -210px; 231 | font-family: 'PT Sans', sans-serif; 232 | } 233 | a.label-anchor:target span { 234 | background-color: #b94a48; 235 | } 236 | a.label-anchor:hover { 237 | text-decoration: none; 238 | } 239 | a.label-anchor span { 240 | font-weight: bold; 241 | line-height: 0px; 242 | color: #ffffff; 243 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); 244 | white-space: nowrap; 245 | background-color: #666; 246 | padding: 1px 4px 2px; 247 | -webkit-border-radius: 3px; 248 | -moz-border-radius: 3px; 249 | border-radius: 3px; 250 | } 251 | 252 | a.inline-ref { 253 | border-bottom: dotted 1px #333; 254 | color: black; 255 | } 256 | a.inline-ref:hover { 257 | text-decoration: none; 258 | border-bottom: solid 1px #000; 259 | } 260 | 261 | /* ============================================================================= 262 | blockquote 263 | ========================================================================== */ 264 | 265 | blockquote p, blockquote ol, blockquote ul, blockquote li, .slogan{ 266 | font-family: 'Open Sans',"Helvetica Neue", Helvetica, "Segoe UI", Ubuntu, "Hiragino Sans GB", '楷体', 'STKaiti'; 267 | } 268 | 269 | /* ============================================================================= 270 | img 271 | ========================================================================== */ 272 | 273 | img, video { 274 | max-width: 97.5%; 275 | margin: 15px auto; 276 | display: block; 277 | height: auto; 278 | } 279 | 280 | /* ============================================================================= 281 | slogan 282 | ========================================================================== */ 283 | 284 | .slogan .icon-heart{ 285 | opacity: 0.5; 286 | margin-right: 5px; 287 | margin-top: 3px; 288 | } 289 | 290 | .slogan .icon-heart:hover{ 291 | opacity: 1; 292 | } 293 | 294 | .slogan{ 295 | font-size: 1.2em; 296 | color: #888; 297 | display:block; 298 | margin-bottom: 1em; 299 | } 300 | 301 | /* ============================================================================= 302 | scroll to top 303 | ========================================================================== */ 304 | 305 | #gotop{ 306 | display:block; 307 | width:36px; 308 | height:36px; 309 | position:fixed; 310 | bottom:40px; 311 | right:30px; 312 | border-radius:7px; 313 | text-decoration:none; 314 | display:none; 315 | } 316 | #gotop span{ 317 | display:block; 318 | } 319 | #gotop span{ 320 | font-size:24px; 321 | text-align:center; 322 | } 323 | 324 | /* ============================================================================= 325 | Headers 326 | ========================================================================== */ 327 | 328 | header h1{ 329 | font-weight:normal; 330 | line-height:1.2em; 331 | margin-bottom:0.6667em; 332 | } 333 | 334 | h1{ 335 | font-size:2.6em; 336 | line-height:1.2em; 337 | margin-bottom:0.6667em; 338 | } 339 | 340 | h1,h2,h3,h4,h5,h6{ 341 | text-rendering:optimizelegibility; 342 | font-weight:bold; 343 | font-family: 'Open Sans', "Helvetica Neue", "Helvetica","Microsoft YaHei", "WenQuanYi Micro Hei",Arial, sans-serif; 344 | } 345 | 346 | h2{ 347 | margin: 0.83em 0; 348 | color: green; 349 | padding-top: 40px; 350 | margin-top: -25px; 351 | } 352 | 353 | h3 { 354 | color: #9C4C17; 355 | } 356 | 357 | h4 { 358 | color: #B94A48; 359 | } 360 | 361 | .page-header { 362 | -webkit-background-clip: border-box; 363 | -webkit-background-origin: padding-box; 364 | -webkit-background-size: cover; 365 | /* background-color: #f5f5f5; */ 366 | padding: 10px 20px 0px 20px; 367 | margin: -20px -20px 20px; 368 | border-bottom-left-radius: 0px; 369 | border-bottom-right-radius: 0px; 370 | border-top-left-radius: 6px; 371 | border-top-right-radius: 6px; 372 | } 373 | 374 | /* ============================================================================= 375 | entry 376 | ========================================================================== */ 377 | 378 | .page .entry, .page .entry-show-title{ 379 | padding-top: 10px 0; 380 | } 381 | 382 | .page .entry .row, .page .entry-show-title .row{ 383 | padding-left: 20px; 384 | padding-right: 5px; 385 | } 386 | 387 | .page .entry h2{ 388 | display:block; overflow: hidden; width: 0; height: 0; 389 | margin: -20px 0; 390 | } 391 | 392 | .page .entry h3{ 393 | display:block; overflow: hidden; width: 0; height: 0; 394 | } 395 | 396 | .page .entry .col-md-8, .page .entry-show-title .col-md-8{ 397 | margin: 10px 0; 398 | } 399 | 400 | .page .entry .thumbnail, .page .entry-show-title .thumbnail{ 401 | margin: 10px; 402 | } 403 | 404 | .page h3.title, .page h3.title-top { 405 | position:relative; 406 | padding: 2px 5px 5px 5px; 407 | font-size: 1.9em; 408 | font-weight: normal; 409 | font-family: 'PT Sans Narrow', '雅黑', '文泉驿微米黑', '黑体', sans-serif; 410 | } 411 | 412 | .page h3.title a, .page h3.title-top a { 413 | color: black; 414 | } 415 | 416 | .page h3.title div.article-title, .page h3.title-top div-article-title { 417 | width:80%; 418 | } 419 | 420 | .article-title-text{ 421 | padding-right: 6px; 422 | } 423 | 424 | .page h3.title div.date, .page h3.title-top div.date { 425 | /* position:absolute; */ 426 | /* right:5px; */ 427 | float: right; 428 | font-size:0.7em; 429 | color: #777; 430 | padding-top: 6px; 431 | } 432 | 433 | 434 | /* ============================================================================= 435 | Archives list 436 | ========================================================================== */ 437 | 438 | .archive-ul > .caret { 439 | vertical-align: 7px; 440 | margin-left: 5px; 441 | opacity: 0.3; 442 | } 443 | 444 | .archive-ul:hover > .caret { 445 | opacity: 1; 446 | } 447 | 448 | /* ============================================================================= 449 | ToC 450 | ========================================================================== */ 451 | 452 | .toc{ 453 | font-size:10pt; 454 | width:auto; 455 | padding:10px; 456 | background: #eee; 457 | border:solid 1px #ccc; 458 | } 459 | 460 | .toc .toc-title{ 461 | font-weight:bold; 462 | font-size:125% 463 | } 464 | 465 | .toc-article{ 466 | list-style:circle; 467 | line-height: 1em; 468 | margin-bottom: 0px; 469 | padding: 10px 20px; 470 | } 471 | 472 | .toc-article li{ 473 | margin-left:5px !important; 474 | padding:0 !important 475 | } 476 | 477 | .toc-article ol{ 478 | list-style:square; 479 | padding: 5px 20px; 480 | } 481 | 482 | .toc-article ol ol{ 483 | list-style:circle; 484 | padding: 5px 20px; 485 | } 486 | 487 | /* ============================================================================= 488 | Codes 489 | ========================================================================== */ 490 | 491 | .line{ 492 | height: 20px; 493 | } 494 | 495 | pre code{ 496 | border: none!important; 497 | } 498 | 499 | .comment-widget-content pre { 500 | margin-left: 30px; 501 | } 502 | 503 | /* ============================================================================= 504 | Tables 505 | ========================================================================== */ 506 | 507 | table { 508 | border-collapse: separate; 509 | border-spacing: 0; 510 | vertical-align: middle; 511 | } 512 | 513 | th { 514 | padding: 12px 10px 12px 10px; 515 | border-bottom: 1px dashed #4088b8; 516 | } 517 | 518 | td { 519 | padding: 7px 10px 7px 10px; 520 | text-align: left; 521 | font-weight: normal; 522 | vertical-align: middle; 523 | } 524 | 525 | /** 526 | * 527 | * For modern browsers 528 | * 1. The space content is one way to avoid an Opera bug when the 529 | * contenteditable attribute is included anywhere else in the document. 530 | * Otherwise it causes space to appear at the top and bottom of elements 531 | * that are clearfixed. 532 | * 2. The use of `table` rather than `block` is only necessary if using 533 | * `:before` to contain the top-margins of child elements. 534 | */ 535 | .cf:before, 536 | .cf:after { 537 | content: ""; /* 1 */ 538 | display: table; /* 2 */ 539 | } 540 | 541 | .cf:after { 542 | clear: both; 543 | } 544 | 545 | /** 546 | * For IE 6/7 only 547 | * Include this rule to trigger hasLayout and contain floats. 548 | */ 549 | .cf { 550 | *zoom: 1; 551 | } 552 | 553 | /* RSS button */ 554 | .rsspart { 555 | background: #2ca6cb; 556 | width: 100%; 557 | } 558 | @media only screen and (min-width: 768px) { 559 | .rsspart { 560 | float: left; 561 | width: 45%; 562 | margin: 0 5% 0 0; 563 | } 564 | } 565 | @media only screen and (min-width: 1024px) { 566 | .rsspart { 567 | width: 100%; 568 | float: none; 569 | margin: 1em 0 0; 570 | } 571 | } 572 | .rsspart a { 573 | color: #fff; 574 | display: block; 575 | padding: 0.625em 0; 576 | text-align: center; 577 | text-decoration: none; 578 | } 579 | .rsspart a:hover { 580 | color: #2ca6cb; 581 | background: #fafafa; 582 | } 583 | .rsspart a::before { 584 | font-family: "FontAwesome"; 585 | -webkit-font-smoothing: antialiased; 586 | -moz-osx-font-smoothing: grayscale; 587 | padding-right: 0.5em; 588 | content: "\f09e"; 589 | } 590 | -------------------------------------------------------------------------------- /source/css/themes/common.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/css/themes/common.css -------------------------------------------------------------------------------- /source/css/themes/default.css: -------------------------------------------------------------------------------- 1 | .page h3.title-top { 2 | background-color: #fbdedb; 3 | border-top: 3px solid #ef8b80; 4 | } 5 | -------------------------------------------------------------------------------- /source/fancybox/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/fancybox/blank.gif -------------------------------------------------------------------------------- /source/fancybox/fancybox_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/fancybox/fancybox_loading.gif -------------------------------------------------------------------------------- /source/fancybox/fancybox_loading@2x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/fancybox/fancybox_loading@2x.gif -------------------------------------------------------------------------------- /source/fancybox/fancybox_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/fancybox/fancybox_overlay.png -------------------------------------------------------------------------------- /source/fancybox/fancybox_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/fancybox/fancybox_sprite.png -------------------------------------------------------------------------------- /source/fancybox/fancybox_sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/fancybox/fancybox_sprite@2x.png -------------------------------------------------------------------------------- /source/fancybox/jquery.fancybox.css: -------------------------------------------------------------------------------- 1 | /*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ 2 | .fancybox-wrap, 3 | .fancybox-skin, 4 | .fancybox-outer, 5 | .fancybox-inner, 6 | .fancybox-image, 7 | .fancybox-wrap iframe, 8 | .fancybox-wrap object, 9 | .fancybox-nav, 10 | .fancybox-nav span, 11 | .fancybox-tmp 12 | { 13 | padding: 0; 14 | margin: 0; 15 | border: 0; 16 | outline: none; 17 | vertical-align: top; 18 | } 19 | 20 | .fancybox-wrap { 21 | position: absolute; 22 | top: 0; 23 | left: 0; 24 | z-index: 8020; 25 | } 26 | 27 | .fancybox-skin { 28 | position: relative; 29 | background: #f9f9f9; 30 | color: #444; 31 | text-shadow: none; 32 | -webkit-border-radius: 4px; 33 | -moz-border-radius: 4px; 34 | border-radius: 4px; 35 | } 36 | 37 | .fancybox-opened { 38 | z-index: 8030; 39 | } 40 | 41 | .fancybox-opened .fancybox-skin { 42 | -webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); 43 | -moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); 44 | box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); 45 | } 46 | 47 | .fancybox-outer, .fancybox-inner { 48 | position: relative; 49 | } 50 | 51 | .fancybox-inner { 52 | overflow: hidden; 53 | } 54 | 55 | .fancybox-type-iframe .fancybox-inner { 56 | -webkit-overflow-scrolling: touch; 57 | } 58 | 59 | .fancybox-error { 60 | color: #444; 61 | font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; 62 | margin: 0; 63 | padding: 15px; 64 | white-space: nowrap; 65 | } 66 | 67 | .fancybox-image, .fancybox-iframe { 68 | display: block; 69 | width: 100%; 70 | height: 100%; 71 | } 72 | 73 | .fancybox-image { 74 | max-width: 100%; 75 | max-height: 100%; 76 | } 77 | 78 | #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { 79 | background-image: url('fancybox_sprite.png'); 80 | } 81 | 82 | #fancybox-loading { 83 | position: fixed; 84 | top: 50%; 85 | left: 50%; 86 | margin-top: -22px; 87 | margin-left: -22px; 88 | background-position: 0 -108px; 89 | opacity: 0.8; 90 | cursor: pointer; 91 | z-index: 8060; 92 | } 93 | 94 | #fancybox-loading div { 95 | width: 44px; 96 | height: 44px; 97 | background: url('fancybox_loading.gif') center center no-repeat; 98 | } 99 | 100 | .fancybox-close { 101 | position: absolute; 102 | top: -18px; 103 | right: -18px; 104 | width: 36px; 105 | height: 36px; 106 | cursor: pointer; 107 | z-index: 8040; 108 | } 109 | 110 | .fancybox-nav { 111 | position: absolute; 112 | top: 0; 113 | width: 40%; 114 | height: 100%; 115 | cursor: pointer; 116 | text-decoration: none; 117 | background: transparent url('blank.gif'); /* helps IE */ 118 | -webkit-tap-highlight-color: rgba(0,0,0,0); 119 | z-index: 8040; 120 | } 121 | 122 | .fancybox-prev { 123 | left: 0; 124 | } 125 | 126 | .fancybox-next { 127 | right: 0; 128 | } 129 | 130 | .fancybox-nav span { 131 | position: absolute; 132 | top: 50%; 133 | width: 36px; 134 | height: 34px; 135 | margin-top: -18px; 136 | cursor: pointer; 137 | z-index: 8040; 138 | visibility: hidden; 139 | } 140 | 141 | .fancybox-prev span { 142 | left: 10px; 143 | background-position: 0 -36px; 144 | } 145 | 146 | .fancybox-next span { 147 | right: 10px; 148 | background-position: 0 -72px; 149 | } 150 | 151 | .fancybox-nav:hover span { 152 | visibility: visible; 153 | } 154 | 155 | .fancybox-tmp { 156 | position: absolute; 157 | top: -99999px; 158 | left: -99999px; 159 | visibility: hidden; 160 | max-width: 99999px; 161 | max-height: 99999px; 162 | overflow: visible !important; 163 | } 164 | 165 | /* Overlay helper */ 166 | 167 | .fancybox-lock { 168 | overflow: hidden !important; 169 | width: auto; 170 | } 171 | 172 | .fancybox-lock body { 173 | overflow: hidden !important; 174 | } 175 | 176 | .fancybox-lock-test { 177 | overflow-y: hidden !important; 178 | } 179 | 180 | .fancybox-overlay { 181 | position: absolute; 182 | top: 0; 183 | left: 0; 184 | overflow: hidden; 185 | display: none; 186 | z-index: 8010; 187 | background: url('fancybox_overlay.png'); 188 | } 189 | 190 | .fancybox-overlay-fixed { 191 | position: fixed; 192 | bottom: 0; 193 | right: 0; 194 | } 195 | 196 | .fancybox-lock .fancybox-overlay { 197 | overflow: auto; 198 | overflow-y: scroll; 199 | } 200 | 201 | /* Title helper */ 202 | 203 | .fancybox-title { 204 | visibility: hidden; 205 | font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; 206 | position: relative; 207 | text-shadow: none; 208 | z-index: 8050; 209 | } 210 | 211 | .fancybox-opened .fancybox-title { 212 | visibility: visible; 213 | } 214 | 215 | .fancybox-title-float-wrap { 216 | position: absolute; 217 | bottom: 0; 218 | right: 50%; 219 | margin-bottom: -35px; 220 | z-index: 8050; 221 | text-align: center; 222 | } 223 | 224 | .fancybox-title-float-wrap .child { 225 | display: inline-block; 226 | margin-right: -100%; 227 | padding: 2px 20px; 228 | background: transparent; /* Fallback for web browsers that doesn't support RGBa */ 229 | background: rgba(0, 0, 0, 0.8); 230 | -webkit-border-radius: 15px; 231 | -moz-border-radius: 15px; 232 | border-radius: 15px; 233 | text-shadow: 0 1px 2px #222; 234 | color: #FFF; 235 | font-weight: bold; 236 | line-height: 24px; 237 | white-space: nowrap; 238 | } 239 | 240 | .fancybox-title-outside-wrap { 241 | position: relative; 242 | margin-top: 10px; 243 | color: #fff; 244 | } 245 | 246 | .fancybox-title-inside-wrap { 247 | padding-top: 10px; 248 | } 249 | 250 | .fancybox-title-over-wrap { 251 | position: absolute; 252 | bottom: 0; 253 | left: 0; 254 | color: #fff; 255 | padding: 10px; 256 | background: #000; 257 | background: rgba(0, 0, 0, .8); 258 | } 259 | 260 | /*Retina graphics!*/ 261 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 262 | only screen and (min--moz-device-pixel-ratio: 1.5), 263 | only screen and (min-device-pixel-ratio: 1.5){ 264 | 265 | #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { 266 | background-image: url('fancybox_sprite@2x.png'); 267 | background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/ 268 | } 269 | 270 | #fancybox-loading div { 271 | background-image: url('fancybox_loading@2x.gif'); 272 | background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/ 273 | } 274 | } -------------------------------------------------------------------------------- /source/fancybox/jquery.fancybox.pack.js: -------------------------------------------------------------------------------- 1 | /*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ 2 | (function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0
    ',image:'',iframe:'",error:'

    The requested content cannot be loaded.
    Please try again later.

    ',closeBtn:'',next:'',prev:''},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0, 6 | openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1, 7 | isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k, 8 | c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&& 9 | k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current|| 10 | b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer= 11 | setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d= 13 | a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")), 14 | b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('
    ').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(), 15 | y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHeight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement; 16 | if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0, 18 | {},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1, 19 | mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio= 20 | !0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href"); 21 | "image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload= 22 | this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href); 23 | f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload, 24 | e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin, 25 | outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("
    ").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('
    ').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}", 26 | g);break;case "swf":e='',h="",f.each(a.swf,function(a,b){e+='';h+=" "+a+'="'+b+'"'}),e+='"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll": 27 | "no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside? 28 | h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth|| 29 | h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),cz||y>r)&&(c>m&&j>u)&&!(19n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&jz||y>r)&&c>m&&j>u;c=h.aspectRatio?cu&&j
    ').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive? 40 | b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth), 41 | p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"=== 42 | f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d= 43 | b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('
    '+e+"
    ");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner(''),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d, 44 | e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+ 45 | ":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('
    ').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('
    ').appendTo("body");var e=20=== 46 | d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("").appendTo("head")})})(window,document,jQuery); -------------------------------------------------------------------------------- /source/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /source/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /source/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /source/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /source/fonts/google-fonts/0AKsP294HTD-nvJgucYTaIbN6UDyHWBl620a-IRfuBk.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/fonts/google-fonts/0AKsP294HTD-nvJgucYTaIbN6UDyHWBl620a-IRfuBk.woff -------------------------------------------------------------------------------- /source/fonts/google-fonts/0XxGQsSc1g4rdRdjJKZrNBsxEYwM7FgeyaSgU71cLG0.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/fonts/google-fonts/0XxGQsSc1g4rdRdjJKZrNBsxEYwM7FgeyaSgU71cLG0.woff -------------------------------------------------------------------------------- /source/fonts/google-fonts/2UX7WLTfW3W8TclTUvlFyQ.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/fonts/google-fonts/2UX7WLTfW3W8TclTUvlFyQ.woff -------------------------------------------------------------------------------- /source/fonts/google-fonts/LKf8nhXsWg5ybwEGXk8UBQ.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/fonts/google-fonts/LKf8nhXsWg5ybwEGXk8UBQ.woff -------------------------------------------------------------------------------- /source/fonts/google-fonts/PIPMHY90P7jtyjpXuZ2cLD8E0i7KZn-EPnyo3HZu7kw.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/fonts/google-fonts/PIPMHY90P7jtyjpXuZ2cLD8E0i7KZn-EPnyo3HZu7kw.woff -------------------------------------------------------------------------------- /source/fonts/google-fonts/UyYrYy3ltEffJV9QueSi4RdbPw3QSf9R-kE0EsQUn2A.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/fonts/google-fonts/UyYrYy3ltEffJV9QueSi4RdbPw3QSf9R-kE0EsQUn2A.woff -------------------------------------------------------------------------------- /source/fonts/google-fonts/cj2hUnSRBhwmSPr9kS5899kZXW4sYc4BjuAIFc1SXII.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/fonts/google-fonts/cj2hUnSRBhwmSPr9kS5899kZXW4sYc4BjuAIFc1SXII.woff -------------------------------------------------------------------------------- /source/fonts/google-fonts/lILlYDvubYemzYzN7GbLkHhCUOGz7vYGh680lGh-uXM.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/fonts/google-fonts/lILlYDvubYemzYzN7GbLkHhCUOGz7vYGh680lGh-uXM.woff -------------------------------------------------------------------------------- /source/img/github-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/img/github-sprite.png -------------------------------------------------------------------------------- /source/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /source/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /source/img/grid-18px-masked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/img/grid-18px-masked.png -------------------------------------------------------------------------------- /source/img/grid-baseline-20px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzpan/hexo-theme-freemind/393457ce730f2f4cb0465da82d0fa032162dabbe/source/img/grid-baseline-20px.png -------------------------------------------------------------------------------- /source/js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.5 (http://getbootstrap.com) 3 | * Copyright 2011-2015 Twitter, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); -------------------------------------------------------------------------------- /source/js/comment.js: -------------------------------------------------------------------------------- 1 | // github issue comment 2 | // Copyright (C) 2017 3 | // Joseph Pan 4 | // This library is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU Lesser General Public License as 6 | // published by the Free Software Foundation; either version 2.1 of the 7 | // License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, but 10 | // WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 17 | // 02110-1301 USA 18 | // 19 | 20 | 'use strict'; 21 | 22 | var type, username, repo, client_id, client_secret, no_comment, go_to_comment, btn_class, comments_target, recent_comments_target, loading_target; 23 | var github_addr = "https://github.com/"; 24 | var github_api_addr = "https://api.github.com/repos/"; 25 | var oschina_addr = "http://git.oschina.net/"; 26 | var oschina_api_addr = "http://git.oschina.net/api/v5/repos/"; 27 | var spinOpts = { 28 | lines: 13, 29 | length: 10, 30 | width: 6, 31 | radius: 12, 32 | corners: 1, 33 | rotate: 0, 34 | direction: 1, 35 | color: '#5882FA', 36 | speed: 1, 37 | trail: 60, 38 | shadow: false, 39 | hwaccel: false, 40 | className: 'spinner', 41 | zIndex: 2e9, 42 | top: 'auto', 43 | left: '50%' 44 | }; 45 | 46 | var _getComment = function _getComment(params, callback) { 47 | var comments = void 0, 48 | comments_url = void 0, 49 | page = void 0; 50 | 51 | // Get comments 52 | comments = params.comments; 53 | comments_url = params.comments_url; 54 | page = params.page; 55 | $.ajax({ 56 | url: comments_url + '?page=' + page, 57 | dataType: 'json', 58 | cache: false, 59 | crossDomain: true, 60 | data: client_id && client_secret ? "client_id=" + client_id + "&client_secret=" + client_secret : '', 61 | success: function success(page_comments) { 62 | if (!page_comments || page_comments.length <= 0) { 63 | callback && typeof callback === "function" && callback(comments); 64 | callback = null; 65 | return; 66 | } 67 | page_comments.forEach(function (comment) { 68 | comments.push(comment); 69 | }); 70 | page += 1; 71 | params.comments = comments; 72 | params.page = page; 73 | _getComment(params, callback); 74 | }, 75 | error: function error(err) { 76 | callback && typeof callback === "function" && callback(comments); 77 | callback = null; 78 | } 79 | }); 80 | }; 81 | 82 | var _getCommentsUrl = function _getCommentsUrl(params, callback) { 83 | var issue_title = void 0, 84 | page = void 0; 85 | var found = false; 86 | issue_title = params.issue_title; 87 | page = params.page; 88 | 89 | var api_addr = type == 'github' ? github_api_addr : oschina_api_addr; 90 | $.ajax({ 91 | url: api_addr + username + '/' + repo + '/issues?page=' + page, 92 | dataType: 'json', 93 | cache: false, 94 | crossDomain: true, 95 | data: client_id && client_secret ? "client_id=" + client_id + "&client_secret=" + client_secret : '', 96 | success: function success(issues) { 97 | if (!issues || issues.length <= 0) { 98 | callback && typeof callback === "function" && callback("", ""); 99 | callback = null; 100 | return; 101 | } 102 | issues.forEach(function (issue) { 103 | // match title 104 | if (issue.title && issue.title == issue_title) { 105 | callback && typeof callback === "function" && callback(issue.comments_url, issue); 106 | found = true; 107 | callback = null; 108 | } 109 | }); 110 | if (!found) { 111 | page += 1; 112 | params.page = page; 113 | _getCommentsUrl(params, callback); 114 | } 115 | return; 116 | }, 117 | error: function error() { 118 | callback && typeof callback === "function" && callback("", ""); 119 | callback = null; 120 | } 121 | }); 122 | }; 123 | 124 | var _getIssue = function _getIssue(issue_id, callback) { 125 | var api_addr = type == 'github' ? github_api_addr : oschina_api_addr; 126 | var issue_url = api_addr + username + '/' + repo + '/issues/' + issue_id; 127 | _getIssueByUrl(issue_url, function (issue) { 128 | callback && typeof callback === "function" && callback(issue); 129 | callback = null; 130 | }); 131 | }; 132 | 133 | var _getIssueByUrl = function _getIssueByUrl(issue_url, callback) { 134 | $.ajax({ 135 | url: issue_url, 136 | dataType: 'json', 137 | cache: false, 138 | crossDomain: true, 139 | data: client_id && client_secret ? "client_id=" + client_id + "&client_secret=" + client_secret : '', 140 | success: function success(issues) { 141 | if (!issues || issues.length <= 0) { 142 | callback && typeof callback === "function" && callback(); 143 | callback = null; 144 | return; 145 | } 146 | var issue = issues; 147 | callback && typeof callback === "function" && callback(issue); 148 | callback = null; 149 | }, 150 | error: function error() { 151 | callback && typeof callback === "function" && callback(); 152 | callback = null; 153 | } 154 | }); 155 | }; 156 | 157 | var _renderComment = function _renderComment(comment) { 158 | var timeagoInstance = timeago(); 159 | var user = comment.user; 160 | var content = marked(comment.body); 161 | var ago = timeagoInstance.format(comment.created_at); 162 | var current_user = user.login == username ? "current-user" : ""; 163 | var addr = type == 'github' ? github_addr : oschina_addr; 164 | var owner = user.login == username ? "\n \n Owner\n \n " : ''; 165 | return "\n
    \n
    \n \n \"@"\n \n
    \n
    \n\n
    \n " + owner + "\n

    \n\n \n " + user.login + "\n \n \n\n commented \n\n " + ago + "\n\n

    \n
    \n \n \n \n \n \n \n \n
    \n " + content + "\n
    \n
    \n
    \n "; 166 | }; 167 | 168 | var _renderRecentComment = function _renderRecentComment(user, title, content, time, url, callback) { 169 | var addr = type == 'github' ? github_addr : oschina_addr; 170 | var res = "\n
    \n
    \n
    \n \n \"@"\n \n
    \n
    \n " + user.login + " \n
    " + content + "
    \n
    \n
    \n
    \n
    \n " + title + " | " + time + "\n
    \n
    \n "; 171 | callback && typeof callback === "function" && callback(res); 172 | callback = null; 173 | }; 174 | 175 | var _getRecentCommentList = function _getRecentCommentList(comment_list, i, render_count, total_count, comments, callback) { 176 | if (render_count >= total_count || i >= comments.length) { 177 | callback && typeof callback === "function" && callback(comment_list); 178 | callback = null; 179 | return; 180 | } 181 | var comment = comments[i]; 182 | if (!comment) return; 183 | var content = marked(comment.body); 184 | var title = comment.title; 185 | var user = comment.user; 186 | var timeagoInstance = timeago(); 187 | var time = timeagoInstance.format(comment.created_at); 188 | var url = comment.html_url; 189 | if (!content || content == '') { 190 | i++; 191 | _getRecentCommentList(comment_list, i, render_count, total_count, comments, callback); 192 | callback = null; 193 | return; 194 | } 195 | if (!title) { 196 | // Get title of issue 197 | _getIssueByUrl(comment.issue_url, function (issue) { 198 | _renderRecentComment(user, issue.title, content, time, url, function (item) { 199 | comment_list += item; 200 | i++; 201 | render_count++; 202 | _getRecentCommentList(comment_list, i, render_count, total_count, comments, callback); 203 | }); 204 | }); 205 | } else { 206 | _renderRecentComment(user, title, content, time, url, function (item) { 207 | comment_list += item; 208 | i++; 209 | render_count++; 210 | _getRecentCommentList(comment_list, i, render_count, total_count, comments, callback); 211 | }); 212 | } 213 | }; 214 | 215 | var _renderRecentCommentList = function _renderRecentCommentList(comments, count) { 216 | var i = 0; 217 | var render_count = 0; 218 | var comment_list = ''; 219 | _getRecentCommentList(comment_list, i, render_count, count, comments, function (comment_list) { 220 | $(recent_comments_target).append(comment_list); 221 | }); 222 | }; 223 | 224 | var _renderHTML = function _renderHTML(params) { 225 | var type = void 0, 226 | issue = void 0, 227 | comments = void 0, 228 | comments_url = void 0, 229 | issue_title = void 0; 230 | type = params.type; 231 | issue = params.issue; 232 | comments = params.comments; 233 | comments_url = params.comments_url; 234 | issue_title = params.issue_title; 235 | var site = type == 'oschina' ? 'OSChina issue' : 'Github issue'; 236 | var footer = ` 237 |
    238 |

    239 | 240 | 241 | 242 | 243 | The above comments are provided by 244 | comment.js with the help of ${site}. 245 |

    246 |
    247 | `; 248 | var addr = type == 'github' ? github_addr : oschina_addr; 249 | var api_addr = type == 'github' ? github_api_addr : oschina_api_addr; 250 | if ((!issue || !issue.body || issue.body == "") && (!comments || comments.length <= 0)) { 251 | var _res = "\n
    \n " + no_comment + "\n
    \n "; 252 | $(comments_target).append(_res); 253 | } else { 254 | var _res2 = "\n
    \n
    \n "; 255 | if (issue && issue.body && issue.body != '') { 256 | _res2 += _renderComment(issue); 257 | } 258 | comments.forEach(function (comment) { 259 | _res2 += _renderComment(comment); 260 | }); 261 | _res2 += footer; 262 | _res2 += '
    '; 263 | $(comments_target).append(_res2); 264 | } 265 | var issue_url = void 0; 266 | if (!comments_url) { 267 | issue_url = addr + "/" + username + "/" + repo + "/issues/new?title=" + issue_title + "#issue_body"; 268 | } else { 269 | issue_url = comments_url.replace(api_addr, addr).replace('comments', '') + '#new_comment_field'; 270 | } 271 | var res = "\n

    \n " + go_to_comment + "\n

    \n "; 272 | $(comments_target).append(res); 273 | }; 274 | 275 | var CompareDate = function CompareDate(a, b) { 276 | var d1 = a['created_at'].replace('T', ' ').replace('Z', '').replace(/-/g, "\/"); 277 | var d2 = b['created_at'].replace('T', ' ').replace('Z', '').replace(/-/g, "\/"); 278 | return new Date(d1) > new Date(d2); 279 | }; 280 | 281 | var _getRecentIssues = function _getRecentIssues(params, callback) { 282 | var count = void 0; 283 | count = params.count; 284 | 285 | var api_addr = type == 'github' ? github_api_addr : oschina_api_addr; 286 | $.ajax({ 287 | url: api_addr + username + '/' + repo + '/issues?per_page=100&sort=created&direction=desc', 288 | dataType: 'json', 289 | cache: false, 290 | crossDomain: true, 291 | data: client_id && client_secret ? "client_id=" + client_id + "&client_secret=" + client_secret : '', 292 | success: function success(issues) { 293 | if (issues.length > count) { 294 | if (navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Edge") != -1 || !!document.documentMode == true) { 295 | issues = issues.sort(CompareDate).slice(0, 5); 296 | } else { 297 | issues = issues.sort(CompareDate).reverse().slice(0, 5); 298 | } 299 | } 300 | callback && typeof callback === "function" && callback(issues); 301 | callback = null; 302 | }, 303 | error: function error(err) { 304 | callback && typeof callback === "function" && callback(); 305 | callback = null; 306 | } 307 | }); 308 | }; 309 | 310 | var _getRecentComments = function _getRecentComments(params, callback) { 311 | var count = void 0; 312 | count = params.count; 313 | 314 | var api_addr = type == 'github' ? github_api_addr : oschina_api_addr; 315 | $.ajax({ 316 | url: api_addr + username + '/' + repo + '/issues/comments?per_page=100&sort=created&direction=desc', 317 | dataType: 'json', 318 | cache: false, 319 | crossDomain: true, 320 | data: client_id && client_secret ? "client_id=" + client_id + "&client_secret=" + client_secret : '', 321 | success: function success(comments) { 322 | if (comments.length > count) { 323 | if (navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Edge") != -1 || !!document.documentMode == true) { 324 | comments = comments.sort(CompareDate).slice(0, 5); 325 | } else { 326 | comments = comments.sort(CompareDate).reverse().slice(0, 5); 327 | } 328 | } 329 | 330 | callback && typeof callback === "function" && callback(comments); 331 | callback = null; 332 | }, 333 | error: function error(err) { 334 | callback && typeof callback === "function" && callback(); 335 | callback = null; 336 | } 337 | }); 338 | }; 339 | 340 | var getRecentCommentsList = function getRecentCommentsList(params) { 341 | var count = void 0, 342 | user = void 0; 343 | type = params.type; 344 | user = params.user; 345 | repo = params.repo; 346 | client_id = params.client_id; 347 | client_secret = params.client_secret; 348 | count = params.count; 349 | recent_comments_target = params.recent_comments_target; 350 | 351 | username = user; 352 | recent_comments_target = recent_comments_target ? recent_comments_target : '#recent-comments'; 353 | var recentList = new Array(); 354 | // Get recent issues and comments and filter out 10 newest comments 355 | _getRecentIssues(params, function (issues) { 356 | recentList = recentList.concat(issues); 357 | _getRecentComments(params, function (comments) { 358 | recentList = recentList.concat(comments); 359 | if (navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Edge") != -1 || !!document.documentMode == true) { 360 | recentList = recentList.sort(CompareDate); 361 | } else { 362 | recentList = recentList.sort(CompareDate).reverse(); 363 | } 364 | _renderRecentCommentList(recentList, count); 365 | }); 366 | }); 367 | }; 368 | 369 | var getComments = function getComments(params) { 370 | var issue_title = void 0, 371 | issue_id = void 0, 372 | user = void 0; 373 | type = params.type; 374 | user = params.user; 375 | repo = params.repo; 376 | client_id = params.client_id; 377 | client_secret = params.client_secret; 378 | no_comment = params.no_comment; 379 | go_to_comment = params.go_to_comment; 380 | issue_title = params.issue_title; 381 | issue_id = params.issue_id; 382 | btn_class = params.btn_class; 383 | comments_target = params.comments_target; 384 | loading_target = params.loading_target; 385 | 386 | comments_target = comments_target ? comments_target : '#comment-thread'; 387 | username = user; 388 | var spinner = new Spinner(spinOpts); 389 | var timeagoInstance = timeago(); 390 | var comments_url; 391 | var comments = new Array(); 392 | type = type ? type : 'github'; 393 | btn_class = btn_class ? btn_class : 'btn'; 394 | 395 | loading_target && spinner.spin($("div" + loading_target).get(0)); 396 | if (!issue_id || issue_id == 'undefined' || typeof issue_id == 'undefined') { 397 | _getCommentsUrl({ issue_title: issue_title, 398 | page: 1 }, function (comments_url, issue) { 399 | if (comments_url != '' && comments_url != undefined) { 400 | _getComment({ comments: comments, 401 | comments_url: comments_url, 402 | page: 1 }, function (comments) { 403 | loading_target && spinner.spin(); 404 | _renderHTML({ 405 | type: type, 406 | issue: issue, 407 | comments: comments, 408 | comments_url: comments_url, 409 | issue_title: issue_title 410 | }); 411 | return; 412 | }); 413 | } else { 414 | loading_target && spinner.spin(); 415 | _renderHTML({ 416 | type: type, 417 | issue: issue, 418 | comments: comments, 419 | comments_url: comments_url, 420 | issue_title: issue_title 421 | }); 422 | return; 423 | } 424 | }); 425 | } else { 426 | var api_addr = type == 'github' ? github_api_addr : oschina_api_addr; 427 | var _comments_url = api_addr + username + '/' + repo + '/issues/' + issue_id + '/comments'; 428 | _getIssue(issue_id, function (issue) { 429 | _getComment({ comments: comments, 430 | comments_url: _comments_url, 431 | page: 1 }, function (comments) { 432 | loading_target && spinner.spin(); 433 | _renderHTML({ 434 | type: type, 435 | issue: issue, 436 | comments: comments, 437 | comments_url: _comments_url, 438 | issue_title: issue_title 439 | }); 440 | loading_target && spinner.spin(); 441 | return; 442 | }); 443 | }); 444 | } 445 | }; 446 | -------------------------------------------------------------------------------- /source/js/gallery.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | // Caption 3 | $('.content').each(function(i){ 4 | $(this).find('img').each(function(){ 5 | if (!$(this).hasClass('nofancybox')){ 6 | var alt = this.alt; 7 | if (alt){ 8 | $(this).wrap(''); 9 | } else { 10 | $(this).wrap(''); 11 | } 12 | } 13 | }); 14 | }); 15 | 16 | // Gallery 17 | var play = function(parent, item, callback){ 18 | var width = parent.width(); 19 | 20 | item.imagesLoaded(function(){ 21 | var _this = this[0], 22 | nWidth = _this.naturalWidth, 23 | nHeight = _this.naturalHeight; 24 | 25 | callback(); 26 | this.animate({opacity: 1}, 500); 27 | parent.animate({height: width * nHeight / nWidth}, 500); 28 | }); 29 | }; 30 | 31 | $('.gallery').each(function(){ 32 | var $this = $(this), 33 | current = 0, 34 | photoset = $this.children('.photoset').children(), 35 | all = photoset.length, 36 | loading = true; 37 | 38 | play($this, photoset.eq(0), function(){ 39 | loading = false; 40 | }); 41 | 42 | $this.on('click', '.prev', function(){ 43 | if (!loading){ 44 | var next = (current - 1) % all; 45 | loading = true; 46 | 47 | play($this, photoset.eq(next), function(){ 48 | photoset.eq(current).animate({opacity: 0}, 500); 49 | loading = false; 50 | current = next; 51 | }); 52 | } 53 | }).on('click', '.next', function(){ 54 | if (!loading){ 55 | var next = (current + 1) % all; 56 | loading = true; 57 | 58 | play($this, photoset.eq(next), function(){ 59 | photoset.eq(current).animate({opacity: 0}, 500); 60 | loading = false; 61 | current = next; 62 | }); 63 | } 64 | }); 65 | }); 66 | })(jQuery); 67 | -------------------------------------------------------------------------------- /source/js/jquery.imagesloaded.min.js: -------------------------------------------------------------------------------- 1 | (function(d,b){var a="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";d.fn.imagesLoaded=function(t){function l(){var e=d(q),f=d(r);v&&(r.length?v.reject(u,e,f):v.resolve(u));d.isFunction(t)&&t.call(s,u,e,f)}function p(e,f){e.src===a||-1!==d.inArray(e,n)||(n.push(e),f?r.push(e):q.push(e),d.data(e,"imagesLoaded",{isBroken:f,src:e.src}),c&&v.notifyWith(d(e),[f,u,d(q),d(r)]),u.length===n.length&&(setTimeout(l),u.unbind(".imagesLoaded")))}var s=this,v=d.isFunction(d.Deferred)?d.Deferred():0,c=d.isFunction(v.notify),u=s.find("img").add(s.filter("img")),n=[],q=[],r=[];d.isPlainObject(t)&&d.each(t,function(e,f){if("callback"===e){t=f}else{if(v){v[e](f)}}});u.length?u.bind("load.imagesLoaded error.imagesLoaded",function(e){p(e.target,"error"===e.type)}).each(function(f,g){var i=g.src,h=d.data(g,"imagesLoaded");if(h&&h.src===i){p(g,h.isBroken)}else{if(g.complete&&g.naturalWidth!==b){p(g,0===g.naturalWidth||0===g.naturalHeight)}else{if(g.readyState||g.complete){g.src=a,g.src=i}}}}):l();return v?v.promise(s):s}})(jQuery); -------------------------------------------------------------------------------- /source/js/main.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | $(window).scroll(function(){ //只要窗口滚动,就触发下面代码 3 | var scrollt = document.documentElement.scrollTop + document.body.scrollTop; //获取滚动后的高度 4 | if(scrollt>200){ //判断滚动后高度超过200px 5 | $("#gotop").fadeIn(400); //淡出 6 | if($(window).width() >= 1200){ 7 | $(".navbar").stop().fadeTo(400, 0.2); 8 | } 9 | }else{ 10 | $("#gotop").fadeOut(400); //如果返回或者没有超过,就淡入.必须加上stop()停止之前动画,否则会出现闪动 11 | if($(window).width() >= 1200){ 12 | $(".navbar").stop().fadeTo(400, 1); 13 | } 14 | } 15 | }); 16 | $("#gotop").click(function(){ //当点击标签的时候,使用animate在200毫秒的时间内,滚到顶部 17 | $("html,body").animate({scrollTop:"0px"},200); 18 | }); 19 | $(".navbar").mouseenter(function(){ 20 | $(".navbar").fadeTo(100, 1); 21 | }); 22 | $(".navbar").mouseleave(function(){ 23 | var scrollt = document.documentElement.scrollTop + document.body.scrollTop; 24 | if (scrollt>200) { 25 | $(".navbar").fadeTo(100, 0.2); 26 | } 27 | }); 28 | 29 | replaceMeta(); 30 | 31 | $(window).resize(function(){ 32 | replaceMeta(); 33 | }); 34 | }); 35 | 36 | replaceMeta = function(){ 37 | if ($(window).width() < 980) { 38 | if ($("#side_meta #post_meta").length>0) { 39 | $("#post_meta").appendTo("#top_meta"); 40 | } 41 | if ($("#sidebar #site_search").length>0) { 42 | $("#site_search").appendTo("#top_search"); 43 | $("#site_search #st-search-input").css("width", "95%"); 44 | } 45 | } else { 46 | if ($("#top_meta #post_meta").length>0) { 47 | $("#post_meta").appendTo("#side_meta"); 48 | } 49 | if ($("#top_search #site_search").length>0) { 50 | $("#site_search").prependTo("#sidebar"); 51 | $("#site_search #st-search-input").css("width", "85%"); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /source/js/search.js: -------------------------------------------------------------------------------- 1 | // A local search script with the help of [hexo-generator-search](https://github.com/PaicHyperionDev/hexo-generator-search) 2 | // Copyright (C) 2015 3 | // Joseph Pan 4 | // Shuhao Mao 5 | // This library is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as 7 | // published by the Free Software Foundation; either version 2.1 of the 8 | // License, or (at your option) any later version. 9 | // 10 | // This library is distributed in the hope that it will be useful, but 11 | // WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | // Lesser General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public 16 | // License along with this library; if not, write to the Free Software 17 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 18 | // 02110-1301 USA 19 | // 20 | 21 | var searchFunc = function(path, search_id, content_id) { 22 | 'use strict'; 23 | $.ajax({ 24 | url: path, 25 | dataType: "xml", 26 | success: function( xmlResponse ) { 27 | // get the contents from search data 28 | var datas = $( "entry", xmlResponse ).map(function() { 29 | return { 30 | title: $( "title", this ).text(), 31 | content: $("content",this).text(), 32 | url: $( "url" , this).text() 33 | }; 34 | }).get(); 35 | 36 | var $input = document.getElementById(search_id); 37 | if (!$input) return; 38 | var $resultContent = document.getElementById(content_id); 39 | if ($("#local-search-input").length > 0) { 40 | $input.addEventListener('input', function () { 41 | var str = '"; 116 | $resultContent.innerHTML = str; 117 | }); 118 | } 119 | } 120 | }); 121 | } 122 | -------------------------------------------------------------------------------- /source/js/spin.min.js: -------------------------------------------------------------------------------- 1 | // http://spin.js.org/#v2.3.2 2 | !function(a,b){"object"==typeof module&&module.exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return m[e]||(k.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",k.cssRules.length),m[e]=1),e}function d(a,b){var c,d,e=a.style;if(b=b.charAt(0).toUpperCase()+b.slice(1),void 0!==e[b])return b;for(d=0;d',c)}k.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.scale*d.width,left:d.scale*d.radius,top:-d.scale*d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.scale*(d.length+d.width),k=2*d.scale*j,l=-(d.width+d.length)*d.scale*2+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k=p[o]&&o(0===o?9:1)&&(o+=1),l[n](t,o,a)[i].replace("%s",t)}function r(e,n){return((n=n?t(n):new Date)-t(e))/1e3}function o(t){for(var e=1,n=0,r=Math.abs(t);t>=p[n]&&n1&&(n+="s"),[t+" "+n+" ago","in "+t+" "+n]},zh_CN:function(t,e){if(0===e)return["刚刚","片刻后"];var n=s[parseInt(e/2)];return[t+n+"前",t+n+"后"]}},p=[60,60,24,7,365/7/12,12],h=6,m="data-tid",w={};return c.prototype.doRender=function(t,e,i){var a,c=r(e,this.nowDate),d=this;t.innerHTML=n(c,i,this.defaultLocale),w[a=setTimeout(function(){d.doRender(t,e,i),delete w[a]},Math.min(1e3*o(c),2147483647))]=0,u(t,a)},c.prototype.format=function(t,e){return n(r(t,this.nowDate),e,this.defaultLocale)},c.prototype.render=function(t,e){void 0===t.length&&(t=[t]);for(var n=0,r=t.length;n