This commit is contained in:
Cool-Y
2019-04-02 16:28:32 +08:00
parent 9b268c2561
commit b89c9a9abf
464 changed files with 50451 additions and 0 deletions

3
themes/next/.bowerrc Normal file
View File

@ -0,0 +1,3 @@
{
"directory": "source/lib"
}

14
themes/next/.editorconfig Normal file
View File

@ -0,0 +1,14 @@
# editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
[*.py]
indent_size = 4

2
themes/next/.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
source/lib/* linguist-vendored
scripts/merge.js linguist-vendored

6
themes/next/.github/CONTRIBUTING.md vendored Normal file
View File

@ -0,0 +1,6 @@
Before submitting an issue, please search for the issue [here](https://github.com/iissnan/hexo-theme-next/issues?utf8=%E2%9C%93&q=) to find if the issue is already reported.
Also, you can search for answers on the [NexT Documentation Site](http://theme-next.iissnan.com/):
- [常见问题 - 中文文档](http://theme-next.iissnan.com/faqs.html)
- FAQs (Work in progress)

29
themes/next/.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,29 @@
THIS REPO IS NOT SUPPORTED ANYMORE!
DON'T NEED CREATE ISSUE HERE!
NEXT MOVED HERE: https://github.com/theme-next/hexo-theme-next
NexT is rebased into organization repo https://github.com/theme-next
If you want new feature, fix, or support, create new issue in NexT v6.x repo (desirable in English).
There is instructions
on English: https://github.com/theme-next/hexo-theme-next/blob/master/docs/UPDATE-FROM-5.1.X.md
or Chinese: https://github.com/theme-next/hexo-theme-next/blob/master/docs/zh-CN/UPDATE-FROM-5.1.X.md
how to update from v5.1.x to v 6.x
You also may read this for details: https://github.com/iissnan/hexo-theme-next/issues/2061
***
该工程已不再提供任何支持与维护!
请大家不要再在这里创建issue了
NexT主题仓库已移动到此处: https://github.com/theme-next/hexo-theme-next
NexT已经rebase到theme-next组织(https://github.com/theme-next) 的repo中.
如果你想要求新的特性bug修复或其他支持请在新的v6.x的仓库下创建新issue最好用英文谢谢
英文文档: (https://github.com/theme-next/hexo-theme-next/blob/master/docs/UPDATE-FROM-5.1.X.md)
或中文文档: (https://github.com/theme-next/hexo-theme-next/blob/master/docs/zh-CN/UPDATE-FROM-5.1.X.md)
如何从 v5.1.x 更新到 v 6.x
相关细节参考这里: https://github.com/iissnan/hexo-theme-next/issues/2061

View File

@ -0,0 +1,87 @@
<!-- ATTENTION!
1. Please, write pulls readme in English. Not all contributors/collaborators know Chinese language and Google translate can't always give true translates on issues. Thanks!
2. If your pull is short and simple, recommended to use "Usual pull template".
If your pull is big and include many separated changes, recommended to use "BIG pull template".
3. Always remember what NexT include 4 schemes. And if on one of them all worked fine after changes, on another scheme this changes can be broken. Muse and Mist have similar structure, but Pisces is very difference from them. Gemini is a mirror of Pisces with some styles and layouts remakes. So, please, make the tests at least on two schemes (Muse or Mist and Pisces or Gemini).
-->
<!-- Usual pull template -->
## PR Checklist
**Please check if your PR fulfills the following requirements:**
- [ ] The commit message follows [our guidelines](https://github.com/iissnan/hexo-theme-next/blob/master/.github/CONTRIBUTING.md).
- [ ] Tests for the changes have been added (for bug fixes / features).
- [ ] Muse | Mist have been tested.
- [ ] Pisces | Gemini have been tested.
- [ ] Docs have been added / updated (for bug fixes / features).
## PR Type
**What kind of change does this PR introduce?** <!-- (Check one with "x") -->
- [ ] Bugfix.
- [ ] Feature.
- [ ] Code style update (formatting, local variables).
- [ ] Refactoring (no functional changes, no api changes).
- [ ] Build related changes.
- [ ] CI related changes.
- [ ] Documentation content changes.
- [ ] Other... Please describe:
## What is the current behavior?
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
Issue Number(s): N/A
## What is the new behavior?
Description about this pull, in several words...
* Screens with this changes: N/A
* Link to demo site with this changes: N/A
### How to use?
In NexT `_config.yml`:
```yml
...
```
## Does this PR introduce a breaking change?
- [ ] Yes.
- [ ] No.
<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->
<!-- BIG pull template -->
<!--
1. xxxxxxx - commit link on modified file. Just copy this below your pull request readme.
2. You can paste any image directly from your clipboard. Just press **Print Scr** and paste it into pull readme - link on image will generate and paste automaticly.
-->
<!--
## PART X. Title of fixes and/or enhancements.
Short description in several words here.
Issue Number(s): #xxxx.
### Files modified:
1. Short description of modified file [1]. xxxxxxx
2. Short description of modified file [2]. xxxxxxx
3. Short description of modified file [3]. xxxxxxx
### Global code changes:
* ADD: `newFunction` in `utils.js`.
* DEL: `oldFunction` from `utils.js`
### How it looks?
![image](https://user-images.githubusercontent.com/xxxxxxxx/xxxxxxxx-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx.png)
Live demo [here](http://site.com/).
### How to use?
In Next `_config.yml`:
```yml
...
```
-->

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

20
themes/next/.gitignore vendored Normal file
View File

@ -0,0 +1,20 @@
.DS_Store
.idea/
*.log
*.iml
yarn.lock
package-lock.json
node_modules/
# Ignore unused verdors' files
source/lib/fancybox/*
!source/lib/fancybox/source/
source/lib/font-awesome/less/
source/lib/font-awesome/scss/
source/lib/ua-parser-js/*
!source/lib/ua-parser-js/dist/
source/lib/Han/*
!source/lib/Han/dist/

4
themes/next/.hound.yml Normal file
View File

@ -0,0 +1,4 @@
javascript:
enabled: true
config_file: .jshintrc
ignore_file: .javascript_ignore

View File

@ -0,0 +1,5 @@
source/vendors/*
source/lib/*
source/js/src/affix.js
source/js/src/scrollspy.js
source/js/src/js.cookie.js

27
themes/next/.jshintrc Normal file
View File

@ -0,0 +1,27 @@
{
"asi": false,
"bitwise": true,
"browser": true,
"camelcase": true,
"curly": true,
"forin": true,
"immed": true,
"latedef": "nofunc",
"maxlen": 120,
"newcap": true,
"noarg": true,
"noempty": true,
"nonew": true,
"predef": [
"$",
"jQuery",
"NexT",
"CONFIG"
],
"quotmark": true,
"trailing": true,
"undef": true,
"unused": true,
"expr": true
}

45
themes/next/.stylintrc Normal file
View File

@ -0,0 +1,45 @@
{
"blocks": false,
"brackets": "always",
"colons": "always",
"colors": "always",
"commaSpace": "always",
"commentSpace": "always",
"cssLiteral": "never",
"customProperties": [],
"depthLimit": false,
"duplicates": true,
"efficient": "always",
"exclude": [],
"extendPref": false,
"globalDupe": false,
"groupOutputByFile": true,
"indentPref": false,
"leadingZero": "never",
"maxErrors": false,
"maxWarnings": false,
"mixed": false,
"mixins": [],
"namingConvention": "lowercase-dash",
"namingConventionStrict": false,
"none": "never",
"noImportant": true,
"parenSpace": false,
"placeholders": "always",
"prefixVarsWithDollar": "always",
"quotePref": false,
"reporterOptions": {
"columns": ["lineData", "severity", "description", "rule"],
"columnSplitter": " ",
"showHeaders": false,
"truncate": true
},
"semicolons": "always",
"sortOrder": "grouped",
"stackedProperties": false,
"trailingWhitespace": "never",
"universal": false,
"valid": true,
"zeroUnits": "never",
"zIndexNormalize": false
}

17
themes/next/.travis.yml Normal file
View File

@ -0,0 +1,17 @@
language: node_js
node_js: node
cache:
directories:
- node_modules
install: npm install
before_script:
- npm install -g gulp
addons:
browserstack:
username: "ivannginx1"
access_key:
secure: "NutOhdgtUdBUXMPZhy8X1F1Jq+tan1LeNOV0FArBt15SNlxtNArqhiyTi4XnG9MPruX4306aGF2RBrKso+OiGNRdGtRGngH613Q0GWNtlC/boMqnI7fHqLIyCs6S12y2uA8PK4Ifxg9bZ0VtCTYYbMy+p1KvBM//L12vmtfdnby8z5Qvex3tB3dLoPOR50CKkINHJVDLm+iVRFrdz4/83oDsulZSRRGIaxu5taDWPIcp3fYZtre2Nc+RXcsyFDyjN7U0Hvr5tKBbloJxXEQEBv2xLkMOtp85nmCPD06s1Il8Wus1ux3raVsfUyaW5FpNX37Jeb5e00RQUM1wgU5m75H6qiGwDvQswbugJG0i/a2nNfsgVmbrSZdMnkHcx2Uxmrw4ejyEP5NSrJSBi05Ck1fQ4UsZ4Qkdf1fd04SI0LpLWt43eoNO/7rHKsQoP4LCX9gxKUuC075NEBLODyJ529RYfA6dKKwwH6o0ZbOgASmCoAWaM65g4+FHRnJcKL/Kj9ZWklQtRa7/ynlHaA65jefFS2lB8Ut6d3rXDDBih9mIrwV1uUaEH96xgAN42bgU/vY6FGzNkDOYZqj4YfsepDM0wbOsslFie7JZq7iFjsYvrXqLvYUMk37AZwQ2Sb6uH4tIT4Qw/4oZfDzA1En3/8HdZJ28nKW/lzjwMSqheIY="

21
themes/next/LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2014-2017 iissnan
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:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
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.

383
themes/next/README.cn.md Normal file
View File

@ -0,0 +1,383 @@
<p align="right"><a title="New «NexT» 6.0.0 version [Reloaded]" href="https://github.com/theme-next/hexo-theme-next">NexT v6.0.0 here :triangular_flag_on_post:</a></p>
<h1 align="center">NexT</h1>
<p align="center">NexT 是一个高质量并且优雅的<a href="http://hexo.io">Hexo</a> 主题。这是精心制作做出来的 hexo 主题。</p>
[![Join the chat at https://gitter.im/iissnan/hexo-theme-next](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/iissnan/hexo-theme-next?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![mnt-image]][commits-url]
[![travis-image]][travis-url]
[![rel-image]][releases-url]
[![hexo-image]][hexo-url]
[![lic-image]](LICENSE)
* <a href="http://theme-next.iissnan.com" target="_blank">NexT 使用文档</a> | [English Documentation](README.md)
## 实时预览 Live Preview
* :heart_decoration: Muse 方案: [LEAFERx](https://leaferx.online) | [XiaMo](https://notes.wanghao.work) | [OAwan](https://oawan.me)
* :six_pointed_star: Mist 方案: [Jeff](https://blog.zzbd.org) | [uchuhimo](http://uchuhimo.me) | [xirong](http://www.ixirong.com)
* :pisces: Pisces 方案: [Vi](http://notes.iissnan.com) | [Acris](https://acris.me) | [Rainy](https://rainylog.com)
* :gemini: Gemini 方案: [Ivan.Nginx](https://almostover.ru) | [Raincal](https://raincal.com) | [Dandy](https://dandyxu.me)
更多 NexT 例子点击 [这里](https://github.com/iissnan/hexo-theme-next/issues/119).
## 安装 Installation
**1.** 在终端切换到**hexo 根**目录. 在hexo目录下一定有 `node_modules`, `source`, `themes` 和其他文件夹:
```sh
$ cd hexo
$ ls
_config.yml node_modules package.json public scaffolds source themes
```
**2.** 从 github 上获取主题 。这里有几种方式来获取主题:
### 下载[最新发布的版本][releases-latest-url] Download tagged release version
  在大多数情况下 **稳定**。 推荐用户下载这个。
[![curl-tar-wget-image]][curl-tar-wget-url]
```sh
$ mkdir themes/next
$ curl -s https://api.github.com/repos/iissnan/hexo-theme-next/releases/latest | grep tarball_url | cut -d '"' -f 4 | wget -i - -O- | tar -zx -C themes/next --strip-components=1
```
### 下载[标签发布版本][releases-url] Download tagged release version
  您必须定义版本。从[标签列表][tags-url]里选择版本替换`v5.1.2`。
[![curl-tar-image]][curl-tar-url]
```sh
$ mkdir themes/next
$ curl -L https://api.github.com/repos/iissnan/hexo-theme-next/tarball/v5.1.2 | tar -zxv -C themes/next --strip-components=1
```
[![git-image]][git-url]
```sh
$ git clone --branch v5.1.2 https://github.com/iissnan/hexo-theme-next themes/next
```
### 下载[最新的 master 分支][download-latest-url] Download latest master branch
 可能会 **不稳定**, 但是包含最新的特色,推荐开发者下载.
[![curl-tar-image]][curl-tar-url]
```sh
$ mkdir themes/next
$ curl -L https://api.github.com/repos/iissnan/hexo-theme-next/tarball | tar -zxv -C themes/next --strip-components=1
```
[![git-image]][git-url]
```sh
$ git clone https://github.com/iissnan/hexo-theme-next themes/next
```
使用克隆命令,你将得到**整个存储库**。而且在任何时候你都可以切换到任何标签发布版本。
获取标签列表:
```sh
$ cd themes/next
$ git tag -l
v5.0.0
v5.0.1
v5.1.0
v5.1.1
v5.1.2
```
  例如, 你想要切换到`v5.1.0` [标签发布版本][tags-url]. 输入以下命令:
```sh
$ git checkout tags/v5.1.0
Note: checking out 'tags/v5.1.0'.
HEAD now on 1f72f68... CSS: Remove global list-style setting of ul
```
  如果你想切换回 [master 分支][commits-url]的话, 输入这个命令:
```sh
$ git checkout master
```
**3.** 在 **hexo 根目录下** 的配置文件`_config.yml`里设置主题:
theme: next
### Bugs
对于那些遇到 **Error: Cannot find module 'hexo-util'** [问题](https://github.com/iissnan/hexo-theme-next/issues/1490)的人, 请检查你的NPM 版本.
- `版本 > 3`: 如果仍然不行的话,请移除 `node_modules` 文件 然后重新安装,使用 `npm install`命令。
- `版本 < 3`: 请通过`npm install --save-dev hexo-util`命令添加`hexo-util`到你的站点包依赖里
## 更新 Update
```sh
$ cd themes/next
$ git pull
```
### Bugs
> 提交您的更改或存储它们,然后才能合并。
您必须提交,存储或放弃本地更改. 看 [here](https://stackoverflow.com/a/15745424/5861495) 是如何做的。
### 使用Hexo data files([#328](https://github.com/iissnan/hexo-theme-next/issues/328))配置主题 Theme configurations using Hexo data files #328
目前升级 NexT 主题的时候并不是非常的流畅。若使用 `git pull` 的方式,很多时候可能会产生冲突;而下载新版本覆盖安装的方式又需要手动合并主题的 `_config.yml` 文件。
在此修改之前, NexT 建议将配置分离,一部分在 站点的配置文件中,另外一部分在主题的配置文件中。将需要自定的选项放置在 站点配置文件中,从而脱离避免更新主题时可能遇到的麻烦。这种方式是可行,但是有一些缺点:
1. 配置分离成了两个部分
2. 用户可能会疑惑一些选项该放置在哪里比较合适
为了解决这个问题, NexT 将会使用 Hexo 的 [Data Files](https://hexo.io/docs/data-files.html) 。然而由于 Data Files 是在 Hexo 3 版本时引进的,所以要使用这个特性,需要 Hexo 的版本不低于 3。
若你比较喜欢 Hexo 2.x 版本,可以继续使用原先的配置方式。 NexT 保持着向下兼容。
#### 特性 Benefits
通过这个特性,你可以将所有的主题配置放置在站点的 `source/_data/next.yml` 文件中。原先放置在 站点配置文件 中的选项可以迁移到新的位置,同时,主题配置文件可以不用做任何修改。若后续版本有配置相关的改动时,你仅需在 `next.yml` 中做相应调整即可
#### 如何使用这个特性 How to use this feature
1. 请先确保你所使用的 Hexo 版本在 3 以上
2. 在站点的 `source/_data` 目录下新建 `next.yml` 文件(`_data`目录可能需要新建)
3. 迁移站点配置文件和主题配置文件中的配置到 `next.yml` 中
4. 使用 `--config source/_data/next.yml` 参数启动服务器, 生成或者部署。\
  例如: `hexo clean --config source/_data/next.yml && hexo g --config source/_data/next.yml`。
## 特色 Features
### 支持多国语言, 包括:
:cn: 简体中文 & 繁体中文<br>
:us: 英语<br>
:ru: 俄语<br>
:fr: 法语<br>
:de: 德语<br>
:jp: 日语<br>
:indonesia: 印度尼西亚语<br>
:portugal: 葡萄牙语 (巴西)<br>
:kr: 朝鲜语<br>
:it: 意大利语<br>
:netherlands: 荷兰语
默认语言是英语。
```yml
language: en
# language: zh-Hans
# language: zh-hk
# language: zh-tw
# language: ru
# language: fr-FR
# language: de
# language: ja
# language: id
# language: pt
# language: pt-BR
# language: ko
# language: it
# language: nl-NL
```
在站点配置文件`_config.yml`中可以将语言切换成中文
```yml
language: zh-Hans
```
### 评论支持 Comment support
NexT 已经原生支持 `多说` and `Disqus` 评论系统。
添加以下代码到你的主题配置文件 `_config.yml`:
```yml
duoshuo:
enable: true
shortname: your-duoshuo-shortname
```
或者
```yml
disqus_shortname: your-disqus-shortname
```
### 标签页 Tags page
> 添加一个标签页面,里面包含您网站中的所有标签。
- 创建一个名为 `tags` 页面
hexo new page "tags"
- 编辑标签页, 设置页面类型为`tags`.
title: All tags
date: 2014-12-22 12:39:04
type: "tags"
- 添加 `tags` 到主题配置文件 `_config.yml` 里:
menu:
home: /
archives: /archives
tags: /tags
### 分类页 Categories page
> 添加一个分类页面,里面包含您网站中的所有分类。
- 创建一个名为 `categories` 页面
hexo new page "categories"
- 编辑分类页, 设置页面类型为 `categories`.
title: All categories
date: 2014-12-22 12:39:04
type: "categories"
- 添加 `categories` 到主题配置文件 `_config.yml` 里:
menu:
home: /
archives: /archives
categories: /categories
### 社交媒体 Social Media
NexT 可以自动添加链接到您的社交媒体帐户里:
```yml
social:
GitHub: your-github-url
Twitter: your-twitter-url
Weibo: your-weibo-url
DouBan: your-douban-url
ZhiHu: your-zhihu-url
```
### Feed 链接 Feed link
> 显示 feed 链接。
在主题配置文件`_config.yml`里设置`rss` , 如下所示:
1. `rss: false` 会禁用 feed 链接。
2. `rss: ` 使用站点 feed 链接。这是默认的选项。
   按照插件[hexo-generator-feed](https://github.com/hexojs/hexo-generator-feed)的README中的安装说明进行操作。在完成这个插件的配置后Feed链接也生成好了
3. `rss: http://your-feed-url` 设置你的 feed 链接.
### 内置5种代码高亮主题 Up to 5 code highlight themes built-in
NexT 使用的是 [Tomorrow 主题](https://github.com/chriskempson/tomorrow-theme) 一共有5种主题供你选择。
Next 默认使用 `normal`. 下面是 `normal` 和 `night` 主题的预览:
![Tomorrow Normal Preview](http://iissnan.com/nexus/next/tomorrow-normal.png)
![Tomorrow Night Preview](http://iissnan.com/nexus/next/tomorrow-night.png)
查看更多信息点击[Tomorrow 主题](https://github.com/chriskempson/tomorrow-theme)。
## 配置 Configuration
NexT 的配置很少
```yml
# Menu configuration.
menu:
home: /
archives: /archives
# Favicon
favicon: /favicon.ico
# Avatar (put the image into next/source/images/)
# can be any image format supported by web browsers (JPEG,PNG,GIF,SVG,..)
avatar: /default_avatar.png
# Code highlight theme
# available: normal | night | night eighties | night blue | night bright
highlight_theme: normal
# Fancybox for image gallery
fancybox: true
# Specify the date when the site was setup
since: 2013
```
## 浏览器支持 Browser support
![Browser support](http://iissnan.com/nexus/next/browser-support.png)
[![Browser Stack](.github/browserstack_logo.png)](https://www.browserstack.com/)
>**BrowserStack** is a cloud-based cross-browser testing tool that enables developers to test their websites across various browsers on different operating systems and mobile devices, without requiring users to install virtual machines, devices or emulators.
## 贡献 Contributing
接受各种形式的贡献,包括不限于提交问题与需求,修复代码。等待您的`Pull Request`。
Any types of contribution are welcome. Thanks.
**ATTENTION! Contributors on Chinese docs needed!**\
Need to translate from [English docs](README.md) to Chinese docs.\
Any help wanted!\
Thank's a lot!
## 开发 Development
NexT 主旨在于简洁优雅且易于使用所以首先要尽量确保 NexT 的简洁易用性
NexT is built for easily use with elegant appearance. First things first, always keep things simple.
## [开发历史 Changelog](https://github.com/iissnan/hexo-theme-next/wiki/Changelog)
[browser-image]: https://img.shields.io/badge/browser-%20chrome%20%7C%20firefox%20%7C%20opera%20%7C%20safari%20%7C%20ie%20%3E%3D%209-lightgrey.svg
[browser-url]: https://www.browserstack.com
[gitter-image]: https://badges.gitter.im/Join%20Chat.svg
[gitter-url]: https://gitter.im/iissnan/hexo-theme-next?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
[travis-image]: https://travis-ci.org/iissnan/hexo-theme-next.svg?branch=master
[travis-url]: https://travis-ci.org/iissnan/hexo-theme-next?branch=master "Travis CI"
[hexo-image]: https://img.shields.io/badge/hexo-%3E%3D%203.0-blue.svg
[hexo-url]: http://hexo.io
[mnt-image]: https://img.shields.io/maintenance/yes/2017.svg
[rel-image]: https://img.shields.io/github/release/iissnan/hexo-theme-next.svg
<!--[lic-image]: https://img.shields.io/npm/l/hexo-theme-next.svg-->
[lic-image]: https://img.shields.io/dub/l/vibe-d.svg
[git-image]: https://img.shields.io/badge/install%20with%20-git-blue.svg
[curl-tar-image]: https://img.shields.io/badge/install%20with%20-curl%20%7C%20tar-blue.svg
[curl-tar-wget-image]: https://img.shields.io/badge/install%20with%20-curl%20%7C%20tar%20%7C%20wget-blue.svg
[git-url]: http://lmgtfy.com/?q=linux+git+install
[curl-tar-url]: http://lmgtfy.com/?q=linux+curl+tar+install
[curl-tar-wget-url]: http://lmgtfy.com/?q=linux+curl+tar+wget+install
[download-latest-url]: https://github.com/iissnan/hexo-theme-next/archive/master.zip
[releases-latest-url]: https://github.com/iissnan/hexo-theme-next/releases/latest
[releases-url]: https://github.com/iissnan/hexo-theme-next/releases
[tags-url]: https://github.com/iissnan/hexo-theme-next/tags
[commits-url]: https://github.com/iissnan/hexo-theme-next/commits/master

373
themes/next/README.md Normal file
View File

@ -0,0 +1,373 @@
<p align="right"><a title="New «NexT» 6.0.0 version [Reloaded]" href="https://github.com/theme-next/hexo-theme-next">NexT v6.0.0 here :triangular_flag_on_post:</a></p>
<h1 align="center">NexT</h1>
<p align="center">NexT is a high quality elegant <a href="http://hexo.io">Hexo</a> theme. It is crafted from scratch, with love.</p>
[![gitter-image]][gitter-url]
[![mnt-image]](https://github.com/theme-next/hexo-theme-next)
[![travis-image]][travis-url]
[![rel-image]][releases-url]
[![hexo-image]][hexo-url]
[![lic-image]](LICENSE)
* [Chinese Documentation](README.cn.md)
## Live Preview
* :heart_decoration: Muse scheme: [LEAFERx](https://leaferx.online) | [XiaMo](https://notes.wanghao.work) | [OAwan](https://oawan.me)
* :six_pointed_star: Mist scheme: [Jeff](https://blog.zzbd.org) | [uchuhimo](http://uchuhimo.me) | [xirong](http://www.ixirong.com)
* :pisces: Pisces scheme: [Vi](http://notes.iissnan.com) | [Acris](https://acris.me) | [Rainy](https://rainylog.com)
* :gemini: Gemini scheme: [Ivan.Nginx](https://almostover.ru) | [Raincal](https://raincal.com) | [Dandy](https://dandyxu.me)
More NexT examples [here](https://github.com/iissnan/hexo-theme-next/issues/119).
## Installation
**1.** Change dir to **hexo root** directory. There must be `node_modules`, `source`, `themes` and other directories:
```sh
$ cd hexo
$ ls
_config.yml node_modules package.json public scaffolds source themes
```
**2.** Get theme from GitHub. There are several variants to do it:
### Download [latest release version][releases-latest-url].
At most cases **stable**. Recommended for most users.
[![curl-tar-wget-image]][curl-tar-wget-url]
```sh
$ mkdir themes/next
$ curl -s https://api.github.com/repos/iissnan/hexo-theme-next/releases/latest | grep tarball_url | cut -d '"' -f 4 | wget -i - -O- | tar -zx -C themes/next --strip-components=1
```
### Download [tagged release version][releases-url].
You must define version. Replace `v5.1.2` with any version from [tags list][tags-url].
[![curl-tar-image]][curl-tar-url]
```sh
$ mkdir themes/next
$ curl -L https://api.github.com/repos/iissnan/hexo-theme-next/tarball/v5.1.2 | tar -zxv -C themes/next --strip-components=1
```
[![git-image]][git-url]
```sh
$ git clone --branch v5.1.2 https://github.com/iissnan/hexo-theme-next themes/next
```
### Download [latest master branch][download-latest-url].
May be **unstable**, but includes latest features. Recommended for developers.
[![curl-tar-image]][curl-tar-url]
```sh
$ mkdir themes/next
$ curl -L https://api.github.com/repos/iissnan/hexo-theme-next/tarball | tar -zxv -C themes/next --strip-components=1
```
[![git-image]][git-url]
```sh
$ git clone https://github.com/iissnan/hexo-theme-next themes/next
```
Clone command will give you the **whole repository**. And in any time you can switch to any tagged release.\
Get tags list:
```sh
$ cd themes/next
$ git tag -l
v5.0.0
v5.0.1
v5.1.0
v5.1.1
v5.1.2
```
For example, you want to switch on `v5.1.0` [tagged release version][tags-url]. Input the following command:
```sh
$ git checkout tags/v5.1.0
Note: checking out 'tags/v5.1.0'.
HEAD now on 1f72f68... CSS: Remove global list-style setting of ul
```
And if you want to switch back on [master branch][commits-url], input this command:
```sh
$ git checkout master
```
**3.** Set theme in main **hexo root config** `_config.yml` file:
theme: next
### Bugs
For those who also encounter **Error: Cannot find module 'hexo-util'** [issue](https://github.com/iissnan/hexo-theme-next/issues/1490), please check your NPM version.
- `> 3`: Still not work. Please remove `node_modules` directory and reinstall using `npm install`.
- `< 3`: Please add `hexo-util` explicitly via `npm install --save-dev hexo-util` to you site package deps.
## Update
```sh
$ cd themes/next
$ git pull
```
### Bugs
> Commit your changes or stash them before you can merge
You must Commit, Stash or Discard local changes. See [here](https://stackoverflow.com/a/15745424/5861495) how to do it.
### Theme configurations using Hexo data files ([#328](https://github.com/iissnan/hexo-theme-next/issues/328))
Currently, it is not smooth to update NexT theme from pulling or downloading new releases. It is quite often running into conflict status when updating NexT theme via `git pull`, or need to merge configurations manually when upgrading to new releases.
At present, NexT encourages users to store some options in site's `_config.yml` and other options in theme's `_config.yml`. This approach is applicable, but has some drawbacks:
1. Configurations are splited into two pieces
2. Users maybe confuse which place should be for options
In order to resolve this issue, NexT will take advantage of Hexo [Data files](https://hexo.io/docs/data-files.html). Because Data files is introduced in Hexo 3, so you need upgrade Hexo to 3.0 (or above) to use this feature.
If you prefer Hexo 2.x, you can still use the old approach for configurations. NexT is still compatible with Hexo 2.x.
#### Benefits
With this feature, now you can put all your configurations into one place (`source/_data/next.yml`), you don't need to touch `next/_config.yml`. If there are any new options in new releases, you just need to copy those options from `next/_config.yml`, paste into `_data/next.yml` and set their values to whatever you want.
#### How to use this feature
1. Please ensure you are using Hexo 3 (or above)
2. Create an file named `next.yml` in site's `source/_data` directory (create `_data` directory if it did not exist)
3. Copy NexT theme options both in site's `_config.yml` and theme's `_config.yml` into `next.yml`.
4. Use `--config source/_data/next.yml` parameter to start server, generate or deploy.\
For example: `hexo clean --config source/_data/next.yml && hexo g --config source/_data/next.yml`.
## Features
### Multiple languages support, including:
:cn: Simplified Chinese & Traditional Chinese.<br>
:us: English<br>
:ru: Russian<br>
:fr: French<br>
:de: German<br>
:jp: Japanese<br>
:indonesia: Indonesian<br>
:portugal: Portuguese (Brazil)<br>
:kr: Korean<br>
:it: Italian<br>
:netherlands: Dutch<br>
:vietnam: Vietnamese
Default language is English.
```yml
language: en
# language: zh-Hans
# language: zh-hk
# language: zh-tw
# language: ru
# language: fr-FR
# language: de
# language: ja
# language: id
# language: pt
# language: pt-BR
# language: ko
# language: it
# language: nl-NL
# language: vi
```
Set `language` field as following in site `_config.yml` to change to Chinese.
```yml
language: zh-Hans
```
### Comment support.
NexT has native support for `DuoShuo` and `Disqus` comment systems.
Add the following snippets to your `_config.yml`:
```yml
duoshuo:
enable: true
shortname: your-duoshuo-shortname
```
OR
```yml
disqus_shortname: your-disqus-shortname
```
### Tags page.
> Add a tags page contains all tags in your site.
- Create a page named `tags`
hexo new page "tags"
- Edit tags page, set page type to `tags`.
title: All tags
date: 2014-12-22 12:39:04
type: "tags"
- Add `tags` to theme `_config.yml`:
menu:
home: /
archives: /archives
tags: /tags
### Categories page.
> Add a categories page contains all categories in your site.
- Create a page named `categories`
hexo new page "categories"
- Edit categories page, set page type to `categories`.
title: All categories
date: 2014-12-22 12:39:04
type: "categories"
- Add `categories` to theme `_config.yml`:
menu:
home: /
archives: /archives
categories: /categories
### Social Media
NexT can automatically add links to your Social Media accounts:
```yml
social:
GitHub: your-github-url
Twitter: your-twitter-url
Weibo: your-weibo-url
DouBan: your-douban-url
ZhiHu: your-zhihu-url
```
### Feed link.
> Show a feed link.
Set `rss` field in theme's `_config.yml`, as the following value:
1. `rss: false` will totally disable feed link.
2. `rss: ` use sites' feed link. This is the default option.
Follow the installation instruction in the plugin's README. After the configuration is done for this plugin, the feed link is ready too.
3. `rss: http://your-feed-url` set specific feed link.
### Up to 5 code highlight themes built-in.
NexT uses [Tomorrow Theme](https://github.com/chriskempson/tomorrow-theme) with 5 themes for you to choose from.
Next use `normal` by default. Have a preview about `normal` and `night`:
![Tomorrow Normal Preview](http://iissnan.com/nexus/next/tomorrow-normal.png)
![Tomorrow Night Preview](http://iissnan.com/nexus/next/tomorrow-night.png)
Head over to [Tomorrow Theme](https://github.com/chriskempson/tomorrow-theme) for more details.
## Configuration
NexT comes with few configurations.
```yml
# Menu configuration.
menu:
home: /
archives: /archives
# Favicon
favicon: /favicon.ico
# Avatar (put the image into next/source/images/)
# can be any image format supported by web browsers (JPEG,PNG,GIF,SVG,..)
avatar: /default_avatar.png
# Code highlight theme
# available: normal | night | night eighties | night blue | night bright
highlight_theme: normal
# Fancybox for image gallery
fancybox: true
# Specify the date when the site was setup
since: 2013
```
## Browser support
![browser-image]
[![Browser Stack](.github/browserstack_logo.png)](https://www.browserstack.com/)
>**BrowserStack** is a cloud-based cross-browser testing tool that enables developers to test their websites across various browsers on different operating systems and mobile devices, without requiring users to install virtual machines, devices or emulators.
## Contributing
Contribution is welcome, feel free to open an issue and fork. Waiting for your pull request.
<!--
[![hexo-image]][hexo-url]
[![bower-image]][bower-url]
[![jquery-image]][jquery-url]
[hexo-image]: http://img.shields.io/badge/Hexo-2.4+-2BAF2B.svg?style=flat-square
[hexo-url]: http://hexo.io
[bower-image]: http://img.shields.io/badge/Bower-*-2BAF2B.svg?style=flat-square
[bower-url]: http://bower.io
[jquery-image]: https://img.shields.io/badge/jquery-1.9-blue.svg?style=flat-square
[jquery-url]: http://jquery.com/
-->
[browser-image]: https://img.shields.io/badge/browser-%20chrome%20%7C%20firefox%20%7C%20opera%20%7C%20safari%20%7C%20ie%20%3E%3D%209-lightgrey.svg
[browser-url]: https://www.browserstack.com
[gitter-image]: https://badges.gitter.im/Join%20Chat.svg
[gitter-url]: https://gitter.im/iissnan/hexo-theme-next?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
[travis-image]: https://travis-ci.org/iissnan/hexo-theme-next.svg?branch=master
[travis-url]: https://travis-ci.org/iissnan/hexo-theme-next?branch=master "Travis CI"
[hexo-image]: https://img.shields.io/badge/hexo-%3E%3D%203.0-blue.svg
[hexo-url]: http://hexo.io
[mnt-image]: https://img.shields.io/maintenance/yes/2017.svg
[rel-image]: https://img.shields.io/github/release/iissnan/hexo-theme-next.svg
<!--[lic-image]: https://img.shields.io/npm/l/hexo-theme-next.svg-->
[lic-image]: https://img.shields.io/dub/l/vibe-d.svg
[git-image]: https://img.shields.io/badge/install%20with%20-git-blue.svg
[curl-tar-image]: https://img.shields.io/badge/install%20with%20-curl%20%7C%20tar-blue.svg
[curl-tar-wget-image]: https://img.shields.io/badge/install%20with%20-curl%20%7C%20tar%20%7C%20wget-blue.svg
[git-url]: http://lmgtfy.com/?q=linux+git+install
[curl-tar-url]: http://lmgtfy.com/?q=linux+curl+tar+install
[curl-tar-wget-url]: http://lmgtfy.com/?q=linux+curl+tar+wget+install
[download-latest-url]: https://github.com/iissnan/hexo-theme-next/archive/master.zip
[releases-latest-url]: https://github.com/iissnan/hexo-theme-next/releases/latest
[releases-url]: https://github.com/iissnan/hexo-theme-next/releases
[tags-url]: https://github.com/iissnan/hexo-theme-next/tags
[commits-url]: https://github.com/iissnan/hexo-theme-next/commits/master

825
themes/next/_config.yml Normal file
View File

@ -0,0 +1,825 @@
# ===============================================================
# ========================= ATTENTION! ==========================
# ===============================================================
# NexT repository is moving here: https://github.com/theme-next
# ===============================================================
# It's rebase to v6.0.0 and future maintenance will resume there
# ===============================================================
# ---------------------------------------------------------------
# Theme Core Configuration Settings
# ---------------------------------------------------------------
# Set to true, if you want to fully override the default configuration.
# Useful if you don't want to inherit the theme _config.yml configurations.
override: false
# ---------------------------------------------------------------
# Site Information Settings
# ---------------------------------------------------------------
# To get or check favicons visit: https://realfavicongenerator.net
# Put your favicons into `hexo-site/source/` (recommend) or `hexo-site/themes/next/source/images/` directory.
# Default NexT favicons placed in `hexo-site/themes/next/source/images/` directory.
# And if you want to place your icons in `hexo-site/source/` root directory, you must remove `/images` prefix from pathes.
# For example, you put your favicons into `hexo-site/source/images` directory.
# Then need to rename & redefine they on any other names, otherwise icons from Next will rewrite your custom icons in Hexo.
favicon:
small: /images/hackerrank.png
medium: /images/hackerrank.png
apple_touch_icon: /images/hackerrank.png
safari_pinned_tab: /images/logo.svg
#android_manifest: /images/manifest.json
#ms_browserconfig: /images/browserconfig.xml
# Set default keywords (Use a comma to separate)
keywords: "Hexo, NexT"
# Set rss to false to disable feed link.
# Leave rss as empty to use site's feed link.
# Set rss to specific value if you have burned your feed already.
rss:
footer:
# Specify the date when the site was setup.
# If not defined, current year will be used.
since: 2019
# Icon between year and copyright info.
icon: user
# If not defined, will be used `author` from Hexo main config.
copyright:
# -------------------------------------------------------------
# Hexo link (Powered by Hexo).
powered: true
theme:
# Theme & scheme info link (Theme - NexT.scheme).
enable: false
# Version info of NexT after scheme info (vX.X.X).
version: false
# -------------------------------------------------------------
# Any custom text can be defined here.
#custom_text: Hosted by <a target="_blank" href="https://pages.github.com">GitHub Pages</a>
# ---------------------------------------------------------------
# SEO Settings
# ---------------------------------------------------------------
# Canonical, set a canonical link tag in your hexo, you could use it for your SEO of blog.
# See: https://support.google.com/webmasters/answer/139066
# Tips: Before you open this tag, remember set up your URL in hexo _config.yml ( ex. url: http://yourdomain.com )
canonical: true
# Change headers hierarchy on site-subtitle (will be main site description) and on all post/pages titles for better SEO-optimization.
seo: false
# If true, will add site-subtitle to index page, added in main hexo config.
# subtitle: Subtitle
index_with_subtitle: false
# ---------------------------------------------------------------
# Menu Settings
# ---------------------------------------------------------------
# When running the site in a subdirectory (e.g. domain.tld/blog), remove the leading slash from link value (/archives -> archives).
# Usage: `Key: /link/ || icon`
# Key is the name of menu item. If translate for this menu will find in languages - this translate will be loaded; if not - Key name will be used. Key is case-senstive.
# Value before `||` delimeter is the target link.
# Value after `||` delimeter is the name of FontAwesome icon. If icon (with or without delimeter) is not specified, question icon will be loaded.
menu:
home: / || home
about: /about/ || user
tags: /tags/ || tags
categories: /categories/ || th
archives: /archives/ || archive
#schedule: /schedule/ || calendar
#sitemap: /sitemap.xml || sitemap
#commonweal: /404/ || heartbeat
bookmarks: /bookmarks/ || map
# Enable/Disable menu icons.
menu_icons:
enable: true
sitemap:
path: sitemap.xml
baidusitemap:
path: baidusitemap.xml
# ---------------------------------------------------------------
# Scheme Settings
# ---------------------------------------------------------------
# Schemes
#scheme: Muse
#scheme: Mist
#scheme: Pisces
scheme: Gemini
# ---------------------------------------------------------------
# Sidebar Settings
# ---------------------------------------------------------------
# Social Links.
# Usage: `Key: permalink || icon`
# Key is the link label showing to end users.
# Value before `||` delimeter is the target permalink.
# Value after `||` delimeter is the name of FontAwesome icon. If icon (with or without delimeter) is not specified, globe icon will be loaded.
social:
GitHub: https://github.com/Cool-Y || github
#Weibo: http://weibo.com/HanYanOpenFire || weibo
E-Mail: mailto:cool.yim@whu.edu.cn || envelope
#Google: https://plus.google.com/yourname || google
#Twitter: https://twitter.com/yourname || twitter
#FB Page: https://www.facebook.com/yourname || facebook
#VK Group: https://vk.com/yourname || vk
#StackOverflow: https://stackoverflow.com/yourname || stack-overflow
#YouTube: https://youtube.com/yourname || youtube
Instagram: https://www.instagram.com/yan__han/ || instagram
#Skype: skype:yourname?call|chat || skype
social_icons:
enable: true
icons_only: false
transition: false
# Blog rolls
links_icon: link
links_title: Links
links_layout: block
#links_layout: inline
#links:
#Title: http://example.com/
# Sidebar Avatar
# in theme directory(source/images): /images/avatar.gif
# in site directory(source/uploads): /uploads/avatar.gif
avatar: /images/avatar.png
# Table Of Contents in the Sidebar
toc:
enable: true
# Automatically add list number to toc.
number: true
# If true, all words will placed on next lines if header width longer then sidebar width.
wrap: false
# Creative Commons 4.0 International License.
# http://creativecommons.org/
# Available: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | zero
#creative_commons: by-nc-sa
#creative_commons:
sidebar:
# Sidebar Position, available value: left | right (only for Pisces | Gemini).
position: left
#position: right
# Sidebar Display, available value (only for Muse | Mist):
# - post expand on posts automatically. Default.
# - always expand for all pages automatically
# - hide expand only when click on the sidebar toggle icon.
# - remove Totally remove sidebar including sidebar toggle.
display: post
#display: always
#display: hide
#display: remove
# Sidebar offset from top menubar in pixels (only for Pisces | Gemini).
offset: 12
# Back to top in sidebar (only for Pisces | Gemini).
b2t: false
# Scroll percent label in b2t button.
scrollpercent: false
# Enable sidebar on narrow view (only for Muse | Mist).
onmobile: false
# ---------------------------------------------------------------
# Post Settings
# ---------------------------------------------------------------
# Automatically scroll page to section which is under <!-- more --> mark.
scroll_to_more: true
# Automatically saving scroll position on each post/page in cookies.
save_scroll: false
# Automatically excerpt description in homepage as preamble text.
excerpt_description: true
# Automatically Excerpt. Not recommend.
# Please use <!-- more --> in the post to control excerpt accurately.
auto_excerpt:
enable: true
length: 150
# Post meta display settings
post_meta:
item_text: true
created_at: true
updated_at: false
categories: true
# Post wordcount display settings
# Dependencies: https://github.com/willin/hexo-wordcount
post_wordcount:
item_text: false
wordcount: true
min2read: true
totalcount: true
separated_meta: true
# Wechat Subscriber
#wechat_subscriber:
#enabled: true
#qcode: /path/to/your/wechatqcode ex. /uploads/wechat-qcode.jpg
#description: ex. subscribe to my blog by scanning my public wechat account
# Reward
reward_comment: 您的支持将鼓励我继续创作!
wechatpay: /images/Wechatpay.png
alipay: /images/Alipay.png
# Declare license on posts
post_copyright:
enable: false
license: CC BY-NC-SA 3.0
license_url: https://creativecommons.org/licenses/by-nc-sa/3.0/
# ---------------------------------------------------------------
# Misc Theme Settings
# ---------------------------------------------------------------
# Reduce padding / margin indents on devices with narrow width.
mobile_layout_economy: false
# Android Chrome header panel color ($black-deep).
android_chrome_color: "#222"
# Custom Logo.
# !!Only available for Default Scheme currently.
# Options:
# enabled: [true/false] - Replace with specific image
# image: url-of-image - Images's url
custom_logo:
enabled: false
image:
# Code Highlight theme
# Available value:
# normal | night | night eighties | night blue | night bright
# https://github.com/chriskempson/tomorrow-theme
highlight_theme: normal
# ---------------------------------------------------------------
# Font Settings
# - Find fonts on Google Fonts (https://www.google.com/fonts)
# - All fonts set here will have the following styles:
# light, light italic, normal, normal italic, bold, bold italic
# - Be aware that setting too much fonts will cause site running slowly
# - Introduce in 5.0.1
# ---------------------------------------------------------------
# CAUTION! Safari Version 10.1.2 bug: https://github.com/iissnan/hexo-theme-next/issues/1844
# To avoid space between header and sidebar in Pisces / Gemini themes recommended to use Web Safe fonts for `global` (and `logo`):
# Arial | Tahoma | Helvetica | Times New Roman | Courier New | Verdana | Georgia | Palatino | Garamond | Comic Sans MS | Trebuchet MS
# ---------------------------------------------------------------
font:
enable: false
# Uri of fonts host. E.g. //fonts.googleapis.com (Default).
host:
# Font options:
# `external: true` will load this font family from `host` above.
# `family: Times New Roman`. Without any quotes.
# `size: xx`. Use `px` as unit.
# Global font settings used on <body> element.
global:
external: true
family: Lato
size:
# Font settings for Headlines (h1, h2, h3, h4, h5, h6).
# Fallback to `global` font settings.
headings:
external: true
family:
size:
# Font settings for posts.
# Fallback to `global` font settings.
posts:
external: true
family:
# Font settings for Logo.
# Fallback to `global` font settings.
logo:
external: true
family:
size:
# Font settings for <code> and code blocks.
codes:
external: true
family:
size:
# ---------------------------------------------------------------
# Third Party Services Settings
# ---------------------------------------------------------------
# MathJax Support
mathjax:
enable: false
per_page: false
cdn: //cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML
# Han Support docs: https://hanzi.pro/
han: false
# Swiftype Search API Key
#swiftype_key:
# Baidu Analytics ID
#baidu_analytics:
# Duoshuo ShortName
#duoshuo_shortname:
# Disqus
disqus:
enable: false
shortname:
count: true
# Hypercomments
#hypercomments_id:
# changyan
changyan:
enable: false
appid:
appkey:
# Valine.
# You can get your appid and appkey from https://leancloud.cn
# more info please open https://valine.js.org
valine:
enable: false
appid: # your leancloud application appid
appkey: # your leancloud application appkey
notify: false # mail notifier , https://github.com/xCss/Valine/wiki
verify: false # Verification code
placeholder: Just go go # comment box placeholder
avatar: mm # gravatar style
guest_info: nick,mail,link # custom comment header
pageSize: 10 # pagination size
# Support for youyan comments system.
# You can get your uid from http://www.uyan.cc
#youyan_uid: your uid
# Support for LiveRe comments system.
# You can get your uid from https://livere.com/insight/myCode (General web site)
#livere_uid: your uid
# Gitment
# Introduction: https://imsun.net/posts/gitment-introduction/
# You can get your Github ID from https://api.github.com/users/<Github username>
gitment:
enable: true
mint: true # RECOMMEND, A mint on Gitment, to support count, language and proxy_gateway
count: true # Show comments count in post meta area
lazy: false # Comments lazy loading with a button
cleanly: false # Hide 'Powered by ...' on footer, and more
language: # Force language, or auto switch by theme
github_user: Cool-Y # 此处 - Your Github ID
github_repo: gitment-comments # 此处注意 - The repo you use to store Gitment comments
client_id: 180955a2c3ae3d966d9a # 此处 - Github client id for the Gitment
client_secret: 1c5db4da72df5e6fc318d12afe5f4406f7c54343 # 此处 - Github access secret token for the Gitment
proxy_gateway: # Address of api proxy, See: https://github.com/aimingoo/intersect
redirect_protocol: # Protocol of redirect_uri with force_redirect_protocol when mint enabled
# Baidu Share
# Available value:
# button | slide
# Warning: Baidu Share does not support https.
#baidushare:
## type: button
# Share
# This plugin is more useful in China, make sure you known how to use it.
# And you can find the use guide at official webiste: http://www.jiathis.com/.
# Warning: JiaThis does not support https.
#jiathis:
##uid: Get this uid from http://www.jiathis.com/
#add_this_id:
# Share
#duoshuo_share: true
# NeedMoreShare2
# This plugin is a pure javascript sharing lib which is useful in China.
# See: https://github.com/revir/need-more-share2
# Also see: https://github.com/DzmVasileusky/needShareButton
# iconStyle: default | box
# boxForm: horizontal | vertical
# position: top / middle / bottom + Left / Center / Right
# networks: Weibo,Wechat,Douban,QQZone,Twitter,Linkedin,Mailto,Reddit,
# Delicious,StumbleUpon,Pinterest,Facebook,GooglePlus,Slashdot,
# Technorati,Posterous,Tumblr,GoogleBookmarks,Newsvine,
# Evernote,Friendfeed,Vkontakte,Odnoklassniki,Mailru
needmoreshare2:
enable: false
postbottom:
enable: false
options:
iconStyle: box
boxForm: horizontal
position: bottomCenter
networks: Weibo,Wechat,Douban,QQZone,Twitter,Facebook
float:
enable: false
options:
iconStyle: box
boxForm: horizontal
position: middleRight
networks: Weibo,Wechat,Douban,QQZone,Twitter,Facebook
# Google Webmaster tools verification setting
# See: https://www.google.com/webmasters/
#google_site_verification:
# Google Analytics
#google_analytics:
# Bing Webmaster tools verification setting
# See: https://www.bing.com/webmaster/
#bing_site_verification:
# Yandex Webmaster tools verification setting
# See: https://webmaster.yandex.ru/
#yandex_site_verification:
# CNZZ count
#cnzz_siteid:
# Application Insights
# See https://azure.microsoft.com/en-us/services/application-insights/
# application_insights:
# Make duoshuo show UA
# user_id must NOT be null when admin_enable is true!
# you can visit http://dev.duoshuo.com get duoshuo user id.
duoshuo_info:
ua_enable: true
admin_enable: false
user_id: 0
#admin_nickname: Author
# Post widgets & FB/VK comments settings.
# ---------------------------------------------------------------
# Facebook SDK Support.
# https://github.com/iissnan/hexo-theme-next/pull/410
facebook_sdk:
enable: false
app_id: #<app_id>
fb_admin: #<user_id>
like_button: #true
webmaster: #true
# Facebook comments plugin
# This plugin depends on Facebook SDK.
# If facebook_sdk.enable is false, Facebook comments plugin is unavailable.
facebook_comments_plugin:
enable: false
num_of_posts: 10 # min posts num is 1
width: 100% # default width is 550px
scheme: light # default scheme is light (light or dark)
# VKontakte API Support.
# To get your AppID visit https://vk.com/editapp?act=create
vkontakte_api:
enable: false
app_id: #<app_id>
like: true
comments: true
num_of_posts: 10
# Star rating support to each article.
# To get your ID visit https://widgetpack.com
rating:
enable: false
id: #<app_id>
color: fc6423
# ---------------------------------------------------------------
# Show number of visitors to each article.
# You can visit https://leancloud.cn get AppID and AppKey.
leancloud_visitors:
enable: true
app_id: EWwoJgHNdlj6iBjiFlMcabUO-gzGzoHsz
app_key: x8FxDrYG79C8YFrTww9ljo8K
# Another tool to show number of visitors to each article.
# visit https://console.firebase.google.com/u/0/ to get apiKey and projectId
# visit https://firebase.google.com/docs/firestore/ to get more information about firestore
firestore:
enable: false
collection: articles #required, a string collection name to access firestore database
apiKey: #required
projectId: #required
bluebird: false #enable this if you want to include bluebird 3.5.1(core version) Promise polyfill
# Show PV/UV of the website/page with busuanzi.
# Get more information on http://ibruce.info/2015/04/04/busuanzi/
busuanzi_count:
# count values only if the other configs are false
enable: true
# custom uv span for the whole site
site_uv: true
site_uv_header: <i class="fa fa-user"></i>
site_uv_footer:
# custom pv span for the whole site
site_pv: true
site_pv_header: <i class="fa fa-eye"></i>
site_pv_footer:
# custom pv span for one page only
page_pv: false
page_pv_header: <i class="fa fa-file-o"></i>
page_pv_footer:
# Tencent analytics ID
# tencent_analytics:
# Tencent MTA ID
# tencent_mta:
# Enable baidu push so that the blog will push the url to baidu automatically which is very helpful for SEO
baidu_push: true
# Google Calendar
# Share your recent schedule to others via calendar page
#
# API Documentation:
# https://developers.google.com/google-apps/calendar/v3/reference/events/list
calendar:
enable: false
calendar_id: <required>
api_key: <required>
orderBy: startTime
offsetMax: 24
offsetMin: 4
timeZone:
showDeleted: false
singleEvents: true
maxResults: 250
# Algolia Search
algolia_search:
enable: false
hits:
per_page: 10
labels:
input_placeholder: Search for Posts
hits_empty: "We didn't find any results for the search: ${query}"
hits_stats: "${hits} results found in ${time} ms"
# Local search
# Dependencies: https://github.com/flashlab/hexo-generator-search
local_search:
enable: true
# if auto, trigger search by changing input
# if manual, trigger search by pressing enter key or search button
trigger: auto
# show top n results per article, show all results by setting to -1
top_n_per_article: 1
search:
path: search.xml
field: post
format: html
limit: 10000
# ---------------------------------------------------------------
# Tags Settings
# ---------------------------------------------------------------
# External URL with BASE64 encrypt & decrypt.
# Usage: {% exturl text url "title" %}
# Alias: {% extlink text url "title" %}
exturl: false
# Note tag (bs-callout).
note:
# Note tag style values:
# - simple bs-callout old alert style. Default.
# - modern bs-callout new (v2-v3) alert style.
# - flat flat callout style with background, like on Mozilla or StackOverflow.
# - disabled disable all CSS styles import of note tag.
style: simple
icons: false
border_radius: 3
# Offset lighter of background in % for modern and flat styles (modern: -12 | 12; flat: -18 | 6).
# Offset also applied to label tag variables. This option can work with disabled note tag.
light_bg_offset: 0
# Label tag.
label: true
# Tabs tag.
tabs:
enable: true
transition:
tabs: false
labels: true
border_radius: 0
#! ---------------------------------------------------------------
#! DO NOT EDIT THE FOLLOWING SETTINGS
#! UNLESS YOU KNOW WHAT YOU ARE DOING
#! ---------------------------------------------------------------
# Use velocity to animate everything.
motion:
enable: true
async: false
transition:
# Transition variants:
# fadeIn | fadeOut | flipXIn | flipXOut | flipYIn | flipYOut | flipBounceXIn | flipBounceXOut | flipBounceYIn | flipBounceYOut
# swoopIn | swoopOut | whirlIn | whirlOut | shrinkIn | shrinkOut | expandIn | expandOut
# bounceIn | bounceOut | bounceUpIn | bounceUpOut | bounceDownIn | bounceDownOut | bounceLeftIn | bounceLeftOut | bounceRightIn | bounceRightOut
# slideUpIn | slideUpOut | slideDownIn | slideDownOut | slideLeftIn | slideLeftOut | slideRightIn | slideRightOut
# slideUpBigIn | slideUpBigOut | slideDownBigIn | slideDownBigOut | slideLeftBigIn | slideLeftBigOut | slideRightBigIn | slideRightBigOut
# perspectiveUpIn | perspectiveUpOut | perspectiveDownIn | perspectiveDownOut | perspectiveLeftIn | perspectiveLeftOut | perspectiveRightIn | perspectiveRightOut
post_block: fadeIn
post_header: slideDownIn
post_body: slideDownIn
coll_header: slideLeftIn
# Only for Pisces | Gemini.
sidebar: slideUpIn
# Fancybox
fancybox: true
# Progress bar in the top during page loading.
pace: false
# Themes list:
#pace-theme-big-counter
#pace-theme-bounce
#pace-theme-barber-shop
#pace-theme-center-atom
#pace-theme-center-circle
#pace-theme-center-radar
#pace-theme-center-simple
#pace-theme-corner-indicator
#pace-theme-fill-left
#pace-theme-flash
#pace-theme-loading-bar
#pace-theme-mac-osx
#pace-theme-minimal
# For example
# pace_theme: pace-theme-center-simple
pace_theme: pace-theme-minimal
# Canvas-nest
canvas_nest: false
# three_waves
three_waves: false
# canvas_lines
canvas_lines: false
# canvas_sphere
canvas_sphere: false
# Only fit scheme Pisces
# Canvas-ribbon
# size: The width of the ribbon.
# alpha: The transparency of the ribbon.
# zIndex: The display level of the ribbon.
canvas_ribbon:
enable: false
size: 300
alpha: 0.6
zIndex: -1
# Script Vendors.
# Set a CDN address for the vendor you want to customize.
# For example
# jquery: https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js
# Be aware that you should use the same version as internal ones to avoid potential problems.
# Please use the https protocol of CDN files when you enable https on your site.
vendors:
# Internal path prefix. Please do not edit it.
_internal: lib
# Internal version: 2.1.3
jquery:
# Internal version: 2.1.5
# See: http://fancyapps.com/fancybox/
fancybox:
fancybox_css:
# Internal version: 1.0.6
# See: https://github.com/ftlabs/fastclick
fastclick:
# Internal version: 1.9.7
# See: https://github.com/tuupola/jquery_lazyload
lazyload:
# Internal version: 1.2.1
# See: http://VelocityJS.org
velocity:
# Internal version: 1.2.1
# See: http://VelocityJS.org
velocity_ui:
# Internal version: 0.7.9
# See: https://faisalman.github.io/ua-parser-js/
ua_parser:
# Internal version: 4.6.2
# See: http://fontawesome.io/
fontawesome:
# Internal version: 1
# https://www.algolia.com
algolia_instant_js:
algolia_instant_css:
# Internal version: 1.0.2
# See: https://github.com/HubSpot/pace
# Or use direct links below:
# pace: //cdn.bootcss.com/pace/1.0.2/pace.min.js
# pace_css: //cdn.bootcss.com/pace/1.0.2/themes/blue/pace-theme-flash.min.css
pace:
pace_css:
# Internal version: 1.0.0
# https://github.com/hustcc/canvas-nest.js
canvas_nest:
# three
three:
# three_waves
# https://github.com/jjandxa/three_waves
three_waves:
# three_waves
# https://github.com/jjandxa/canvas_lines
canvas_lines:
# three_waves
# https://github.com/jjandxa/canvas_sphere
canvas_sphere:
# Internal version: 1.0.0
# https://github.com/zproo/canvas-ribbon
canvas_ribbon:
# Internal version: 3.3.0
# https://github.com/ethantw/Han
han:
# needMoreShare2
# https://github.com/revir/need-more-share2
needMoreShare2:
# Assets
css: css
js: js
images: images
# Theme version
version: 5.1.4

37
themes/next/bower.json Normal file
View File

@ -0,0 +1,37 @@
{
"name": "isn-next",
"version": "5.1.4",
"homepage": "https://github.com/iissnan/hexo-theme-next",
"authors": [
"iissnan <iissnan@gmail.com>"
],
"description": "Elegant theme for Hexo",
"repository": "https://github.com/iissnan/hexo-theme-next",
"keywords": [
"hexo",
"notes",
"theme",
"iissnan",
"NexT"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"source/lib",
"test",
"tests",
"screenshots"
],
"dependencies": {
"fancybox": "~2.1.5",
"velocity": "~1.2.1",
"jquery": "http://code.jquery.com/jquery-2.1.3.min.js",
"fastclick": "~1.0.6",
"font-awesome": "fontawesome#*",
"jquery_lazyload": "jquery.lazyload#~1.9.7",
"ua-parser-js": "~0.7.9",
"Han": "^3.3.0"
}
}

View File

@ -0,0 +1,54 @@
fs = require('fs')
path = require('path')
gulp = require('gulp')
jshint = require('gulp-jshint')
stylish = require('jshint-stylish')
shell = require('gulp-shell')
yaml = require('js-yaml')
gulp.task 'lint', ->
return gulp.src([
'./source/js/src/utils.js',
'./source/js/src/motion.js',
'./source/js/src/hook-duoshuo.js',
'./source/js/src/algolia-search.js',
'./source/js/src/bootstrap.js',
'./source/js/src/post-details.js',
'./source/js/src/schemes/pisces.js'
]).pipe jshint()
.pipe jshint.reporter(stylish)
gulp.task 'lint:stylus', shell.task [
'"./node_modules/.bin/stylint" ./source/css/'
]
gulp.task 'validate:config', (cb) ->
themeConfig = fs.readFileSync path.join(__dirname, '_config.yml')
try
yaml.safeLoad(themeConfig)
cb()
catch error
cb new Error(error)
gulp.task 'validate:languages', (cb) ->
languagesPath = path.join __dirname, 'languages'
languages = fs.readdirSync languagesPath
errors = []
for lang in languages
languagePath = path.join languagesPath, lang
try
yaml.safeLoad fs.readFileSync(languagePath), {
filename: path.relative(__dirname, languagePath)
}
catch error
errors.push error
if errors.length == 0
cb()
else
cb(errors)
gulp.task 'default', ['lint', 'validate:config', 'validate:languages']

View File

@ -0,0 +1,90 @@
title:
archive: Archiv
category: Kategorie
tag: Tag
author: Author
menu:
home: Startseite
archives: Archiv
categories: Kategorien
tags: Tags
about: Über
feed: RSS
search: Suche
sidebar:
overview: Übersicht
toc: Inhaltsverzeichnis
post:
created: Post created
sticky: Sticky
posted: Veröffentlicht am
modified: Updated at
in: in
read_more: Weiterlesen
untitled: Unbenannt
toc_empty: Dieser Artikel hat kein Inhaltsverzeichnis
visitors: Visitors
wordcount: Words count in article
min2read: Reading time
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'
page:
totally: Gesamt
tags: tags
footer:
powered: "Erstellt mit %s"
theme: Theme
counter:
tag_cloud:
zero: Keine Tags
one: Insgesamt ein Tag
other: "Insgesamt %d Tags"
categories:
zero: Keine Kategorien
one: Insgesamt eine Kategorie
other: "Insgesamt %d Kategorien"
archive_posts:
zero: Keine Artikel vorhanden.
one: Ein Artikel.
other: "Insgesamt %d Artikel."
state:
posts: Artikel
pages: Seiten
tags: Tags
categories: Kategorien
cheers:
um: Öhm..
ok: OK
nice: Schön
good: Gut
great: Wunderbar
excellent: Exzellent
keep_on: Bleib dran.
symbol:
comma: '. '
period: ', '
colon: ':'
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin

View File

@ -0,0 +1,97 @@
title:
archive: Archive
category: Category
tag: Tag
schedule: Schedule
author: Author
menu:
home: Home
archives: Archives
categories: Categories
tags: Tags
about: About
search: Search
schedule: Schedule
sitemap: Sitemap
commonweal: Commonweal 404
sidebar:
overview: Overview
toc: Table of Contents
post:
created: Post created
modified: Post modified
sticky: Sticky
posted: Posted on
in: In
more: more
read_more: Read more
untitled: Untitled
toc_empty: This post does not have a Table of Contents
visitors: Visitors
wordcount: Words count in article
min2read: Reading time
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'
page:
totally: Totally
tags: tags
footer:
powered: "Powered by %s"
theme: Theme
counter:
tag_cloud:
zero: No tags
one: 1 tag in total
other: "%d tags in total"
categories:
zero: No categories
one: 1 category in total
other: "%d categories in total"
archive_posts:
zero: No posts.
one: 1 post.
other: "%d posts in total."
state:
posts: posts
pages: pages
tags: tags
categories: categories
search:
placeholder: Searching...
cheers:
um: Um..
ok: OK
nice: Nice
good: Good
great: Great
excellent: Excellent
keep_on: Keep on posting.
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin

View File

@ -0,0 +1,99 @@
title:
archive: Archive
category: Category
tag: Tag
schedule: Schedule
author: Author
menu:
home: Home
archives: Archives
categories: Categories
tags: Tags
about: About
search: Search
schedule: Schedule
sitemap: Sitemap
commonweal: Commonweal 404
sidebar:
overview: Overview
toc: Table of Contents
post:
created: Post created
modified: Post modified
sticky: Sticky
posted: Posted on
in: In
more: more
read_more: Read more
untitled: Untitled
toc_empty: This post does not have a Table of Contents
visitors: Visitors
wordcount: Words count in article
min2read: Reading time
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'
page:
totally: Totally
tags: tags
footer:
powered: "Powered by %s"
theme: Theme
counter:
tag_cloud:
zero: No tags
one: 1 tag in total
other: "%d tags in total"
categories:
zero: No categories
one: 1 category in total
other: "%d categories in total"
archive_posts:
zero: No posts.
one: 1 post.
other: "%d posts in total."
state:
posts: posts
pages: pages
tags: tags
categories: categories
search:
placeholder: Searching...
cheers:
um: Um..
ok: OK
nice: Nice
good: Good
great: Great
excellent: Excellent
keep_on: Keep on posting.
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin
gitmentbutton: Show comments from Gitment

View File

@ -0,0 +1,88 @@
title:
archive: Archive
category: Catégorie
tag: Tag
author: Author
menu:
home: Accueil
archives: Archives
categories: Categories
tags: Tags
about: A propos
search: recherche
sidebar:
overview: Ensemble
toc: Table Des Matières
post:
sticky: Sticky
posted: Posté le
modified: Updated at
in: In
read_more: Lire la suite
untitled: Non titré
toc_empty: This post does not have a Table of Contents
visitors: Visitors
wordcount: Words count in article
min2read: Reading time
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'
page:
totally: Total
tags: tags
footer:
powered: "Powered by %s"
theme: Thème
counter:
tag_cloud:
zero: Aucun tags
one: 1 tag au total
other: "%d tags au total"
categories:
zero: Aucun categories
one: 1 category au total
other: "%d categories au total"
archive_posts:
zero: Aucun article.
one: 1 article.
other: "%d articles au total."
state:
posts: articles
pages: pages
tags: tags
categories: categories
cheers:
um: Um..
ok: OK
nice: Jolie
good: Bien
great: Super
excellent: Excellent
keep_on: Et ca ne fait que commencer.
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin

View File

@ -0,0 +1,88 @@
title:
archive: Arsip
category: Kategori
tag: Tag
author: Penulis
menu:
home: Beranda
archives: Arsip
categories: Kategori
tags: Tags
about: Tentang
search: Pencarian
sidebar:
overview: Ikhtisar
toc: Daftar Isi
post:
sticky: Sticky
posted: Diposting di
modified: Updated at
in: Di
read_more: Baca lebih
untitled: Tidak ada title
toc_empty: Posting ini tidak memiliki Daftar Isi
visitors: Pengunjung
wordcount: Words count in article
min2read: Reading time
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'
page:
totally: Total
tags: tags
footer:
powered: "Powered by %s"
theme: Tema
counter:
tag_cloud:
zero: Tidak ada tags
one: 1 total tag
other: "%d total tags"
categories:
zero: Tidak ada kategori
one: 1 total categori
other: "%d total kategori"
archive_posts:
zero: Tidak ada posting.
one: 1 posting.
other: "%d total posting."
state:
posts: posting
pages: halaman
tags: tags
categories: kategori
cheers:
um: Um..
ok: OK
nice: Bagus
good: Bagus
great: Besar
excellent: Baik
keep_on: Terus Posting.
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin

View File

@ -0,0 +1,97 @@
title:
archive: Archivio
category: Categoria
tag: Tag
schedule: Programma
author: Autore
menu:
home: Home
archives: Archivi
categories: Categorie
tags: Tags
about: Informazioni su
search: Cerca
schedule: Programma
sitemap: Sitemap
commonweal: Commonweal 404
sidebar:
overview: Panoramica
toc: Indice
post:
created: Post creato
modified: Post modificato
sticky: Sticky
posted: Scritto il
in: In
more: espandi
read_more: Leggi di più
untitled: Senza titolo
toc_empty: Questo post non ha un indice
visitors: Visitatori
wordcount: Numero di parole nell'articolo
min2read: Tempo di lettura
totalcount: Numero totale di parole
copyright:
author: Autore
link: Link
license_title: Copyright
license_content: 'Tutti gli articoli in questo sito sono sotto licenza
<a href="%s" rel="external nofollow" target="_blank">%s</a> salvo disposizione contraria.'
page:
totally: Totale
tags: tags
footer:
powered: "Powered by %s"
theme: Tema
counter:
tag_cloud:
zero: Nessun tag
one: 1 tag in totale
other: "%d tags in totale."
categories:
zero: Nessuna categoria
one: 1 categoria in totale
other: "%d categorie in totale."
archive_posts:
zero: Nessun post.
one: 1 post.
other: "%d posts in totale."
state:
posts: posts
pages: pagine
tags: tags
categories: categorie
search:
placeholder: Cerca...
cheers:
um: Mh..
ok: OK
nice: Bello
good: Buono
great: Ottimo
excellent: Eccellente
keep_on: Continua così.
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Dona
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin

View File

@ -0,0 +1,88 @@
title:
archive: アーカイブ
category: カテゴリ
tag: タグ
author: Author
menu:
home: ホーム
archives: アーカイブ
categories: カテゴリ
tags: タグ
about: About
search: 検索
sidebar:
overview: 概要
toc: 見出し
post:
sticky: 固定
posted: 投稿日
modified: Updated at
in: In
read_more: 続きを読む
untitled: 無題
toc_empty: 見出しがありません
visitors: Visitors
wordcount: Words count in article
min2read: Reading time
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'
page:
totally: 全ページ
tags: タグ
footer:
powered: "Powered by %s"
theme: Theme
counter:
tag_cloud:
zero: タグなし
one: "全 1 タグ"
other: "全 %d タグ"
categories:
zero: カテゴリなし
one: "全 1 カテゴリ"
other: "全 %d カテゴリ"
archive_posts:
zero: ポストなし
one: "全 1 ポスト"
other: "全 %d ポスト"
state:
posts: ポスト
pages: ページ
tags: タグ
categories: カテゴリ
cheers:
um: うーん
ok: OK
nice: まあまあ
good: いいね
great: すごい
excellent: 最高
keep_on: もっと書こう!
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin

View File

@ -0,0 +1,88 @@
title:
archive: 아카이브
category: 카테고리
tag: 태그
author: 작성자
menu:
home:
archives: 아카이브
categories: 카테고리
tags: 태그
about: About
search: 검색
sidebar:
overview: 흝어보기
toc: 목차
post:
sticky: 고정
posted: 작성일
modified: Updated at
in: In
read_more: 더 읽어보기
untitled: 제목 없음
toc_empty: 목차 없음
visitors: 방문객
wordcount: Words count in article
min2read: Reading time
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'
page:
totally: 모두
tags: 태그
footer:
powered: "Powered by %s"
theme: Theme
counter:
tag_cloud:
zero: 태그 없음
one: 1개의 태그
other: "총 %d개의 태그"
categories:
zero: 카테고리 없음
one: 1개의 카테고리
other: "총 %d개의 카테고리"
archive_posts:
zero: 포스트 없음
one: 1개의 포스트
other: "총 %d개의 포스트"
state:
posts: 포스트
pages: 페이지
tags: 태그
categories: 카테고리
cheers:
um: 음..
ok: OK
nice: 잘했어요
good: 좋아요
great: 훌륭해요
excellent: 완벽해요
keep_on: 포스트를 마저 작성하세요
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin

View File

@ -0,0 +1,97 @@
title:
archive: Archief
category: Categorie
tag: Label
schedule: Rooster
author: Auteur
menu:
home: Home
archives: Archieven
categories: Categorieën
tags: Labels
about: Over
search: Zoeken
schedule: Rooster
sitemap: Sitemap
commonweal: Gezond verstand 404
sidebar:
overview: Overzicht
toc: Inhoudsopgave
post:
created: Post aangemaakt
modified: Post aangepast
sticky: Sticky
posted: Geplaatst op
in: In
more: meer
read_more: Lees meer
untitled: Naamloos
toc_empty: Deze post heeft geen inhoudsopgave
visitors: Bezoekers
wordcount: Aantal woorden in artikel
min2read: Leestijd
totalcount: Aantal woorden in site
copyright:
author: Post auteur
link: Post link
license_title: Copyright melding
license_content: 'Alle artikelen op deze blog zijn gelicenseerd onder
<a href="%s" rel="external nofollow" target="_blank">%s</a>, mits niet anders aangegeven.'
page:
totally: Totaal
tags: labels
footer:
powered: "Mede mogelijk gemaakt door %s"
theme: Thema
counter:
tag_cloud:
zero: Geen labels
one: 1 label in totaal
other: "%d labels in totaal"
categories:
zero: Geen categorieën
one: 1 categorie in totaal
other: "%d categorieën in totaal"
archive_posts:
zero: Geen posts.
one: 1 post.
other: "%d posts in totaal."
state:
posts: posts
pages: pagina's
tags: labels
categories: categorieën
search:
placeholder: Zoeken...
cheers:
um: Um..
ok: Oké
nice: Leuk
good: Goed
great: Geweldig
excellent: Uitstekend
keep_on: Blijf posten.
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Doneer
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin

View File

@ -0,0 +1,88 @@
title:
archive: Arquivo
category: Categoria
tag: Tag
author: Autor
menu:
home: Home
archives: Arquivos
categories: Categorias
tags: Tags
about: Sobre
search: Pesquisar
sidebar:
overview: Visão geral
toc: Tabela de conteúdo
post:
sticky: Sticky
posted: Postado em
modified: Updated at
in: Em
read_more: Leia mais
untitled: Sem título
toc_empty: Este post não possui tabela de conteúdo
visitors: Visitantes
wordcount: Words count in article
min2read: Reading time
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'
page:
totally: Totalmente
tags: tags
footer:
powered: "Feito com %s"
theme: Tema
counter:
tag_cloud:
zero: Sem tags
one: 1 tag no total de
other: "%d tags no total de"
categories:
zero: Sem categoria
one: 1 categoria no total de
other: "%d categoria no total de"
archive_posts:
zero: Sem posts.
one: 1 post.
other: "%d posts no total."
state:
posts: Posts
pages: Páginas
tags: Tags
categories: Categorias
cheers:
um: Uhmmmm...
ok: OK
nice: Bom
good: Muito Bom
great: Ótimo
excellent: Excelente
keep_on: Continuar no post.
symbol:
comma: '. '
period: ', '
colon: ':'
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin

View File

@ -0,0 +1,88 @@
title:
archive: Arquivo
category: Categoria
tag: Tag
author: Author
menu:
home: Home
archives: Arquivos
categories: Categorias
tags: Tags
about: Sobre
search: Pesquisa
sidebar:
overview: Visão Geral
toc: Tabela de Conteúdo
post:
sticky: Sticky
posted: Postado em
modified: Updated at
in: Em
read_more: Ler mais
untitled: Sem título
toc_empty: Esta publicação não possui uma tabela de conteúdo
visitors: Visitors
wordcount: Words count in article
min2read: Reading time
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'
page:
totally: Totalmente
tags: tags
footer:
powered: "Desenvolvido com amor com %s"
theme: Tema
counter:
tag_cloud:
zero: Sem tags
one: 1 tag no total
other: "%d tags no total"
categories:
zero: Sem categorias
one: 1 categoria no total
other: "%d categorias no total"
archive_posts:
zero: Sem publicações.
one: 1 post.
other: "%d publicações no total."
state:
posts: publicações
pages: páginas
tags: tags
categories: categorias
cheers:
um: Um..
ok: OK
nice: Legal
good: Bom
great: Grandioso
excellent: Excelente
keep_on: Mantenha-se publicando!
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin

View File

@ -0,0 +1,105 @@
title:
archive: Архив
category: Категория
tag: Тэг
schedule: Календарь
author: Автор
menu:
home: Главная
archives: Архив
categories: Категории
tags: Тэги
about: О сайте
search: Поиск
schedule: Календарь
sitemap: Карта сайта
sidebar:
overview: Обзор
toc: Содержание
post:
created: Дата создания записи
modified: Дата обновления записи
sticky: Ссылка
posted: Размещено
in: в категории
more: далее
read_more: Читать полностью
untitled: Без имени
toc_empty: Эта запись без оглавления
visitors: Просмотров
wordcount: Кол-во слов в статье
min2read: Время чтения в минутах
totalcount: Общее кол-во слов в записях
copyright:
author: Автор записи
link: Ссылка на запись
license_title: Информация об авторских правах
license_content: 'Все записи на этом сайте защищены лицензией
<a href="%s" rel="external nofollow" target="_blank">%s</a> если не указано дополнительно.'
page:
totally: Всего
tags: тэги
footer:
powered: "Powered by %s"
theme: Theme
counter:
tag_cloud:
zero: Нет тэгов.
one: 1 тэг.
two: "%d тэга всего."
three: "%d тэга всего."
four: "%d тэга всего."
other: "%d тэгов всего."
categories:
zero: Нет категорий.
one: 1 категория.
two: "%d категории всего."
three: "%d категории всего."
four: "%d категории всего."
other: "%d категорий всего."
archive_posts:
zero: Нет записей.
one: 1 запись.
two: "%d записи всего."
three: "%d записи всего."
four: "%d записи всего."
other: "%d записей всего."
state:
posts: Архив
pages: Страницы
tags: Тэги
categories: Категории
search:
placeholder: Поиск...
cheers:
um: Эм..
ok: OK
nice: Неплохо
good: Хорошо
great: Замечательно
excellent: Великолепно
keep_on: Продолжаю писать.
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Донат
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin

View File

@ -0,0 +1,99 @@
title:
archive: Lưu Trữ
category: Phân Loại
tag: Thẻ
schedule: Danh Mục
author: Tác giả
menu:
home: Trang Chủ
archives: Lưu Trữ
categories: Đầu Mục
tags: Thẻ
about: Giới Thiệu
search: Tìm Kiếm
schedule: Danh Mục
sitemap: Bản đồ trang
commonweal: Commonweal 404
sidebar:
overview: Tổng Quan
toc: Mục Lục
post:
created: Được tạo
modified: Được thay đổi
sticky: Đính
posted: Tạo lúc
in: Trong
more: thêm
read_more: Đọc tiếp
untitled: Không có tiêu đề
toc_empty: Bài viết này không có mục lục
visitors: Người xem
wordcount: Số từ trong bài viết
min2read: Thời gian đọc
totalcount: Số từ trong trang
copyright:
author: Người viết
link: Liên kết bài viết
license_title: Chú ý bản quyền
license_content: 'Tất cả bài viết trong blog này được đăng ký bởi
<a href="%s" rel="external nofollow" target="_blank">%s</a> trừ khi có thông báo bổ sung.'
page:
totally: Toàn bộ
tags: thẻ
footer:
powered: "Cung cấp bởi %s"
theme: Giao Diện
counter:
tag_cloud:
zero: Không có thẻ nào
one: có 1 thẻ tất cả
other: "có %d thẻ tất cả"
categories:
zero: Không có trong mục nào
one: có 1 mục tất cả
other: "có %d mục tất cả"
archive_posts:
zero: Không có bài viết.
one: 1 bài viết.
other: "tổng số %d bài viết."
state:
posts: bài viết
pages: trang
tags: thẻ
categories: mục
search:
placeholder: Đang tìm...
cheers:
um: Um..
ok: Đồng Ý
nice: Hay
good: Tốt
great: Tuyệt vời
excellent: Tuyệt cú mèo
keep_on: Giữ tiến độ nha.
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Tài trợ
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin
gitmentbutton: Hiển thị bình luận từ Gitment

View File

@ -0,0 +1,99 @@
title:
archive: 归档
category: 分类
tag: 标签
schedule: 日程表
author: 博主
menu:
home: 首页
archives: 归档
categories: 分类
tags: 标签
about: 关于
search: 搜索
schedule: 日程表
sitemap: 站点地图
commonweal: 公益404
bookmarks: 书签
sidebar:
overview: 站点概览
toc: 文章目录
post:
created: 创建于
modified: 更新于
sticky: 置顶
posted: 发表于
in: 分类于
read_more: 阅读全文
untitled: 未命名
toc_empty: 此文章未包含目录
visitors: 阅读次数
wordcount: 字数统计
min2read: 阅读时长
totalcount: Site words total count
copyright:
author: 本文作者
link: 本文链接
license_title: 版权声明
license_content: '本博客所有文章除特别声明外,均采用
<a href="%s" rel="external nofollow" target="_blank">%s</a> 许可协议。转载请注明出处!'
page:
totally: 共有
tags: 标签
footer:
powered: "由 %s 强力驱动"
theme: 主题
counter:
tag_cloud:
zero: 暂无标签
one: 目前共计 1 个标签
other: "目前共计 %d 个标签"
categories:
zero: 暂无分类
one: 目前共计 1 个分类
other: "目前共计 %d 个分类"
archive_posts:
zero: 暂无日志。
one: 目前共计 1 篇日志。
other: "目前共计 %d 篇日志。"
state:
posts: 日志
pages: 页面
tags: 标签
categories: 分类
search:
placeholder: 搜索...
cheers:
um: 嗯..
ok: OK
nice:
good: 很好
great: 非常好
excellent: 太棒了
keep_on: 继续努力。
symbol:
comma: ' '
period: '。 '
colon: ''
reward:
donate: 打赏
wechatpay: 微信支付
alipay: 支付宝
bitcoin: 比特币
gitmentbutton: 显示 Gitment 评论

View File

@ -0,0 +1,98 @@
title:
archive: 歸檔
category: 分類
tag: 標籤
schedule: 日程表
author: 博主
menu:
home: 首頁
archives: 歸檔
categories: 分類
tags: 標籤
about: 關於
search: 檢索
schedule: 日程表
sitemap: 站點地圖
commonweal: 公益404
sidebar:
overview: 本站概覽
toc: 文章目錄
post:
created: 創建於
modified: 更新於
sticky: 置頂
posted: 發表於
in: 分類於
read_more: 閱讀全文
untitled: 未命名
toc_empty: 此文章未包含目錄
visitors: 閱讀次數
wordcount: 字數統計
min2read: 閱讀時長
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'
page:
totally: 共有
tags: 標籤
footer:
powered: "由 %s 強力驅動"
theme: 主題
counter:
tag_cloud:
zero: 暫無標籤
one: 目前共有 1 個標籤
other: "目前共有 %d 個標籤"
categories:
zero: 暫無分類
one: 目前共有 1 個分類
other: "目前共有 %d 個分類"
archive_posts:
zero: 暫無文章。
one: 目前共有 1 篇文章。
other: "目前共有 %d 篇文章。"
state:
posts: 文章
pages: 頁面
tags: 標籤
categories: 分類
search:
placeholder: 搜索...
cheers:
um: 嗯..
ok: OK
nice:
good: 很好
great: 非常好
excellent: 激爆好
keep_on: 繼續努力。
symbol:
comma: ' '
period: '。 '
colon: ''
reward:
donate: 打賞
wechatpay: 微信支付
alipay: 支付寶
bitcoin: 比特幣
gitmentbutton: 顯示 Gitment 評論

View File

@ -0,0 +1,98 @@
title:
archive: 歸檔
category: 分類
tag: 標籤
schedule: 日程表
author: 博主
menu:
home: 首頁
archives: 歸檔
categories: 分類
tags: 標籤
about: 關於
search: 檢索
schedule: 日程表
sitemap: 站點地圖
commonweal: 公益404
sidebar:
overview: 本站概覽
toc: 文章目錄
post:
created: 創建於
modified: 更新於
sticky: 置頂
posted: 發表於
in: 分類於
read_more: 閱讀全文
untitled: 未命名
toc_empty: 此文章未包含目錄
visitors: 閱讀次數
wordcount: 字數統計
min2read: 閱讀時長
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'
page:
totally: 共有
tags: 標籤
footer:
powered: "由 %s 強力驅動"
theme: 主題
counter:
tag_cloud:
zero: 暫無標籤
one: 目前共計 1 個標籤
other: "目前共計 %d 個標籤"
categories:
zero: 暫無分類
one: 目前共計 1 個分類
other: "目前共計 %d 個分類"
archive_posts:
zero: 暫無文章。
one: 目前共計 1 篇文章。
other: "目前共計 %d 篇文章。"
state:
posts: 文章
pages: 頁面
tags: 標籤
categories: 分類
search:
placeholder: 搜索...
cheers:
um: 嗯..
ok: OK
nice:
good: 很好
great: 非常好
excellent: 非常屌
keep_on: 繼續努力。
symbol:
comma: ' '
period: '。 '
colon: ''
reward:
donate: 打賞
wechatpay: 微信支付
alipay: 支付寶
bitcoin: 比特幣
gitmentbutton: 顯示 Gitment 評論

View File

@ -0,0 +1 @@

View File

@ -0,0 +1 @@

View File

@ -0,0 +1,92 @@
<!DOCTYPE html>
{% set html_class = 'theme-next ' + theme.scheme %}
{% if theme.motion.enable %}
{% set html_class = html_class + ' use-motion' %}
{% endif %}
<html class="{{ html_class | lower }}" lang="{{ config.language }}">
<head>
{% include '_partials/head.swig' %}
<title>{% block title %}{% endblock %}</title>
{% include '_third-party/analytics/index.swig' %}
</head>
<body itemscope itemtype="http://schema.org/WebPage" lang="{{ page.lang || page.language || config.language }}">
{% set container_class = "container " %}
{% if theme.sidebar.position %}
{% set container_class = container_class + 'sidebar-position-' + theme.sidebar.position %}
{% endif %}
<div class="{{ container_class }} {% block page_class %}{% endblock %}">
<div class="headband"></div>
<header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner"> {%- include '_partials/header.swig' %} </div>
</header>
<main id="main" class="main">
<div class="main-inner">
<div class="content-wrap">
<div id="content" class="content">
{% block content %}{% endblock %}
</div>
{% include '_third-party/duoshuo-hot-articles.swig' %}
{% include '_partials/comments.swig' %}
</div>
{% if theme.sidebar.display !== 'remove' %}
{% block sidebar %}{% endblock %}
{% endif %}
</div>
</main>
<footer id="footer" class="footer">
<div class="footer-inner">
{% include '_partials/footer.swig' %}
{% include '_third-party/analytics/analytics-with-widget.swig' %}
{% block footer %}{% endblock %}
</div>
</footer>
{% if not theme.sidebar.b2t %}
<div class="back-to-top">
<i class="fa fa-arrow-up"></i>
{% if theme.sidebar.scrollpercent %}
<span id="scrollpercent"><span>0</span>%</span>
{% endif %}
</div>
{% endif %}
{% if theme.needmoreshare2.enable and theme.needmoreshare2.float.enable %}
<div id="needsharebutton-float">
<span class="btn">
<i class="fa fa-share-alt" aria-hidden="true"></i>
</span>
</div>
{% endif %}
</div>
{% include '_scripts/vendors.swig' %}
{% include '_scripts/commons.swig' %}
{% set scheme_script = '_scripts/schemes/' + theme.scheme | lower + '.swig' %}
{% include scheme_script %}
{% block script_extra %}{% endblock %}
{% include '_scripts/boostrap.swig' %}
{% include '_third-party/comments/index.swig' %}
{% include '_third-party/search/index.swig' %}
{% include '_third-party/analytics/lean-analytics.swig' %}
{% include '_third-party/analytics/firestore.swig' %}
{% include '_third-party/seo/baidu-push.swig' %}
{% include '_third-party/needsharebutton.swig' %}
{% include '_third-party/rating.swig' %}
{% include '_third-party/mathjax.swig' %}
{% include '_third-party/scroll-cookie.swig' %}
{% include '_third-party/exturl.swig' %}
</body>
</html>

View File

@ -0,0 +1,34 @@
{% macro render(post) %}
<article class="post post-type-{{ post.type | default('normal') }}" itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<{% if theme.seo %}h3{% else %}h2{% endif %} class="post-title">
{% if post.link %}{# Link posts #}
<a class="post-title-link post-title-link-external" target="_blank" href="{{ url_for(post.link) }}" itemprop="url">
{{ post.title or post.link }}
<i class="fa fa-external-link"></i>
</a>
{% else %}
<a class="post-title-link" href="{{ url_for(post.path) }}" itemprop="url">
{% if post.type === 'picture' %}
{{ post.content }}
{% else %}
<span itemprop="name">{{ post.title | default(__('post.untitled')) }}</span>
{% endif %}
</a>
{% endif %}
</{% if theme.seo %}h3{% else %}h2{% endif %}>
<div class="post-meta">
<time class="post-time" itemprop="dateCreated"
datetime="{{ moment(post.date).format() }}"
content="{{ date(post.date, config.date_format) }}" >
{{ date(post.date, 'MM-DD') }}
</time>
</div>
</header>
</article>
{% endmacro %}

View File

@ -0,0 +1,14 @@
<ul class="post-copyright">
<li class="post-copyright-author">
<strong>{{ __('post.copyright.author') + __('symbol.colon') }}</strong>
{{ post.author | default(config.author) }}
</li>
<li class="post-copyright-link">
<strong>{{ __('post.copyright.link') + __('symbol.colon') }}</strong>
<a href="{{ post.url | default(post.permalink) }}" title="{{ post.title }}">{{ post.url | default(post.permalink) }}</a>
</li>
<li class="post-copyright-license">
<strong>{{ __('post.copyright.license_title') + __('symbol.colon') }} </strong>
{{ __('post.copyright.license_content', theme.post_copyright.license_url, theme.post_copyright.license) }}
</li>
</ul>

View File

@ -0,0 +1,436 @@
{% macro render(post, is_index, post_extra_class) %}
{% set headlessPost = Array.prototype.indexOf.call(['quote', 'picture'], post.type) > -1 %}
{% set post_class = 'post post-type-' + post.type | default('normal') %}
{% if post_extra_class > 0 %}
{% set post_class = post_class + ' ' + post_extra_class | default('') %}
{% endif %}
{% if post.sticky > 0 %}
{% set post_class = post_class + ' ' + 'post-sticky' %}
{% endif %}
<article class="{{ post_class }}" itemscope itemtype="http://schema.org/Article">
{##################}
{### POST BLOCK ###}
{##################}
<div class="post-block">
<link itemprop="mainEntityOfPage" href="{{ config.url }}{{ url_for(post.path) }}">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="{{ theme.author }}">
<meta itemprop="description" content="{{ theme.signature }}">
<meta itemprop="image" content="{{ url_for( theme.avatar | default(theme.images + '/avatar.gif') ) }}">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="{{ config.title }}">
</span>
{% if not headlessPost %}
<header class="post-header">
{# Not to show title for quote posts that do not have a title #}
{% if not (is_index and post.type === 'quote' and not post.title) %}
<{% if theme.seo %}h2{% else %}h1{% endif %} class="post-title{% if post.direction && post.direction.toLowerCase() === 'rtl' %} rtl{% endif %}" itemprop="name headline">{#
#}{# Link posts #}{#
#}{% if post.link %}
{% if post.sticky > 0 %}
{{ post.sticky }}
<span class="post-sticky-flag" title="{{ __('post.sticky') }}">
<i class="fa fa-thumb-tack"></i>
</span>
{% endif %}
<a class="post-title-link post-title-link-external" target="_blank" href="{{ url_for(post.link) }}" itemprop="url">
{{ post.title or post.link }}
<i class="fa fa-external-link"></i>
</a>
{% else %}{#
#}{% if is_index %}
{% if post.sticky > 0 %}
<span class="post-sticky-flag" title="{{ __('post.sticky') }}">
<i class="fa fa-thumb-tack"></i>
</span>
{% endif %}
<a class="post-title-link" href="{{ url_for(post.path) }}" itemprop="url">{#
#}{{ post.title | default(__('post.untitled'))}}{#
#}</a>{#
#}{% else %}{{ post.title }}{% endif %}{#
#}{% endif %}{#
#}</{% if theme.seo %}h2{% else %}h1{% endif %}>
{% endif %}
<div class="post-meta">
<span class="post-time">
{% if theme.post_meta.created_at %}
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
{% if theme.post_meta.item_text %}
<span class="post-meta-item-text">{{ __('post.posted') }}</span>
{% endif %}
<time title="{{ __('post.created') }}" itemprop="dateCreated datePublished" datetime="{{ moment(post.date).format() }}">
{{ date(post.date, config.date_format) }}
</time>
{% endif %}
{% if theme.post_meta.created_at and theme.post_meta.updated_at %}
<span class="post-meta-divider">|</span>
{% endif %}
{% if theme.post_meta.updated_at %}
<span class="post-meta-item-icon">
<i class="fa fa-calendar-check-o"></i>
</span>
{% if theme.post_meta.item_text %}
<span class="post-meta-item-text">{{ __('post.modified') }}&#58;</span>
{% endif %}
<time title="{{ __('post.modified') }}" itemprop="dateModified" datetime="{{ moment(post.updated).format() }}">
{{ date(post.updated, config.date_format) }}
</time>
{% endif %}
</span>
{% if post.categories and post.categories.length and theme.post_meta.categories %}
<span class="post-category" >
{% if theme.post_meta.created_at or theme.post_meta.updated_at %}
<span class="post-meta-divider">|</span>
{% endif %}
<span class="post-meta-item-icon">
<i class="fa fa-folder-o"></i>
</span>
{% if theme.post_meta.item_text %}
<span class="post-meta-item-text">{{ __('post.in') }}</span>
{% endif %}
{% for cat in post.categories %}
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="{{ url_for(cat.path) }}" itemprop="url" rel="index">
<span itemprop="name">{{ cat.name }}</span>
</a>
</span>
{% set cat_length = post.categories.length %}
{% if cat_length > 1 and loop.index !== cat_length %}
{{ __('symbol.comma') }}
{% endif %}
{% endfor %}
</span>
{% endif %}
{% if post.comments %}
{% if (theme.duoshuo and theme.duoshuo.shortname) or theme.duoshuo_shortname %}
<span class="post-comments-count">
<span class="post-meta-divider">|</span>
<span class="post-meta-item-icon">
<i class="fa fa-comment-o"></i>
</span>
<a href="{{ url_for(post.path) }}#comments" itemprop="discussionUrl">
<span class="post-comments-count ds-thread-count" data-thread-key="{{ post.path }}" itemprop="commentCount"></span>
</a>
</span>
{% elseif theme.facebook_comments_plugin.enable %}
<span class="post-comments-count">
<span class="post-meta-divider">|</span>
<span class="post-meta-item-icon">
<i class="fa fa-comment-o"></i>
</span>
<a href="{{ url_for(post.path) }}#comments" itemprop="discussionUrl">
<span class="post-comments-count fb-comments-count" data-href="{{ post.permalink }}" itemprop="commentCount">0</span> comments
</a>
</span>
{% elseif theme.disqus.enable and theme.disqus.count %}
<span class="post-comments-count">
<span class="post-meta-divider">|</span>
<span class="post-meta-item-icon">
<i class="fa fa-comment-o"></i>
</span>
<a href="{{ url_for(post.path) }}#comments" itemprop="discussionUrl">
<span class="post-comments-count disqus-comment-count"
data-disqus-identifier="{{ post.path }}" itemprop="commentCount"></span>
</a>
</span>
{% elseif theme.hypercomments_id %}
<!--noindex-->
<span class="post-comments-count">
<span class="post-meta-divider">|</span>
<span class="post-meta-item-icon">
<i class="fa fa-comment-o"></i>
</span>
<a href="{{ url_for(post.path) }}#comments" itemprop="discussionUrl">
<span class="post-comments-count hc-comment-count" data-xid="{{ post.path }}" itemprop="commentsCount"></span>
</a>
</span>
<!--/noindex-->
{% elseif theme.changyan.enable and theme.changyan.appid and theme.changyan.appkey %}
<span class="post-comments-count">
<span class="post-meta-divider">|</span>
<span class="post-meta-item-icon">
<i class="fa fa-comment-o"></i>
</span>
{% if is_post() %}
<a href="{{ url_for(post.path) }}#SOHUCS" itemprop="discussionUrl">
<span id="changyan_count_unit" class="post-comments-count hc-comment-count" data-xid="{{ post.path }}" itemprop="commentsCount"></span>
</a>
{% else %}
<a href="{{ url_for(post.path) }}#SOHUCS" itemprop="discussionUrl">
<span id="url::{{ post.permalink }}" class="cy_cmt_count" data-xid="{{ post.path }}" itemprop="commentsCount" ></span>
</a>
{% endif %}
{% elseif is_post() and theme.gitment.enable and theme.gitment.mint and theme.gitment.count %}
<span class="post-comments-count">
<span class="post-meta-divider">|</span>
<span class="post-meta-item-icon">
<i class="fa fa-comment-o"></i>
</span>
<a href="{{ url_for(post.path) }}#comments" itemprop="discussionUrl">
<span class="post-comments-count gitment-comments-count" data-xid="{{ url_for(post.path) }}" itemprop="commentsCount"></span>
</a>
</span>
{% elseif theme.valine.enable and theme.valine.appid and theme.valine.appkey %}
<span class="post-comments-count">
<span class="post-meta-divider">|</span>
<span class="post-meta-item-icon">
<i class="fa fa-comment-o"></i>
</span>
<a href="{{ url_for(post.path) }}#comments" itemprop="discussionUrl">
<span class="post-comments-count valine-comment-count" data-xid="{{ url_for(post.path) }}" itemprop="commentCount"></span>
</a>
</span>
{% endif %}
{% endif %}
{# LeanCould PageView #}
{% if theme.leancloud_visitors.enable %}
<span id="{{ url_for(post.path) }}" class="leancloud_visitors" data-flag-title="{{ post.title }}">
<span class="post-meta-divider">|</span>
<span class="post-meta-item-icon">
<i class="fa fa-eye"></i>
</span>
{% if theme.post_meta.item_text %}
<span class="post-meta-item-text">{{__('post.visitors')}}&#58;</span>
{% endif %}
<span class="leancloud-visitors-count"></span>
</span>
{% endif %}
{% if not is_index and theme.busuanzi_count.enable and theme.busuanzi_count.page_pv %}
<span class="post-meta-divider">|</span>
<span class="page-pv">{{ theme.busuanzi_count.page_pv_header }}
<span class="busuanzi-value" id="busuanzi_value_page_pv" ></span>{{ theme.busuanzi_count.page_pv_footer }}
</span>
{% endif %}
{% if theme.post_wordcount.wordcount or theme.post_wordcount.min2read %}
<div class="post-wordcount">
{% if theme.post_wordcount.wordcount %}
{% if not theme.post_wordcount.separated_meta %}
<span class="post-meta-divider">|</span>
{% endif %}
<span class="post-meta-item-icon">
<i class="fa fa-file-word-o"></i>
</span>
{% if theme.post_wordcount.item_text %}
<span class="post-meta-item-text">{{ __('post.wordcount') }}&#58;</span>
{% endif %}
<span title="{{ __('post.wordcount') }}">
{{ wordcount(post.content) }} 字
</span>
{% endif %}
{% if theme.post_wordcount.wordcount and theme.post_wordcount.min2read %}
<span class="post-meta-divider">|</span>
{% endif %}
{% if theme.post_wordcount.min2read %}
<span class="post-meta-item-icon">
<i class="fa fa-clock-o"></i>
</span>
{% if theme.post_wordcount.item_text %}
<span class="post-meta-item-text">{{ __('post.min2read') }} &asymp;</span>
{% endif %}
<span title="{{ __('post.min2read') }}">
{{ min2read(post.content) }} 分钟
</span>
{% endif %}
</div>
{% endif %}
{% if post.description and (not theme.excerpt_description or not is_index) %}
<div class="post-description">
{{ post.description }}
</div>
{% endif %}
</div>
</header>
{% endif %}
{#################}
{### POST BODY ###}
{#################}
<div class="post-body{% if theme.han %} han-init-context{% endif %}{% if post.direction && post.direction.toLowerCase() === 'rtl' %} rtl{% endif %}" itemprop="articleBody">
{# Gallery support #}
{% if post.photos and post.photos.length %}
<div class="post-gallery" itemscope itemtype="http://schema.org/ImageGallery">
{% set COLUMN_NUMBER = 3 %}
{% for photo in post.photos %}
{% if loop.index0 % COLUMN_NUMBER === 0 %}<div class="post-gallery-row">{% endif %}
<a class="post-gallery-img fancybox"
href="{{ url_for(photo) }}" rel="gallery_{{ post._id }}"
itemscope itemtype="http://schema.org/ImageObject" itemprop="url">
<img src="{{ url_for(photo) }}" itemprop="contentUrl"/>
</a>
{% if loop.index0 % COLUMN_NUMBER === 2 %}</div>{% endif %}
{% endfor %}
{# Append end tag for `post-gallery-row` when (photos size mod COLUMN_NUMBER) is less than COLUMN_NUMBER #}
{% if post.photos.length % COLUMN_NUMBER > 0 %}</div>{% endif %}
</div>
{% endif %}
{% if is_index %}
{% if post.description and theme.excerpt_description %}
{{ post.description }}
<!--noindex-->
<div class="post-button text-center">
<a class="btn" href="{{ url_for(post.path) }}">
{{ __('post.read_more') }} &raquo;
</a>
</div>
<!--/noindex-->
{% elif post.excerpt %}
{{ post.excerpt }}
<!--noindex-->
<div class="post-button text-center">
<a class="btn" href="{{ url_for(post.path) }}{% if theme.scroll_to_more %}#{{ __('post.more') }}{% endif %}" rel="contents">
{{ __('post.read_more') }} &raquo;
</a>
</div>
<!--/noindex-->
{% elif theme.auto_excerpt.enable %}
{% set content = post.content | striptags %}
{{ content.substring(0, theme.auto_excerpt.length) }}
{% if content.length > theme.auto_excerpt.length %}...{% endif %}
<!--noindex-->
<div class="post-button text-center">
<a class="btn" href="{{ url_for(post.path) }}{% if theme.scroll_to_more %}#{{ __('post.more') }}{% endif %}" rel="contents">
{{ __('post.read_more') }} &raquo;
</a>
</div>
<!--/noindex-->
{% else %}
{% if post.type === 'picture' %}
<a href="{{ url_for(post.path) }}">{{ post.content }}</a>
{% else %}
{{ post.content }}
{% endif %}
{% endif %}
{% else %}
{{ post.content }}
{% endif %}
</div>
{#####################}
{### END POST BODY ###}
{#####################}
{% if theme.wechat_subscriber.enabled and not is_index %}
<div>
{% include 'wechat-subscriber.swig' %}
</div>
{% endif %}
{% if (theme.alipay or theme.wechatpay or theme.bitcoin) and not is_index %}
<div>
{% include 'reward.swig' %}
</div>
{% endif %}
{% if theme.post_copyright.enable and not is_index %}
<div>
{% include 'post-copyright.swig' with { post: post } %}
</div>
{% endif %}
<footer class="post-footer">
{% if post.tags and post.tags.length and not is_index %}
<div class="post-tags">
{% for tag in post.tags %}
<a href="{{ url_for(tag.path) }}" rel="tag"># {{ tag.name }}</a>
{% endfor %}
</div>
{% endif %}
{% if not is_index %}
{% if theme.rating.enable or (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) or (theme.needmoreshare2.enable and theme.needmoreshare2.postbottom.enable) %}
<div class="post-widgets">
{% if theme.rating.enable %}
<div class="wp_rating">
<div id="wpac-rating"></div>
</div>
{% endif %}
{% if (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) %}
<div class="social-like">
{% if theme.vkontakte_api.enable and theme.vkontakte_api.like %}
<div class="vk_like">
<span id="vk_like"></span>
</div>
{% endif %}
{% if theme.facebook_sdk.enable and theme.facebook_sdk.like_button %}
<div class="fb_like">
<div class="fb-like" data-layout="button_count" data-share="true"></div>
</div>
{% endif %}
</div>
{% endif %}
{% if theme.needmoreshare2.enable and theme.needmoreshare2.postbottom.enable %}
{% if (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) %}
<span class="post-meta-divider">|</span>
{% endif %}
<div id="needsharebutton-postbottom">
<span class="btn">
<i class="fa fa-share-alt" aria-hidden="true"></i>
</span>
</div>
{% endif %}
</div>
{% endif %}
{% endif %}
{% if not is_index and (post.prev or post.next) %}
<div class="post-nav">
<div class="post-nav-next post-nav-item">
{% if post.next %}
<a href="{{ url_for(post.next.path) }}" rel="next" title="{{ post.next.title }}">
<i class="fa fa-chevron-left"></i> {{ post.next.title }}
</a>
{% endif %}
</div>
<span class="post-nav-divider"></span>
<div class="post-nav-prev post-nav-item">
{% if post.prev %}
<a href="{{ url_for(post.prev.path) }}" rel="prev" title="{{ post.prev.title }}">
{{ post.prev.title }} <i class="fa fa-chevron-right"></i>
</a>
{% endif %}
</div>
</div>
{% endif %}
{% set isLast = loop.index % page.per_page === 0 %}
{% if is_index and not isLast %}
<div class="post-eof"></div>
{% endif %}
</footer>
</div>
{######################}
{### END POST BLOCK ###}
{######################}
</article>
{% endmacro %}

View File

@ -0,0 +1,30 @@
<div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
<div>{{ theme.reward_comment }}</div>
<button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
<span>{{ __('reward.donate') }}</span>
</button>
<div id="QR" style="display: none;">
{% if theme.wechatpay %}
<div id="wechat" style="display: inline-block">
<img id="wechat_qr" src="{{ theme.wechatpay }}" alt="{{ theme.author }} {{ __('reward.wechatpay') }}"/>
<p>{{ __('reward.wechatpay') }}</p>
</div>
{% endif %}
{% if theme.alipay %}
<div id="alipay" style="display: inline-block">
<img id="alipay_qr" src="{{ theme.alipay }}" alt="{{ theme.author }} {{ __('reward.alipay') }}"/>
<p>{{ __('reward.alipay') }}</p>
</div>
{% endif %}
{% if theme.bitcoin %}
<div id="bitcoin" style="display: inline-block">
<img id="bitcoin_qr" src="{{ theme.bitcoin }}" alt="{{ theme.author }} {{ __('reward.bitcoin') }}"/>
<p>{{ __('reward.bitcoin') }}</p>
</div>
{% endif %}
</div>
</div>

View File

@ -0,0 +1,175 @@
{% macro render(is_post) %}
<div class="sidebar-toggle">
<div class="sidebar-toggle-line-wrap">
<span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
<span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
<span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
</div>
</div>
<aside id="sidebar" class="sidebar">
{% if theme.sidebar.onmobile %}
<div id="sidebar-dimmer"></div>
{% endif %}
<div class="sidebar-inner">
{% set display_toc = is_post and theme.toc.enable or is_page and theme.toc.enable %}
{% if display_toc and toc(page.content).length > 1 %}
<ul class="sidebar-nav motion-element">
<li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
{{ __('sidebar.toc') }}
</li>
<li class="sidebar-nav-overview" data-target="site-overview-wrap">
{{ __('sidebar.overview') }}
</li>
</ul>
{% endif %}
<section class="site-overview-wrap sidebar-panel{% if not display_toc or toc(page.content).length <= 1 %} sidebar-panel-active{% endif %}">
<div class="site-overview">
<div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
{% if theme.avatar %}
<img class="site-author-image" itemprop="image"
src="{{ url_for( theme.avatar | default(theme.images + '/avatar.gif') ) }}"
alt="{{ theme.author }}" />
{% endif %}
<p class="site-author-name" itemprop="name">{{ theme.author }}</p>
<p class="site-description motion-element" itemprop="description">{#
#}{% if theme.seo %}{#
#}{{ theme.signature }}{#
#}{% else %}{#
#}{{ theme.description }}{#
#}{% endif %}{#
#}</p>
</div>
<nav class="site-state motion-element">
{% if config.archive_dir != '/' and site.posts.length > 0 %}
<div class="site-state-item site-state-posts">
{% if theme.menu.archives %}
<a href="{{ url_for(theme.menu.archives).split('||')[0] | trim }}">
{% else %}
<a href="{{ url_for(config.archive_dir) }}">
{% endif %}
<span class="site-state-item-count">{{ site.posts.length }}</span>
<span class="site-state-item-name">{{ __('state.posts') }}</span>
</a>
</div>
{% endif %}
{% if site.categories.length > 0 %}
{% set categoriesPageQuery = site.pages.find({type: 'categories'}, {lean: true}) %}
{% set hasCategoriesPage = categoriesPageQuery.length > 0 %}
<div class="site-state-item site-state-categories">
{% if hasCategoriesPage %}<a href="{{ url_for(categoriesPageQuery[0].path) }}">{% endif %}
<span class="site-state-item-count">{{ site.categories.length }}</span>
<span class="site-state-item-name">{{ __('state.categories') }}</span>
{% if hasCategoriesPage %}</a>{% endif %}
</div>
{% endif %}
{% if site.tags.length > 0 %}
{% set tagsPageQuery = site.pages.find({type: 'tags'}, {lean: true}) %}
{% set hasTagsPage = tagsPageQuery.length > 0 %}
<div class="site-state-item site-state-tags">
{% if hasTagsPage %}<a href="{{ url_for(tagsPageQuery[0].path) }}">{% endif %}
<span class="site-state-item-count">{{ site.tags.length }}</span>
<span class="site-state-item-name">{{ __('state.tags') }}</span>
{% if hasTagsPage %}</a>{% endif %}
</div>
{% endif %}
</nav>
{% if theme.rss %}
<div class="feed-link motion-element">
<a href="{{ url_for(theme.rss) }}" rel="alternate">
<i class="fa fa-rss"></i>
RSS
</a>
</div>
{% endif %}
{% if theme.social %}
<div class="links-of-author motion-element">
{% for name, link in theme.social %}
<span class="links-of-author-item">
<a href="{{ link.split('||')[0] | trim }}" target="_blank" title="{{ name }}">
{% if theme.social_icons.enable %}
<i class="fa fa-fw fa-{{ link.split('||')[1] | trim | default('globe') }}"></i>{#
#}{% endif %}{#
#}{% if not theme.social_icons.icons_only %}{#
#}{{ name }}{#
#}{% endif %}{#
#}</a>
</span>
{% endfor %}
</div>
{% endif %}
{% set cc = {'by': 1, 'by-nc': 1, 'by-nc-nd': 1, 'by-nc-sa': 1, 'by-nd': 1, 'by-sa': 1, 'zero': 1} %}
{% if theme.creative_commons in cc %}
<div class="cc-license motion-element" itemprop="license">
<a href="https://creativecommons.org/{% if theme.creative_commons === 'zero' %}publicdomain/zero/1.0{% else %}licenses/{{ theme.creative_commons }}/4.0{% endif %}/" class="cc-opacity" target="_blank">
<img src="{{ url_for(theme.images) }}/cc-{{ theme.creative_commons }}.svg" alt="Creative Commons" />
</a>
</div>
{% endif %}
{# Blogroll #}
{% if theme.links %}
<div class="links-of-blogroll motion-element {{ "links-of-blogroll-" + theme.links_layout | default('inline') }}">
<div class="links-of-blogroll-title">
<i class="fa fa-fw fa-{{ theme.links_icon | default('globe') | lower }}"></i>
{{ theme.links_title }}
</div>
<ul class="links-of-blogroll-list">
{% for name, link in theme.links %}
<li class="links-of-blogroll-item">
<a href="{{ link }}" title="{{ name }}" target="_blank">{{ name }}</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% include '../_custom/sidebar.swig' %}
</div>
</section>
{% if display_toc and toc(page.content).length > 1 %}
<!--noindex-->
<section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
<div class="post-toc">
{% if page.toc_number === undefined %}
{% set toc = toc(page.content, { "class": "nav", list_number: theme.toc.number }) %}
{% else %}
{% set toc = toc(page.content, { "class": "nav", list_number: page.toc_number }) %}
{% endif %}
{% if toc.length <= 1 %}
<p class="post-toc-empty">{{ __('post.toc_empty') }}</p>
{% else %}
<div class="post-toc-content">{{ toc }}</div>
{% endif %}
</div>
</section>
<!--/noindex-->
{% endif %}
{% if theme.sidebar.b2t %}
<div class="back-to-top">
<i class="fa fa-arrow-up"></i>
{% if theme.sidebar.scrollpercent %}
<span id="scrollpercent"><span>0</span>%</span>
{% endif %}
</div>
{% endif %}
</div>
</aside>
{% endmacro %}

View File

@ -0,0 +1,4 @@
<div id="wechat_subscriber" style="display: block; padding: 10px 0; margin: 20px auto; width: 100%; text-align: center">
<img id="wechat_subscriber_qcode" src="{{ theme.wechat_subscriber.qcode }}" alt="{{ theme.author }} wechat" style="width: 200px; max-width: 100%;"/>
<div>{{ theme.wechat_subscriber.description }}</div>
</div>

View File

@ -0,0 +1,70 @@
{% if page.comments %}
{% if (theme.duoshuo and theme.duoshuo.shortname) or theme.duoshuo_shortname %}
<div class="comments" id="comments">
<div class="ds-thread" data-thread-key="{{ page.path }}"
data-title="{{ page.title }}" data-url="{{ page.permalink }}">
</div>
</div>
{% elseif theme.facebook_sdk.enable and theme.facebook_comments_plugin.enable %}
<div class="comments" id="comments">
<div class="fb-comments"
data-href="{{ page.permalink }}"
data-numposts="{{ theme.facebook_comments_plugin.num_of_posts }}"
data-width="{{ theme.facebook_comments_plugin.width }}"
data-colorscheme="{{ theme.facebook_comments_plugin.scheme }}">
</div>
</div>
{% elseif theme.vkontakte_api.enable and theme.vkontakte_api.comments %}
<div class="comments" id="comments">
<div id="vk_comments"></div>
</div>
{% elseif theme.disqus.enable %}
<div class="comments" id="comments">
<div id="disqus_thread">
<noscript>
Please enable JavaScript to view the
<a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a>
</noscript>
</div>
</div>
{% elseif theme.hypercomments_id %}
<div class="comments" id="comments">
<div id="hypercomments_widget"></div>
</div>
{% elseif theme.youyan_uid %}
<div class="comments" id="comments">
<div id="uyan_frame"></div>
</div>
{% elseif theme.livere_uid %}
<div class="comments" id="comments">
<div id="lv-container" data-id="city" data-uid="{{ theme.livere_uid }}"></div>
</div>
{% elseif theme.changyan.appid and theme.changyan.appkey %}
<div class="comments" id="comments">
<div id="SOHUCS"></div>
</div>
{% elseif theme.gitment.enable %}
<div class="comments" id="comments">
{% if theme.gitment.lazy %}
<div onclick="showGitment()" id="gitment-display-button">{{ __('gitmentbutton') }}</div>
<div id="gitment-container" style="display:none"></div>
{% else %}
<div id="gitment-container"></div>
{% endif %}
</div>
{% elseif theme.valine.appid and theme.valine.appkey %}
<div class="comments" id="comments">
</div>
{% endif %}
{% endif %}

View File

@ -0,0 +1,47 @@
<div class="copyright">{#
#}{% set current = date(Date.now(), "YYYY") %}{#
#}&copy; {% if theme.footer.since and theme.footer.since != current %}{{ theme.footer.since }} &mdash; {% endif %}{#
#}<span itemprop="copyrightYear">{{ current }}</span>
<span class="with-love">
<i class="fa fa-{{ theme.footer.icon }}"></i>
</span>
<span class="author" itemprop="copyrightHolder">{{ theme.footer.copyright || config.author }}</span>
{% if theme.post_wordcount.totalcount %}
<span class="post-meta-divider">|</span>
<span class="post-meta-item-icon">
<i class="fa fa-area-chart"></i>
</span>
{% if theme.post_wordcount.item_text %}
<span class="post-meta-item-text">{{ __('post.totalcount') }}&#58;</span>
{% endif %}
<span title="{{ __('post.totalcount') }}">{#
#}{{ totalcount(site, '0,0.0a') }}{#
#}</span>
{% endif %}
</div>
{% if theme.footer.powered %}
<div class="powered-by">{#
#}{{ __('footer.powered', '<a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a>') }}{#
#}</div>
{% endif %}
{% if theme.footer.powered and theme.footer.theme.enable %}
<span class="post-meta-divider">|</span>
{% endif %}
{% if theme.footer.theme.enable %}
<div class="theme-info">{#
#}{{ __('footer.theme') }} &mdash; {#
#}<a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">{#
#}NexT.{{ theme.scheme }}{#
#}</a>{% if theme.footer.theme.version %} v{{ theme.version }}{% endif %}{#
#}</div>
{% endif %}
{% if theme.footer.custom_text %}
<div class="footer-custom">{#
#}{{ theme.footer.custom_text }}{#
#}</div>
{% endif %}

View File

@ -0,0 +1,158 @@
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="{{ theme.android_chrome_color }}">
{% if theme.pace %}
{% set pace_css_uri = url_for(theme.vendors._internal + '/pace/'+ theme.pace_theme +'.min.css?v=1.0.2') %}
{% set pace_js_uri = url_for(theme.vendors._internal + '/pace/pace.min.js?v=1.0.2') %}
{% if theme.vendors.pace %}
{% set pace_js_uri = theme.vendors.pace %}
{% endif %}
{% if theme.vendors.pace_css %}
{% set pace_css_uri = theme.vendors.pace_css %}
{% endif %}
<script src="{{ pace_js_uri }}"></script>
<link href="{{ pace_css_uri }}" rel="stylesheet">
{% endif %}
{% if theme.han %}
{% set Han_uri = url_for(theme.vendors._internal + '/Han/dist/han.min.css?v=3.3') %}
{% if theme.vendors.Han %}
{% set Han_uri = theme.vendors.Han %}
{% endif %}
<link rel="stylesheet" media="all" href="{{ Han_uri }}">
{% endif %}
{# #238, Disable Baidu tranformation #}
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
{% if theme.google_site_verification %}
<meta name="google-site-verification" content="{{ theme.google_site_verification }}" />
{% endif %}
{% if theme.bing_site_verification %}
<meta name="msvalidate.01" content="{{ theme.bing_site_verification }}" />
{% endif %}
{% if theme.yandex_site_verification %}
<meta name="yandex-verification" content="{{ theme.yandex_site_verification }}" />
{% endif %}
{% if theme.baidu_site_verification %}
<meta name="baidu-site-verification" content="{{ theme.baidu_site_verification }}" />
{% endif %}
{% if theme.qihu_site_verification %}
<meta name="360-site-verification" content="{{ theme.qihu_site_verification }}" />
{% endif %}
{% if theme.fancybox %}
{% set fancybox_css_uri = url_for(theme.vendors._internal + '/fancybox/source/jquery.fancybox.css?v=2.1.5') %}
{% if theme.vendors.fancybox_css %}
{% set fancybox_css_uri = theme.vendors.fancybox_css %}
{% endif %}
<link href="{{ fancybox_css_uri }}" rel="stylesheet" type="text/css" />
{% endif %}
{% include "./head/external-fonts.swig" %}
{% set font_awesome_uri = url_for(theme.vendors._internal + '/font-awesome/css/font-awesome.min.css?v=4.6.2') %}
{% if theme.vendors.fontawesome %}
{% set font_awesome_uri = theme.vendors.fontawesome %}
{% endif %}
<link href="{{ font_awesome_uri }}" rel="stylesheet" type="text/css" />
<link href="{{ url_for(theme.css) }}/main.css?v={{ theme.version }}" rel="stylesheet" type="text/css" />
{% if theme.favicon.apple_touch_icon %}
<link rel="apple-touch-icon" sizes="180x180" href="{{ url_for(theme.favicon.apple_touch_icon) }}?v={{ theme.version }}">
{% endif %}
{% if theme.favicon.medium %}
<link rel="icon" type="image/png" sizes="32x32" href="{{ url_for(theme.favicon.medium) }}?v={{ theme.version }}">
{% endif %}
{% if theme.favicon.small %}
<link rel="icon" type="image/png" sizes="16x16" href="{{ url_for(theme.favicon.small) }}?v={{ theme.version }}">
{% endif %}
{% if theme.favicon.safari_pinned_tab %}
<link rel="mask-icon" href="{{ url_for(theme.favicon.safari_pinned_tab) }}?v={{ theme.version }}" color="{{ theme.android_chrome_color }}">
{% endif %}
{% if theme.favicon.android_manifest %}
<link rel="manifest" href="{{ url_for(theme.favicon.android_manifest) }}">
{% endif %}
{% if theme.favicon.ms_browserconfig %}
<meta name="msapplication-config" content="{{ url_for(theme.favicon.ms_browserconfig) }}" />
{% endif %}
{% if page.keywords %}
<meta name="keywords" content="{{ page.keywords }}" />
{% elif page.tags and page.tags.length %}
<meta name="keywords" content="{% for tag in page.tags %}{{ tag.name }},{% endfor %}" />
{% elif theme.keywords %}
<meta name="keywords" content="{{ theme.keywords }}" />
{% endif %}
{% if theme.rss === '' and config.feed and config.feed.path %}
{% set theme.rss = config.feed.path %}
{% endif %}
{% if theme.rss %}
<link rel="alternate" href="{{ url_for(theme.rss) }}" title="{{ config.title }}" type="application/atom+xml" />
{% endif %}
{% if theme.facebook_sdk.enable and theme.facebook_sdk.webmaster %}
<meta property="fb:admins" content="{{ theme.facebook_sdk.fb_admin }}" />
<meta property="fb:app_id" content="{{ theme.facebook_sdk.app_id }}" />
{% endif %}
{{
open_graph({
twitter_id: theme.twitter,
google_plus: theme.google_plus,
fb_admins: theme.fb_admins,
fb_app_id: theme.fb_app_id
})
}}
{# Export some HEXO Configurations to Front-End #}
<script type="text/javascript" id="hexo.configurations">
var NexT = window.NexT || {};
var CONFIG = {
root: '{{ theme.root }}',
scheme: '{{ theme.scheme }}',
version: '{{ theme.version }}',
sidebar: {{ theme.sidebar | json_encode }},
fancybox: {{ theme.fancybox }},
tabs: {{ theme.tabs.enable }},
motion: {{ theme.motion | json_encode }},
duoshuo: {
userId: '{{ theme.duoshuo_info.user_id | default() }}',
author: '{{ theme.duoshuo_info.admin_nickname | default(__('author'))}}'
},
algolia: {
applicationID: '{{ theme.algolia.applicationID }}',
apiKey: '{{ theme.algolia.apiKey }}',
indexName: '{{ theme.algolia.indexName }}',
hits: {{ theme.algolia_search.hits | json_encode }},
labels: {{ theme.algolia_search.labels | json_encode }}
}
};
</script>
{# Canonical, good for google search engine (SEO) : https://support.google.com/webmasters/answer/139066 #}
{% if theme.canonical %}
<link rel="canonical" href="{{ config.url }}/{{ page.canonical_path.replace('index.html', '') }}"/>
{% endif %}
{% include 'head/custom-head.swig' %}

View File

@ -0,0 +1,3 @@
{#
Custom head.
#}

View File

@ -0,0 +1,51 @@
{% if theme.font.enable %}
{% set font_config = theme.font %}
{% set font_families = '' %}
{% set font_styles = ':300,300italic,400,400italic,700,700italic' %}
{% set font_found = false %}
{% if font_config.global.family and font_config.global.external %}
{% set font_families += font_config.global.family + font_styles %}
{% set font_found = true %}
{% endif %}
{% if font_config.headings.family and font_config.headings.external %}
{% if font_found %}
{% set font_families += '|' %}
{% endif %}
{% set font_families += font_config.headings.family + font_styles %}
{% endif %}
{% if font_config.posts.family and font_config.posts.external %}
{% if font_found %}
{% set font_families += '|' %}
{% endif %}
{% set font_families += font_config.posts.family + font_styles %}
{% endif %}
{% if font_config.logo.family and font_config.logo.external %}
{% if font_found %}
{% set font_families += '|' %}
{% endif %}
{% set font_families += font_config.logo.family + font_styles %}
{% endif %}
{% if font_config.codes.family and font_config.codes.external %}
{% if font_found %}
{% set font_families += '|' %}
{% endif %}
{% set font_families += font_config.codes.family + font_styles %}
{% endif %}
{% if font_families !== '' %}
{% set font_families += '&subset=latin,latin-ext' %}
{% set font_host = font_config.host | default('//fonts.googleapis.com') %}
<link href="{{ font_host }}/css?family={{ font_families }}" rel="stylesheet" type="text/css">
{% endif %}
{% endif %}

View File

@ -0,0 +1,76 @@
<div class="site-brand-wrapper">
<div class="site-meta {% if theme.custom_logo.enabled %}custom-logo{% endif %}">
{% if theme.custom_logo.image and theme.scheme === 'Muse' %}
<div class="site-meta-headline">
<a>
<img class="custom-logo-image" src="{{ theme.custom_logo.image }}"
alt="{{ config.title }}"/>
</a>
</div>
{% endif %}
<div class="custom-logo-site-title">
<a href="{{ config.root }}" class="brand" rel="start">
<span class="logo-line-before"><i></i></span>
<span class="site-title">{{ config.title }}</span>
<span class="logo-line-after"><i></i></span>
</a>
</div>
{% if theme.seo %}
<h1 class="site-subtitle" itemprop="description">{{ config.subtitle }}</h1>
{% else %}
<p class="site-subtitle">{{ config.subtitle }}</p>
{% endif %}
</div>
<div class="site-nav-toggle">
<button>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
</button>
</div>
</div>
<nav class="site-nav">
{% set hasSearch = theme.swiftype_key || theme.algolia_search.enable || theme.tinysou_Key || theme.local_search.enable %}
{% if theme.menu %}
<ul id="menu" class="menu">
{% for name, path in theme.menu %}
{% set itemName = name.toLowerCase() %}
<li class="menu-item menu-item-{{ itemName | replace(' ', '-') }}">
<a href="{{ url_for(path.split('||')[0]) | trim }}" rel="section">
{% if theme.menu_icons.enable %}
<i class="menu-item-icon fa fa-fw fa-{{ path.split('||')[1] | trim | default('question-circle') }}"></i> <br />
{% endif %}
{{ __('menu.' + name) | replace('menu.', '') }}
</a>
</li>
{% endfor %}
{% if hasSearch %}
<li class="menu-item menu-item-search">
{% if theme.swiftype_key %}
<a href="javascript:;" class="st-search-show-outputs">
{% elseif theme.local_search.enable || theme.algolia_search.enable %}
<a href="javascript:;" class="popup-trigger">
{% endif %}
{% if theme.menu_icons.enable %}
<i class="menu-item-icon fa fa-search fa-fw"></i> <br />
{% endif %}
{{ __('menu.search') }}
</a>
</li>
{% endif %}
</ul>
{% endif %}
{% if hasSearch %}
<div class="site-search">
{% include 'search.swig' %}
</div>
{% endif %}
</nav>
{% include '../_custom/header.swig' %}

View File

@ -0,0 +1,11 @@
<header class="post-header">
<{% if theme.seo %}h2{% else %}h1{% endif %} class="post-title" itemprop="name headline">{{ page.title }}</{% if theme.seo %}h2{% else %}h1{% endif %}>
{% if page.description %}
<div class="post-meta">
<div class="post-description">{{ page.description }}</div>
</div>
{% endif %}
</header>

View File

@ -0,0 +1,11 @@
{% if page.prev or page.next %}
<nav class="pagination">
{{
paginator({
prev_text: '<i class="fa fa-angle-left"></i>',
next_text: '<i class="fa fa-angle-right"></i>',
mid_size: 1
})
}}
</nav>
{% endif %}

View File

@ -0,0 +1,9 @@
{% if theme.algolia_search.enable %}
{% include '../_third-party/search/algolia-search/dom.swig' %}
{% elseif theme.swiftype_key %}
{% include 'search/swiftype.swig' %}
{% elseif theme.tinysou_Key %}
{% include 'search/tinysou.swig' %}
{% elseif theme.local_search.enable %}
{% include 'search/localsearch.swig' %}
{% endif %}

View File

@ -0,0 +1,16 @@
<div class="popup search-popup local-search-popup">
<div class="local-search-header clearfix">
<span class="search-icon">
<i class="fa fa-search"></i>
</span>
<span class="popup-btn-close">
<i class="fa fa-times-circle"></i>
</span>
<div class="local-search-input-wrapper">
<input autocomplete="off"
placeholder="{{ __('search.placeholder') }}" spellcheck="false"
type="text" id="local-search-input">
</div>
</div>
<div id="local-search-result"></div>
</div>

View File

@ -0,0 +1,12 @@
<form class="site-search-form">
<input type="text" id="st-search-input" class="st-search-input st-default-search-input" />
</form>
<script type="text/javascript">
(function(w,d,t,u,n,s,e){w['SwiftypeObject']=n;w[n]=w[n]||function(){
(w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t);
e=d.getElementsByTagName(t)[0];s.async=1;s.src=u;e.parentNode.insertBefore(s,e);
})(window,document,'script','//s.swiftypecdn.com/install/v2/st.js','_st');
_st('install', '{{ theme.swiftype_key }}','2.0.0');
</script>

View File

@ -0,0 +1,3 @@
<form class="site-search-form" >
<input type="text" id="ts-search-input" class="menu-search-input">
</form>

View File

@ -0,0 +1,4 @@
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<div class="addthis_inline_share_toolbox">
<script type = "text/javascript" src = "//s7.addthis.com/js/300/addthis_widget.js#pubid={{ theme.add_this_id }}" async = "async" ></script>
</div>

View File

@ -0,0 +1,57 @@
{% if theme.baidushare.type === "button" %}
<div class="bdsharebuttonbox">
<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
<a href="#" class="bds_douban" data-cmd="douban" title="分享到豆瓣网"></a>
<a href="#" class="bds_sqq" data-cmd="sqq" title="分享到QQ好友"></a>
<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
<a href="#" class="bds_tieba" data-cmd="tieba" title="分享到百度贴吧"></a>
<a href="#" class="bds_twi" data-cmd="twi" title="分享到Twitter"></a>
<a href="#" class="bds_fbook" data-cmd="fbook" title="分享到Facebook"></a>
<a href="#" class="bds_more" data-cmd="more"></a>
<a class="bds_count" data-cmd="count"></a>
</div>
<script>
window._bd_share_config = {
"common": {
"bdText": "",
"bdMini": "2",
"bdMiniList": false,
"bdPic": ""
},
"share": {
"bdSize": "16",
"bdStyle": "0"
},
"image": {
"viewList": ["tsina", "douban", "sqq", "qzone", "weixin", "twi", "fbook"],
"viewText": "分享到:",
"viewSize": "16"
}
}
</script>
{% elseif theme.baidushare.type === "slide" %}
<script>
window._bd_share_config = {
"common": {
"bdText": "",
"bdMini": "1",
"bdMiniList": false,
"bdPic": ""
},
"image": {
"viewList": ["tsina", "douban", "sqq", "qzone", "weixin", "twi", "fbook"],
"viewText": "分享到:",
"viewSize": "16"
},
"slide": {
"bdImg": "5",
"bdPos": "left",
"bdTop": "100"
}
}
</script>
{% endif %}
<script>
with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='//bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
</script>

View File

@ -0,0 +1,18 @@
<div class="ds-share flat" data-thread-key="{{ page.path }}"
data-title="{{ page.title }}"
data-content=""
data-url="{{ page.permalink }}">
<div class="ds-share-inline">
<ul class="ds-share-icons-16">
<li data-toggle="ds-share-icons-more"><a class="ds-more" href="javascript:void(0);">分享到:</a></li>
<li><a class="ds-weibo" href="javascript:void(0);" data-service="weibo">微博</a></li>
<li><a class="ds-qzone" href="javascript:void(0);" data-service="qzone">QQ空间</a></li>
<li><a class="ds-qqt" href="javascript:void(0);" data-service="qqt">腾讯微博</a></li>
<li><a class="ds-wechat" href="javascript:void(0);" data-service="wechat">微信</a></li>
</ul>
<div class="ds-share-icons-more">
</div>
</div>
</div>

View File

@ -0,0 +1,25 @@
<!-- JiaThis Button BEGIN -->
<div class="jiathis_style">
<span class="jiathis_txt">分享到:</span>
<a class="jiathis_button_fav">收藏夹</a>
<a class="jiathis_button_copy">复制网址</a>
<a class="jiathis_button_email">邮件</a>
<a class="jiathis_button_weixin">微信</a>
<a class="jiathis_button_qzone">QQ空间</a>
<a class="jiathis_button_tqq">腾讯微博</a>
<a class="jiathis_button_douban">豆瓣</a>
<a class="jiathis_button_share">一键分享</a>
<a href="http://www.jiathis.com/share?uid=2140465" class="jiathis jiathis_txt jiathis_separator jtico jtico_jiathis" target="_blank">更多</a>
<a class="jiathis_counter_style"></a>
</div>
<script type="text/javascript" >
var jiathis_config={
data_track_clickback:true,
summary:"",
shortUrl:false,
hideMore:false
}
</script>
<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid={{ theme.jiathis.uid }}" charset="utf-8"></script>
<!-- JiaThis Button END -->

View File

@ -0,0 +1,9 @@
{%
set boot_scripts = [
'src/bootstrap.js'
]
%}
{% for bs in boot_scripts %}
<script type="text/javascript" src="{{ url_for(theme.js) }}/{{ bs }}?v={{ theme.version }}"></script>
{% endfor %}

View File

@ -0,0 +1,10 @@
{%
set js_commons = [
'src/utils.js',
'src/motion.js'
]
%}
{% for common in js_commons %}
<script type="text/javascript" src="{{ url_for(theme.js) }}/{{ common }}?v={{ theme.version }}"></script>
{% endfor %}

View File

@ -0,0 +1,2 @@
<script type="text/javascript" src="{{ url_for(theme.js) }}/src/scrollspy.js?v={{ theme.version }}"></script>
<script type="text/javascript" src="{{ url_for(theme.js) }}/src/post-details.js?v={{ theme.version }}"></script>

View File

@ -0,0 +1,10 @@
{%
set scripts = [
'src/affix.js',
'src/schemes/pisces.js'
]
%}
{% for script in scripts %}
<script type="text/javascript" src="{{ url_for(theme.js) }}/{{ script }}?v={{ theme.version }}"></script>
{% endfor %}

View File

@ -0,0 +1,10 @@
{%
set scripts = [
'src/affix.js',
'src/schemes/pisces.js'
]
%}
{% for script in scripts %}
<script type="text/javascript" src="{{ url_for(theme.js) }}/{{ script }}?v={{ theme.version }}"></script>
{% endfor %}

View File

@ -0,0 +1,49 @@
{# Reset `window.Promise` when it was not a function. #}
{# IE refers the element whose id is `Promise` as `window.Promise`, this causes Velocity throwing an exception #}
<script type="text/javascript">
if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
window.Promise = null;
}
</script>
{% set js_vendors = {} %}
{% set js_vendors.jquery = 'jquery/index.js?v=2.1.3' %}
{% set js_vendors.fastclick = 'fastclick/lib/fastclick.min.js?v=1.0.6' %}
{% set js_vendors.lazyload = 'jquery_lazyload/jquery.lazyload.js?v=1.9.7' %}
{% set js_vendors.velocity = 'velocity/velocity.min.js?v=1.2.1' %}
{% set js_vendors.velocity_ui = 'velocity/velocity.ui.min.js?v=1.2.1' %}
{% if theme.fancybox %}
{% set js_vendors.fancybox = 'fancybox/source/jquery.fancybox.pack.js?v=2.1.5' %}
{% endif %}
{% if theme.canvas_nest %}
{% set js_vendors.canvas_nest = 'canvas-nest/canvas-nest.min.js' %}
{% endif %}
{% if theme.three_waves %}
{% set js_vendors.three = 'three/three.min.js' %}
{% set js_vendors.three_waves = 'three/three-waves.min.js' %}
{% endif %}
{% if theme.canvas_lines %}
{% set js_vendors.three = 'three/three.min.js' %}
{% set js_vendors.canvas_lines = 'three/canvas_lines.min.js' %}
{% endif %}
{% if theme.canvas_sphere %}
{% set js_vendors.three = 'three/three.min.js' %}
{% set js_vendors.canvas_sphere = 'three/canvas_sphere.min.js' %}
{% endif %}
{% if theme.canvas_ribbon.enable and theme.scheme === 'Pisces'%}
{% set js_vendors.canvas_ribbon = 'canvas-ribbon/canvas-ribbon.js' %}
{% endif %}
{% for name, internal in js_vendors %}
{% set internal_script = url_for(theme.vendors._internal) + '/' + internal %}
{% if name == 'canvas_ribbon' %}
<script id="ribbon" type="text/javascript" size="{{ theme.canvas_ribbon.size }}" alpha="{{ theme.canvas_ribbon.alpha }}" zIndex="{{theme.canvas_ribbon.zIndex }}" src="{{ theme.vendors[name] | default(internal_script) }}"></script>
{% else %}
<script type="text/javascript" src="{{ theme.vendors[name] | default(internal_script) }}"></script>
{% endif %}
{% endfor %}

View File

@ -0,0 +1,4 @@
{% include 'busuanzi-counter.swig' %}
{% include 'tencent-mta.swig' %}
{% include 'tencent-analytics.swig' %}
{% include 'cnzz-analytics.swig' %}

View File

@ -0,0 +1,11 @@
{% if theme.application_insights %}
<script type="text/javascript">
var appInsights=window.appInsights||function(config){
function i(config){t[config]=function(){var i=arguments;t.queue.push(function(){t[config].apply(t,i)})}}var t={config:config},u=document,e=window,o="script",s="AuthenticatedUserContext",h="start",c="stop",l="Track",a=l+"Event",v=l+"Page",y=u.createElement(o),r,f;y.src=config.url||"https://az416426.vo.msecnd.net/scripts/a/ai.0.js";u.getElementsByTagName(o)[0].parentNode.appendChild(y);try{t.cookie=u.cookie}catch(p){}for(t.queue=[],t.version="1.0",r=["Event","Exception","Metric","PageView","Trace","Dependency"];r.length;)i("track"+r.pop());return i("set"+s),i("clear"+s),i(h+a),i(c+a),i(h+v),i(c+v),i("flush"),config.disableExceptionTracking||(r="onerror",i("_"+r),f=e[r],e[r]=function(config,i,u,e,o){var s=f&&f(config,i,u,e,o);return s!==!0&&t["_"+r](config,i,u,e,o),s}),t
}({
instrumentationKey:"{{ theme.application_insights }}"
});
window.appInsights=appInsights;
appInsights.trackPageView();
</script>
{% endif %}

View File

@ -0,0 +1,11 @@
{% if theme.baidu_analytics %}
<script type="text/javascript">
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?{{ theme.baidu_analytics }}";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
{% endif %}

View File

@ -0,0 +1,21 @@
{% if theme.busuanzi_count.enable %}
<div class="busuanzi-count">
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
{% if theme.busuanzi_count.site_uv %}
<span class="site-uv">
{{ theme.busuanzi_count.site_uv_header }}
<span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
{{ theme.busuanzi_count.site_uv_footer }}
</span>
{% endif %}
{% if theme.busuanzi_count.site_pv %}
<span class="site-pv">
{{ theme.busuanzi_count.site_pv_header }}
<span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
{{ theme.busuanzi_count.site_pv_footer }}
</span>
{% endif %}
</div>
{% endif %}

View File

@ -0,0 +1,7 @@
{% if theme.cnzz_siteid %}
<div style="display: none;">
<script src="//s95.cnzz.com/z_stat.php?id={{ theme.cnzz_siteid }}&web_id={{ theme.cnzz_siteid }}" language="JavaScript"></script>
</div>
{% endif %}

View File

@ -0,0 +1,19 @@
{% if theme.facebook_sdk.enable %}
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '{{ theme.facebook_sdk.app_id }}',
xfbml : true,
version : 'v2.10'
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/{{ config.language|replace('-', '_') }}/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
{% endif %}

View File

@ -0,0 +1,99 @@
{% if theme.firestore.enable %}
<script src="https://www.gstatic.com/firebasejs/4.6.0/firebase.js"></script>
<script src="https://www.gstatic.com/firebasejs/4.6.0/firebase-firestore.js"></script>
{% if theme.firestore.bluebird %}
<script src="https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.5.1/bluebird.core.min.js"></script>
{% endif %}
<script>
(function () {
firebase.initializeApp({
apiKey: '{{ theme.firestore.apiKey }}',
projectId: '{{ theme.firestore.projectId }}'
})
function getCount(doc, increaseCount) {
//increaseCount will be false when not in article page
return doc.get().then(function (d) {
var count
if (!d.exists) { //has no data, initialize count
if (increaseCount) {
doc.set({
count: 1
})
count = 1
}
else {
count = 0
}
}
else { //has data
count = d.data().count
if (increaseCount) {
if (!(window.localStorage && window.localStorage.getItem(title))) { //if first view this article
doc.set({ //increase count
count: count + 1
})
count++
}
}
}
if (window.localStorage && increaseCount) { //mark as visited
localStorage.setItem(title, true)
}
return count
})
}
function appendCountTo(el) {
return function (count) {
$(el).append(
$('<span>').addClass('post-visitors-count').append(
$('<span>').addClass('post-meta-divider').text('|')
).append(
$('<span>').addClass('post-meta-item-icon').append(
$('<i>').addClass('fa fa-users')
)
).append($('<span>').text('{{ __("post.visitors")}} ' + count))
)
}
}
var db = firebase.firestore()
var articles = db.collection('{{ theme.firestore.collection }}')
//https://hexo.io/zh-tw/docs/variables.html
var isPost = '{{ page.title }}'.length > 0
var isArchive = '{{ archive }}' === 'true'
var isCategory = '{{ category }}'.length > 0
var isTag = '{{ tag }}'.length > 0
if (isPost) { //is article page
var title = '{{ page.title }}'
var doc = articles.doc(title)
getCount(doc, true).then(appendCountTo($('.post-meta')))
}
else if (!isArchive && !isCategory && !isTag) { //is index page
var titles = [] //array to titles
var postsstr = '{% for post in page.posts %}titles.push("{{ post.title }}");{% endfor %}' //if you have a better way to get titles of posts, please change it
eval(postsstr)
var promises = titles.map(function (title) {
return articles.doc(title)
}).map(function (doc) {
return getCount(doc)
})
Promise.all(promises).then(function (counts) {
var metas = $('.post-meta')
counts.forEach(function (val, idx) {
appendCountTo(metas[idx])(val)
})
})
}
})()
</script>
{% endif %}

View File

@ -0,0 +1,10 @@
{% if theme.google_analytics %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', '{{ theme.google_analytics }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}

View File

@ -0,0 +1,5 @@
{% include 'facebook-sdk.swig' %}
{% include 'vkontakte-api.swig' %}
{% include 'google-analytics.swig' %}
{% include 'baidu-analytics.swig' %}
{% include 'application-insights.swig' %}

View File

@ -0,0 +1,108 @@
{% if theme.leancloud_visitors.enable %}
{# custom analytics part create by xiamo #}
<script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.4.js"></script>
<script>AV.initialize("{{theme.leancloud_visitors.app_id}}", "{{theme.leancloud_visitors.app_key}}");</script>
<script>
function showTime(Counter) {
var query = new AV.Query(Counter);
var entries = [];
var $visitors = $(".leancloud_visitors");
$visitors.each(function () {
entries.push( $(this).attr("id").trim() );
});
query.containedIn('url', entries);
query.find()
.done(function (results) {
var COUNT_CONTAINER_REF = '.leancloud-visitors-count';
if (results.length === 0) {
$visitors.find(COUNT_CONTAINER_REF).text(0);
return;
}
for (var i = 0; i < results.length; i++) {
var item = results[i];
var url = item.get('url');
var time = item.get('time');
var element = document.getElementById(url);
$(element).find(COUNT_CONTAINER_REF).text(time);
}
for(var i = 0; i < entries.length; i++) {
var url = entries[i];
var element = document.getElementById(url);
var countSpan = $(element).find(COUNT_CONTAINER_REF);
if( countSpan.text() == '') {
countSpan.text(0);
}
}
})
.fail(function (object, error) {
console.log("Error: " + error.code + " " + error.message);
});
}
function addCount(Counter) {
var $visitors = $(".leancloud_visitors");
var url = $visitors.attr('id').trim();
var title = $visitors.attr('data-flag-title').trim();
var query = new AV.Query(Counter);
query.equalTo("url", url);
query.find({
success: function(results) {
if (results.length > 0) {
var counter = results[0];
counter.fetchWhenSave(true);
counter.increment("time");
counter.save(null, {
success: function(counter) {
var $element = $(document.getElementById(url));
$element.find('.leancloud-visitors-count').text(counter.get('time'));
},
error: function(counter, error) {
console.log('Failed to save Visitor num, with error message: ' + error.message);
}
});
} else {
var newcounter = new Counter();
/* Set ACL */
var acl = new AV.ACL();
acl.setPublicReadAccess(true);
acl.setPublicWriteAccess(true);
newcounter.setACL(acl);
/* End Set ACL */
newcounter.set("title", title);
newcounter.set("url", url);
newcounter.set("time", 1);
newcounter.save(null, {
success: function(newcounter) {
var $element = $(document.getElementById(url));
$element.find('.leancloud-visitors-count').text(newcounter.get('time'));
},
error: function(newcounter, error) {
console.log('Failed to create');
}
});
}
},
error: function(error) {
console.log('Error:' + error.code + " " + error.message);
}
});
}
$(function() {
var Counter = AV.Object.extend("Counter");
if ($('.leancloud_visitors').length == 1) {
addCount(Counter);
} else if ($('.post-title-link').length > 1) {
showTime(Counter);
}
});
</script>
{% endif %}

