This commit is contained in:
xiongxiao
2026-01-12 12:07:13 +08:00
parent a128cf2c08
commit 65056192ec
347 changed files with 42204 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.pnpm-store

0
Dockerfile Normal file
View File

7
blog/.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 20

8
blog/.gitignore vendored Normal file
View File

@@ -0,0 +1,8 @@
.DS_Store
Thumbs.db
db.json
*.log
node_modules/
public/
.deploy*/
_multiconfig.yml

1347
blog/_config.anzhiyu.yml Normal file

File diff suppressed because it is too large Load Diff

View File

110
blog/_config.yml Normal file
View File

@@ -0,0 +1,110 @@
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: 小熊猫呜呜呜
subtitle: '无尽的前进'
description: '追着风的人'
keywords:
author: abearxiong
language: zh-CN
timezone: 'Asia/Shanghai'
# URL
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
url: https://blog.xiongxiao.me
permalink: :year/:month/:day/:title/
permalink_defaults:
pretty_urls:
trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
trailing_html: true # Set to false to remove trailing '.html' from permalinks
# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link:
enable: true # Open external links in new tab
field: site # Apply to the whole site
exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
syntax_highlighter: highlight.js
highlight:
line_number: true
auto_detect: false
tab_replace: ''
wrap: true
hljs: false
prismjs:
preprocess: true
line_number: true
tab_replace: ''
# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
path: ''
per_page: 10
order_by: -date
# Category & Tag
default_category: uncategorized
category_map:
tag_map:
# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true
# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
## updated_option supports 'mtime', 'date', 'empty'
updated_option: 'mtime'
# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page
# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
# include:
# - "src"
# exclude:
# - "assets"
# ignore:
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: anzhiyu
# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
type: ''
aplayer:
meting: true
asset_inject: false

28
blog/package.json Normal file
View File

@@ -0,0 +1,28 @@
{
"name": "hexo-site",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "hexo generate",
"clean": "hexo clean",
"deploy": "hexo deploy",
"server": "hexo server"
},
"hexo": {
"version": "8.1.1"
},
"dependencies": {
"hexo": "^8.0.0",
"hexo-generator-archive": "^2.0.0",
"hexo-generator-category": "^2.0.0",
"hexo-generator-index": "^4.0.0",
"hexo-generator-tag": "^2.0.0",
"hexo-renderer-ejs": "^2.0.0",
"hexo-renderer-marked": "^7.0.0",
"hexo-renderer-pug": "^3.0.0",
"hexo-renderer-stylus": "^1.0.0",
"hexo-server": "^3.0.0",
"hexo-theme-landscape": "^1.0.0",
"hexo-util": "^4.0.0"
}
}

2218
blog/pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

4
blog/scaffolds/draft.md Normal file
View File

@@ -0,0 +1,4 @@
---
title: {{ title }}
tags:
---

4
blog/scaffolds/page.md Normal file
View File

@@ -0,0 +1,4 @@
---
title: {{ title }}
date: {{ date }}
---

5
blog/scaffolds/post.md Normal file
View File

@@ -0,0 +1,5 @@
---
title: {{ title }}
date: {{ date }}
tags:
---

View File

