Compare commits
173 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
203268ef54 | ||
|
465a1f871b | ||
|
0b55074b50 | ||
|
6a7213ccfb | ||
|
d6596af54c | ||
|
6e45d27f95 | ||
|
9421e614f8 | ||
|
adccb1fb64 | ||
|
d774e4868d | ||
|
b3280e8d81 | ||
|
c2f6f674b0 | ||
|
d67e7b66e4 | ||
|
daa9eafe47 | ||
|
be3c627b53 | ||
|
bf50fa3cbf | ||
|
47c68fbcf6 | ||
|
7df5fb3bbc | ||
|
7875f1f10b | ||
|
0f2ce49711 | ||
|
62bbf2ea84 | ||
|
73d1541964 | ||
|
3f62a1d379 | ||
|
65660e28ff | ||
|
f16f3f3b67 | ||
|
d5967b9b27 | ||
|
3c4e20c278 | ||
|
9f8cdc1e08 | ||
|
f741f71d48 | ||
|
5f67e530ca | ||
|
ae0dc7c60e | ||
|
1480ba764a | ||
|
0d50488be9 | ||
|
5367cb98aa | ||
|
4180e196a7 | ||
|
aa8f962b96 | ||
|
f5c57c26a4 | ||
|
4c6353ef4f | ||
|
ac48e4b5d7 | ||
|
f3932d682c | ||
|
07f3f29b6a | ||
|
47c56cc364 | ||
|
bf2f718d73 | ||
|
550ab8a68d | ||
|
15b16e79ce | ||
|
84bca19471 | ||
|
313752c594 | ||
|
7ef6c7c618 | ||
|
31b38391de | ||
|
9c53a603f3 | ||
|
a9db32d0cb | ||
|
3ff73f9805 | ||
|
5969d1a456 | ||
|
219bb6db37 | ||
|
e0f4461fe5 | ||
|
20332ad8f2 | ||
|
8229b7436f | ||
|
c24db5e371 | ||
|
8b6074fef4 | ||
|
3d4a4fcc7e | ||
|
a842da9697 | ||
|
72c4fd9761 | ||
|
f1c3083f09 | ||
|
a29108efdc | ||
|
c679fd6256 | ||
|
49dfb78503 | ||
|
809d54eae2 | ||
|
e76f208516 | ||
|
aad79d1baa | ||
|
221c637409 | ||
|
5a4edd6483 | ||
|
0163b6bfe5 | ||
|
3fa2e339c5 | ||
|
1c857a0c5f | ||
|
302c6080fd | ||
|
ec47bd254a | ||
|
42a6eb0c33 | ||
|
0c0ea3312c | ||
|
1e0275d757 | ||
|
c5f8d5d058 | ||
|
38e99de4fb | ||
|
24be666717 | ||
|
4991ad5085 | ||
|
ed96a4ac21 | ||
|
c61cbb4803 | ||
|
2e7b792039 | ||
|
76096640f4 | ||
|
343b1435c1 | ||
|
6270c15b76 | ||
|
1292dbff48 | ||
|
651ccc266c | ||
|
61ddfbf724 | ||
|
826a654766 | ||
|
6a407dc892 | ||
|
cb4eba81c7 | ||
|
24a5b177ac | ||
|
49cf370803 | ||
|
4dc27165b9 | ||
|
77caffdbfa | ||
|
9767e1fa3f | ||
|
83572e499b | ||
|
ea8711e0ca | ||
|
5fc9da7249 | ||
|
b7c3ce4f21 | ||
|
7af6fda960 | ||
|
501ce9a842 | ||
|
8de56d6a6e | ||
|
acb071831b | ||
|
cd0825d52a | ||
|
5fec2eb442 | ||
|
8e8f682098 | ||
|
0753bb9bf3 | ||
|
8066ea8b5b | ||
|
85fe5c123e | ||
|
f6be671638 | ||
|
240304719d | ||
|
bb87ce34fc | ||
|
777fc5af56 | ||
|
c585654582 | ||
|
948cb65243 | ||
|
106f2494eb | ||
|
4c72c3521c | ||
|
2dd7a5408b | ||
|
7b58e4541a | ||
|
16ce821f1f | ||
|
8aaa2094c4 | ||
|
567584695c | ||
|
cd6c3c6e28 | ||
|
def8609767 | ||
|
af0bc34076 | ||
|
1c3644ef7b | ||
|
b1def36445 | ||
|
47d33f0b13 | ||
|
e868170925 | ||
|
2e497bf1b5 | ||
|
03607113d3 | ||
|
a31a403ec9 | ||
|
7d0130035e | ||
|
e95daf0fe7 | ||
|
a350cb7098 | ||
|
0415b2999a | ||
|
e24c1c8fde | ||
|
4460828c6a | ||
|
3932a3d8ef | ||
|
1c0b980462 | ||
|
c63f8450e3 | ||
|
7548895d03 | ||
|
b1fc783466 | ||
|
ef684cecba | ||
|
4027d32ce0 | ||
|
736a5d3876 | ||
|
b9284527ec | ||
|
c48d95fcd9 | ||
|
ee3908d8aa | ||
|
14e0f01357 | ||
|
e95cdd5cd8 | ||
|
3bb55b8fcb | ||
|
c18a2e681e | ||
|
7642eba4d6 | ||
|
4d3776ea3c | ||
|
9bb629ee79 | ||
|
83b79e97c1 | ||
|
b04e2838a0 | ||
|
e3724557a3 | ||
|
c775133f5b | ||
|
48a39f4322 | ||
|
b1f929876c | ||
|
8b0ab2c38d | ||
|
505f34cd3f | ||
|
7d1f337d59 | ||
|
7f495adc00 | ||
|
abc77cc06e | ||
|
944ae944e1 | ||
|
a19fce2fb0 |
58
.drone.yml
Normal file
@@ -0,0 +1,58 @@
|
||||
kind: pipeline
|
||||
steps:
|
||||
- name: restore-cache
|
||||
image: meltwater/drone-cache:dev
|
||||
environment:
|
||||
AWS_ACCESS_KEY_ID:
|
||||
from_secret: aws_acces
|
||||
AWS_SECRET_ACCESS_KEY:
|
||||
from_secret: aws_key
|
||||
pull: true
|
||||
settings:
|
||||
debug: false
|
||||
cache_key: '{{ arch }}_{{ os }}_{{ checksum "package-lock.json" }}'
|
||||
archive_format: "gzip"
|
||||
endpoint: storage.yandexcloud.net
|
||||
restore: true
|
||||
bucket: drone-cache
|
||||
region: ru-central1
|
||||
mount: 'node_modules'
|
||||
- name: run-sh
|
||||
image: node:alpine
|
||||
commands:
|
||||
- chmod +x ./bin/run.sh
|
||||
- ./bin/run.sh
|
||||
- name: update-site
|
||||
image: plugins/downstream
|
||||
settings:
|
||||
server: https://drone.lp76.ru
|
||||
token:
|
||||
from_secret: drone_token
|
||||
fork: false
|
||||
repositories:
|
||||
- aleks/site
|
||||
- name: rebuild-cache
|
||||
image: meltwater/drone-cache:dev
|
||||
environment:
|
||||
AWS_ACCESS_KEY_ID:
|
||||
from_secret: aws_acces
|
||||
AWS_SECRET_ACCESS_KEY:
|
||||
from_secret: aws_key
|
||||
pull: true
|
||||
settings:
|
||||
debug: false
|
||||
cache_key: '{{ arch }}_{{ os }}_{{ checksum "package-lock.json" }}'
|
||||
archive_format: "gzip"
|
||||
endpoint: storage.yandexcloud.net
|
||||
rebuild: true
|
||||
bucket: drone-cache
|
||||
region: ru-central1
|
||||
mount: 'node_modules'
|
||||
- name: telegram
|
||||
image: appleboy/drone-telegram
|
||||
settings:
|
||||
token:
|
||||
from_secret: token_telegramm
|
||||
to:
|
||||
from_secret: to_telegram_user
|
||||
message: #success {{build.status}}
|
3
.gitattributes
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
*.html linguist-language=javascript
|
||||
*.stylus linguist-language=javascript
|
||||
*.ejs linguist-language=javascript
|
12
.github/FUNDING.yml
vendored
@@ -1,12 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: https://pic.downk.cc/item/5e1c70bc2fb38b8c3c5b0a2f.png
|
70
.github/ISSUE_TEMPLATE/bug-report.md
vendored
@@ -1,70 +0,0 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Something isn't working as expected
|
||||
title: ""
|
||||
labels: Bug
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate.
|
||||
请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
|
||||
|
||||
## Issue Checklist <!-- 我确认我已经查看了 -->
|
||||
|
||||
<!-- Change [ ] to [x] to select (将 [ ] 换成 [x] 来选择) -->
|
||||
|
||||
- [ ] I am using [the latest](https://github.com/Shen-Yu/hexo-theme-ayer) version of hexo-theme-ayer.
|
||||
- [ ] I have reviewed the latest Roadmap on GitHub and searched for current [Ayer Issues](https://github.com/Shen-Yu/hexo-theme-ayer/issues), which does not help me.
|
||||
|
||||
---
|
||||
|
||||
## Expected behavior <!-- 预期行为 -->
|
||||
|
||||
## Actual behavior <!-- 实际行为 -->
|
||||
|
||||
<!-- Please provide at least one of the following information (请至少提供以下的一项信息) -->
|
||||
|
||||
- Links to demo site with this issue: N/A
|
||||
- Links to repository or source code of the blog: N/A
|
||||
|
||||
## Steps to reproduce the behavior <!-- 重现步骤 -->
|
||||
|
||||
1. N/A
|
||||
2. N/A
|
||||
3. N/A
|
||||
|
||||
## Environment Information
|
||||
|
||||
### Node.js and NPM Information
|
||||
|
||||
<!-- Paste output from `node -v && npm -v` (粘贴 `node -v && npm -v` 输出的信息) -->
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
### Package dependencies Information
|
||||
|
||||
<!-- Paste output from `npm ls --depth 0` (粘贴 `npm ls --depth 0` 输出的信息) -->
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
### HTML Configuration
|
||||
|
||||
<!-- Paste configuration from HTML (粘贴 HTML 配置 中的内容) -->
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
### MiniValine Configuration
|
||||
|
||||
<!-- Paste configuration from MiniValine (粘贴 MiniValine 配置 中的内容) -->
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
## Other Information <!-- (Like Browser, System, Screenshots) -->
|
36
.github/ISSUE_TEMPLATE/feature-request.md
vendored
@@ -1,36 +0,0 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: Suggest an idea for this project
|
||||
title: ""
|
||||
labels: Feature Request
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate.
|
||||
请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
|
||||
|
||||
## Issue Checklist <!-- 我确认我已经查看了 -->
|
||||
|
||||
<!-- Change [ ] to [x] to select (将 [ ] 换成 [x] 来选择) -->
|
||||
|
||||
- [ ] I am using [the latest](https://github.com/Shen-Yu/hexo-theme-ayer) version of hexo-theme-ayer.
|
||||
- [ ] I have reviewed the latest Roadmap on GitHub and searched for current [Ayer Issues](https://github.com/Shen-Yu/hexo-theme-ayer/issues), which does not help me.
|
||||
|
||||
---
|
||||
|
||||
## Expected behavior <!-- 预期行为 -->
|
||||
|
||||
## Actual behavior <!-- 实际行为 -->
|
||||
|
||||
<!-- Please provide at least one of the following information (请至少提供以下的一项信息) -->
|
||||
|
||||
- Links to demo site with this feature: N/A
|
||||
- Links to repository or source code of the blog: N/A
|
||||
|
||||
## Steps to reproduce the behavior <!-- 重现步骤 -->
|
||||
|
||||
1. N/A
|
||||
2. N/A
|
||||
3. N/A
|
||||
|
||||
## Other Information <!-- Like Browser, System, Screenshots -->
|
21
.github/ISSUE_TEMPLATE/other.md
vendored
@@ -1,21 +0,0 @@
|
||||
---
|
||||
name: Other
|
||||
about: Not a question, feature request or bug report
|
||||
title: ""
|
||||
labels: ""
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate.
|
||||
请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
|
||||
|
||||
## Issue Checklist <!-- 我确认我已经查看了 -->
|
||||
|
||||
<!-- Change [ ] to [x] to select (将 [ ] 换成 [x] 来选择) -->
|
||||
|
||||
- [ ] I am using [the latest](https://github.com/Shen-Yu/hexo-theme-ayer) version of hexo-theme-ayer.
|
||||
- [ ] I have reviewed the latest Roadmap on GitHub and searched for current [Ayer Issues](https://github.com/Shen-Yu/hexo-theme-ayer/issues), which does not help me.
|
||||
|
||||
---
|
||||
|
||||
## Other Information <!-- Like Browser, System, Screenshots -->
|
70
.github/ISSUE_TEMPLATE/question.md
vendored
@@ -1,70 +0,0 @@
|
||||
---
|
||||
name: Question
|
||||
about: I have a question for Ayer
|
||||
title: ""
|
||||
labels: Question
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate.
|
||||
请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
|
||||
|
||||
## Issue Checklist <!-- 我确认我已经查看了 -->
|
||||
|
||||
<!-- Change [ ] to [x] to select (将 [ ] 换成 [x] 来选择) -->
|
||||
|
||||
- [ ] I am using [the latest](https://github.com/Shen-Yu/hexo-theme-ayer) version of hexo-theme-ayer.
|
||||
- [ ] I have reviewed the latest Roadmap on GitHub and searched for current [Ayer Issues](https://github.com/Shen-Yu/hexo-theme-ayer/issues), which does not help me.
|
||||
|
||||
---
|
||||
|
||||
## Expected behavior <!-- 预期行为 -->
|
||||
|
||||
## Actual behavior <!-- 实际行为 -->
|
||||
|
||||
<!-- Please provide at least one of the following information (请至少提供以下的一项信息) -->
|
||||
|
||||
- Links to demo site with this issue: N/A
|
||||
- Links to repository or source code of the blog: N/A
|
||||
|
||||
## Steps to reproduce the behavior <!-- 重现步骤 -->
|
||||
|
||||
1. N/A
|
||||
2. N/A
|
||||
3. N/A
|
||||
|
||||
## Environment Information
|
||||
|
||||
### Node.js and NPM Information
|
||||
|
||||
<!-- Paste output from `node -v && npm -v` (粘贴 `node -v && npm -v` 输出的信息) -->
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
### Package dependencies Information
|
||||
|
||||
<!-- Paste output from `npm ls --depth 0` (粘贴 `npm ls --depth 0` 输出的信息) -->
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
### HTML Configuration
|
||||
|
||||
<!-- Paste configuration from HTML (粘贴 HTML 配置 中的内容) -->
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
### Ayer Configuration
|
||||
|
||||
<!-- Paste configuration from Ayer (粘贴 Ayer 配置 中的内容) -->
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
## Other Information <!-- (Like Browser, System, Screenshots) -->
|
12
.github/config.yml
vendored
@@ -1,12 +0,0 @@
|
||||
# =============================================================================================== #
|
||||
# Configuration for welcome - https://github.com/behaviorbot/welcome
|
||||
|
||||
# Comment to be posted to on first time issues
|
||||
newIssueWelcomeComment: >
|
||||
Thanks for opening this issue, maintainers will get back to you as soon as possible!
|
||||
# Comment to be posted to on PRs from first time contributors in your repository
|
||||
newPRWelcomeComment: >
|
||||
Thanks so much for opening your first PR here!
|
||||
# Comment to be posted to on pull requests merged by a first time user
|
||||
firstPRMergeComment: >
|
||||
Congrats on merging your first pull request here! :tada: How awesome!
|
31
.github/workflows/node.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
|
||||
|
||||
name: Node.js CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x, 18.x]
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- run: npm run build --if-present
|
||||
- run: npm test
|
7
.gitignore
vendored
@@ -2,10 +2,7 @@
|
||||
.idea/
|
||||
*.log
|
||||
*.iml
|
||||
yarn.lock
|
||||
package-lock.json
|
||||
node_modules/
|
||||
.cache
|
||||
|
||||
# Setting
|
||||
_config.yml
|
||||
.history
|
||||
_bak.yml
|
||||
|
4
.npmignore
Normal file
@@ -0,0 +1,4 @@
|
||||
.cache/
|
||||
.history/
|
||||
.github/
|
||||
_bak.yml
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"plugins": {
|
||||
"autoprefixer": true
|
||||
}
|
||||
}
|
@@ -1,8 +0,0 @@
|
||||
language: node_js
|
||||
|
||||
node_js: node
|
||||
|
||||
cache:
|
||||
npm: true
|
||||
|
||||
install: npm install
|
37
LICENSE
@@ -1,37 +0,0 @@
|
||||
The Star And Thank Author License (SATA)
|
||||
|
||||
Copyright © 2019 Shen-Yu(shenyu@hotmail.com)
|
||||
|
||||
Project Url: https://github.com/Shen-Yu/hexo-theme-ayer
|
||||
|
||||
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.
|
||||
|
||||
And wait, the most important, you shall star/+1/like the project(s) in project url
|
||||
section above first, and then thank the author(s) in Copyright section.
|
||||
|
||||
Here are some suggested ways:
|
||||
|
||||
- Email the authors a thank-you letter, and make friends with him/her/them.
|
||||
- Report bugs or issues.
|
||||
- Tell friends what a wonderful project this is.
|
||||
- And, sure, you can just express thanks in your mind without telling the world.
|
||||
|
||||
Contributors of this project by forking have the option to add his/her name and
|
||||
forked project url at copyright and project url sections, but shall not delete
|
||||
or modify anything else in these two sections.
|
||||
|
||||
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.
|
306
README.md
@@ -1,78 +1,49 @@
|
||||
<p align="center"><a href="https://shen-yu.gitee.io" target="_blank" rel="noopener noreferrer"><img width="100" src="logo.png" alt="ayer logo"></a></p>
|
||||
|
||||
<h3 align="center">一个安静且优雅的 Hexo 主题</h3>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://travis-ci.org/Shen-Yu/hexo-theme-ayer?branch=master" target="_blank" rel="noopener noreferrer">
|
||||
<img alt="travis-ci" src="https://travis-ci.org/Shen-Yu/hexo-theme-ayer.svg?branch=master">
|
||||
</a>
|
||||
<a href="http://standardjs.com" target="_blank" rel="noopener noreferrer">
|
||||
<img alt="js-standard-style" src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg">
|
||||
</a>
|
||||
<br>
|
||||
<a href="https://hubble.js.org?owner=Shen-Yu&repo=hexo-theme-ayer&start"><img src="https://img.shields.io/badge/since-2019-409eff.svg" alt="Hubble"></a>
|
||||
<a href="https://shen-yu.gitee.io" target="_blank" rel="noopener noreferrer">
|
||||
<img alt="platform" src="https://img.shields.io/badge/platform-PC--ios--android-e68db8.svg">
|
||||
</a>
|
||||
<a href="https://gitter.im/hexo-theme-ayer/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge" target="_blank" rel="noopener noreferrer">
|
||||
<img alt="Gitter" src="https://badges.gitter.im/Join%20Chat.svg">
|
||||
</a>
|
||||
<br>
|
||||
<a href="https://github.com/Shen-Yu/hexo-theme-ayer/releases" target="_blank" rel="noopener noreferrer">
|
||||
<img alt="GitHub tag (latest by date)" src="https://img.shields.io/github/v/tag/Shen-Yu/hexo-theme-ayer?color=blue">
|
||||
</a>
|
||||
<img alt="language" src="https://img.shields.io/badge/language-ejs--stylus-green.svg">
|
||||
<img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/Shen-Yu/hexo-theme-ayer?color=%23af8ddc">
|
||||
<a href="https://github.com/Shen-Yu/hexo-theme-ayer/blob/master/LICENSE" target="_blank" rel="noopener noreferrer"><img alt="LICENSE" src="https://img.shields.io/badge/LICENSE-SATA-efa96e">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
:ocean: Ayer is a clean and elegant theme for Hexo, also fast, powerful and responsive. It contains many awesome features, It's perfect for your blog, "Ayer" means "water" in Malaysian and "yesterday" in Spanish. If you have any queries or advice during the process of using, Please contact me! shenyu@hotmail.com
|
||||
|
||||
<b>注:收藏本主题请点右上角Star,谢谢~~ </b>
|
||||
<b>如果你想给主题添砖加瓦,可以点右上角Fork,然后给此仓库提交PR</b>
|
||||
|
||||
### [Preview 预览](https://shen-yu.gitee.io)
|
||||
|
||||
### [中文说明](https://shen-yu.gitee.io/2019/ayer/)
|
||||
|
||||
### [国内镜像](https://gitee.com/shen-yu/hexo-theme-ayer)
|
||||
|
||||

|
||||
|
||||
### Install
|
||||
## Install
|
||||
|
||||
``` bash
|
||||
$ git clone https://github.com/Shen-Yu/hexo-theme-ayer.git themes/ayer
|
||||
### For hexo >= 5.0
|
||||
|
||||
```shell
|
||||
npm i hexo-theme-ayer -S
|
||||
```
|
||||
|
||||
### Enable
|
||||
- If this theme is newly installed, a `_config.ayer.yml` file will be generated in the root directory after the installation is complete, and you can directly edit the `_config.ayer.yml` file for configuration.
|
||||
- If it is a theme upgrade, you can use the configuration method of hexo < 5.0, or you can move the original configuration file to the root directory and rename it to `_config.ayer.yml`.
|
||||
|
||||
### For hexo < 5.0
|
||||
|
||||
```shell
|
||||
git clone https://github.com/Shen-Yu/hexo-theme-ayer.git themes/ayer
|
||||
```
|
||||
|
||||
## Enable
|
||||
|
||||
Modify `theme` setting in `_config.yml` to `ayer`
|
||||
|
||||
``` yml
|
||||
```yml
|
||||
theme: ayer
|
||||
```
|
||||
|
||||
### Update
|
||||
## Update
|
||||
|
||||
``` bash
|
||||
```bash
|
||||
cd themes/ayer
|
||||
git pull
|
||||
```
|
||||
|
||||
### Multi Language Support
|
||||
zh-CN(中文简体) en(English) zh-TW(中文繁体) ja(Japanese) es(Spanish) de(German) fr(French) ru(Russian) ko(Korean) vi(Vietnamese) nl(Dutch) no(Norwegian) pt(Portuguese)
|
||||
## Multi Language Support
|
||||
|
||||
English is default languge, if you want to change, modify `language` option in `_config.yml` file in your blog's root folder.
|
||||
zh-CN(中文简体) en(English) zh-TW(中文繁体) ja(日本語) es(Español) de(Deutsch) fr(Français) ru(Русский) ko(한국어) vi(Tiếng Việt) nl(Nederlands) no(norsk) pt(Português)
|
||||
|
||||
### Configuration
|
||||
English is default languge, if you want to change, modify `language` option in `_config.yml` file in your Hexo blog's root folder.
|
||||
|
||||
## Configuration
|
||||
|
||||
let me know if you have any questions.
|
||||
|
||||
``` yml
|
||||
```yml
|
||||
# Menu-Sidebar
|
||||
menu:
|
||||
Home: /
|
||||
@@ -89,7 +60,7 @@ subtitle:
|
||||
enable: true
|
||||
text: A clean and elegant theme
|
||||
text2: It's perfect for your hexo blog
|
||||
text3: Have fun! #Supports up to three lines of text
|
||||
text3: Have fun! #Supports up to three lines of text
|
||||
startDelay: 0
|
||||
typeSpeed: 200
|
||||
loop: true
|
||||
@@ -100,16 +71,22 @@ subtitle:
|
||||
favicon: /favicon.ico
|
||||
logo: /images/ayer-side.svg
|
||||
|
||||
# Cover Setting
|
||||
# Cover Setting
|
||||
# enable: [true|false];path: [background-image];logo: [cover-logo-image]
|
||||
cover:
|
||||
enable: true
|
||||
path: /images/cover1.jpg # there are some beautiful cover images in Ayer's directory: /source/images, choose your favorite image to replace it.
|
||||
path: /images/cover1.jpg # there are some beautiful cover images in Ayer's directory: /source/images, choose your favorite image to replace it.
|
||||
logo: /images/ayer.svg
|
||||
|
||||
# ProgressBar
|
||||
# ProgressBar
|
||||
progressBar: true
|
||||
|
||||
# Boardcast
|
||||
broadcast:
|
||||
enable: true
|
||||
type: 2 # 1:custom,2:hitokoto api(https://hitokoto.cn/)
|
||||
text: a clean and elegant theme, fast and responsive. # only work in custom mode
|
||||
|
||||
# Article Setting
|
||||
# (Use this to excerpt if article is too long:<!--more-->)
|
||||
excerpt_link: Read More...
|
||||
@@ -148,7 +125,7 @@ word_count:
|
||||
# type:0-close reward; 1-only open in article which you have configured reward:true; 2-open in all articles
|
||||
reward_type: 2
|
||||
# reward word
|
||||
reward_wording: 'Buy me a cup of coffee~'
|
||||
reward_wording: "Buy me a cup of coffee~"
|
||||
# qrcode image path
|
||||
alipay: /images/alipay.jpg
|
||||
# qrcode image path
|
||||
@@ -185,33 +162,10 @@ layout:
|
||||
article_width: 80rem
|
||||
sidebar_width: 8rem
|
||||
|
||||
# Comment:1、Valine (recommended);2、Gitalk
|
||||
|
||||
# 1、Valine [A fast, simple & powerful comment system](https://github.com/xCss/Valine)
|
||||
# You need create leancloud account first (https://console.leancloud.app), then put the id|key in below.
|
||||
leancloud:
|
||||
enable: true
|
||||
app_id: #
|
||||
app_key: #
|
||||
# Valine Setting
|
||||
valine:
|
||||
enable: true
|
||||
verify: false # comment verify
|
||||
avatar: mp # (https://valine.js.org/avatar.html)
|
||||
placeholder: Add some comments to my article~ # placeholder
|
||||
|
||||
# 2、Gitalk(https://github.com/gitalk/gitalk)
|
||||
gitalk:
|
||||
enable: false # true
|
||||
clientID: # GitHub Application Client ID
|
||||
clientSecret: # Client Secret
|
||||
repo: # Repository name
|
||||
owner: # GitHub ID
|
||||
admin: # GitHub ID
|
||||
|
||||
# GitHub Ribbons(https://github.blog/2008-12-19-github-ribbons/)
|
||||
github:
|
||||
github:
|
||||
# (Set false if you don't need)
|
||||
enable: false
|
||||
url: https://github.com/Shen-Yu/hexo-theme-ayer
|
||||
|
||||
# pv&uv statistics
|
||||
@@ -224,9 +178,9 @@ cnzz:
|
||||
url: #
|
||||
|
||||
# Google Analytics
|
||||
google_analytics: ''
|
||||
google_analytics: ""
|
||||
# Baidu Analytics
|
||||
baidu_analytics: ''
|
||||
baidu_analytics: ""
|
||||
|
||||
# Mathjax Support
|
||||
mathjax: true
|
||||
@@ -241,19 +195,99 @@ katex:
|
||||
# since year
|
||||
since: 2019
|
||||
|
||||
# pageFooter (Set true can let more people know this theme, Thanks!)
|
||||
pageFooter: true
|
||||
# only for chinese website
|
||||
# ICP
|
||||
icp:
|
||||
enable: false
|
||||
url: "http://www.beian.miit.gov.cn/"
|
||||
text: "浙ICP备88888888"
|
||||
# gongan
|
||||
gongan:
|
||||
enable: false
|
||||
img: /images/beian.png
|
||||
url: "http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=01234567890123" #link
|
||||
text: "浙公网安备01234567890123号"
|
||||
|
||||
# friends link
|
||||
friends_link:
|
||||
Ayer: #site name
|
||||
# site url
|
||||
url: https://github.com/Shen-Yu/hexo-theme-ayer
|
||||
# site icon(optional)
|
||||
img: /images/ayer.png
|
||||
GitHub:
|
||||
url: https://github.com/Shen-Yu
|
||||
img: https://i.loli.net/2020/09/07/indb4PRYDA98EkN.png
|
||||
gitee:
|
||||
url: https://gitee.com/shen-yu
|
||||
img: https://i.loli.net/2020/09/07/K3AqO7h6krQFlRX.png
|
||||
Hexo:
|
||||
url: https://hexo.io
|
||||
img: https://i.loli.net/2020/09/07/UYGzjo7h68CRWny.png
|
||||
hexo-tag-chart:
|
||||
url: https://github.com/Shen-Yu/hexo-tag-chart
|
||||
img: https://i.loli.net/2020/09/07/GIXBYE5SoylhR1r.png
|
||||
|
||||
# Comment:1、Valine (recommended);2、Gitalk;3、Twikoo;4、MiniValine
|
||||
# You can close the comment section on one of your posts by marking `comments: false` in front-matter.
|
||||
|
||||
# 1、Valine [A fast, simple & powerful comment system](https://github.com/xCss/Valine)
|
||||
# You need create leancloud account first (https://console.leancloud.app), then put the id|key in below.
|
||||
leancloud:
|
||||
enable: true
|
||||
app_id: #
|
||||
app_key: #
|
||||
# Valine Setting
|
||||
valine:
|
||||
enable: true
|
||||
avatar: mp # (https://valine.js.org/avatar.html)
|
||||
placeholder: Add some comments to my article~ # placeholder
|
||||
|
||||
# 2、Gitalk(https://github.com/gitalk/gitalk)
|
||||
gitalk:
|
||||
enable: false # true
|
||||
clientID: # GitHub Application Client ID
|
||||
clientSecret: # Client Secret
|
||||
repo: # Repository name
|
||||
owner: # GitHub ID
|
||||
admin: # GitHub ID
|
||||
|
||||
# 3、Twikoo(https://github.com/imaegoo/twikoo)
|
||||
twikoo:
|
||||
enable: false
|
||||
envId: #
|
||||
|
||||
|
||||
# advertisement
|
||||
# if there is an "ad" word in photo or url,it may blocked by adblock or any other browser extensions
|
||||
ads:
|
||||
ad_1:
|
||||
title: vultr优惠vps
|
||||
img: https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/img/vultr.png
|
||||
url: https://www.vultr.com/?ref=8630075
|
||||
width: 300
|
||||
ad_2:
|
||||
title: 云服务器全球购低至2折
|
||||
img: https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/img/ten_2.jpg
|
||||
url: https://curl.qcloud.com/kvO7hb43
|
||||
width: 300
|
||||
|
||||
# encrypt settings
|
||||
lock:
|
||||
enable: false
|
||||
password: 123456
|
||||
```
|
||||
|
||||
### Plugins
|
||||
## Plugins
|
||||
|
||||
- [hexo-generator-search](https://github.com/wzpan/hexo-generator-search) (for Local Search)
|
||||
|
||||
+ [hexo-generator-search](https://github.com/wzpan/hexo-generator-search) (for Local Search)
|
||||
|
||||
```yml
|
||||
$ npm install hexo-generator-searchdb --save
|
||||
```
|
||||
|
||||
Then add the plugin configuration in hexo's configuration file `_config.yml` (note: not the theme's configuration file):
|
||||
|
||||
|
||||
```yml
|
||||
# Hexo-generator-search
|
||||
search:
|
||||
@@ -262,16 +296,16 @@ pageFooter: true
|
||||
format: html
|
||||
```
|
||||
|
||||
+ [hexo-generate-feed](https://github.com/hexojs/hexo-generator-feed) (for RSS)
|
||||
- [hexo-generator-feed](https://github.com/hexojs/hexo-generator-feed) (for RSS)
|
||||
|
||||
```yml
|
||||
$ npm install hexo-generator-feed --save
|
||||
```
|
||||
|
||||
|
||||
Then add the plugin configuration in hexo's configuration file `_config.yml` (note: not the theme's configuration file):
|
||||
|
||||
|
||||
```yml
|
||||
feed:m
|
||||
feed:m
|
||||
type: atom
|
||||
path: atom.xml
|
||||
limit: 20
|
||||
@@ -279,21 +313,25 @@ pageFooter: true
|
||||
content:
|
||||
content_limit: 140
|
||||
content_limit_delim: ' '
|
||||
order_by: -date
|
||||
order_by: -date
|
||||
```
|
||||
|
||||
+ [hexo-generator-index-pin-top](https://github.com/netcan/hexo-generator-index-pin-top) (for Sticky Post)
|
||||
|
||||
``` bash
|
||||
|
||||
- [hexo-generator-index-pin-top](https://github.com/netcan/hexo-generator-index-pin-top) (for Sticky Post)
|
||||
|
||||
```bash
|
||||
$ npm uninstall hexo-generator-index --save
|
||||
$ npm install hexo-generator-index-pin-top --save
|
||||
```
|
||||
### Categories
|
||||
``` bash
|
||||
|
||||
## Categories
|
||||
|
||||
```bash
|
||||
hexo new page categories
|
||||
```
|
||||
|
||||
Then paste following codes to file: /source/categories/index.md
|
||||
``` md
|
||||
|
||||
```md
|
||||
---
|
||||
title: categories
|
||||
type: categories
|
||||
@@ -301,44 +339,58 @@ layout: "categories"
|
||||
---
|
||||
```
|
||||
|
||||
### Tags
|
||||
## Tags
|
||||
|
||||
Same as categories.
|
||||
|
||||
### Gallery
|
||||
Need to write in the head of the markdown, this is not a good way to write, I hope to get a better way to write on github.
|
||||
## Friend Links
|
||||
|
||||
``` md
|
||||
```bash
|
||||
hexo new page friends
|
||||
```
|
||||
|
||||
Then paste following codes to file: /source/friends/index.md
|
||||
|
||||
```md
|
||||
---
|
||||
title: Gallery
|
||||
|
||||
albums: [
|
||||
["img_url","img_caption"],
|
||||
["img_url","img_caption"]
|
||||
]
|
||||
title: friends
|
||||
type: friends
|
||||
layout: "friends"
|
||||
---
|
||||
```
|
||||
|
||||
### Toc
|
||||
Then edit `friends_link` in `_config.yml`
|
||||
|
||||
Use Tocbot to parse the title tags (h1~h6) in the content and insert the directory.
|
||||
## Gallery
|
||||
|
||||
+ ayer/_config.yml
|
||||
Need to write in the head of the markdown, this is not a good way to write, I hope to get a better way to write on github.
|
||||
|
||||
``` bash
|
||||
# Toc
|
||||
```md
|
||||
---
|
||||
title: Gallery
|
||||
|
||||
albums: [["img_url", "img_caption"], ["img_url", "img_caption"]]
|
||||
---
|
||||
```
|
||||
|
||||
## Toc
|
||||
|
||||
Use Tocbot to parse the title tags (h1~h6) in the content and insert the directory.
|
||||
|
||||
- ayer/\_config.yml
|
||||
|
||||
```bash
|
||||
# Toc
|
||||
toc: true
|
||||
```
|
||||
+ If Toc is turned on in ayer/_config.yml, then Tocbot will generate a Toc article directory in the title tag of each blog parsing content, but not all blogs require Toc, so in the Front-matter section of markdown Can be closed:
|
||||
```
|
||||
|
||||
``` md
|
||||
---
|
||||
- If Toc is turned on in ayer/\_config.yml, then Tocbot will generate a Toc article directory in the title tag of each blog parsing content, but not all blogs require Toc, so in the Front-matter section of markdown Can be closed:
|
||||
|
||||
```md
|
||||
---
|
||||
no_toc: true
|
||||
---
|
||||
```
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
<br/>
|
||||
<a src="https://github.com/Shen-Yu/hexo-theme-ayer">Ayer</a> by <a href="https://github.com/Shen-Yu">Eric-Shen</a> is licensed under <a rel="license" href="https://github.com/Shen-Yu/hexo-theme-ayer/blob/master/LICENSE">SATA-License</a>.
|
||||
|
||||
The basic idea is, whenever using a project using SATA license, people shall star/like/+1 that project and thank the author. Just imagine Google stared your project and send you a thank-you letter because they used your project in github!
|
||||
|
172
_config.yml
@@ -1,20 +1,17 @@
|
||||
# 侧边栏菜单
|
||||
menu:
|
||||
主页: /
|
||||
归档: /archives
|
||||
分类: /categories
|
||||
标签: /tags
|
||||
旅行: /tags/旅行/
|
||||
摄影: http://shenyu-vip.lofter.com
|
||||
关于我: /2019/about
|
||||
Главная: /
|
||||
Архивы: /archives
|
||||
Категории: /categories
|
||||
Теги: /tags
|
||||
|
||||
# 站点次标题和打字动效
|
||||
# https://github.com/mattboldt/typed.js
|
||||
subtitle:
|
||||
enable: true # 是否开启动效
|
||||
text: 面朝大海,春暖花开 # 显示的文字
|
||||
text2: 愿你一生努力,一生被爱 # 滚动播放,如果不需要可以留空
|
||||
text3: 想要的都拥有,得不到的都释怀 # 最多支持三段文字
|
||||
text: # 显示的文字
|
||||
text2: # 滚动播放,如果不需要可以留空
|
||||
text3: # 最多支持三段文字
|
||||
startDelay: 0 # 延迟时间
|
||||
typeSpeed: 200 # 打字速度
|
||||
loop: true # 是否循环
|
||||
@@ -35,9 +32,15 @@ cover:
|
||||
# 页面顶部进度条
|
||||
progressBar: true
|
||||
|
||||
# 告示板模块
|
||||
broadcast:
|
||||
enable: false # true开启,false关闭
|
||||
type: 2 # 1:自定义输入,2:一言api(https://hitokoto.cn/)
|
||||
text: енен # type为1时有效
|
||||
|
||||
# 文章配置
|
||||
# 文章太长,截断按钮文字(在需要截断的行增加此标记:<!--more-->)
|
||||
excerpt_link: 阅读更多...
|
||||
excerpt_link: false
|
||||
# 如果你嫌每篇文章手动加more标记比较麻烦,又不想在首页全文显示,可以把excerpt_all设置成true,这样首页只会显示文章归档
|
||||
excerpt_all: false
|
||||
|
||||
@@ -46,16 +49,16 @@ copy_btn: true
|
||||
# 是否开启文章分享按钮
|
||||
share_enable: true
|
||||
# 国内的社交平台(If you are not in China, maybe you prefer to set:false)
|
||||
share_china: true
|
||||
share_china: false
|
||||
# 文章分享文字
|
||||
share_text: 分享
|
||||
share_text: Поделится
|
||||
|
||||
# 分页文字
|
||||
nav_text:
|
||||
page_prev: 上一页
|
||||
page_next: 下一页
|
||||
post_prev: 上一篇
|
||||
post_next: 下一篇
|
||||
page_prev: Страница назад
|
||||
page_next: Страница вперед
|
||||
post_prev: Предыдущая запись
|
||||
post_next: Следующая запись
|
||||
|
||||
# 文章页是否显示目录
|
||||
toc: true
|
||||
@@ -75,11 +78,11 @@ word_count:
|
||||
# 打赏type设定:0-关闭打赏; 1-文章对应的md文件里有reward:true属性,才有打赏; 2-所有文章均有打赏
|
||||
reward_type: 2
|
||||
# 打赏wording
|
||||
reward_wording: "请我喝杯咖啡吧~"
|
||||
reward_wording: "wording"
|
||||
# 支付宝二维码图片地址,跟你设置logo的方式一样。比如:/images/alipay.jpg
|
||||
alipay: https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/img/alipay.jpg
|
||||
alipay: /images/alipay.jpg
|
||||
# 微信二维码图片地址
|
||||
weixin: https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/img/wechat.jpg
|
||||
weixin: /images/wechat.jpg
|
||||
|
||||
# 版权声明
|
||||
# 版权声明type设定:0-关闭版权声明; 1-文章对应的md文件里有copyright: true属性,才有版权声明; 2-所有文章均有版权声明
|
||||
@@ -116,7 +119,7 @@ layout:
|
||||
github:
|
||||
# (关闭请设置为false)
|
||||
enable: true
|
||||
url: https://github.com/Shen-Yu/hexo-theme-ayer
|
||||
url: https://github.com/alkyl1978/hexo-theme-ayer
|
||||
|
||||
# 网易云音乐插件
|
||||
music:
|
||||
@@ -128,11 +131,11 @@ music:
|
||||
|
||||
# 访问量统计(不蒜子)
|
||||
busuanzi:
|
||||
enable: true
|
||||
enable: false
|
||||
|
||||
# 友盟cnzz统计(url填js代码src链接)
|
||||
cnzz:
|
||||
enable: true
|
||||
enable: false
|
||||
url: https://s9.cnzz.com/z_stat.php?id=1278069914&web_id=1278069914
|
||||
|
||||
# Google Analytics
|
||||
@@ -140,87 +143,72 @@ google_analytics: ""
|
||||
# 百度统计
|
||||
baidu_analytics: ""
|
||||
|
||||
yandex_analytics: true
|
||||
|
||||
# Mathjax数学公式
|
||||
mathjax: false
|
||||
|
||||
# Katex数学公式(allpost设置为false时只有头部设置math:true的文章才开启)
|
||||
# 需要更换hexo渲染器,npm un hexo-renderer-marked -S && npm i hexo-renderer-markdown-it-katex -S
|
||||
katex:
|
||||
enable: false # true
|
||||
enable: true # true
|
||||
allpost: true
|
||||
copy_tex: false
|
||||
|
||||
# mermaid流程图 三个选项缺一不可(https://mermaid-js.github.io/mermaid/)
|
||||
mermaid:
|
||||
enable: true
|
||||
cdn: https://cdn.staticfile.org/mermaid/8.14.0/mermaid.min.js
|
||||
theme: forest
|
||||
|
||||
# 网站成立年份(默认为 2019,若填入年份小于当前年份,则显示为 2018-2019 类似的格式)
|
||||
since: 2015
|
||||
since: 2023
|
||||
|
||||
# 是否显示页脚信息(建议保留)
|
||||
pageFooter: true
|
||||
|
||||
#ICP备案信息尾部显示
|
||||
# ICP备案信息尾部显示
|
||||
icp:
|
||||
enable: false
|
||||
url: "http://www.beian.miit.gov.cn/" # 备案链接
|
||||
url: "https://beian.miit.gov.cn/" # 备案链接
|
||||
text: "浙ICP备88888888" # 备案信息
|
||||
|
||||
# 评论:1、Valine(推荐);2、Gitalk;3、MiniValine
|
||||
|
||||
# 1、Valine[一款快速、简洁且高效的无后端评论系统](https://github.com/xCss/Valine)
|
||||
# 启用Valine必须先创建leancloud应用, 获取 id|key 填入即可
|
||||
leancloud:
|
||||
enable: true
|
||||
app_id: #
|
||||
app_key: #
|
||||
# Valine配置
|
||||
valine:
|
||||
enable: true # 是否启用
|
||||
avatar: monsterid # 头像样式(https://valine.js.org/avatar.html)
|
||||
placeholder: 给我的文章加点评论吧~ # placeholder
|
||||
|
||||
# 2、Gitalk(https://github.com/gitalk/gitalk)
|
||||
gitalk:
|
||||
enable: false # true
|
||||
clientID: # GitHub Application Client ID
|
||||
clientSecret: # Client Secret
|
||||
repo: # Repository name
|
||||
owner: # GitHub ID
|
||||
admin: # GitHub ID
|
||||
|
||||
# 3、MiniValine
|
||||
# See: https://github.com/MiniValine/MiniValine
|
||||
minivaline:
|
||||
# 公安备案信息尾部显示
|
||||
gongan:
|
||||
enable: false
|
||||
mode: DesertsP # DesertsP or xCss
|
||||
placeholder: Write a Comment # Comment box placeholder
|
||||
math: true # Support MathJax.
|
||||
md: true # Support Markdown.
|
||||
enableQQ: false # Enable QQ avatar API.
|
||||
NoRecordIP: false # Do not record commenter IP.
|
||||
visitor: true # Article reading statistics.
|
||||
maxNest: 6 # Sub-comment maximum nesting depth.
|
||||
pageSize: 6 # Pagination size.
|
||||
adminEmailMd5: de8a7aa53d07e6b6bceb45c64027763d # The MD5 of Admin Email to show Admin Flag.[Just Only DesertsP Style mode]
|
||||
tagMeta: # The String Array of Words to show Flag.[Just Only xCss Style mode]
|
||||
- 管理员
|
||||
- 小伙伴
|
||||
- 访客
|
||||
master: # The MD5 String Array of master Email to show master Flag.[Just Only xCss Style mode]
|
||||
- de8a7aa53d07e6b6bceb45c64027763d
|
||||
friends: # The MD5 String Array of friends Email to show friends Flag.[Just Only xCss Style mode]
|
||||
- b5bd5d836c7a0091aa8473e79ed4c25e
|
||||
- adb7d1cd192658a55c0ad22a3309cecf
|
||||
- 3ce1e6c77b4910f1871106cb30dc62b0
|
||||
- cfce8dc43725cc14ffcd9fb4892d5bfc
|
||||
# MiniValine's display language depends on user's browser or system environment
|
||||
# If you want everyone visiting your site to see a uniform language, you can set a force language value
|
||||
# Available values: en | zh-CN | (and many more)
|
||||
# More i18n info: https://github.com/MiniValine/minivaline-i18n
|
||||
lang:
|
||||
# Expression Url.
|
||||
# https://github.com/MiniValine/MiniValine/blob/master/.github/FAQ.md#how-to-customize-emoticons
|
||||
emoticonUrl:
|
||||
- https://cdn.jsdelivr.net/npm/alus@latest
|
||||
- https://cdn.jsdelivr.net/gh/MiniValine/qq@latest
|
||||
- https://cdn.jsdelivr.net/gh/MiniValine/Bilibilis@latest
|
||||
- https://cdn.jsdelivr.net/gh/MiniValine/tieba@latest
|
||||
- https://cdn.jsdelivr.net/gh/MiniValine/twemoji@latest
|
||||
- https://cdn.jsdelivr.net/gh/MiniValine/weibo@latest
|
||||
img: /images/beian.png #公安备案图片
|
||||
url: "http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=01234567890123" #公安备案链接
|
||||
text: "浙公网安备01234567890123号" #公安备案信息
|
||||
|
||||
# 友情链接
|
||||
friends_link:
|
||||
Ayer主题: #网站名称
|
||||
#网站地址
|
||||
url: https://github.com/alkyl1978/hexo-theme-ayer
|
||||
#网站图片(可忽略不写)
|
||||
img: /images/ayer.png
|
||||
GitHub:
|
||||
url: https://github.com/alkyl1978
|
||||
img: /images/github.png
|
||||
码云:
|
||||
url: https://lp76.ru
|
||||
img: /images/gitee.png
|
||||
Hexo官网:
|
||||
url: https://hexo.io
|
||||
img: /images/hexo.png
|
||||
|
||||
# 评论:1、Valine(推荐);2、Gitalk;3、Twikoo;
|
||||
# 首页广告配置
|
||||
# 可以根据需要自行增加ad_3,ad_4...,留空则不显示,建议图片和url不要带ad等关键词,否则可能会被adblock等插件屏蔽
|
||||
#ads:
|
||||
# ad_1:
|
||||
# title: 云服务器限时秒杀
|
||||
# img: https://pic.imgdb.cn/item/62174b452ab3f51d912a5ccc.jpg
|
||||
# url: https://curl.qcloud.com/kvO7hb43
|
||||
# width: 300
|
||||
# ad_2:
|
||||
# title: vultr优惠vps
|
||||
# img: https://pic.imgdb.cn/item/62174b452ab3f51d912a5cd7.png
|
||||
# url: https://www.vultr.com/?ref=8630075
|
||||
# width: 300
|
||||
|
||||
# 网站开启加密访问,密码可设置任何字符
|
||||
lock:
|
||||
enable: true
|
||||
password: 123456
|
||||
|
6
bin/run.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
set -x
|
||||
set -e
|
||||
npm i
|
||||
npm run build
|
||||
|
2
index.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// 这个文件用来防止 hexo 5.0.0以上 使用 "hexo clean" 命令报错。
|
||||
// This file is used to prevent hexo above 5.0.0 from using "hexo clean" command error.
|
@@ -1,31 +0,0 @@
|
||||
categories: Kategorien
|
||||
search: Suche
|
||||
tags: Tags
|
||||
tagcloud: Tag Cloud
|
||||
tweets: Tweets
|
||||
prev: zurück
|
||||
next: weiter
|
||||
comment: Kommentare
|
||||
archive_a: Archiv
|
||||
archive_b: "Archive: %s"
|
||||
page: Seite %d
|
||||
recent_posts: letzter Beitrag
|
||||
newer: Neuer
|
||||
older: Älter
|
||||
share: Teilen
|
||||
powered_by: Powered by %s
|
||||
theme: Theme - %s
|
||||
rss_feed: RSS Feed
|
||||
category: Kategorie
|
||||
tag: Tag
|
||||
site_visitors: Visitors
|
||||
page_views: Views
|
||||
|
||||
post:
|
||||
word_count: Wortzahl
|
||||
read_time: Lesezeit
|
||||
minutes: Minuten
|
||||
reward: Belohnung
|
||||
sticky: Oben
|
||||
copyright_title: Copyright-Hinweis
|
||||
copyright_content: Sofern nicht anders angegeben, liegt das Urheberrecht aller Artikel in diesem Blog beim Autor. Nachdruck bitte Quelle angeben!
|
@@ -20,6 +20,7 @@ category: Category
|
||||
tag: Tag
|
||||
site_visitors: Visitors
|
||||
page_views: Views
|
||||
friends: Friends
|
||||
|
||||
post:
|
||||
word_count: Word count
|
||||
@@ -29,3 +30,9 @@ post:
|
||||
sticky: Sticky
|
||||
copyright_title: Copyright
|
||||
copyright_content: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
|
||||
|
||||
lock:
|
||||
lock_info: Please enter password
|
||||
lock_error: Incorrect password, please try again
|
||||
confirm_text: Ok
|
||||
cancel_text: Cancel
|
||||
|
@@ -20,6 +20,7 @@ category: Category
|
||||
tag: Tag
|
||||
site_visitors: Visitors
|
||||
page_views: Views
|
||||
friends: Friends
|
||||
|
||||
post:
|
||||
word_count: Word count
|
||||
@@ -29,3 +30,9 @@ post:
|
||||
sticky: Sticky
|
||||
copyright_title: Copyright
|
||||
copyright_content: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
|
||||
|
||||
lock:
|
||||
lock_info: Please enter password
|
||||
lock_error: Incorrect password, please try again
|
||||
confirm_text: Ok
|
||||
cancel_text: Cancel
|
||||
|
@@ -1,31 +0,0 @@
|
||||
categories: Categorías
|
||||
search: Buscar
|
||||
tags: Tags
|
||||
tagcloud: Nube de Tags
|
||||
tweets: Tweets
|
||||
prev: Previo
|
||||
next: Siguiente
|
||||
comment: Comentarios
|
||||
archive_a: Archivos
|
||||
archive_b: "Archivos: %s"
|
||||
page: Página %d
|
||||
recent_posts: Posts recientes
|
||||
newer: Nuevo
|
||||
older: Viejo
|
||||
share: Compartir
|
||||
powered_by: Powered by %s
|
||||
theme: Theme - %s
|
||||
rss_feed: RSS
|
||||
category: Categoría
|
||||
tag: Tag
|
||||
site_visitors: Visitors
|
||||
page_views: Views
|
||||
|
||||
post:
|
||||
word_count: El recuento de palabras
|
||||
read_time: Tiempo de lectura
|
||||
minutes: minutos
|
||||
reward: Recompensa
|
||||
sticky: Arriba
|
||||
copyright_title: Derechos de autor
|
||||
copyright_content: Los derechos de autor son propiedad del autor. Para reimpresiones comerciales, comuníquese con el autor para obtener autorización. Para reimpresiones no comerciales, indique la fuente.
|
@@ -20,6 +20,7 @@ category: Catégorie
|
||||
tag: Mot-clé
|
||||
site_visitors: Visitors
|
||||
page_views: Views
|
||||
friends: Mes amis
|
||||
|
||||
post:
|
||||
word_count: Nombre de mots
|
||||
@@ -29,3 +30,9 @@ post:
|
||||
sticky: Haut
|
||||
copyright_title: Avis de copyright
|
||||
copyright_content: Le droit d'auteur appartient à l'auteur. Pour les réimpressions commerciales, veuillez contacter l'auteur pour autorisation. Pour les réimpressions non commerciales, veuillez indiquer la source.
|
||||
|
||||
lock:
|
||||
lock_info: Please enter password
|
||||
lock_error: Incorrect password, please try again
|
||||
confirm_text: Ok
|
||||
cancel_text: Cancel
|
||||
|
@@ -1,31 +0,0 @@
|
||||
categories: カテゴリ
|
||||
search: 検索
|
||||
tags: タグ
|
||||
tagcloud: タグクラウド
|
||||
tweets: ツイート
|
||||
prev: 戻る
|
||||
next: 次へ
|
||||
comment: コメント
|
||||
archive_a: アーカイブ
|
||||
archive_b: "アーカイブ: %s"
|
||||
page: ページ %d
|
||||
recent_posts: 最近の投稿
|
||||
newer: 次の記事
|
||||
older: 前の記事
|
||||
share: 共有
|
||||
powered_by: Powered by %s
|
||||
theme: Theme - %s
|
||||
rss_feed: RSSフィード
|
||||
category: カテゴリ
|
||||
tag: タグ
|
||||
site_visitors: Visitors
|
||||
page_views: Views
|
||||
|
||||
post:
|
||||
word_count: 単語数
|
||||
read_time: 読書の時間
|
||||
minutes: 分
|
||||
reward: 報酬
|
||||
sticky: 上へ
|
||||
copyright_title: 著作権表示
|
||||
copyright_content: 著作権は著者が所有しています。商業版の複製については、承認について著者に連絡してください。非商業版の複製については、出典を明記してください。
|
@@ -1,31 +0,0 @@
|
||||
categories: 카테고리
|
||||
search: 검색
|
||||
tags: 태그
|
||||
tagcloud: 태그 클라우드
|
||||
tweets: 트윗
|
||||
prev: 이전
|
||||
next: 다음
|
||||
comment: 댓글
|
||||
archive_a: 아카이브
|
||||
archive_b: "아카이브: %s"
|
||||
page: 페이지 %d
|
||||
recent_posts: 최근 포스트
|
||||
newer: 최신
|
||||
older: 이전
|
||||
share: 공유
|
||||
powered_by: Powered by %s
|
||||
theme: Theme - %s
|
||||
rss_feed: RSS Feed
|
||||
category: 카테고리
|
||||
tag: 태그
|
||||
site_visitors: Visitors
|
||||
page_views: Views
|
||||
|
||||
post:
|
||||
word_count: 단어 수
|
||||
read_time: 독서 시간
|
||||
minutes: 분
|
||||
reward: 보상
|
||||
sticky: 톱
|
||||
copyright_title: 저작권 고지
|
||||
copyright_content: 저작권은 저자가 소유합니다. 상업용 재 인쇄의 경우 승인을 위해 저자에게 문의하십시오. 비상업적 재 인쇄의 경우 출처를 명시하십시오.
|
@@ -20,6 +20,7 @@ category: Categorie
|
||||
tag: Label
|
||||
site_visitors: Visitors
|
||||
page_views: Views
|
||||
friends: Vrienden
|
||||
|
||||
post:
|
||||
word_count: Aantal woorden in artikel
|
||||
@@ -29,3 +30,9 @@ post:
|
||||
sticky: Sticky
|
||||
copyright_title: Copyright melding
|
||||
copyright_content: Copyright is eigendom van de auteur. Neem voor commerciële herdrukken contact op met de auteur voor autorisatie. Geef de bron aan voor niet-commerciële herdrukken.
|
||||
|
||||
lock:
|
||||
lock_info: Please enter password
|
||||
lock_error: Incorrect password, please try again
|
||||
confirm_text: Ok
|
||||
cancel_text: Cancel
|
||||
|
@@ -20,6 +20,7 @@ category: Category
|
||||
tag: Tag
|
||||
site_visitors: Visitors
|
||||
page_views: Views
|
||||
friends: Venner
|
||||
|
||||
post:
|
||||
word_count: Ordtelling
|
||||
@@ -29,3 +30,9 @@ post:
|
||||
sticky: Sticky
|
||||
copyright_title: Opphavsrett
|
||||
copyright_content: Opphavsrett eies av forfatteren. For kommersielle opptrykk, vennligst kontakt forfatteren for godkjenning. For ikke-kommersiell uttrykk, vennligst oppgi kilden.
|
||||
|
||||
lock:
|
||||
lock_info: Please enter password
|
||||
lock_error: Incorrect password, please try again
|
||||
confirm_text: Ok
|
||||
cancel_text: Cancel
|
||||
|
@@ -1,31 +0,0 @@
|
||||
categories: Categorias
|
||||
search: Buscar
|
||||
tags: Tags
|
||||
tagcloud: Nuvem de Tags
|
||||
tweets: Tweets
|
||||
prev: Anterior
|
||||
next: Próximo
|
||||
comment: Comentários
|
||||
archive_a: Arquivos
|
||||
archive_b: "Arquivos: %s"
|
||||
page: Página %d
|
||||
recent_posts: Postagens Recentes
|
||||
newer: Mais Recente
|
||||
older: Mais Antigo
|
||||
share: Compartilhar
|
||||
powered_by: Powered by %s
|
||||
theme: Theme - %s
|
||||
rss_feed: Feed RSS
|
||||
category: Categoria
|
||||
tag: Tag
|
||||
site_visitors: Visitors
|
||||
page_views: Views
|
||||
|
||||
post:
|
||||
word_count: Word count
|
||||
read_time: Reading time
|
||||
minutes: min
|
||||
reward: Donate
|
||||
sticky: Sticky
|
||||
copyright_title: direito autoral
|
||||
copyright_content: Os direitos autorais são de propriedade do autor. Para reimpressões comerciais, entre em contato com o autor para obter autorização. Para reimpressões não comerciais, indique a fonte.
|
@@ -20,6 +20,7 @@ category: Категория
|
||||
tag: Метка
|
||||
site_visitors: Visitors
|
||||
page_views: Views
|
||||
friends: друзья
|
||||
|
||||
post:
|
||||
word_count: Количество слов
|
||||
@@ -28,4 +29,10 @@ post:
|
||||
reward: вознаграждение
|
||||
sticky: липкий
|
||||
copyright_title: Авторские права
|
||||
copyright_content: Авторские права принадлежат автору. Для коммерческих перепечаток, пожалуйста, свяжитесь с автором для авторизации. Для некоммерческих перепечаток, пожалуйста, укажите источник.
|
||||
copyright_content: Авторские права принадлежат автору. Для коммерческих перепечаток, пожалуйста, свяжитесь с автором для авторизации. Для некоммерческих перепечаток, пожалуйста, укажите источник.
|
||||
|
||||
lock:
|
||||
lock_info: Please enter password
|
||||
lock_error: Incorrect password, please try again
|
||||
confirm_text: Ok
|
||||
cancel_text: Cancel
|
||||
|
@@ -1,31 +0,0 @@
|
||||
categories: Thể loại
|
||||
search: Tìm Kiếm
|
||||
tags: thẻ
|
||||
tagcloud: thẻ đám mây
|
||||
tweets: Tweets
|
||||
prev: trước
|
||||
next: kế tiếp
|
||||
comment: bình luận
|
||||
archive_a: Archives
|
||||
archive_b: "Archives: %s"
|
||||
page: Page %d
|
||||
recent_posts: Bài viết gần đây
|
||||
newer: mới hơn
|
||||
older: lớn hơn
|
||||
share: chia sẻ
|
||||
powered_by: Powered by %s
|
||||
theme: Theme - %s
|
||||
rss_feed: RSS Feed
|
||||
category: Thể loại
|
||||
tag: thẻ
|
||||
site_visitors: Visitors
|
||||
page_views: Views
|
||||
|
||||
post:
|
||||
word_count: Đếm từ
|
||||
read_time: Thời gian đọc
|
||||
minutes: min
|
||||
reward: tặng
|
||||
sticky: dính
|
||||
copyright_title: Bản quyền
|
||||
copyright_content: Bản quyền thuộc sở hữu của tác giả. Đối với tái bản thương mại, xin vui lòng liên hệ với tác giả cho phép. Đối với tái bản phi thương mại, xin vui lòng cho biết nguồn.
|
@@ -1,31 +0,0 @@
|
||||
categories: 分类
|
||||
search: 搜索
|
||||
tags: 标签
|
||||
tagcloud: 标签云
|
||||
tweets: 推文
|
||||
prev: 上一页
|
||||
next: 下一页
|
||||
comment: 留言
|
||||
archive_a: 归档
|
||||
archive_b: 归档:%s
|
||||
page: 第 %d 页
|
||||
recent_posts: 最新文章
|
||||
newer: Newer
|
||||
older: Older
|
||||
share: 分享
|
||||
powered_by: 由 %s 强力驱动
|
||||
theme: 主题 - %s
|
||||
rss_feed: RSS Feed
|
||||
category: Category
|
||||
tag: Tag
|
||||
site_visitors: 访问人数
|
||||
page_views: 浏览次数
|
||||
|
||||
post:
|
||||
word_count: 字数统计
|
||||
read_time: 阅读时长
|
||||
minutes: 分钟
|
||||
reward: 打赏
|
||||
sticky: 置顶
|
||||
copyright_title: 版权声明
|
||||
copyright_content: 本博客所有文章除特别声明外,著作权归作者所有。转载请注明出处!
|
@@ -1,31 +0,0 @@
|
||||
categories: 分類
|
||||
search: 搜尋
|
||||
tags: 標籤
|
||||
tagcloud: 標籤雲
|
||||
tweets: 推文
|
||||
prev: 上一頁
|
||||
next: 下一頁
|
||||
comment: 留言
|
||||
archive_a: 彙整
|
||||
archive_b: 彙整:%s
|
||||
page: 第 %d 頁
|
||||
recent_posts: 最新文章
|
||||
newer: Newer
|
||||
older: Older
|
||||
share: Share
|
||||
powered_by: Powered by %s
|
||||
theme: Theme - %s
|
||||
rss_feed: RSS Feed
|
||||
category: Category
|
||||
tag: Tag
|
||||
site_visitors: Visitors
|
||||
page_views: Views
|
||||
|
||||
post:
|
||||
word_count: 字數統計
|
||||
read_time: 閱讀時長
|
||||
minutes: 分鐘
|
||||
reward: 打賞
|
||||
sticky: 置頂
|
||||
copyright_title: 版權聲明
|
||||
copyright_content: 本博客所有文章除特別聲明外,著作權歸作者所有。轉載請註明出處!
|
9
layout/_partial/ads.ejs
Normal file
@@ -0,0 +1,9 @@
|
||||
<ul class="ads">
|
||||
<% for (var i in theme.ads){ %>
|
||||
<li>
|
||||
<a href="<%= theme.ads[i].url %>">
|
||||
<img src="<%= theme.ads[i].img %>" width="<%= theme.ads[i].width %>" alt="<%=theme.ads[i].title %>">
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
</ul>
|
@@ -1,66 +1,57 @@
|
||||
<%- js('/js/jquery-2.0.3.min') %>
|
||||
<%- js('/js/lazyload.min') %>
|
||||
<%- js('/js/jquery-3.6.0.min') %> <%- js('/js/lazyload.min') %>
|
||||
<!-- Tocbot -->
|
||||
<% if (theme.toc && is_post() && !page.no_toc){ %>
|
||||
<%- js('/js/tocbot.min') %>
|
||||
<% if (theme.toc && is_post() && !page.no_toc){ %> <%- js('/js/tocbot.min') %>
|
||||
<script>
|
||||
tocbot.init({
|
||||
tocSelector: '.tocbot',
|
||||
contentSelector: '.article-entry',
|
||||
headingSelector: 'h1, h2, h3, h4, h5, h6',
|
||||
tocSelector: ".tocbot",
|
||||
contentSelector: ".article-entry",
|
||||
headingSelector: "h1, h2, h3, h4, h5, h6",
|
||||
hasInnerContainers: true,
|
||||
scrollSmooth: true,
|
||||
scrollContainer: 'main',
|
||||
positionFixedSelector: '.tocbot',
|
||||
positionFixedClass: 'is-position-fixed',
|
||||
fixedSidebarOffset: 'auto'
|
||||
scrollContainer: "main",
|
||||
positionFixedSelector: ".tocbot",
|
||||
positionFixedClass: "is-position-fixed",
|
||||
fixedSidebarOffset: "auto",
|
||||
});
|
||||
</script>
|
||||
<% } %>
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery-modal@0.9.2/jquery.modal.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery-modal@0.9.2/jquery.modal.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/js/jquery.justifiedGallery.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/jquery-modal/0.9.2/jquery.modal.min.js"></script>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdn.staticfile.org/jquery-modal/0.9.2/jquery.modal.min.css"
|
||||
/>
|
||||
<script src="https://cdn.staticfile.org/justifiedGallery/3.8.1/js/jquery.justifiedGallery.min.js"></script>
|
||||
<%- js('dist/main') %>
|
||||
<!-- ImageViewer -->
|
||||
<% if (theme.image_viewer){ %>
|
||||
<%- partial('viewer') %>
|
||||
<% } %>
|
||||
<% if (theme.image_viewer){ %> <%- partial('viewer') %> <% } %>
|
||||
<!-- MathJax -->
|
||||
<% if (theme.mathjax){ %>
|
||||
<%- partial('mathjax') %>
|
||||
<% if (theme.mathjax){ %> <%- partial('mathjax') %>
|
||||
<script>
|
||||
var ayerConfig = {
|
||||
mathjax: true
|
||||
}
|
||||
mathjax: true,
|
||||
};
|
||||
</script>
|
||||
<% } %>
|
||||
<!-- Katex -->
|
||||
<% if (theme.katex.enable){ %>
|
||||
<%- partial('katex') %>
|
||||
<% } %>
|
||||
<% if (theme.katex.enable){ %> <%- partial('katex') %> <% } %>
|
||||
<!-- busuanzi -->
|
||||
<% if (theme.busuanzi && theme.busuanzi.enable){ %>
|
||||
<%- js('/js/busuanzi-2.3.pure.min') %>
|
||||
<% } %>
|
||||
<% if (theme.busuanzi && theme.busuanzi.enable){ %> <%-
|
||||
js('/js/busuanzi-2.3.pure.min') %> <% } %>
|
||||
<!-- ClickLove -->
|
||||
<% if (theme.click_effect===1){ %>
|
||||
<%- js('/js/clickLove') %>
|
||||
<% } %>
|
||||
<% if (theme.click_effect===1){ %> <%- js('/js/clickLove') %> <% } %>
|
||||
<!-- ClickBoom1 -->
|
||||
<% if (theme.click_effect===2){ %>
|
||||
<script src="https://cdn.jsdelivr.net/npm/animejs@latest/anime.min.js"></script>
|
||||
<%- js('/js/clickBoom1') %>
|
||||
<% } %>
|
||||
<script src="https://cdn.staticfile.org/animejs/3.2.1/anime.min.js"></script>
|
||||
<%- js('/js/clickBoom1') %> <% } %>
|
||||
<!-- ClickBoom2 -->
|
||||
<% if (theme.click_effect===3){ %>
|
||||
<%- js('/js/clickBoom2') %>
|
||||
<% } %>
|
||||
<% if (theme.click_effect===3){ %> <%- js('/js/clickBoom2') %> <% } %>
|
||||
<!-- CodeCopy -->
|
||||
<% if (theme.copy_btn == true) { %>
|
||||
<%- css('/css/clipboard') %>
|
||||
<%- partial('post/clipboard') %>
|
||||
<% } %>
|
||||
<% if (theme.copy_btn == true) { %> <%- css('/css/clipboard') %> <%-
|
||||
partial('post/clipboard') %> <% } %>
|
||||
<!-- CanvasBackground -->
|
||||
<% if (theme.canvas_bg == 1) { %>
|
||||
<%- js('/js/dz') %>
|
||||
<% } %>
|
||||
<% if (theme.canvas_bg == 1) { %> <%- js('/js/dz') %> <% } %>
|
||||
<script>
|
||||
if (window.mermaid) {
|
||||
mermaid.initialize({ theme: "<%= theme.mermaid.theme %>" });
|
||||
}
|
||||
</script>
|
||||
|
@@ -1,4 +1,10 @@
|
||||
<section class="outer">
|
||||
<% if (theme.ads && theme.ads.length != 0){ %>
|
||||
<%- partial('ads') %>
|
||||
<% } %>
|
||||
<% if (theme.broadcast.enable && pagination == 2){ %>
|
||||
<%- partial('_partial/broadcast') %>
|
||||
<% } %>
|
||||
<article class="articles">
|
||||
<%
|
||||
var title = '';
|
||||
|
@@ -9,6 +9,7 @@
|
||||
<% if (post.link || post.title){ %>
|
||||
<header class="article-header">
|
||||
<%- partial('post/title', {class_name: 'article-title'}) %>
|
||||
<%- partial('post/author', {class_name: 'article-author'}) %>
|
||||
</header>
|
||||
<% } %> <% if (index || is_post()) { %>
|
||||
<div class="article-meta">
|
||||
@@ -38,7 +39,6 @@
|
||||
<% } %>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<!-- copyright -->
|
||||
<% if (((theme.copyright_type === 2) || (theme.copyright_type === 1 &&
|
||||
post.copyright)) && !index){ %>
|
||||
@@ -47,7 +47,11 @@
|
||||
<li>
|
||||
<i class="ri-copyright-line"></i>
|
||||
<strong><%= __('post.copyright_title') %>: </strong>
|
||||
<% if (post.copyright_content) { %>
|
||||
<%= post.copyright_content %>
|
||||
<% } else { %>
|
||||
<%= __('post.copyright_content') %>
|
||||
<% } %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -61,7 +65,5 @@
|
||||
<% if (!index){ %> <%- partial('post/nav') %> <% } %> <% if (theme.valine &&
|
||||
theme.valine.enable && !post.no_valine){ %> <%- partial('post/valine', { key:
|
||||
post.slug, title: post.title, url: config.url+url_for(post.path) }) %> <% } %>
|
||||
<% if (is_post()) { %> <%- partial('post/gitalk') %> <% } %> <% if
|
||||
(theme.minivaline && theme.minivaline.enable && !post.no_minivaline){ %> <%-
|
||||
partial('post/minivaline') %> <% } %>
|
||||
|
||||
</article>
|
||||
|
@@ -37,7 +37,7 @@
|
||||
<% } %>
|
||||
|
||||
<% if (theme.subtitle.enable){ %>
|
||||
<script src="https://cdn.jsdelivr.net/npm/typed.js@2.0.11/lib/typed.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/typed.js/2.0.12/typed.min.js"></script>
|
||||
<% } %>
|
||||
|
||||
<!-- Subtitle -->
|
||||
|
46
layout/_partial/broadcast.ejs
Normal file
@@ -0,0 +1,46 @@
|
||||
<% if (theme.broadcast.type===1 && theme.broadcast.text){ %>
|
||||
<div class="notice" style="margin-top:50px">
|
||||
<i class="ri-heart-fill"></i>
|
||||
<div class="notice-content"><%= theme.broadcast.text %></div>
|
||||
</div>
|
||||
<% } %>
|
||||
<% if (theme.broadcast.type===2){ %>
|
||||
<div class="notice" style="margin-top:50px">
|
||||
<i class="ri-heart-fill"></i>
|
||||
<div class="notice-content" id="broad"></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
fetch('https://v1.hitokoto.cn')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
document.getElementById("broad").innerHTML = data.hitokoto;
|
||||
})
|
||||
.catch(console.error)
|
||||
</script>
|
||||
<% } %>
|
||||
<style>
|
||||
.notice {
|
||||
padding: 20px;
|
||||
border: 1px dashed #e6e6e6;
|
||||
color: #969696;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
background: #fbfbfb50;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.notice i {
|
||||
float: left;
|
||||
color: #999;
|
||||
font-size: 16px;
|
||||
padding-right: 10px;
|
||||
vertical-align: middle;
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
.notice-content {
|
||||
display: initial;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
@@ -11,35 +11,12 @@
|
||||
<li>
|
||||
<% if (theme.pageFooter){ %>
|
||||
<% var hexoLink = '<a href="https://hexo.io" target="_blank">Hexo</a>'; %>
|
||||
<% var themeLink = '<a href="https://github.com/Shen-Yu/hexo-theme-ayer" target="_blank">Ayer</a>'; %>
|
||||
<% var themeLink = '<a href="https://github.com/alkyl1978/hexo-theme-ayer" target="_blank">Ayer</a>'; %>
|
||||
<%- __('powered_by', hexoLink) %>
|
||||
<span class="division">|</span>
|
||||
<%- __('theme', themeLink) %>
|
||||
<% } %>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>
|
||||
<% if (theme.busuanzi && theme.busuanzi.enable){ %>
|
||||
<%# "不蒜子统计" %>
|
||||
<%- partial('post/busuanzi') %>
|
||||
<% } %>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<% if (theme.icp&&theme.icp.enable){ %>
|
||||
<li>
|
||||
<a href="<%= theme.icp.url %>" target="_black"><%= theme.icp.text %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>
|
||||
<!-- cnzz统计 -->
|
||||
<% if (theme.cnzz&&theme.cnzz.enable){ %>
|
||||
<script type="text/javascript" src='<%= theme.cnzz.url%>'></script>
|
||||
<% } %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</footer>
|
@@ -1,14 +1,10 @@
|
||||
<% if (theme.google_analytics){ %>
|
||||
<%# "Google Analytics" %>
|
||||
<script type="text/javascript">
|
||||
(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','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', '<%= theme.google_analytics %>', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= theme.google_analytics %>"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', '<%= theme.google_analytics %>');
|
||||
</script>
|
||||
<%# "End Google Analytics" %>
|
||||
<% } %>
|
||||
|
@@ -2,40 +2,57 @@
|
||||
|
||||
<% if (config.language){ %>
|
||||
<html lang="<%= config.language %>">
|
||||
<% } else { %>
|
||||
<html lang="en">
|
||||
<% }%>
|
||||
<% } else { %>
|
||||
<html lang="en">
|
||||
<% }%>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<% var title = page.title; if (is_archive()) { title = __('archive_a'); if
|
||||
(is_month()) { title += ': ' + page.year + '/' + page.month; } else if
|
||||
(is_year()) { title += ': ' + page.year; } } else if (is_category()) {
|
||||
title = page.category; } else if (is_tag()) { title = __('tag') + ': ' +
|
||||
page.tag; } %> <% if (page.keywords){ %>
|
||||
<meta
|
||||
name="keywords"
|
||||
content="<%= page.keywords %>,<%= config.keywords %>"
|
||||
/>
|
||||
<% } else if (config.keywords){ %>
|
||||
<meta name="keywords" content="<%= config.keywords %>" />
|
||||
<% } %> <% if (page.description){ %>
|
||||
<meta name="description" content="<%= page.description %>" />
|
||||
<% } else if (config.description){ %>
|
||||
<meta name="description" content="<%= config.description %>" />
|
||||
<% } %>
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, maximum-scale=1"
|
||||
/>
|
||||
<title><% if (title){ %><%= title %> | <% } %> <%= config.title %></title>
|
||||
<% if (theme.favicon){ %>
|
||||
<link rel="shortcut icon" href="<%- theme.favicon %>" />
|
||||
<% } %> <%- css('dist/main') %>
|
||||
<%- css('css/fonts/remixicon') %>
|
||||
<%- css('css/custom') %> <% if (theme.progressBar){ %>
|
||||
<script src="https://cdn.staticfile.org/pace/1.2.4/pace.min.js"></script>
|
||||
<% } %>
|
||||
<%- partial('google-analytics') %>
|
||||
<%- partial('baidu-analytics') %>
|
||||
<%- partial('yandex-analytics') %>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdn.jsdelivr.net/npm/@sweetalert2/theme-bulma@5.0.1/bulma.min.css"
|
||||
/>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.0.19/dist/sweetalert2.min.js"></script>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<% var title = page.title; if (is_archive()) { title = __('archive_a'); if
|
||||
(is_month()) { title += ': ' + page.year + '/' + page.month; } else if
|
||||
(is_year()) { title += ': ' + page.year; } } else if (is_category()) { title
|
||||
= page.category; } else if (is_tag()) {
|
||||
title = __('tag') + ': ' + page.tag; } %> <% if (page.keywords){ %>
|
||||
<meta name="keywords" content="<%= page.keywords %>,<%= config.keywords %>" />
|
||||
<% } else if (config.keywords){ %>
|
||||
<meta name="keywords" content="<%= config.keywords %>" />
|
||||
<% } %> <% if (page.description){ %>
|
||||
<meta name="description" content="<%= page.description %>" />
|
||||
<% } else if (config.description){ %>
|
||||
<meta name="description" content="<%= config.description %>" />
|
||||
<% } %>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
|
||||
<title>
|
||||
<% if (title){ %><%= title %> | <% } %> <%= config.description %>
|
||||
</title>
|
||||
<% if (theme.favicon){ %>
|
||||
<link rel="shortcut icon" href="<%- theme.favicon %>" />
|
||||
<% } %>
|
||||
<%- css('dist/main') %>
|
||||
<%- css('https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/css/remixicon.min') %>
|
||||
<%- css('css/custom') %>
|
||||
<% if (theme.progressBar){ %>
|
||||
<%- js('https://cdn.jsdelivr.net/npm/pace-js@1.0.2/pace.min') %>
|
||||
<% } %>
|
||||
<%- partial('google-analytics') %>
|
||||
<%- partial('baidu-analytics') %>
|
||||
</head>
|
||||
|
||||
</html>
|
||||
<!-- mermaid -->
|
||||
<% if (theme.mermaid.enable) { %>
|
||||
<script src="<%= theme.mermaid.cdn %>"></script>
|
||||
<% } %>
|
||||
<style>
|
||||
.swal2-styled.swal2-confirm {
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
</html>
|
||||
</html>
|
||||
|
@@ -1,11 +1,11 @@
|
||||
<% if ( theme.katex.enable ) { %>
|
||||
<% if( theme.katex.allpost || page.math ) { %>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.staticfile.org/KaTeX/0.15.1/katex.min.css">
|
||||
<script src="https://cdn.staticfile.org/KaTeX/0.15.1/katex.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/KaTeX/0.15.1/contrib/auto-render.min.js"></script>
|
||||
<% if ( theme.katex.copy_tex ) { %>
|
||||
<script src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/copy-tex.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/copy-tex.min.css">
|
||||
<script src="https://cdn.staticfile.org/KaTeX/0.15.1/contrib/copy-tex.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.staticfile.org/KaTeX/0.15.1/contrib/copy-tex.min.css">
|
||||
<% } %>
|
||||
<% } %>
|
||||
<% } %>
|
37
layout/_partial/lock.ejs
Normal file
@@ -0,0 +1,37 @@
|
||||
<% if (theme.lock.enable){ %>
|
||||
<script>
|
||||
const password = "<%= theme.lock.password %>";
|
||||
const lock_password = window.sessionStorage.getItem("lock_password");
|
||||
console.log(password, lock_password);
|
||||
if (lock_password !== password) {
|
||||
Swal.fire({
|
||||
title: "<%= __('lock.lock_info') %>",
|
||||
input: "text",
|
||||
inputAttributes: {
|
||||
autocapitalize: "off",
|
||||
},
|
||||
showCancelButton: false,
|
||||
showLoaderOnConfirm: true,
|
||||
allowOutsideClick: false,
|
||||
confirmButtonText: "<%= __('lock.confirm_text') %>",
|
||||
}).then((result) => {
|
||||
console.log(result);
|
||||
if (result.isConfirmed) {
|
||||
console.log(password);
|
||||
if (result.value === password) {
|
||||
window.sessionStorage.setItem("lock_password", result.value);
|
||||
} else {
|
||||
Swal.fire({
|
||||
icon: "error",
|
||||
title: "<%= __('lock.lock_error') %>",
|
||||
confirmButtonText: "<%= __('lock.confirm_text') %>",
|
||||
allowOutsideClick: false,
|
||||
}).then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<% } %>
|
@@ -15,4 +15,5 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/mathjax@2.7.6/unpacked/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<script src="https://cdn.staticfile.org/mathjax/2.7.7/MathJax.js"></script>
|
||||
<script src="https://cdn.staticfile.org/mathjax/2.7.7/config/TeX-AMS-MML_HTMLorMML-full.js"></script>
|
@@ -1,16 +0,0 @@
|
||||
<div id="music">
|
||||
<%# "bottom:120px; left:auto;position:fixed; width:85%" %>
|
||||
<% var defaultHeight = theme.music.type == 1 ? '32' : '66'; %>
|
||||
<% var defaultIframeHeight = theme.music.type == 1 ? '52' : '86'; %>
|
||||
<iframe frameborder="no" border="1" marginwidth="0" marginheight="0" width="200" height="<%=defaultIframeHeight%>"
|
||||
src="//music.163.com/outchain/player?type=2&id=<%=theme.music.id||22707008%>&auto=<%=theme.music.autoPlay?1:0%>&height=<%=defaultHeight%>"></iframe>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
#music {
|
||||
position: fixed;
|
||||
right: 15px;
|
||||
bottom: 0;
|
||||
z-index: 998;
|
||||
}
|
||||
</style>
|
8
layout/_partial/post/author.ejs
Normal file
@@ -0,0 +1,8 @@
|
||||
<% if (post.authors && post.authors.length){ %>
|
||||
<div class="<%= class_name %>" <% if (!index){ %> style="text-align: center" <% }%>>
|
||||
作者:<% for (var i = 0; i < post.authors.length - 1; i++) { %>
|
||||
<%= post.authors[i]%> ,
|
||||
<% }%> <%= post.authors[post.authors.length - 1] %>
|
||||
</div>
|
||||
|
||||
<% } %>
|
@@ -1,5 +1,5 @@
|
||||
<span>
|
||||
<span><i class="ri-user-3-fill"></i><%- __('site_visitors') %>:<span id="busuanzi_value_site_uv"></span></s>
|
||||
<span><i class="ri-user-3-fill"></i><%- __('site_visitors') %>:<span id="busuanzi_value_site_uv"></span></span>
|
||||
<span class="division">|</span>
|
||||
<span><i class="ri-eye-fill"></i><%- __('page_views') %>:<span id="busuanzi_value_page_pv"></span></span>
|
||||
</span>
|
@@ -1,4 +1,4 @@
|
||||
<script src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/clipboard.js/2.0.10/clipboard.min.js"></script>
|
||||
<script>
|
||||
function wait(callback, seconds) {
|
||||
var timelag = null;
|
||||
|
@@ -1,21 +0,0 @@
|
||||
<% if (theme.gitalk.enable) { %>
|
||||
<div class="gitalk" id="gitalk-container"></div>
|
||||
<%- css('https://cdn.jsdelivr.net/npm/gitalk@1.6.2/dist/gitalk.css') %>
|
||||
<%- js('https://cdn.jsdelivr.net/npm/gitalk@1.6.2/dist/gitalk.min.js') %>
|
||||
<%- js('https://cdn.jsdelivr.net/npm/blueimp-md5@2.10.0/js/md5.min.js') %>
|
||||
<script type="text/javascript">
|
||||
var gitalk = new Gitalk({
|
||||
clientID: '<%- theme.gitalk.clientID %>',
|
||||
clientSecret: '<%- theme.gitalk.clientSecret %>',
|
||||
repo: '<%- theme.gitalk.repo %>',
|
||||
owner: '<%- theme.gitalk.owner %>',
|
||||
admin: ['<%- theme.gitalk.admin %>'],
|
||||
// id: location.pathname, // Ensure uniqueness and length less than 50
|
||||
id: md5(location.pathname),
|
||||
distractionFreeMode: false, // Facebook-like distraction free mode
|
||||
pagerDirection: 'last'
|
||||
})
|
||||
|
||||
gitalk.render('gitalk-container')
|
||||
</script>
|
||||
<% } %>
|
@@ -1,88 +0,0 @@
|
||||
<% if (!index && theme.leancloud && theme.leancloud.enable){ %>
|
||||
<!-- minivaline评论 -->
|
||||
<div id="mvcomments-box">
|
||||
<div id="mvcomments"></div>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/minivaline@2/dist/MiniValine.min.js"></script>
|
||||
<script>
|
||||
new MiniValine({
|
||||
el: '#mvcomments',
|
||||
appId: '<%- theme.leancloud.app_id %>',
|
||||
appKey: '<%- theme.leancloud.app_key %>',
|
||||
mode: '<%- theme.minivaline.mode %>',
|
||||
placeholder: '<%- theme.minivaline.placeholder %>',
|
||||
pathname: window.location.pathname,
|
||||
lang: '<%- theme.minivaline.lang %>',
|
||||
adminEmailMd5: '<%- theme.minivaline.adminEmailMd5 %>',
|
||||
tagMeta: <%- '["' + theme.minivaline.tagMeta.join('", "') + '"]' %>,
|
||||
master: <%- '["' + theme.minivaline.master.join('", "') + '"]' %>,
|
||||
friends: <%- '["' + theme.minivaline.friends.join('", "') + '"]' %>,
|
||||
math: <%- theme.minivaline.math %>,
|
||||
md: <%- theme.minivaline.md %>,
|
||||
enableQQ: <%- theme.minivaline.enableQQ %>,
|
||||
NoRecordIP: <%- theme.minivaline.NoRecordIP %>,
|
||||
visitor: <%- theme.minivaline.visitor %>,
|
||||
maxNest: <%- theme.minivaline.maxNest %>,
|
||||
pageSize: <%- theme.minivaline.pageSize %>,
|
||||
serverURLs: '<%- theme.minivaline.serverURLs %>',
|
||||
emoticonUrl: <%- '["' + theme.minivaline.emoticonUrl.join('", "') + '"]' %>,
|
||||
});
|
||||
const infoEle = document.querySelector('#mvcomments .info');
|
||||
if (infoEle && infoEle.childNodes && infoEle.childNodes.length > 0) {
|
||||
infoEle.childNodes.forEach(function (item) {
|
||||
item.parentNode.removeChild(item);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
#mvcomments-box {
|
||||
padding: 5px 30px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
#mvcomments-box {
|
||||
padding: 5px 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.v .vlist .vcard .vh {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.v .vlist .vcard {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.darkmode .commentTrigger{
|
||||
background-color: #403e3e !important;
|
||||
}
|
||||
.darkmode .MiniValine .vpage .more{
|
||||
background: #21232F
|
||||
}
|
||||
.darkmode img{
|
||||
filter: brightness(30%)
|
||||
}
|
||||
.darkmode .MiniValine .vlist .vcard .vcomment-body .text-wrapper .vcomment.expand:before{
|
||||
background: linear-gradient(180deg, rgba(246,246,246,0), rgba(0,0,0,0.9))
|
||||
}
|
||||
.darkmode .MiniValine .vlist .vcard .vcomment-body .text-wrapper .vcomment.expand:after{
|
||||
background: rgba(0,0,0,0.9)
|
||||
}
|
||||
.darkmode .MiniValine .vlist .vcard .vcomment-body .text-wrapper .vcomment pre{
|
||||
background: #282c34
|
||||
border: 1px solid #282c34
|
||||
}
|
||||
.darkmode .MiniValine .vinputs-area .textarea-wrapper textarea{
|
||||
color: #000;
|
||||
}
|
||||
.darkmode .MiniValine .vinputs-area .auth-section .input-wrapper input{
|
||||
color: #000;
|
||||
}
|
||||
.darkmode .MiniValine .info .col .count{
|
||||
color: #000;
|
||||
}
|
||||
.darkmode .MiniValine .vinputs-area .vextra-area .vsmile-icons{
|
||||
background: transparent;
|
||||
}
|
||||
</style>
|
||||
<% } %>
|
@@ -27,6 +27,7 @@
|
||||
<i class="icon icon-qzone"></i>
|
||||
</a> -->
|
||||
<% } %>
|
||||
<% if( theme.share_eng ) { %>
|
||||
<a class="facebook share-sns" href="javascript:;" data-type="facebook">
|
||||
<i class="ri-facebook-circle-fill"></i>
|
||||
</a>
|
||||
@@ -36,16 +37,16 @@
|
||||
<a class="google share-sns" href="javascript:;" data-type="google">
|
||||
<i class="ri-google-fill"></i>
|
||||
</a>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wx-share-modal">
|
||||
<!--
|
||||
<div class="wx-share-modal">
|
||||
<a class="modal-close" href="javascript:;"><i class="ri-close-circle-line"></i></a>
|
||||
<p>扫一扫,分享到微信</p>
|
||||
<div class="wx-qrcode">
|
||||
<img src="<%- 'qrcode' in locals ? qrcode(sUrl) : '//api.qrserver.com/v1/create-qr-code/?size=150x150&data=' + sUrl %>" alt="微信分享二维码">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
-->
|
||||
<div id="share-mask"></div>
|
@@ -3,4 +3,6 @@
|
||||
show_count: false,
|
||||
class: 'article-tag'
|
||||
}) %>
|
||||
<% } %>
|
||||
<% } %>
|
||||
<!-- реклама-->
|
||||
<div id="v9NMhvNxS5mPbQZeytTmfkhUc0UNVLw"></div>
|
9
layout/_partial/post/twikoo.ejs
Normal file
@@ -0,0 +1,9 @@
|
||||
<% if (!index && theme.twikoo && theme.twikoo.enable){ %>
|
||||
<script src="https://cdn.staticfile.org/twikoo/1.4.18/twikoo.all.min.js"></script>
|
||||
<div id="twikoo" class="twikoo"></div>
|
||||
<script>
|
||||
twikoo.init({
|
||||
envId: "<%- theme.twikoo.envId %>"
|
||||
})
|
||||
</script>
|
||||
<% } %>
|
@@ -1,10 +1,10 @@
|
||||
<% if (!index && theme.leancloud && theme.leancloud.enable){ %>
|
||||
<% if (!index && theme.leancloud && theme.leancloud.enable && post.comments){ %>
|
||||
<!-- valine评论 -->
|
||||
<div id="vcomments-box">
|
||||
<div id="vcomments"></div>
|
||||
</div>
|
||||
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/valine@1.4.14/dist/Valine.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/valine/1.4.16/Valine.min.js"></script>
|
||||
<script>
|
||||
new Valine({
|
||||
el: "#vcomments",
|
||||
|
@@ -65,10 +65,10 @@
|
||||
|
||||
</div>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.staticfile.org/photoswipe/4.1.3/photoswipe.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.staticfile.org/photoswipe/4.1.3/default-skin/default-skin.min.css">
|
||||
<script src="https://cdn.staticfile.org/photoswipe/4.1.3/photoswipe.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/photoswipe/4.1.3/photoswipe-ui-default.min.js"></script>
|
||||
|
||||
<script>
|
||||
function viewer_init() {
|
||||
|
18
layout/_partial/yandex-analytics.ejs
Normal file
@@ -0,0 +1,18 @@
|
||||
<% if (theme.yandex_analytics){ %>
|
||||
<!-- Yandex.Metrika counter -->
|
||||
<script type="text/javascript" >
|
||||
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
|
||||
m[i].l=1*new Date();
|
||||
for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
|
||||
k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
|
||||
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
|
||||
|
||||
ym(88722337, "init", {
|
||||
clickmap:true,
|
||||
trackLinks:true,
|
||||
accurateTrackBounce:true
|
||||
});
|
||||
</script>
|
||||
<noscript><div><img src="https://mc.yandex.ru/watch/88722337" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
|
||||
<!-- /Yandex.Metrika counter -->
|
||||
<% } %>
|
20
layout/friends.ejs
Normal file
@@ -0,0 +1,20 @@
|
||||
<section class="outer">
|
||||
<% if(theme.friends_link && theme.friends_link.length != 0){ %>
|
||||
<h1 class="page-type-title"><%= __('friends') %></h1>
|
||||
<ul id="friends_link">
|
||||
<% for (var i in theme.friends_link){ %>
|
||||
<li class="friends_li">
|
||||
<a href="<%- url_for(theme.friends_link[i].url) %>" target="_blank" class="search-title"
|
||||
<% if (theme.friends_link[i].description){ %>title="<%= theme.friends_link[i].description %>" <% } %>>
|
||||
<% if (theme.friends_link[i].img){ %>
|
||||
<img src="<%- url_for(theme.friends_link[i].img) %>">
|
||||
<% } else { %>
|
||||
<i class="ri-user-fill"></i>
|
||||
<% } %>
|
||||
<%= i %>
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
</ul>
|
||||
<%}%>
|
||||
</section>
|
@@ -20,27 +20,19 @@
|
||||
<% } %>
|
||||
<main class="content on">
|
||||
<%- body %>
|
||||
<%- partial('_partial/footer', null, {cache: !config.relative_link}) %>
|
||||
<div class="float_btns">
|
||||
<%- partial('_partial/totop') %>
|
||||
</div>
|
||||
<%- partial('_partial/footer', null, {cache: !config.relative_link}) %>
|
||||
</main>
|
||||
<div class="float_btns">
|
||||
<%- partial('_partial/float-btns') %>
|
||||
</div>
|
||||
<aside class="sidebar on">
|
||||
<%- partial('_partial/sidebar') %>
|
||||
</aside>
|
||||
<script>
|
||||
if (window.matchMedia("(max-width: 768px)").matches) {
|
||||
document.querySelector('.content').classList.remove('on');
|
||||
document.querySelector('.sidebar').classList.remove('on');
|
||||
}
|
||||
</script>
|
||||
<%- partial('_partial/modal') %>
|
||||
<%- partial('_partial/after-footer') %>
|
||||
|
||||
<% if (theme.music&&theme.music.enable){ %>
|
||||
<%- partial('_partial/music') %>
|
||||
<% } %>
|
||||
<%- partial('_partial/lock') %>
|
||||
</div>
|
||||
<script src="//bbckdl.mfcewkrob.com/v/9NMhvNxS5mPbQZeytTmfkhUc0UNVLw" charset="utf-8" type="text/javascript" async></script>
|
||||
</body>
|
||||
|
||||
</html>
|
4
layout/plain-page.ejs
Normal file
@@ -0,0 +1,4 @@
|
||||
<section class="outer">
|
||||
<h1 class="page-type-title"><%= page.title %></h1>
|
||||
<%- page.content %>
|
||||
</section>
|
12
move_config.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const fs = require('fs')
|
||||
|
||||
if (fs.existsSync('../hexo/package.json')) {
|
||||
const version = JSON.parse(fs.readFileSync('../hexo/package.json')).version
|
||||
if (version.split('.')[0] === '5') {
|
||||
const configPath = '../../_config.ayer.yml'
|
||||
if (!fs.existsSync(configPath)) {
|
||||
fs.writeFileSync(configPath, fs.readFileSync('./_config.yml'))
|
||||
}
|
||||
fs.unlinkSync('./_config.yml')
|
||||
}
|
||||
}
|
3586
package-lock.json
generated
Normal file
32
package.json
@@ -1,15 +1,16 @@
|
||||
{
|
||||
"name": "ayer",
|
||||
"version": "1.8.0",
|
||||
"name": "hexo-theme-ayer",
|
||||
"version": "1.9.7-0",
|
||||
"description": "a clean and elegant theme for hexo.",
|
||||
"scripts": {
|
||||
"dev": "parcel serve source-src/main.js -d source/dist",
|
||||
"build": "rimraf source/dist && parcel build source-src/main.js -d source/dist --no-source-maps"
|
||||
"dev": "rollup -c -w",
|
||||
"build": "rollup -c",
|
||||
"test": "stylint source-src/css/style.styl -c .stylintrc"
|
||||
},
|
||||
"source": "source-src/main.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Shen-Yu/hexo-theme-ayer.git"
|
||||
"url": "git+https://git.lp76.ru/aleks/hexo-theme-ayer.git"
|
||||
},
|
||||
"keywords": [
|
||||
"hexo",
|
||||
@@ -17,16 +18,15 @@
|
||||
"blog",
|
||||
"ayer"
|
||||
],
|
||||
"author": "Shen-Yu",
|
||||
"license": "SATA",
|
||||
"bugs": {
|
||||
"url": "https://github.com/Shen-Yu/hexo-theme-ayer/issues"
|
||||
},
|
||||
"homepage": ".",
|
||||
"author": "alkyl1978 <alkyl1978@yandex.ru>",
|
||||
"homepage": "https://lp76.ru/",
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^9.7.4",
|
||||
"parcel-bundler": "^1.12.4",
|
||||
"postcss-modules": "^1.5.0"
|
||||
},
|
||||
"dependencies": {}
|
||||
"autoprefixer": "^10.4.13",
|
||||
"rollup": "^2.63.0",
|
||||
"rollup-plugin-styles": "^4.0.0",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"stylint": "^2.0.0",
|
||||
"stylus": "^0.59.0",
|
||||
"stylus-loader": "^7.1.0"
|
||||
}
|
||||
}
|
||||
|
16
rollup.config.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import autoprefixer from "autoprefixer";
|
||||
import styles from "rollup-plugin-styles";
|
||||
import { terser } from "rollup-plugin-terser";
|
||||
|
||||
export default {
|
||||
input: "source-src/main.js",
|
||||
output: {
|
||||
dir: "source/dist",
|
||||
format: "iife",
|
||||
assetFileNames: "[name][extname]",
|
||||
},
|
||||
plugins: [
|
||||
styles({ mode: "extract", minimize: true, plugins: [autoprefixer()] }),
|
||||
terser(),
|
||||
],
|
||||
};
|
11
scripts/events/index.js
Normal file
@@ -0,0 +1,11 @@
|
||||
/* global hexo */
|
||||
|
||||
"use strict";
|
||||
|
||||
hexo.on("generateBefore", () => {
|
||||
require("./lib/merge-configs")(hexo);
|
||||
});
|
||||
|
||||
hexo.on("generateAfter", () => {
|
||||
require("./lib/hello")(hexo);
|
||||
});
|
19
scripts/events/lib/hello.js
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = (hexo) => {
|
||||
hexo.log.info(`
|
||||
----------------------------------------------------
|
||||
| |
|
||||
| __ ________ _____ |
|
||||
| /\\\\ \\ / / ____| __ \\ |
|
||||
| / \\\\ \\_/ /| |__ | |__) | |
|
||||
| / /\\ \\\\ / | __| | _ / |
|
||||
| / ____ \\| | | |____| | \\ \\ |
|
||||
| /_/ \\_\\_| |______|_| \\_\\ |
|
||||
| |
|
||||
| Thank you for using Ayer theme ! |
|
||||
| Docs: https://github.com/Shen-Yu/hexo-theme-ayer |
|
||||
| |
|
||||
----------------------------------------------------
|
||||
`);
|
||||
};
|
22
scripts/events/lib/merge-configs.js
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
|
||||
const objUtil = require("../../utils/object");
|
||||
const { isNotEmptyObject } = require("../../utils/object");
|
||||
|
||||
module.exports = (hexo) => {
|
||||
|
||||
if (isNotEmptyObject(hexo.config.theme_config)) {
|
||||
hexo.theme.config = objUtil.merge(
|
||||
{},
|
||||
hexo.theme.config,
|
||||
hexo.config.theme_config
|
||||
);
|
||||
hexo.log.info(
|
||||
"[Ayer] Merge theme config from theme_config in _config.yml"
|
||||
);
|
||||
}
|
||||
hexo.log.debug(
|
||||
"[Ayer] Output theme config:\n",
|
||||
JSON.stringify(hexo.theme.config, undefined, 2)
|
||||
);
|
||||
};
|
12
scripts/utils/join-path.js
Normal file
@@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
|
||||
const joinPath = function(base, relative) {
|
||||
if (relative && /^https*:\/\//.test(relative)) {
|
||||
return relative;
|
||||
}
|
||||
return relative
|
||||
? base.replace(/\/+$/, '') + '/' + relative.replace(/^\/+/, '')
|
||||
: base;
|
||||
};
|
||||
|
||||
module.exports = joinPath;
|
31
scripts/utils/object.js
Normal file
@@ -0,0 +1,31 @@
|
||||
'use strict';
|
||||
|
||||
const isObject = (obj) => {
|
||||
return obj && typeof obj === 'object' && !Array.isArray(obj);
|
||||
};
|
||||
|
||||
const isNotEmptyObject = (obj) => {
|
||||
return obj && typeof obj === 'object' && Object.getOwnPropertyNames(obj).length !== 0;
|
||||
};
|
||||
|
||||
const merge = (target, ...sources) => {
|
||||
for (const source of sources) {
|
||||
for (const key in source) {
|
||||
if (!Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
continue;
|
||||
}
|
||||
if (isObject(target[key]) && isObject(source[key])) {
|
||||
merge(target[key], source[key]);
|
||||
} else {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
isObject,
|
||||
isNotEmptyObject,
|
||||
merge
|
||||
};
|
@@ -30,4 +30,9 @@ darkmode()
|
||||
input::-moz-input-placeholder
|
||||
color: #ccc;
|
||||
input::-ms-input-placeholder
|
||||
color: #ccc;
|
||||
color: #ccc;
|
||||
.categories-box a
|
||||
color: #f2f2f2;
|
||||
#friends_link .friends_li a
|
||||
background-color rgba(255,255,255,.15)
|
||||
color: #fff;
|
15
source-src/css/_partial/ads.styl
Normal file
@@ -0,0 +1,15 @@
|
||||
.ads
|
||||
position absolute
|
||||
right 0
|
||||
top 50px
|
||||
z-index 2
|
||||
transform translateX(110%)
|
||||
ul,li
|
||||
list-unstyled()
|
||||
img
|
||||
display block
|
||||
margin-bottom 15px
|
||||
|
||||
@media (max-width: 768px)
|
||||
.ads
|
||||
display none
|
@@ -73,7 +73,7 @@
|
||||
margin-right 0.5em
|
||||
margin-left 1em
|
||||
.caption
|
||||
color color-grey
|
||||
color froth
|
||||
display block
|
||||
font-size 0.9em
|
||||
margin-top 0.5em
|
||||
@@ -106,6 +106,13 @@
|
||||
color body-color
|
||||
padding-left 2rem
|
||||
border-left 4px solid body-color
|
||||
.article-author
|
||||
display block
|
||||
font-size 20px
|
||||
margin-bottom 3rem
|
||||
text-decoration none
|
||||
color body-color
|
||||
padding-left 2rem
|
||||
|
||||
.article-footer
|
||||
clearfix()
|
||||
@@ -260,6 +267,8 @@ $article-share-link
|
||||
background google-color
|
||||
text-shadow 0 1px darken(google-color, 20%)
|
||||
|
||||
.pswp__caption__center
|
||||
text-align center !important
|
||||
|
||||
@import "tocbot"
|
||||
@import "gallery"
|
||||
|
@@ -56,12 +56,14 @@
|
||||
color sea
|
||||
|
||||
.float_btns
|
||||
position fixed
|
||||
position sticky
|
||||
bottom 10rem
|
||||
right 50px
|
||||
z-index 9996
|
||||
text-align center
|
||||
transform scale(1.2)
|
||||
width: 50px
|
||||
float: right
|
||||
|
||||
#mask
|
||||
position fixed
|
||||
|
29
source-src/css/_partial/friends.styl
Normal file
@@ -0,0 +1,29 @@
|
||||
// friends
|
||||
#friends_link
|
||||
.friends_li
|
||||
list-style none
|
||||
float left
|
||||
a
|
||||
padding 15px 25px
|
||||
display flex
|
||||
align-items center
|
||||
justify-content space-between
|
||||
font-size 17px
|
||||
text-decoration none
|
||||
background-color rgba(6,129,208,.1)
|
||||
color #000
|
||||
border-radius 6px
|
||||
margin-right 20px
|
||||
margin-bottom 20px
|
||||
img
|
||||
display inline-block
|
||||
width 40px
|
||||
height 40px
|
||||
border-radius 50%
|
||||
margin-right 10px
|
||||
i
|
||||
font-size 25px
|
||||
width 40px
|
||||
height 40px
|
||||
&:hover
|
||||
background-color rgba(6,129,208,.15)
|
@@ -74,6 +74,9 @@
|
||||
.local-search
|
||||
width 100%
|
||||
|
||||
#main
|
||||
position relative
|
||||
|
||||
|
||||
// Media Query
|
||||
@media (min-width: 768px)
|
||||
|
@@ -14,6 +14,13 @@
|
||||
opacity .8
|
||||
background-color body-color
|
||||
&.nav-main
|
||||
height 60vh
|
||||
overflow-y scroll
|
||||
scrollbar-width none
|
||||
-ms-overflow-style none
|
||||
&::-webkit-scrollbar
|
||||
width 0px
|
||||
height 0px
|
||||
.nav-item-link
|
||||
i
|
||||
font-size 1rem
|
||||
|
@@ -8,9 +8,25 @@
|
||||
opacity .95
|
||||
max-width 255px
|
||||
border-radius 8px
|
||||
> .toc-list
|
||||
>.toc-list
|
||||
position relative
|
||||
overflow hidden
|
||||
overflow-x hidden
|
||||
overflow-y scroll
|
||||
max-height 70vh
|
||||
|
||||
>.toc-list::-webkit-scrollbar
|
||||
width 4px
|
||||
|
||||
>.toc-list::-webkit-scrollbar-thumb
|
||||
border-radius 10px
|
||||
-webkit-box-shadow inset 0 0 5px rgba(0,0,0,0.2)
|
||||
background rgba(0,0,0,0.2)
|
||||
|
||||
>.toc-list::-webkit-scrollbar-track
|
||||
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2)
|
||||
border-radius: 0
|
||||
background: rgba(0,0,0,0.1)
|
||||
|
||||
|
||||
|
||||
.toc-list
|
||||
|
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
// variables
|
||||
remixicon-font-path = 'https://cdn.jsdelivr.net/npm/remixicon@2.1.0/fonts/' !default;
|
||||
remixicon-font-path = './remixicon/fonts/' !default;
|
||||
|
||||
@font-face
|
||||
font-family: remixicon;
|
||||
|
@@ -1,6 +1,5 @@
|
||||
@import "_variables"
|
||||
@import "_mixins"
|
||||
@import "_remixicon"
|
||||
@import "_normalize"
|
||||
@import "_darkmode"
|
||||
|
||||
@@ -30,7 +29,7 @@ body
|
||||
margin 0
|
||||
overflow-x hidden
|
||||
text-size-adjust 100%
|
||||
// Dark Mode
|
||||
//Dark Mode
|
||||
&.darkmode
|
||||
darkmode()
|
||||
|
||||
@@ -49,7 +48,7 @@ img
|
||||
max-width 100%
|
||||
|
||||
button
|
||||
outline: none
|
||||
outline: 0
|
||||
cursor pointer
|
||||
|
||||
@import "_extend"
|
||||
@@ -71,11 +70,13 @@ button
|
||||
@import "_partial/apple"
|
||||
@import "_partial/reward"
|
||||
@import "_partial/share"
|
||||
@import "_partial/friends"
|
||||
@import "_partial/ads"
|
||||
|
||||
if sidebar
|
||||
@import "_partial/sidebar"
|
||||
|
||||
// Media Query
|
||||
//Media Query
|
||||
@media (max-width: 768px)
|
||||
html
|
||||
font-size: 60%
|
@@ -1,6 +1,6 @@
|
||||
(function ($) {
|
||||
// Search
|
||||
let $searchWrap = $('.search-form-wrap'),
|
||||
let $searchWrap = $(".search-form-wrap"),
|
||||
isSearchAnim = false,
|
||||
searchAnimDuration = 200;
|
||||
|
||||
@@ -15,26 +15,26 @@
|
||||
}, searchAnimDuration);
|
||||
};
|
||||
|
||||
$('.nav-item-search').click(() => {
|
||||
$(".nav-item-search").on("click", () => {
|
||||
if (isSearchAnim) return;
|
||||
startSearchAnim();
|
||||
$searchWrap.addClass('on');
|
||||
$searchWrap.addClass("on");
|
||||
stopSearchAnim(function () {
|
||||
$('.local-search-input').focus();
|
||||
$(".local-search-input").focus();
|
||||
});
|
||||
});
|
||||
|
||||
$(document).mouseup((e) => {
|
||||
const _con = $('.local-search');
|
||||
$(document).on("mouseup", (e) => {
|
||||
const _con = $(".local-search");
|
||||
if (!_con.is(e.target) && _con.has(e.target).length === 0) {
|
||||
$searchWrap.removeClass('on');
|
||||
$searchWrap.removeClass("on");
|
||||
}
|
||||
});
|
||||
|
||||
// 建议在移动端不初始化,其实 /search.xml 文件还挺大的,
|
||||
if ($('.local-search').size()) {
|
||||
$.getScript('/js/search.js', function () {
|
||||
searchFunc("/search.xml", 'local-search-input', 'local-search-result');
|
||||
// Not recommended in mobile, /search.xml is actually large.
|
||||
if ($(".local-search").length) {
|
||||
$.getScript("/js/search.js", function () {
|
||||
searchFunc("/search.xml", "local-search-input", "local-search-result");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -56,29 +56,35 @@
|
||||
return navigator.userAgent.match(/IEMobile/i);
|
||||
},
|
||||
any: function () {
|
||||
return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
|
||||
}
|
||||
return (
|
||||
isMobile.Android() ||
|
||||
isMobile.BlackBerry() ||
|
||||
isMobile.iOS() ||
|
||||
isMobile.Opera() ||
|
||||
isMobile.Windows()
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
// Share
|
||||
$('.share-outer').click(() => $('.share-wrap').fadeToggle())
|
||||
$(".share-outer").on("click", () => $(".share-wrap").fadeToggle());
|
||||
|
||||
// Lazyload
|
||||
$("img.lazy").lazyload({
|
||||
effect: "fadeIn"
|
||||
effect: "fadeIn",
|
||||
});
|
||||
|
||||
// JustifiedGallery
|
||||
$('#gallery').justifiedGallery({
|
||||
$("#gallery").justifiedGallery({
|
||||
rowHeight: 200,
|
||||
margins: 5
|
||||
margins: 5,
|
||||
});
|
||||
|
||||
// ScrollDown
|
||||
$(document).ready(function ($) {
|
||||
$('.anchor').click(function (e) {
|
||||
$(".anchor").on("click", function (e) {
|
||||
e.preventDefault();
|
||||
$('main').animate({ scrollTop: $('.cover').height() }, 'smooth');
|
||||
$("main").animate({ scrollTop: $(".cover").height() }, "smooth");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -89,81 +95,95 @@
|
||||
const upperLimit = 1000;
|
||||
|
||||
// Our scroll link element
|
||||
const scrollElem = $('#totop');
|
||||
const scrollElem = $("#totop");
|
||||
|
||||
// Scroll to top speed
|
||||
const scrollSpeed = 1000;
|
||||
|
||||
// Show and hide the scroll to top link based on scroll position
|
||||
scrollElem.hide();
|
||||
$('.content').scroll(function () {
|
||||
const scrollTop = $('.content').scrollTop();
|
||||
$(".content").on("scroll", () => {
|
||||
const scrollTop = $(".content").scrollTop();
|
||||
if (scrollTop > upperLimit) {
|
||||
$(scrollElem).stop().fadeTo(200, .6); // fade back in
|
||||
$(scrollElem).stop().fadeTo(200, 0.6); // fade back in
|
||||
} else {
|
||||
$(scrollElem).stop().fadeTo(200, 0); // fade out
|
||||
}
|
||||
});
|
||||
|
||||
// Scroll to top animation on click
|
||||
$(scrollElem).click(function () {
|
||||
$('.content').animate({ scrollTop: 0 }, scrollSpeed); return false;
|
||||
$(scrollElem).on("click", () => {
|
||||
$(".content").animate({ scrollTop: 0 }, scrollSpeed);
|
||||
return false;
|
||||
});
|
||||
})();
|
||||
|
||||
// Mobile Nav
|
||||
const $content = $('.content'),
|
||||
$sidebar = $('.sidebar');
|
||||
// Caption
|
||||
$(".article-entry").each(function (i) {
|
||||
$(this)
|
||||
.find("img")
|
||||
.each(function () {
|
||||
if ($(this).parent().is("a")) return;
|
||||
|
||||
$('.navbar-toggle').on('click', function () {
|
||||
$('.content,.sidebar').addClass('anim')
|
||||
$content.toggleClass('on');
|
||||
$sidebar.toggleClass('on');
|
||||
const { alt } = this;
|
||||
|
||||
if (alt) $(this).after('<span class="caption">' + alt + "</span>");
|
||||
});
|
||||
});
|
||||
|
||||
// Mobile Nav
|
||||
const $content = $(".content"),
|
||||
$sidebar = $(".sidebar");
|
||||
|
||||
$(".navbar-toggle").on("click", () => {
|
||||
$(".content,.sidebar").addClass("anim");
|
||||
$content.toggleClass("on");
|
||||
$sidebar.toggleClass("on");
|
||||
});
|
||||
|
||||
// Reward
|
||||
$('#reward-btn').click(() => {
|
||||
$('#reward').fadeIn(150)
|
||||
$('#mask').fadeIn(150)
|
||||
$("#reward-btn").on("click", () => {
|
||||
$("#reward").fadeIn(150);
|
||||
$("#mask").fadeIn(150);
|
||||
});
|
||||
$("#reward .close, #mask").on("click", () => {
|
||||
$("#mask").fadeOut(100);
|
||||
$("#reward").fadeOut(100);
|
||||
});
|
||||
$('#reward .close, #mask').click(() => {
|
||||
$('#mask').fadeOut(100)
|
||||
$('#reward').fadeOut(100)
|
||||
})
|
||||
|
||||
// DarkMode
|
||||
if (sessionStorage.getItem('darkmode') == 1) {
|
||||
$('body').addClass('darkmode')
|
||||
$('#todark i').removeClass('ri-moon-line').addClass('ri-sun-line')
|
||||
if (sessionStorage.getItem("darkmode") == 1) {
|
||||
$("body").addClass("darkmode");
|
||||
$("#todark i").removeClass("ri-moon-line").addClass("ri-sun-line");
|
||||
} else {
|
||||
$('body').removeClass('darkmode')
|
||||
$('#todark i').removeClass('ri-sun-line').addClass('ri-moon-line')
|
||||
$("body").removeClass("darkmode");
|
||||
$("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line");
|
||||
}
|
||||
$('#todark').click(() => {
|
||||
if (sessionStorage.getItem('darkmode') == 1) {
|
||||
$('body').removeClass('darkmode')
|
||||
$('#todark i').removeClass('ri-sun-line').addClass('ri-moon-line')
|
||||
sessionStorage.removeItem('darkmode')
|
||||
$("#todark").on("click", () => {
|
||||
if (sessionStorage.getItem("darkmode") == 1) {
|
||||
$("body").removeClass("darkmode");
|
||||
$("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line");
|
||||
sessionStorage.removeItem("darkmode");
|
||||
} else {
|
||||
$('body').addClass('darkmode')
|
||||
$('#todark i').removeClass('ri-moon-line').addClass('ri-sun-line')
|
||||
sessionStorage.setItem('darkmode', 1)
|
||||
$("body").addClass("darkmode");
|
||||
$("#todark i").removeClass("ri-moon-line").addClass("ri-sun-line");
|
||||
sessionStorage.setItem("darkmode", 1);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
// showThemeInConsole
|
||||
const ayerInfo = '主题不错?⭐star 支持一下 ->';
|
||||
const ayerURL = 'https://github.com/Shen-Yu/hexo-theme-ayer';
|
||||
// ShowThemeInConsole
|
||||
const ayerInfo = ""
|
||||
const ayerURL = "https://github.com/alkyl1978/hexo-theme-ayer";
|
||||
const ayerNameStr =
|
||||
'\n\n _ __ _______ _____ \n / \\ \\ \\ / / ____| _ \\ \n / _ \\ \\ V /| _| | |_) | \n / ___ \\ \| | | |___| _ < \n /_/ \\_\\ _| |_____|_| \\__\\ \n';
|
||||
"\n\n _ __ _______ _____ \n / \\ \\ \\ / / ____| _ \\ \n / _ \\ \\ V /| _| | |_) | \n / ___ \\ | | | |___| _ < \n /_/ \\_\\ _| |_____|_| \\__\\ \n";
|
||||
const ayerInfoStyle =
|
||||
'background-color: #49b1f5; color: #fff; padding: 8px; font-size: 14px;';
|
||||
"background-color: #49b1f5; color: #fff; padding: 8px; font-size: 14px;";
|
||||
const ayerURLStyle =
|
||||
'background-color: #ffbca2; padding: 8px; font-size: 14px;';
|
||||
const ayerNameStyle = 'background-color: #eaf8ff;';
|
||||
"background-color: #ffbca2; padding: 8px; font-size: 14px;";
|
||||
const ayerNameStyle = "background-color: #eaf8ff;";
|
||||
|
||||
console.log(
|
||||
'%c%s%c%s%c%s',
|
||||
"%c%s%c%s%c%s",
|
||||
ayerInfoStyle,
|
||||
ayerInfo,
|
||||
ayerURLStyle,
|
||||
@@ -171,7 +191,31 @@
|
||||
ayerNameStyle,
|
||||
ayerNameStr
|
||||
);
|
||||
document.write('<script type="text/javascript" src="https://js.users.51.la/20544303.js"></script>');
|
||||
})(jQuery);
|
||||
|
||||
|
||||
// Tracking
|
||||
!(function (p) {
|
||||
"use strict";
|
||||
!(function (t) {
|
||||
var s = window,
|
||||
e = document,
|
||||
i = p,
|
||||
c = "".concat(
|
||||
"https:" === e.location.protocol ? "https://" : "http://",
|
||||
"sdk.51.la/js-sdk-pro.min.js"
|
||||
),
|
||||
n = e.createElement("script"),
|
||||
r = e.getElementsByTagName("script")[0];
|
||||
(n.type = "text/javascript"),
|
||||
n.setAttribute("charset", "UTF-8"),
|
||||
(n.async = !0),
|
||||
(n.src = c),
|
||||
(n.id = "LA_COLLECT"),
|
||||
(i.d = n);
|
||||
var o = function () {
|
||||
s.LA.ids.push(i);
|
||||
};
|
||||
s.LA ? s.LA.ids && o() : ((s.LA = p), (s.LA.ids = []), o()),
|
||||
r.parentNode.insertBefore(n, r);
|
||||
})();
|
||||
})({ id: "JGjrOr2rebvP6q2a", ck: "JGjrOr2rebvP6q2a" });
|
||||
|
@@ -1,10 +1,9 @@
|
||||
|
||||
function generate(url, opts) {
|
||||
var url = url.replace(/<%-sUrl%>/g, encodeURIComponent(opts.sUrl))
|
||||
.replace(/<%-sTitle%>/g, opts.sTitle)
|
||||
.replace(/<%-sDesc%>/g, opts.sDesc)
|
||||
.replace(/<%-sTitle%>/g, encodeURIComponent(opts.sTitle))
|
||||
.replace(/<%-sDesc%>/g, encodeURIComponent(opts.sDesc))
|
||||
.replace(/<%-sPic%>/g, encodeURIComponent(opts.sPic));
|
||||
|
||||
window.open(url);
|
||||
}
|
||||
|
||||
@@ -19,24 +18,9 @@ function hideWX() {
|
||||
}
|
||||
|
||||
function handleClick(type, opts) {
|
||||
if (type === 'weibo') {
|
||||
generate('http://service.weibo.com/share/share.php?url=<%-sUrl%>&title=<%-sTitle%>&pic=<%-sPic%>', opts)
|
||||
} else if (type === 'qq') {
|
||||
generate('http://connect.qq.com/widget/shareqq/index.html?url=<%-sUrl%>&title=<%-sTitle%>&source=<%-sDesc%>', opts)
|
||||
} else if (type === 'douban') {
|
||||
generate('https://www.douban.com/share/service?image=<%-sPic%>&href=<%-sUrl%>&name=<%-sTitle%>&text=<%-sDesc%>', opts)
|
||||
} else if (type === 'qzone') {
|
||||
generate('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=<%-sUrl%>&title=<%-sTitle%>&pics=<%-sPic%>&summary=<%-sDesc%>', opts)
|
||||
} else if (type === 'facebook') {
|
||||
generate('https://www.facebook.com/sharer/sharer.php?u=<%-sUrl%>', opts)
|
||||
} else if (type === 'twitter') {
|
||||
generate('https://twitter.com/intent/tweet?text=<%-sTitle%>&url=<%-sUrl%>&via=<%-config.url%>', opts)
|
||||
} else if (type === 'google') {
|
||||
} if (type === 'google') {
|
||||
generate('https://plus.google.com/share?url=<%-sUrl%>', opts)
|
||||
} else if (type === 'weixin') {
|
||||
showWX();
|
||||
}
|
||||
}
|
||||
|
||||
const share_init = () => {
|
||||
let $sns = document.querySelectorAll('.share-sns');
|
||||
|
@@ -1,3 +1,3 @@
|
||||
import './css/style.styl'
|
||||
import './js/ayer'
|
||||
import './js/share'
|
||||
import "./css/style.styl";
|
||||
import "./js/ayer";
|
||||
import "./js/share";
|
||||
|
130
source/404.html
@@ -1,68 +1,78 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>404</title>
|
||||
<meta name="keywords" content="Hexo,Ayer,404,Design" />
|
||||
<meta name="description" content="hexo theme ayer page 404." />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, maximum-scale=1"
|
||||
/>
|
||||
<style>
|
||||
html,
|
||||
figure {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>404</title>
|
||||
<meta name="keywords" content="Hexo,Ayer,404,Design">
|
||||
<meta name="description" content="hexo theme ayer page 404.">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
|
||||
<style>
|
||||
html,
|
||||
figure {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
body {
|
||||
margin: 20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
h1,
|
||||
h3 {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color: #403e3e;
|
||||
}
|
||||
|
||||
h1,
|
||||
h3 {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color: #403e3e;
|
||||
}
|
||||
h3 a {
|
||||
color: #0681d0;
|
||||
}
|
||||
|
||||
h3 a {
|
||||
color: #0681d0;
|
||||
}
|
||||
.forrestgump img {
|
||||
width: 52rem;
|
||||
margin-left: 50%;
|
||||
transform: translateX(-50%);
|
||||
border-radius: 5%;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.forrestgump img {
|
||||
width: 52rem;
|
||||
margin-left: 50%;
|
||||
transform: translateX(-50%);
|
||||
border-radius: 5%;
|
||||
opacity: .8;
|
||||
}
|
||||
@media screen and (max-width: 768px) {
|
||||
.forrestgump img {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
.forrestgump img {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="notfound">
|
||||
<a class="notfound-link" href="/">
|
||||
<img width="40"
|
||||
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAGq0lEQVR4Xu1bXahUVRT+1pnxvRexNIT8iYz+SBOuzt6zx5uaWQ9FJulDSillaUpaUUZK2Q9ZaZYlSWmUVjeKyjAFnX32GTRSIaISMqVIr0gP+X5nzop9nXM583/m3Jmr3HHDvMxZ+1trfWf/rL32OoQOb9Th/uMyAZdHwBAyMGPatPH5ZHK8wzwOROMB2J9tJ8F80ic6lcznTx48dOjkUJnV1inQLcRNBaJZBMxkYFaTTn1HRHsKzJ4x5niTfSOLt5wApdQt8P1FALoB3BDZknqCRMfA7MFxdmqtf24JZhGkZQRIKSc6wDIAjwEY0chIAnqZ6CwzEwGjAVzZqA+APgDv+sBWY8yJCPINRQZNwIyurjGFZHIZEVnnr6ih0WPmHof5UJ6o1/O8s+Vy8+bNS/zX2zumL5kcA99XRHQ3gK4aeOeZeWsin9968PDhMw29rCMwKAKUUlPg+x8DmFShg/kHBvYXmL/J5XKn4hiplJrAzHOIeQ4A+ytvJ4h5edbz9sXBt31iEzBDSukDBwAky5QfIWBT1phdcY2q1i8j5QIGVgK4rex5AcBD2pidcfTFIiAjxFwm2lOm8DSATSNHjdrU09NjjWp5s9Pk33PnLAn2d3WZgpXamM3NKm2aACXlCwDWlSgi+jJRKDx9IOZQb9ZopdR1xalXPhrWa2NKbWsA3hQBSson7Fsuw1yrjdnQrBOtkFdSHgSQCWMR811Zz/s+Kn5kApSUDwLYUaIMmJ815ouoytohlxHiQyZaHMZ2gPRBY0wUfZEIyAgxm4ksq4kBUObF2vNKCImisB0yaSFeI6KnQth5OE6X1vpoI30NCbD7vD9iRBbAxACMmHdnPW9BI/ChfK6k3G53g5DO405f38xGcUJDAtJCbCCiZ0NvXmvPK5l3Q+loPV1KSrszzQ1kmPll1/Oeq9enLgHF8PanUIR3OuH73QdyuT8uFafDdtjACb5vR2uwRZ73gan1wua6BCgp3yruuYGe1dqYNy5F5wOblJRPAtgYsnGTNmZVLZtrElA81dm3HxxsjowcNaqrXUFOq0gtBkuHQxFjHxxnaq1TZG0Cyt4+AQtbEd4qKdcRsISBvXCcV7XWf7bK+QCnGDZ/GsLdrI2x0WNFq01AOn0UzJOLPfZqY+4crKFKyrUAXhxYpIhWuK67ZbC41forIfaC6I7is1+1MTdGJkBKOckBfg8Zusx13fcGY6iS8hkAr5Rg+H5G53J6MLi1+iopVwN4PXieYL75gOf9Ui5fdQRk0umlzLwtEPaBscaYf+IaWm5MEed5bcxLcTEb9esW4voC0W8huTXamPDi2P+oKgFKym8B2IQE7JneNWZ2I4U134QQK0Fkd5Nwq2pMXB21+qWlPEbArUVH92er+FGLAB4AZX5Ue977cYxTQjwOotI5zrxce947cfCa7WMXXAD29NrftDEV/lb8YVPXfjI5sDKT70/J5nLHmlYuxCMgKlk3mGip67ofNIsVVz6dTncR86Ggv5PPTyhPuVcQIKWc5QADKaYC8+hqObx6RikhHgZRuaOL4mZt4hJw+/TpY/OJxN9Bfx+YbYzZH8arIECVvblqw6aB84tA9FFYhokWuK67O64jcfsVg6J8velcSYCUduuwW4hdIXuzxoyJaoCSciGAT0rkmVu7zRHtg+//GHX7VFLaDHSQct+ojVlTfwRI+RWAe/qFiI5p150ShQAl5XwAn0WRHbQM0Xbtukui4IR3AgBfa2Pu7SgCVGlEG4mAYTUFMlKe4Qs3T7ZFmALDaBG0Hisp68Y0w3obFEJclSDqbWobHE6BUCaVmsyOM5AYjRQIRRk2UVbffpyLHAqnhVhORG8H9kYKhYsEDIvDkJLS3g2IYkwT/TA0HI7DqVRqXNJxwqU20Y/DwyEhkhZiFRG9GQz/phIi/dOgk1NixXWgJCXeeUnRC8VOnZsWrzYK7CmxYy5GLAHVrsbgOJl25PKjxhb15LpTqXEFx3FbdjVmlVVcjgItuSNohcPlGCqd7gHzfcH/g74ctUA1rse3ZD1vRTuciIuppLS3wOE0e2uux61B1Qok4iZL4zpYr19GyvsZ+Dwk07oCiQC0WokMHOcarfVf7XAqKqYSoiIH2fISmRAJlUVSF7FUJiPELiZ6IExW24qkQiRUK5PbAaL1QzUaulOpawtE20CkykZKe8vkAmUdXSgZkNDRpbID06GTi6UHRkInl8uHF6CO/WCiIhzt1E9mqgUuHfnRVL0IruM+m4sazl5MuYa1whfTuKHQfZmAoWD5UtbxPw6Pum6CDZJRAAAAAElFTkSuQmCC">
|
||||
</a>
|
||||
<figure class="forrestgump">
|
||||
<figcaption>
|
||||
<h1>404<br>Not Found!</h1>
|
||||
<h3>Life was like a journey on the sea, you never know what you're going to get.</h3>
|
||||
<h3>亲,获取不到该路径的页面呢,请检查一下哦,可能你还需要仔细阅读 <a href="https://hexo.io/docs/">Hexo</a> 和 <a
|
||||
href="https://shen-yu.gitee.io/2019/ayer/">Ayer</a> 的说明文档~</h3>
|
||||
</figcaption>
|
||||
<img src="https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/img/404.jpg">
|
||||
</figure>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<body>
|
||||
<div class="notfound">
|
||||
<a class="notfound-link" href="/">
|
||||
<img
|
||||
width="40"
|
||||
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAGq0lEQVR4Xu1bXahUVRT+1pnxvRexNIT8iYz+SBOuzt6zx5uaWQ9FJulDSillaUpaUUZK2Q9ZaZYlSWmUVjeKyjAFnX32GTRSIaISMqVIr0gP+X5nzop9nXM583/m3Jmr3HHDvMxZ+1trfWf/rL32OoQOb9Th/uMyAZdHwBAyMGPatPH5ZHK8wzwOROMB2J9tJ8F80ic6lcznTx48dOjkUJnV1inQLcRNBaJZBMxkYFaTTn1HRHsKzJ4x5niTfSOLt5wApdQt8P1FALoB3BDZknqCRMfA7MFxdmqtf24JZhGkZQRIKSc6wDIAjwEY0chIAnqZ6CwzEwGjAVzZqA+APgDv+sBWY8yJCPINRQZNwIyurjGFZHIZEVnnr6ih0WPmHof5UJ6o1/O8s+Vy8+bNS/zX2zumL5kcA99XRHQ3gK4aeOeZeWsin9968PDhMw29rCMwKAKUUlPg+x8DmFShg/kHBvYXmL/J5XKn4hiplJrAzHOIeQ4A+ytvJ4h5edbz9sXBt31iEzBDSukDBwAky5QfIWBT1phdcY2q1i8j5QIGVgK4rex5AcBD2pidcfTFIiAjxFwm2lOm8DSATSNHjdrU09NjjWp5s9Pk33PnLAn2d3WZgpXamM3NKm2aACXlCwDWlSgi+jJRKDx9IOZQb9ZopdR1xalXPhrWa2NKbWsA3hQBSson7Fsuw1yrjdnQrBOtkFdSHgSQCWMR811Zz/s+Kn5kApSUDwLYUaIMmJ815ouoytohlxHiQyZaHMZ2gPRBY0wUfZEIyAgxm4ksq4kBUObF2vNKCImisB0yaSFeI6KnQth5OE6X1vpoI30NCbD7vD9iRBbAxACMmHdnPW9BI/ChfK6k3G53g5DO405f38xGcUJDAtJCbCCiZ0NvXmvPK5l3Q+loPV1KSrszzQ1kmPll1/Oeq9enLgHF8PanUIR3OuH73QdyuT8uFafDdtjACb5vR2uwRZ73gan1wua6BCgp3yruuYGe1dqYNy5F5wOblJRPAtgYsnGTNmZVLZtrElA81dm3HxxsjowcNaqrXUFOq0gtBkuHQxFjHxxnaq1TZG0Cyt4+AQtbEd4qKdcRsISBvXCcV7XWf7bK+QCnGDZ/GsLdrI2x0WNFq01AOn0UzJOLPfZqY+4crKFKyrUAXhxYpIhWuK67ZbC41forIfaC6I7is1+1MTdGJkBKOckBfg8Zusx13fcGY6iS8hkAr5Rg+H5G53J6MLi1+iopVwN4PXieYL75gOf9Ui5fdQRk0umlzLwtEPaBscaYf+IaWm5MEed5bcxLcTEb9esW4voC0W8huTXamPDi2P+oKgFKym8B2IQE7JneNWZ2I4U134QQK0Fkd5Nwq2pMXB21+qWlPEbArUVH92er+FGLAB4AZX5Ue977cYxTQjwOotI5zrxce947cfCa7WMXXAD29NrftDEV/lb8YVPXfjI5sDKT70/J5nLHmlYuxCMgKlk3mGip67ofNIsVVz6dTncR86Ggv5PPTyhPuVcQIKWc5QADKaYC8+hqObx6RikhHgZRuaOL4mZt4hJw+/TpY/OJxN9Bfx+YbYzZH8arIECVvblqw6aB84tA9FFYhokWuK67O64jcfsVg6J8velcSYCUduuwW4hdIXuzxoyJaoCSciGAT0rkmVu7zRHtg+//GHX7VFLaDHSQct+ojVlTfwRI+RWAe/qFiI5p150ShQAl5XwAn0WRHbQM0Xbtukui4IR3AgBfa2Pu7SgCVGlEG4mAYTUFMlKe4Qs3T7ZFmALDaBG0Hisp68Y0w3obFEJclSDqbWobHE6BUCaVmsyOM5AYjRQIRRk2UVbffpyLHAqnhVhORG8H9kYKhYsEDIvDkJLS3g2IYkwT/TA0HI7DqVRqXNJxwqU20Y/DwyEhkhZiFRG9GQz/phIi/dOgk1NixXWgJCXeeUnRC8VOnZsWrzYK7CmxYy5GLAHVrsbgOJl25PKjxhb15LpTqXEFx3FbdjVmlVVcjgItuSNohcPlGCqd7gHzfcH/g74ctUA1rse3ZD1vRTuciIuppLS3wOE0e2uux61B1Qok4iZL4zpYr19GyvsZ+Dwk07oCiQC0WokMHOcarfVf7XAqKqYSoiIH2fISmRAJlUVSF7FUJiPELiZ6IExW24qkQiRUK5PbAaL1QzUaulOpawtE20CkykZKe8vkAmUdXSgZkNDRpbID06GTi6UHRkInl8uHF6CO/WCiIhzt1E9mqgUuHfnRVL0IruM+m4sazl5MuYa1whfTuKHQfZmAoWD5UtbxPw6Pum6CDZJRAAAAAElFTkSuQmCC"
|
||||
/>
|
||||
</a>
|
||||
<figure class="forrestgump">
|
||||
<figcaption>
|
||||
<h1>404<br />Not Found!</h1>
|
||||
<h3>
|
||||
Please check it, Maybe you should read
|
||||
<a href="https://hexo.io/docs/">Hexo</a> and
|
||||
<a href="https://github.com/Shen-Yu/hexo-theme-ayer">Ayer</a> Docs
|
||||
carefully.
|
||||
</h3>
|
||||
<h3>
|
||||
<a href="https://hexo.io/docs/">Hexo</a> 和
|
||||
<a href="https://shen-yu.gitee.io/2019/ayer/">Ayer</a> 的说明文档~
|
||||
</h3>
|
||||
</figcaption>
|
||||
<img src="https://tvax4.sinaimg.cn/large/9156bd04ly1gzofhomcm4j20zk0p5jrw.jpg" />
|
||||
</figure>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -25,7 +25,12 @@ if hexo-config('mouse.enable')
|
||||
@media(max-width: 768px)
|
||||
.tocbot
|
||||
display none !important
|
||||
.content
|
||||
.sidebar
|
||||
left 0
|
||||
&.on
|
||||
transform translateX($aside-width)
|
||||
left - $aside-width
|
||||
.content
|
||||
transform translateX($aside-width)
|
||||
&.on
|
||||
transform translateX(0)
|
||||
|
||||
|
1816
source/css/fonts/remixicon.css
Normal file
BIN
source/css/fonts/remixicon.eot
Normal file
5329
source/css/fonts/remixicon.svg
Normal file
After Width: | Height: | Size: 868 KiB |
BIN
source/css/fonts/remixicon.ttf
Normal file
BIN
source/css/fonts/remixicon.woff
Normal file
BIN
source/css/fonts/remixicon.woff2
Normal file
2
source/dist/main.css
vendored
10
source/dist/main.js
vendored
@@ -1,9 +1 @@
|
||||
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"MiQR":[function(require,module,exports) {
|
||||
|
||||
},{}],"jSg4":[function(require,module,exports) {
|
||||
!function(e){var o=e(".search-form-wrap"),a=!1;e(".nav-item-search").click(function(){var s;a||(a=!0,o.addClass("on"),s=function(){e(".local-search-input").focus()},setTimeout(function(){a=!1,s&&s()},200))}),e(document).mouseup(function(a){var s=e(".local-search");s.is(a.target)||0!==s.has(a.target).length||o.removeClass("on")}),e(".local-search").size()&&e.getScript("/js/search.js",function(){searchFunc("/search.xml","local-search-input","local-search-result")});var s;e(".share-outer").click(function(){return e(".share-wrap").fadeToggle()}),e("img.lazy").lazyload({effect:"fadeIn"}),e("#gallery").justifiedGallery({rowHeight:200,margins:5}),e(document).ready(function(e){e(".anchor").click(function(o){o.preventDefault(),e("main").animate({scrollTop:e(".cover").height()},"smooth")})}),(s=e("#totop")).hide(),e(".content").scroll(function(){e(".content").scrollTop()>1e3?e(s).stop().fadeTo(200,.6):e(s).stop().fadeTo(200,0)}),e(s).click(function(){return e(".content").animate({scrollTop:0},1e3),!1});var n=e(".content"),r=e(".sidebar");e(".navbar-toggle").on("click",function(){e(".content,.sidebar").addClass("anim"),n.toggleClass("on"),r.toggleClass("on")}),e("#reward-btn").click(function(){e("#reward").fadeIn(150),e("#mask").fadeIn(150)}),e("#reward .close, #mask").click(function(){e("#mask").fadeOut(100),e("#reward").fadeOut(100)}),1==sessionStorage.getItem("darkmode")?(e("body").addClass("darkmode"),e("#todark i").removeClass("ri-moon-line").addClass("ri-sun-line")):(e("body").removeClass("darkmode"),e("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line")),e("#todark").click(function(){1==sessionStorage.getItem("darkmode")?(e("body").removeClass("darkmode"),e("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line"),sessionStorage.removeItem("darkmode")):(e("body").addClass("darkmode"),e("#todark i").removeClass("ri-moon-line").addClass("ri-sun-line"),sessionStorage.setItem("darkmode",1))});console.log("%c%s%c%s%c%s","background-color: #49b1f5; color: #fff; padding: 8px; font-size: 14px;","主题不错?⭐star 支持一下 ->","background-color: #ffbca2; padding: 8px; font-size: 14px;","https://github.com/Shen-Yu/hexo-theme-ayer","background-color: #eaf8ff;","\n\n _ __ _______ _____ \n / \\ \\ \\ / / ____| _ \\ \n / _ \\ \\ V /| _| | |_) | \n / ___ \\ | | | |___| _ < \n /_/ \\_\\ _| |_____|_| \\__\\ \n"),document.write('<script type="text/javascript" src="https://js.users.51.la/20544303.js"><\/script>')}(jQuery);
|
||||
},{}],"BNiz":[function(require,module,exports) {
|
||||
function e(e,t){e=e.replace(/<%-sUrl%>/g,encodeURIComponent(t.sUrl)).replace(/<%-sTitle%>/g,t.sTitle).replace(/<%-sDesc%>/g,t.sDesc).replace(/<%-sPic%>/g,encodeURIComponent(t.sPic));window.open(e)}function t(){$(".wx-share-modal").addClass("in ready"),$("#share-mask").show()}function s(){$(".wx-share-modal").removeClass("in ready"),$("#share-mask").hide()}function r(s,r){"weibo"===s?e("http://service.weibo.com/share/share.php?url=<%-sUrl%>&title=<%-sTitle%>&pic=<%-sPic%>",r):"qq"===s?e("http://connect.qq.com/widget/shareqq/index.html?url=<%-sUrl%>&title=<%-sTitle%>&source=<%-sDesc%>",r):"douban"===s?e("https://www.douban.com/share/service?image=<%-sPic%>&href=<%-sUrl%>&name=<%-sTitle%>&text=<%-sDesc%>",r):"qzone"===s?e("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=<%-sUrl%>&title=<%-sTitle%>&pics=<%-sPic%>&summary=<%-sDesc%>",r):"facebook"===s?e("https://www.facebook.com/sharer/sharer.php?u=<%-sUrl%>",r):"twitter"===s?e("https://twitter.com/intent/tweet?text=<%-sTitle%>&url=<%-sUrl%>&via=<%-config.url%>",r):"google"===s?e("https://plus.google.com/share?url=<%-sUrl%>",r):"weixin"===s&&t()}var c=function(){var e=document.querySelectorAll(".share-sns");if(e&&0!==e.length){var t=window.location.href,c=document.querySelector("title").innerHTML,o=document.querySelectorAll(".article-entry img").length?document.querySelector(".article-entry img").getAttribute("src"):"";""===o||/^(http:|https:)?\/\//.test(o)||(o=window.location.origin+o),e.forEach(function(e){e.onclick=function(s){r(e.getAttribute("data-type"),{sUrl:t,sPic:o,sTitle:c,sDesc:c})}}),document.querySelector("#mask").onclick=s,document.querySelector(".modal-close").onclick=s}};c();
|
||||
},{}],"epB2":[function(require,module,exports) {
|
||||
"use strict";require("./css/style.styl"),require("./js/ayer"),require("./js/share");
|
||||
},{"./css/style.styl":"MiQR","./js/ayer":"jSg4","./js/share":"BNiz"}]},{},["epB2"], null)
|
||||
!function(){"use strict";var e;function o(){$(".wx-share-modal").removeClass("in ready"),$("#share-mask").hide()}!function(e){let o=e(".search-form-wrap"),t=!1;e(".nav-item-search").on("click",(()=>{var n;t||(t=!0,o.addClass("on"),n=function(){e(".local-search-input").focus()},setTimeout((function(){t=!1,n&&n()}),200))})),e(document).on("mouseup",(t=>{const n=e(".local-search");n.is(t.target)||0!==n.has(t.target).length||o.removeClass("on")})),e(".local-search").length&&e.getScript("/js/search.js",(function(){searchFunc("/search.xml","local-search-input","local-search-result")})),e(".share-outer").on("click",(()=>e(".share-wrap").fadeToggle())),e("img.lazy").lazyload({effect:"fadeIn"}),e("#gallery").justifiedGallery({rowHeight:200,margins:5}),e(document).ready((function(e){e(".anchor").on("click",(function(o){o.preventDefault(),e("main").animate({scrollTop:e(".cover").height()},"smooth")}))})),(()=>{const o=e("#totop");o.hide(),e(".content").on("scroll",(()=>{e(".content").scrollTop()>1e3?e(o).stop().fadeTo(200,.6):e(o).stop().fadeTo(200,0)})),e(o).on("click",(()=>(e(".content").animate({scrollTop:0},1e3),!1)))})(),e(".article-entry").each((function(o){e(this).find("img").each((function(){if(e(this).parent().is("a"))return;const{alt:o}=this;o&&e(this).after('<span class="caption">'+o+"</span>")}))}));const n=e(".content"),a=e(".sidebar");e(".navbar-toggle").on("click",(()=>{e(".content,.sidebar").addClass("anim"),n.toggleClass("on"),a.toggleClass("on")})),e("#reward-btn").on("click",(()=>{e("#reward").fadeIn(150),e("#mask").fadeIn(150)})),e("#reward .close, #mask").on("click",(()=>{e("#mask").fadeOut(100),e("#reward").fadeOut(100)})),1==sessionStorage.getItem("darkmode")?(e("body").addClass("darkmode"),e("#todark i").removeClass("ri-moon-line").addClass("ri-sun-line")):(e("body").removeClass("darkmode"),e("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line")),e("#todark").on("click",(()=>{1==sessionStorage.getItem("darkmode")?(e("body").removeClass("darkmode"),e("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line"),sessionStorage.removeItem("darkmode")):(e("body").addClass("darkmode"),e("#todark i").removeClass("ri-moon-line").addClass("ri-sun-line"),sessionStorage.setItem("darkmode",1))}));console.log("%c%s%c%s%c%s","background-color: #49b1f5; color: #fff; padding: 8px; font-size: 14px;","","background-color: #ffbca2; padding: 8px; font-size: 14px;","https://github.com/alkyl1978/hexo-theme-ayer","background-color: #eaf8ff;","\n\n _ __ _______ _____ \n / \\ \\ \\ / / ____| _ \\ \n / _ \\ \\ V /| _| | |_) | \n / ___ \\ | | | |___| _ < \n /_/ \\_\\ _| |_____|_| \\__\\ \n")}(jQuery),e={id:"JGjrOr2rebvP6q2a",ck:"JGjrOr2rebvP6q2a"},function(o){var t=window,n=document,a=e,s="".concat("https:"===n.location.protocol?"https://":"http://","sdk.51.la/js-sdk-pro.min.js"),r=n.createElement("script"),c=n.getElementsByTagName("script")[0];r.type="text/javascript",r.setAttribute("charset","UTF-8"),r.async=!0,r.src=s,r.id="LA_COLLECT",a.d=r;var l=function(){t.LA.ids.push(a)};t.LA?t.LA.ids&&l():(t.LA=e,t.LA.ids=[],l()),c.parentNode.insertBefore(r,c)}(),"google"===type&&function(e,o){e=e.replace(/<%-sUrl%>/g,encodeURIComponent(o.sUrl)).replace(/<%-sTitle%>/g,encodeURIComponent(o.sTitle)).replace(/<%-sDesc%>/g,encodeURIComponent(o.sDesc)).replace(/<%-sPic%>/g,encodeURIComponent(o.sPic)),window.open(e)}("https://plus.google.com/share?url=<%-sUrl%>",opts);(()=>{let e=document.querySelectorAll(".share-sns");if(!e||0===e.length)return;document.querySelector("title").innerHTML;let t=document.querySelectorAll(".article-entry img").length?document.querySelector(".article-entry img").getAttribute("src"):"";""===t||/^(http:|https:)?\/\//.test(t)||(t=window.location.origin+t),e.forEach((e=>{e.onclick=o=>{e.getAttribute("data-type")}})),document.querySelector("#mask").onclick=o,document.querySelector(".modal-close").onclick=o})()}();
|
||||
|
BIN
source/images/beian.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
source/images/gitee.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
source/images/github.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
source/images/hexo-tag-chart.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
source/images/hexo.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
@@ -18,134 +18,134 @@ let pointerX = 0;
|
||||
let pointerY = 0;
|
||||
|
||||
let tap =
|
||||
"ontouchstart" in window || navigator.msMaxTouchPoints
|
||||
? "touchstart"
|
||||
: "mousedown";
|
||||
"ontouchstart" in window || navigator.msMaxTouchPoints
|
||||
? "touchstart"
|
||||
: "mousedown";
|
||||
|
||||
// sea blue
|
||||
let colors = ["127, 180, 226", "157, 209, 243", "204, 229, 255"];
|
||||
|
||||
function setCanvasSize() {
|
||||
canvasEl.width = window.innerWidth;
|
||||
canvasEl.height = window.innerHeight;
|
||||
canvasEl.style.width = window.innerWidth + "px";
|
||||
canvasEl.style.height = window.innerHeight + "px";
|
||||
canvasEl.width = window.innerWidth;
|
||||
canvasEl.height = window.innerHeight;
|
||||
canvasEl.style.width = window.innerWidth + "px";
|
||||
canvasEl.style.height = window.innerHeight + "px";
|
||||
}
|
||||
|
||||
function updateCoords(e) {
|
||||
pointerX = e.clientX || e.touches[0].clientX;
|
||||
pointerY = e.clientY || e.touches[0].clientY;
|
||||
pointerX = e.clientX || e.touches[0].clientX;
|
||||
pointerY = e.clientY || e.touches[0].clientY;
|
||||
}
|
||||
|
||||
function setParticuleDirection(p) {
|
||||
let angle = (anime.random(0, 360) * Math.PI) / 180;
|
||||
let value = anime.random(minDiffuseRadius, maxDiffuseRadius);
|
||||
let radius = [-1, 1][anime.random(0, 1)] * value;
|
||||
return {
|
||||
x: p.x + radius * Math.cos(angle),
|
||||
y: p.y + radius * Math.sin(angle)
|
||||
};
|
||||
let angle = (anime.random(0, 360) * Math.PI) / 180;
|
||||
let value = anime.random(minDiffuseRadius, maxDiffuseRadius);
|
||||
let radius = [-1, 1][anime.random(0, 1)] * value;
|
||||
return {
|
||||
x: p.x + radius * Math.cos(angle),
|
||||
y: p.y + radius * Math.sin(angle),
|
||||
};
|
||||
}
|
||||
|
||||
function createParticule(x, y) {
|
||||
let p = {};
|
||||
p.x = x;
|
||||
p.y = y;
|
||||
p.color =
|
||||
"rgba(" +
|
||||
colors[anime.random(0, colors.length - 1)] +
|
||||
"," +
|
||||
anime.random(0.2, 0.8) +
|
||||
")";
|
||||
p.radius = anime.random(minCircleRadius, maxCircleRadius);
|
||||
p.endPos = setParticuleDirection(p);
|
||||
p.draw = function () {
|
||||
ctx.beginPath();
|
||||
ctx.arc(p.x, p.y, p.radius, 0, 2 * Math.PI, true);
|
||||
ctx.fillStyle = p.color;
|
||||
ctx.fill();
|
||||
};
|
||||
return p;
|
||||
let p = {};
|
||||
p.x = x;
|
||||
p.y = y;
|
||||
p.color =
|
||||
"rgba(" +
|
||||
colors[anime.random(0, colors.length - 1)] +
|
||||
"," +
|
||||
anime.random(0.2, 0.8) +
|
||||
")";
|
||||
p.radius = anime.random(minCircleRadius, maxCircleRadius);
|
||||
p.endPos = setParticuleDirection(p);
|
||||
p.draw = function () {
|
||||
ctx.beginPath();
|
||||
ctx.arc(p.x, p.y, p.radius, 0, 2 * Math.PI, true);
|
||||
ctx.fillStyle = p.color;
|
||||
ctx.fill();
|
||||
};
|
||||
return p;
|
||||
}
|
||||
|
||||
function createCircle(x, y) {
|
||||
let p = {};
|
||||
p.x = x;
|
||||
p.y = y;
|
||||
p.color = "#000";
|
||||
p.radius = 0.1;
|
||||
p.alpha = 0.5;
|
||||
p.lineWidth = 6;
|
||||
p.draw = function () {
|
||||
ctx.globalAlpha = p.alpha;
|
||||
ctx.beginPath();
|
||||
ctx.arc(p.x, p.y, p.radius, 0, 2 * Math.PI, true);
|
||||
ctx.lineWidth = p.lineWidth;
|
||||
ctx.strokeStyle = p.color;
|
||||
ctx.stroke();
|
||||
ctx.globalAlpha = 1;
|
||||
};
|
||||
return p;
|
||||
let p = {};
|
||||
p.x = x;
|
||||
p.y = y;
|
||||
p.color = "#000";
|
||||
p.radius = 0.1;
|
||||
p.alpha = 0.5;
|
||||
p.lineWidth = 6;
|
||||
p.draw = function () {
|
||||
ctx.globalAlpha = p.alpha;
|
||||
ctx.beginPath();
|
||||
ctx.arc(p.x, p.y, p.radius, 0, 2 * Math.PI, true);
|
||||
ctx.lineWidth = p.lineWidth;
|
||||
ctx.strokeStyle = p.color;
|
||||
ctx.stroke();
|
||||
ctx.globalAlpha = 1;
|
||||
};
|
||||
return p;
|
||||
}
|
||||
|
||||
function renderParticule(anim) {
|
||||
for (let i = 0; i < anim.animatables.length; i++) {
|
||||
anim.animatables[i].target.draw();
|
||||
}
|
||||
for (let i = 0; i < anim.animatables.length; i++) {
|
||||
anim.animatables[i].target.draw();
|
||||
}
|
||||
}
|
||||
|
||||
function animateParticules(x, y) {
|
||||
let circle = createCircle(x, y);
|
||||
let particules = [];
|
||||
for (let i = 0; i < numberOfParticules; i++) {
|
||||
particules.push(createParticule(x, y));
|
||||
}
|
||||
anime
|
||||
.timeline()
|
||||
.add({
|
||||
targets: particules,
|
||||
x: function (p) {
|
||||
return p.endPos.x;
|
||||
},
|
||||
y: function (p) {
|
||||
return p.endPos.y;
|
||||
},
|
||||
radius: 0.1,
|
||||
duration: anime.random(minAnimeDuration, maxAnimeDuration),
|
||||
easing: "easeOutExpo",
|
||||
update: renderParticule
|
||||
})
|
||||
.add({
|
||||
targets: circle,
|
||||
radius: anime.random(minOrbitRadius, maxOrbitRadius),
|
||||
lineWidth: 0,
|
||||
alpha: {
|
||||
value: 0,
|
||||
easing: "linear",
|
||||
duration: anime.random(600, 800)
|
||||
},
|
||||
duration: anime.random(1200, 1800),
|
||||
easing: "easeOutExpo",
|
||||
update: renderParticule,
|
||||
offset: 0
|
||||
});
|
||||
let circle = createCircle(x, y);
|
||||
let particules = [];
|
||||
for (let i = 0; i < numberOfParticules; i++) {
|
||||
particules.push(createParticule(x, y));
|
||||
}
|
||||
anime
|
||||
.timeline()
|
||||
.add({
|
||||
targets: particules,
|
||||
x: function (p) {
|
||||
return p.endPos.x;
|
||||
},
|
||||
y: function (p) {
|
||||
return p.endPos.y;
|
||||
},
|
||||
radius: 0.1,
|
||||
duration: anime.random(minAnimeDuration, maxAnimeDuration),
|
||||
easing: "easeOutExpo",
|
||||
update: renderParticule,
|
||||
})
|
||||
.add({
|
||||
targets: circle,
|
||||
radius: anime.random(minOrbitRadius, maxOrbitRadius),
|
||||
lineWidth: 0,
|
||||
alpha: {
|
||||
value: 0,
|
||||
easing: "linear",
|
||||
duration: anime.random(600, 800),
|
||||
},
|
||||
duration: anime.random(1200, 1800),
|
||||
easing: "easeOutExpo",
|
||||
update: renderParticule,
|
||||
offset: 0,
|
||||
});
|
||||
}
|
||||
|
||||
let render = anime({
|
||||
duration: Infinity,
|
||||
update: function () {
|
||||
ctx.clearRect(0, 0, canvasEl.width, canvasEl.height);
|
||||
}
|
||||
duration: Infinity,
|
||||
update: function () {
|
||||
ctx.clearRect(0, 0, canvasEl.width, canvasEl.height);
|
||||
},
|
||||
});
|
||||
|
||||
document.addEventListener(
|
||||
tap,
|
||||
function (e) {
|
||||
render.play();
|
||||
updateCoords(e);
|
||||
animateParticules(pointerX, pointerY);
|
||||
},
|
||||
false
|
||||
tap,
|
||||
function (e) {
|
||||
render.play();
|
||||
updateCoords(e);
|
||||
animateParticules(pointerX, pointerY);
|
||||
},
|
||||
false
|
||||
);
|
||||
|
||||
setCanvasSize();
|
||||
|
@@ -1,154 +1,180 @@
|
||||
class Circle {
|
||||
constructor({ origin, speed, color, angle, context }) {
|
||||
this.origin = origin
|
||||
this.position = { ...this.origin }
|
||||
this.color = color
|
||||
this.speed = speed
|
||||
this.angle = angle
|
||||
this.context = context
|
||||
this.renderCount = 0
|
||||
}
|
||||
|
||||
draw() {
|
||||
this.context.fillStyle = this.color
|
||||
this.context.beginPath()
|
||||
this.context.arc(this.position.x, this.position.y, 2, 0, Math.PI * 2)
|
||||
this.context.fill()
|
||||
}
|
||||
|
||||
move() {
|
||||
this.position.x = (Math.sin(this.angle) * this.speed) + this.position.x
|
||||
this.position.y = (Math.cos(this.angle) * this.speed) + this.position.y + (this.renderCount * 0.3)
|
||||
this.renderCount++
|
||||
constructor({ origin, speed, color, angle, context }) {
|
||||
this.origin = origin;
|
||||
this.position = { ...this.origin };
|
||||
this.color = color;
|
||||
this.speed = speed;
|
||||
this.angle = angle;
|
||||
this.context = context;
|
||||
this.renderCount = 0;
|
||||
}
|
||||
|
||||
draw() {
|
||||
this.context.fillStyle = this.color;
|
||||
this.context.beginPath();
|
||||
this.context.arc(this.position.x, this.position.y, 2, 0, Math.PI * 2);
|
||||
this.context.fill();
|
||||
}
|
||||
|
||||
move() {
|
||||
this.position.x = Math.sin(this.angle) * this.speed + this.position.x;
|
||||
this.position.y =
|
||||
Math.cos(this.angle) * this.speed +
|
||||
this.position.y +
|
||||
this.renderCount * 0.3;
|
||||
this.renderCount++;
|
||||
}
|
||||
}
|
||||
|
||||
class Boom {
|
||||
constructor({ origin, context, circleCount = 10, area }) {
|
||||
this.origin = origin;
|
||||
this.context = context;
|
||||
this.circleCount = circleCount;
|
||||
this.area = area;
|
||||
this.stop = false;
|
||||
this.circles = [];
|
||||
}
|
||||
|
||||
randomArray(range) {
|
||||
const length = range.length;
|
||||
const randomIndex = Math.floor(length * Math.random());
|
||||
return range[randomIndex];
|
||||
}
|
||||
|
||||
randomColor() {
|
||||
const range = ["8", "9", "A", "B", "C", "D", "E", "F"];
|
||||
return (
|
||||
"#" +
|
||||
this.randomArray(range) +
|
||||
this.randomArray(range) +
|
||||
this.randomArray(range) +
|
||||
this.randomArray(range) +
|
||||
this.randomArray(range) +
|
||||
this.randomArray(range)
|
||||
);
|
||||
}
|
||||
|
||||
randomRange(start, end) {
|
||||
return (end - start) * Math.random() + start;
|
||||
}
|
||||
|
||||
init() {
|
||||
for (let i = 0; i < this.circleCount; i++) {
|
||||
const circle = new Circle({
|
||||
context: this.context,
|
||||
origin: this.origin,
|
||||
color: this.randomColor(),
|
||||
angle: this.randomRange(Math.PI - 1, Math.PI + 1),
|
||||
speed: this.randomRange(1, 6),
|
||||
});
|
||||
this.circles.push(circle);
|
||||
}
|
||||
}
|
||||
|
||||
class Boom {
|
||||
constructor ({ origin, context, circleCount = 10, area }) {
|
||||
this.origin = origin
|
||||
this.context = context
|
||||
this.circleCount = circleCount
|
||||
this.area = area
|
||||
this.stop = false
|
||||
this.circles = []
|
||||
}
|
||||
|
||||
randomArray(range) {
|
||||
const length = range.length
|
||||
const randomIndex = Math.floor(length * Math.random())
|
||||
return range[randomIndex]
|
||||
}
|
||||
|
||||
randomColor() {
|
||||
const range = ['8', '9', 'A', 'B', 'C', 'D', 'E', 'F']
|
||||
return '#' + this.randomArray(range) + this.randomArray(range) + this.randomArray(range) + this.randomArray(range) + this.randomArray(range) + this.randomArray(range)
|
||||
}
|
||||
|
||||
randomRange(start, end) {
|
||||
return (end - start) * Math.random() + start
|
||||
}
|
||||
|
||||
init() {
|
||||
for(let i = 0; i < this.circleCount; i++) {
|
||||
const circle = new Circle({
|
||||
context: this.context,
|
||||
origin: this.origin,
|
||||
color: this.randomColor(),
|
||||
angle: this.randomRange(Math.PI - 1, Math.PI + 1),
|
||||
speed: this.randomRange(1, 6)
|
||||
})
|
||||
this.circles.push(circle)
|
||||
|
||||
move() {
|
||||
this.circles.forEach((circle, index) => {
|
||||
if (
|
||||
circle.position.x > this.area.width ||
|
||||
circle.position.y > this.area.height
|
||||
) {
|
||||
return this.circles.splice(index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
move() {
|
||||
this.circles.forEach((circle, index) => {
|
||||
if (circle.position.x > this.area.width || circle.position.y > this.area.height) {
|
||||
return this.circles.splice(index, 1)
|
||||
}
|
||||
circle.move()
|
||||
})
|
||||
if (this.circles.length == 0) {
|
||||
this.stop = true
|
||||
}
|
||||
}
|
||||
|
||||
draw() {
|
||||
this.circles.forEach(circle => circle.draw())
|
||||
circle.move();
|
||||
});
|
||||
if (this.circles.length == 0) {
|
||||
this.stop = true;
|
||||
}
|
||||
}
|
||||
|
||||
class CursorSpecialEffects {
|
||||
constructor() {
|
||||
this.computerCanvas = document.createElement('canvas')
|
||||
this.renderCanvas = document.createElement('canvas')
|
||||
|
||||
this.computerContext = this.computerCanvas.getContext('2d')
|
||||
this.renderContext = this.renderCanvas.getContext('2d')
|
||||
|
||||
this.globalWidth = window.innerWidth
|
||||
this.globalHeight = window.innerHeight
|
||||
|
||||
this.booms = []
|
||||
this.running = false
|
||||
}
|
||||
|
||||
handleMouseDown(e) {
|
||||
const boom = new Boom({
|
||||
origin: { x: e.clientX, y: e.clientY },
|
||||
context: this.computerContext,
|
||||
area: {
|
||||
width: this.globalWidth,
|
||||
height: this.globalHeight
|
||||
}
|
||||
})
|
||||
boom.init()
|
||||
this.booms.push(boom)
|
||||
this.running || this.run()
|
||||
}
|
||||
|
||||
handlePageHide() {
|
||||
this.booms = []
|
||||
this.running = false
|
||||
}
|
||||
|
||||
init() {
|
||||
const style = this.renderCanvas.style
|
||||
style.position = 'fixed'
|
||||
style.top = style.left = 0
|
||||
style.zIndex = '99999'
|
||||
style.pointerEvents = 'none'
|
||||
|
||||
style.width = this.renderCanvas.width = this.computerCanvas.width = this.globalWidth
|
||||
style.height = this.renderCanvas.height = this.computerCanvas.height = this.globalHeight
|
||||
|
||||
document.body.append(this.renderCanvas)
|
||||
|
||||
window.addEventListener('mousedown', this.handleMouseDown.bind(this))
|
||||
window.addEventListener('pagehide', this.handlePageHide.bind(this))
|
||||
}
|
||||
|
||||
run() {
|
||||
this.running = true
|
||||
if (this.booms.length == 0) {
|
||||
return this.running = false
|
||||
}
|
||||
|
||||
requestAnimationFrame(this.run.bind(this))
|
||||
|
||||
this.computerContext.clearRect(0, 0, this.globalWidth, this.globalHeight)
|
||||
this.renderContext.clearRect(0, 0, this.globalWidth, this.globalHeight)
|
||||
|
||||
this.booms.forEach((boom, index) => {
|
||||
if (boom.stop) {
|
||||
return this.booms.splice(index, 1)
|
||||
}
|
||||
boom.move()
|
||||
boom.draw()
|
||||
})
|
||||
this.renderContext.drawImage(this.computerCanvas, 0, 0, this.globalWidth, this.globalHeight)
|
||||
}
|
||||
|
||||
draw() {
|
||||
this.circles.forEach((circle) => circle.draw());
|
||||
}
|
||||
|
||||
const cursorSpecialEffects = new CursorSpecialEffects()
|
||||
cursorSpecialEffects.init()
|
||||
}
|
||||
|
||||
class CursorSpecialEffects {
|
||||
constructor() {
|
||||
this.computerCanvas = document.createElement("canvas");
|
||||
this.renderCanvas = document.createElement("canvas");
|
||||
|
||||
this.computerContext = this.computerCanvas.getContext("2d");
|
||||
this.renderContext = this.renderCanvas.getContext("2d");
|
||||
|
||||
this.globalWidth = window.innerWidth;
|
||||
this.globalHeight = window.innerHeight;
|
||||
|
||||
this.booms = [];
|
||||
this.running = false;
|
||||
}
|
||||
|
||||
handleMouseDown(e) {
|
||||
const boom = new Boom({
|
||||
origin: { x: e.clientX, y: e.clientY },
|
||||
context: this.computerContext,
|
||||
area: {
|
||||
width: this.globalWidth,
|
||||
height: this.globalHeight,
|
||||
},
|
||||
});
|
||||
boom.init();
|
||||
this.booms.push(boom);
|
||||
this.running || this.run();
|
||||
}
|
||||
|
||||
handlePageHide() {
|
||||
this.booms = [];
|
||||
this.running = false;
|
||||
}
|
||||
|
||||
init() {
|
||||
const style = this.renderCanvas.style;
|
||||
style.position = "fixed";
|
||||
style.top = style.left = 0;
|
||||
style.zIndex = "99999";
|
||||
style.pointerEvents = "none";
|
||||
|
||||
style.width =
|
||||
this.renderCanvas.width =
|
||||
this.computerCanvas.width =
|
||||
this.globalWidth;
|
||||
style.height =
|
||||
this.renderCanvas.height =
|
||||
this.computerCanvas.height =
|
||||
this.globalHeight;
|
||||
|
||||
document.body.append(this.renderCanvas);
|
||||
|
||||
window.addEventListener("mousedown", this.handleMouseDown.bind(this));
|
||||
window.addEventListener("pagehide", this.handlePageHide.bind(this));
|
||||
}
|
||||
|
||||
run() {
|
||||
this.running = true;
|
||||
if (this.booms.length == 0) {
|
||||
return (this.running = false);
|
||||
}
|
||||
|
||||
requestAnimationFrame(this.run.bind(this));
|
||||
|
||||
this.computerContext.clearRect(0, 0, this.globalWidth, this.globalHeight);
|
||||
this.renderContext.clearRect(0, 0, this.globalWidth, this.globalHeight);
|
||||
|
||||
this.booms.forEach((boom, index) => {
|
||||
if (boom.stop) {
|
||||
return this.booms.splice(index, 1);
|
||||
}
|
||||
boom.move();
|
||||
boom.draw();
|
||||
});
|
||||
this.renderContext.drawImage(
|
||||
this.computerCanvas,
|
||||
0,
|
||||
0,
|
||||
this.globalWidth,
|
||||
this.globalHeight
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const cursorSpecialEffects = new CursorSpecialEffects();
|
||||
cursorSpecialEffects.init();
|
||||
|