View File

@ -0,0 +1,10 @@
{% if theme.tencent_analytics %}
<script type="text/javascript">
(function() {
var hm = document.createElement("script");
hm.src = "//tajs.qq.com/stats?sId={{ theme.tencent_analytics }}";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
{% endif %}

View File

@ -0,0 +1,14 @@
{% if theme.tencent_mta %}
<script>
var _mtac = {};
(function() {
var mta = document.createElement("script");
mta.src = "https://pingjs.qq.com/h5/stats.js?v2.0.4";
mta.setAttribute("name", "MTAH5");
mta.setAttribute("sid", "{{theme.tencent_mta}}");
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(mta, s);
})();
</script>
{% endif %}

View File

@ -0,0 +1,27 @@
{% if theme.vkontakte_api.enable %}
<div id="vk_api_transport"></div>
<script type="text/javascript">
window.vkAsyncInit = function() {
VK.init({
apiId: {{ theme.vkontakte_api.app_id }}
});
{% if not is_home() and (is_post() and theme.vkontakte_api.like) %}
VK.Widgets.Like("vk_like", {type: "mini", height: 20});
{% endif %}
{% if page.comments and theme.vkontakte_api.comments %}
VK.Widgets.Comments("vk_comments", {limit: {{ theme.vkontakte_api.num_of_posts }}, attach: "*"});
{% endif %}
};
setTimeout(function() {
var el = document.createElement("script");
el.type = "text/javascript";
el.src = "//vk.com/js/api/openapi.js";
el.async = true;
document.getElementById("vk_api_transport").appendChild(el);
}, 0);
</script>
{% endif %}

View File

@ -0,0 +1,18 @@
{% if theme.changyan.enable and theme.changyan.appid and theme.changyan.appkey %}
{% if is_home() %}
<script id="cy_cmt_num" src="https://changyan.sohu.com/upload/plugins/plugins.list.count.js?clientId={{theme.changyan.appid}}"></script>
{% else %}
<script type="text/javascript">
(function(){
var appid = '{{theme.changyan.appid}}';
var conf = '{{theme.changyan.appkey}}';
var width = window.innerWidth || document.documentElement.clientWidth;
if (width < 960) {
window.document.write('<script id="changyan_mobile_js" charset="utf-8" type="text/javascript" src="https://changyan.sohu.com/upload/mobile/wap-js/changyan_mobile.js?client_id=' + appid + '&conf=' + conf + '"><\/script>'); } else { var loadJs=function(d,a){var c=document.getElementsByTagName("head")[0]||document.head||document.documentElement;var b=document.createElement("script");b.setAttribute("type","text/javascript");b.setAttribute("charset","UTF-8");b.setAttribute("src",d);if(typeof a==="function"){if(window.attachEvent){b.onreadystatechange=function(){var e=b.readyState;if(e==="loaded"||e==="complete"){b.onreadystatechange=null;a()}}}else{b.onload=a}}c.appendChild(b)};loadJs("https://changyan.sohu.com/upload/changyan.js",function(){
window.changyan.api.config({appid:appid,conf:conf})});
}
})();
</script>
<script type="text/javascript" src="https://assets.changyan.sohu.com/upload/plugins/plugins.count.js"></script>
{% endif %}
{% endif %}

View File

@ -0,0 +1,23 @@
{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname %}
{% if theme.disqus.enable %}
{% if theme.disqus.count %}
<script id="dsq-count-scr" src="https://{{theme.disqus.shortname}}.disqus.com/count.js" async></script>
{% endif %}
{% if page.comments %}
<script type="text/javascript">
var disqus_config = function () {
this.page.url = '{{ page.permalink }}';
this.page.identifier = '{{ page.path }}';
this.page.title = '{{ page.title| addslashes }}';
};
var d = document, s = d.createElement('script');
s.src = 'https://{{theme.disqus.shortname}}.disqus.com/embed.js';
s.setAttribute('data-timestamp', '' + +new Date());
(d.head || d.body).appendChild(s);
</script>
{% endif %}
{% endif %}
{% endif %}

View File

@ -0,0 +1,33 @@
{% if (theme.duoshuo and theme.duoshuo.shortname) or theme.duoshuo_shortname %}
{% if theme.duoshuo %}
{% set duoshuo_shortname = theme.duoshuo.shortname %}
{% else %}
{% set duoshuo_shortname = theme.duoshuo_shortname %}
{% endif %}
<script type="text/javascript">
var duoshuoQuery = {short_name:"{{duoshuo_shortname}}"};
(function() {
var ds = document.createElement('script');
ds.type = 'text/javascript';ds.async = true;
ds.id = 'duoshuo-script';
ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
ds.charset = 'UTF-8';
(document.getElementsByTagName('head')[0]
|| document.getElementsByTagName('body')[0]).appendChild(ds);
})();
</script>
{% if theme.duoshuo_info.ua_enable %}
{% if theme.duoshuo_info.admin_enable %}
{% set ua_parser_internal = url_for(theme.vendors._internal) + '/ua-parser-js/dist/ua-parser.min.js?v=0.7.9' %}
<script src="{{ theme.vendors.ua_parser | default(ua_parser_internal) }}"></script>
<script src="{{ url_for(theme.js) }}/src/hook-duoshuo.js?v={{ theme.version }}"></script>
{% endif %}
{% set ua_parser_internal = url_for(theme.vendors._internal) + '/ua-parser-js/dist/ua-parser.min.js?v=0.7.9' %}
<script src="{{ theme.vendors.ua_parser | default(ua_parser_internal) }}"></script>
<script src="{{ url_for(theme.js) }}/src/hook-duoshuo.js"></script>
{% endif %}
{% endif %}

View File

@ -0,0 +1,59 @@
{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname %}
{% if theme.gitment.enable and theme.gitment.client_id %}
<!-- LOCAL: You can save these files to your site and update links -->
{% if theme.gitment.mint %}
{% set CommentsClass = "Gitmint" %}
<link rel="stylesheet" href="https://aimingoo.github.io/gitmint/style/default.css">
<script src="https://aimingoo.github.io/gitmint/dist/gitmint.browser.js"></script>
{% else %}
{% set CommentsClass = "Gitment" %}
<link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">
<script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>
{% endif %}
<!-- END LOCAL -->
{% if theme.gitment.cleanly %}
<style>
a.gitment-editor-footer-tip { display: none; }
.gitment-container.gitment-footer-container { display: none; }
</style>
{% endif %}
{% if page.comments %}
<script type="text/javascript">
function renderGitment(){
var gitment = new {{CommentsClass}}({
id: window.location.pathname,
owner: '{{ theme.gitment.github_user }}',
repo: '{{ theme.gitment.github_repo }}',
{% if theme.gitment.mint %}
lang: "{{ theme.gitment.language }}" || navigator.language || navigator.systemLanguage || navigator.userLanguage,
{% endif %}
oauth: {
{% if theme.gitment.mint and theme.gitment.redirect_protocol %}
redirect_protocol: '{{ theme.gitment.redirect_protocol }}',
{% endif %}
{% if theme.gitment.mint and theme.gitment.proxy_gateway %}
proxy_gateway: '{{ theme.gitment.proxy_gateway }}',
{% else %}
client_secret: '{{ theme.gitment.client_secret }}',
{% endif %}
client_id: '{{ theme.gitment.client_id }}'
}});
gitment.render('gitment-container');
}
{% if not theme.gitment.lazy %}
renderGitment();
{% else %}
function showGitment(){
document.getElementById("gitment-display-button").style.display = "none";
document.getElementById("gitment-container").style.display = "block";
renderGitment();
}
{% endif %}
</script>
{% endif %}
{% endif %}
{% endif %}

View File

@ -0,0 +1,27 @@
{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname and not theme.disqus_shortname %}
{% if theme.hypercomments_id %}
<script type="text/javascript">
_hcwp = window._hcwp || [];
_hcwp.push({widget:"Bloggerstream", widget_id: {{ theme.hypercomments_id }}, selector:".hc-comment-count", label: "{\%COUNT%\}" });
{% if page.comments %}
_hcwp.push({widget:"Stream", widget_id: {{ theme.hypercomments_id }}, xid: "{{ page.path }}"});
{% endif %}
(function() {
if("HC_LOAD_INIT" in window)return;
HC_LOAD_INIT = true;
var lang = (navigator.language || navigator.systemLanguage || navigator.userLanguage || "en").substr(0, 2).toLowerCase();
var hcc = document.createElement("script"); hcc.type = "text/javascript"; hcc.async = true;
hcc.src = ("https:" == document.location.protocol ? "https" : "http")+"://w.hypercomments.com/widget/hc/{{ theme.hypercomments_id }}/"+lang+"/widget.js";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hcc, s.nextSibling);
})();
</script>
{% endif %}
{% endif %}

View File

@ -0,0 +1,8 @@
{% include 'duoshuo.swig' %}
{% include 'disqus.swig' %}
{% include 'hypercomments.swig' %}
{% include 'youyan.swig' %}
{% include 'livere.swig' %}
{% include 'changyan.swig' %}
{% include 'gitment.swig' %}
{% include 'valine.swig' %}

View File

@ -0,0 +1,16 @@
{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname and not (theme.disqus.enable and theme.disqus.shortname) and not theme.hypercomments_id %}
{% if page.comments and theme.livere_uid %}
<script type="text/javascript">
(function(d, s) {
var j, e = d.getElementsByTagName(s)[0];
if (typeof LivereTower === 'function') { return; }
j = d.createElement(s);
j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
j.async = true;
e.parentNode.insertBefore(j, e);
})(document, 'script');
</script>
{% endif %}
{% endif %}

View File

@ -0,0 +1,23 @@
{% if theme.valine.enable and theme.valine.appid and theme.valine.appkey %}
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="//unpkg.com/valine/dist/Valine.min.js"></script>
<script type="text/javascript">
var GUEST = ['nick','mail','link'];
var guest = '{{ theme.valine.guest_info }}';
guest = guest.split(',').filter(item=>{
return GUEST.indexOf(item)>-1;
});
new Valine({
el: '#comments' ,
verify: {{ theme.valine.verify }},
notify: {{ theme.valine.notify }},
appId: '{{ theme.valine.appid }}',
appKey: '{{ theme.valine.appkey }}',
placeholder: '{{ theme.valine.placeholder }}',
avatar:'{{ theme.valine.avatar }}',
guest_info:guest,
pageSize:'{{ theme.valine.pageSize }}' || 10,
});
</script>
{% endif %}

View File

@ -0,0 +1,16 @@
{% if not (theme.duoshuo and theme.duoshuo.shortname)
and not theme.duoshuo_shortname
and not theme.disqus_shortname
and not theme.hypercomments_id %}
{% if theme.youyan_uid %}
{% set uid = theme.youyan_uid %}
{% if page.comments %}
<!-- UY BEGIN -->
<script type="text/javascript" src="http://v2.uyan.cc/code/uyan.js?uid={{uid}}"></script>
<!-- UY END -->
{% endif %}
{% endif %}
{% endif %}

View File

@ -0,0 +1,5 @@
{# 多说热评文章 #}
{% if (theme.duoshuo_hotartical and page.title) %}
<p>热评文章</p>
<div class="ds-top-threads" data-range="weekly" data-num-items="4"></div>
{% endif %}

View File

@ -0,0 +1,3 @@
{% if theme.exturl %}
<script type="text/javascript" src="{{ url_for(theme.js) }}/src/exturl.js?v={{ theme.version }}"></script>
{% endif %}

View File

@ -0,0 +1,23 @@
{% if theme.mathjax.enable %}
{% if not theme.mathjax.per_page or (page.total or page.mathjax) %}
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
processEscapes: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
}
});
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Queue(function() {
var all = MathJax.Hub.getAllJax(), i;
for (i=0; i < all.length; i += 1) {
all[i].SourceElement().parentNode.className += ' has-jax';
}
});
</script>
<script type="text/javascript" src="{{ theme.mathjax.cdn }}"></script>
{% endif %}
{% endif %}

