├── LICENSE
├── README.md
├── _config.yml
├── languages
├── de.yml
├── default.yml
├── es.yml
├── fr.yml
├── ja.yml
├── ko.yml
├── nl.yml
├── no.yml
├── pt.yml
├── ru.yml
├── zh-CN.yml
└── zh-TW.yml
├── layout
├── _partial
│ ├── after-footer.ejs
│ ├── archive-post.ejs
│ ├── archive.ejs
│ ├── article.ejs
│ ├── footer.ejs
│ ├── head.ejs
│ ├── ocean.ejs
│ ├── post
│ │ ├── albums.ejs
│ │ ├── busuanzi.ejs
│ │ ├── category.ejs
│ │ ├── date.ejs
│ │ ├── gallery.ejs
│ │ ├── gitalk.ejs
│ │ ├── justifiedGallery.ejs
│ │ ├── nav.ejs
│ │ ├── search.ejs
│ │ ├── tag.ejs
│ │ ├── title.ejs
│ │ ├── tocbot.ejs
│ │ ├── topping.ejs
│ │ └── valine.ejs
│ ├── sidebar.ejs
│ └── totop.ejs
├── archive.ejs
├── categories.ejs
├── index.ejs
├── layout.ejs
├── page.ejs
├── post.ejs
└── tags.ejs
├── package.json
├── screenshots
└── hexo-theme-ocean.jpg
└── source
├── 404.html
├── css
├── 404.styl
├── _extend.styl
├── _feathericon.styl
├── _fonts.styl
├── _mixins.styl
├── _normalize.styl
├── _partial
│ ├── albums.styl
│ ├── apple.styl
│ ├── archive.styl
│ ├── article.styl
│ ├── articles.styl
│ ├── blockquote.styl
│ ├── categories.styl
│ ├── english.styl
│ ├── float.styl
│ ├── footer.styl
│ ├── gallery.styl
│ ├── gitalk.styl
│ ├── highlight.styl
│ ├── justifiedGallery.styl
│ ├── layou.styl
│ ├── lists.styl
│ ├── mobile.styl
│ ├── navbar.styl
│ ├── ocean.styl
│ ├── pace.styl
│ ├── pages.styl
│ ├── safari.styl
│ ├── search.styl
│ ├── sidebar.styl
│ ├── tag.styl
│ ├── tocbot.styl
│ ├── tooltips.styl
│ ├── totop.styl
│ └── valine.styl
├── _variables.styl
├── feathericon
│ ├── feathericon.eot
│ ├── feathericon.svg
│ ├── feathericon.ttf
│ ├── feathericon.woff
│ └── feathericon.woff2
└── style.styl
├── fancybox
├── jquery.fancybox.min.css
└── jquery.fancybox.min.js
├── favicon.ico
├── fonts
└── raleway_medium
│ ├── Raleway-Medium.eot
│ ├── Raleway-Medium.svg
│ ├── Raleway-Medium.ttf
│ └── Raleway-Medium.woff
├── images
├── forrestgump.png
├── hexo-inverted.svg
├── hexo.svg
└── ocean
│ ├── ocean.mp4
│ ├── ocean.ogv
│ ├── ocean.png
│ ├── ocean.webm
│ └── overlay-hero.png
└── js
├── busuanzi-2.3.pure.min.js
├── jquery-2.0.3.min.js
├── jquery.justifiedGallery.min.js
├── lazyload.min.js
├── ocean.js
├── pace.min.js
├── search.js
└── tocbot.min.js
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Ocean
2 |
3 | Ocean is a mobile-enabled Hexo theme based on the features in Hexo's default theme landscape. Since I am a Designer and not a Coder, so please advise! I am very grateful to [youchen1992](https://github.com/youchen1992) for providing technical support during the Ocean production process.
4 |
5 |
6 | [Preview](https://zhwangart.github.io)
7 |
8 | [中文说明](https://zhwangart.github.io/2018/11/30/Ocean/)
9 |
10 | 
11 |
12 | ## Install
13 |
14 | ``` bash
15 | $ git clone https://github.com/zhwangart/hexo-theme-ocean.git themes/ocean
16 | ```
17 |
18 | ## Enable
19 |
20 | Modify `theme` setting in `_config.yml` to `ocean`
21 |
22 | ``` yml
23 | theme: ocean
24 | ```
25 |
26 | ## Update
27 |
28 | ``` bash
29 | cd themes/ocean
30 | git pull
31 | ```
32 |
33 | ## Configuration
34 |
35 | let me know if you can’t find something.
36 |
37 | ``` yml
38 | # Menu
39 | menu:
40 | Home: /
41 | Archives: /archives
42 | Gallery: /gallery
43 | About: /about
44 | Links: /links
45 | rss: /atom.xml
46 |
47 | # Miscellaneous
48 | favicon: /favicon.ico
49 | brand: /images/hexo.svg
50 |
51 | # Ocean Video
52 | # Because I put videos in multiple formats on the same path, I just labeled the path here.
53 | ocean:
54 | overlay: true
55 | path: images/ocean/ # Video storage path, formats: mp4/ogg/webm
56 | brand: /images/hexo-inverted.svg # Optional, a small logo
57 |
58 | # Content
59 | excerpt_link: Read More...
60 |
61 | # fancybox
62 | fancybox: true
63 |
64 | # Local search
65 | search_text: Search
66 |
67 | # Gitalk
68 | gitalk:
69 | enable: true
70 | clientID: # GitHub Application Client ID
71 | clientSecret: # Client Secret
72 | repo: # Repository name
73 | owner: # GitHub ID
74 | admin: # GitHub ID
75 |
76 | # Valine
77 | valine:
78 | enable: false # Default: false.
79 | el: 'vcomments' # The DOM element to be mounted on initialization.
80 | appId: # Application appId from Leancloud.
81 | appKey: # Application appKey from Leancloud.
82 | notify: false # Mail notifier, Default: false.
83 | verify: true # Validation code, Default: true.
84 | avatar: 'mp' # Gravatar type.
85 | pageSize: '10' # Number of pages per page.
86 | placeholder: '请输入...' # Comment box placeholders.
87 | ```
88 |
89 | The [feathericon](https://feathericon.com) in the menu is programmed ordely in "CSS `source/css/_partial/navbar.styl` " and can be changed or added if needed.
90 |
91 | ``` css
92 | .nav-item
93 | &:nth-child(1) // home
94 | .nav-item-link
95 | &::before
96 | content '\f12f'
97 | &:nth-child(2) // archives
98 | .nav-item-link
99 | &::before
100 | content '\f12a'
101 | //&:nth-child(3) // gallery
102 | // .nav-item-link
103 | // &::before
104 | // content '\f1a9'
105 | //&:nth-child(4) // about
106 | // .nav-item-link
107 | // &::before
108 | // content '\f174'
109 | ```
110 |
111 | ## Plugins
112 |
113 | + [hexo-generator-search](https://github.com/hexojs/hexo-theme-landscape) Local search
114 |
115 | ```yml
116 | $ npm install hexo-generator-searchdb --save
117 | ```
118 | Then add the plugin configuration for hexo's configuration file `_config.yml` (note: not the theme's configuration file):
119 |
120 | ```yml
121 | # Hexo-generator-search
122 | search:
123 | path: search.xml
124 | field: post
125 | format: html
126 | ```
127 |
128 | + [hexo-generate-feed](https://github.com/hexojs/hexo-generator-feed) RSS
129 |
130 | ```yml
131 | $ npm install hexo-generator-feed --save
132 | ```
133 |
134 | Then add the plugin configuration for hexo's configuration file `_config.yml` (note: not the theme's configuration file):
135 |
136 | ```yml
137 | feed:
138 | type: atom
139 | path: atom.xml
140 | limit: 20
141 | hub:
142 | content:
143 | content_limit: 140
144 | content_limit_delim: ' '
145 | order_by: -date
146 | ```
147 |
148 | + [hexo-generator-index-pin-top](https://github.com/netcan/hexo-generator-index-pin-top)
149 |
150 | ``` bash
151 | $ npm uninstall hexo-generator-index --save
152 | $ npm install hexo-generator-index-pin-top --save
153 | ```
154 |
155 | ## Post poster
156 |
157 | ``` md
158 | ---
159 | title: Post name
160 |
161 | photos: [
162 | ["img_url"],
163 | ["img_url"]
164 | ]
165 | ---
166 | ```
167 |
168 | ## Gallery
169 | Need to write in the head of the markdown, this is not a good way to write, I hope to get a better way to write on github.
170 |
171 | ``` md
172 | ---
173 | title: Gallery
174 |
175 | albums: [
176 | ["img_url","img_caption"],
177 | ["img_url","img_caption"]
178 | ]
179 | ---
180 | ```
181 |
182 | ## Toc
183 |
184 | Use Tocbot to parse the title tags (h1~h6) in the content and insert the directory.
185 |
186 | + ocean/_config.yml
187 |
188 | ``` bash
189 | # Toc
190 | toc: true
191 | ```
192 | + If Toc is turned on in ocean/_config.yml, then Tocbot will generate a Toc article directory in the title tag of each blog parsing content, but not all blogs require Toc, so in the Front-matter section of markdown Can be closed:
193 |
194 | ``` md
195 | ---
196 | toc: false
197 | ---
198 | ```
199 |
200 | ---
201 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | # Menu
2 | menu:
3 | Home: /
4 | Archives: /archives
5 | Gallery: /gallery
6 | About: /about
7 | rss: /atom.xml
8 |
9 |
10 | # Miscellaneous
11 | favicon: /favicon.ico
12 | brand: /images/hexo.svg
13 |
14 | # Ocean Video
15 | # Because I put videos in multiple formats on the same path, I just labeled the path here.
16 | ocean:
17 | overlay: true
18 | path: /images/ocean/
19 | brand: /images/hexo-inverted.svg
20 |
21 | # Content
22 | excerpt_link: Read More...
23 |
24 | # MIIT ICP/IP/DOMAIN
25 | beian:
26 | enable: false
27 | number:
28 | url: https://beian.miit.gov.cn/
29 |
30 | # Tags
31 | show_count: false
32 |
33 | # Toc
34 | toc: true
35 |
36 | # fancybox
37 | fancybox: true
38 |
39 | # 是否显示复制按钮
40 | show_copy_btn: true
41 |
42 | # Gitalk
43 | gitalk:
44 | enable: false # true
45 | clientID: # GitHub Application Client ID
46 | clientSecret: # Client Secret
47 | repo: # Repository name
48 | owner: # GitHub ID
49 | admin: # GitHub ID
50 |
51 | # Valine
52 | valine:
53 | enable: false # true
54 | el: 'vcomments'
55 | appId:
56 | appKey:
57 | notify: false
58 | verify: true
59 | avatar: 'mp'
60 | pageSize: '10'
61 | placeholder: '请输入...'
--------------------------------------------------------------------------------
/languages/de.yml:
--------------------------------------------------------------------------------
1 | categories: Kategorien
2 | search: Suche
3 | tags: Tags
4 | tagcloud: Tag Cloud
5 | tweets: Tweets
6 | prev: zurück
7 | next: weiter
8 | comment: Kommentare
9 | archive_a: Archiv
10 | archive_b: "Archive: %s"
11 | page: Seite %d
12 | recent_posts: letzter Beitrag
13 | newer: Neuer
14 | older: Älter
15 | share: Teilen
16 | powered_by: Powered by
17 | rss_feed: RSS Feed
18 | category: Kategorie
19 | tag: Tag
20 |
--------------------------------------------------------------------------------
/languages/default.yml:
--------------------------------------------------------------------------------
1 | categories: Categories
2 | search: Search
3 | tags: Tags
4 | tagcloud: Tag Cloud
5 | tweets: Tweets
6 | prev: Prev
7 | next: Next
8 | comment: Comments
9 | archive_a: Archives
10 | archive_b: "Archives: %s"
11 | page: Page %d
12 | recent_posts: Recent Posts
13 | newer: Newer
14 | older: Older
15 | share: Share
16 | powered_by: Powered by
17 | rss_feed: RSS Feed
18 | category: Category
19 | tag: Tag
--------------------------------------------------------------------------------
/languages/es.yml:
--------------------------------------------------------------------------------
1 | categories: Categorías
2 | search: Buscar
3 | tags: Tags
4 | tagcloud: Nube de Tags
5 | tweets: Tweets
6 | prev: Previo
7 | next: Siguiente
8 | comment: Comentarios
9 | archive_a: Archivos
10 | archive_b: "Archivos: %s"
11 | page: Página %d
12 | recent_posts: Posts recientes
13 | newer: Nuevo
14 | older: Viejo
15 | share: Compartir
16 | powered_by: Construido por
17 | rss_feed: RSS
18 | category: Categoría
19 | tag: Tag
--------------------------------------------------------------------------------
/languages/fr.yml:
--------------------------------------------------------------------------------
1 | categories: Catégories
2 | search: Rechercher
3 | tags: Mot-clés
4 | tagcloud: Nuage de mot-clés
5 | tweets: Tweets
6 | prev: Précédent
7 | next: Suivant
8 | comment: Commentaires
9 | archive_a: Archives
10 | archive_b: "Archives: %s"
11 | page: Page %d
12 | recent_posts: Articles récents
13 | newer: Récent
14 | older: Ancien
15 | share: Partager
16 | powered_by: Propulsé par
17 | rss_feed: Flux RSS
18 | category: Catégorie
19 | tag: Mot-clé
20 |
--------------------------------------------------------------------------------
/languages/ja.yml:
--------------------------------------------------------------------------------
1 | categories: カテゴリ
2 | search: 検索
3 | tags: タグ
4 | tagcloud: タグクラウド
5 | tweets: ツイート
6 | prev: 戻る
7 | next: 次へ
8 | comment: コメント
9 | archive_a: アーカイブ
10 | archive_b: "アーカイブ: %s"
11 | page: ページ %d
12 | recent_posts: 最近の投稿
13 | newer: 次の記事
14 | older: 前の記事
15 | share: 共有
16 | powered_by: Powered by
17 | rss_feed: RSSフィード
18 | category: カテゴリ
19 | tag: タグ
20 |
--------------------------------------------------------------------------------
/languages/ko.yml:
--------------------------------------------------------------------------------
1 | categories: 카테고리
2 | search: 검색
3 | tags: 태그
4 | tagcloud: 태그 클라우드
5 | tweets: 트윗
6 | prev: 이전
7 | next: 다음
8 | comment: 댓글
9 | archive_a: 아카이브
10 | archive_b: "아카이브: %s"
11 | page: 페이지 %d
12 | recent_posts: 최근 포스트
13 | newer: 최신
14 | older: 이전
15 | share: 공유
16 | powered_by: Powered by
17 | rss_feed: RSS Feed
18 | category: 카테고리
19 | tag: 태그
20 |
--------------------------------------------------------------------------------
/languages/nl.yml:
--------------------------------------------------------------------------------
1 |
2 | categories: Categorieën
3 | search: Zoeken
4 | tags: Labels
5 | tagcloud: Tag Cloud
6 | tweets: Tweets
7 | prev: Vorige
8 | next: Volgende
9 | comment: Commentaren
10 | archive_a: Archieven
11 | archive_b: "Archieven: %s"
12 | page: Pagina %d
13 | recent_posts: Recente berichten
14 | newer: Nieuwer
15 | older: Ouder
16 | share: Delen
17 | powered_by: Powered by
18 | rss_feed: RSS Feed
19 | category: Categorie
20 | tag: Label
21 |
--------------------------------------------------------------------------------
/languages/no.yml:
--------------------------------------------------------------------------------
1 | categories: Kategorier
2 | search: Søk
3 | tags: Tags
4 | tagcloud: Tag Cloud
5 | tweets: Tweets
6 | prev: Forrige
7 | next: Neste
8 | comment: Kommentarer
9 | archive_a: Arkiv
10 | archive_b: "Arkiv: %s"
11 | page: Side %d
12 | recent_posts: Siste innlegg
13 | newer: Newer
14 | older: Older
15 | share: Share
16 | powered_by: Powered by
17 | rss_feed: RSS Feed
18 | category: Category
19 | tag: Tag
--------------------------------------------------------------------------------
/languages/pt.yml:
--------------------------------------------------------------------------------
1 | categories: Categorias
2 | search: Buscar
3 | tags: Tags
4 | tagcloud: Nuvem de Tags
5 | tweets: Tweets
6 | prev: Anterior
7 | next: Próximo
8 | comment: Comentários
9 | archive_a: Arquivos
10 | archive_b: "Arquivos: %s"
11 | page: Página %d
12 | recent_posts: Postagens Recentes
13 | newer: Mais Recente
14 | older: Mais Antigo
15 | share: Compartilhar
16 | powered_by: Desenvolvido por
17 | rss_feed: Feed RSS
18 | category: Categoria
19 | tag: Tag
20 |
--------------------------------------------------------------------------------
/languages/ru.yml:
--------------------------------------------------------------------------------
1 | categories: Категории
2 | search: Поиск
3 | tags: Метки
4 | tagcloud: Облако меток
5 | tweets: Твиты
6 | prev: Назад
7 | next: Вперед
8 | comment: Комментарии
9 | archive_a: Архив
10 | archive_b: "Архив: %s"
11 | page: Страница %d
12 | recent_posts: Недавние записи
13 | newer: Следующий
14 | older: Предыдущий
15 | share: Поделиться
16 | powered_by: Создано с помощью
17 | rss_feed: RSS-каналы
18 | category: Категория
19 | tag: Метка
--------------------------------------------------------------------------------
/languages/zh-CN.yml:
--------------------------------------------------------------------------------
1 | categories: 类别
2 | search: 搜索
3 | tags: 标签
4 | tagcloud: 标签云
5 | category: 分类
6 | tweets: 推文
7 | prev: 上一页
8 | next: 下一页
9 | comment: 留言
10 | archive_a: 归档
11 | archive_b: 归档:%s
12 | page: 第 %d 页
13 | recent_posts: 最新文章
14 | newer: 前一篇
15 | older: 后一篇
16 | share: 分享
17 | powered_by: Powered by
18 | rss_feed: RSS Feed
19 | tag: Tag
20 | theme: Theme
--------------------------------------------------------------------------------
/languages/zh-TW.yml:
--------------------------------------------------------------------------------
1 | categories: 分類
2 | search: 搜尋
3 | tags: 標籤
4 | tagcloud: 標籤雲
5 | tweets: 推文
6 | prev: 上一頁
7 | next: 下一頁
8 | comment: 留言
9 | archive_a: 彙整
10 | archive_b: 彙整:%s
11 | page: 第 %d 頁
12 | recent_posts: 最新文章
13 | newer: Newer
14 | older: Older
15 | share: Share
16 | powered_by: Powered by
17 | rss_feed: RSS Feed
18 | category: Category
19 | tag: Tag
--------------------------------------------------------------------------------
/layout/_partial/after-footer.ejs:
--------------------------------------------------------------------------------
1 | <%- js('/js/jquery-2.0.3.min') %>
2 | <%- js('/js/jquery.justifiedGallery.min') %>
3 | <%- js('/js/lazyload.min') %>
4 | <%- js('/js/busuanzi-2.3.pure.min') %>
5 | <% if (theme.fancybox){ %>
6 | <%- js('fancybox/jquery.fancybox.min') %>
7 | <% } %>
8 |
9 | <% if (theme.toc && is_post()){ %>
10 | <%- js('/js/tocbot.min') %>
11 |
12 |
25 | <% } %>
26 |
27 | <%- js('js/ocean') %>
--------------------------------------------------------------------------------
/layout/_partial/archive-post.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 | <% if(post.photos.length){ %>
4 |
'
97 | ].join('');
98 |
99 | var box = $(html);
100 | $('body').append(box);
101 | }
102 | $('.article-share-box.on').hide();
103 |
104 | box.css({
105 | top: offset.top + 25,
106 | left: offset.left
107 | }).addClass('on');
108 | }).on('click', '.article-share-box', function (e) {
109 | e.stopPropagation();
110 | }).on('click', '.article-share-box-input', function () {
111 | $(this).select();
112 | }).on('click', '.article-share-box-link', function (e) {
113 | e.preventDefault();
114 | e.stopPropagation();
115 |
116 | window.open(this.href, 'article-share-box-window-' + Date.now(), 'width=500,height=450');
117 | });
118 |
119 | //
120 | // fancybox
121 | if ($.fancybox) {
122 | $('[data-fancybox]').fancybox({
123 | protect: true
124 | });
125 | }
126 |
127 | //
128 | // lazyload
129 | $("img.lazy").lazyload({
130 | effect: "fadeIn"
131 | });
132 |
133 | //
134 | // justifiedGallery
135 | $('#gallery').justifiedGallery({
136 | rowHeight: 200,
137 | margins: 5
138 | });
139 |
140 | //
141 | $(document).ready(function ($) {
142 | $('.anchor').click(function (event) {
143 | event.preventDefault();
144 | $('html,body').animate({ scrollTop: $(this.hash).offset().top }, 'smooth');
145 | });
146 | });
147 |
148 | // To top
149 | (function ($) {
150 | // When to show the scroll link
151 | // higher number = scroll link appears further down the page
152 | var upperLimit = 1000;
153 |
154 | // Our scroll link element
155 | var scrollElem = $('#totop');
156 |
157 | // Scroll to top speed
158 | var scrollSpeed = 1600;
159 |
160 | // Show and hide the scroll to top link based on scroll position
161 | scrollElem.hide();
162 | $(window).scroll(function () {
163 | var scrollTop = $(document).scrollTop();
164 | if (scrollTop > upperLimit) {
165 | $(scrollElem).stop().fadeTo(300, 1); // fade back in
166 | } else {
167 | $(scrollElem).stop().fadeTo(300, 0); // fade out
168 | }
169 | });
170 |
171 | // Scroll to top animation on click
172 | $(scrollElem).click(function () {
173 | $('html, body').animate({ scrollTop: 0 }, scrollSpeed); return false;
174 | });
175 | })(jQuery);
176 |
177 | // Mobile nav
178 | var $content = $('.content'),
179 | $sidebar = $('.sidebar'),
180 | isMobileNavAnim = false,
181 | mobileNavAnimDuration = 200;
182 |
183 | var startMobileNavAnim = function () {
184 | isMobileNavAnim = true;
185 | };
186 |
187 | var stopMobileNavAnim = function () {
188 | setTimeout(function () {
189 | isMobileNavAnim = false;
190 | }, mobileNavAnimDuration);
191 | };
192 |
193 | $('.navbar-toggle').on('click', function () {
194 | if (isMobileNavAnim) return;
195 | startMobileNavAnim();
196 | $content.toggleClass('on');
197 | $sidebar.toggleClass('on');
198 | stopMobileNavAnim();
199 | });
200 |
201 | $($content).on('click', function () {
202 | if (isMobileNavAnim || !$content.hasClass('on')) return;
203 | $content.removeClass('on');
204 | $sidebar.removeClass('on');
205 | });
206 |
207 | })(jQuery);
208 |
209 |
210 |
--------------------------------------------------------------------------------
/source/js/pace.min.js:
--------------------------------------------------------------------------------
1 | /*! pace 1.0.2 */
2 | (function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X=[].slice,Y={}.hasOwnProperty,Z=function(a,b){function c(){this.constructor=a}for(var d in b)Y.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},$=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};for(u={catchupTime:100,initialRate:.03,minTime:250,ghostTime:100,maxProgressPerFrame:20,easeFactor:1.25,startOnPageLoad:!0,restartOnPushState:!0,restartOnRequestAfter:500,target:"body",elements:{checkInterval:100,selectors:["body"]},eventLag:{minSamples:10,sampleCount:3,lagThreshold:3},ajax:{trackMethods:["GET"],trackWebSockets:!0,ignoreURLs:[]}},C=function(){var a;return null!=(a="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance.now():void 0)?a:+new Date},E=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,t=window.cancelAnimationFrame||window.mozCancelAnimationFrame,null==E&&(E=function(a){return setTimeout(a,50)},t=function(a){return clearTimeout(a)}),G=function(a){var b,c;return b=C(),(c=function(){var d;return d=C()-b,d>=33?(b=C(),a(d,function(){return E(c)})):setTimeout(c,33-d)})()},F=function(){var a,b,c;return c=arguments[0],b=arguments[1],a=3<=arguments.length?X.call(arguments,2):[],"function"==typeof c[b]?c[b].apply(c,a):c[b]},v=function(){var a,b,c,d,e,f,g;for(b=arguments[0],d=2<=arguments.length?X.call(arguments,1):[],f=0,g=d.length;g>f;f++)if(c=d[f])for(a in c)Y.call(c,a)&&(e=c[a],null!=b[a]&&"object"==typeof b[a]&&null!=e&&"object"==typeof e?v(b[a],e):b[a]=e);return b},q=function(a){var b,c,d,e,f;for(c=b=0,e=0,f=a.length;f>e;e++)d=a[e],c+=Math.abs(d),b++;return c/b},x=function(a,b){var c,d,e;if(null==a&&(a="options"),null==b&&(b=!0),e=document.querySelector("[data-pace-"+a+"]")){if(c=e.getAttribute("data-pace-"+a),!b)return c;try{return JSON.parse(c)}catch(f){return d=f,"undefined"!=typeof console&&null!==console?console.error("Error parsing inline pace options",d):void 0}}},g=function(){function a(){}return a.prototype.on=function(a,b,c,d){var e;return null==d&&(d=!1),null==this.bindings&&(this.bindings={}),null==(e=this.bindings)[a]&&(e[a]=[]),this.bindings[a].push({handler:b,ctx:c,once:d})},a.prototype.once=function(a,b,c){return this.on(a,b,c,!0)},a.prototype.off=function(a,b){var c,d,e;if(null!=(null!=(d=this.bindings)?d[a]:void 0)){if(null==b)return delete this.bindings[a];for(c=0,e=[];cQ;Q++)K=U[Q],D[K]===!0&&(D[K]=u[K]);i=function(a){function b(){return V=b.__super__.constructor.apply(this,arguments)}return Z(b,a),b}(Error),b=function(){function a(){this.progress=0}return a.prototype.getElement=function(){var a;if(null==this.el){if(a=document.querySelector(D.target),!a)throw new i;this.el=document.createElement("div"),this.el.className="pace pace-active",document.body.className=document.body.className.replace(/pace-done/g,""),document.body.className+=" pace-running",this.el.innerHTML='
\n \n
\n',null!=a.firstChild?a.insertBefore(this.el,a.firstChild):a.appendChild(this.el)}return this.el},a.prototype.finish=function(){var a;return a=this.getElement(),a.className=a.className.replace("pace-active",""),a.className+=" pace-inactive",document.body.className=document.body.className.replace("pace-running",""),document.body.className+=" pace-done"},a.prototype.update=function(a){return this.progress=a,this.render()},a.prototype.destroy=function(){try{this.getElement().parentNode.removeChild(this.getElement())}catch(a){i=a}return this.el=void 0},a.prototype.render=function(){var a,b,c,d,e,f,g;if(null==document.querySelector(D.target))return!1;for(a=this.getElement(),d="translate3d("+this.progress+"%, 0, 0)",g=["webkitTransform","msTransform","transform"],e=0,f=g.length;f>e;e++)b=g[e],a.children[0].style[b]=d;return(!this.lastRenderedProgress||this.lastRenderedProgress|0!==this.progress|0)&&(a.children[0].setAttribute("data-progress-text",""+(0|this.progress)+"%"),this.progress>=100?c="99":(c=this.progress<10?"0":"",c+=0|this.progress),a.children[0].setAttribute("data-progress",""+c)),this.lastRenderedProgress=this.progress},a.prototype.done=function(){return this.progress>=100},a}(),h=function(){function a(){this.bindings={}}return a.prototype.trigger=function(a,b){var c,d,e,f,g;if(null!=this.bindings[a]){for(f=this.bindings[a],g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.call(this,b));return g}},a.prototype.on=function(a,b){var c;return null==(c=this.bindings)[a]&&(c[a]=[]),this.bindings[a].push(b)},a}(),P=window.XMLHttpRequest,O=window.XDomainRequest,N=window.WebSocket,w=function(a,b){var c,d,e;e=[];for(d in b.prototype)try{null==a[d]&&"function"!=typeof b[d]?"function"==typeof Object.defineProperty?e.push(Object.defineProperty(a,d,{get:function(){return b.prototype[d]},configurable:!0,enumerable:!0})):e.push(a[d]=b.prototype[d]):e.push(void 0)}catch(f){c=f}return e},A=[],j.ignore=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?X.call(arguments,1):[],A.unshift("ignore"),c=b.apply(null,a),A.shift(),c},j.track=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?X.call(arguments,1):[],A.unshift("track"),c=b.apply(null,a),A.shift(),c},J=function(a){var b;if(null==a&&(a="GET"),"track"===A[0])return"force";if(!A.length&&D.ajax){if("socket"===a&&D.ajax.trackWebSockets)return!0;if(b=a.toUpperCase(),$.call(D.ajax.trackMethods,b)>=0)return!0}return!1},k=function(a){function b(){var a,c=this;b.__super__.constructor.apply(this,arguments),a=function(a){var b;return b=a.open,a.open=function(d,e,f){return J(d)&&c.trigger("request",{type:d,url:e,request:a}),b.apply(a,arguments)}},window.XMLHttpRequest=function(b){var c;return c=new P(b),a(c),c};try{w(window.XMLHttpRequest,P)}catch(d){}if(null!=O){window.XDomainRequest=function(){var b;return b=new O,a(b),b};try{w(window.XDomainRequest,O)}catch(d){}}if(null!=N&&D.ajax.trackWebSockets){window.WebSocket=function(a,b){var d;return d=null!=b?new N(a,b):new N(a),J("socket")&&c.trigger("request",{type:"socket",url:a,protocols:b,request:d}),d};try{w(window.WebSocket,N)}catch(d){}}}return Z(b,a),b}(h),R=null,y=function(){return null==R&&(R=new k),R},I=function(a){var b,c,d,e;for(e=D.ajax.ignoreURLs,c=0,d=e.length;d>c;c++)if(b=e[c],"string"==typeof b){if(-1!==a.indexOf(b))return!0}else if(b.test(a))return!0;return!1},y().on("request",function(b){var c,d,e,f,g;return f=b.type,e=b.request,g=b.url,I(g)?void 0:j.running||D.restartOnRequestAfter===!1&&"force"!==J(f)?void 0:(d=arguments,c=D.restartOnRequestAfter||0,"boolean"==typeof c&&(c=0),setTimeout(function(){var b,c,g,h,i,k;if(b="socket"===f?e.readyState<2:0<(h=e.readyState)&&4>h){for(j.restart(),i=j.sources,k=[],c=0,g=i.length;g>c;c++){if(K=i[c],K instanceof a){K.watch.apply(K,d);break}k.push(void 0)}return k}},c))}),a=function(){function a(){var a=this;this.elements=[],y().on("request",function(){return a.watch.apply(a,arguments)})}return a.prototype.watch=function(a){var b,c,d,e;return d=a.type,b=a.request,e=a.url,I(e)?void 0:(c="socket"===d?new n(b):new o(b),this.elements.push(c))},a}(),o=function(){function a(a){var b,c,d,e,f,g,h=this;if(this.progress=0,null!=window.ProgressEvent)for(c=null,a.addEventListener("progress",function(a){return a.lengthComputable?h.progress=100*a.loaded/a.total:h.progress=h.progress+(100-h.progress)/2},!1),g=["load","abort","timeout","error"],d=0,e=g.length;e>d;d++)b=g[d],a.addEventListener(b,function(){return h.progress=100},!1);else f=a.onreadystatechange,a.onreadystatechange=function(){var b;return 0===(b=a.readyState)||4===b?h.progress=100:3===a.readyState&&(h.progress=50),"function"==typeof f?f.apply(null,arguments):void 0}}return a}(),n=function(){function a(a){var b,c,d,e,f=this;for(this.progress=0,e=["error","open"],c=0,d=e.length;d>c;c++)b=e[c],a.addEventListener(b,function(){return f.progress=100},!1)}return a}(),d=function(){function a(a){var b,c,d,f;for(null==a&&(a={}),this.elements=[],null==a.selectors&&(a.selectors=[]),f=a.selectors,c=0,d=f.length;d>c;c++)b=f[c],this.elements.push(new e(b))}return a}(),e=function(){function a(a){this.selector=a,this.progress=0,this.check()}return a.prototype.check=function(){var a=this;return document.querySelector(this.selector)?this.done():setTimeout(function(){return a.check()},D.elements.checkInterval)},a.prototype.done=function(){return this.progress=100},a}(),c=function(){function a(){var a,b,c=this;this.progress=null!=(b=this.states[document.readyState])?b:100,a=document.onreadystatechange,document.onreadystatechange=function(){return null!=c.states[document.readyState]&&(c.progress=c.states[document.readyState]),"function"==typeof a?a.apply(null,arguments):void 0}}return a.prototype.states={loading:0,interactive:50,complete:100},a}(),f=function(){function a(){var a,b,c,d,e,f=this;this.progress=0,a=0,e=[],d=0,c=C(),b=setInterval(function(){var g;return g=C()-c-50,c=C(),e.push(g),e.length>D.eventLag.sampleCount&&e.shift(),a=q(e),++d>=D.eventLag.minSamples&&a=100&&(this.done=!0),b===this.last?this.sinceLastUpdate+=a:(this.sinceLastUpdate&&(this.rate=(b-this.last)/this.sinceLastUpdate),this.catchup=(b-this.progress)/D.catchupTime,this.sinceLastUpdate=0,this.last=b),b>this.progress&&(this.progress+=this.catchup*a),c=1-Math.pow(this.progress/100,D.easeFactor),this.progress+=c*this.rate*a,this.progress=Math.min(this.lastProgress+D.maxProgressPerFrame,this.progress),this.progress=Math.max(0,this.progress),this.progress=Math.min(100,this.progress),this.lastProgress=this.progress,this.progress},a}(),L=null,H=null,r=null,M=null,p=null,s=null,j.running=!1,z=function(){return D.restartOnPushState?j.restart():void 0},null!=window.history.pushState&&(T=window.history.pushState,window.history.pushState=function(){return z(),T.apply(window.history,arguments)}),null!=window.history.replaceState&&(W=window.history.replaceState,window.history.replaceState=function(){return z(),W.apply(window.history,arguments)}),l={ajax:a,elements:d,document:c,eventLag:f},(B=function(){var a,c,d,e,f,g,h,i;for(j.sources=L=[],g=["ajax","elements","document","eventLag"],c=0,e=g.length;e>c;c++)a=g[c],D[a]!==!1&&L.push(new l[a](D[a]));for(i=null!=(h=D.extraSources)?h:[],d=0,f=i.length;f>d;d++)K=i[d],L.push(new K(D));return j.bar=r=new b,H=[],M=new m})(),j.stop=function(){return j.trigger("stop"),j.running=!1,r.destroy(),s=!0,null!=p&&("function"==typeof t&&t(p),p=null),B()},j.restart=function(){return j.trigger("restart"),j.stop(),j.start()},j.go=function(){var a;return j.running=!0,r.render(),a=C(),s=!1,p=G(function(b,c){var d,e,f,g,h,i,k,l,n,o,p,q,t,u,v,w;for(l=100-r.progress,e=p=0,f=!0,i=q=0,u=L.length;u>q;i=++q)for(K=L[i],o=null!=H[i]?H[i]:H[i]=[],h=null!=(w=K.elements)?w:[K],k=t=0,v=h.length;v>t;k=++t)g=h[k],n=null!=o[k]?o[k]:o[k]=new m(g),f&=n.done,n.done||(e++,p+=n.tick(b));return d=p/e,r.update(M.tick(b,d)),r.done()||f||s?(r.update(100),j.trigger("done"),setTimeout(function(){return r.finish(),j.running=!1,j.trigger("hide")},Math.max(D.ghostTime,Math.max(D.minTime-(C()-a),0)))):c()})},j.start=function(a){v(D,a),j.running=!0;try{r.render()}catch(b){i=b}return document.querySelector(".pace")?(j.trigger("start"),j.go()):setTimeout(j.start,50)},"function"==typeof define&&define.amd?define(["pace"],function(){return j}):"object"==typeof exports?module.exports=j:D.startOnPageLoad&&j.start()}).call(this);
--------------------------------------------------------------------------------
/source/js/search.js:
--------------------------------------------------------------------------------
1 | // A local search script with the help of [hexo-generator-search](https://github.com/PaicHyperionDev/hexo-generator-search)
2 | // Copyright (C) 2015
3 | // Joseph Pan
4 | // Shuhao Mao
5 | // This library is free software; you can redistribute it and/or modify
6 | // it under the terms of the GNU Lesser General Public License as
7 | // published by the Free Software Foundation; either version 2.1 of the
8 | // License, or (at your option) any later version.
9 | //
10 | // This library is distributed in the hope that it will be useful, but
11 | // WITHOUT ANY WARRANTY; without even the implied warranty of
12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | // Lesser General Public License for more details.
14 | //
15 | // You should have received a copy of the GNU Lesser General Public
16 | // License along with this library; if not, write to the Free Software
17 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 | // 02110-1301 USA
19 | //
20 |
21 | var searchFunc = function (path, search_id, content_id) {
22 | 'use strict';
23 | var BTN = "";
24 | $.ajax({
25 | url: path,
26 | dataType: "xml",
27 | success: function (xmlResponse) {
28 | // get the contents from search data
29 | // var datas = $("entry", xmlResponse).map(function () {
30 | // return {
31 | // title: $("title", this).text(),
32 | // content: $("content", this).text(),
33 | // url: $("url", this).text()
34 | // };
35 | // }).get();
36 |
37 | // get the contents from search data
38 | // 基于 GitHub 用户 DrebinPeng 的修改
39 | var _div = document.createElement('div') // 此处修改
40 | var datas = $("entry", xmlResponse).map(function () {
41 | // 解决search.xml中的中文被转码为HTML实体的问题,即出现