@@ -0,0 +1,38 @@
---
title: Hello World
---
Welcome to [Hexo](https://hexo.io/)! This is your very first post. Check [documentation](https://hexo.io/docs/) for more info. If you get any problems when using Hexo, you can find the answer in [troubleshooting](https://hexo.io/docs/troubleshooting.html) or you can ask me on [GitHub](https://github.com/hexojs/hexo/issues).
## Quick Start
### Create a new post
``` bash
$ hexo new "My New Post"
```
More info: [Writing](https://hexo.io/docs/writing.html)
### Run server
``` bash
$ hexo server
```
More info: [Server](https://hexo.io/docs/server.html)
### Generate static files
``` bash
$ hexo generate
```
More info: [Generating](https://hexo.io/docs/generating.html)
### Deploy to remote sites
``` bash
$ hexo deploy
```
More info: [Deployment](https://hexo.io/docs/one-command-deployment.html)

128
blog/source/json/music.json Normal file
View File

@@ -0,0 +1,128 @@
[
{
"name": "青花瓷",
"artist": "周杰伦",
"url": "https://npm.elemecdn.com/anzhiyu-music@1.0.4/青花瓷/青花瓷.mp3",
"cover": "https://y.qq.com/music/photo_new/T002R300x300M000002eFUFm2XYZ7z_2.jpg?max_age=2592000",
"lrc": "https://npm.elemecdn.com/anzhiyu-music@1.0.4/青花瓷/青花瓷.lrc"
},
{
"name": "稻香",
"artist": "周杰伦",
"url": "https://npm.elemecdn.com/anzhiyu-music@1.0.1/周杰伦/稻香/稻香.mp3",
"cover": "https://y.qq.com/music/photo_new/T002R300x300M000002Neh8l0uciQZ_1.jpg?max_age=2592000",
"lrc": "https://npm.elemecdn.com/anzhiyu-music@1.0.1/周杰伦/稻香/稻香.lrc"
},
{
"name": "晴天",
"artist": "周杰伦",
"url": "https://npm.elemecdn.com/anzhiyu-music@1.0.2/晴天/晴天.mp3",
"cover": "https://y.qq.com/music/photo_new/T002R300x300M000000MkMni19ClKG_3.jpg?max_age=2592000",
"lrc": "https://npm.elemecdn.com/anzhiyu-music@1.0.2/晴天/晴天.lrc"
},
{
"name": "七里香",
"artist": "周杰伦",
"url": "https://npm.elemecdn.com/anzhiyu-music@1.0.2/七里香/七里香.mp3",
"cover": "https://y.qq.com/music/photo_new/T002R300x300M000003DFRzD192KKD_1.jpg?max_age=2592000",
"lrc": "https://npm.elemecdn.com/anzhiyu-music@1.0.2/七里香/七里香.lrc"
},
{
"name": "花海",
"artist": "周杰伦",
"url": "https://npm.elemecdn.com/anzhiyu-music-jay@1.0.1/花海/花海.flac",
"cover": "https://y.qq.com/music/photo_new/T002R300x300M000002Neh8l0uciQZ_1.jpg?max_age=2592000",
"lrc": "https://npm.elemecdn.com/anzhiyu-music-jay@1.0.1/花海/花海.lrc"
},
{
"name": "反方向的钟",
"artist": "周杰伦",
"url": "https://npm.elemecdn.com/anzhiyu-music-jay@1.0.1/反方向的钟/反方向的钟.flac",
"cover": "https://y.qq.com/music/photo_new/T002R300x300M000000f01724fd7TH_1.jpg?max_age=2592000",
"lrc": "https://npm.elemecdn.com/anzhiyu-music-jay@1.0.1/反方向的钟/反方向的钟.lrc"
},
{
"name": "兰亭序",
"artist": "周杰伦",
"url": "https://npm.elemecdn.com/anzhiyu-music@1.0.1/周杰伦/兰亭序/兰亭序.mp3",
"cover": "https://y.qq.com/music/photo_new/T002R300x300M000002Neh8l0uciQZ_1.jpg?max_age=2592000",
"lrc": "https://npm.elemecdn.com/anzhiyu-music@1.0.1/周杰伦/兰亭序/兰亭序.lrc"
},
{
"name": "说好的辛福呢",
"artist": "周杰伦",
"url": "https://npm.elemecdn.com/anzhiyu-music@1.0.2/说好的辛福呢/说好的辛福呢.mp3",
"cover": "https://y.qq.com/music/photo_new/T002R300x300M000002Neh8l0uciQZ_1.jpg?max_age=2592000",
"lrc": "https://npm.elemecdn.com/anzhiyu-music@1.0.2/说好的辛福呢/说好的幸福呢.lrc"
},
{
"name": "等你下课 (with 杨瑞代)",
"artist": "周杰伦",
"url": "https://npm.elemecdn.com/anzhiyu-music@1.0.1/周杰伦/等你下课/等你下课.mp3",
"cover": "https://y.qq.com/music/photo_new/T002R300x300M000003bSL0v4bpKAx_1.jpg?max_age=2592000",
"lrc": "https://npm.elemecdn.com/anzhiyu-music@1.0.1/周杰伦/等你下课/等你下课.lrc"
},
{
"name": "我落泪情绪零碎",
"artist": "周杰伦",
"url": "https://npm.elemecdn.com/anzhiyu-music@1.0.2/我落泪情绪零碎/我落泪情绪零碎.mp3",
"cover": "https://y.qq.com/music/photo_new/T002R300x300M000000bviBl4FjTpO_1.jpg?max_age=2592000",
"lrc": "https://npm.elemecdn.com/anzhiyu-music@1.0.2/我落泪情绪零碎/我落泪情绪零碎.lrc"
},
{
"name": "听妈妈的话",
"artist": "周杰伦",
"url": "https://npm.elemecdn.com/anzhiyu-music@1.0.2/听妈妈的话/听妈妈的话.mp3",
"cover": "https://y.qq.com/music/photo_new/T002R300x300M000002jLGWe16Tf1H_1.jpg?max_age=2592000",
"lrc": "https://npm.elemecdn.com/anzhiyu-music@1.0.2/听妈妈的话/听妈妈的话.lrc"
},
{
"name": "明明就",
"artist": "周杰伦",
"url": "https://npm.elemecdn.com/anzhiyu-music-jay@1.0.1/明明就/明明就.flac",
"cover": "https://y.qq.com/music/photo_new/T002R300x300M000003Ow85E3pnoqi_1.jpg?max_age=2592000",
"lrc": "https://npm.elemecdn.com/anzhiyu-music-jay@1.0.1/明明就/明明就.lrc"
},
{
"name": "我是如此相信",
"artist": "周杰伦",
"url": "https://npm.elemecdn.com/anzhiyu-music-jay@1.0.1/我是如此相信/我是如此相信.flac",
"cover": "https://y.qq.com/music/photo_new/T002R300x300M000001hGx1Z0so1YX_1.jpg?max_age=2592000",
"lrc": "https://npm.elemecdn.com/anzhiyu-music-jay@1.0.1/我是如此相信/我是如此相信.lrc"
},
{
"name": "发如雪",
"artist": "周杰伦",
"url": "https://npm.elemecdn.com/anzhiyu-music@1.0.3/发如雪/发如雪.mp3",
"cover": "https://y.qq.com/music/photo_new/T002R300x300M0000024bjiL2aocxT_3.jpg?max_age=2592000",
"lrc": "https://npm.elemecdn.com/anzhiyu-music@1.0.3/发如雪/发如雪.lrc"
},
{
"name": "以父之名",
"artist": "周杰伦",
"url": "https://npm.elemecdn.com/anzhiyu-music@1.0.3/以父之名/以父之名.mp3",
"cover": "https://y.qq.com/music/photo_new/T002R300x300M000000MkMni19ClKG_3.jpg?max_age=2592000",
"lrc": "https://npm.elemecdn.com/anzhiyu-music@1.0.3/以父之名/以父之名.lrc"
},
{
"name": "园游会",
"artist": "周杰伦",
"url": "https://npm.elemecdn.com/anzhiyu-music@1.0.3/园游会/园游会.flac",
"cover": "https://y.qq.com/music/photo_new/T002R300x300M000003DFRzD192KKD_1.jpg?max_age=2592000",
"lrc": "https://npm.elemecdn.com/anzhiyu-music@1.0.3/园游会/园游会.lrc"
},
{
"name": "本草纲目",
"artist": "周杰伦",
"url": "https://npm.elemecdn.com/anzhiyu-music@1.0.4/本草纲目/本草纲目.mp3",
"cover": "https://y.qq.com/music/photo_new/T002R300x300M000002jLGWe16Tf1H_1.jpg?max_age=2592000",
"lrc": "https://npm.elemecdn.com/anzhiyu-music@1.0.4/本草纲目/本草纲目.lrc"
},
{
"name": "龙卷风",
"artist": "周杰伦",
"url": "https://npm.elemecdn.com/anzhiyu-music@1.0.4/龙卷风/龙卷风.mp3",
"cover": "https://y.qq.com/music/photo_new/T002R300x300M000000f01724fd7TH_1.jpg?max_age=2592000",
"lrc": "https://npm.elemecdn.com/anzhiyu-music@1.0.4/龙卷风/龙卷风.lrc"
}
]

View File

@@ -0,0 +1,9 @@
---
title: 音乐馆
date: 2026-01-12 11:58:30
type: music
aplayer: true
top_img: false
comments: false
aside: false
---

0
blog/themes/.gitkeep Normal file
View File

View File

@@ -0,0 +1,73 @@
name: Bug report
description: Create a report to help us improve
title: "[Bug]: "
body:
- type: markdown
attributes:
value: |
重要:请依照该模板来提交
Please follow the template to create a new issue
- type: input
id: anzhiyu-ver
attributes:
label: 使用的 AnZhiYu 版本? | What version of AnZhiYu are you use?
description: 检视主题的 package.json | Check the theme's package.json
validations:
required: true
- type: dropdown
id: browser
attributes:
label: 使用的浏览器? || What browse are you using?
options:
- Chrome
- Edge
- Safari
- Opera
- Other
validations:
required: true
- type: dropdown
id: modify
attributes:
label: 是否修改过主题文件? || Has the theme files been modified?
options:
- 是 (Yes)
- 不是 (No)
validations:
required: true
- type: dropdown
id: platform
attributes:
label: 使用的系统? || What operating system are you using?
options:
- Windows
- macOS
- Linux
- Android
- iOS
- Other
validations:
required: true
- type: textarea
id: description
attributes:
label: 问题描述 | Describe the bug
description: 请描述你的问题现象 | A clear and concise description of what the bug is.
placeholder: 请尽量提供截图来定位你的问题 | If applicable, add screenshots to help explain your problem
value:
validations:
required: true
- type: input
id: website
attributes:
label: 出现问题的网站 | Website
description: 请提供下可复现的网站地址 | Please supply a website url which can reproduce problem.
placeholder:
validations:
required: true

View File

@@ -0,0 +1,13 @@
blank_issues_enabled: false
contact_links:
- name: Questions about AnZhiYu
url: https://github.com/anzhiyu-c/hexo-theme-anzhiyu/discussions
about: 一些使用问题请到 Discussion 询问。 Please ask questions in Discussion.
- name: AnZhiYu Q&A
url: https://hexo.anheyu.com/comments/
about: AnZhiYu Q&A
- name: QQ群
url: https://jq.qq.com/?_wv=1027&k=v7NK7ELr
about: "群号 464636182"

View File

@@ -0,0 +1,14 @@
name: Feature request
description: Suggest an idea for this project
title: "[Feature]: "
body:
- type: textarea
id: feature-request
attributes:
label: 想要的功能 | What feature do you want?
description: 请描述你需要的新功能 | A clear and concise description of what the feature is.
placeholder:
value:
validations:
require: true

View File

@@ -0,0 +1,22 @@
name: Close need info
on:
schedule:
- cron: "0 0 */1 * *"
workflow_dispatch:
jobs:
close-need-info:
runs-on: ubuntu-latest
steps:
- name: close-issues
uses: actions-cool/issues-helper@v3
with:
actions: "close-issues"
token: ${{ secrets.GITHUB_TOKEN }}
labels: "question"
inactive-day: 60
close-reason: "not_planned"
body: |
Hello @${{ github.event.issue.user.login }}, this issue was closed due to no activities in 60 days.
你好 @${{ github.event.issue.user.login }}此issue因超过60天未回复被关闭。

View File

@@ -0,0 +1,21 @@
name: Close inactive
on:
schedule:
- cron: "0 0 */7 * *"
workflow_dispatch:
jobs:
close-inactive:
runs-on: ubuntu-latest
steps:
- name: close-issues
uses: actions-cool/issues-helper@v3
with:
actions: "close-issues"
token: ${{ secrets.GITHUB_TOKEN }}
labels: "stale"
inactive-day: 60
close-reason: "not_planned"
body: |
Hello @${{ github.event.issue.user.login }}, this issue was closed due to inactive more than 60 days. You can reopen or recreate it if you think it should continue. Thank you for your contributions again.

View File

@@ -0,0 +1,25 @@
name: Issue Duplicate
on:
issues:
types: [labeled]
jobs:
create-comment:
runs-on: ubuntu-latest
if: github.event.label.name == 'duplicate'
steps:
- name: Create comment
uses: actions-cool/issues-helper@v2
with:
actions: "create-comment"
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}, your issue is duplicated and will be closed.
你好 @${{ github.event.issue.user.login }}你的issue是重复的将被关闭。
- name: Close issue
uses: actions-cool/issues-helper@v2
with:
actions: "close-issue"
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -0,0 +1,18 @@
name: Issue Invalid
on:
issues:
types: [labeled]
jobs:
lock-issue:
runs-on: ubuntu-latest
if: github.event.label.name == 'invalid'
steps:
- name: Lock issue
uses: actions-cool/issues-helper@v2
with:
actions: "lock-issue"
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
lock-reason: "off-topic"

View File

@@ -0,0 +1,20 @@
name: Issue Question
on:
issues:
types: [labeled]
jobs:
create-comment:
runs-on: ubuntu-latest
if: github.event.label.name == 'question'
steps:
- name: Create comment
uses: actions-cool/issues-helper@v2.0.0
with:
actions: "create-comment"
token: ${{ secrets.ISSUSE_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}, please input issue by template and add detail. Issues labeled by Need More Info will be closed if no activities in 7 days.
你好 @${{ github.event.issue.user.login }}请按照issue模板填写, 并详细说明问题和复现步骤等, 60天内未回复issue自动关闭。

View File

@@ -0,0 +1,25 @@
name: Issue Wontfix
on:
issues:
types: [labeled]
jobs:
lock-issue:
runs-on: ubuntu-latest
if: github.event.label.name == 'wontfix'
steps:
- name: Create comment
uses: actions-cool/issues-helper@v3
with:
actions: "create-comment"
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}, this issue will not be worked on and will be closed.
你好 @${{ github.event.issue.user.login }},这不会被处理,将被关闭。
- name: Close issue
uses: actions-cool/issues-helper@v3
with:
actions: "close-issue"
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -0,0 +1,19 @@
name: npm publish
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

View File

@@ -0,0 +1,19 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v5
with:
days-before-issue-stale: 30
days-before-pr-stale: -1
days-before-close: 7
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
close-pr-message: 'This issue has not seen any activity since it was marked stale. Closing.'
stale-issue-label: 'Stale'
exempt-issue-labels: 'pinned,bug,enhancement,documentation,Plan'
operations-per-run: 1000

9
blog/themes/anzhiyu/.gitignore vendored Normal file
View File

@@ -0,0 +1,9 @@
.DS_Store
Thumbs.db
db.json
*.log
node_modules/
public/
.deploy*/
.deploy_git*/
.idea

674
blog/themes/anzhiyu/LICENSE Normal file
View File

@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@@ -0,0 +1,144 @@
<p align="center">
<a title="Hexo Version" target="_blank" href="https://hexo.io/zh-cn/"><img alt="Hexo Version" src="https://img.shields.io/badge/Hexo-%3E%3D%205.3.0-orange?style=flat"></a>
<a title="Node Version" target="_blank" href="https://nodejs.org/zh-cn/"><img alt="Node Version" src="https://img.shields.io/badge/Node-%3E%3D%2010.13.0-yellowgreen?style=flat"></a>
<a title="License" target="_blank" href="https://github.com/anzhiyu-c/hexo-theme-anzhiyu/blob/master/LICENSE"><img alt="License" src="https://img.shields.io/github/license/anzhiyu-c/hexo-theme-anzhiyu.svg?style=flat"></a>
<br>
<a title="GitHub Release" target="_blank" href="https://github.com/anzhiyu-c/hexo-theme-anzhiyu/releases"><img alt="GitHub Release" src="https://img.shields.io/github/v/release/anzhiyu-c/hexo-theme-anzhiyu?style=flat"></a>
<a title="Npm Downloads" target="_blank" href="https://www.npmjs.com/package/hexo-theme-anzhiyu"><img alt="Npm Downloads" src="https://img.shields.io/npm/dt/hexo-theme-anzhiyu?color=red&label=npm"></a>
<a title="GitHub Commits" target="_blank" href="https://github.com/anzhiyu-c/hexo-theme-anzhiyu/commits/master"><img alt="GitHub Commits" src="https://img.shields.io/github/commit-activity/m/anzhiyu-c/hexo-theme-anzhiyu.svg?style=flat&color=brightgreen&label=commits"></a>
<br><br>
<a title="GitHub Watchers" target="_blank" href="https://github.com/anzhiyu-c/hexo-theme-anzhiyu/watchers"><img alt="GitHub Watchers" src="https://img.shields.io/github/watchers/anzhiyu-c/hexo-theme-anzhiyu.svg?label=Watchers&style=social"></a>
<a title="GitHub Stars" target="_blank" href="https://github.com/anzhiyu-c/hexo-theme-anzhiyu/stargazers"><img alt="GitHub Stars" src="https://img.shields.io/github/stars/anzhiyu-c/hexo-theme-anzhiyu.svg?label=Stars&style=social"></a>
<a title="GitHub Forks" target="_blank" href="https://github.com/anzhiyu-c/hexo-theme-anzhiyu/network/members"><img alt="GitHub Forks" src="https://img.shields.io/github/forks/anzhiyu-c/hexo-theme-anzhiyu.svg?label=Forks&style=social"></a>
</p>
<p align="center">🇨🇳 中文简体 | <a title="English" href="README_EN.md">🇬🇧 English</a></p>
预览: 👍 [AnZhiYu](https://hexo.anheyu.com/) || 🤞 [AnZhiYu](https://index.anheyu.com/)
文档: 📖 [anzhiyu Docs](https://docs.anheyu.com/)
一款基于[hexo-theme-butterfly](https://github.com/jerryc127/hexo-theme-butterfly)修改的主題
如果你希望有一个类似于wordpress的可以后台编辑的那么你可以看看这个项目 [安和鱼](https://github.com/anzhiyu-c/anheyu-app)
# hexo-theme-anzhiyu
![](https://upload-bbs.miyoushe.com/upload/2025/07/04/125766904/658277d773c29a145adf0d05055ce477_909497354353121629.webp?x-oss-process=image///quality,q_100/auto-orient,0/interlace,1/format,avif)
## 💻 安裝
### Git 安裝
在博客根目录里安装最新版【推荐】
```powershell
git clone -b main https://github.com/anzhiyu-c/hexo-theme-anzhiyu.git themes/anzhiyu
```
## ⚙ 应用主题
修改 hexo 配置文件`_config.yml`,把主题改为`anzhiyu`
```
theme: anzhiyu
```
> 如果你没有 pug 以及 stylus 的渲染器,请下载安装: `npm install hexo-renderer-pug hexo-renderer-stylus --save`
## 覆盖配置
覆盖配置可以使`主题配置`放置在 anzhiyu 目录之外,避免在更新主题时丢失自定义的配置。
通过 Npm 安装主题的用户可忽略,其他用户建议学习使用。
- macos/linux
在博客根目录运行
```bash
cp -rf ./themes/anzhiyu/_config.yml ./_config.anzhiyu.yml
```
- windows
复制`/themes/anzhiyu/_config.yml`此文件到 hexo 根目录,并重命名为`_config.anzhiyu.yml`
以后如果修改任何主题配置,都只需修改 \_config.anzhiyu.yml 的配置即可。
注意:
- 只要存在于 `_config.anzhiyu.yml` 的配置都是高优先级,修改原 `_config.yml` 是无效的。
- 每次更新主题可能存在配置变更,请注意更新说明,可能需要手动对 `_config.anzhiyu.yml` 同步修改。
- 想查看覆盖配置有没有生效,可以通过 `hexo g --debug` 查看命令行输出。
- 如果想将某些配置覆盖为空,注意不要把主键删掉,不然是无法覆盖的
## 功能特性
- ✅ 无比详实的[用户文档](https://docs.anheyu.com/)
- ✅ 页面组件懒加载(pjax 方案)
- ✅ 图片懒加载
- ✅ 多种代码高亮方案
- ✅ 多语言配置
- ✅ 内置多款评论插件
- ✅ 内置网页访问统计
- ✅ 支持暗色模式
- ✅ 支持脚注语法
- ✅ 支持自定义 CDN 静态资源
- ✅ 丰富多样化的标签选项快速构建你想要的功能
- ✅ 支持定制化的右键菜单
- ✅ 支持定制化的主色调随封面图片颜色变化
- ✅ 支持沉浸式状态栏
- ✅ 支持文章字数统计
- ✅ 支持聊天系统
- ✅ 支持谷歌分析、百度分析、微软分析、cloudflare 分析、cnzz 分析
- ✅ 支持广告挂载
- ✅ 支持图片大图查看
- ✅ 支持瀑布流即刻说说
- ✅ 支持瀑布流相册集
- ✅ 支持阿里图标与 fontawesome
- ✅ 支持高速缓存的 swpppwa 特性
- ✅ 优秀的隐私协议支持
- ✅ 文章 AI 摘要支持
- ✅ 支持音乐球
- ✅ 支持全局中控台
- ✅ 支持快捷键选项
- ✅ 支持本地搜索/algolia 搜索 🔍/Docsearch
- ✅ 支持 LaTeX 数学公式
- ✅ 支持 mermaid 流程图
## 部分功能展示
**沉浸式状态栏**
沉浸阅读。
![沉浸式状态栏](https://upload-bbs.miyoushe.com/upload/2023/09/04/125766904/3bc088e73d07b4dc25fc62fa4cf63261_4205905123525229755.png?x-oss-process=image///quality,q_100/auto-orient,0/interlace,1/format,avif)
**高低自定义的右键菜单**
高度定制。
![高低自定义的右键菜单](https://upload-bbs.miyoushe.com/upload/2023/09/04/125766904/3f66e33b24a758d53717f6c2c44e50af_1884994888952376370.png?x-oss-process=image///quality,q_100/auto-orient,0/interlace,1/format,avif)
**AI 摘要**
迅速读取文章内容。
![AI摘要](https://upload-bbs.miyoushe.com/upload/2023/09/04/125766904/184e089d64660f5f72390f547c864633_3266246986824356702.png)
**让人眼前一亮的清爽界面**
![让人眼前一亮的清爽界面](https://upload-bbs.miyoushe.com/upload/2023/09/04/125766904/8a16284fd36a9e986d5dbda772f697d0_1356079755877317976.png?x-oss-process=image///quality,q_100/auto-orient,0/interlace,1/format,avif)
**评论弹幕**
![评论弹幕](https://upload-bbs.miyoushe.com/upload/2023/09/04/125766904/628aef1dbf52b61c0333682e8ee9954e_6905019516821534667.png)
## 贡献者
[![contributors](https://opencollective.com/hexo-theme-anzhiyu/contributors.svg?width=890&button=false)](https://github.com/anzhiyu-c/hexo-theme-anzhiyu/)
主题设计:[@张洪 Heo](https://github.com/zhheo)
文档编写:[@xiaoran](https://github.com/xiaoran)
[本项目 CDN 加速及安全防护由 Tencent EdgeOne 赞助](https://edgeone.ai/zh?from=github)
![image](https://github.com/user-attachments/assets/1f3c8f9b-d509-4e64-b8f5-11c318d672a7)
## 仓库统计
![仓库统计](https://repobeats.axiom.co/api/embed/60fcf455cd02123aebe6249deabf8d48e3debcae.svg "Repobeats analytics image")

View File

@@ -0,0 +1,142 @@
<p align="center">
<a title="Hexo Version" target="_blank" href="https://hexo.io/zh-cn/"><img alt="Hexo Version" src="https://img.shields.io/badge/Hexo-%3E%3D%205.3.0-orange?style=flat"></a>
<a title="Node Version" target="_blank" href="https://nodejs.org/zh-cn/"><img alt="Node Version" src="https://img.shields.io/badge/Node-%3E%3D%2010.13.0-yellowgreen?style=flat"></a>
<a title="License" target="_blank" href="https://github.com/anzhiyu-c/hexo-theme-anzhiyu/blob/master/LICENSE"><img alt="License" src="https://img.shields.io/github/license/anzhiyu-c/hexo-theme-anzhiyu.svg?style=flat"></a>
<br>
<a title="GitHub Release" target="_blank" href="https://github.com/anzhiyu-c/hexo-theme-anzhiyu/releases"><img alt="GitHub Release" src="https://img.shields.io/github/v/release/anzhiyu-c/hexo-theme-anzhiyu?style=flat"></a>
<a title="Npm Downloads" target="_blank" href="https://www.npmjs.com/package/hexo-theme-anzhiyu"><img alt="Npm Downloads" src="https://img.shields.io/npm/dt/hexo-theme-anzhiyu?color=red&label=npm"></a>
<a title="GitHub Commits" target="_blank" href="https://github.com/anzhiyu-c/hexo-theme-anzhiyu/commits/master"><img alt="GitHub Commits" src="https://img.shields.io/github/commit-activity/m/anzhiyu-c/hexo-theme-anzhiyu.svg?style=flat&color=brightgreen&label=commits"></a>
<br><br>
<a title="GitHub Watchers" target="_blank" href="https://github.com/anzhiyu-c/hexo-theme-anzhiyu/watchers"><img alt="GitHub Watchers" src="https://img.shields.io/github/watchers/anzhiyu-c/hexo-theme-anzhiyu.svg?label=Watchers&style=social"></a>
<a title="GitHub Stars" target="_blank" href="https://github.com/anzhiyu-c/hexo-theme-anzhiyu/stargazers"><img alt="GitHub Stars" src="https://img.shields.io/github/stars/anzhiyu-c/hexo-theme-anzhiyu.svg?label=Stars&style=social"></a>
<a title="GitHub Forks" target="_blank" href="https://github.com/anzhiyu-c/hexo-theme-anzhiyu/network/members"><img alt="GitHub Forks" src="https://img.shields.io/github/forks/anzhiyu-c/hexo-theme-anzhiyu.svg?label=Forks&style=social"></a>
</p>
<p align="center"><a title="中文" href="/README.md">🇨🇳 中文简体</a> | 🇬🇧 English</p>
Preview: 👍 [AnZhiYu](https://hexo.anheyu.com/) || 🤞 [AnZhiYu](https://index.anheyu.com/)
Document: 📖 [anzhiyu Docs](https://docs.anheyu.com/)
A theme based on [hexo-theme-butterfly](https://github.com/jerryc127/hexo-theme-butterfly) modification
# hexo-theme-anzhiyu
![](https://bu.dusays.com/2023/07/24/64bdcbfe96762.webp)
## 💻 安裝
### Git 安裝
Install the latest version in the root directory of the blog [recommended]
```powershell
git clone -b main https://github.com/anzhiyu-c/hexo-theme-anzhiyu.git themes/anzhiyu
```
## ⚙ 应用主题
Modify the hexo configuration file `_ config.yml` and change the theme to `anzhiyu`
```
theme: anzhiyu
```
> If you do not have a renderer for pug and stylus, please download and install `npm install hexo-renderer-pug hexo-renderer-stylus --save`
## Override configuration
Override configuration allows the `theme configuration `to be placed outside the anzhiyu directory to avoid losing custom configurations when updating the theme.
Users who install the theme through Npm can ignore it, and other users are recommended to learn to use it.
- macos/linux
Run in the blog root directory
```bash
cp -rf ./themes/anzhiyu/_config.yml ./_config.anzhiyu.yml
```
- windows
Copy the file `/ themes/anzhiyu/_ config.yml` to the hexo root directory and rename it to` _ config.anzhiyu.yml`
If you modify any theme configuration in the future, you only need to modify the configuration of_config.anzhiyu.yml.
Note:
- as long as the configurations that exist in `_ config.anzhiyu.yml` are of high priority, it is invalid to modify the original` _ config.yml`.
- there may be configuration changes each time the topic is updated. Please pay attention to the update instructions. You may need to manually modify `_ config.anzhiyu.yml`.
- to check whether the override configuration has taken effect, you can check the command line output via `override g-- debug`.
- if you want to overwrite some configurations to empty, be careful not to delete the primary key, otherwise it cannot be overwritten
## Functional characteristics
-✅ extremely detailed [user documentation] (https://docs.anheyu.com/)
-✅ Page components load lazily (pjax scheme)
-✅ the picture is loaded lazily
-✅ multiple code highlighting schemes
-✅ multilingual configuration
-✅ built-in multiple comment plug-ins
-✅ built-in web page access statistics
-✅ supports dark mode
-✅ supports footnote syntax
-✅ support custom CDN static resources
-✅ A rich variety of tag options to quickly build the features you want
-✅ supports customized right-click menus
-✅ support customized dominant tone to vary with the color of the cover image
-✅ support for immersive status bar
-✅ support article word statistics
-✅ support chat system
-✅ support Google Analytics, Baidu Analytics, Microsoft Analytics, cloudflare Analytics, cnzz Analytics
-✅ Advertising is supported
-✅ large picture view is supported
-✅ support waterfall flow and talk about it right away
-✅ supports waterfall stream album
-✅ supports Ali icon and fontawesome
-✅ supports cached swpp,pwa features
-✅ excellent privacy protocol support
-✅ AI abstract support for articles
-✅ support music ball
-✅ supports the global center console
-✅ supports shortcut key options
-✅ support local search / algolia search 🔍 / Docsearch
-✅ supports LaTeX mathematical formula
-✅ support mermaid flow chart
## Partial function display
**Immersive status bar**
Immerse yourself in reading.
![Immersive status bar](https://upload-bbs.miyoushe.com/upload/2023/09/04/125766904/3bc088e73d07b4dc25fc62fa4cf63261_4205905123525229755.png)
**Customized right-click menu**
Highly customized.
![ High and low custom right-click menu](https://upload-bbs.miyoushe.com/upload/2023/09/04/125766904/3f66e33b24a758d53717f6c2c44e50af_1884994888952376370.png)
**AI Summary**
Read articles quickly.
![AI Summary](https://upload-bbs.miyoushe.com/upload/2023/09/04/125766904/184e089d64660f5f72390f547c864633_3266246986824356702.png)
**A refreshing interface that makes people shine at the moment**
![A refreshing interface that makes people shine at the moment](https://upload-bbs.miyoushe.com/upload/2023/09/04/125766904/8a16284fd36a9e986d5dbda772f697d0_1356079755877317976.png)
**Comment Barrage**
![Comment Barrage](https://upload-bbs.miyoushe.com/upload/2023/09/04/125766904/628aef1dbf52b61c0333682e8ee9954e_6905019516821534667.png)
## Contributors
[![contributors](https://opencollective.com/hexo-theme-anzhiyu/contributors.svg?width=890&button=false)](https://github.com/anzhiyu-c/hexo-theme-anzhiyu/)
Theme Design[@张洪 Heo](https://github.com/zhheo)
Document writing[@xiaoran](https://github.com/xiaoran)
## Warehouse Statistics
![Warehouse Statistics](https://repobeats.axiom.co/api/embed/60fcf455cd02123aebe6249deabf8d48e3debcae.svg "Repobeats analytics image")

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,128 @@
footer:
framework: 框架
theme: 主题
copy:
success: 复制成功
error: 复制错误
noSupport: 浏览器不支持
page:
articles: 文章总览
tag: 标签
category: 分类
archives: 归档
card_post_count: 条评论
sticky: 置顶
no_title: 无题
post:
created: 发表于
updated: 更新于
wordcount: 字数总计
min2read: 阅读时长
min2read_unit: 分钟
page_pv: 阅读量
comments: 评论数
copyright:
author: 文章作者
link: 文章链接
copyright_notice: 版权声明
copyright_content: '本博客所有文章除特别声明外,均采用
<a href="%s" target="_blank">%s</a> 许可协议。转载请注明来自 <a href="%s" target="_blank">%s</a>'
recommend: 喜欢这篇文章的人也看了
edit: 编辑
search:
title: "搜索"
load_data: 数据库加载中
algolia_search:
input_placeholder: 输入关键词后按下回车查找
hits_empty: "找不到您查询的内容:${query}"
hits_stats: "找到 ${hits} 条结果,用时 ${time} 毫秒"
local_search:
input_placeholder: 搜索文章
hits_empty: "找不到您查询的内容:${query}"
pagination:
prev: 上一篇
next: 下一篇
comment: 评论
aside:
articles: 文章
tags: 标签
categories: 分类
card_announcement: 公告
card_categories: 分类
card_tags: 标签
card_archives: 归档
card_recent_post: 最近发布
card_webinfo:
headline: 网站资讯
article_name: 文章总数
runtime:
name: 建站天数
unit:
last_push_date:
name: 最后更新时间
site_wordcount: 全站字数
site_uv_name: 全站访客数
site_pv_name: 全站总访问量
more_button: 查看更多
card_newest_comments:
headline: 最新评论
loading_text: 正在加载中...
error: 无法获取评论,请确认相关配置是否正确
zero: 没有评论
image: 图片
link: 链接
code: 代码
card_toc: 文章目录
display_mode: 显示模式
function: 功能
date_suffix:
just: 刚刚
min: 分钟前
hour: 小时前
day: 天前
month: 个月前
donate: 不给糖果就捣蛋
share: 分享
rightside:
readmode_title: 阅读模式
translate_title: 简繁转换
night_mode_title: 浅色和深色模式转换
back_to_top: 回到顶部
toc: 目录
scroll_to_comment: 直达评论
setting: 设置
aside: 单栏和双栏切换
chat: 聊天
copy_copyright:
author: 作者
link: 链接
source: 来源
info: 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
copySuccess: 复制成功,复制和转载请标注本文地址
Snackbar:
chs_to_cht: 你已切换为繁体
cht_to_chs: 你已切换为简体
day_to_night: 你已切换为深色模式
night_to_day: 你已切换为浅色模式
copy_equipment_name: 已复制装备名称
loading: 加载中...
load_more: 加载更多
error404: 页面没有找到

View File

@@ -0,0 +1,215 @@
footer:
framework: Framework
theme: Theme
back_to_top: Back to Top
friend_links: Links
refresh_friends: Refresh Links
cc_license: CC License
copy:
success: Copy successfully
error: Copy error
noSupport: The browser does not support
page:
articles: Articles
tag: Tag
category: Category
archives: Archives
card_post_count: comments
sticky: Sticky
no_title: No title
post:
created: Created
updated: Updated
wordcount: Word count
min2read: Reading time
min2read_unit: min
new: New
unread: Unread
page_pv: Post View
comments: Comments
copyright:
author: Author
link: Link
copyright_notice: Copyright Notice
copyright_content: 'All articles in this blog are licensed under <a href="%s">%s</a> unless stating additionally.'
recommend: Related Articles
edit:
github: Edited on GitHub
yuque: Edited on Yuque
search:
title: Search
load_data: Loading the Database
algolia_search:
input_placeholder: Search for Posts
hits_empty: "We didn't find any results for the search: ${query}."
hits_stats: "${hits} results found in ${time} ms"
local_search:
input_placeholder: Search for Posts
hits_empty: "We didn't find any results for the search: ${query}"
pagination:
prev: Previous Post
next: Next Post
comment: Comment
aside:
articles: Articles
tags: Tags
categories: Categories
card_announcement: Announcement
card_categories: Categories
card_tags: Tags
card_archives: Archives
card_recent_post: Recent Post
card_webinfo:
headline: Info
article_name: Article
runtime:
name: Run time
unit: days
last_push_date:
name: Last Push
site_wordcount: Total Count
site_uv_name: UV
site_pv_name: PV
more_button: More
card_newest_comments:
headline: Newest Comments
loading_text: loading...
error: Unable to get the data, please make sure the settings are correct.
zero: No Comment
image: image
link: link
code: code
card_toc: Catalog
display_mode: Display Mode
function: Function
date_suffix:
just: Just
min: minutes ago
hour: hours ago
day: days ago
month: months ago
donate: Donate
share: Share
rightside:
readmode_title: Read Mode
translate_title: Switch Between Traditional Chinese And Simplified Chinese
night_mode_title: Switch Between Light And Dark Mode
back_to_top: Back To Top
toc: Table Of Contents
scroll_to_comment: Scroll To Comments
setting: Setting
aside: Toggle between single-column and double-column
chat: Chat
copy_copyright:
author: Author
link: Link
source: Source
info: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
copySuccess: Copy success, copy and reprint please mark the address of this article
Snackbar:
chs_to_cht: Traditional Chinese Activated Manually
cht_to_chs: Simplified Chinese Activated Manually
day_to_night: Dark Mode Activated Manually
night_to_day: Light Mode Activated Manually
copy_equipment_name: Installed device name has been loaded
loading: Loading...
load_more: Load More
error404: Page not found
shortcut:
title: Keyboard Shortcuts
close_shortcut: Close Shortcuts
toggle_console: Toggle Console
play_music: Play/Pause Music
toggle_mode: Toggle Dark/Light Mode
search: Search
random: Random Post
home: Home
fish_pond: Fish Pond
links: Links
about: About
context_menu: Toggle Context Menu
flink:
title: Friend Links
friend_links: Links
latest_articles: Latest Articles
about_me: About Me
fishing: 🎣 Fishing
all_links: All Links
random_visit: Random Visit
apply_link: Apply Link
recommend: Hot
console:
title: Console
interaction: Interaction
music: Music
music_desc: Soul Collision 💥
interests: Interests
interests_desc: Find your area of interest
articles: Articles
toggle_mode: Toggle Display Mode
toggle_aside: Toggle Sidebar
toggle_barrage: Toggle Comments Barrage
toggle_music: Toggle Music
toggle_keyboard: Toggle Keyboard Shortcuts
reward:
title: Support Author
button: Donate
thanks: Thanks for your support
list: Supporters
list_desc: Your support motivates me to write more 🙏
nav:
travelling: Random Travelling Site
random_post: Random Post
search: Search 🔍
toggle_menu: Toggle
about:
title: About Me
hello: Hello, nice to meet you 👋
im: I'm
data: Data
visit_stats: Visit Statistics
stats_from: Statistics from
enjoy_music_with: Enjoy more music with %s
more_recommend: More
thanks: Thanks
reward_list: Reward List
reward_thanks: Thanks for your support, it motivates me to create more.
last_update: "Last updated: "
charge_for_ta: Support
total_people: "%s people in total"
personality: Personality
personality_img_alt: Personality
selfie_alt: Selfie
learn_more_at: Learn more about %s at %s
stats:
today_visitors: Today Visitors
today_views: Today Views
yesterday_visitors: Yesterday Visitors
yesterday_views: Yesterday Views
month_views: Month Views
total_views: Total Views
fetch_failed: Failed to load statistics

View File

@@ -0,0 +1,218 @@
footer:
framework: 框架
theme: 主题
back_to_top: 返回顶部
friend_links: 友链
refresh_friends: 换一批友情链接
cc_license: CC协议
copy:
success: 复制成功
error: 复制错误
noSupport: 浏览器不支持
page:
articles: 文章总览
tag: 标签
category: 分类
archives: 归档
card_post_count: 条评论
sticky: 置顶
no_title: 无题
post:
created: 发表于
updated: 更新于
wordcount: 字数总计
min2read: 阅读时长
min2read_unit: 分钟
new: 最新
unread: 未读
page_pv: 阅读量
comments: 评论数
copyright:
author: 文章作者
link: 文章链接
copyright_notice: 版权声明
copyright_content: '本博客所有文章除特别声明外,均采用
<a href="%s" target="_blank">%s</a> 许可协议。转载请注明来自 <a href="%s" target="_blank">%s</a>'
recommend: 喜欢这篇文章的人也看了
edit:
github: 在 GitHub 上编辑
yuque: 在 语雀 上编辑
# notion: 在 Notion 上编辑
# flowus: 在 Flowus 上编辑
search:
title: "搜索"
load_data: 数据库加载中
algolia_search:
input_placeholder: 输入关键词后按下回车查找
hits_empty: "找不到您查询的内容:${query}"
hits_stats: "找到 ${hits} 条结果,用时 ${time} 毫秒"
local_search:
input_placeholder: 搜索文章
hits_empty: "找不到您查询的内容:${query}"
pagination:
prev: 上一篇
next: 下一篇
comment: 评论
aside:
articles: 文章
tags: 标签
categories: 分类
card_announcement: 公告
card_categories: 分类
card_tags: 标签
card_archives: 归档
card_recent_post: 最近发布
card_webinfo:
headline: 网站资讯
article_name: 文章总数
runtime:
name: 建站天数
unit:
last_push_date:
name: 最后更新
site_wordcount: 全站字数
site_uv_name: 总访客数
site_pv_name: 总访问量
more_button: 查看更多
card_newest_comments:
headline: 最新评论
loading_text: 正在加载中...
error: 无法获取评论,请确认相关配置是否正确
zero: 没有评论
image: 图片
link: 链接
code: 代码
card_toc: 文章目录
display_mode: 显示模式
function: 功能
date_suffix:
just: 刚刚
min: 分钟前
hour: 小时前
day: 天前
month: 个月前
donate: 不给糖果就捣蛋
share: 分享
rightside:
readmode_title: 阅读模式
translate_title: 简繁转换
night_mode_title: 浅色和深色模式转换
back_to_top: 回到顶部
toc: 目录
scroll_to_comment: 直达评论
setting: 设置
aside: 单栏和双栏切换
chat: 聊天
copy_copyright:
author: 作者
link: 链接
source: 来源
info: 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
copySuccess: 复制成功,复制和转载请标注本文地址
Snackbar:
chs_to_cht: 你已切换为繁体
cht_to_chs: 你已切换为简体
day_to_night: 你已切换为深色模式
night_to_day: 你已切换为浅色模式
copy_equipment_name: 已复制装备名称
loading: 加载中...
load_more: 加载更多
error404: 页面没有找到
shortcut:
title: 博客快捷键
close_shortcut: 关闭快捷键功能
toggle_console: 打开/关闭中控台
play_music: 播放/暂停音乐
toggle_mode: 深色/浅色显示模式
search: 站内搜索
random: 随机访问
home: 返回首页
fish_pond: 友链鱼塘
links: 友链页面
about: 关于本站
context_menu: 原版/本站右键菜单
flink:
title: 友情链接
friend_links: 友链
latest_articles: 最新文章订阅
about_me: 关于本人
fishing: 🎣 钓鱼
all_links: 全部友链
random_visit: 随机访问
apply_link: 申请友链
recommend:
console:
title: 中控台
interaction: 互动
music: 音乐
music_desc: 灵魂的碰撞💥
interests: 兴趣点
interests_desc: 寻找你感兴趣的领域
articles: 文章
toggle_mode: 显示模式切换
toggle_aside: 边栏显示控制
toggle_barrage: 热评开关
toggle_music: 音乐开关
toggle_keyboard: 快捷键开关
reward:
title: 赞赏作者
button: 打赏作者
thanks: 感谢你赐予我前进的力量
list: 赞赏者名单
list_desc: 因为你们的支持让我意识到写文章的价值🙏
nav:
travelling: 随机前往一个开往项目网站
random_post: 随机前往一个文章
search: 搜索🔍
toggle_menu: 切换
about:
title: 关于我
hello: 你好,很高兴认识你👋
im: 我叫
data: 数据
visit_stats: 访问统计
stats_from: 统计信息来自
enjoy_music_with: 跟 %s 一起欣赏更多音乐
more_recommend: 更多推荐
thanks: 致谢
reward_list: 赞赏名单
reward_thanks: 感谢因为有你们,让我更加有创作的动力。
last_update: 最新更新时间:
charge_for_ta: 为TA充电
total_people: 共 %s 人
personality: 性格
personality_img_alt: 人格
selfie_alt: 自拍
learn_more_at: 在 %s 了解更多关于 %s
stats:
today_visitors: 今日人数
today_views: 今日访问
yesterday_visitors: 昨日人数
yesterday_views: 昨日访问
month_views: 本月访问
total_views: 总访问量
fetch_failed: 统计数据获取失败

View File

@@ -0,0 +1,216 @@
footer:
framework: 框架
theme: 主題
back_to_top: 返回頂部
friend_links: 友鏈
refresh_friends: 換一批友情連結
cc_license: CC協議
copy:
success: 複製成功
error: 複製錯誤
noSupport: 瀏覽器不支援
page:
articles: 文章總覽
tag: 標籤
category: 分類
archives: 歸檔
card_post_count: 條評論
sticky: 置頂
no_title: 無題
post:
created: 發表於
updated: 更新於
wordcount: 字數總計
min2read: 閱讀時長
min2read_unit: 分鐘
new: 最新
unread: 未讀
page_pv: 閱讀量
comments: 評論數
copyright:
author: 文章作者
link: 文章連結
copyright_notice: 版權聲明
copyright_content: '本部落格所有文章除特別聲明外,均採用
<a href="%s" target="_blank">%s</a> 許可協議。轉載請註明來自 <a href="%s" target="_blank">%s</a>'
recommend: 相關推薦
edit:
github: 在 GitHub 上編輯
yuque: 在 語雀 上編輯
search:
title: 搜尋
load_data: 資料庫載入中
algolia_search:
input_placeholder: 輸入關鍵字後按下回車查找
hits_empty: "找不到您查詢的內容:${query}"
hits_stats: "找到 ${hits} 條結果,用時 ${time} 毫秒"
local_search:
input_placeholder: 搜尋文章
hits_empty: "找不到您查詢的內容:${query}"
pagination:
prev: 上一篇
next: 下一篇
comment: 評論
aside:
articles: 文章
tags: 標籤
categories: 分類
card_announcement: 公告
card_categories: 分類
card_tags: 標籤
card_archives: 歸檔
card_recent_post: 最近发布
card_webinfo:
headline: 網站資訊
article_name: 文章數目
runtime:
name: 已執行時間
unit:
last_push_date:
name: 最後更新時間
site_wordcount: 本站總字數
site_uv_name: 本站訪客數
site_pv_name: 本站總訪問量
more_button: 檢視更多
card_newest_comments:
headline: 最新評論
loading_text: 正在載入中...
error: 無法獲取評論,請確認相關配置是否正確
zero: 沒有評論
image: 圖片
link: 連結
code: 程式碼
card_toc: 文章目錄
display_mode: 顯示模式
function: 功能
date_suffix:
just: 剛剛
min: 分鐘前
hour: 小時前
day: 天前
month: 個月前
donate: 打賞
share: 分享
rightside:
readmode_title: 閱讀模式
translate_title: 簡繁轉換
night_mode_title: 淺色和深色模式轉換
back_to_top: 回到頂部
toc: 目錄
scroll_to_comment: 直達評論
setting: 設定
aside: 單欄和雙欄切換
chat: 聊天
copy_copyright:
author: 作者
link: 連結
source: 來源
info: 著作權歸作者所有。商業轉載請聯絡作者獲得授權,非商業轉載請註明出處。
copySuccess: 複製成功,複製和轉載請標注本文地址
Snackbar:
chs_to_cht: 你已切換為繁體
cht_to_chs: 你已切換為簡體
day_to_night: 你已切換為深色模式
night_to_day: 你已切換為淺色模式
copy_equipment_name: 已複製裝備名稱
loading: 載入中...
load_more: 載入更多
error404: 頁面沒有找到
shortcut:
title: 部落格快捷鍵
close_shortcut: 關閉快捷鍵功能
toggle_console: 打開/關閉中控台
play_music: 播放/暫停音樂
toggle_mode: 深色/淺色顯示模式
search: 站內搜尋
random: 隨機訪問
home: 返回首頁
fish_pond: 友鏈魚塘
links: 友鏈頁面
about: 關於本站
context_menu: 原版/本站右鍵選單
flink:
title: 友情連結
friend_links: 友鏈
latest_articles: 最新文章訂閱
about_me: 關於本人
fishing: 🎣 釣魚
all_links: 全部友鏈
random_visit: 隨機訪問
apply_link: 申請友鏈
recommend:
console:
title: 中控台
interaction: 互動
music: 音樂
music_desc: 靈魂的碰撞💥
interests: 興趣點
interests_desc: 尋找你感興趣的領域
articles: 文章
toggle_mode: 顯示模式切換
toggle_aside: 邊欄顯示控制
toggle_barrage: 熱評開關
toggle_music: 音樂開關
toggle_keyboard: 快捷鍵開關
reward:
title: 讚賞作者
button: 打賞作者
thanks: 感謝你賜予我前進的力量
list: 讚賞者名單
list_desc: 因為你們的支持讓我意識到寫文章的價值🙏
nav:
travelling: 隨機前往一個開往項目網站
random_post: 隨機前往一個文章
search: 搜尋🔍
toggle_menu: 切換
about:
title: 關於我
hello: 你好,很高興認識你👋
im: 我叫
data: 數據
visit_stats: 訪問統計
stats_from: 統計資訊來自
enjoy_music_with: 跟 %s 一起欣賞更多音樂
more_recommend: 更多推薦
thanks: 致謝
reward_list: 讚賞名單
reward_thanks: 感謝因為有你們,讓我更加有創作的動力。
last_update: 最新更新時間:
charge_for_ta: 為TA充電
total_people: 共 %s 人
personality: 性格
personality_img_alt: 人格
selfie_alt: 自拍
learn_more_at: 在 %s 了解更多關於 %s
stats:
today_visitors: 今日人數
today_views: 今日訪問
yesterday_visitors: 昨日人數
yesterday_views: 昨日訪問
month_views: 本月訪問
total_views: 總訪問量
fetch_failed: 統計數據獲取失敗

View File

@@ -0,0 +1,8 @@
extends includes/layout.pug
block content
include ./includes/mixins/article-sort.pug
#archive
.article-sort-title= `${_p('page.articles')} - ${getArchiveLength()}`
+articleSort(page.posts, page.current)
include includes/pagination.pug

View File

@@ -0,0 +1,23 @@
extends includes/layout.pug
block content
if theme.category_ui == 'index'
include ./includes/mixins/post-ui.pug
#recent-posts.recent-posts.category_ui
+postUI
include includes/pagination.pug
else
include ./includes/mixins/article-sort.pug
#category
#catalog-bar
i.anzhiyufont.anzhiyu-icon-shapes
#catalog-list
.catalog-list-item
a(href="/") 首页
!=catalog_list("categories")
.category-bar-next#category-bar-next(onclick="anzhiyu.scrollCategoryBarToRight()")
i.anzhiyufont.anzhiyu-icon-angle-double-right
a.catalog-more(href="/categories/")!= '更多'
.article-sort-title= _p('page.category') + ' - ' + page.category
+articleSort(page.posts, page.current)
include includes/pagination.pug

View File

@@ -0,0 +1,36 @@
- let error_404_top_img = theme.error_404.background || theme.default_top_img
- let error_404_bg_img = `background-image: url('${url_for(error_404_top_img)}')`
#body-wrap.error
include ./header/index.pug
.error-box
#error-wrap
.error-content
.error-img(style=error_404_bg_img)
.error-info
h1.error_title= '404'
.error_subtitle= theme.error_404.subtitle
a.button--animated(href=config.root)
i.anzhiyufont.anzhiyu-icon-rocket
= _p('回到主页')
.aside-list
.aside-list-group
- let postLimit = theme.aside.card_recent_post.limit === 0 ? site.posts.length : theme.related_post.limit || 6
- let sort = theme.aside.card_recent_post.sort === 'updated' ? 'updated' : 'date'
- site.posts.sort(sort, -1).limit(postLimit).each(function(article){
- let link = article.link || article.path
- let title = article.title || _p('no_title')
- let no_cover = article.cover === false || !theme.cover.aside_enable ? 'no-cover' : ''
- let post_cover = article.cover
.aside-list-item(class=no_cover)
if post_cover && theme.cover.aside_enable
a.thumbnail(href=url_for(link) title=title)
img(src=url_for(post_cover) onerror=`this.onerror=null;this.src='${url_for(theme.error_img.post_page)}'` alt=title)
.content
a.title(href=url_for(link) title=title)= title
if theme.aside.card_recent_post.sort === 'updated'
time(datetime=date_xml(article.updated) title=_p('post.updated') + ' ' + full_date(article.updated)) #[=date(article.updated, config.date_format)]
else
time(datetime=date_xml(article.date) title=_p('post.created') + ' ' + full_date(article.date)) #[=date(article.date, config.date_format)]
- })

View File

@@ -0,0 +1,132 @@
div
script(src=url_for(theme.asset.utils))
script(src=url_for(theme.asset.main))
if theme.translate.enable
script(src=url_for(theme.asset.translate))
if theme.medium_zoom
script(src=url_for(theme.asset.medium_zoom))
else if theme.fancybox
script(src=url_for(theme.asset.fancybox))
if theme.instantpage
script(src=url_for(theme.asset.instantpage), type='module')
if theme.lazyload.enable
script(src=url_for(theme.asset.lazyload))
if theme.snackbar.enable
script(src=url_for(theme.asset.snackbar))
if theme.pangu.enable
!= partial("includes/third-party/pangu.pug", {}, { cache: true })
if theme.asset.meting_api
script.
var meting_api = "!{theme.asset.meting_api}";
//- 深色模式粒子效果canvas
if theme.universe.enable
canvas(id="universe")
script(async src="https://npm.elemecdn.com/anzhiyu-theme-static@1.0.0/dark/dark.js")
//- 控制台打印信息
if theme.console.enable
!= partial("includes/anzhiyu/log-js.pug", {}, { cache: true })
//- 随机文章
script(async src="/anzhiyu/random.js")
//- 页脚计时器
if theme.footer.runtime.enable
!= partial("includes/third-party/runtime/runtime-js.pug", {}, { cache: true })
//- search
if theme.algolia_search.enable
script(src=url_for(theme.asset.algolia_search))
script(src=url_for(theme.asset.instantsearch))
script(src=url_for(theme.asset.algolia_js))
else if theme.local_search.enable
script(src=url_for(theme.asset.local_search))
//- colorthief
if theme.mainTone.mode === "colorthief"
script(src=url_for(theme.asset.colorthief))
.js-pjax
if theme.peoplecanvas.enable && is_home()
script.
if (typeof gsap === "object") {
getScript("!{url_for(theme.asset.people_js)}", {defer:true})
} else {
getScript("!{url_for(theme.asset.gsap_js)}").then(()=>{
getScript("!{url_for(theme.asset.people_js)}", {defer:true})
});
}
if needLoadCountJs
!= partial("includes/third-party/card-post-count/index", {}, { cache: true })
if loadSubJs
include ./third-party/subtitle.pug
include ./third-party/math/index.pug
if commentsJsLoad
include ./third-party/comments/js.pug
input(type="hidden" name="page-type" id="page-type" value=(page.type ? page.type : (is_post() ? "post" : (is_category() ? "categories" : "anzhiyu"))))
//- 评论弹幕
if theme.comment_barrage_config.enable && theme.comments.use == 'Twikoo' && page.comments
script(async src=url_for(theme.asset.comment_barrage_js))
!= partial("includes/third-party/prismjs", {}, { cache: true })
if theme.aside.enable && theme.newest_comments.enable
if theme.pjax.enable
!= partial("includes/third-party/newest-comments/index", {}, { cache: true })
else if (!is_post() && page.aside !== false)
!= partial("includes/third-party/newest-comments/index", {}, { cache: true })
//- 气泡效果
if theme.bubble.enable
script(async data-pjax src="https://npm.elemecdn.com/anzhiyu-theme-static@1.0.1/bubble/bubble.js")
if theme.visitorMail.enable
- const mail = theme.visitorMail.mail
script.
var visitorMail = "#{mail}";
//- 即刻依赖waterfall
script(async data-pjax src=url_for(theme.asset.waterfall))
//- 文章二维码
script(src='https://cdn.cbd.int/qrcodejs@1.0.0/qrcode.min.js')
//- 右键菜单
if (theme.rightClickMenu && theme.rightClickMenu.enable)
script(src=url_for(theme.asset.right_click_menu_js))
//- iconfont依赖
link(rel="stylesheet" href=url_for(theme.asset.ali_iconfont_css))
if (theme.icons && theme.icons.ali_iconfont_js)
script(async src=url_for(theme.icons.ali_iconfont_js))
!= fragment_cache('injectBottom', function(){return injectHtml(theme.inject.bottom)})
!= partial("includes/third-party/effect", {}, { cache: true })
!= partial("includes/third-party/chat/index", {}, { cache: true })
if theme.aplayerInject && theme.aplayerInject.enable
if theme.pjax.enable || theme.aplayerInject.per_page
include ./third-party/aplayer.pug
else if page.aplayer
include ./third-party/aplayer.pug
if theme.pjax.enable
!= partial("includes/third-party/pjax", {}, { cache: true })
if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv
script(async data-pjax src= theme.asset.busuanzi || '//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js')
if theme.accesskey.enable
script(charset="UTF-8" src=url_for(theme.asset.accesskey_js))
if is_current("/") && theme.greetingBox.enable
#greetingBox

View File

@@ -0,0 +1,26 @@
- let pageFillDescription = get_page_fill_description()
- let gptName = theme.post_head_ai_description.gptName
- let mode = theme.post_head_ai_description.mode
- let switchBtn = theme.post_head_ai_description.switchBtn
if (pageFillDescription && page.ai)
.post-ai-description
.ai-title
i.anzhiyufont.anzhiyu-icon-bilibili
.ai-title-text AI-摘要
if (switchBtn)
#ai-Toggle 切换
i.anzhiyufont.anzhiyu-icon-arrow-rotate-right
i.anzhiyufont.anzhiyu-icon-circle-dot(title="朗读摘要")
#ai-tag
if mode == "tianli"
= "Tianli GPT"
else
= gptName + " GPT"
.ai-explanation AI初始化中...
.ai-btn-box
.ai-btn-item 介绍自己 🙈
.ai-btn-item 生成本文简介 👋
.ai-btn-item 推荐相关文章 📖
.ai-btn-item 前往主页 🏠
.ai-btn-item#go-tianli-blog 前往爱发电购买
script(data-pjax src=url_for(theme.asset.ai_abstract_js))

View File

@@ -0,0 +1,29 @@
#he-plugin-simple
script.
var WIDGET = {
"CONFIG": {
"modules": "0124",
"background": "2",
"tmpColor": "FFFFFF",
"tmpSize": "16",
"cityColor": "FFFFFF",
"citySize": "16",
"aqiColor": "E8D87B",
"aqiSize": "16",
"weatherIconSize": "24",
"alertIconSize": "18",
"padding": "10px 10px 10px 10px",
"shadow": "0",
"language": "auto",
"borderRadius": "20",
"fixed": "true",
"vertical": "top",
"horizontal": "left",
"left": "20",
"top": "7.1",
"key": "df245676fb434a0691ead1c63341cd94"
}
}
link(rel="stylesheet", href="https://widget.qweather.net/simple/static/css/he-simple.css?v=1.4.0")
script(src="https://widget.qweather.net/simple/static/js/he-simple.js?v=1.4.0")

View File

@@ -0,0 +1,47 @@
#console
.console-card-group-reward
ul.reward-all.console-card
each item in theme.reward.QR_code
li.reward-item
a(href=url_for(item.link || item.img), target='_blank')
img.post-qr-code-img(alt=item.text, src=url_for(item.img))
.post-qr-code-desc=item.text
.console-card-group
.console-card-group-left
!=partial('includes/widget/card_newest_comment', {}, {cache: true})
.console-card-group-right
.console-card.tags
.card-content
if theme.nav_music.enable && theme.nav_music.console_widescreen_music
.author-content-item-tips=_p('console.music')
span.author-content-item-title=_p('console.music_desc')
else
.author-content-item-tips=_p('console.interests')
span.author-content-item-title=_p('console.interests_desc')
!=partial('includes/widget/card_console_tags', {}, {cache: true})
.console-card.history
.item-headline
i.anzhiyufont.anzhiyu-icon-box-archiv
span=_p('console.articles')
!=partial('includes/widget/card_console_archives', {}, {cache: true})
.button-group
if theme.darkmode.enable
.console-btn-item
a.darkmode_switchbutton(title=_p('console.toggle_mode'), href='javascript:void(0);')
i.anzhiyufont.anzhiyu-icon-moon
.console-btn-item#consoleHideAside(onclick='anzhiyu.hideAsideBtn()', title=_p('console.toggle_aside'))
a.asideSwitch
i.anzhiyufont.anzhiyu-icon-arrows-left-right
if theme.comment_barrage_config.enable
.console-btn-item.on#consoleCommentBarrage(onclick='anzhiyu.switchCommentBarrage()', title=_p('console.toggle_barrage'))
a.commentBarrage
i.anzhiyufont.anzhiyu-icon-message
if theme.nav_music.enable
.console-btn-item#consoleMusic(onclick='anzhiyu.musicToggle()', title=_p('console.toggle_music'))
a.music-switch
i.anzhiyufont.anzhiyu-icon-music
if theme.shortcutKey.enable
.console-btn-item#consoleKeyboard(onclick='anzhiyu.keyboardToggle()', title=_p('console.toggle_keyboard'))
a.keyboard-switch
i.anzhiyufont.anzhiyu-icon-keyboard
.console-mask(onclick='anzhiyu.hideConsole()', href='javascript:void(0);')

View File

@@ -0,0 +1,78 @@
- let author = config.author
- let launch_time = theme.footer.runtime.launch_time
- let since = theme.footer.owner.since
- let version = get_version("tags")
script.
// 消除控制台打印
var HoldLog = console.log;
console.log = function () {};
let now1 = new Date();
queueMicrotask(() => {
const Log = function () {
HoldLog.apply(console, arguments);
}; //在恢复前输出日志
const grt = new Date("#{launch_time}"); //此处修改你的建站时间或者网站上线时间
now1.setTime(now1.getTime() + 250);
const days = (now1 - grt) / 1000 / 60 / 60 / 24;
const dnum = Math.floor(days);
const ascll = [
`欢迎使用安知鱼!`,
`生活明朗, 万物可爱`,
`
█████╗ ███╗ ██╗███████╗██╗ ██╗██╗██╗ ██╗██╗ ██╗
██╔══██╗████╗ ██║╚══███╔╝██║ ██║██║╚██╗ ██╔╝██║ ██║
███████║██╔██╗ ██║ ███╔╝ ███████║██║ ╚████╔╝ ██║ ██║
██╔══██║██║╚██╗██║ ███╔╝ ██╔══██║██║ ╚██╔╝ ██║ ██║
██║ ██║██║ ╚████║███████╗██║ ██║██║ ██║ ╚██████╔╝
╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝
`,
"已上线",
dnum,
"天",
"©#{since} By 安知鱼 V#{version}",
];
const ascll2 = [`NCC2-036`, `调用前置摄像头拍照成功,识别为【小笨蛋】.`, `Photo captured: `, `🤪`];
setTimeout(
Log.bind(
console,
`\n%c${ascll[0]} %c ${ascll[1]} %c ${ascll[2]} %c${ascll[3]}%c ${ascll[4]}%c ${ascll[5]}\n\n%c ${ascll[6]}\n`,
"color:#425AEF",
"",
"color:#425AEF",
"color:#425AEF",
"",
"color:#425AEF",
""
)
);
setTimeout(
Log.bind(
console,
`%c ${ascll2[0]} %c ${ascll2[1]} %c \n${ascll2[2]} %c\n${ascll2[3]}\n`,
"color:white; background-color:#4fd953",
"",
"",
'background:url("https://npm.elemecdn.com/anzhiyu-blog@1.1.6/img/post/common/tinggge.gif") no-repeat;font-size:450%'
)
);
setTimeout(Log.bind(console, "%c WELCOME %c 你好,小笨蛋.", "color:white; background-color:#4f90d9", ""));
setTimeout(
console.warn.bind(
console,
"%c ⚡ Powered by 安知鱼 %c 你正在访问 #{author} 的博客.",
"color:white; background-color:#f0ad4e",
""
)
);
setTimeout(Log.bind(console, "%c W23-12 %c 你已打开控制台.", "color:white; background-color:#4f90d9", ""));
setTimeout(
console.warn.bind(console, "%c S013-782 %c 你现在正处于监控中.", "color:white; background-color:#d9534f", "")
);
});

View File

@@ -0,0 +1,82 @@
- const { translate } = theme
#rightMenu
.rightMenu-group.rightMenu-small
.rightMenu-item#menu-backward
i.anzhiyufont.anzhiyu-icon-arrow-left
.rightMenu-item#menu-forward
i.anzhiyufont.anzhiyu-icon-arrow-right
.rightMenu-item#menu-refresh
i.anzhiyufont.anzhiyu-icon-arrow-rotate-right(style="font-size: 1rem;")
.rightMenu-item#menu-top
i.anzhiyufont.anzhiyu-icon-arrow-up
.rightMenu-group.rightMenu-line.rightMenuPlugin
.rightMenu-item#menu-copytext
i.anzhiyufont.anzhiyu-icon-copy
span 复制选中文本
.rightMenu-item#menu-pastetext
i.anzhiyufont.anzhiyu-icon-paste
span 粘贴文本
a.rightMenu-item#menu-commenttext
i.anzhiyufont.anzhiyu-icon-comment-medical
span 引用到评论
.rightMenu-item#menu-newwindow
i.anzhiyufont.anzhiyu-icon-window-restore
span 新窗口打开
.rightMenu-item#menu-copylink
i.anzhiyufont.anzhiyu-icon-link
span 复制链接地址
.rightMenu-item#menu-copyimg
i.anzhiyufont.anzhiyu-icon-images
span 复制此图片
.rightMenu-item#menu-downloadimg
i.anzhiyufont.anzhiyu-icon-download
span 下载此图片
.rightMenu-item#menu-newwindowimg
i.anzhiyufont.anzhiyu-icon-window-restore
span 新窗口打开图片
.rightMenu-item#menu-search
i.anzhiyufont.anzhiyu-icon-magnifying-glass
span 站内搜索
.rightMenu-item#menu-searchBaidu
i.anzhiyufont.anzhiyu-icon-magnifying-glass
span 百度搜索
.rightMenu-item#menu-music-toggle
i.anzhiyufont.anzhiyu-icon-play
span 播放音乐
.rightMenu-item#menu-music-back
i.anzhiyufont.anzhiyu-icon-backward
span 切换到上一首
.rightMenu-item#menu-music-forward
i.anzhiyufont.anzhiyu-icon-forward
span 切换到下一首
- const nav_music_all_playlist = theme.nav_music.all_playlist
.rightMenu-item#menu-music-playlist(onclick=`window.open("${nav_music_all_playlist}", "_blank");`, style='display: none;')
i.anzhiyufont.anzhiyu-icon-radio
span 查看所有歌曲
.rightMenu-item#menu-music-copyMusicName
i.anzhiyufont.anzhiyu-icon-copy
span 复制歌名
.rightMenu-group.rightMenu-line.rightMenuOther
a.rightMenu-item.menu-link#menu-randomPost
i.anzhiyufont.anzhiyu-icon-shuffle
span 随便逛逛
a.rightMenu-item.menu-link(href='/categories/')
i.anzhiyufont.anzhiyu-icon-cube
span 博客分类
a.rightMenu-item.menu-link(href='/tags/')
i.anzhiyufont.anzhiyu-icon-tags
span 文章标签
.rightMenu-group.rightMenu-line.rightMenuOther
a.rightMenu-item#menu-copy(href='javascript:void(0);')
i.anzhiyufont.anzhiyu-icon-copy
span 复制地址
a.rightMenu-item#menu-commentBarrage(href='javascript:void(0);')
i.anzhiyufont.anzhiyu-icon-message
span.menu-commentBarrage-text 关闭热评
a.rightMenu-item#menu-darkmode(href='javascript:void(0);')
i.anzhiyufont.anzhiyu-icon-circle-half-stroke
span.menu-darkmode-text 深色模式
a.rightMenu-item#menu-translate(href='javascript:void(0);')
i.anzhiyufont.anzhiyu-icon-language
span=translate.rightMenuMsgDefault
#rightmenu-mask

View File

@@ -0,0 +1,20 @@
if site.data.creativity
#skills-tags-group-all
.tags-group-wrapper
each i in site.data.creativity
- const evenNum = i.creativity_list.filter((x, index) => index % 2 === 0);
- const oddNum = i.creativity_list.filter((x, index) => index % 2 === 1);
each item, index in i.creativity_list
if ((index+1 <= evenNum.length) && (index+1 <= oddNum.length))
.tags-group-icon-pair
.tags-group-icon(style=`background: ${evenNum[index].color}`)
img.no-lightbox(title=evenNum[index].name, src=evenNum[index].icon, size="60px" alt=evenNum[index].name)
.tags-group-icon(style=`background: ${oddNum[index].color}`)
img.no-lightbox(title=oddNum[index].name, src=oddNum[index].icon, size="60px" alt=oddNum[index].name)
each item, index in i.creativity_list
if ((index+1 <= evenNum.length) && (index+1 <= oddNum.length))
.tags-group-icon-pair
.tags-group-icon(style=`background: ${evenNum[index].color}`)
img.no-lightbox(title=evenNum[index].name, src=evenNum[index].icon, size="60px" alt=evenNum[index].name)
.tags-group-icon(style=`background: ${oddNum[index].color}`)
img.no-lightbox(title=oddNum[index].name, src=oddNum[index].icon, size="60px" alt=oddNum[index].name)

View File

@@ -0,0 +1,17 @@
if site.data.essay
each i in site.data.essay
if i.home_essay
- let onclick_value = theme.pjax.enable ? `pjax.loadUrl("/essay/");` : '';
- let href_value = theme.pjax.enable ? 'javascript:void(0);' : `/essay/`;
#bbTimeList.bbTimeList.container
i.anzhiyufont.anzhiyu-icon-jike.bber-logo.fontbold(onclick=onclick_value, title="即刻短文", href=href_value, aria-hidden="true")
#bbtalk.swiper-container.swiper-no-swiping.essay_bar_swiper_container(tabindex="-1")
#bber-talk.swiper-wrapper(onclick=onclick_value)
each i in site.data.essay
each item, index in i.essay_list
if index < 10
- var contentText = item.image ? item.content + ' [图片]' : (item.video ? item.content + ' [视频]' : item.content)
a.li-style.swiper-slide(href=href_value)= contentText
a.bber-gotobb.anzhiyufont.anzhiyu-icon-circle-arrow-right( onclick=onclick_value, href=href_value, title="查看全文")
script(src=url_for(theme.home_top.swiper.swiper_js))

View File

@@ -0,0 +1,2 @@
//- 随机背景
script(src=url_for("https://npm.elemecdn.com/anzhiyu-theme-static@1.0.0/biliBg/biliBg.js"), data-pjax)

View File

@@ -0,0 +1,10 @@
#categoryBar
#category-bar.category-bar
#catalog-bar
#catalog-list
.catalog-list-item(id='首页')
a(href="/") 首页
!=catalog_list("categories")
.category-bar-next#category-bar-next(onclick="anzhiyu.scrollCategoryBarToRight()")
i.anzhiyufont.anzhiyu-icon-angle-double-right
a.catalog-more(href="/categories/")!= '更多'

View File

@@ -0,0 +1,93 @@
#footer-wrap
if theme.footer.socialBar.enable
- let centerImg = theme.footer.socialBar.centerImg ? theme.footer.socialBar.centerImg : theme.avatar.img
- let leftInfo = theme.footer.socialBar.left
- let rightInfo = theme.footer.socialBar.right
#footer_deal
each item, index in leftInfo
a.deal_link(href=url_for(item.link) title=item.title)
if (item.icon.startsWith("fa"))
i(class=`${item.icon}`)
else if (item.icon.startsWith("icon"))
svg.icon(aria-hidden="true")
use(xlink:href=`#`+ item.icon)
else if (item.icon.startsWith("anzhiyu"))
i.anzhiyufont(class=`${item.icon}`)
img.footer_mini_logo(title=_p('footer.back_to_top'), alt=_p('footer.back_to_top') onclick="anzhiyu.scrollToDest(0, 500)", src=centerImg, size="50px")
each item, index in rightInfo
a.deal_link(href=url_for(item.link) title=item.title)
if (item.icon.startsWith("fa"))
i(class=`${item.icon}`)
else if (item.icon.startsWith("icon"))
svg.icon(aria-hidden="true")
use(xlink:href=`#`+ item.icon)
else if (item.icon.startsWith("anzhiyu"))
i.anzhiyufont(class=`${item.icon}`)
if theme.footer.owner.enable && !theme.footer.footerBar.enable
- var nowYear = new Date().getFullYear()
if theme.footer.owner.since && theme.footer.owner.since != nowYear
.copyright!= `&copy;${theme.footer.owner.since} - ${nowYear} By ${config.author}`
else
.copyright!= `&copy;${nowYear} By ${config.author}`
- let work_img = theme.footer.runtime.work_img
- let work_description = theme.footer.runtime.work_description
if theme.footer.runtime.enable
#workboard
if work_img != null
img(src=`${work_img}`, alt=`${work_description}`, title=`${work_description}`, class="workSituationImg boardsign")
#runtimeTextTip
if theme.footer.custom_text
.footer_custom_text!=`${theme.footer.custom_text}`
if theme.footer.list.enable
- let projectList = theme.footer.list.project
#anzhiyu-footer
each item, index in projectList
.footer-group
.footer-title=item.title
.footer-links
each iten, indey in item.links
a.footer-item(title=iten.title href=url_for(iten.link))=iten.title
if theme.footer.list.randomFriends > 0
.footer-group
.footer-title-group
.footer-title=_p('footer.friend_links')
a.random-friends-btn#footer-random-friends-btn(href="javascript:addFriendLinksInFooter();" title=_p('footer.refresh_friends'))
i.anzhiyufont.anzhiyu-icon-arrow-rotate-right
.footer-links#friend-links-in-footer
if theme.footer.bdageitem.enable
p#ghbdages
each item in theme.footer.bdageitem.list
a.github-badge(target='_blank' href=item.link style='margin-inline:5px' data-title=item.message title=item.message)
img(src=item.shields alt=item.message)
if theme.footer.footerBar && theme.footer.footerBar.enable
#footer-bar
.footer-bar-links
.footer-bar-left
#footer-bar-tips
if theme.footer.owner.enable
- var nowYear = new Date().getFullYear()
- let authorLink = theme.footer.footerBar.authorLink ? theme.footer.footerBar.authorLink : config.url
if theme.footer.owner.since && theme.footer.owner.since != nowYear
.copyright!= `&copy;${theme.footer.owner.since} - ${nowYear} By `
a.footer-bar-link(href=url_for(authorLink) title=config.author target="_blank")=config.author
else
.copyright!= `&copy;${nowYear} By `
a.footer-bar-link(href=url_for(authorLink) title=config.author target="_blank")=config.author
#footer-type-tips
if theme.footer.footerBar && theme.footer.footerBar.subTitle && theme.footer.footerBar.subTitle.enable
.js-pjax
include ./third-party/footerBarSubtitle.pug
.footer-bar-right
each item in theme.footer.footerBar.linkList
a.footer-bar-link(href=url_for(item.link) title=item.text)=item.text
if theme.footer.footerBar.cc.enable
a.footer-bar-link.cc(href=url_for(theme.footer.footerBar.cc.link) title=_p('footer.cc_license'))
i.anzhiyufont.anzhiyu-icon-copyright-line
i.anzhiyufont.anzhiyu-icon-creative-commons-by-line
i.anzhiyufont.anzhiyu-icon-creative-commons-nc-line
i.anzhiyufont.anzhiyu-icon-creative-commons-nd-line

View File

@@ -0,0 +1,92 @@
- var pageTitle
- is_archive() ? page.title = findArchivesTitle(page, theme.menu, date) : ''
- if (is_tag()) pageTitle = _p('page.tag') + ': ' + page.tag
- else if (is_category()) pageTitle = _p('page.category') + ': ' + page.category
- else if (is_current('/404.html', [strict])) pageTitle = _p('error404')
- else pageTitle = page.title || config.title || ''
- var isSubtitle = config.subtitle ? ' - ' + config.subtitle : ''
- var tabTitle = is_home() || !pageTitle ? config.title + isSubtitle : pageTitle + ' | ' + config.title
- var pageKeywords
- if (page.keywords) pageKeywords = Array.isArray(page.keywords) ? (page.keywords).join(',') : ([]).join(',') || page.keywords
- else if (page.tags && page.tags.length) pageKeywords = page.tags.data.map(function(tag) {return tag.name;}).join(',')
- else pageKeywords = Array.isArray(config.keywords) ? (config.keywords).join(','): ([]).join(',') || config.keywords
- var pageAuthor = config.email ? config.author + ',' + config.email : config.author
- var pageCopyright = config.copyright || config.author
- var themeColorLight = theme.theme_color && theme.theme_color.enable && theme.theme_color.meta_theme_color_light || '#ffffff'
- var themeColorDark = theme.theme_color && theme.theme_color.enable && theme.theme_color.meta_theme_color_dark || '#0d0d0d'
- var themeColor = theme.display_mode === 'dark' ? themeColorDark : themeColorLight
meta(charset='UTF-8')
meta(http-equiv="X-UA-Compatible" content="IE=edge")
meta(name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no")
title= tabTitle
if pageKeywords
meta(name="keywords" content=pageKeywords)
meta(name="author" content=pageAuthor)
meta(name="copyright" content=pageCopyright)
meta(name ="format-detection" content="telephone=no")
meta(name="theme-color" content=themeColor)
meta(name="mobile-web-app-capable", content="yes")
meta(name="apple-touch-fullscreen", content="yes")
meta(name="apple-mobile-web-app-title", content=pageTitle)
meta(name="application-name", content=pageTitle)
meta(name="apple-mobile-web-app-capable", content="yes")
meta(name="apple-mobile-web-app-status-bar-style", content=themeColor)
//- Open_Graph
include ./head/Open_Graph.pug
!=favicon_tag(theme.favicon || config.favicon)
link(rel="canonical" href=urlNoIndex())
//- 預解析
!=partial('includes/head/preconnect', {}, {cache: true})
//- 網站驗證
!=partial('includes/head/site_verification', {}, {cache: true})
//- PWA
if (theme.pwa && theme.pwa.enable)
!=partial('includes/head/pwa', {}, {cache: true})
//- animation依赖
if (theme.icons && theme.icons.fontawesome_animation_css)
link(rel="stylesheet", href=url_for(theme.icons.fontawesome_animation_css))
//- main css
link(rel='stylesheet', href=url_for(theme.asset.main_css))
if (theme.icons && theme.icons.fontawesome)
link(rel='stylesheet', href=url_for(theme.asset.fontawesome) media="print" onload="this.media='all'")
if (theme.snackbar && theme.snackbar.enable)
link(rel='stylesheet', href=url_for(theme.asset.snackbar_css) media="print" onload="this.media='all'")
if theme.fancybox
link(rel='stylesheet' href=url_for(theme.asset.fancybox_css) media="print" onload="this.media='all'")
if site.data.essay || theme.home_top.swiper.enable
link(rel='stylesheet' href=url_for(theme.home_top.swiper.swiper_css) media="print" onload="this.media='all'")
//- google_adsense
!=partial('includes/head/google_adsense', {}, {cache: true})
//- analytics
!=partial('includes/head/analytics', {}, {cache: true})
//- font
if theme.blog_title_font && theme.blog_title_font.font_link
link(rel='stylesheet' href=url_for(theme.blog_title_font.font_link) media="print" onload="this.media='all'")
//- global config
!=partial('includes/head/config', {}, {cache: true})
include ./head/config_site.pug
include ./head/noscript.pug
!=fragment_cache('injectHeadJs', function(){return inject_head_js()})
!=fragment_cache('injectHead', function(){return injectHtml(theme.inject.head)})

View File

@@ -0,0 +1,18 @@
if theme.Open_Graph_meta
- let contentType = is_post() ? 'article' : 'website'
- let metaImage = (page.cover || theme.avatar.img) ? full_url_for(page.cover || theme.avatar.img) : ''
meta(property="og:type", content=contentType)
meta(property="og:title", content=pageTitle)
meta(property="og:url", content=theme.post_copyright.decode ? decodeURI(url) : url)
meta(property="og:site_name", content=config.title)
meta(property="og:description", content=page_description())
meta(property="og:locale", content=config.language)
meta(property="og:image", content=metaImage)
meta(property="article:author" content=config.author)
meta(property="article:tag" content=config.keywords)
meta(name="twitter:card", content="summary")
meta(name="twitter:image", content=metaImage)
meta(name="description" content=page_description())

View File

@@ -0,0 +1,31 @@
if theme.baidu_analytics
script.
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?!{theme.baidu_analytics}";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
if theme.google_analytics
script(async src=`https://www.googletagmanager.com/gtag/js?id=${theme.google_analytics}`)
script.
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '!{theme.google_analytics}');
if theme.cnzz_analytics
script(async data-pjax src=`https://s4.cnzz.com/z_stat.php?id=${theme.cnzz_analytics}&web_id=${theme.cnzz_analytics}`)
if theme.cloudflare_analytics
script(defer data-pjax src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon=`{"token": "${theme.cloudflare_analytics}"}`)
if theme.microsoft_clarity
script.
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "!{theme.microsoft_clarity}");

View File

@@ -0,0 +1,223 @@
-
let algolia = 'undefined';
let env = process.env;
if (theme.algolia_search.enable) {
algolia = JSON.stringify({
appId: env.ALGOLIA_APP_ID || config.algolia.appId || config.algolia.applicationID,
apiKey: env.ALGOLIA_API_KEY || config.algolia.apiKey,
indexName: env.ALGOLIA_INDEX_NAME || config.algolia.indexName,
hits: theme.algolia_search.hits,
// search languages
languages: {
input_placeholder: _p("search.algolia_search.input_placeholder"),
hits_empty: _p("search.algolia_search.hits_empty"),
hits_stats: _p("search.algolia_search.hits_stats"),
}
})
}
let localSearch = 'undefined';
if (theme.local_search && theme.local_search.enable) {
localSearch = JSON.stringify({
path: theme.local_search.CDN ? theme.local_search.CDN : config.root + config.search.path,
preload: theme.local_search.preload,
languages: {
// search languages
hits_empty: _p("search.local_search.hits_empty"),
}
})
}
let translate = 'undefined';
if (theme.translate && theme.translate.enable){
translate = JSON.stringify({
defaultEncoding: theme.translate.defaultEncoding,
translateDelay: theme.translate.translateDelay,
msgToTraditionalChinese: theme.translate.msgToTraditionalChinese,
msgToSimplifiedChinese: theme.translate.msgToSimplifiedChinese,
rightMenuMsgToTraditionalChinese: theme.translate.rightMenuMsgToTraditionalChinese,
rightMenuMsgToSimplifiedChinese: theme.translate.rightMenuMsgToSimplifiedChinese
})
}
let copyright = 'undefined';
if (theme.copy.enable){
copyright = JSON.stringify({
copy: theme.copy.enable,
copyrightEbable: theme.copy.copyright.enable,
limitCount: theme.copy.copyright.limit_count,
languages: {
author: _p("copy_copyright.author") + ': ' + config.author,
link: _p("copy_copyright.link") + ': ',
source: _p("copy_copyright.source") + ': ' + config.title,
info: _p("copy_copyright.info"),
copySuccess: _p("copy_copyright.copySuccess")
}
})
}
let Snackbar = 'undefined';
if (theme.snackbar && theme.snackbar.enable) {
Snackbar = JSON.stringify({
chs_to_cht: _p("Snackbar.chs_to_cht"),
cht_to_chs: _p("Snackbar.cht_to_chs"),
day_to_night: _p("Snackbar.day_to_night"),
night_to_day: _p("Snackbar.night_to_day"),
bgLight: theme.snackbar.bg_light,
bgDark: theme.snackbar.bg_dark,
position: theme.snackbar.position,
})
}
let noticeOutdate = 'undefined';
if (theme.noticeOutdate && theme.noticeOutdate.enable) {
noticeOutdate = JSON.stringify({
limitDay: theme.noticeOutdate.limit_day,
position: theme.noticeOutdate.position,
messagePrev: theme.noticeOutdate.message_prev,
messageNext: theme.noticeOutdate.message_next,
})
}
let highlight = 'undefined';
let syntaxHighlighter = config.syntax_highlighter;
let highlightEnable = syntaxHighlighter ? ['highlight.js', 'prismjs'].includes(syntaxHighlighter) : (config.highlight.enable || config.prismjs.enable);
if (highlightEnable) {
highlight = JSON.stringify({
plugin: syntaxHighlighter ? syntaxHighlighter : config.highlight.enable ? 'highlight.js' : 'prismjs',
highlightCopy: theme.highlight_copy,
highlightLang: theme.highlight_lang,
highlightHeightLimit: theme.highlight_height_limit
})
}
let friends_vue_info = 'undefined'
if (theme.friends_vue && theme.friends_vue.enable) {
friends_vue_info = JSON.stringify({
apiurl: theme.friends_vue.apiurl
})
}
let mainTone = 'undefined'
if (theme.mainTone && theme.mainTone.enable) {
mainTone = JSON.stringify({
mode: theme.mainTone.mode,
api: theme.mainTone.api,
cover_change: theme.mainTone.cover_change,
})
}
let authorStatus = 'undefined'
if (theme.author_status && theme.author_status.enable) {
authorStatus = JSON.stringify({
skills: theme.author_status.skills
})
}
let preloader = 'undefined'
if (theme.preloader && theme.preloader.enable) {
preloader = JSON.stringify({
source: theme.preloader.source
})
}
let commentBarrageConfig = 'undefined'
if (theme.comment_barrage_config && theme.comment_barrage_config.enable) {
commentBarrageConfig = JSON.stringify(theme.comment_barrage_config)
}
let greetingBox = 'undefined'
if (theme.greetingBox && theme.greetingBox.enable) {
greetingBox = JSON.stringify(theme.greetingBox)
}
let LA51 = 'undefined'
if (theme.LA && theme.LA.enable) {
LA51 = JSON.stringify(theme.LA)
}
let shortcutKey = 'undefined'
if (theme.shortcutKey && theme.shortcutKey.enable) {
shortcutKey = JSON.stringify(theme.shortcutKey)
}
let diytitle = 'undefined'
if (theme.diytitle && theme.diytitle.enable) {
diytitle = JSON.stringify(theme.diytitle)
}
let postHeadAiDescription = 'undefined'
if (theme.post_head_ai_description && theme.post_head_ai_description.enable) {
postHeadAiDescription = JSON.stringify(theme.post_head_ai_description)
}
let linkPageTop = 'undefined'
if (theme.linkPageTop && theme.linkPageTop.enable) {
linkPageTop = JSON.stringify(theme.linkPageTop)
}
let peoplecanvas = 'undefined'
if (theme.peoplecanvas && theme.peoplecanvas.enable) {
peoplecanvas = JSON.stringify(theme.peoplecanvas)
}
let music_page_default = 'undefined'
if (theme.music_page_default) {
music_page_default = JSON.stringify(theme.music_page_default)
}
script.
const GLOBAL_CONFIG = {
linkPageTop: !{linkPageTop},
peoplecanvas: !{peoplecanvas},
postHeadAiDescription: !{postHeadAiDescription},
diytitle: !{diytitle},
LA51: !{LA51},
greetingBox: !{greetingBox},
twikooEnvId: '!{theme.twikoo.envId}',
commentBarrageConfig:!{commentBarrageConfig},
music_page_default: !{music_page_default},
root: '!{config.root}',
preloader: !{preloader},
friends_vue_info: !{friends_vue_info},
navMusic: !{theme.nav_music.enable},
mainTone: !{mainTone},
authorStatus: !{authorStatus},
algolia: !{algolia},
localSearch: !{localSearch},
translate: !{translate},
noticeOutdate: !{noticeOutdate},
highlight: !{highlight},
copy: {
success: '!{_p("copy.success")}',
error: '!{_p("copy.error")}',
noSupport: '!{_p("copy.noSupport")}'
},
relativeDate: {
homepage: !{theme.post_meta.page.date_format === 'relative'},
simplehomepage: !{theme.post_meta.page.date_format === 'simple'},
post: !{theme.post_meta.post.date_format === 'relative'}
},
runtime: '!{theme.runtimeshow.enable ? _p("aside.card_webinfo.runtime.unit") : ""}',
date_suffix: {
just: '!{_p("date_suffix.just")}',
min: '!{_p("date_suffix.min")}',
hour: '!{_p("date_suffix.hour")}',
day: '!{_p("date_suffix.day")}',
month: '!{_p("date_suffix.month")}'
},
copyright: !{copyright},
lightbox: '!{ theme.medium_zoom ? "mediumZoom" : (theme.fancybox ? "fancybox" : "null" )}',
Snackbar: !{Snackbar},
source: {
justifiedGallery: {
js: '!{url_for(theme.asset.flickr_justified_gallery_js)}',
css: '!{url_for(theme.asset.flickr_justified_gallery_css)}'
}
},
isPhotoFigcaption: !{theme.photofigcaption},
islazyload: !{theme.lazyload.enable},
isAnchor: !{theme.anchor},
shortcutKey: !{shortcutKey},
autoDarkmode: !{theme.darkmode.enable && theme.darkmode.autoChangeMode === 1}
}

View File

@@ -0,0 +1,38 @@
-
const escapeQuote = (str) => str ? String(str).replace(/\\/g, '\\\\').replace(/'/g, "\\'").replace(/"/g, '\\"') : ''
const titleVal = escapeQuote(pageTitle)
const configTitleVal = escapeQuote(config.title)
const postAIVal = escapeQuote(page.ai)
const pageFillDescriptionVal = escapeQuote(get_page_fill_description())
let isHighlightShrink
if (theme.highlight_shrink == 'none') isHighlightShrink = 'undefined'
else if (page.highlight_shrink === true || page.highlight_shrink === false) isHighlightShrink = page.highlight_shrink
else isHighlightShrink = theme.highlight_shrink
var showToc = false
if (theme.aside.enable && page.aside !== false) {
let tocEnable = false
if (is_post()) {
if (theme.toc.post) tocEnable = true
} else if (is_page()) {
if (theme.toc.page) tocEnable = true
}
const pageToc = page.toc === true || page.toc === false ? page.toc : tocEnable
showToc = pageToc && (toc(page.content) !== '' || page.encrypt == true )
}
-
script#config-diff.
var GLOBAL_CONFIG_SITE = {
configTitle: '!{configTitleVal}',
title: '!{titleVal}',
postAI: '!{postAIVal}',
pageFillDescription: '!{pageFillDescriptionVal}',
isPost: !{is_post()},
isHome: !{is_home()},
isHighlightShrink: !{isHighlightShrink},
isToc: !{showToc},
postUpdate: '!{full_date(page.updated)}',
postMainColor: '!{page.main_color}',
}

View File

@@ -0,0 +1,9 @@
if (theme.google_adsense && theme.google_adsense.enable)
script(async src=theme.google_adsense.js)
if theme.google_adsense.auto_ads
script.
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: '!{theme.google_adsense.client}',
enable_page_level_ads: '!{theme.google_adsense.enable_page_level_ads}'
});

View File

@@ -0,0 +1,14 @@
noscript.
<style type="text/css">
#nav {
opacity: 1
}
.justified-gallery img {
opacity: 1
}
#recent-posts time,
#post-meta time {
display: inline !important
}
</style>

View File

@@ -0,0 +1,39 @@
-
const { internal_provider, third_party_provider, custom_format } = theme.CDN
const providers = {
'jsdelivr': '//cdn.jsdelivr.net',
'cdnjs': '//cdnjs.cloudflare.com',
'unpkg': '//unpkg.com',
'elemecdn': '//npm.elemecdn.com',
'onmicrosoft': '//npm.onmicrosoft.cn',
'cbd': '//cdn.cbd.int',
'anheyu': '//cdn.anheyu.com',
'custom': custom_format && custom_format.match(/^((https?:)?(\/\/[^/]+)|([^/]+))(\/|$)/)[1]
}
-
if internal_provider === third_party_provider && internal_provider !== 'local'
link(rel="preconnect" href=providers[internal_provider])
else
if internal_provider !== 'local'
link(rel="preconnect" href=providers[internal_provider])
if third_party_provider !== 'local'
link(rel="preconnect" href=providers[third_party_provider])
if theme.google_analytics
link(rel="preconnect" href="//www.google-analytics.com" crossorigin='')
if theme.baidu_analytics
link(rel="preconnect" href="//hm.baidu.com")
if theme.cloudflare_analytics
link(rel="preconnect" href="//static.cloudflareinsights.com")
if theme.microsoft_clarity
link(rel="preconnect" href="//www.clarity.ms")
if theme.blog_title_font && theme.blog_title_font.font_link && theme.blog_title_font.font_link.indexOf('//fonts.googleapis.com') != -1
link(rel="preconnect" href="//fonts.googleapis.com" crossorigin='')
if !theme.asset.busuanzi && (theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv)
link(rel="preconnect" href="//busuanzi.ibruce.info")

View File

@@ -0,0 +1,59 @@
link(rel="manifest" href=url_for(theme.pwa.manifest))
if(theme.pwa.theme_color)
meta(name="msapplication-TileColor" content=theme.pwa.theme_color)
if(theme.pwa.mask_icon)
link(rel="mask-icon" href=url_for(theme.pwa.mask_icon) color="#5bbad5")
if(theme.pwa.apple_touch_icon)
link(rel="apple-touch-icon" sizes="180x180" href=url_for(theme.pwa.apple_touch_icon))
link(rel="apple-touch-icon-precomposed", sizes="180x180", href=url_for(theme.pwa.apple_touch_icon))
if(theme.pwa.favicon_32_32)
link(rel="icon" type="image/png" sizes="32x32" href=url_for(theme.pwa.favicon_32_32))
if(theme.pwa.favicon_16_16)
link(rel="icon" type="image/png" sizes="16x16" href=url_for(theme.pwa.favicon_16_16))
if(theme.pwa.bookmark_icon)
link(rel="bookmark", href=url_for(theme.pwa.bookmark_icon))
if(theme.pwa.startup_image_enable)
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-2048-2732.jpg", media="(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-2732-2048.jpg", media="(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-1668-2388.jpg", media="(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-2388-1668.jpg", media="(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-1536-2048.jpg", media="(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-2048-1536.jpg", media="(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-1668-2224.jpg", media="(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-2224-1668.jpg", media="(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-1620-2160.jpg", media="(device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-2160-1620.jpg", media="(device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-1290-2796.jpg", media="(device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-2796-1290.jpg", media="(device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-1179-2556.jpg", media="(device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-2556-1179.jpg", media="(device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-1284-2778.jpg", media="(device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-2778-1284.jpg", media="(device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-1170-2532.jpg", media="(device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-2532-1170.jpg", media="(device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-1125-2436.jpg", media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-2436-1125.jpg", media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-1242-2688.jpg", media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-2688-1242.jpg", media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-828-1792.jpg", media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-1792-828.jpg", media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-1242-2208.jpg", media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-2208-1242.jpg", media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-750-1334.jpg", media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-1334-750.jpg", media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-640-1136.jpg", media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)")
link(rel="apple-touch-startup-image", href="/img/siteicon/apple-splash-1136-640.jpg", media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)")
//- script.
//- if ('serviceWorker' in navigator) {
//- if (navigator.serviceWorker.controller) {
//- navigator.serviceWorker.addEventListener('controllerchange', function() {
//- location.reload()
//- })
//- }
//- window.addEventListener('load', function() {
//- navigator.serviceWorker.register('/service-worker.js')
//- })
//- }

View File

@@ -0,0 +1,3 @@
if theme.site_verification
each item in theme.site_verification
meta(name=item.name content=item.content)

View File

@@ -0,0 +1,59 @@
if !theme.disable_top_img && page.top_img !== false
if is_post()
- var top_img = page.top_img || page.cover || page.randomcover
else if is_page()
- var top_img = page.top_img || theme.default_top_img
else if is_home()
- var top_img = theme.index_img !== false ? theme.index_img || theme.default_top_img : false
- var home_index_img = theme.index_img !== false ? theme.index_img || theme.default_top_img : false
else
- var top_img = page.top_img || theme.default_top_img
if top_img !== false
- var imgSource = top_img && top_img.indexOf('/') !== -1 ? url_for(top_img) : top_img
- var bg_img = top_img ? imgSource : ''
- var home_index_img_bg = home_index_img ? home_index_img : ''
- var site_title = page.title || page.tag || page.category || config.title
- var isHomeClass = is_home() ? 'full_page' : 'not-home-page'
- is_post() ? isHomeClass = 'post-bg' : isHomeClass
else
- var isHomeClass = 'not-top-img'
else
- var top_img = false
- var isHomeClass = 'not-top-img'
header#page-header(class=`${isHomeClass}` style=home_index_img_bg)
!=partial('includes/header/nav', {}, {cache: true})
if top_img !== false
if is_post()
if page.bilibili_bg
!=partial('includes/bili-banner/index')
else
include ./post-info.pug
if theme.dynamicEffect && theme.dynamicEffect.postTopWave
section.main-hero-waves-area.waves-area
svg.waves-svg(xmlns='http://www.w3.org/2000/svg', xlink='http://www.w3.org/1999/xlink', viewBox='0 24 150 28', preserveAspectRatio='none', shape-rendering='auto')
defs
path#gentle-wave(d='M -160 44 c 30 0 58 -18 88 -18 s 58 18 88 18 s 58 -18 88 -18 s 58 18 88 18 v 44 h -352 Z')
g.parallax
use(href='#gentle-wave', x='48', y='0')
use(href='#gentle-wave', x='48', y='3')
use(href='#gentle-wave', x='48', y='5')
use(href='#gentle-wave', x='48', y='7')
#post-top-cover
img#post-top-bg(class='nolazyload' src=bg_img)
else if is_home()
#site-info
h1#site-title=site_title
if theme.subtitle.enable
- var loadSubJs = true
#site-subtitle
span#subtitle
if(theme.social)
#site_social_icons
!=fragment_cache('social', function(){return partial('includes/header/social')})
#scroll-down
i.anzhiyufont.anzhiyu-icon-angle-down.scroll-down-effects
else
#page-site-info
h1#site-title=site_title

View File

@@ -0,0 +1,49 @@
if theme.menu
//- for mobile sidebar
- let sidebarChildHide = theme.hide_sidebar_menu_child ? 'hide' : ''
.menus_items
each value, label in theme.menu
if typeof value !== 'object'
.menus_item
a.site-page.faa-parent.animated-hover(href=url_for(trim(value.split('||')[0])))
if value.split('||')[1]
- var icon_value = trim(value.split('||')[1])
- var anima_value = value.split('||')[2] ? trim(value.split('||')[2]) : 'faa-tada'
if icon_value.substring(0,2)=="fa"
i(class=icon_value + ' ' + anima_value)
else if icon_value.substring(0,4)=="icon"
svg.icon(aria-hidden="true" class=anima_value)
use(xlink:href=`#`+ icon_value)
else if icon_value.substring(0,4)=="anzhiyu"
i.anzhiyufont(style="font-size: 0.9em;" class=icon_value + ' ' + anima_value)
span=' '+label
else
.menus_item
a.site-page(href='javascript:void(0);')
if label.split('||')[1]
- var icon_label = trim(label.split('||')[1])
- var anima_label = label.split('||')[2] ? trim(label.split('||')[2]) : 'faa-tada'
if icon_label.substring(0,2)=="fa"
i(class=icon_label + ' ' + anima_label)
else if (icon_label.startsWith("icon"))
svg.icon(aria-hidden="true" class=anima_label)
use(xlink:href=`#`+ icon_label)
else if (icon_label.startsWith("anzhiyu"))
i.anzhiyufont(style="font-size: 0.9em;" class=icon_label + ' ' + anima_label)
span=' '+ trim(label.split('||')[0])
ul.menus_item_child
each val,lab in value
li
a.site-page.child.faa-parent.animated-hover(href=url_for(trim(val.split('||')[0])))
if val.split('||')[1]
- var icon_val = trim(val.split('||')[1])
- var anima_val = val.split('||')[2] ? trim(val.split('||')[2]) : 'faa-tada'
if icon_val.substring(0,2)=="fa"
i(class=icon_val + ' ' + anima_val)
else if (icon_val.startsWith("icon"))
svg.icon(aria-hidden="true" class=anima_val)
use(xlink:href=`#`+ icon_val)
else if (icon_val.startsWith("anzhiyu"))
i.anzhiyufont(style="font-size: 0.9em;" class=icon_val + ' ' + anima_val)
span=' '+ lab

View File

@@ -0,0 +1,61 @@
- const { darkmode } = theme
nav#nav
#nav-group
span#blog_name
if theme.nav.enable
.back-home-button
i.anzhiyufont.anzhiyu-icon-grip-vertical
.back-menu-list-groups
each group in theme.nav.menu
.back-menu-list-group
.back-menu-list-title= group.title
.back-menu-list
each item in group.item
a.back-menu-item(href=url_for(item.link), title=item.name)
img.back-menu-item-icon(src=item.icon alt=item.name)
span.back-menu-item-text= item.name
a#site-name(href=url_for('/') accesskey="h")
.title #[=config.title]
i.anzhiyufont.anzhiyu-icon-house-chimney
if (theme.nav.clock)
!=partial('includes/anzhiyu/clock', {}, {cache: true})
div.mask-name-container
#name-container
a#page-name(href="javascript:anzhiyu.scrollToDest(0, 500)") PAGE_NAME
#menus
!=partial('includes/header/menu_item', {}, {cache: true})
#nav-right
if theme.nav.travelling
.nav-button.only-home#travellings_button(title=_p('nav.travelling'))
a.site-page(onclick='anzhiyu.totraveling()', title=_p('nav.travelling'), href='javascript:void(0);', rel='external nofollow', data-pjax-state='external')
i.anzhiyufont.anzhiyu-icon-train
.nav-button#randomPost_button
a.site-page(onclick='toRandomPost()', title=_p('nav.random_post'), href='javascript:void(0);')
i.anzhiyufont.anzhiyu-icon-dice
if (theme.algolia_search.enable || theme.local_search.enable || theme.docsearch.enable)
div.nav-button#search-button
a.site-page.social-icon.search(href='javascript:void(0);', title=_p('nav.search') accesskey="s")
i.anzhiyufont.anzhiyu-icon-magnifying-glass
span=' '+_p('search.title')
if theme.centerConsole.enable
input#center-console(type="checkbox")
label.widget(for="center-console" title=_p('console.title') onclick="anzhiyu.switchConsole();")
i.left
i.widget.center
i.widget.right
!=partial('includes/anzhiyu/console', {}, {cache:true})
div.nav-button#nav-totop
a.totopbtn(href='javascript:void(0);')
i.anzhiyufont.anzhiyu-icon-arrow-up
span#percent(onclick="anzhiyu.scrollToDest(0,500)") 0
#toggle-menu
a.site-page(href='javascript:void(0);' title=_p('nav.toggle_menu'))
i.anzhiyufont.anzhiyu-icon-bars

View File

@@ -0,0 +1,145 @@
- let comments = theme.comments
#post-info
#post-firstinfo
.meta-firstline
if (page.copyright_author && page.copyright_author !== config.author)
a.post-meta-original 转载
else
a.post-meta-original 原创
if (theme.post_meta.post.categories && page.categories && page.categories.data.length > 0)
span.post-meta-categories
if (theme.post_meta.post.date_type)
span.post-meta-separator
each item, index in page.categories.data
i.anzhiyufont.anzhiyu-icon-inbox.post-meta-icon
a(href=url_for(item.path) itemprop="url").post-meta-categories #[=item.name]
if (index < page.categories.data.length - 1)
i.anzhiyufont.anzhiyu-icon-angle-right.post-meta-separator
if (theme.post_meta.page.tags)
span.article-meta.tags
each item, index in page.tags.data
a(href=url_for(item.path) tabindex="-1" itemprop="url").article-meta__tags
span
i.anzhiyufont.anzhiyu-icon-hashtag
=item.name
h1.post-title(itemprop="name headline")= page.title || _p('no_title')
if (theme.post_edit.enable && (theme.post_edit.github !== false))
a.post-edit-link(href=theme.post_edit.url + page.source title=_p('post.edit.github') + ' - ' + page.title target="_blank")
i.anzhiyufont.anzhiyu-icon-pencil
if (theme.post_edit.enable && (theme.post_edit.yuque !== false))
a.post-edit-link(href=theme.post_edit.yuque + page.id + '/edit/' title=_p('post.edit.yuque') + ' - ' + page.title target="_blank")
i.anzhiyufont.anzhiyu-icon-pencil
#post-meta
.meta-firstline
if (theme.post_meta.post.date_type)
span.post-meta-date
if (theme.post_meta.post.date_type === 'both')
i.anzhiyufont.anzhiyu-icon-calendar-days.post-meta-icon
span.post-meta-label= _p('post.created')
time.post-meta-date-created(itemprop="dateCreated datePublished" datetime=date_xml(page.date) title=_p('post.created') + ' ' + full_date(page.date))=date(page.date, config.date_format)
span.post-meta-separator
i.anzhiyufont.anzhiyu-icon-history.post-meta-icon
span.post-meta-label= _p('post.updated')
time.post-meta-date-updated(itemprop="dateCreated datePublished" datetime=date_xml(page.updated) title=_p('post.updated') + ' ' + full_date(page.updated))=date(page.updated, config.date_format)
else
- let data_type_update = theme.post_meta.post.date_type === 'updated'
- let date_type = data_type_update ? 'updated' : 'date'
- let date_icon = data_type_update ? 'anzhiyu-icon-history' :'anzhiyu-icon-calendar-days'
- let date_title = data_type_update ? _p('post.updated') : _p('post.created')
i.post-meta-icon.anzhiyufont(class=date_icon)
span.post-meta-label= date_title
time(itemprop="dateCreated datePublished" datetime=date_xml(page[date_type]) title=date_title + ' ' + full_date(page[date_type]))=date(page[date_type], config.date_format)
.meta-secondline
- let postWordcount = theme.wordcount.enable && (theme.wordcount.post_wordcount || theme.wordcount.min2read)
if (postWordcount)
span.post-meta-separator
span.post-meta-wordcount
if theme.wordcount.post_wordcount
i.anzhiyufont.anzhiyu-icon-file-word.post-meta-icon(title="文章字数")
span.post-meta-label(title="文章字数")= _p('post.wordcount') + ':'
span.word-count(title="文章字数")= wordcount(page.content)
if theme.wordcount.min2read
span.post-meta-separator
if theme.wordcount.min2read
i.anzhiyufont.anzhiyu-icon-clock.post-meta-icon(title="阅读时长")
span.post-meta-label(title="阅读时长")= _p('post.min2read') + ':'
span= min2read(page.content, {cn: 350, en: 160}) + _p('post.min2read_unit')
//- for pv and count
mixin pvBlock(parent_id,parent_class,parent_title)
span.post-meta-separator
span(class=parent_class id=parent_id data-flag-title=page.title)
i.anzhiyufont.anzhiyu-icon-fw-eye.post-meta-icon
span.post-meta-label(title="阅读量")=_p('post.page_pv') + ':'
if block
block
- const commentUse = comments.use
if page.comments !== false && commentUse && !comments.lazyload
if commentUse[0] === 'Valine' && theme.valine.visitor
+pvBlock(url_for(page.path),'leancloud_visitors',page.title)
span.leancloud-visitors-count(title="访问量")
i.anzhiyufont.anzhiyu-icon-spinner.anzhiyu-spin
else if commentUse[0] === 'Waline' && theme.waline.pageview
+pvBlock('','','')
span.waline-pageview-count(data-path=url_for(page.path) title="访问量")
i.anzhiyufont.anzhiyu-icon-spinner.anzhiyu-spin
else if commentUse[0] === 'Twikoo' && theme.twikoo.visitor
+pvBlock('','','')
span#twikoo_visitors(title="访问量")
i.anzhiyufont.anzhiyu-icon-spinner.anzhiyu-spin
else if commentUse[0] === 'Artalk' && theme.artalk.visitor
+pvBlock('','','')
span#ArtalkPV
i.anzhiyufont.anzhiyu-icon-spinner.anzhiyu-spin
else if theme.busuanzi.page_pv
+pvBlock('','post-meta-pv-cv','')
span#busuanzi_value_page_pv
i.anzhiyufont.anzhiyu-icon-spinner.anzhiyu-spin
else if theme.busuanzi.page_pv
+pvBlock('','post-meta-pv-cv','')
span#busuanzi_value_page_pv
i.anzhiyufont.anzhiyu-icon-spinner.anzhiyu-spin
- let location = page.location ? page.location : theme.post_copyright.location
if theme.post_copyright.enable && location
span.post-meta-separator
span.post-meta-position(title="作者IP属地为" + location)
i.anzhiyufont.anzhiyu-icon-location-dot
=location
if comments.count && !comments.lazyload && page.comments !== false && comments.use
- var whichCount = comments.use[0]
mixin countBlock
span.post-meta-separator
span.post-meta-commentcount
i.anzhiyufont.anzhiyu-icon-comments.post-meta-icon
span.post-meta-label= _p('post.comments') + ':'
if block
block
case whichCount
when 'Valine'
+countBlock
a(href=url_for(page.path) + '#post-comment' itemprop="discussionUrl")
span.valine-comment-count(data-xid=url_for(page.path) itemprop="commentCount")
i.anzhiyufont.anzhiyu-icon-spinner.anzhiyu-spin
when 'Waline'
+countBlock
a(href=url_for(page.path) + '#post-comment')
span.waline-comment-count(data-path=url_for(page.path))
i.anzhiyufont.anzhiyu-icon-spinner.anzhiyu-spin
when 'Twikoo'
+countBlock
a(href=url_for(page.path) + '#post-comment' tabindex="-1")
span#twikoo-count
i.anzhiyufont.anzhiyu-icon-spinner.anzhiyu-spin
when 'Artalk'
+countBlock
a(href=url_for(page.path) + '#post-comment')
span.artalk-count(data-page-key=url_for(page.path))
i.anzhiyufont.anzhiyu-icon-spinner.anzhiyu-spin

View File

@@ -0,0 +1,12 @@
each value, title in theme.social
a.social-icon.faa-parent.animated-hover(href=url_for(trim(value.split('||')[0])) target="_blank" title=title === undefined ? '' : trim(title))
if value.split('||')[1]
- var icon_value = trim(value.split('||')[1])
- var anima_value = value.split('||')[2] ? trim(value.split('||')[2]) : 'faa-tada'
if (icon_value.startsWith("fa"))
i(class=icon_value + ' ' + anima_value)
else if (icon_value.startsWith("icon"))
svg.icon(aria-hidden="true" class=anima_value)
use(xlink:href=`#`+ icon_value)
else if (icon_value.startsWith("anzhiyu"))
i.anzhiyufont(class=icon_value)

View File

@@ -0,0 +1,91 @@
- var htmlClassHideAside = theme.aside.enable && theme.aside.hide ? 'hide-aside' : ''
- page.aside = is_archive() ? theme.aside.display.archive: is_category() ? theme.aside.display.category : is_tag() ? theme.aside.display.tag : page.aside
- var hideAside = !theme.aside.enable || page.aside === false ? 'hide-aside' : ''
- var pageType = is_post() ? 'post' : 'page'
doctype html
html(lang=config.language data-theme=theme.display_mode class=htmlClassHideAside)
head
include ./head.pug
body(data-type="anzhiyu")
#web_bg
#an_music_bg
if theme.preloader.enable
!=partial('includes/loading/index', {}, {cache: true})
if (theme.mourn.enable && is_home_first_page())
include ./mourn.pug
if page.type !== '404'
#body-wrap(class=pageType)
include ./header/index.pug
main#blog-container
if (is_home())
include ./bbTimeList.pug
if is_current("/")
include ./top/top.pug
if page.top_single
- let background = page.top_single_background
- let tip = page.top_single_tip
- let subTitle = page.top_single_subtitle
- let btn_link = page.top_single_btn_link
- let btn_text = page.top_single_btn_text
#single_top
.author-content.author-content-item.single(style=`${background ? `background: url(${background}) top / cover no-repeat;` : ""}`)
.card-content
.author-content-item-tips=subTitle
span.author-content-item-title=page.title
.content-bottom
.tips=tip
.banner-button-group
a.banner-button(onclick=`pjax.loadUrl("${url_for(btn_link ? btn_link : '/about')}")`)
i.anzhiyufont.anzhiyu-icon-arrow-circle-right(style='font-size: 1.5rem')
span.banner-button-text=btn_text ? btn_text : "关于我"
#content-inner.layout(class=hideAside)
if body
div!= body
else
block content
if theme.aside.enable && page.aside !== false
include widget/index.pug
- var footerBg = theme.footer_bg
if (footerBg)
if (footerBg === true)
- var footer_bg = bg_img
else
- var footer_bg = theme.footer_bg.indexOf('/') !== -1 ? `background-image: url('${url_for(footerBg)}')` : `background: ${footerBg}`
else
- var footer_bg = ''
footer#footer(style=footer_bg)
!=partial('includes/footer', {}, {cache: true})
if (theme.agreementPopup && theme.agreementPopup.enable && is_home_first_page())
- let agreementPopupUrl = theme.agreementPopup.url
script(defer).
var hasShownPopup = sessionStorage.getItem('sessionNegotiatePopupShown');
if (!hasShownPopup) {
setTimeout(() => {
anzhiyuPopupManager && anzhiyuPopupManager.enqueuePopup('协议提醒助手', '查看本站为你的个人隐私做出的努力', '#{agreementPopupUrl}', 4000);
sessionStorage.setItem('sessionNegotiatePopupShown', 'true');
}, 1000);
}
else
include ./404.pug
!=partial('includes/sidebar', {}, {cache: true})
if theme.shortcutKey.enable
!=partial('includes/shortcutKey', {}, {cache: true})
include ./rightside.pug
if (theme.nav_music.enable || theme.nav_music.console_widescreen_music)
include ./music.pug
!=partial('includes/third-party/search/index', {}, {cache: true})
!=partial('includes/anzhiyu/rightmenu', {}, {cache:true})
include ./additional-js.pug
//- 弹窗通知
!=partial('includes/popup/index', {}, {cache: true})

View File

@@ -0,0 +1,21 @@
- loading_img = theme.preloader.avatar ? theme.preloader.avatar : theme.avatar.img
#loading-box(onclick='document.getElementById("loading-box").classList.add("loaded")')
.loading-bg
img.loading-img(alt="加载头像" class='nolazyload' src=url_for(loading_img))
.loading-image-dot
script.
const preloader = {
endLoading: () => {
document.getElementById('loading-box').classList.add("loaded");
},
initLoading: () => {
document.getElementById('loading-box').classList.remove("loaded")
}
}
window.addEventListener('load',()=> { preloader.endLoading() })
setTimeout(function(){preloader.endLoading();},10000)
if (!{theme.pjax && theme.pjax.enable}) {
document.addEventListener('pjax:send', () => { preloader.initLoading() })
document.addEventListener('pjax:complete', () => { preloader.endLoading() })
}

View File

@@ -0,0 +1,7 @@
if theme.preloader.source === 1
include ./fullpage-loading.pug
else if theme.preloader.source === 2
include ./pace.pug
else
include ./fullpage-loading.pug
include ./pace.pug

View File

@@ -0,0 +1,2 @@
link(rel="stylesheet", href=url_for(theme.preloader.pace_css_url || theme.asset.pace_default_css))
script(async src=url_for(theme.asset.pace_js), data-pace-options='{ "restartOnRequestAfter":false,"eventLag":false}')

View File

@@ -0,0 +1,37 @@
mixin articleSort(posts, current)
.article-sort
- var year
- let modifiedUrl
- posts.each(function (article, post_index) {
- let tempYear = date(article.date, 'YYYY')
- let no_cover = article.cover === false || !theme.cover.archives_enable ? 'no-article-cover' : ''
- let title = article.title || _p('no_title')
- let pageThumbnailSuffix = theme.pageThumbnailSuffix
if (pageThumbnailSuffix && theme.pageThumbnailSuffix.startsWith("!") && article.cover && article.cover.includes("!"))
- let imageUrl = article.cover.substring(0, article.cover.indexOf("!"))
- modifiedUrl = imageUrl + pageThumbnailSuffix
else
- modifiedUrl = article.cover
if tempYear !== year
- year = tempYear
.article-sort-item.year
span= year
.article-sort-item(class=no_cover)
if article.cover && theme.cover.archives_enable
a.article-sort-item-img(href=url_for(article.path) title=title)
img(src=url_for(modifiedUrl) alt=title onerror=`this.onerror=null;this.src='${url_for(theme.error_img.post_page)}'`)
.article-sort-item-info
a.article-sort-item-title(href=url_for(article.path) title=title)= title
span.article-sort-item-index= (current - 1) * config.per_page + post_index + 1
.article-meta-wrap
if (theme.post_meta.page.tags && article.tags.data.length > 0)
span.article-sort-item-tags
each item, index in article.tags.data
a(href=url_for(item.path) tabindex="-1").article-meta__tags
span
i.anzhiyufont.anzhiyu-icon-hashtag
=item.name
.article-sort-item-time
i.anzhiyufont.anzhiyu-icon-calendar-alt
time.post-meta-date-created(datetime=date_xml(article.date) title=_p('post.created') + ' ' + full_date(article.date))= date(article.date, config.date_format)
- })

View File

@@ -0,0 +1,122 @@
- let maxDate = 0
each item in site.posts.data
if item.date > maxDate
- maxDate = item.date
mixin postUI(posts)
each article , index in page.posts.data
- let link = article.link || article.path
div(class = (index === 0 ? 'recent-post-item lastestpost-item' : 'recent-post-item') onclick=`pjax.loadUrl('${url_for(link)}')`)
-
let title = article.title || _p('no_title')
const position = theme.cover.position
let leftOrRight = position === 'both'
? index%2 == 0 ? 'left' : 'right'
: position === 'left' ? 'left' : 'right'
let post_cover = article.cover
let no_cover = article.cover === false || !theme.cover.index_enable ? 'no-cover' : ''
-
- const new_post = is_current('/') && (maxDate === article.date)
if post_cover && theme.cover.index_enable
.post_cover(class=leftOrRight)
a(href=url_for(link) title=title style='display: flex;height: 100%;')
img.post_bg(src=url_for(post_cover) onerror=`this.onerror=null;this.src='`+ url_for(theme.error_img.post_page) + `'` alt=title style='pointer-events: none')
.recent-post-info(class=no_cover)
.recent-post-info-top
.recent-post-info-top-tips
if (is_home() && (article.top || article.sticky > 0))
span.article-meta.sticky-warp
i.anzhiyufont.anzhiyu-icon-thumbtack.sticky
span.sticky= _p('sticky')
if (theme.post_meta.page.categories && article.categories.data.length > 0)
each item, index in article.categories.data
.article-categories-original=item.name
if new_post
span.newPost=_p('post.new')
a.unvisited-post(href=url_for(link) title=title)=_p('post.unread')
a.article-title(href=url_for(link) title=title)= title
.article-meta-wrap
if (theme.post_meta.page.date_type)
span.post-meta-date
if (theme.post_meta.page.date_type === 'both')
i.anzhiyufont.anzhiyu-icon-calendar-alt(style=`${theme.post_meta.page.date_format==="simple" ? "display:none":""}`)
span.article-meta-label=_p('post.created')
time.post-meta-date-created(datetime=date_xml(article.date) title=_p('post.created') + ' ' + full_date(article.date) time=full_date(article.date))=date(article.date, config.date_format)
span.article-meta-separator
i.anzhiyufont.anzhiyu-icon-history(style=`font-size: 15px; ${theme.post_meta.page.date_format==="simple" ? "display:none":""}`)
span.article-meta-label=_p('post.updated')
time.post-meta-date-updated(datetime=date_xml(article.updated) title=_p('post.updated') + ' ' + full_date(article.updated) time=full_date(article.updated))=date(article.updated, config.date_format)
else
- let data_type_updated = theme.post_meta.page.date_type === 'updated'
- let date_type = data_type_updated ? 'updated' : 'date'
- let date_type_other = data_type_updated ? 'date' : 'updated'
- let date_icon = data_type_updated ? 'anzhiyu-icon-history' :'anzhiyu-icon-calendar-days'
- let date_title = data_type_updated ? _p('post.updated') : _p('post.created')
- let date_title_other = data_type_updated ? _p('post.created') : _p('post.updated')
i.anzhiyufont(class=date_icon style=`font-size: 15px; ${theme.post_meta.page.date_format==="simple" ? "display:none":""}`)
span.article-meta-label=date_title
time(datetime=date_xml(article[date_type]) title=date_title + ' ' + full_date(article[date_type]) time=full_date(article[date_type]))=date(article[date_type], config.date_format)
time(datetime=date_xml(article[date_type_other]), class="time_hidden", title=date_title_other + ' ' + full_date(article[date_type_other]) time=full_date(article[date_type_other]))=date(article[date_type_other], config.date_format)
if (theme.post_meta.page.tags && article.tags.data.length > 0)
span.article-meta.tags
each item, index in article.tags.data
a(href=url_for(item.path) event.cancelbubble onclick="window.event.cancelBubble=true;").article-meta__tags
span
i.anzhiyufont.anzhiyu-icon-hashtag
=item.name
mixin countBlockInIndex
- needLoadCountJs = true
span.article-meta
span.article-meta-separator
i.anzhiyufont.anzhiyu-icon-comments
if block
block
span.article-meta-label= ' ' + _p('card_post_count')
if theme.comments.card_post_count
case theme.comments.use[0]
when 'Valine'
+countBlockInIndex
a(href=url_for(link) + '#post-comment')
span.valine-comment-count(data-xid=url_for(link))
i.anzhiyufont.anzhiyu-icon-spinner.anzhiyu-spin
when 'Waline'
+countBlockInIndex
a(href=url_for(link) + '#post-comment')
span.waline-comment-count(id=url_for(link))
i.anzhiyufont.anzhiyu-icon-spinner.anzhiyu-spin
when 'Twikoo'
+countBlockInIndex
a.twikoo-count(href=url_for(link) + '#post-comment' tabindex="-1")
i.anzhiyufont.anzhiyu-icon-spinner.anzhiyu-spin
when 'Artalk'
+countBlockInIndex
a(href=url_for(link) + '#post-comment')
span.artalk-count(data-page-key=url_for(link))
i.anzhiyufont.anzhiyu-icon-spinner.anzhiyu-spin
//- Display the article introduction on homepage
case theme.index_post_content.method
when false
- break
when 1
.content!= article.description
when 2
if article.description
.content!= article.description
else
- const content = strip_html(article.content)
- let expert = content.substring(0, theme.index_post_content.length)
- content.length > theme.index_post_content.length ? expert += ' ...' : ''
.content!= expert
default
- const content = strip_html(article.content)
- let expert = content.substring(0, theme.index_post_content.length)
- content.length > theme.index_post_content.length ? expert += ' ...' : ''
.content!= expert
if theme.ad && theme.ad.index
if (index + 1) % 3 == 0
.recent-post-item.ads-wrap!=theme.ad.index

View File

@@ -0,0 +1,9 @@
script.
function initMourn() {
const date = new Date();
const today = (date.getMonth() + 1) + "-" + date.getDate()
const mourn_days = !{JSON.stringify(theme.mourn.days)}
if (mourn_days.includes(today)) {
document.documentElement.style.filter = "grayscale(1)";
}}
initMourn();

View File

@@ -0,0 +1,7 @@
- const nav_music_id = theme.nav_music.id
- const nav_music_server = theme.nav_music.server
- const nav_music_volume = theme.nav_music.volume
#nav-music
a#nav-music-hoverTips(onclick='anzhiyu.musicToggle()' accesskey="m") 播放音乐
#console-music-bg
meting-js(id=nav_music_id server=nav_music_server type="playlist" mutex="true" preload="none" theme="var(--anzhiyu-main)" data-lrctype="0" order="random" volume=nav_music_volume)

View File

@@ -0,0 +1,500 @@
if site.data.about
- let aboutData = site.data.about
each item in aboutData
- let subtitle = item.subtitle || config.subtitle
- let avatarImg = item.avatarImg || theme.avatar.img
- let aboutName = item.name || theme.author
- let aboutDescription = item.description || config.description
- let helloAbout = item.helloAbout
- let skillsTips = item.skillsTips
- let careers = item.careers
- let crrList = careers.list
- let crrItem = careers.item
- let avatarSkills = item.avatarSkills
#about-page
.author-box
if avatarSkills
.author-tag-left
each item in avatarSkills.left
span.author-tag=item
.author-img
img.no-lightbox(src=url_for(avatarImg) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt="avatar")
if avatarSkills
.author-tag-right
each item in avatarSkills.right
span.author-tag=item
p.p.center.logo.large=_p('about.title')
p.p.center.small=subtitle
.author-content
.author-content-item.myInfoAndSayHello
.title1=_p('about.hello')
.title2
=_p('about.im')
|
span.inline-word=aboutName
.title1=aboutDescription
.aboutsiteTips.author-content-item
- let { tips, title1, title2, word } = item.aboutsiteTips
.author-content-item-tips= tips
h2
= title1
br
= title2
.mask
each wordItem, index in word
if index < word.length - 2
span(class=(index === 0 ? 'first-tips' : ''))= wordItem
span(data-up)= word[word.length - 2]
|
span(data-show)= word[word.length - 1]
.hello-about
.cursor(style='translate:none;rotate:none;scale:none;transform:translate(721px,180px)')
.shapes
.shape.shape-1(style='translate:none;rotate:none;scale:none;transform:translate(721px,180px)')
.shape.shape-2(style='translate:none;rotate:none;scale:none;transform:translate(721px,180px)')
.shape.shape-3(style='translate:none;rotate:none;scale:none;transform:translate(721px,180px)')
.content
h1=helloAbout
.author-content
.author-content-item.skills
.card-content
.author-content-item-tips=skillsTips.tips
span.author-content-item-title=skillsTips.title
.skills-style-group
include ../anzhiyu/tags-group-all.pug
if site.data.creativity
.skills-list
each i in site.data.creativity
each item, index in i.creativity_list
.skill-info
.skill-icon(style=`background: ${item.color}`)
img.no-lightbox(title=item.name, src=item.icon, alt=item.name)
.skill-name
span=item.name
.etc ...
.author-content-item.careers
.card-content
.author-content-item-tips=careers.tips
span.author-content-item-title=careers.title
.careers-group
if crrList
each career in crrList
.career-item
.circle(style=`background:${career.color ? career.color : "#357ef5"}`)
.name=career.desc
else
.careers-none
if careers.img
img.author-content-img.no-lightbox(alt=careers.tips, src=url_for(careers.img) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'`)
.author-content
if theme.LA.enable || theme.umami.enable
- let cover = item.statistic.cover
- let statisticSource = theme.LA.enable ? '51la' : 'Umami'
- let statisticLink = theme.LA.enable ? 'https://invite.51.la/1NzKqTeb?target=V6' : (theme.umami.apiHost || '#')
.about-statistic.author-content-item(style=`background: url(${cover}) top / cover no-repeat;`)
.card-content
.author-content-item-tips=_p('about.data')
span.author-content-item-title=_p('about.visit_stats')
#statistic
.post-tips
=_p('about.stats_from')
|
a(href=statisticLink, target='_blank', rel='noopener nofollow')= statisticSource
.banner-button-group
- let link = item.statistic.link
- let text = item.statistic.text
a.banner-button(onclick=`pjax.loadUrl("${link}")`)
i.anzhiyufont.anzhiyu-icon-arrow-circle-right
|
span.banner-button-text=text
.author-content-item-group.column.mapAndInfo
- let mapBackground = item.map.background
- let mapBackgroundDark = item.map.backgroundDark
style.
.author-content-item.map {
background-image: url(#{mapBackground});
}
[data-theme='dark'] .author-content-item.map {
background-image: url(#{mapBackgroundDark});
}
.author-content-item.map.single
- let mapTitle = item.map.title
- let mapStrengthenTitle = item.map.StrengthenTitle
span.map-title=mapTitle
b=mapStrengthenTitle
.author-content-item.selfInfo.single
- let { selfInfoTips1, selfInfoContentYear, selfInfoTips2, selfInfoContent2, selfInfoTips3, selfInfoContent3 } = item.selfInfo
div
span.selfInfo-title=selfInfoTips1
|
span.selfInfo-content#selfInfo-content-year(style='color:#43a6c6')=selfInfoContentYear
div
span.selfInfo-title=selfInfoTips2
|
span.selfInfo-content(style='color:#c69043')=selfInfoContent2
div
span.selfInfo-title=selfInfoTips3
|
span.selfInfo-content(style='color:#b04fe6')=selfInfoContent3
.author-content
.author-content-item.personalities
- let {author_name, personality_type, photo_url, personality_img, name_url, personality_type_color} = item.personalities
.author-content-item-tips=_p('about.personality')
span.author-content-item-title= author_name
.title2(style=`color:${personality_type_color ? personality_type_color : "#ac899c"}`)= personality_type
.post-tips
- const learnMoreText = _p('about.learn_more_at', '<a href="https://www.16personalities.com/" target="_blank" rel="noopener nofollow">16personalities</a>', '<a target="_blank" rel="noopener external nofollow" href="' + name_url + '">' + author_name + '</a>')
!= learnMoreText
.image
img.no-lightbox(src=url_for(personality_img), alt=_p('about.personality_img_alt'))
.author-content-item.myphoto
img.author-content-img.no-lightbox(alt=_p('about.selfie_alt'), src=url_for(photo_url))
.author-content
.author-content-item.maxim
- let {maxim_tips, maxim_top, maxim_bottom} = item.maxim
.author-content-item-tips=maxim_tips
span.maxim-title
span(style='opacity:.6;margin-bottom:8px')=maxim_top
|
span=maxim_bottom
.author-content-item.buff
.card-content
- let {buff_tips, buff_top, buff_bottom} = item.buff
.author-content-item-tips=buff_tips
span.buff-title
span(style='opacity:.6;margin-bottom:8px')=buff_top
|
span=buff_bottom
.card-background-icon
i.anzhiyufont.anzhiyu-icon-dice-d20
.author-content
- let {game_tips, game_title, game_uid, game_bg} = item.game
.author-content-item.game-yuanshen(style=`background: url(${game_bg}) top / cover no-repeat;`)
.card-content
.author-content-item-tips=game_tips
span.author-content-item-title=game_title
.content-bottom
.icon-group
.loading-bar(role='presentation', aria-hidden='true' style=`${game_title != "原神" ? "display: none": ""}`)
.tips.game-yuanshen-uid=game_uid
.author-content-item.comic-content
.card-content
- let {comic_tips, comic_title, comic_list} = item.comic
.author-content-item-tips=comic_tips
.author-content-item-title=comic_title
.comic-box
if comic_list
each i in comic_list
a.comic-item(href=i.href, target="_blank", title=i.name)
.comic-item-cover
img(src=i.cover, alt=i.name)
.author-content
- let {music_tips, music_title, music_link, music_bg} = item.music
- let {like_tips, like_title, like_bottom, like_bg} = item.like
.author-content-item.like-technology(style=`background: url(${like_bg}) top / cover no-repeat;`)
.card-content
.author-content-item-tips=like_tips
span.author-content-item-title=like_title
.content-bottom
.tips=like_bottom
.author-content-item.like-music(style=`background: url(${music_bg}) top / cover no-repeat;`)
.card-content
.author-content-item-tips=music_tips
span.author-content-item-title=music_title
.content-bottom
.tips=_p('about.enjoy_music_with', aboutName)
.banner-button-group
a.banner-button(onclick=`pjax.loadUrl("${music_link}")`)
i.anzhiyufont.anzhiyu-icon-arrow-circle-right
|
span.banner-button-text=_p('about.more_recommend')
if page.content
.author-content
.create-site-post.author-content-item.single
!= page.content
- let rawData = item.reward_list
if rawData
- let sortedByDate = rawData.slice().sort((a, b) => new Date(b.datatime) - new Date(a.datatime));
.author-content
.author-content-item.single.reward#about-reward
.author-content-item-tips=_p('about.thanks')
span.author-content-item-title=_p('about.reward_list')
.author-content-item-description=_p('about.reward_thanks')
.reward-list-all
- let reward_list_amount = item.reward_list.sort((a,b)=>b.amount - a.amount)
each item, index in reward_list_amount
.reward-list-item
.reward-list-item-name=item.name
.reward-list-bottom-group
if item.amount >= 50
.reward-list-item-money(style='background:var(--anzhiyu-yellow)')=`¥${item.amount}`
else
.reward-list-item-money=`¥${item.amount + (item.suffix ? item.suffix : "")}`
.datatime.reward-list-item-time(datatime=item.datatime)=new Date(item.datatime).toISOString().slice(0, -14)
.reward-list-updateDate
=_p('about.last_update')
time.datatime.reward-list-updateDate-time(datatime=sortedByDate[0].datatime)=new Date(sortedByDate[0].datatime).toISOString().slice(0, -14)
.about-reward
#con
#TA-con(onclick="anzhiyu.rewardShowConsole()")
#text-con
#linght
#TA=_p('about.charge_for_ta')
#tube-con
svg(viewBox='0 0 1028 385', fill='none', xmlns='http://www.w3.org/2000/svg')
path(d='M1 77H234.226L307.006 24H790', stroke='#e5e9ef', stroke-width='20')
path(d='M0 140H233.035L329.72 71H1028', stroke='#e5e9ef', stroke-width='20')
path(d='M1 255H234.226L307.006 307H790', stroke='#e5e9ef', stroke-width='20')
path(d='M0 305H233.035L329.72 375H1028', stroke='#e5e9ef', stroke-width='20')
rect(y='186', width='236', height='24', fill='#e5e9ef')
ellipse(cx='790', cy='25.5', rx='25', ry='25.5', fill='#e5e9ef')
circle(r='14', transform='matrix(1 0 0 -1 790 25)', fill='white')
ellipse(cx='790', cy='307.5', rx='25', ry='25.5', fill='#e5e9ef')
circle(r='14', transform='matrix(1 0 0 -1 790 308)', fill='white')
#mask
svg(viewBox='0 0 1028 385', fill='none', xmlns='http://www.w3.org/2000/svg')
path(d='M1 77H234.226L307.006 24H790', stroke='#f25d8e', stroke-width='20')
path(d='M0 140H233.035L329.72 71H1028', stroke='#f25d8e', stroke-width='20')
path(d='M1 255H234.226L307.006 307H790', stroke='#f25d8e', stroke-width='20')
path(d='M0 305H233.035L329.72 375H1028', stroke='#f25d8e', stroke-width='20')
rect(y='186', width='236', height='24', fill='#f25d8e')
ellipse(cx='790', cy='25.5', rx='25', ry='25.5', fill='#f25d8e')
circle(r='14', transform='matrix(1 0 0 -1 790 25)', fill='white')
ellipse(cx='790', cy='307.5', rx='25', ry='25.5', fill='#f25d8e')
circle(r='14', transform='matrix(1 0 0 -1 790 308)', fill='white')
#orange-mask
svg(viewBox='0 0 1028 385', fill='none', xmlns='http://www.w3.org/2000/svg')
path(d='M1 77H234.226L307.006 24H790', stroke='#ffd52b', stroke-width='20')
path(d='M0 140H233.035L329.72 71H1028', stroke='#ffd52b', stroke-width='20')
path(d='M1 255H234.226L307.006 307H790', stroke='#ffd52b', stroke-width='20')
path(d='M0 305H233.035L329.72 375H1028', stroke='#ffd52b', stroke-width='20')
rect(y='186', width='236', height='24', fill='#ffd52b')
ellipse(cx='790', cy='25.5', rx='25', ry='25.5', fill='#ffd52b')
circle(r='14', transform='matrix(1 0 0 -1 790 25)', fill='white')
ellipse(cx='790', cy='307.5', rx='25', ry='25.5', fill='#ffd52b')
circle(r='14', transform='matrix(1 0 0 -1 790 308)', fill='white')
- const totalPeopleText = _p('about.total_people', '<b>' + item.reward_list.length + '</b>')
p#people!= totalPeopleText
script(src=url_for(theme.asset.countup_js))
- const ck = theme.LA.ck
- const umamiEnable = theme.umami.enable
- const umamiApiHost = theme.umami.apiHost || ''
- const umamiWebsiteId = theme.umami.websiteId || ''
- const umamiToken = theme.umami.token || ''
- const laEnable = theme.LA.enable
-
const i18nStats = {
today_visitors: _p('about.stats.today_visitors'),
today_views: _p('about.stats.today_views'),
yesterday_visitors: _p('about.stats.yesterday_visitors'),
yesterday_views: _p('about.stats.yesterday_views'),
month_views: _p('about.stats.month_views'),
total_views: _p('about.stats.total_views'),
fetch_failed: _p('about.stats.fetch_failed')
}
script(defer).
function initAboutPage() {
const statisticEl = document.getElementById("statistic");
let statistic = [];
let numValues = [];
const i18nStats = !{JSON.stringify(i18nStats)};
// 统计数据渲染函数
function renderStatistic(title, num) {
if (!statisticEl) return;
numValues = num;
statistic = [];
for (let i = 0; i < num.length; i++) {
statisticEl.innerHTML +=
"<div><span>" + title[i] + "</span><span id='stat-" + i + "'>" + num[i] + "</span></div>";
queueMicrotask(() => {
statistic.push(
new CountUp("stat-" + i, 0, num[i], 0, 2, {
useEasing: true,
useGrouping: true,
separator: ",",
decimal: ".",
prefix: "",
suffix: "",
})
);
});
}
}
// 统计数字动画
function statisticUP() {
let statisticElement = document.querySelector(".about-statistic.author-content-item");
if (!statisticElement) return;
const callback = (entries, observer) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
for (let i = 0; i < statistic.length; i++) {
queueMicrotask(() => {
statistic[i].start();
});
}
observer.disconnect();
}
});
};
const options = { root: null, rootMargin: "0px", threshold: 0 };
const observer = new IntersectionObserver(callback, options);
observer.observe(statisticElement);
}
// 51la 统计
if (#{laEnable}) {
fetch("https://v6-widget.51.la/v6/#{ck}/quote.js")
.then(res => res.text())
.then(data => {
let title = [i18nStats.today_visitors, i18nStats.today_views, i18nStats.yesterday_visitors, i18nStats.yesterday_views, i18nStats.month_views, i18nStats.total_views];
let num = data.match(/(<\/span><span>).*?(\/span><\/p>)/g);
num = num.map(el => {
let val = el.replace(/(<\/span><span>)/g, "");
let str = val.replace(/(<\/span><\/p>)/g, "");
return str;
});
// 跳过第一个"最近活跃"
num = num.slice(1);
renderStatistic(title, num);
statisticUP();
})
.catch(err => {
console.error("51la stats fetch failed:", err);
if (statisticEl) statisticEl.innerHTML = "<div>" + i18nStats.fetch_failed + "</div>";
});
}
// Umami 统计
if (#{umamiEnable}) {
const apiHost = "#{umamiApiHost}";
const websiteId = "#{umamiWebsiteId}";
const token = "#{umamiToken}";
const now = Date.now();
const todayStart = new Date().setHours(0, 0, 0, 0);
const yesterdayStart = todayStart - 86400000;
const monthStart = new Date(new Date().getFullYear(), new Date().getMonth(), 1).getTime();
const fetchStats = async (startAt, endAt) => {
const res = await fetch(`${apiHost}/api/websites/${websiteId}/stats?startAt=${startAt}&endAt=${endAt}`, {
headers: { 'Authorization': `Bearer ${token}` }
});
return res.json();
};
Promise.all([
fetchStats(todayStart, now), // today
fetchStats(yesterdayStart, todayStart), // yesterday
fetchStats(monthStart, now), // month
fetchStats(0, now) // total
])
.then(([today, yesterday, month, total]) => {
const title = [i18nStats.today_visitors, i18nStats.today_views, i18nStats.yesterday_visitors, i18nStats.yesterday_views, i18nStats.month_views, i18nStats.total_views];
const num = [
today.visitors?.value || today.uniques?.value || 0,
today.pageviews?.value || 0,
yesterday.visitors?.value || yesterday.uniques?.value || 0,
yesterday.pageviews?.value || 0,
month.pageviews?.value || 0,
total.pageviews?.value || 0
];
renderStatistic(title, num);
statisticUP();
})
.catch(err => {
console.error("Umami stats fetch failed:", err);
if (statisticEl) statisticEl.innerHTML = "<div>" + i18nStats.fetch_failed + "</div>";
});
}
// 出生年份动画
const selfInfoContentYear = new CountUp("selfInfo-content-year", 0, #{selfInfoContentYear}, 0, 2, {
useEasing: true,
useGrouping: false,
separator: ",",
decimal: ".",
prefix: "",
suffix: "",
});
let selfInfoContentYearElement = document.querySelector(".author-content-item.selfInfo.single");
function selfInfoContentYearUp() {
if (!selfInfoContentYearElement) return;
const callback = (entries, observer) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
selfInfoContentYear.start();
observer.disconnect();
}
});
};
const options = { root: null, rootMargin: "0px", threshold: 0 };
const observer = new IntersectionObserver(callback, options);
observer.observe(selfInfoContentYearElement);
}
selfInfoContentYearUp();
var pursuitInterval = null;
pursuitInterval = setInterval(function () {
const show = document.querySelector("span[data-show]");
const next = show.nextElementSibling || document.querySelector(".first-tips");
const up = document.querySelector("span[data-up]");
if (up) {
up.removeAttribute("data-up");
}
show.removeAttribute("data-show");
show.setAttribute("data-up", "");
next.setAttribute("data-show", "");
}, 2000);
document.addEventListener("pjax:send", function () {
pursuitInterval && clearInterval(pursuitInterval);
});
var helloAboutEl = document.querySelector(".hello-about");
helloAboutEl.addEventListener("mousemove", evt => {
const mouseX = evt.offsetX;
const mouseY = evt.offsetY;
gsap.set(".cursor", {
x: mouseX,
y: mouseY,
});
gsap.to(".shape", {
x: mouseX,
y: mouseY,
stagger: -0.1,
});
});
}
if (typeof gsap === "object") {
initAboutPage()
} else {
getScript("!{url_for(theme.asset.gsap_js)}").then(initAboutPage);
}

View File

@@ -0,0 +1,22 @@
#album
- let album_background = page.top_background
.author-content.author-content-item.album.single(style=`${album_background ? `background: url(${album_background}) top / cover no-repeat;` : ""}`)
.card-content
.author-content-item-tips 相册集
span.author-content-item-title 这里是我的相册集哦😯
.content-bottom
.tips 每一张照片都是一次美好的记忆。
.banner-button-group
a.banner-button(onclick='pjax.loadUrl("/about/")')
i.anzhiyufont.anzhiyu-icon-arrow-circle-right(style='font-size: 1.5rem')
span.banner-button-text 关于本人
.card-album
each i in site.data.album
.card(onclick=`pjax.loadUrl("${i.path_name}")`)
img.card_cover(src=i.cover)
.card__content
p.card__category=i.class_name
h3.card__heading=i.description
.album-content-nocover
.album-content-nocover
.album-content-nocover

View File

@@ -0,0 +1,89 @@
#album_detail
each i in site.data.album
- let path_name = (is_current(i.path_name)) ? true : false
- type = i.type
- let album_detail_background = i.top_background
- let album_detail_top_link = i.top_link
- let album_detail_top_btn_text = i.top_btn_text
if (path_name && i.album_list)
.author-content.author-content-item.album.single(style=`${album_detail_background ? `background: url(${album_detail_background}) top / cover no-repeat;` : ""}`)
.card-content
.author-content-item-tips 相册集
span.author-content-item-title=i.class_name
.content-bottom
.tips=i.description
.banner-button-group
a.banner-button(onclick=`pjax.loadUrl("${url_for(album_detail_top_link ? album_detail_top_link : '/about')}")`, data-pjax-state)
i.anzhiyufont.anzhiyu-icon-arrow-circle-right(style='font-size: 1.5rem')
span.banner-button-text=album_detail_top_btn_text ? album_detail_top_btn_text : "关于我"
section.timeline.page-1
if type == 1
ul#waterfall.list
each item, index in i.album_list
li.album-item
.album-content
p.datacont= item.content
if item.image
.album-container-img
each iten, indey in item.image
a.album-content-img(href=item.image[indey], target="_blank", data-fancybox="gallery", data-caption="")
img(src=item.image[indey])
.album-content-noimg
.album-content-noimg
.album-content-noimg
if item.aplayer
.album-music
.aplayer.no-destroy(data-id=item.aplayer.id data-server=item.aplayer.server data-type="song" data-order="list" data-preload="none" data-autoplay="false" data-mutex="true" data-theme='var(--anzhiyu-main)')
hr
.album-bottom
.album-info
.album-info-time
- var datedata = new Date(item.date).toISOString()
i.anzhiyufont.anzhiyu-icon-instagram
time.datatime(datetime= item.date)= datedata
if item.link
a.album-content-link(target="_blank", title="跳转到短文指引的链接", href=item.link, rel="external nofollow")
i.anzhiyufont.anzhiyu-icon-link
| 链接
if item.address
.album-info-address
i.anzhiyufont.anzhiyu-icon-location-dot
span=item.address
if item.from
.album-info-from
i.anzhiyufont.anzhiyu-icon-fw-fire
span=item.from
.album-reply(onclick="rm.rightMenuCommentText(" + `'${item.content}'` + ")")
i.anzhiyufont.anzhiyu-icon-message
else if type == 2
.type-gallery
- const rowHeight = i.rowHeight != "undefined" ? i.rowHeight : 220
- const limit = i.limit != "undefined" ? i.limit : 10
- const lazyload = i.lazyload != "undefined" ? i.lazyload : true
- const lazyloadClass = lazyload == true ? "lazyload" : "";
- const btn = i.btnLazyload != "undefined" ? i.btnLazyload : false
- const btnLazyloadClass = btn == true ? " btn_album_detail_lazyload" : "";
- const imgType = i.url ? " url" : " data";
- let dataStr = []
- let durl = i.url ?? false
each item, index in i.album_list
each iten, indey in item.image
- let obj = {}
- obj.url = iten
- obj.alt = item.content
- obj.title = item.content
- obj.address = item.address
- dataStr.push(obj)
.gallery
.fj-gallery(data-rowHeight=rowHeight data-limit=limit class=`${lazyloadClass + btnLazyloadClass + imgType}`)
if durl
span.gallery-data=durl
else
span.gallery-data=JSON.stringify(dataStr)
if btn
button.gallery-load-more
span=_p('load_more')
i.anzhiyufont.anzhiyu-icon-arrow-down
else
#album_detail_gallery_load_more

View File

@@ -0,0 +1,2 @@
#tag
.category-lists#tag-page-tags!= tags_page_list("categories")

View File

@@ -0,0 +1,2 @@
#article-container
!= page.content

View File

@@ -0,0 +1,32 @@
#equipment
if site.data.equipment
each i in site.data.equipment
.author-content.author-content-item.fcirclePage.single(style = `background: url(${i.top_background}) left 37% / cover no-repeat !important;`)
.card-content
.author-content-item-tips=i.class_name
span.author-content-item-title=i.description
.content-bottom
.tips=i.tip
each item in i.good_things
.goodthings-item
h2.goodthings-title= item.title
.goodthings-item-description= item.description
.equipment-item
.equipment-item-content
each iten, indey in item.equipment_list
.equipment-item-content-item
.equipment-item-content-item-cover
img.equipment-item-content-item-image(data-lazy-src=url_for(iten.image) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt=iten.name)
.equipment-item-content-item-info
.equipment-item-content-item-name(onclick=`rm.rightmenuCopyText("${iten.name}");anzhiyu.snackbarShow("${_p('Snackbar.copy_equipment_name') + " 【" + iten.name + "】"}");` title=iten.name)= iten.name
.equipment-item-content-item-specification= iten.specification
.equipment-item-content-item-description= iten.description
.equipment-item-content-item-toolbar
if iten.link.includes('https://') || iten.link.includes('http://')
a.equipment-item-content-item-link(href= iten.link, target='_blank') 详情
.bber-reply(onclick="rm.rightMenuCommentText(" + `'${iten.name + " " + iten.specification + " " + iten.description}'` + ")")
i.anzhiyufont.anzhiyu-icon-message
else
a.equipment-item-content-item-link(href= iten.link, target='_blank') 查看文章
.bber-reply(onclick="rm.rightMenuCommentText(" + `'${iten.name + " " + iten.specification + " " + iten.description}'` + ")")
i.anzhiyufont.anzhiyu-icon-message

View File

@@ -0,0 +1,67 @@
if site.data.essay
each i in site.data.essay
#essay_page
.author-content.author-content-item.essayPage.single(style = i.top_background ? `background: url(${i.top_background}) left 28% / cover no-repeat;` : "")
.card-content
.author-content-item-tips=i.title
span.author-content-item-title=i.subTitle
.content-bottom
.tips=i.tips
.banner-button-group
a.banner-button(href=i.buttonLink)
i.anzhiyufont.anzhiyu-icon-arrow-circle-right
span.banner-button-text=i.buttonText
#bber
section.timeline.page-1
ul#waterfall.list
each item, index in i.essay_list
if index < i.limit
li.bber-item
.bber-content
p.datacont= item.content
if item.image
.bber-container-img
each iten, indey in item.image
a.bber-content-img(href=url_for(item.image[indey]), target="_blank", data-fancybox="gallery", data-caption="")
img(src=url_for(item.image[indey]))
.bber-content-noimg
.bber-content-noimg
.bber-content-noimg
if item.video
.bber-container-img
each iten, indey in item.video
if (item.video[indey].includes('player.bilibili.com'))
div(style="position: relative; padding: 30% 45%;margin-top: 10px;margin-bottom: 10px;")
iframe(style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;margin: 0;border-radius: 12px;border: var(--style-border);" src=url_for(item.video[indey]) scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true")
else
a.bber-content-video(href=url_for(item.video[indey]) data-fancybox="gallery", data-caption="")
video(src=url_for(item.video[indey]))
.bber-content-noimg
.bber-content-noimg
.bber-content-noimg
if item.aplayer
.bber-music
meting-js(id=item.aplayer.id, server=item.aplayer.server, type="song", mutex="true",preload="none", theme="var(--anzhiyu-main)", data-lrctype="0", order="list")
hr
.bber-bottom
.bber-info
.bber-info-time
- var datedata = new Date(item.date).toISOString()
i.anzhiyufont.anzhiyu-icon-clock
time.datatime(datetime= item.date)= datedata
if item.link
a.bber-content-link(title="跳转到短文指引的链接", href=url_for(item.link), rel="external nofollow")
i.anzhiyufont.anzhiyu-icon-link
| 链接
if item.from
.bber-info-from
i.anzhiyufont.anzhiyu-icon-fw-fire
span=item.from
if item.address
.bber-info-from
i.anzhiyufont.anzhiyu-icon-location-dot
span=item.address
.bber-reply(onclick="rm.rightMenuCommentText(" + `'${item.content}'` + ")")
i.anzhiyufont.anzhiyu-icon-message
#bber-tips(style='color: var(--anzhiyu-secondtext);')
="- 只展示最近" + i.limit + "条短文 -"

View File

@@ -0,0 +1,25 @@
if theme.friends_vue.enable
.fcircle_page
.author-content.author-content-item.fcirclePage.single(style = `background: url(${theme.friends_vue.top_background}) left 28% / cover no-repeat !important;`)
.card-content
.author-content-item-tips=_p('flink.friend_links')
span.author-content-item-title=_p('flink.latest_articles')
.content-bottom
.tips=theme.friends_vue.top_tips
.banner-button-group
a.banner-button(onclick='pjax.loadUrl("/about")')
i.anzhiyufont.anzhiyu-icon-arrow-circle-right(style='font-size: 22px; margin-right: 0.25rem')
span.banner-button-text=_p('flink.about_me')
.title-h2-a
.title-h2-a-left
h2(style='padding-top:0;margin:.6rem 0 .6rem')=_p('flink.fishing')
a.random-post-start(href='javascript:fetchRandomPost();')
i.anzhiyufont.anzhiyu-icon-arrow-rotate-right
.title-h2-a-right
a.random-post-all(href='/link/')=_p('flink.all_links')
#random-post
#hexo-circle-of-friends-root
if (theme.friends_vue.apiurl)
script(defer data-pjax src=url_for(theme.asset.random_friends_post_js))
script(defer data-pjax src=url_for(theme.friends_vue.vue_js))

View File

@@ -0,0 +1,132 @@
#article-container
if theme.linkPageTop && theme.linkPageTop.enable
#flink-banners
.banner-top-box
.flink-banners-title
.banners-title-small=_p('flink.title')
.banners-title-big=theme.linkPageTop ? theme.linkPageTop.title : _p('flink.title')
.banner-button-group
if (theme.friends_vue.apiurl)
a.banner-button.secondary.no-text-decoration(onclick="friendChainRandomTransmission()")
i.anzhiyufont.anzhiyu-icon-paper-plane1
span.banner-button-text=_p('flink.random_visit')
if theme.linkPageTop.addFriendPlaceholder && theme.comments.use == 'Twikoo' && theme.twikoo.envId
a.banner-button.no-text-decoration(onclick="anzhiyu.addFriendLink()")
i.anzhiyufont.anzhiyu-icon-arrow-circle-right
span.banner-button-text=_p('flink.apply_link')
#skills-tags-group-all
.tags-group-wrapper
- function getAvatarWithoutExclamationMark(url) {
- const index = url.indexOf('!');
- return index !== -1 ? url.substring(0, index) : url;
- }
each y in [1,2]
each i, index in site.data.link.slice(0, 15)
- const link_list = i.link_list.slice()
- const hundredSuffix = i.hundredSuffix ? i.hundredSuffix : ""
- const evenNum = link_list.filter((x, index) => index % 2 === 0);
- const oddNum = link_list.filter((x, index) => index % 2 === 1);
each item, index2 in link_list.slice(0, Math.min(evenNum.length, oddNum.length))
- const index = index2 * 2
if (index <= 15 && typeof evenNum[index] !== 'undefined' && typeof oddNum[index] !== 'undefined')
- let oddNumAvatar = getAvatarWithoutExclamationMark(oddNum[index].avatar);
- let evenNumAvatar = getAvatarWithoutExclamationMark(evenNum[index].avatar);
.tags-group-icon-pair
a.tags-group-icon.no-text-decoration(href=url_for(evenNum[index].link), title=evenNum[index].name)
img.no-lightbox(title=evenNum[index].name, src=url_for(evenNumAvatar + hundredSuffix) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt=evenNum[index].name)
a.tags-group-icon.no-text-decoration(href=url_for(oddNum[index].link), title=oddNum[index].name)
img.no-lightbox(title=oddNum[index].name, src=url_for(oddNumAvatar + hundredSuffix) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt=oddNum[index].name)
if theme.friends_vue && theme.friends_vue.enable
.title-h2-a
.title-h2-a-left
h2(style='padding-top:0;margin:.6rem 0 .6rem')=_p('flink.fishing')
a.random-post-start.no-text-decoration(href='javascript:fetchRandomPost();')
i.anzhiyufont.anzhiyu-icon-arrow-rotate-right
.title-h2-a-right
a.random-post-all.no-text-decoration(href='/link/')=_p('flink.all_links')
#random-post
script(defer data-pjax src=url_for(theme.asset.random_friends_post_js))
.flink
if site.data.link
each i in site.data.link
if i.class_name
h2!= i.class_name + "(" + i.link_list.length + ")"
if i.class_desc
.flink-desc!=i.class_desc
if i.flink_style === 'anzhiyu'
div(class=i.lost_contact ? 'anzhiyu-flink-list cf-friends-lost-contact' : 'anzhiyu-flink-list')
if i.link_list
each item in i.link_list
- let color = item.color || ""
- let tag = item.tag || ""
.flink-list-item
if color == "vip" && tag
span.site-card-tag.vip #[=tag]
i.light
else if color == "speed" && tag
span.site-card-tag.speed #[=tag]
else if tag
span.site-card-tag(style=`background-color: ${color}`) #[=tag]
else if item.recommend
span.site-card-tag=_p('flink.recommend')
if i.lost_contact
a.cf-friends-link(href=url_for(item.link) title=item.name target="_blank")
if theme.lazyload.enable
img.no-lightbox(data-lazy-src=url_for(item.avatar) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt=item.name )
else
img.cf-friends-avatar.no-lightbox(src=url_for(item.avatar) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt=item.name )
.flink-item-info
.flink-item-name.cf-friends-name-lost-contact= item.name
else
a.cf-friends-link(href=url_for(item.link) cf-href=url_for(item.link) title=item.name target="_blank")
if theme.lazyload.enable
img.cf-friends-avatar.no-lightbox(data-lazy-src=url_for(item.avatar), cf-src=url_for(item.avatar), onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt=item.name )
else
img.cf-friends-avatar.no-lightbox(src=url_for(item.avatar) cf-src=url_for(item.avatar) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt=item.name )
.flink-item-info
.flink-item-name.cf-friends-name= item.name
.flink-item-desc(title=item.descr)= item.descr
else if i.flink_style === 'telescopic'
.telescopic-site-card-group
each item in i.link_list
- let color = item.color || ""
- let tag = item.tag || ""
- let siteshot = item.siteshot || `https://image.thum.io/get/width/400/crop/800/allowJPG/wait/20/noanimate/${item.link}` || theme.default_img
.site-card
if color == "vip" && tag
span.site-card-tag.vip #[=tag]
i.light
else if color == "speed" && tag
span.site-card-tag.speed #[=tag]
else if tag
span.site-card-tag(style=`background-color: ${color}`) #[=tag]
else if item.recommend
span.site-card-tag=_p('flink.recommend')
a.img.no-text-decoration(target='_blank', title=`${item.name}`, href=`${item.link}`, rel='external nofollow')
img.flink-avatar(data-lazy-src=siteshot, onerror=`this.onerror=null;this.src='${theme.default_img}'`, alt=item.name, style="pointer-events: none;", src=`${siteshot}`)
a.info.cf-friends-link.no-text-decoration(target='_blank', title=`${item.name}`, href=`${item.link}`, cf-href=url_for(item.link), rel='external nofollow')
.site-card-avatar
img.flink-avatar.cf-friends-avatar.no-fancybox(data-lazy-src=item.avatar, cf-src=url_for(item.avatar), onerror=`this.onerror=null;this.src='${theme.default_img}'`, alt=item.name, src=item.avatar)
.site-card-text
span.title.cf-friends-name #[=item.name]
span.desc(title=`${item.descr}`) #[=item.descr]
else if i.flink_style === 'flexcard'
.flexcard-flink-list
each item in i.link_list
a.flink-list-card.cf-friends-link(href=url_for(item.link) cf-href=url_for(item.link) target='_blank' data-title=item.descr)
.wrapper.cover
- var siteshot = item.siteshot ? url_for(item.siteshot) : 'https://image.thum.io/get/width/400/crop/800/allowJPG/wait/20/noanimate/' + item.link
if theme.lazyload.enable
img.cover.fadeIn(data-lazy-src=siteshot onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.post_page) + `'` alt='cover' )
else
img.cover.fadeIn(src=siteshot onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.post_page) + `'` alt='cover' )
.info
if theme.lazyload.enable
img.cf-friends-avatar.no-lightbox.flink-avatar(data-lazy-src=url_for(item.avatar) cf-src=url_for(item.avatar) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt='cover' )
else
img.cf-friends-avatar.no-lightbox(src=url_for(item.avatar) cf-src=url_for(item.avatar) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt='cover' )
span.flink-sitename.cf-friends-name= item.name
!= page.content

View File

@@ -0,0 +1,8 @@
#anMusic-page
#anMusicBtnGetSong(title="随机周董单曲,打开异世界的大梦")
i(class="anzhiyufont anzhiyu-icon-shuffle")
#anMusicRefreshBtn(title="立即刷新最新歌单")
i(class="anzhiyufont anzhiyu-icon-arrows-rotate")
#anMusicSwitching(title="切换歌单")
i(class="anzhiyufont anzhiyu-icon-repeat")
#anMusic-page-meting

View File

@@ -0,0 +1,278 @@
#room_page
div.house#h
div.h-lights
div.h-light
div.h-light
div.h-light
div.h-light
div.h-light
div.h-light
div.h-shadow
//---------------------
div.alt
div.alt__front.face
div.alt__back.face
div.alt__right.face
div.alt__left.face
div.alt__top.face
div.light
div.light
div.light
div.light
div.light
div.light
div.light
div.light
div.light
div.alt__bottom.face
div.alb
div.alb__front.face
div.alb__back.face
div.alb__right.face
div.alb__left.face
div.alb__top.face
div.alb__bottom.face
div.arb
div.arb__front.face
div.arb__back.face
div.arb__right.face
div.arb__left.face
div.arb__top.face
div.arb__bottom.face
//---------------------
div.blt
div.blt__front.face
div.blt__back.face
div.blt__right.face
div.blt__left.face
div.blt__top.face
div.blt__bottom.face
div.blt2
div.blt2__front.face
div.blt2__back.face
div.blt2__right.face
div.blt2__left.face
div.blt2__top.face
div.blt2__bottom.face
div.blb
div.blb__front.face
div.blb__back.face
div.blb__right.face
div.blb__left.face
div.blb__top.face
div.blb__bottom.face
div.blb2
div.blb2__front.face
div.blb2__back.face
div.blb2__right.face
div.blb2__left.face
div.blb2__top.face
div.blb2__bottom.face
//---------------------
div.puerta-c
div.puerta
div.puerta__front.face
div.puerta__back.face
div.puerta__right.face
div.puerta__left.face
div.puerta__top.face
div.puerta__bottom.face
div.puerta-l
div.puerta-l__front.face
div.puerta-l__back.face
div.puerta-l__right.face
div.puerta-l__left.face
div.puerta-l__top.face
div.puerta-l__bottom.face
div.puerta-r
div.puerta-r__front.face
div.puerta-r__back.face
div.puerta-r__right.face
div.puerta-r__left.face
div.puerta-r__top.face
div.puerta-r__bottom.face
div.puerta-t
div.puerta-t__front.face
div.puerta-t__back.face
div.puerta-t__right.face
div.puerta-t__left.face
div.puerta-t__top.face
div.puerta-t__bottom.face
div.cuadro-l
div.cuadro-l__front.face
div.cuadro-l__back.face
div.cuadro-l__right.face
div.cuadro-l__left.face
div.cuadro-l__top.face
div.cuadro-l__bottom.face
div.cuadro-r
div.cuadro-r__front.face
div.cuadro-r__back.face
div.cuadro-r__right.face
div.cuadro-r__left.face
div.cuadro-r__top.face
div.cuadro-r__bottom.face
div.librero
div.librero__front.face
div.librero__back.face
div.librero__right.face
div.librero__left.face
div.librero__top.face
div.librero__bottom.face
div.libros
- let lb = 0
while lb < 6
div.libro
div.libro__front.face
div.libro__back.face
div.libro__right.face
div.libro__left.face
div.libro__top.face
div.libro__bottom.face
- lb++
div.fotos
- let ft = 0
while ft < 2
div.foto
div.foto__front.face
div.foto__back.face
div.foto__right.face
div.foto__left.face
div.foto__top.face
div.foto__bottom.face
- ft++
div.cajas
- let cj = 0
while cj < 3
div.caja
div.caja__front.face
div.caja__back.face
div.caja__right.face
div.caja__left.face
div.caja__top.face
div.caja__bottom.face
- cj++
div.tv
div.tv__front.face
div.tv__back.face
div.tv__right.face
div.tv__left.face
div.tv__top.face
div.tv__bottom.face
div.repisa-t
div.repisa-t__front.face
div.repisa-t__back.face
div.repisa-t__right.face
div.repisa-t__left.face
div.repisa-t__top.face
div.repisa-t__bottom.face
div.repisa-b
div.repisa-b__front.face
div.repisa-b__back.face
div.repisa-b__right.face
div.repisa-b__left.face
div.repisa-b__top.face
div.repisa-b__bottom.face
div.bocina-l
div.bocina-l__front.face
div.bocina-l__back.face
div.bocina-l__right.face
div.bocina-l__left.face
div.bocina-l__top.face
div.bocina-l__bottom.face
div.bocina-r
div.bocina-r__front.face
div.bocina-r__back.face
div.bocina-r__right.face
div.bocina-r__left.face
div.bocina-r__top.face
div.bocina-r__bottom.face
div.muro
div.muro__front.face
div.muro__back.face
div.muro__right.face
div.muro__left.face
div.muro__top.face
div.muro__bottom.face
div.sillon-c
div.sillon-b
div.sillon-b__front.face
div.sillon-b__back.face
div.sillon-b__right.face
div.sillon-b__left.face
div.sillon-b__top.face
div.sillon-b__bottom.face
div.sillon-t
div.sillon-t__front.face
div.sillon-t__back.face
div.sillon-t__right.face
div.sillon-t__left.face
div.sillon-t__top.face
div.sillon-t__bottom.face
div.sillon-l
div.sillon-l__front.face
div.sillon-l__back.face
div.sillon-l__right.face
div.sillon-l__left.face
div.sillon-l__top.face
div.sillon-l__bottom.face
div.sillon-r
div.sillon-r__front.face
div.sillon-r__back.face
div.sillon-r__right.face
div.sillon-r__left.face
div.sillon-r__top.face
div.sillon-r__bottom.face
div.mesa-c
div.mesa
div.mesa__front.face
div.mesa__back.face
div.mesa__right.face
div.mesa__left.face
div.mesa__top.face
div.mesa__bottom.face
- let np = 0
while np < 4
div.mesa-p
div.mesa-p__front.face
div.mesa-p__back.face
div.mesa-p__right.face
div.mesa-p__left.face
div.mesa-p__top.face
div.mesa-p__bottom.face
- np++
div.mesa-shadow
div.tablet
div.tablet__front.face
div.tablet__back.face
div.tablet__right.face
div.tablet__left.face
div.tablet__top.face
div.tablet__bottom.face
.description
span 哇,被你发现了,这里是我的小房间,要一起玩游戏🎮嘛
.banner-button-group
a.banner-button(onclick='pjax.loadUrl("/about/")')
i.anzhiyufont.anzhiyu-icon-arrow-circle-right(style='font-size: 1.5rem')
span.banner-button-text 立刻玩
script(async).
const h = document.querySelector("#h");
const b = document.body;
let base = e => {
var x = e.pageX / window.innerWidth - 0.5;
var y = e.pageY / window.innerHeight - 0.5;
h.style.transform = `
perspective(90vw)
rotateX(${y * 4 + 75}deg)
rotateZ(${-x * 12 + 45}deg)
translateZ(-9vw)
translateX(-50%)
`;
};
b.addEventListener("pointermove", base);

View File

@@ -0,0 +1,4 @@
.tag-cloud-list.is-center
#tag
#tag-page-tags
!=tags_page_list("tags")

View File

@@ -0,0 +1,42 @@
-
var options = {
prev_text: '<i class="anzhiyufont anzhiyu-icon-chevron-left fa-fw" style="font-weight: inherit; font-size: 1rem;"></i><div class="pagination_tips_prev">上页</div>',
next_text: '<div class="pagination_tips_next">下页</div><i style="font-weight: inherit; font-size: 1rem;" class="anzhiyufont anzhiyu-icon-chevron-right fa-fw"></i>',
mid_size: 1,
escape: false
}
if is_post()
- let prev = theme.post_pagination === 1 || theme.post_pagination === 3 || theme.post_pagination === 4 ? page.prev : page.next
- let next = theme.post_pagination === 1 || theme.post_pagination === 3 || theme.post_pagination === 4 ? page.next : page.prev
nav#pagination.pagination-post
if(prev)
- var hasPageNext = next ? 'pull-left' : 'pull-full'
.prev-post(class=hasPageNext)
- var pagination_cover = prev.cover === false ? prev.randomcover : prev.cover
a(href=url_for(prev.path))
img.prev-cover(src=url_for(pagination_cover) onerror=`onerror=null;src='${url_for(theme.error_img.post_page)}'` alt='cover of previous post')
.pagination-info
.label=_p('pagination.prev')
.prev_info=prev.title
if(next)
- var hasPagePrev = prev ? 'pull-right' : 'pull-full'
- var pagination_cover = next.cover == false ? next.randomcover : next.cover
.next-post(class=hasPagePrev)
a(href=url_for(next.path))
img.next-cover(src=url_for(pagination_cover) onerror=`onerror=null;src='${url_for(theme.error_img.post_page)}'` alt='cover of next post')
.pagination-info
.label=_p('pagination.next')
.next_info=next.title
else
nav#pagination
.pagination
if is_home()
- options.format = 'page/%d/#content-inner'
!=paginator(options)
if is_home()
div(class="toPageGroup")
input(id="toPageText" oninput="value=value.replace(/[^0-9]/g,'')" maxlength="3" onkeyup="this.value=this.value.replace(/[^u4e00-u9fa5w]/g,'')" aria-label="toPage")
a(id="toPageButton" onclick="anzhiyu.toPage()")
i.anzhiyufont.anzhiyu-icon-angles-right(style="font-weight: inherit; font-size: 1rem;")

View File

@@ -0,0 +1,7 @@
#popup-window
.popup-window-title 通知
.popup-window-divider
.popup-window-content
.popup-tip 你好呀
.popup-link
i.anzhiyufont.anzhiyu-icon-arrow-circle-right

View File

@@ -0,0 +1,63 @@
if theme.post_copyright.enable && page.copyright !== false
- let author = page.copyright_author || config.author
- let url = page.copyright_url || page.permalink
- let info = page.copyright_info || _p('post.copyright.copyright_content', theme.post_copyright.license_url, theme.post_copyright.license, config.url, config.title)
.post-copyright
.copyright-cc-box
i.anzhiyufont.anzhiyu-icon-copyright
.post-copyright__author_box
- let copyright_author_img_back = theme.post_copyright.copyright_author_img_back ? theme.post_copyright.copyright_author_img_back : theme.avatar.img
- let copyright_author_img_front = theme.post_copyright.copyright_author_img_front ? theme.post_copyright.copyright_author_img_front : theme.avatar.img
- let copyright_author_link = theme.post_copyright.copyright_author_link ? theme.post_copyright.copyright_author_link : '/'
a.post-copyright__author_img(href=url_for(copyright_author_link) title='头像')
img.post-copyright__author_img_back(src=url_for(copyright_author_img_back) title='头像' alt='头像')
img.post-copyright__author_img_front(src=url_for(copyright_author_img_front) title="头像" alt='头像')
.post-copyright__author_name=author
.post-copyright__author_desc=config.subtitle
.post-copyright__post__info
if (page.copyright_author && page.copyright_author !== config.author)
a.post-copyright__reprint(title="该文章为转载文章,注意版权协议" href=url_for(url)) 转载
else
a.post-copyright__original(title="该文章为原创文章,注意版权协议" href=url_for(url)) 原创
a.post-copyright-title
span(onclick=`rm.copyPageUrl('${theme.post_copyright.decode ? decodeURI(url) : url}')`)=pageTitle
//- ptool
if theme.ptool.enable
include ./ptool.pug
.post-copyright__notice
span.post-copyright-info!= info
.post-tools-right
if (!theme.ptool.categories)
.tag_share
.post-meta__box
if (theme.post_meta.post.tags)
.post-meta__box__tag-list
each item, index in page.tags.data
a(href=url_for(item.path)).post-meta__box__tags
span.tags-punctuation
i.anzhiyufont.anzhiyu-icon-tag
=item.name
span.tagsPageCount=item.length
!=partial('includes/third-party/share/index.pug', {}, {cache: true})
else
.tag_share
.post-meta__box
if (page.categories.data.length > 0)
.post-meta__box__category-list
each item, index in page.categories.data
a(href=url_for(item.path)).post-meta__box__categoryes
span.categoryes-punctuation
i.anzhiyufont.anzhiyu-icon-inbox
=item.name
span.categoryesPageCount=item.length
if (theme.post_meta.post.tags)
.post-meta__box__tag-list
each item, index in page.tags.data
a(href=url_for(item.path)).post-meta__box__tags
span.tags-punctuation
i.anzhiyufont.anzhiyu-icon-tag
=item.name
span.tagsPageCount=item.length
!=partial('includes/third-party/share/index.pug', {}, {cache: true})

View File

@@ -0,0 +1,54 @@
- let url = page.copyright_url || page.permalink
if !theme.disable_top_img && page.top_img !== false
if is_post()
- var top_img = page.top_img || page.cover || page.randomcover
else if is_page()
- var top_img = page.top_img || theme.default_top_img
else if is_home()
- var top_img = theme.index_img !== false ? theme.index_img || theme.default_top_img : false
else
- var top_img = page.top_img || theme.default_top_img
if top_img !== false
- var imgSource = top_img && top_img.indexOf('/') !== -1 ? url_for(top_img) : top_img
- var bg_img = top_img ? imgSource : ''
- var site_title = page.title || page.tag || page.category || config.title
#post-tools.post-tools
.post-tools-left
div.rewardLeftButton
if theme.reward.enable && theme.reward.QR_code
!=partial('includes/post/reward', {}, {cache: true})
if theme.ptool.mode
.reward-link.mode
a.reward-link-button(href=url_for(theme.ptool.mode))
i.anzhiyufont.anzhiyu-icon-plant-fill
| 运营模式与责任
div.shareRight
if theme.ptool.share_mobile
.share-link.mobile
.share-qrcode
.share-button(title='使用手机访问这篇文章')
i.anzhiyufont.anzhiyu-icon-qrcode
.share-main
.share-main-all
#qrcode(title=url)
.reward-dec 使用手机访问这篇文章
if theme.ptool.share_weibo
.share-link.weibo
a.share-button(target='_blank' href=`https://service.weibo.com/share/share.php?title=${site_title}&url=${url}&pic=${bg_img}` rel='external nofollow noreferrer noopener')
i.anzhiyufont.anzhiyu-icon-weibo
if theme.ptool.share_copyurl
script.
function copyCurrentPageUrl() {
var currentPageUrl = window.location.href;
var input = document.createElement("input");
input.setAttribute("value", currentPageUrl);
document.body.appendChild(input);
input.select();
input.setSelectionRange(0, 99999);
document.execCommand("copy");
document.body.removeChild(input);
}
.share-link.copyurl
#post-share-url.share-button(title='复制链接' onclick='copyCurrentPageUrl()')
i.anzhiyufont.anzhiyu-icon-link

View File

@@ -0,0 +1,18 @@
.post-reward(onclick='anzhiyu.addRewardMask()')
.reward-button.button--animated(title=_p('reward.title'))
i.anzhiyufont.anzhiyu-icon-hand-heart-fill
=_p('reward.button')
.reward-main
.reward-all
span.reward-title=_p('reward.thanks')
ul.reward-group
each item in theme.reward.QR_code
- var clickTo = item.link ? item.link : item.img
li.reward-item
a(href=url_for(clickTo) target='_blank')
img.post-qr-code-img(src=url_for(item.img) alt=item.text)
.post-qr-code-desc=item.text
a.reward-main-btn(href='/about/#about-reward' target='_blank')
.reward-text=_p('reward.list')
.reward-dec=_p('reward.list_desc')
#quit-box(onclick="anzhiyu.removeRewardMask()" style="display: none")

View File

@@ -0,0 +1,63 @@
- const { readmode, translate, darkmode, aside, chat_btn } = theme
mixin rightsideItem(array)
each item in array
case item
when 'readmode'
if is_post() && readmode
button#readmode(type="button" title=_p('rightside.readmode_title'))
i.anzhiyufont.anzhiyu-icon-book-open
when 'translate'
if translate.enable
button#translateLink(type="button" title=_p('rightside.translate_title'))= translate.default
when 'darkmode'
if darkmode.enable && darkmode.button
button#darkmode(type="button" title=_p('rightside.night_mode_title'))
i.anzhiyufont.anzhiyu-icon-circle-half-stroke
when 'hideAside'
if aside.enable && aside.button && page.aside !== false
button#hide-aside-btn(type="button" title=_p('rightside.aside'))
i.anzhiyufont.anzhiyu-icon-arrows-left-right
when 'toc'
if showToc
button#mobile-toc-button.close(type="button" title=_p("rightside.toc"))
i.anzhiyufont.anzhiyu-icon-list-ul
when 'chat'
if chat_btn && (theme.chatra.enable || theme.tidio.enable || theme.daovoice.enable || theme.crisp.enable)
button#chat-btn(type="button" title=_p("rightside.chat"))
i.anzhiyufont.anzhiyu-icon-comment-sms
when 'comment'
if commentsJsLoad
a#to_comment(href="#post-comment" title=_p("rightside.scroll_to_comment"))
i.anzhiyufont.anzhiyu-icon-comments
if theme.comment_barrage_config && theme.comment_barrage_config.enable
a#switch-commentBarrage(href="javascript:anzhiyu.switchCommentBarrage();" title="开关弹幕")
i.anzhiyufont.anzhiyu-icon-danmu
#rightside
- const { enable, hide, show } = theme.rightside_item_order
- const hideArray = enable ? hide && hide.split(',') : ['readmode','translate','darkmode','hideAside']
- const showArray = enable ? show && show.split(',') : ['toc','chat','comment']
#rightside-config-hide
if hideArray
+rightsideItem(hideArray)
#rightside-config-show
if enable
if hide
button#rightside-config(type="button" title=_p("rightside.setting"))
i.anzhiyufont.anzhiyu-icon-gear
else
if is_post()
if (readmode || translate.enable || (darkmode.enable && darkmode.button))
button#rightside-config(type="button" title=_p("rightside.setting"))
i.anzhiyufont.anzhiyu-icon-gear
else if translate.enable || (darkmode.enable && darkmode.button)
button#rightside-config(type="button" title=_p("rightside.setting"))
i.anzhiyufont.anzhiyu-icon-gear
if showArray
+rightsideItem(showArray)
button#go-up(type="button" title=_p("rightside.back_to_top"))
i.anzhiyufont.anzhiyu-icon-arrow-up

View File

@@ -0,0 +1,23 @@
-
const shortcutItems = [
{ key: 'K', content: _p('shortcut.close_shortcut') },
{ key: 'A', content: _p('shortcut.toggle_console') },
{ key: 'M', content: _p('shortcut.play_music') },
{ key: 'D', content: _p('shortcut.toggle_mode') },
{ key: 'S', content: _p('shortcut.search') },
{ key: 'R', content: _p('shortcut.random') },
{ key: 'H', content: _p('shortcut.home') },
{ key: 'F', content: _p('shortcut.fish_pond') },
{ key: 'L', content: _p('shortcut.links') },
{ key: 'P', content: _p('shortcut.about') },
{ key: 'I', content: _p('shortcut.context_menu') }
]
#keyboard-tips(class='')
.keyboardTitle=_p('shortcut.title')
.keybordList
each item in shortcutItems
.keybordItem
.keyGroup
.key= "shift " + item.key
.keyContent
.content= item.content

View File

@@ -0,0 +1,50 @@
#sidebar
#menu-mask
#sidebar-menus
if theme.sidebar && theme.sidebar.site_data
.sidebar-site-data.site-data.is-center
if theme.sidebar.site_data.archive
a(href=url_for(config.archive_dir) + '/', title='archive')
.headline= _p('aside.articles')
.length-num= site.posts.length
if theme.sidebar.site_data.tag
a(href=url_for(config.tag_dir) + '/', title='tag' )
.headline= _p('aside.tags')
.length-num= site.tags.length
if theme.sidebar.site_data.category
a(href=url_for(config.category_dir) + '/', title='category')
.headline= _p('aside.categories')
.length-num= site.categories.length
if theme.sidebar && theme.sidebar.display_mode
span.sidebar-menu-item-title=_p("aside.function")
.sidebar-menu-item
a.darkmode_switchbutton.menu-child(href='javascript:void(0);' title=_p("aside.display_mode"))
i.anzhiyufont.anzhiyu-icon-circle-half-stroke
span=_p("aside.display_mode")
if theme.sidebar && theme.sidebar.nav_menu_project
.back-menu-list-groups
each group in theme.nav.menu
.back-menu-list-group
.back-menu-list-title= group.title
.back-menu-list
each item in group.item
a.back-menu-item(href=url_for(item.link), title=item.name)
img.back-menu-item-icon(src=item.icon alt=item.name)
span.back-menu-item-text= item.name
if theme.sidebar && theme.sidebar.menus_items
!=partial('includes/header/menu_item', {}, {cache: true})
if theme.sidebar && theme.sidebar.tags_cloud
span.sidebar-menu-item-title 标签
if theme.aside.card_tags.enable
if site.tags.length
.card-tags
.item-headline
- let tagLimit = theme.aside.card_tags.limit === 0 ? 0 : theme.aside.card_tags.limit || 40
if theme.aside.card_tags.color
.card-tag-cloud!= cloudTags({source: site.tags, minfontsize: 0.875, maxfontsize: 0.875, limit: tagLimit, unit: 'rem', color: true, highlightTags: theme.aside.card_tags.highlightTags})
else
.card-tag-cloud!= cloudTags({source: site.tags, minfontsize: 0.875, maxfontsize: 0.875, limit: tagLimit, unit: 'rem', color: false, highlightTags: theme.aside.card_tags.highlightTags})
hr

View File

@@ -0,0 +1,3 @@
link(rel='stylesheet' href=url_for(theme.asset.aplayer_css) media="print" onload="this.media='all'")
script(src=url_for(theme.asset.aplayer_js))
script(src=url_for(theme.asset.meting_js))

View File

@@ -0,0 +1,31 @@
- const { server, site } = theme.artalk
script.
(() => {
const getArtalkCount = async() => {
try {
const eleGroup = document.querySelectorAll('#recent-posts .artalk-count')
const keyArray = Array.from(eleGroup).map(i => i.getAttribute('data-page-key'))
const headerList = {
method: 'GET',
}
const searchParams = new URLSearchParams({
'site_name': '!{site}',
'page_keys': keyArray
})
const res = await fetch(`!{server}/api/v2/stats/page_comment?${searchParams}`, headerList)
const result = await res.json()
keyArray.forEach((key, index) => {
eleGroup[index].textContent = result.data[key] || 0
})
} catch (err) {
console.error(err)
}
}
window.pjax ? getArtalkCount() : window.addEventListener('load', getArtalkCount)
})()

View File

@@ -0,0 +1,9 @@
case theme.comments.use[0]
when 'Twikoo'
include ./twikoo.pug
when 'Valine'
include ./valine.pug
when 'Waline'
include ./waline.pug
when 'Artalk'
include ./artalk.pug

View File

@@ -0,0 +1,37 @@
script.
(() => {
const getCommentUrl = () => {
const eleGroup = document.querySelectorAll('#recent-posts .article-title')
let urlArray = []
eleGroup.forEach(i=>{
urlArray.push(i.getAttribute('href'))
})
return urlArray
}
const getCount = () => {
const runTwikoo = () => {
twikoo.getCommentsCount({
envId: '!{theme.twikoo.envId}',
region: '!{theme.twikoo.region}',
urls: getCommentUrl(),
includeReply: false
}).then(function (res) {
document.querySelectorAll('#recent-posts .twikoo-count').forEach((item,index) => {
item.textContent = res[index].count
})
}).catch(function (err) {
console.log(err)
})
}
if (typeof twikoo === 'object') {
runTwikoo()
} else {
getScript('!{url_for(theme.asset.twikoo)}').then(runTwikoo)
}
}
window.pjax ? getCount() : window.addEventListener('load', getCount)
})()

View File

@@ -0,0 +1,20 @@
script.
(() => {
function loadValine () {
function initValine () {
let initData = {
el: '#vcomment',
appId: '#{theme.valine.appId}',
appKey: '#{theme.valine.appKey}',
serverURLs: '#{theme.valine.serverURLs}'
}
const valine = new Valine(initData)
}
if (typeof Valine === 'function') initValine()
else getScript('!{url_for(theme.asset.valine)}').then(initValine)
}
window.pjax ? loadValine() : window.addEventListener('load', loadValine)
})()

View File

@@ -0,0 +1,21 @@
- const serverURL = theme.waline.serverURL.replace(/\/$/, '')
script.
(() => {
async function loadWaline () {
try {
const eleGroup = document.querySelectorAll('#recent-posts .waline-comment-count')
const keyArray = Array.from(eleGroup).map(i => i.getAttribute('data-path'))
const res = await fetch(`!{serverURL}/api/comment?type=count&url=${keyArray}`, { method: 'GET' })
const result = await res.json()
result.data.forEach((count, index) => {
eleGroup[index].textContent = count
})
} catch (err) {
console.error(err)
}
}
window.pjax ? loadWaline() : window.addEventListener('load', loadWaline)
})()

View File

@@ -0,0 +1,50 @@
//- https://chatra.io/help/api/
script.
(() => {
const isChatBtn = !{theme.chat_btn}
const isChatHideShow = !{theme.chat_hide_show}
if (isChatBtn) {
const close = () => {
Chatra('minimizeWidget')
Chatra('hide')
}
const open = () => {
Chatra('openChat', true)
Chatra('show')
}
window.ChatraSetup = {
startHidden: true
}
window.chatBtnFn = () => {
const isShow = document.getElementById('chatra').classList.contains('chatra--expanded')
isShow ? close() : open()
}
} else if (isChatHideShow) {
window.chatBtn = {
hide: () => {
Chatra('hide')
},
show: () => {
Chatra('show')
}
}
}
(function(d, w, c) {
w.ChatraID = '#{theme.chatra.id}'
var s = d.createElement('script')
w[c] = w[c] || function() {
(w[c].q = w[c].q || []).push(arguments)
}
s.async = true
s.src = 'https://call.chatra.io/chatra.js'
if (d.head) d.head.appendChild(s)
})(document, window, 'Chatra')
})()

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