View File

@ -0,0 +1,30 @@
{% if theme.needmoreshare2.enable %}
{% set needmoreshare2_css = url_for(theme.vendors._internal + '/needsharebutton/needsharebutton.css') %}
{% if theme.vendors.needmoreshare2 %}
{% set needmoreshare2_css = theme.vendors.needmoreshare2_css %}
{% endif %}
<link rel="stylesheet" href="{{ needmoreshare2_css }}">
{% set needmoreshare2_js = url_for(theme.vendors._internal + '/needsharebutton/needsharebutton.js') %}
{% if theme.vendors.needmoreshare2_js %}
{% set needmoreshare2_js = theme.vendors.needmoreshare2_js %}
{% endif %}
<script src="{{ needmoreshare2_js }}"></script>
<script>
{% if theme.needmoreshare2.postbottom.enable %}
pbOptions = {};
{% for k,v in theme.needmoreshare2.postbottom.options %}
pbOptions.{{ k }} = "{{ v }}";
{% endfor %}
new needShareButton('#needsharebutton-postbottom', pbOptions);
{% endif %}
{% if theme.needmoreshare2.float.enable %}
flOptions = {};
{% for k,v in theme.needmoreshare2.float.options %}
flOptions.{{ k }} = "{{ v }}";
{% endfor %}
new needShareButton('#needsharebutton-float', flOptions);
{% endif %}
</script>
{% endif %}

