20 | <%= theme.excerpt_link %> 21 |
22 | <% } %> 23 | <% } else { %> 24 | <% if (!index && post.toc){ %> 25 |├── .gitattributes
├── .gitignore
├── Gruntfile.js
├── LICENSE
├── README.md
├── _config.yml
├── languages
├── default.yml
├── fr-FR.yml
├── zh-CN.yml
└── zh-TW.yml
├── layout
├── _partial
│ ├── after-footer.ejs
│ ├── archive-post.ejs
│ ├── archive.ejs
│ ├── article.ejs
│ ├── block.ejs
│ ├── footer.ejs
│ ├── google-analytics.ejs
│ ├── head.ejs
│ ├── header.ejs
│ ├── mathjax.ejs
│ ├── mobile-nav.ejs
│ ├── post
│ │ ├── category.ejs
│ │ ├── date.ejs
│ │ ├── gallery.ejs
│ │ ├── nav.ejs
│ │ ├── tag.ejs
│ │ └── title.ejs
│ ├── sidebar.ejs
│ ├── swiftype.ejs
│ └── totop.ejs
├── _widget
│ ├── archive.ejs
│ ├── category.ejs
│ ├── links.ejs
│ ├── recent_posts.ejs
│ ├── tag.ejs
│ └── tagcloud.ejs
├── archive.ejs
├── category.ejs
├── index.ejs
├── layout.ejs
├── page.ejs
├── post.ejs
└── tag.ejs
├── package.json
├── scripts
└── fancybox.js
└── source
├── css
├── _extend.styl
├── _partial
│ ├── archive.styl
│ ├── article.styl
│ ├── comment.styl
│ ├── footer.styl
│ ├── header.styl
│ ├── highlight.styl
│ ├── mobile.styl
│ ├── sidebar-aside.styl
│ ├── sidebar-bottom.styl
│ ├── sidebar.styl
│ └── totop.styl
├── _util
│ ├── grid.styl
│ └── mixin.styl
├── _variables.styl
├── images
│ └── banner.jpg
└── style.styl
├── fancybox
├── blank.gif
├── fancybox_loading.gif
├── fancybox_loading@2x.gif
├── fancybox_overlay.png
├── fancybox_sprite.png
├── fancybox_sprite@2x.png
├── helpers
│ ├── fancybox_buttons.png
│ ├── jquery.fancybox-buttons.css
│ ├── jquery.fancybox-buttons.js
│ ├── jquery.fancybox-media.js
│ ├── jquery.fancybox-thumbs.css
│ └── jquery.fancybox-thumbs.js
├── jquery.fancybox.css
├── jquery.fancybox.js
└── jquery.fancybox.pack.js
├── img
├── black.png
└── white.png
└── js
└── script.js
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 | *.sln merge=union
7 | *.csproj merge=union
8 | *.vbproj merge=union
9 | *.fsproj merge=union
10 | *.dbproj merge=union
11 |
12 | # Standard to msysgit
13 | *.doc diff=astextplain
14 | *.DOC diff=astextplain
15 | *.docx diff=astextplain
16 | *.DOCX diff=astextplain
17 | *.dot diff=astextplain
18 | *.DOT diff=astextplain
19 | *.pdf diff=astextplain
20 | *.PDF diff=astextplain
21 | *.rtf diff=astextplain
22 | *.RTF diff=astextplain
23 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | Thumbs.db
3 | db.json
4 | debug.log
5 | node_modules/
6 | __MACOSX/
7 | public/
8 | .deploy/
9 | _SYNCAPP
10 | metadata.xml
11 | /.idea
12 | .editorconfig
13 |
--------------------------------------------------------------------------------
/Gruntfile.js:
--------------------------------------------------------------------------------
1 | module.exports = function(grunt){
2 | grunt.initConfig({
3 | gitclone: {
4 | fontawesome: {
5 | options: {
6 | repository: 'https://github.com/FortAwesome/Font-Awesome.git',
7 | directory: 'tmp/fontawesome'
8 | },
9 | },
10 | fancybox: {
11 | options: {
12 | repository: 'https://github.com/fancyapps/fancyBox.git',
13 | directory: 'tmp/fancybox'
14 | }
15 | }
16 | },
17 | copy: {
18 | fontawesome: {
19 | expand: true,
20 | cwd: 'tmp/fontawesome/fonts/',
21 | src: ['**'],
22 | dest: 'source/css/fonts/'
23 | },
24 | fancybox: {
25 | expand: true,
26 | cwd: 'tmp/fancybox/source/',
27 | src: ['**'],
28 | dest: 'source/fancybox/'
29 | }
30 | },
31 | _clean: {
32 | tmp: ['tmp'],
33 | fontawesome: ['source/css/fonts'],
34 | fancybox: ['source/fancybox']
35 | }
36 | });
37 |
38 | require('load-grunt-tasks')(grunt);
39 |
40 | grunt.renameTask('clean', '_clean');
41 |
42 | grunt.registerTask('fontawesome', ['gitclone:fontawesome', 'copy:fontawesome', '_clean:tmp']);
43 | grunt.registerTask('fancybox', ['gitclone:fancybox', 'copy:fancybox', '_clean:tmp']);
44 | grunt.registerTask('default', ['gitclone', 'copy', '_clean:tmp']);
45 | grunt.registerTask('clean', ['_clean']);
46 | };
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2016 Starsky Wong
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.
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Paperbox
2 |
3 | [**Demo**](https://sun11.me)
4 |
5 | 
6 |
7 | A theme modified based on [Landscape-plus](https://github.com/xiangming/landscape-plus) theme based on Landscape theme, with some papers and a paperbox. The motivation is for my personal use. Hexo version is 3.1.1, nodejs v4.2.6.
8 |
9 | ### Feature
10 |
11 | * **Paper-like Appearance** - Make you focus on the contents.
12 | * **Responsive Design** - min-width is 320px, ensure the normal display for iPhone 4-5s.
13 | * **Bug fixs** - fixed many bugs, including paginator in archive, share button, mobile nav, etc.
14 |
15 | ### Modifications on Landscape-plus
16 |
17 | * **Integrated Swiftype Search** - You need to specify `swiftype_key` in `_config.yml` to enable it.
18 | * **Removed Bdshare** - There are conflicts between bdshare and swiftype search, for example, the `more` button in bdshare is invalid when swiftype is enabled.
19 | * **Landscape share Enhancement** - Replaced Pinterest with Linkedin, added 4 Chinese SNS share buttons.
20 | * **Support Mathjax** - Requires the [hexo-renderer-kramed](https://github.com/sun11/hexo-renderer-kramed) plugin, and hexo-renderer-marked should be removed. You need to enable it using `mathjax: true` in `_config.yml`.
21 | * **Block Disgusting Browsing inside Weixin** - You can enable it using `wx_block: true` in your `_config.yml`, otherwise Weixin will render your article in a disgusting way! (Unless you have a public weixin account.)
22 | * **Table of Contents (TOC)** - Should config `toc: true` in .md files, serial numbers of titles is not displayed by default.
23 |
24 | ### Browser Support
25 |
26 | * **IE 9+ and the current versions of other browsers**
27 | * **DO NOT support weixin's inside browsing**
28 |
29 | ### People Using Paperbox
30 |
31 | see [Examples](https://github.com/sun11/hexo-theme-paperbox/wiki/Examples)
32 |
33 | ---
34 |
35 | 基于基于Landscape主题的Landscape-Plus主题由本人修改的主题,主要目的是自己使用,Hexo版本是3.1.1,nodejs 4.2.6
36 |
37 | ### 主题特性
38 |
39 | * **纸张外观** - 使你专注于文章内容
40 | * **响应式设计** - 最小宽度为320px,确保了在iPhone 4到5s的320x*分辨率的正常显示
41 | * **诸多bug修复** - 修复了包括archive分页显示,原主题在分享按钮、mobile nav界面、分页条等的诸多细节bug
42 |
43 | ### 对Landscape-Plus的功能修改
44 |
45 | * **增加Swiftype站内搜索** - 需在配置文件中设置`swiftype_key`
46 | * **移除百度分享** - 因为不明原因(可能是全局变量?)与Swiftype冲突,先执行的js功能正常,后执行的js会出问题,如百度分享的`更多`按钮点击无效
47 | * **Landscape原主题分享增强** - 将Pinterest更改为Linkedin,增加四个国内社交网站:微博,人人,QQ空间,微信
48 | * **支持Mathjax** - 需安装[hexo-renderer-kramed](https://github.com/sun11/hexo-renderer-kramed)插件,并移除hexo-renderer-marked。在`_config.yml`配置`mathjax: true`以启用
49 | * **屏蔽微信内置浏览** - 在`_config.yml`中设置`wx_block: true`即可屏蔽微信内置浏览, 否则你的文章会变成一团糊(除非你有认证的微信公众号)
50 | * **增加文章目录(TOC)显示** - 需在文章中设置`toc: true`,默认不显示编号
51 |
52 | ### 浏览器支持
53 |
54 | * **IE9+和目前版本的其它浏览器**
55 | * **不支持微信内置浏览**
56 |
57 | ### Paperbox用户
58 |
59 | 见 [Examples](https://github.com/sun11/hexo-theme-paperbox/wiki/Examples)
60 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | # Header
2 | menu:
3 | Home: /
4 | Archives: /archives
5 | About: /about
6 | rss: /atom.xml
7 | github: https://github.com/myname
8 | logo_title: MyLogo
9 | blog_title: My Blog
10 |
11 | # Content
12 | excerpt_link: Read More
13 | fancybox: true
14 | mathjax: false
15 |
16 | # Sidebar
17 | sidebar: right
18 | widgets:
19 | - recent_posts
20 | - tag
21 | - archive
22 |
23 | # Miscellaneous
24 | wx_block: false
25 | google_analytics:
26 | favicon:
27 | twitter:
28 | google_plus:
29 | fb_admins:
30 | fb_app_id:
31 |
32 | # Duoshuo
33 | duoshuo_shortname:
34 |
35 | # Swiftype Search
36 | swiftype_key:
37 |
--------------------------------------------------------------------------------
/languages/default.yml:
--------------------------------------------------------------------------------
1 | archive: Archives
2 | categories: Categories
3 | recent_posts: Recents
4 | tags: Tags
5 | tagcloud: Tag Cloud
6 | links: Links
7 | excerpt_link: Read More
8 | share: Share
9 | search: Search
10 | prev: Prev
11 | next: Next
12 | comment: Comments
13 | comments: Comments
14 | contents: Contents
15 | page: Page %d
16 | menu: Menu
17 | rss: RSS
18 | showsidebar: Show Sidebar
19 | hidesidebar: Hide Sidebar
20 | updated: Updated
21 | totop: To Top
22 | older: Older
23 | newer: Newer
--------------------------------------------------------------------------------
/languages/fr-FR.yml:
--------------------------------------------------------------------------------
1 | home: Accueil
2 | archive: Archives
3 | categories: Catégories
4 | recent_posts: Récents
5 | tags: Tags
6 | tagcloud: Nuage de tags
7 | links: Liens
8 | excerpt_link: Lire plus
9 | share: Partager
10 | search: Rechercher
11 | prev: Précédent
12 | next: Suivant
13 | comment: Commentaire
14 | comments: Commentaires
15 | contents: Contenu
16 | page: Page %d
17 | menu: Menu
18 | rss: RSS
19 | showsidebar: Voir barre latérale
20 | hidesidebar: Cacher barre latérale
21 | updated: Mis à jour
22 | totop: Vers le haut
23 | older: Plus ancien
24 | newer: Plus récent
--------------------------------------------------------------------------------
/languages/zh-CN.yml:
--------------------------------------------------------------------------------
1 | archive: 归档
2 | categories: 分类
3 | recent_posts: 近期文章
4 | tags: 标签
5 | tagcloud: 标签云
6 | links: 友情链接
7 | excerpt_link: 阅读全文
8 | share: 分享到
9 | search: 搜索
10 | prev: 上一页
11 | next: 下一页
12 | comment: 文章评论
13 | comments: 评论
14 | contents: 文章目录
15 | page: 第 %d 页
16 | menu: 菜单
17 | rss: RSS 订阅
18 | showsidebar: 显示侧边栏
19 | hidesidebar: 隐藏侧边栏
20 | updated: 更新日期
21 | totop: 返回顶部
22 | older: 上一篇
23 | newer: 下一篇
--------------------------------------------------------------------------------
/languages/zh-TW.yml:
--------------------------------------------------------------------------------
1 | archive: 歸檔
2 | categories: 分類
3 | recent_posts: 近期文章
4 | tags: 標簽
5 | tagcloud: 標簽雲
6 | links: 友情鏈接
7 | excerpt_link: 閱讀全文
8 | share: 分享到
9 | search: 搜索
10 | prev: 上一頁
11 | next: 下一頁
12 | comment: 文章評論
13 | comments: 評論
14 | contents: 文章目錄
15 | page: 第 %d 頁
16 | menu: 菜單
17 | rss: RSS 訂閱
18 | showsidebar: 顯示側邊欄
19 | hidesidebar: 隱藏側邊欄
20 | updated: 更新日期
21 | totop: 返回頂部
22 | older: 上一篇
23 | newer: 下一篇
--------------------------------------------------------------------------------
/layout/_partial/after-footer.ejs:
--------------------------------------------------------------------------------
1 | <% if ((config.mathjax || theme.mathjax)){ %>
2 | <%- partial('mathjax') %>
3 | <% } %>
4 |
5 |
6 | <%- partial('totop') %>
7 |
8 |
9 |
10 | <% if (theme.swiftype_key){ %>
11 | <%- partial('swiftype') %>
12 | <% } %>
13 |
14 |
15 | <% if (config.duoshuo_shortname || theme.duoshuo_shortname){ %>
16 |
17 |
28 |
29 | <% } else if (config.disqus_shortname){ %>
30 |
43 | <% } %>
44 |
45 |
46 |
47 |
48 |
49 | <% if ((config.fancybox || theme.fancybox)){ %>
50 | <%- css('fancybox/jquery.fancybox') %>
51 | <%- js('fancybox/jquery.fancybox.pack') %>
52 | <% } %>
53 |
54 | <%- js('js/script') %>
55 |
--------------------------------------------------------------------------------
/layout/_partial/archive-post.ejs:
--------------------------------------------------------------------------------
1 |
20 | <%= theme.excerpt_link %>
21 |