View File

@ -0,0 +1,18 @@
{% if theme.rating.enable and (not is_home() and is_post()) %}
<script type="text/javascript">
wpac_init = window.wpac_init || [];
wpac_init.push({widget: 'Rating', id: {{ theme.rating.id }},
el: 'wpac-rating',
color: '{{ theme.rating.color }}'
});
(function() {
if ('WIDGETPACK_LOADED' in window) return;
WIDGETPACK_LOADED = true;
var mc = document.createElement('script');
mc.type = 'text/javascript';
mc.async = true;
mc.src = '//embed.widgetpack.com/widget.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(mc, s.nextSibling);
})();
</script>
{% endif %}

View File

@ -0,0 +1,185 @@
{% if theme.calendar.enable %}
{% if page.type == 'schedule' %}
<script>
// Initialization
var _n = function(arg) { if(arg) return arg; else return void 0;}
var cal_data = void 0;
var now = new Date();
var timeMax = new Date();
var timeMin = new Date();
// Read config form theme config file
var calId = _n('{{ theme.calendar.calendar_id }}') ;
var apiKey = _n('{{ theme.calendar.api_key }}') ;
var orderBy = _n('{{ theme.calendar.ordarBy }}') || 'startTime';
var showLocation = _n('{{ theme.calendar.showLocation }}') || 'false' ;
var offsetMax = _n( {{ theme.calendar.offsetMax }} ) || 72 ;
var offsetMin = _n( {{ theme.calendar.offsetMin }} ) || 4 ;
var timeZone = _n( {{ theme.calendar.timeZone }} ) || void 0 ;
var showDeleted = _n( {{ theme.calendar.showDeleted }} ) || 'false' ;
var singleEvents = _n( {{ theme.calendar.singleEvents }} ) || 'true' ;
var maxResults = _n( {{ theme.calendar.maxResults }} ) || '250' ;
timeMax.setHours(now.getHours() + offsetMax);
timeMin.setHours(now.getHours() - offsetMin);
// Build URL
BASE_URL = 'https://www.googleapis.com/calendar/v3/calendars/';
FIELD_KEY = 'key';
FIELD_ORDERBY = 'orderBy';
FIELD_TIMEMAX = 'timeMax';
FIELD_TIMEMIN = 'timeMin';
FIELD_TIMEZONE = 'timeZone';
FIELD_SHOWDELETED = 'showDeleted';
FIELD_SINGLEEVENTS = 'singleEvents';
FIELD_MAXRESULTS = 'maxResults';
timeMaxISO = timeMax.toISOString();
timeMinISO = timeMin.toISOString();
request_url = BASE_URL + calId + '/events?' +
FIELD_KEY + '=' + apiKey + '&' +
FIELD_ORDERBY + '=' + orderBy + '&' +
FIELD_TIMEMAX + '=' + timeMaxISO + '&' +
FIELD_TIMEMIN + '=' + timeMinISO + '&' +
FIELD_SHOWDELETED + '=' + showDeleted + '&' +
FIELD_SINGLEEVENTS + '=' + singleEvents + '&' +
FIELD_MAXRESULTS + '=' + maxResults;
if (timeZone) {
request_url = request_url + '&' + FIELD_TIMEZONE + '=' + timeZone;
}
fetchData();
var queryLoop = setInterval(fetchData, 60000);
function fetchData() {
$.ajax({
dataType: 'json',
url: request_url,
success: function(data) {
$eventList = $('#schedule #event-list');
// clean the event list
$eventList.html("");
var prevEnd = 0; // used to decide where to insert an <hr>
data['items'].forEach((event) => {
// parse data
var start = new Date(event.start.dateTime);
var end = new Date(event.end.dateTime);
tense = judgeTense(now, start, end); // 0:now 1:future -1:past
if (tense == 1 && prevEnd < now) $eventList.append('<hr>');
eventDOM = buildEventDOM(tense, event);
$eventList.append(eventDOM);
prevEnd = end;
});
}
});
}
function getRelativeTime(current, previous) {
var msPerMinute = 60 * 1000;
var msPerHour = msPerMinute * 60;
var msPerDay = msPerHour * 24;
var msPerMonth = msPerDay * 30;
var msPerYear = msPerDay * 365;
var elapsed = current - previous;
var tense = elapsed > 0 ? "ago" : "later";
elapsed = Math.abs(elapsed);
if ( elapsed < msPerHour ) {
return Math.round(elapsed/msPerMinute) + ' minutes ' + tense;
}
else if ( elapsed < msPerDay ) {
return Math.round(elapsed/msPerHour) + ' hours ' + tense;
}
else if ( elapsed < msPerMonth ) {
return 'about ' + Math.round(elapsed/msPerDay) + ' days ' + tense;
}
else if ( elapsed < msPerYear ) {
return 'about ' + Math.round(elapsed/msPerMonth) + ' months ' + tense;
}
else {
return 'about' + Math.round(elapsed/msPerYear) + ' years' + tense;
}
}
function judgeTense(now, eventStart, eventEnd) {
if (eventEnd < now) { return -1; }
else if (eventStart > now) { return 1; }
else { return 0; }
}
function buildEventDOM(tense, event) {
var tenseClass = "";
var start = new Date(event.start.dateTime);
var end = new Date(event.end.dateTime);
switch(tense) {
case 0 : // now
tenseClass = "event-now";
break;
case 1 : // future
tenseClass = "event-future";
break;
case -1: // past
tenseClass = "event-past";
break;
default:
throw "Time data error";
}
durationFormat = {
weekday: 'short',
hour: '2-digit',
minute:'2-digit'
};
relativeTimeStr = (tense == 0) ? "NOW" : getRelativeTime(now, start);
durationStr = start.toLocaleTimeString([], durationFormat) + " - " +
end.toLocaleTimeString([], durationFormat);
liOpen = `<li class="event ${tenseClass}">`;
liClose = `</li>`;
h2Open = `<h2 class="event-summary">`;
h2Close = `</h2>`;
locationDOM = "";
if (showLocation && event['location']) {
locationDOM = `<span class="event-location event-details">
${event['location']}
</span>`;
}
relativeTimeDOM = `<span class="event-relative-time">
${relativeTimeStr}
</span>`;
durationDOM = `<span class="event-duration event-details">
${durationStr}
</span>`;
eventContent =
liOpen +
h2Open +
event['summary'] +
relativeTimeDOM+
h2Close +
locationDOM +
durationDOM +
liClose;
return eventContent;
}
</script>
{% endif %}
{% endif %}

View File

@ -0,0 +1,4 @@
{% if theme.save_scroll %}
<script type="text/javascript" src="{{ url_for(theme.js) }}/src/js.cookie.js?v={{ theme.version }}"></script>
<script type="text/javascript" src="{{ url_for(theme.js) }}/src/scroll-cookie.js?v={{ theme.version }}"></script>
{% endif %}

View File

@ -0,0 +1,18 @@
{% if theme.algolia_search.enable %}
{# S: Include Algolia instantsearch.js library #}
{% set algolia_instant_css = url_for(theme.vendors._internal + '/algolia-instant-search/instantsearch.min.css') %}
{% if theme.vendors.algolia_instant_css %}
{% set algolia_instant_css = theme.vendors.algolia_instant_css %}
{% endif %}
<link rel="stylesheet" href="{{ algolia_instant_css }}">
{% set algolia_instant_js = url_for(theme.vendors._internal + '/algolia-instant-search/instantsearch.min.js') %}
{% if theme.vendors.algolia_instant_js %}
{% set algolia_instant_js = theme.vendors.algolia_instant_js %}
{% endif %}
<script src="{{ algolia_instant_js }}"></script>
{# E: Include Algolia instantsearch.js library #}
<script src="{{ url_for(theme.js) }}/src/algolia-search.js?v={{ theme.version }}"></script>
{% endif %}

View File

@ -0,0 +1,20 @@
{% if theme.algolia_search.enable %}
<div class="algolia-popup popup search-popup">
<div class="algolia-search">
<div class="algolia-search-input-icon">
<i class="fa fa-search"></i>
</div>
<div class="algolia-search-input" id="algolia-search-input"></div>
</div>
<div class="algolia-results">
<div id="algolia-stats"></div>
<div id="algolia-hits"></div>
<div id="algolia-pagination" class="algolia-pagination"></div>
</div>
<span class="popup-btn-close">
<i class="fa fa-times-circle"></i>
</span>
</div>
{% endif %}

Some files were not shown because too many files have changed in this diff Show More