first commit

This commit is contained in:
Missdrop
2025-07-16 16:30:56 +00:00
commit 7ee33927cb
11326 changed files with 1230901 additions and 0 deletions

20
node_modules/hexo-theme-redefine/.coderabbit.yaml generated vendored Normal file
View File

@@ -0,0 +1,20 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: "en-US"
early_access: false
reviews:
profile: "chill"
request_changes_workflow: false
high_level_summary: true
poem: false
review_status: true
collapse_walkthrough: true
auto_review:
enabled: true
drafts: false
path_filters:
- "!source/build/**"
- "!*.min.js"
- "!*.min.css"
- "!*.map"
chat:
auto_reply: true

View File

@@ -0,0 +1,115 @@
name: Bug 提交 [中文版本]
description: 提交 Redefine 主题的 Bug 报告
title: "[BUG] "
labels: ["bug"]
assignees: ["EvanNotFound"]
body:
- type: markdown
attributes:
value: |
感谢您提交 Bug 报告!请填写以下信息以帮助我们更好地解决问题。
- type: checkboxes
id: pre-check
attributes:
label: 提交前检查
options:
- label: 我已执行 `hexo clean` 并重新生成,问题仍然存在
required: true
- label: 我已更新到[最新版本](https://redefine-docs.ohevan.com/getting-started#%E6%9B%B4%E6%96%B0)
required: true
- label: 我已确认[同步了主题最新配置文件](https://redefine-docs.ohevan.com/getting-started#%E8%BF%81%E7%A7%BB%E9%85%8D%E7%BD%AE)
required: true
- type: textarea
id: bug-description
attributes:
label: Bug 描述
description: 请详细描述您遇到的问题,并提供相关配置文件内容(敏感信息请用 *** 替换)
placeholder: |
问题描述:
相关配置:
```yaml
# 在此粘贴配置
```
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: 复现步骤
value: |
1.
2.
3.
validations:
required: true
- type: textarea
id: expected
attributes:
label: 预期行为
description: 请描述正常情况下应该是什么样的
- type: textarea
id: screenshots
attributes:
label: 截图
description: 如果可以,请提供截图以帮助说明问题
- type: textarea
id: logs
attributes:
label: 相关日志输出
description: 请复制并粘贴任何相关的日志输出。这将自动格式化为代码,因此不需要反引号。
render: shell
- type: dropdown
id: browsers
attributes:
label: 使用的浏览器
multiple: true
options:
- Chrome
- Firefox
- Safari
- Edge
- 其他
- type: dropdown
id: os
attributes:
label: 操作系统
options:
- Windows
- macOS
- Linux
- iOS
- Android
- 其他
- type: input
id: version
attributes:
label: 浏览器版本
placeholder: "例如Chrome 108.0.5359.124"
- type: dropdown
id: priority
validations:
required: true
attributes:
label: 优先级
description: 请根据问题的严重程度选择优先级
options:
- 低(慢慢来)
- 中(尽快解决)
- 高(需立即解决)
- type: textarea
id: additional-info
attributes:
label: 其他信息
placeholder: 还有什么需要补充的信息吗?

View File

@@ -0,0 +1,106 @@
name: Bug Report
description: Found a bug? Let us help you fix it!
title: "[BUG] "
labels: ["bug"]
assignees: ["EvanNotFound"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a bug! Fill out the details below to help us solve the issue quickly.
- type: checkboxes
id: pre-check
attributes:
label: Quick Checklist
description: "Before submitting, please make sure you've done the following:"
options:
- label: "I've tried running `hexo clean` but the issue is still there"
required: true
- label: "[I'm using the latest version of the theme](https://redefine-docs.ohevan.com/getting-started#update)"
required: true
- label: "[I've updated my theme configuration after updating](https://redefine-docs.ohevan.com/getting-started#migrate-configuration)"
required: true
- type: textarea
id: bug-description
attributes:
label: "What's the issue?"
description: "Tell us what's happening. Please include your relevant config settings from `_config.yml` and `_config.redefine.yml` (remember to remove any sensitive info)."
validations:
required: true
- type: textarea
id: reproduce-steps
attributes:
label: "How can we reproduce this?"
placeholder: "Walk us through the steps to see this bug in action"
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: "What should have happened?"
placeholder: "Tell us what you expected to see"
- type: textarea
id: screenshots
attributes:
label: "Screenshots (if any)"
description: "Screenshots can help illustrate the problem."
- type: textarea
id: logs
attributes:
label: "Related Logs"
description: "Please copy and paste any relevant log output. This will be automatically formatted as code, so no backticks are needed."
render: shell
- type: dropdown
id: pc-browser
attributes:
label: "What browser(s) are you using?"
multiple: true
options:
- Chrome
- Firefox
- Safari
- Edge
- Other
- type: dropdown
id: pc-os
attributes:
label: "What operating system are you on?"
options:
- Windows
- macOS
- Linux
- iOS
- Android
- Other
- type: input
id: pc-version
attributes:
label: "Browser Version"
placeholder: "e.g., Chrome 108.0.5359.124"
- type: dropdown
id: priority
validations:
required: true
attributes:
label: "Priority"
description: "Please select the priority based on the severity of the issue."
options:
- Low
- Medium
- High
- type: textarea
id: additional-info
attributes:
label: "Anything else we should know?"
placeholder: "Add any other helpful context about the problem here"

View File

@@ -0,0 +1,55 @@
name: 功能建议 [中文版本]
description: 帮助我们改进 Redefine 主题
title: "[功能建议]"
labels: ["enhancement"]
assignees: ["EvanNotFound"]
body:
- type: markdown
attributes:
value: |
感谢您提出功能建议!请填写以下信息,以便我们更好地理解您的想法。
- type: textarea
id: feature-description
attributes:
label: "功能描述"
description: "请详细描述您希望的功能"
placeholder: |
1. 这个功能是什么?
2. 这个功能解决了什么问题?
3. 您期望的使用场景是什么?
validations:
required: true
- type: textarea
id: implementation
attributes:
label: "实现建议"
description: "如果您对如何实现此功能有想法,请在此分享"
placeholder: "您认为这个功能应该如何实现?可以参考其他类似项目的实现方式。"
- type: textarea
id: screenshots
attributes:
label: "设计参考"
description: "如果有类似功能的截图或设计稿,请在此分享"
placeholder: "可以是草图、截图或其他参考资料"
- type: dropdown
id: priority
attributes:
label: "优先级"
description: "您认为此功能的重要程度如何?"
options:
- 低(锦上添花)
- 中(较为重要)
- 高(急需解决)
validations:
required: true
- type: textarea
id: additional-info
attributes:
label: "补充信息"
description: "还有什么需要补充的信息吗?"
placeholder: "例如:使用场景示例、潜在影响等"

View File

@@ -0,0 +1,55 @@
name: Feature Request
description: Suggestions to enhance the Redefine theme
title: "[Feature Request]:"
labels: ["enhancement"]
assignees: ["EvanNotFound"]
body:
- type: markdown
attributes:
value: |
Thank you for suggesting a feature! Please fill out the information below to help us better understand your idea.
- type: textarea
id: feature-description
attributes:
label: "Feature Description"
description: "Please describe the feature you'd like to see in detail"
placeholder: |
1. What is this feature?
2. What problem does it solve?
3. What are your expected use cases?
validations:
required: true
- type: textarea
id: implementation
attributes:
label: "Implementation Suggestions"
description: "If you have ideas about how to implement this feature, please share them here"
placeholder: "How do you think this feature should be implemented? You can reference similar implementations from other projects."
- type: textarea
id: screenshots
attributes:
label: "Design References"
description: "Share any mockups, screenshots, or design references that help illustrate your idea"
placeholder: "This can include sketches, screenshots, or other reference materials"
- type: dropdown
id: priority
attributes:
label: "Priority"
description: "How important do you think this feature is?"
options:
- Low (Nice to have)
- Medium (Important)
- High (Critical)
validations:
required: true
- type: textarea
id: additional-info
attributes:
label: "Additional Context"
description: "Any other information you'd like to share?"
placeholder: "For example: usage scenarios, potential impact, etc."

View File

@@ -0,0 +1,32 @@
name: Publish to Aliyun
on:
release:
types: [published]
workflow_dispatch:
jobs:
aliyun-cdn-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Setup Aliyun OSS
uses: manyuanrong/setup-ossutil@master
with:
endpoint: ${{ secrets.ALI_ENDPOINT }}
access-key-id: ${{ secrets.ALI_ACCESSKEYID }}
access-key-secret: ${{ secrets.ALI_ACCESSKEYSECRET }}
- name: Upload to Aliyun OSS
run: |
VERSION=$(echo ${{ github.event.release.name }} | sed 's/v//')
ossutil cp -r source/ oss://${{ secrets.ALI_BUCKET }}/projects/hexo-theme-redefine@$VERSION/source/

View File

@@ -0,0 +1,50 @@
name: Build JS and CSS
on:
push:
branches:
- main
- dev
paths:
- 'source/js/**'
- 'source/css/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
persist-credentials: false # Prevent using GITHUB_TOKEN automatically
fetch-depth: 0 # Fetch all history for accurate file diffs
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x' # Specify your Node.js version
- name: Install Dependencies
run: npm install
- name: Build Project
run: npm run build
- name: Configure Git
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
- name: Commit and Push Changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git add source/js/build source/css/build
# Check if there are any changes
if ! git diff --cached --quiet; then
git commit -m "ci: build and update source/build/js and source/build/css [skip ci]"
git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:${GITHUB_REF#refs/heads/}
else
echo "No changes to commit"
fi

View File

@@ -0,0 +1,28 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Publish to NPM
on:
release:
types: [published]
workflow_dispatch:
jobs:
npm-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

View File

@@ -0,0 +1,127 @@
name: Vercel Preview Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
workflow_dispatch:
push:
branches:
- dev
pull_request_target:
branches:
- dev
- main
jobs:
preview-deployment:
runs-on: ubuntu-latest
environment:
name: ${{ github.event_name == 'pull_request_target' && 'PR Preview' || 'Preview' }}
url: ${{ steps.deploy-to-vercel.outputs.preview-url }}
steps:
- name: Determine checkout details
id: checkout-details
uses: actions/github-script@v7
with:
script: |
const isPr = context.eventName === 'pull_request_target'
const ref = isPr ? context.payload.pull_request.head.ref : context.ref
const repo = isPr ? context.payload.pull_request.head.repo.full_name : context.repo.full_name
core.setOutput('ref', ref)
core.setOutput('repo', repo)
- name: Checkout theme repository
uses: actions/checkout@v4
with:
path: 'theme'
ref: ${{ steps.checkout-details.outputs.ref }}
repository: ${{ steps.checkout-details.outputs.repo }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x' # Specify your required Node.js version
- name: Clone Hexo site repository
run: git clone https://github.com/EvanNotFound/redefine-demo.git hexo-site
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x' # Ensure compatibility with Python 3.x
- name: Install PyYAML
run: pip install pyyaml
- name: Enable Developer Mode in Config
run: |
echo "import yaml
import logging
# Set up logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
try:
# Load YAML file
with open('hexo-site/_config.redefine.yml', 'r') as file:
config = yaml.safe_load(file)
logging.info('YAML file loaded successfully.')
# Modify the developer mode and CDN settings
config['developer']['enable'] = True
logging.info('Developer mode set to True.')
config['cdn']['enable'] = False
logging.info('CDN set to False.')
# Save the modified YAML file
with open('hexo-site/_config.redefine.yml', 'w') as file:
yaml.safe_dump(config, file, default_flow_style=False, sort_keys=False)
logging.info('YAML file saved with new settings.')
except Exception as e:
logging.error('An error occurred: {}'.format(e))
" > update_yaml.py
python update_yaml.py
- name: Move theme into Hexo site
run: |
mv theme hexo-site/themes/redefine
- name: Install dependencies
run: |
cd hexo-site
npm install
- name: Build Hexo
run: |
cd hexo-site
npm install
npm uninstall hexo-theme-redefine
npm run build
- name: Change directory to hexo-site
run: echo "HEXO_SITE_DIR=${{ github.workspace }}/hexo-site" >> $GITHUB_ENV
- name: Install Vercel CLI
run: npm install -g vercel@22.0.1
- name: Deploy to Vercel Action
id: deploy-to-vercel
uses: EvanNotFound/vercel-deployment-for-github-actions@v1.2.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
WORKING_DIRECTORY: ${{ env.HEXO_SITE_DIR }}
VERCEL_SCOPE: ${{ secrets.VERCEL_SCOPE }}
PRODUCTION: false
DEPLOY_PR_FROM_FORK: true
ALIAS_DOMAINS: |
redefine-preview.vercel.app
redefine-preview-git-{SHA}.vercel.app
PR_PREVIEW_DOMAIN: "redefine-preview-pr-{PR}.vercel.app"

View File

@@ -0,0 +1,62 @@
name: Vercel Production Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
workflow_dispatch:
push:
branches:
- main
jobs:
production-deployment:
runs-on: ubuntu-latest
steps:
- name: Checkout theme repository
uses: actions/checkout@v4
with:
path: 'theme' # Checkout the theme repository into a directory named 'theme'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x' # Specify your required Node.js version
- name: Clone Hexo site repository
run: git clone https://github.com/EvanNotFound/redefine-demo.git hexo-site
- name: Move theme into Hexo site
run: |
mv theme hexo-site/themes/redefine
- name: Install dependencies
run: |
cd hexo-site
npm install
- name: Build Hexo
run: |
cd hexo-site
npm install
npm uninstall hexo-theme-redefine
npm run build
- name: Change directory to hexo-site
run: echo "HEXO_SITE_DIR=${{ github.workspace }}/hexo-site" >> $GITHUB_ENV
- name: Install Vercel CLI
run: npm install -g vercel@22.0.1
- name: Deploy to Vercel Action
uses: EvanNotFound/vercel-deployment-for-github-actions@v1.1.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
WORKING_DIRECTORY: ${{ env.HEXO_SITE_DIR }}
VERCEL_SCOPE: ${{ secrets.VERCEL_SCOPE }}
PRODUCTION: true
DEPLOY_PR_FROM_FORK: true
PR_PREVIEW_DOMAIN: "redefine-preview-pr-{PR}.vercel.app"

View File

@@ -0,0 +1,20 @@
name: Close inactive issues
on:
schedule:
- cron: "30 1 * * *"
jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v9
with:
days-before-issue-stale: 30
days-before-issue-close: 14
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
only-issue-labels: "question"
repo-token: ${{ secrets.GITHUB_TOKEN }}

1
node_modules/hexo-theme-redefine/.husky/pre-commit generated vendored Normal file
View File

@@ -0,0 +1 @@
npm run build

128
node_modules/hexo-theme-redefine/CODE_OF_CONDUCT.md generated vendored Normal file
View File

@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
contact@ohevan.com.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

51
node_modules/hexo-theme-redefine/CONTRIBUTING.md generated vendored Normal file
View File

@@ -0,0 +1,51 @@
# Contributing to hexo-theme-redefine
Thank you for considering contributing to hexo-theme-redefine! We appreciate your time and effort to make our theme better.
Before you start, please make sure you read the [README](README.md) and familiarize yourself with the project.
## Getting Started
To start contributing to hexo-theme-redefine, please follow these steps:
1. Fork the [repository](https://github.com/EvanNotFound/hexo-theme-redefine) on GitHub.
2. Clone your forked repository to your local machine.
3. Make your changes and test them locally.
4. Commit your changes and push them to your forked repository.
5. Create a pull request (PR) on GitHub to **`dev` branch**.
## Guidelines
We value your contributions and want to ensure they are appropriate for the project. Please follow these guidelines when contributing:
1. Use [GitHub issues](https://github.com/yourusername/yourthemename/issues) to report bugs, suggest new features, or ask questions.
2. Use descriptive commit messages and include references to related issues or PRs.
Format:
```
[section]: [brief info]
```
For example:
```
footer: optimize style
```
3. Follow the existing code style and conventions.
4. Write clear and concise documentation for any changes you make.
5. Test your changes locally and ensure they do not break the existing functionality.
## Code of Conduct
To ensure a welcoming and inclusive community, we adhere to the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). Please read this before contributing.
## Contact
If you have any questions or need help with your contributions, please contact me at contact@ohevan.com.
Thank you for your contributions to hexo-theme-redefine!

82
node_modules/hexo-theme-redefine/DONATION.md generated vendored Normal file
View File

@@ -0,0 +1,82 @@
# 赞助 / Sponsorship
**非常感谢各位对本项目的支持!!**
**Thank you very much for your support to this project!**
## 引言 / Introduction
刚开始这个主题其实是自用的,后来有网友看见我的博客,就问我是怎么改的。
想了一下,就开了个项目。一路走来,跌跌撞撞也写了几个版本,也收到了不少网友的反馈,而且第一次拿到这么多 Star在这里非常感谢各位的支持。
本来没想着要求打赏,但是目前阿里云国内下行流量平均一个月消耗 100GB本人每月流量费用大概在 20 元左右,想着换 unpkg/jsdelivr 做 CDN但是那个速度真的感人。
如果各位能支持一下,一块两块都已足够,就能维持阿里云 CDN 的流量费用,本人实在是感激不尽。
感谢所有赞助本项目的朋友,你们的支持是我继续更新的动力!
Initially, I designed this theme just for my personal use. However, as time went on, some readers stumbled upon my blog and inquired about the customizations I had made.
After giving it some thought, I decided to turn this into a project. Along the journey, I encountered a few bumps and went through several iterations. I also received valuable feedback from numerous users. And it's quite exhilarating to see it receiving such a high number of stars for the first time. I want to express my genuine appreciation for all the support you've shown.
At first, I hadn't really thought about asking for contributions. But at present, the average monthly data consumption on Aliyun in China is around 100GB. My monthly data costs are roughly 20 yuan. I considered switching to unpkg/jsdelivr for a CDN, but the speed there is a real letdown.
If any of you could provide a bit of support, even a small amount like one or two dollars, it would be enough to cover the CDN data costs on Aliyun. I would be incredibly thankful for your help.
A big thank you to all the friends who have sponsored this project. Your support is what keeps me motivated to keep refining and updating it!
## 赞助方法 / Sponsorship Methods
| 微信 / WeChat | 支付宝 / Alipay | Paypal |
|:--------------------------------------------------------:|:---------------------------------:|:-------------------------:|
| ![IMG_0382](https://user-images.githubusercontent.com/68590232/223455834-d2e5ab6e-9d75-4bbf-adfb-2c519d6b4582.JPG) | ![IMG_9570](https://user-images.githubusercontent.com/68590232/223463950-f7276ef8-0198-4070-8541-697ec25e5b9a.png) | ![IMG_0385](https://user-images.githubusercontent.com/68590232/223459896-593e105e-89f3-4631-8cab-cb7798a53bf1.jpg) |
赞助完以后,请各位加我微信,在 [evannotfound.com/contact](https://evannotfound.com/contact) 联系我添加 GitHub 账号和网站链接!
After making a donation, if you want to get in touch with me, please add me on Discord with my username `evannotfound`.
感谢!
Thank you!
## 赞助名单 / Sponsorship List
按时间先后排序 / Sorted by chronological order
| 赞助时间 / Date | 赞助人 / Sponsor | 赞助金额 / Amount | 赞助方式 / Method | 网站 / Website |
|:-----------:|:----------------------------------------------------------:|:-------------:|:----------------:|:----------------------------------------------------------:|
| Mar 4 | [@username0occupied](https://github.com/username0occupied) | ¥6.66 | 微信红包 | - |
| Mar 4 | [@jkoor](https://github.com/jkoor) | ¥15.00 | 微信红包 | [https://jkor.site](https://jkor.site) |
| Mar 10 | **峰 | ¥20.14 | 支付宝 | - |
| Mar 17 | Summer.南方 | ¥1.68 | 微信赞赏码 | - |
| Mar 19 | 那个我依旧是从前的我😄 | ¥100.00 | 微信赞赏码 | - |
| Mar 31 | [@牧丰086](https://github.com/mufeng086) | ¥6.66 | 支付宝 | [https://mufeng086.top](https://mufeng086.top) |
| Apr 11 | 飞呀菲呀 | ¥6.66 | 微信赞赏码 | - |
| Apr 18 | 👺 | ¥6.66 | 微信赞赏码 | [https://liohi.github.io](https://liohi.github.io) |
| Apr 19 | [@yzsong06](https://github.com/yzsong06) | ¥3.00 | 微信赞赏码 | - |
| Apr 23 | **博 | ¥10.00 | 支付宝 | - |
| May 7 | JiaqiGemini | ¥14.99 | 微信赞赏码 | - |
| May 12 | [@Sevdawk](https://github.com/Sevdawk) | ¥8.88 | 微信赞赏码 | [https://sevdawk.github.io](https://sevdawk.github.io) |
| May 13 | 好名字 | ¥6.66 | 微信赞赏码 | - |
| May 24 | [@HuTa0kj](https://github.com/HuTa0kj) | ¥8.88 | 微信赞赏码 | [https://huta0kj.github.io](https://huta0kj.github.io) |
| Jun 5 | **杰 | ¥6.00 | 支付宝 | - |
| Jun 12 | Anonymous | ¥0.99 | 微信赞赏码 | - |
| Jun 22 | [@JuTemp](https://github.com/JuTemp) | ¥15.00 | 支付宝 | [https://jtp0415.top](https://jtp0415.top) |
| Jul 11 | 匿名 | ¥40.00 | 支付宝 | - |
| Jul 13 | [@825i](https://github.com/825i) | $20.00 | Paypal | [https://blog.xtu.icu/](https://blog.xtu.icu/) |
| Jul 14 | 点点 | ¥8.88 | 微信赞赏码 | - |
| Aug 1 | 风宇 | ¥14.99 | 微信赞赏码 | [https://krazyu.com](https://krazyu.com) |
| Aug 27 | 匿名 | ¥88.00 | 微信赞赏码 | - |
| Sep 03 | Locam | ¥30.00 | 支付宝 | [https://locam-cyj.github.io](https://locam-cyj.github.io) |
| Sep 03 | 夜鹿 | ¥6.66 | 微信赞赏码 | - |
| Sep 03 | **辉 | ¥6.66 | 支付宝 | - |
| Sep 04 | 匿名 | ¥10.00 | 微信赞赏码 | - |
| Sep 23 | 今日店休. | ¥6.66 | 微信赞赏码 | - |
| Sep 29 | Ficon | ¥6.00 | 微信 | - |
| Oct 05 | Ryou | ¥14.99 | 微信赞赏码 | - |
| Oct 16 | 沈*昊 | ¥20.00 | 微信赞赏码 | - |
| Oct 24 | Neptune. | ¥14.99 | 微信赞赏码 | - |
| Nov 26 | **青 | ¥25.00 | 支付宝 | - |
| Nov 27 | :-) | ¥16.66 | 微信 | - |
| Sep 7 | Anjou Duan | ¥99.00 | 微信赞赏码 | [https://heycsm.com](https://heycsm.com) |
| Sep 19 | 夕灵 | ¥6.66 | 微信赞赏码 | [https://starlitxiling.github.io/](https://starlitxiling.github.io/) |

674
node_modules/hexo-theme-redefine/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://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 <http://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
<http://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
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

164
node_modules/hexo-theme-redefine/README.md generated vendored Normal file
View File

@@ -0,0 +1,164 @@
<div align="right">
<img src="https://img.shields.io/badge/-English-A31F34?style=for-the-badge" alt="English" />
<a title="zh-CN" href="README_zh-CN.md"> <img src="https://img.shields.io/badge/-%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87-545759?style=for-the-badge" alt="简体中文"></a>
<a title="zh-TW" href="README_zh-TW.md"><img src="https://img.shields.io/badge/-%E7%B9%81%E4%BD%93%E4%B8%AD%E6%96%87-545759?style=for-the-badge" alt="繁体中文"></a>
</div>
<a href="https://redefine.ohevan.com"><img align="center" src="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/f2ff10f6-a740-4120-ba04-1b2a518fb019" alt="Redefine"></a>
# hexo-theme-redefine
Hexo-theme-Redefine reimagines simplicity, speed, and purity, without sacrificing functionality or design. Its sleek, modern aesthetic is packed with useful features, blending style and practicality seamlessly.
Building on the solid foundation of hexo-theme-keep, "Redefine" elevates the style and incorporates valuable writing tools and plugins. It offers extensive customization options, allowing you to tailor every detail to your preferences. With Redefine, your blogging experience becomes unique and effortless, showcasing your personal style and needs.
<p align="center">
<a href="https://www.npmjs.com/package/hexo-theme-redefine">
<img src="https://img.shields.io/npm/v/hexo-theme-redefine?color=F38181&amp;label=version&amp;logo=npm&amp;logoColor=F38181&amp;style=for-the-badge" referrerpolicy="no-referrer" alt="NPM version" />
</a>
<a href="https://www.npmjs.com/package/hexo-theme-redefine">
<img src="https://img.shields.io/npm/dm/hexo-theme-redefine?color=FCE38A&amp;logo=npm&amp;logoColor=FCE38A&amp;style=for-the-badge" referrerpolicy="no-referrer" alt="npm downloads" />
</a>
<a href="https://www.npmjs.com/package/hexo-theme-redefine">
<img src="https://img.shields.io/npm/dt/hexo-theme-redefine?color=95E1D3&amp;label=total&amp;logo=npm&amp;logoColor=95E1D3&amp;style=for-the-badge" referrerpolicy="no-referrer" alt="npm-total" />
</a>
<a href="https://hexo.io"><img src="https://img.shields.io/badge/hexo-%3E=5.0.0-8caaee?style=for-the-badge&amp;logo=hexo&amp;logoColor=8caaee" referrerpolicy="no-referrer" alt="Required Hexo version" /></a>
<img src="https://img.shields.io/badge/node-%3E=12.0-a6d189?style=for-the-badge&amp;logo=node.js&amp;logoColor=a6d189" referrerpolicy="no-referrer" alt="NodeJS Version" />
</p>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/337c1801-7a59-45af-a02a-583508be69a5" />
<source media="(prefers-color-scheme: light)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/d88a5544-c86e-46ab-8e52-0582b437f989" />
<img alt="Cover Image" src="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/d88a5544-c86e-46ab-8e52-0582b437f989" />
</picture>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/5d51b48d-7b08-4da0-a304-933424739203" />
<source media="(prefers-color-scheme: light)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/c6df4b81-557d-4e0b-8038-b056075d0fa4" />
<img alt="Pages Image" src="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/c6df4b81-557d-4e0b-8038-b056075d0fa4" />
</picture>
## 🌐 Demo
- [EvanNotFound's Blog](https://ohevan.com)
- [Theme Redefine Demo](https://redefine.ohevan.com)
- [Redefine Theme Showcase](https://redefine.ohevan.com/showcase)
If you are also using Redefine, please go to [Redefine Theme Showcase](https://redefine.ohevan.com/showcase) to add your blog link.
## ⛰️ Features
- [Note Module](https://redefine-docs.ohevan.com/modules/notes)
- [Friend Link Page](https://redefine-docs.ohevan.com/page_templates/friends)
- [Mathjax Support](https://redefine-docs.ohevan.com/plugins/mathjax)
- Code block language display
- Light/Dark mode switching
- [Font Awesome 6.2.1 Pro](https://redefine-docs.ohevan.com/basic/fontawesome) (contains different styles like Duotone/Regular/Thin/Sharp)
- [Drop-down menu](https://redefine-docs.ohevan.com/dhome/navbar#%E9%93%BE%E6%8E%A5%E5%88%97%E8%A1%A8)
- [Customizable footer](https://redefine-docs.ohevan.com/footer)
- [Site Uptime Display](https://redefine-docs.ohevan.com/footer#%E8%BF%90%E8%A1%8C%E6%97%B6%E9%97%B4)
- [Article Header Image](https://redefine-docs.ohevan.com/article_customize/banner)
- [Mermaid JS support](https://redefine-docs.ohevan.com/plugins/mermaid)
- SEO friendly
- [Aplayer support](https://redefine-docs.ohevan.com/plugins/aplayer)
- [Shuoshuo support](https://redefine-docs.ohevan.com/shuoshuo)
- [Customizable Font](https://redefine-docs.ohevan.com/basic/global#%E8%87%AA%E5%AE%9A%E4%B9%89%E5%AD%97%E4%BD%93)
- Tailwind CSS Included
## ☁️ Installation
The easiest way to install Theme Redefine is by using **npm** (after your hexo version has been up to `5.0`+)
```sh
$ cd your-hexo-site
$ npm install hexo-theme-redefine@latest
```
Another method is by **git clone**
```sh
$ cd your-hexo-site
$ git clone https://github.com/EvanNotFound/hexo-theme-redefine.git themes/redefine
```
After the installation, go to the `_config.yml` of your hexo site and set
```yaml
theme: redefine
```
## ⏫ Update
To update hexo-theme-redefine, you can run the same **npm** command
```sh
$ npm install hexo-theme-redefine@latest
```
If you installed the theme by **git clone**, you can update the theme by running the following command
```sh
$ cd themes/redefine
$ git pull
```
## 📄 Documentations
Please read [Redefine Docs](https://redefine-docs.ohevan.com/) when installing
It's very easy to understand.
## ☕ Support
Feel free to **pull request** and **send issues**.
If you have any questions, please send an email to [contact@ohevan.com](mailto:contact@ohevan.com). I will reply in time.
Please **give me a star** to support me, thanks!
Also, if you are using [Typora](https://typora.io/), check out [Typora Theme Redefine](https://github.com/EvanNotFound/typora-theme-redefine) so that you can preview the styles of your blog in Typora.
## 💗 Donations
Thanks to all the people who have donated to me. Your support is my greatest motivation.
If you like this theme, please give a star. You can also support me by [donating](https://github.com/EvanNotFound/hexo-theme-redefine/blob/dev/DONATION.md).
This is the list of all the people who have donated to me: [Donation List](https://github.com/EvanNotFound/hexo-theme-redefine/blob/dev/DONATION.md)
🎉 **想体验 OpenAI 的 ChatGPT Plus 会员?官网 20 美元每月太贵了?不用担心!**
🚀 立即加入我的 [GPT Plus Share](https://gpt.oknice.ca) GPT Plus 共享站ChatGPT Plus 随心用。
- ✅ 支持 OpenAI 最新所有模型,包括 `GPT-4o`, `o3` 系列模型,支持高级图片生成
- ✅ 后台大量官方正版账号号池,随心使用
- ✅ 每月仅需低至 23.99 人民币,支持一天免费试用
- ✅ 无需梯子,国内免翻访问!
- ✅ 由 Evan 本人运营,售后保证,已稳定运行超过一年
[![gpt-billboard](https://github.com/user-attachments/assets/f049fb37-0587-4af9-b59d-b1910d310549)](https://www.gptplus.ca/home)
## 🌟 Star History
<p align="center">
<a href="https://star-history.com/#EvanNotFound/hexo-theme-redefine&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=EvanNotFound/hexo-theme-redefine&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=EvanNotFound/hexo-theme-redefine&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=EvanNotFound/hexo-theme-redefine&type=Date" />
</picture>
</a>
</p>
## 💻 Development
If you want to contribute to this project, you can clone the `dev` branch and check out the [Development Docs](https://redefine-docs.ohevan.com/developer) to get started.

160
node_modules/hexo-theme-redefine/README_zh-CN.md generated vendored Normal file
View File

@@ -0,0 +1,160 @@
<div align="right">
<a title="en" href="README.md"><img src="https://img.shields.io/badge/-English-545759?style=for-the-badge" alt="english"></a>
<img src="https://img.shields.io/badge/-%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87-A31F34?style=for-the-badge" alt="简体中文">
<a title="zh-TW" href="README_zh-TW.md"><img src="https://img.shields.io/badge/-%E7%B9%81%E4%BD%93%E4%B8%AD%E6%96%87-545759?style=for-the-badge" alt="繁体中文"></a>
</div>
<a href="https://redefine.ohevan.com"><img align="center" src="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/f2ff10f6-a740-4120-ba04-1b2a518fb019" alt="Redefine"></a>
# hexo-theme-redefine
"Redefine" 是一款简洁、快速、纯粹的 Hexo 主题,其简约之美遥非平凡,让人领略到设计的力量。本主题不仅包含诸多实用丰富的功能,而且赋予了精致而出色的设计理念。
本主题源自 [hexo-theme-keep](https://github.com/XPoet/hexo-theme-keep) 的早期版本,进一步进行了精心打磨和扩展。在保留了原主题的精炼基础上,我们优化了整体样式,引入了丰富的写作模块,并增添了多种插件支持。同时,大幅提高了自定义的灵活度,旨在让您能够更加便捷、顺畅地运用本主题,打造出独具匠心的个人博客。
<p align="center">
<a href="https://www.npmjs.com/package/hexo-theme-redefine">
<img src="https://img.shields.io/npm/v/hexo-theme-redefine?color=F38181&amp;label=version&amp;logo=npm&amp;logoColor=F38181&amp;style=for-the-badge" referrerpolicy="no-referrer" alt="NPM version" />
</a>
<a href="https://www.npmjs.com/package/hexo-theme-redefine">
<img src="https://img.shields.io/npm/dm/hexo-theme-redefine?color=FCE38A&amp;logo=npm&amp;logoColor=FCE38A&amp;style=for-the-badge" referrerpolicy="no-referrer" alt="npm downloads" />
</a>
<a href="https://www.npmjs.com/package/hexo-theme-redefine">
<img src="https://img.shields.io/npm/dt/hexo-theme-redefine?color=95E1D3&amp;label=total&amp;logo=npm&amp;logoColor=95E1D3&amp;style=for-the-badge" referrerpolicy="no-referrer" alt="npm-total" />
</a>
<a href="https://hexo.io"><img src="https://img.shields.io/badge/hexo-%3E=5.0.0-8caaee?style=for-the-badge&amp;logo=hexo&amp;logoColor=8caaee" referrerpolicy="no-referrer" alt="Required Hexo version" /></a>
<img src="https://img.shields.io/badge/node-%3E=12.0-a6d189?style=for-the-badge&amp;logo=node.js&amp;logoColor=a6d189" referrerpolicy="no-referrer" alt="NodeJS Version" />
</p>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/337c1801-7a59-45af-a02a-583508be69a5" />
<source media="(prefers-color-scheme: light)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/d88a5544-c86e-46ab-8e52-0582b437f989" />
<img alt="Cover Image" src="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/d88a5544-c86e-46ab-8e52-0582b437f989" />
</picture>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/5d51b48d-7b08-4da0-a304-933424739203" />
<source media="(prefers-color-scheme: light)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/c6df4b81-557d-4e0b-8038-b056075d0fa4" />
<img alt="Pages Image" src="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/c6df4b81-557d-4e0b-8038-b056075d0fa4" />
</picture>
## 🌐 官方演示站
- [EvanNotFound's Blog](https://ohevan.com)
- [Theme Redefine 演示站点](https://redefine.ohevan.com)
- [Redefine 用户墙](https://redefine.ohevan.com/showcase)
如果你也在使用 Redefine欢迎在前往 [Redefine 用户墙](https://redefine.ohevan.com/showcase) 添加你的博客链接。
## ⛰️ 部分功能
- [笔记模块](https://redefine-docs.ohevan.com/modules/notes)
- [友链样式](https://redefine-docs.ohevan.com/page_templates/friends)
- [数学公式](https://redefine-docs.ohevan.com/plugins/mathjax)
- 代码块语言显示
- Light/Dark 模式切换
- [Font Awesome 6.2.1 Pro](https://redefine-docs.ohevan.com/basic/fontawesome)(包含 Duotone/Regular/Thin 等不同样式)
- [下拉菜单](https://redefine-docs.ohevan.com/dhome/navbar#%E9%93%BE%E6%8E%A5%E5%88%97%E8%A1%A8)
- [可自定义页脚](https://redefine-docs.ohevan.com/footer)
- [网站运行时间显示](https://redefine-docs.ohevan.com/footer#%E8%BF%90%E8%A1%8C%E6%97%B6%E9%97%B4)
- [文章头图](https://redefine-docs.ohevan.com/article_customize/banner)
- [Mermaid JS 支持](https://redefine-docs.ohevan.com/plugins/mermaid)
- SEO 友好
- [Aplayer 音乐播放器支持](https://redefine-docs.ohevan.com/plugins/aplayer)
- [说说模块](https://redefine-docs.ohevan.com/shuoshuo)
- [自定义字体](https://redefine-docs.ohevan.com/basic/global#%E8%87%AA%E5%AE%9A%E4%B9%89%E5%AD%97%E4%BD%93)
- Tailwind CSS 支持
## ☁️ 安装
如果你的 Hexo 版本在 `5.0` 及以上,推荐通过 `npm` 安装
```sh
$ cd your-hexo-site
$ npm install hexo-theme-redefine@latest
```
或者使用 git 克隆
```sh
$ cd your-hexo-site
$ git clone https://github.com/EvanNotFound/hexo-theme-redefine.git themes/redefine
```
安装完成后,在 Hexo 配置文件 `_config.yml` 中将 `theme` 设置为 `Redefine`
```yaml
theme: redefine
```
## ⏫ 更新
Theme Redefine 经常发布新版本,你可以通过如下命令更新 Theme Redefine。
通过 `npm` 安装最新版本:
```sh
$ npm install hexo-theme-redefine@latest
```
通过 `git` 更新到最新的 `main` 分支:
```sh
$ cd themes/redefine
$ git pull
```
## 📄 文档
请阅读 [Redefine 主题官方文档](https://redefine-docs.ohevan.com/) 进行主题配置与安装,非常简单易懂。
## ☕ 支持
欢迎 **pull request** 或者 提交 **issues**.
如有问题,请发邮件到 [contact@ohevan.com](mailto:contact@ohevan.com). 我会及时回复
如果你觉得主题还不错的话,欢迎给我 Github 点个 Star谢谢。建议点个 Watch以便及时获取主题更新。
如果你在使用 [Typora](https://typora.io/) 编辑器写文章,欢迎查看我写的 [Typora Redefine 主题](https://github.com/EvanNotFound/typora-theme-redefine),按照本 Hexo 主题样式编写,让你可以直接预览文章效果,更好排版。
## 💗 赞助
非常感谢所有赞助者的支持,你们的支持是我维护这个项目的动力。
如果你觉得这个项目还不错,欢迎给我[买杯咖啡](https://github.com/EvanNotFound/hexo-theme-redefine/blob/dev/DONATION.md),让我更有动力维护这个项目。
所有赞助者名单:[赞助者名单](https://github.com/EvanNotFound/hexo-theme-redefine/blob/dev/DONATION.md)
🎉 **想体验 OpenAI 的 ChatGPT Plus 会员?官网 20 美元每月太贵了?不用担心!**
🚀 立即加入我的 [GPT Plus Share](https://gpt.oknice.ca) GPT Plus 共享站ChatGPT Plus 随心用。
- ✅ 支持 OpenAI 最新所有模型,包括 `GPT-4o`, `o3` 系列模型,支持高级图片生成
- ✅ 后台大量官方正版账号号池,随心使用
- ✅ 每月仅需低至 23.99 人民币,支持一天免费试用
- ✅ 无需梯子,国内免翻访问!
- ✅ 由 Evan 本人运营,售后保证,已稳定运行超过一年
[![gpt-billboard](https://github.com/user-attachments/assets/f049fb37-0587-4af9-b59d-b1910d310549)](https://www.gptplus.ca/home)
## 🌟 Star 记录
<a href="https://star-history.com/#EvanNotFound/hexo-theme-redefine&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=EvanNotFound/hexo-theme-redefine&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=EvanNotFound/hexo-theme-redefine&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=EvanNotFound/hexo-theme-redefine&type=Date" />
</picture>
</a>
## 💻 主题开发
如果你想参与主题开发,请 `clone` 本项目的 `dev` 分支,然后在 `dev` 分支上进行开发。
同时,请查看 [Redefine 主题开发文档](https://redefine-docs.ohevan.com/developer)。

163
node_modules/hexo-theme-redefine/README_zh-TW.md generated vendored Normal file
View File

@@ -0,0 +1,163 @@
<div align="right">
<a title="en" href="README.md"><img src="https://img.shields.io/badge/-English-545759?style=for-the-badge" alt="english"></a>
<a title="zh-CN" href="README_zh-CN.md"> <img src="https://img.shields.io/badge/-%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87-545759?style=for-the-badge" alt="简体中文"></a>
<img src="https://img.shields.io/badge/-%E7%B9%81%E9%AB%94%E4%B8%AD%E6%96%87-A31F34?style=for-the-badge" alt="language">
</div>
<a href="https://redefine.ohevan.com"><img align="center" src="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/f2ff10f6-a740-4120-ba04-1b2a518fb019" alt="Redefine"></a>
# hexo-theme-redefine
"Redefine" 是一款簡潔、快速、純粹的 Hexo 主題,其簡約之美遙非平凡,讓人領略到設計的力量。本主題不僅包含諸多實用豐富的功能,而且賦予了精緻而出色的設計理念。
本主題源自 [hexo-theme-keep](https://github.com/XPoet/hexo-theme-keep) 的早期版本,進一步進行了精心打磨和擴展。在保留了原主題的精煉基礎上,我們優化了整體風格,引入了豐富的寫作模組,並增添了多種插件支持。同時,大幅提高了自定義的靈活度,旨在讓您能夠更加便捷、順暢地運用本主題,打造出獨具匠心的個人博客。
<p align="center">
<a href="https://www.npmjs.com/package/hexo-theme-redefine">
<img src="https://img.shields.io/npm/v/hexo-theme-redefine?color=F38181&amp;label=version&amp;logo=npm&amp;logoColor=F38181&amp;style=for-the-badge" referrerpolicy="no-referrer" alt="NPM version" />
</a>
<a href="https://www.npmjs.com/package/hexo-theme-redefine">
<img src="https://img.shields.io/npm/dm/hexo-theme-redefine?color=FCE38A&amp;logo=npm&amp;logoColor=FCE38A&amp;style=for-the-badge" referrerpolicy="no-referrer" alt="npm downloads" />
</a>
<a href="https://www.npmjs.com/package/hexo-theme-redefine">
<img src="https://img.shields.io/npm/dt/hexo-theme-redefine?color=95E1D3&amp;label=total&amp;logo=npm&amp;logoColor=95E1D3&amp;style=for-the-badge" referrerpolicy="no-referrer" alt="npm-total" />
</a>
<a href="https://hexo.io"><img src="https://img.shields.io/badge/hexo-%3E=5.0.0-8caaee?style=for-the-badge&amp;logo=hexo&amp;logoColor=8caaee" referrerpolicy="no-referrer" alt="Required Hexo version" /></a>
<img src="https://img.shields.io/badge/node-%3E=12.0-a6d189?style=for-the-badge&amp;logo=node.js&amp;logoColor=a6d189" referrerpolicy="no-referrer" alt="NodeJS Version" />
</p>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/337c1801-7a59-45af-a02a-583508be69a5" />
<source media="(prefers-color-scheme: light)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/d88a5544-c86e-46ab-8e52-0582b437f989" />
<img alt="Cover Image" src="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/d88a5544-c86e-46ab-8e52-0582b437f989" />
</picture>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/5d51b48d-7b08-4da0-a304-933424739203" />
<source media="(prefers-color-scheme: light)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/c6df4b81-557d-4e0b-8038-b056075d0fa4" />
<img alt="Pages Image" src="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/c6df4b81-557d-4e0b-8038-b056075d0fa4" />
</picture>
## 🌐 在線演示站
- [EvanNotFound's Blog](https://ohevan.com)
- [Theme Redefine 演示站点](https://redefine.ohevan.com)
- [Redefine 用戶牆](https://redefine.ohevan.com/showcase)
如果你也在使用 Redefine歡迎在前往 [Redefine 用戶牆](https://redefine.ohevan.com/showcase) 添加你的博客鏈接。
## ⛰️ 部分功能
- [筆記模塊](https://redefine-docs.ohevan.com/modules/notes)
- [友鏈樣式](https://redefine-docs.ohevan.com/page_templates/friends)
- [數學公式](https://redefine-docs.ohevan.com/plugins/mathjax)
- 代碼塊語言顯示
- Light/Dark 模式切換
- [Font Awesome 6.2.1 Pro](https://redefine-docs.ohevan.com/basic/fontawesome)(包含 Duotone/Regular/Thin 等不同樣式)
- [下拉菜單](https://redefine-docs.ohevan.com/dhome/navbar#%E9%93%BE%E6%8E%A5%E5%88%97%E8%A1%A8)
- [可自定義頁腳](https://redefine-docs.ohevan.com/footer)
- [網站運行時間顯示](https://redefine-docs.ohevan.com/footer#%E8%BF%90%E8%A1%8C%E6%97%B6%E9%97%B4)
- [文章頭圖](https://redefine-docs.ohevan.com/article_customize/banner)
- [Mermaid JS 支持](https://redefine-docs.ohevan.com/plugins/mermaid)
- SEO 友好
- [Aplayer 音樂播放器支持](https://redefine-docs.ohevan.com/plugins/aplayer)
- [說說模塊](https://redefine-docs.ohevan.com/shuoshuo)
- [自定義字體](https://redefine-docs.ohevan.com/basic/global#%E8%87%AA%E5%AE%9A%E4%B9%89%E5%AD%97%E4%BD%93)
- Tailwind CSS 支持
## ☁️ 安裝
如果你的 Hexo 版本在 `5.0` 及以上,推薦通過 `npm` 安裝
```sh
$ cd your-hexo-site
$ npm install hexo-theme-redefine@latest
```
或者使用 git 克隆
```sh
$ cd your-hexo-site
$ git clone https://github.com/EvanNotFound/hexo-theme-redefine.git themes/redefine
```
安裝完成後,在 Hexo 配置文件 `_config.yml` 中將 `theme` 設置為 `Redefine`
```yaml
theme: redefine
```
## ⏫ 更新
Theme Redefine 經常發布新版本,你可以透過如下命令更新 Theme Redefine。
通過 `npm` 安裝最新版本:
```sh
$ npm install hexo-theme-redefine@latest
```
通過 `git` 更新到最新的 `main` 分支:
```sh
$ cd themes/redefine
$ git pull
```
## 📄 文檔
請閱讀 [Redefine 主題官方文檔](https://redefine-docs.ohevan.com/) 進行主題配置與安裝,非常簡單易懂。
## ☕ 支持
歡迎 **pull request** 或者 提交 **issues**.
如有問題,請發郵件到 [contact@ohevan.com](mailto:contact@ohevan.com). 我會及時回复
如果你覺得主題還不錯的話,歡迎給我 Github 點個 Star謝謝
如果你在使用 [Typora](https://typora.io/) 編輯器寫文章,歡迎查看我寫的 [Typora Redefine 主題](https://github.com/EvanNotFound/typora-theme-redefine),按照本 Hexo 主題樣式編寫,讓你可以直接預覽文章效果,更好排版。
## 💗 贊助
非常感謝所有贊助者的支持,你們的支持是我維護這個項目的動力。
如果你覺得這個項目還不錯,歡迎給我買杯咖啡,給 CDN 續命續久一點,感謝
所有贊助者名單:[贊助者名單](https://github.com/EvanNotFound/hexo-theme-redefine/blob/dev/DONATION.md)
🎉 **想体验 OpenAI 的 ChatGPT Plus 会员?官网 20 美元每月太贵了?不用担心!**
🚀 立即加入我的 [GPT Plus Share](https://gpt.oknice.ca) GPT Plus 共享站ChatGPT Plus 随心用。
- ✅ 支持 OpenAI 最新所有模型,包括 `GPT-4o`, `o3` 系列模型,支持高级图片生成
- ✅ 后台大量官方正版账号号池,随心使用
- ✅ 每月仅需低至 23.99 人民币,支持一天免费试用
- ✅ 无需梯子,国内免翻访问!
- ✅ 由 Evan 本人运营,售后保证,已稳定运行超过一年
[![gpt-billboard](https://github.com/user-attachments/assets/f049fb37-0587-4af9-b59d-b1910d310549)](https://www.gptplus.ca/home)
## 🌟 Star 記錄
<a href="https://star-history.com/#EvanNotFound/hexo-theme-redefine&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=EvanNotFound/hexo-theme-redefine&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=EvanNotFound/hexo-theme-redefine&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=EvanNotFound/hexo-theme-redefine&type=Date" />
</picture>
</a>
## 💻 主题开发
如果你想參與主題開發,請 `clone` 本專案的 `dev` 分支,然後在 `dev` 分支上進行開發。
同時,請查看 [Redefine 主題開發文件](https://redefine-docs.ohevan.com/developer)。

488
node_modules/hexo-theme-redefine/_config.yml generated vendored Executable file
View File

@@ -0,0 +1,488 @@
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start
# THEME REDEFINE CONFIGURATION FILE V2
# BY EVANNOTFOUND
# GITHUB: https://github.com/EvanNotFound/hexo-theme-redefine
# DOCUMENTATION: https://redefine-docs.ohevan.com
# DEMO: https://redefine.ohevan.com
# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end
# BASIC INFORMATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start
# Docs: https://redefine-docs.ohevan.com/basic/info
info:
# Site title
title: Theme Redefine
# Site subtitle
subtitle: Redefine Your Hexo Journey.
# Author name
author: The Redefine Team
# Site URL
url: https://redefine.ohevan.com
# BASIC INFORMATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end
# IMAGE CONFIGURATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start
# Docs: https://redefine-docs.ohevan.com/basic/defaults
defaults:
# Favicon
favicon: /images/redefine-favicon.svg
# Site logo
logo:
# Site avatar
avatar: /images/redefine-avatar.svg
# IMAGE CONFIGURATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end
# COLORS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start
# Docs: https://redefine-docs.ohevan.com/basic/colors
colors:
#Primary color
primary: "#A31F34"
# Secondary color (TBD)
secondary:
# Default theme mode initial value (will be overwritten by prefer-color-scheme)
default_mode: light # light, dark
# COLORS <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end
# SITE CUSTOMIZATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start
# Docs: https://redefine-docs.ohevan.com/basic/global
global:
# Custom global fonts
fonts:
# Chinese fonts
chinese:
enable: false # Whether to enable custom chinese fonts
family: # Font family
url: # Font URL to CSS file
# English fonts
english:
enable: false # Whether to enable custom english fonts
family: # Font family
url: # Font URL to CSS file
# Custom title fonts (navbar, sidebar)
title:
enable: false # Whether to enable custom title fonts
family: # Font family
url: # Font URL to CSS file
# Content max width
content_max_width: 1000px
# Sidebar width
sidebar_width: 210px
# Effects on mouse hover
hover:
shadow: true # shadow effect
scale: false # scale effect
# Scroll progress
scroll_progress:
bar: false # progress bar
percentage: true # percentage
# Website counter
website_counter:
url: https://cn.vercount.one/js # counter API URL (no need to change)
enable: true # enable website counter or not
site_pv: true # site page view
site_uv: true # site unique visitor
post_pv: true # post page view
# Whether to enable single page experience (using swup). See https://swup.js.org/. similar to pjax
single_page: true
# Whether to enable Preloader.
preloader:
enable: false
custom_message: # Custom message. If empty, the site title will be displayed
# Side tools settings
side_tools:
# Whether to enable gear rotation animation for settings button
gear_rotation: true
# Whether to auto expand tools list on page load
auto_expand: false
# Whether to enable open graph
open_graph:
enable: true
image: /images/redefine-og.webp # default og:image
description: Hexo Theme Redefine, Redefine Your Hexo Journey.
# Google Analytics
google_analytics:
enable: false # Whether to enable Google Analytics
id: # Google Analytics Measurement ID
# SITE CUSTOMIZATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end
# FONTAWESOME >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start
# Docs: https://redefine-docs.ohevan.com/basic/fontawesome
fontawesome: # Pro v6.2.1
# Thin version
thin: false
# Light version
light: false
# Duotone version
duotone: false
# Sharp Solid version
sharp_solid: false
# FONTAWESOME <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end
# HOME BANNER >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start
# Docs: https://redefine-docs.ohevan.com/home/home_banner
home_banner:
# Whether to enable home banner
enable: true
# style of home banner
style: fixed # static or fixed
# Home banner image
image:
light: /images/wallhaven-wqery6-light.webp # light mode
dark: /images/wallhaven-wqery6-dark.webp # dark mode
# Home banner title
title: Theme Redefine
# Home banner subtitle
subtitle:
text: [] # subtitle text, array
hitokoto: # 一言配置
enable: false # Whether to enable hitokoto
show_author: false # Whether to show author
api: https://v1.hitokoto.cn # API URL, can add types, see https://developer.hitokoto.cn/sentence/#%E5%8F%A5%E5%AD%90%E7%B1%BB%E5%9E%8B-%E5%8F%82%E6%95%B0
typing_speed: 100 # Typing speed (ms)
backing_speed: 80 # Backing speed (ms)
starting_delay: 500 # Start delay (ms)
backing_delay: 1500 # Backing delay (ms)
loop: true # Whether to loop
smart_backspace: true # Whether to smart backspace
# Color of home banner text
text_color:
light: "#fff" # light mode
dark: "#d1d1b6" # dark mode
# Specific style of the text
text_style:
# Title font size
title_size: 2.8rem
# Subtitle font size
subtitle_size: 1.5rem
# Line height between title and subtitle
line_height: 1.2
# Home banner custom font
custom_font:
# Whether to enable custom font
enable: false
# Font family
family:
# URL to font CSS file
url:
# Home banner social links
social_links:
# Whether to enable
enable: false
# Social links style
style: default # default, reverse, center
# Social links
links:
github: # your GitHub URL
instagram: # your Instagram URL
zhihu: # your ZhiHu URL
twitter: # your twitter URL
email: # your email
# ...... # you can add more
# Social links with QRcode drawers
qrs:
weixin: # your Wechat QRcode image URL
# ...... # you can add more
# HOME BANNER <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end
# NAVIGATION BAR >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start
# Docs: https://redefine-docs.ohevan.com/home/navbar
navbar:
# Auto hide navbar
auto_hide: false
# Navbar background color
color:
left: "#f78736" #left side
right: "#367df7" #right side
transparency: 35 #percent (10-99)
# Navbar width (usually no need to modify)
width:
home: 1200px #home page
pages: 1000px #other pages
# Navbar links
links:
Home:
path: /
icon: fa-regular fa-house # can be empty
# Archives:
# path: /archives
# icon: fa-regular fa-archive # can be empty
# Status:
# path: https://status.ohevan.com/
# icon: fa-regular fa-chart-bar
# About:
# icon: fa-regular fa-user
# submenus:
# Me: /about
# Github: https://github.com/EvanNotFound/hexo-theme-redefine
# Blog: https://ohevan.com
# Friends: /friends
# Links:
# icon: fa-regular fa-link
# submenus:
# Link1: /link1
# Link2: /link2
# Link3: /link3
# ...... # you can add more
# Navbar search (local search). Requires hexo-generator-searchdb (npm i hexo-generator-searchdb). See https://github.com/theme-next/hexo-generator-searchdb
search:
# Whether to enable
enable: false
# Preload search data when the page loads
preload: true
# NAVIGATION BAR <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end
# HOME PAGE ARTICLE SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start
# Docs: https://redefine-docs.ohevan.com/home/home
home:
# Sidebar settings
sidebar:
enable: true # Whether to enable sidebar
position: left # Sidebar position. left, right
first_item: menu # First item in sidebar. menu, info
announcement: # Announcement text
show_on_mobile: true # Whether to show sidebar navigation on mobile sheet menu
links:
# Archives:
# path: /archives
# icon: fa-regular fa-archive # can be empty
# Tags:
# path: /tags
# icon: fa-regular fa-tags # can be empty
# Categories:
# path: /categories
# icon: fa-regular fa-folder # can be empty
# ...... # you can add more
# Article date format
article_date_format: auto # auto, relative, YYYY-MM-DD, YYYY-MM-DD HH:mm:ss etc.
# Article excerpt length
excerpt_length: 200 # Max length of article excerpt
# Article categories visibility
categories:
enable: true # Whether to enable
limit: 3 # Max number of categories to display
# Article tags visibility
tags:
enable: true # Whether to enable
limit: 3 # Max number of tags to display
# HOME PAGE ARTICLE SETTINGS <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end
# ARTICLE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start
# Docs: https://redefine-docs.ohevan.com/posts/articles
articles:
# Set the styles of the article
style:
font_size: 16px # Font size
line_height: 1.5 # Line height
image_border_radius: 14px # image border radius
image_alignment: center # image alignment. left, center
image_caption: false # Whether to display image caption
link_icon: true # Whether to display link icon
delete_mask: false # Add mask effect to <del> tags, hiding content by default and revealing on hover
title_alignment: left # Title alignment. left, center
headings_top_spacing: # Top spacing for headings from h1-h6
h1: 3.2rem
h2: 2.4rem
h3: 1.9rem
h4: 1.6rem
h5: 1.4rem
h6: 1.3rem
# Word count. Requires hexo-wordcount (npm install hexo-wordcount). See https://github.com/willin/hexo-wordcount
word_count:
enable: true # Whether to enable
count: true # Whether to display word count
min2read: true # Whether to display reading time
# Author label
author_label:
enable: true # Whether to enable
auto: false # Whether to automatically add author label, e.g. Lv1, Lv2, Lv3...
list: []
# Code block settings
code_block:
copy: true # Whether to enable code block copy button
style: mac # mac | simple
highlight_theme: # Color scheme for highlightjs code highlighting. For preview, see https://highlightjs.org/examples
light: github # light mode theme, support: github, atom-one-light, default
dark: vs2015 # dark mode theme, support: github-dark, monokai-sublime, vs2015, night-owl, atom-one-dark, nord, tokyo-night-dark, a11y-dark, agate
font: # Custom font
enable: false # Whether to enable
family: # Font family
url: # Font URL to CSS file
# Table of contents settings
toc:
enable: true # Whether to enable TOC
max_depth: 3 # TOC depth
number: false # Whether to add number to TOC automatically
expand: true # Whether to expand TOC
init_open: true # Open toc by default
# Whether to enable copyright notice
copyright:
enable: true # Whether to enable
default: cc_by_nc_sa # Default license, can be cc_by_nc_sa, cc_by_nd, cc_by_nc, cc_by_sa, cc_by, all_rights_reserved, public_domain
# Whether to enable lazyload for images
lazyload: true
# Pangu.js (automatically add space between Chinese and English). See https://github.com/vinta/pangu.js
pangu_js: false
# Article recommendation. Requires nodejieba (npm install nodejieba). Transplanted from hexo-theme-volantis.
recommendation:
# Whether to enable article recommendation
enable: false
# Article recommendation title
title: 推荐阅读
# Max number of articles to display
limit: 3
# Max number of articles to display mobile
mobile_limit: 2
# Placeholder image
placeholder: /images/wallhaven-wqery6-light.webp
# Skip directory
skip_dirs: []
# ARTICLE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end
# COMMENT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start
# Docs: https://redefine-docs.ohevan.com/posts/comment
comment:
# Whether to enable comment
enable: true
# Comment system
system: waline # waline, gitalk, twikoo, giscus
# System configuration
config:
# Waline comment system. See https://waline.js.org/
waline:
serverUrl: https://example.example.com # Waline server URL. e.g. https://example.example.com
lang: zh-CN # Waline language. e.g. zh-CN, en-US. See https://waline.js.org/guide/client/i18n.html
emoji: [] # Waline emojis, see https://waline.js.org/guide/features/emoji.html
recaptchaV3Key: # Google reCAPTCHA v3 key. See https://waline.js.org/reference/client/props.html#recaptchav3key
turnstileKey: # Turnstile key. See https://waline.js.org/reference/client/props.html#turnstilekey
reaction: false # Waline reaction. See https://waline.js.org/reference/client/props.html#reaction
# Gitalk comment system. See https://github.com/gitalk/gitalk
gitalk:
clientID: # GitHub Application Client ID
clientSecret: # GitHub Application Client Secret
repo: # GitHub repository
owner: # GitHub repository owner
proxy: # GitHub repository proxy
# Twikoo comment system. See https://twikoo.js.org/
twikoo:
version: 1.6.10 # Twikoo version, do not modify if you dont know what it is
server_url: # Twikoo server URL. e.g. https://example.example.com
region: # Twikoo region. can be empty
# Giscus comment system. See https://giscus.app/
giscus:
repo: # Github repository name e.g. EvanNotFound/hexo-theme-redefine
repo_id: # Github repository id
category: # Github discussion category
category_id: # Github discussion category id
mapping: pathname # Which value to use as the unique identifier for the page. e.g. pathname, url, title, og:title. DO NOT USE og:title WITH PJAX ENABLED since pjax will not update og:title when the page changes
strict: 0 # Whether to enable strict mode. e.g. 0, 1
reactions_enabled: 1 # Whether to enable reactions. e.g. 0, 1
emit_metadata: 0 # Whether to emit metadata. e.g. 0, 1
lang: en # Giscus language. e.g. en, zh-CN, zh-TW
input_position: bottom # Place the comment box above/below the comments. e.g. top, bottom
loading: lazy # Load the comments lazily
# COMMENT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end
# FOOTER >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start
# Docs: https://redefine-docs.ohevan.com/footer
footer:
# Show website running time
runtime: true # show website running time or not
# Icon in footer, write fontawesome icon code here
icon: '<i class="fa-solid fa-heart fa-beat" style="--fa-animation-duration: 0.5s; color: #f54545"></i>'
# The start time of the website, format: YYYY/MM/DD HH:mm:ss
start: 2022/8/17 11:45:14
# Site statistics
statistics: true # show site statistics or not (total articles, total words)
# Footer message
customize:
# ICP record number. See https://beian.miit.gov.cn/
icp:
enable: false # Whether to enable
number: # ICP record number
url: # ICP record url
# FOOTER <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end
# INJECT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start
# Docs: https://redefine-docs.ohevan.com/inject
inject:
# Whether to enable inject
enable: false
# Inject custom head html code
head:
-
-
# Inject custom footer html code
footer:
-
-
# INJECT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end
# PLUGINS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start
# Docs: https://redefine-docs.ohevan.com/plugins
plugins:
# RSS feed. Requires hexo-generator-feed (npm i hexo-generator-feed). See https://github.com/hexojs/hexo-generator-feed
feed:
enable: false # Whether to enable
# Aplayer. See https://github.com/DIYgod/APlayer
aplayer:
enable: false # Whether to enable
type: fixed # fixed, mini
audios:
- name: # audio name
artist: # audio artist
url: # audio url
cover: # audio cover url
lrc: # audio cover lrc
# - name: # audio name
# artist: # audio artist
# url: # audio url
# cover: # audio cover url
# lrc: # audio cover lrc
# .... you can add more audios here
# Mermaid JS. Requires hexo-filter-mermaid-diagrams (npm i hexo-filter-mermaid-diagrams). See https://mermaid.js.org/
mermaid:
enable: false # enable mermaid or not
version: "11.4.1" # default v11.4.1
# PLUGINS <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end
# PAGE TEMPLATES >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start
# Docs: https://redefine-docs.ohevan.com/page_templates
page_templates:
# Friend Links page column number
friends_column: 2
# Tags page style
tags_style: blur # blur, cloud
# PAGE TEMPLATES <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end
# CDN >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start
# Docs: https://redefine-docs.ohevan.com/cdn
cdn:
# Whether to enable CDN
enable: false
# CDN Provider
provider: npmmirror # npmmirror, zstatic, cdnjs, jsdelivr, unpkg, custom
# Custom CDN URL
# format example: https://cdn.custom.com/hexo-theme-redefine/${version}/source/${path}
# The ${path} must leads to the root of the "source" folder of the theme
custom_url:
# CDN <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end
# DEVELOPER MODE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start
# Docs: https://redefine-docs.ohevan.com/developer
developer:
# Whether to enable developer mode (only for developers who want to modify the theme source code, not for ordinary users)
enable: false
# DEVELOPER MODE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end

93
node_modules/hexo-theme-redefine/languages/en.yml generated vendored Executable file
View File

@@ -0,0 +1,93 @@
# ----------------------------------------
# Site Translation
# ----------------------------------------
search: Search...
toc: On this page
prev: Prev
next: Next
prev_posts: Prev posts
next_posts: Next posts
page: Page %d
recent_posts: Recent Posts
share: Share
powered_by: "POWERED BY %s"
theme: THEME
rss_feed: RSS Feed
category: Category
categories: Categories
tag: Tag
tags: Tags
post: Post
posts: Posts
tagcloud: Tag Cloud
comment: Comment
comments: Comments
home: Home
archive: Archive
archives: Archives
top: TOP
sticky: Sticky
go-back-home: Go Back Home
# ----------------------------------------
# Menu Translation
# ----------------------------------------
about: About
changelog: Changelog
links: Links
link: Link
friends: Friends
friend: Friend
timeline: Timeline
shuoshuo: Shuoshuo
# ----------------------------------------
# Website count
# ----------------------------------------
site_uv: VISITOR COUNT
site_pv: TOTAL PAGE VIEWS
read_more: Read more
wordcount: Words
min2read: Mins
status: Status
# ----------------------------------------
# Footer
# ----------------------------------------
runtime: Blog up for
days: days
hours: hrs
minutes: Min
seconds: Sec
optimized_by: and Optimized by Evan
rights: All Rights Reserved
site_posts: "%s posts in total"
site_wordcount: "%s words in total"
# ----------------------------------------
# Post
# ----------------------------------------
copyright:
author: Author
title: Title
link: Link
create_time: Created at
update_time: Updated at
license_title: License
license_content: "This work is licensed under %s."
all_rights_reserved: "All Rights Reserved &#169; %s"
public_domain: "This work is in the public domain."
ago:
second: "%s seconds ago"
minute: "%s minutes ago"
hour: "%s hours ago"
day: "%s days ago"
week: "%s weeks ago"
month: "%s months ago"
year: "%s years ago"
create_time: Created
update_time: Updated
expired: "This post is written %s days ago, and the content may not be up to date."

92
node_modules/hexo-theme-redefine/languages/es.yml generated vendored Normal file
View File

@@ -0,0 +1,92 @@
# ----------------------------------------
# Traducción del sitio
# ----------------------------------------
search: Buscar...
toc: En esta página
prev: Anterior
next: Siguiente
prev_posts: Publicaciones anteriores
next_posts: Publicaciones siguientes
page: Página %d
recent_posts: Publicaciones recientes
share: Compartir
powered_by: "DESARROLLADO POR %s"
theme: TEMA
rss_feed: RSS Feed
category: Categoría
categories: Categorías
tag: Etiqueta
tags: Etiquetas
post: Publicación
posts: Publicaciones
tagcloud: Nube de etiquetas
comment: Comentario
comments: Comentarios
home: Inicio
archive: Archivo
archives: Archivos
top: PRINCIPAL
sticky: Fijado
go-back-home: Volver al inicio
# ----------------------------------------
# Traducción del menú
# ----------------------------------------
about: Acerca de
changelog: Registro de cambios
links: Enlaces
link: Enlace
friends: Amigos
friend: Amigo
timeline: Cronología
shuoshuo: Shuoshuo
# ----------------------------------------
# Contador del sitio
# ----------------------------------------
site_uv: CONTADOR DE VISITANTES
site_pv: TOTAL DE VISITAS
read_more: Leer más
wordcount: Palabras
min2read: Minutos
status: Estado
# ----------------------------------------
# Pie de página
# ----------------------------------------
runtime: Blog en línea por
days: días
hours: horas
minutes: Min
seconds: Seg
optimized_by: y optimizado por Evan
rights: Todos los derechos reservados
site_posts: "%s publicaciones en total"
site_wordcount: "%s palabras en total"
# ----------------------------------------
# Publicación
# ----------------------------------------
copyright:
author: Autor
title: Título
link: Enlace
create_time: Creado el
update_time: Actualizado el
license_title: Licencia
license_content: "Este trabajo está licenciado bajo %s."
all_rights_reserved: "Todos los derechos reservados &#169; %s"
public_domain: "Este trabajo es de dominio público."
ago:
second: "hace %s segundos"
minute: "hace %s minutos"
hour: "hace %s horas"
day: "hace %s días"
week: "hace %s semanas"
month: "hace %s meses"
year: "hace %s años"
create_time: Creado
update_time: Actualizado
expired: "Esta publicación fue escrita hace %s días, el contenido puede no estar actualizado."

92
node_modules/hexo-theme-redefine/languages/fr.yml generated vendored Normal file
View File

@@ -0,0 +1,92 @@
# ----------------------------------------
# Traduction du site
# ----------------------------------------
search: recherche...
toc: Sur cette page
prev: Précédent
next: Suivant
prev_posts: Articles précédents
next_posts: Articles suivants
page: Page %d
recent_posts: Articles récents
share: Partager
powered_by: "POWERED BY %s"
theme: THEME
rss_feed: Flux RSS
category: Catégorie
categories: Catégories
tag: Tag
tags: Tags
post: Post
posts: Posts
tagcloud: Nuage de tags
comment: Commentaire
comments: Commentaires
home: Accueil
archive: Archive
archives: Archives
top: TOP
sticky: Sticky
go-back-home: Retour à l'accueil
# ----------------------------------------
# Traduction du menu
# ----------------------------------------
about: À propos
changelog: Journal des modifications
links: Liens
link: Lien
friends: Amis
friend: Ami
timeline: Chronologie
shuoshuo: Shuoshuo
# ----------------------------------------
# Nombre de sites Web
# ----------------------------------------
site_uv: VISITEURS
site_pv: NOMBRE TOTAL DE PAGES VUES
read_more: Lire la suite
wordcount: Mots
min2read: Min
status: Status
# ----------------------------------------
# Pied de page
# ----------------------------------------
runtime: Blog en ligne depuis
days: Jours
hours: Hrs
minutes: Min
seconds: Sec
optimized_by: et Propulsé par Evan
rights: Tous droits réservés
site_posts: "%s posts au total"
site_wordcount: "%s mots au total"
# ----------------------------------------
# Post
# ----------------------------------------
copyright:
author: Auteur
title: Titre
link: Lien
create_time: Créé à
update_time: Mis à jour à
license_title: Licence
license_content: "Cette œuvre est sous licence %s."
all_rights_reserved: "Tous droits réservés à &#169; %s"
public_domain: "Cette œuvre est dans le domaine public."
ago:
second: "Il y a %s secondes"
minute: "Il y a %s minutes"
hour: "Il y a %s heures"
day: "Il y a %s jours"
week: "Il y a %s semaines"
month: "Il y a %s mois"
year: "Il y a %s années"
create_time: Créé
update_time: Mis à jour
expired: "Ce message a été écrit il y a %s jours et son contenu peut être obsolète."

92
node_modules/hexo-theme-redefine/languages/ja.yml generated vendored Normal file
View File

@@ -0,0 +1,92 @@
# ----------------------------------------
# 网站翻译
# ----------------------------------------
search: 検索...
toc: 目次
prev: 前のページ
next: 次のページ
prev_posts: 前一篇
next_posts: 次一篇
page: "%d ページ"
recent_posts: 最新記事
share: 分かち合う
powered_by: "%s で駆動する"
theme: テーマ
rss_feed: RSS Feed
category: 分類
categories: 分類
tag: タグ
tags: タグ
post: 記事
posts: 記事
tagcloud: タグクラウド
comment: コメント
comments: コメント
top: トップ
sticky: 屋根
go-back-home: トップページに戻ります
# ----------------------------------------
# 菜单翻译
# ----------------------------------------
home: トップページ
archive: ファイル
archives: ファイル
about: について
links: リンク
friends: フレンドシップリンク
friend: フレンドシップリンク
タイムライン: 時間軸
shuoshuo: 話す
# ----------------------------------------
# 网站统计
# ----------------------------------------
site_uv: 訪問者数
site_pv: 総アクセス数
read-more: 全文を読む
wordcount:
min2read:
changelog: ログを更新
status: 状態
# ----------------------------------------
# 页脚
# ----------------------------------------
runtime: ブログが稼働する
days:
hours: 時間
ミニッツ:
seconds:
optimized_by: そしてEvanによって最適化される
rights: 著作権所有
site_posts: "共 %s 記事"
site_wordcount: "共 %s 字"
# ----------------------------------------
# 版权声明
# ----------------------------------------
copyright:
title: タイトル
author: 作者
link: リンク
create_time: で作成されました
update_time: で更新されました
license_title: 著作権宣言
license_content: "この文章は %s を使用して許可します。"
all_rights_reserved: "著作権所有 &#169 %s、転載禁止です。"
public-domain: "この記事はパブリックドメインの著作物であて、転載、引用は自由。"
ago:
second: "%s 秒前"
minute: "%s 分前"
hour: "%s 時間前"
day: "%s 日前"
week: "%s 週間前"
month: "%s 月前"
year: "%s 年前"
create_time: 作成
update_time: 更新
expired: "この記事は %s 日前に最後に更新される"

95
node_modules/hexo-theme-redefine/languages/zh-CN.yml generated vendored Executable file
View File

@@ -0,0 +1,95 @@
# ----------------------------------------
# 网站翻译
# ----------------------------------------
search: 站内搜索您需要的内容...
toc: 目录
prev: 上一页
next: 下一页
prev_posts: 上一篇
next_posts: 下一篇
page: 第 %d 页
recent_posts: 最新文章
share: 分享
powered_by: "由 %s 驱动"
theme: 主题
rss_feed: RSS Feed
category: 分类
categories: 分类
tag: 标签
tags: 标签
post: 文章
posts: 文章
tagcloud: 标签云
comment: 评论
comments: 评论
top: 置顶
sticky: 置顶
go-back-home: 回到首页
# ----------------------------------------
# 菜单翻译
# ----------------------------------------
home: 首页
archive: 归档
archives: 归档
about: 关于
links: 链接
link: 链接
friends: 友情链接
friend: 友情链接
timeline: 时间轴
shuoshuo: 说说
# ----------------------------------------
# 网站统计
# ----------------------------------------
site_uv: 访问人数
site_pv: 总访问量
read_more: 阅读全文
wordcount:
min2read: 分钟
changelog: 更新日志
status: 状态
# ----------------------------------------
# 页脚
# ----------------------------------------
runtime: 博客已运行
days:
hours: 小时
minutes: 分钟
seconds:
optimized_by: 并由 Evan 进行优化
rights: 版权所有
site_posts: "共撰写了 %s 篇文章"
site_wordcount: "共 %s 字"
# ----------------------------------------
# 版权声明
# ----------------------------------------
copyright:
title: 标题
author: 作者
link: 链接
create_time: 创建于
update_time: 更新于
license_title: 版权声明
license_content: "本文章采用 %s 进行许可。"
all_rights_reserved: "版权所有 &#169 %s禁止转载。"
public_domain: "本文为公有领域作品,可自由转载、引用。"
ago:
second: "%s 秒前"
minute: "%s 分钟前"
hour: "%s 小时前"
day: "%s 天前"
week: "%s 周前"
month: "%s 个月前"
year: "%s 年前"
create_time: 创建
update_time: 更新
expired: "这篇文章最后更新于 %s 天前,内容可能已经过时。"

94
node_modules/hexo-theme-redefine/languages/zh-TW.yml generated vendored Executable file
View File

@@ -0,0 +1,94 @@
# ----------------------------------------
# 網站翻譯
# ----------------------------------------
search: 站內搜尋您想要的內容...
toc: 目錄
prev: 上一頁
next: 下一頁
prev_posts: 上一篇
next_posts: 下一篇
page: 第 %d 頁
recent_posts: 之前的文章
share: 分享
powered_by: "%s 框架"
theme: 主題
rss_feed: RSS 訂閱
category: 分類
categories: 分類
tag: 標籤
tags: 標籤
post: 文章
posts: 文章
tagcloud: 標籤雲
comment: 留言
comments: 留言
top: 頂端
sticky: 置頂
go-back-home: 回到首頁
# ----------------------------------------
# 選單翻譯
# ----------------------------------------
home: 首頁
archive: 歸檔
archives: 歸檔
about: 關於
links: 連結
link: 連結
friends: 友情連結
friend: 友情連結
timeline: 時間軸
shuoshuo: 說說
changelog: 日誌
status: 狀態
# ----------------------------------------
# 網站統計
# ----------------------------------------
site_uv: 讀者
site_pv: 閱覽
read_more: 繼續閱讀...
wordcount: 字數
min2read: 分鐘
# ----------------------------------------
# 頁尾
# ----------------------------------------
runtime: 部落格已運行
days:
hours: 小時
minutes: 分鐘
seconds:
optimized_by: 並由 Evan 進行最佳化
rights: 版權所有
site_posts: "共 %s 篇文章"
site_wordcount: "共 %s 字"
# ----------------------------------------
# 版權聲明
# ----------------------------------------
copyright:
author: 作者
title: 標題
link: 連結
create_time: 撰寫於
update_time: 更新於
license_title: 版權宣告
license_content: "本作品採用 %s 進行許可。"
all_rights_reserved: "保留所有權利 &#169 %s"
public_domain: "本作品已在公共領域中,可自由轉載、修改、散佈,無需經過作者同意。"
ago:
second: "%s 秒前"
minute: "%s 分鐘前"
hour: "%s 小時前"
day: "%s 天前"
week: "%s 周前"
month: "%s 個月前"
year: "%s 年前"
create_time: 撰寫
update_time: 更新
expired: "這篇文章最後更新於 %s 天前,內容可能已經過時。"

1
node_modules/hexo-theme-redefine/layout/404.ejs generated vendored Normal file
View File

@@ -0,0 +1 @@
<%- partial('page') %>

1
node_modules/hexo-theme-redefine/layout/archive.ejs generated vendored Executable file
View File

@@ -0,0 +1 @@
<%- partial('page') %>

1
node_modules/hexo-theme-redefine/layout/category.ejs generated vendored Executable file
View File

@@ -0,0 +1 @@
<%- partial('page') %>

View File

@@ -0,0 +1,22 @@
<div class="comments-container mt-10 w-full ">
<div id="comment-anchor" class="w-full h-2.5"></div>
<div class="comment-area-title w-full my-1.5 md:my-2.5 text-xl md:text-3xl font-bold">
<%- __('comments') %>
</div>
<% if (theme.comment.enable === true && theme.comment.hasOwnProperty('system')) { %>
<% if (theme.comment.system === 'waline') { %>
<%- partial('components/comments/waline') %>
<% } else if (theme.comment.system === 'gitalk') { %>
<%- partial('components/comments/gitalk') %>
<% } else if (theme.comment.system === 'twikoo') { %>
<%- partial('components/comments/twikoo') %>
<% } else if (theme.comment.system === 'giscus') { %>
<%- partial('components/comments/giscus') %>
<% } %>
<% } %>
</div>

View File

@@ -0,0 +1,42 @@
<% if (
theme.comment.system==='giscus' &&
theme.comment.config.giscus.repo &&
theme.comment.config.giscus.repo_id &&
theme.comment.config.giscus.category_id
) { %>
<div id="giscus-container"></div>
<script <%= theme.global.single_page === true && 'data-swup-reload-script' %> defer>
async function loadGiscus() {
const giscusConfig = {
'src': 'https://giscus.app/client.js',
'data-repo': '<%= theme.comment.config.giscus.repo %>',
'data-repo-id': '<%= theme.comment.config.giscus.repo_id %>',
'data-category': '<%= theme.comment.config.giscus.category %>',
'data-category-id': '<%= theme.comment.config.giscus.category_id %>',
'data-mapping': '<%= theme.comment.config.giscus.mapping || 'pathname' %>',
'data-strict': '<%= theme.comment.config.giscus.strict || '0' %>',
'data-reactions-enabled': '<%= theme.comment.config.giscus.reactions_enabled || '1' %>',
'data-emit-metadata': '<%= theme.comment.config.giscus.emit_metadata || '1' %>',
'data-theme': 'preferred_color_scheme',
'data-lang': '<%= theme.comment.config.giscus.lang || 'en' %>',
'data-input-position': '<%= theme.comment.config.giscus.input_position || 'bottom' %>',
'data-loading': '<%= theme.comment.config.giscus.loading || 'lazy' %>',
'crossorigin': 'anonymous',
'async': true
}
const giscusScript = document.createElement('script');
for (const key in giscusConfig) {
giscusScript.setAttribute(key, giscusConfig[key]);
}
document.getElementById('giscus-container').appendChild(giscusScript);
}
if ('<%= theme.global.single_page %>') {
let loadGiscusTimeout = setTimeout(() => {
loadGiscus();
clearTimeout(loadGiscusTimeout);
}, 1000);
} else {
document.addEventListener('DOMContentLoaded', loadGiscus);
}
</script>
<% } %>

View File

@@ -0,0 +1,47 @@
<% if(
theme.comment.system === 'gitalk'
&& theme.comment.config.gitalk.clientID
&& theme.comment.config.gitalk.clientSecret
&& theme.comment.config.gitalk.owner
&& theme.comment.config.gitalk.repo
) { %>
<div id="gitalk-container"></div>
<script <%= theme.global.single_page === true && 'data-swup-reload-script' %>
src="https://cdnjs.cloudflare.com/ajax/libs/gitalk/1.8.0/gitalk.min.js"></script>
<script <%= theme.global.single_page === true && 'data-swup-reload-script' %>>
function loadGitalk() {
let __gitalk__pathname = decodeURI(location.pathname);
const __gitalk__pathnameLength = __gitalk__pathname.length;
const __gitalk__pathnameMaxLength = 50;
if (__gitalk__pathnameLength > __gitalk__pathnameMaxLength) {
__gitalk__pathname = __gitalk__pathname.substring(0, __gitalk__pathnameMaxLength - 3) + '...';
}
try {
Gitalk && new Gitalk({
clientID: '<%= theme.comment.config.gitalk.clientID %>',
clientSecret: '<%= theme.comment.config.gitalk.clientSecret %>',
repo: '<%= theme.comment.config.gitalk.repo %>',
owner: '<%= theme.comment.config.gitalk.owner %>',
admin: ['<%= theme.comment.config.gitalk.owner %>'],
id: __gitalk__pathname,
language: '<%= config.language %>',
proxy: '<%= theme.comment.config.gitalk.proxy || "https://github.com/login/oauth/access_token" %>'
}).render('gitalk-container');
} catch (e) {
window.Gitalk = null;
}
}
if ('<%= theme.global.single_page %>') {
const loadGitalkTimeout = setTimeout(() => {
loadGitalk();
clearTimeout(loadGitalkTimeout);
}, 1000);
} else {
window.addEventListener('DOMContentLoaded', loadGitalk);
}
</script>
<% } %>

View File

@@ -0,0 +1,50 @@
<% if(theme.comment.system === 'twikoo' && theme.comment.config.twikoo.server_url) { %>
<div class="twikoo-container">
<script <%= theme.global.single_page === true && 'data-swup-reload-script' %>
src='https://cdnjs.cloudflare.com/ajax/libs/twikoo/<%- theme.comment.config.twikoo.version %>/twikoo.all.min.js'
></script>
<div id="twikoo-comment"></div>
<script <%= theme.global.single_page === true && 'data-swup-reload-script' %>>
function loadTwikoo() {
twikoo.init({
el: '#twikoo-comment',
envId: '<%= theme.comment.config.twikoo.server_url %>',
});
}
if ('<%= theme.global.single_page %>') {
const loadTwikooTimeout = setTimeout(() => {
loadTwikoo();
clearTimeout(loadTwikooTimeout);
}, 1000);
} else {
window.addEventListener('DOMContentLoaded', loadTwikoo);
}
</script>
</div>
<% } else if (theme.comment.system === 'twikoo' && theme.comment.config.twikoo.server_url && theme.comment.config.twikoo.region) { %>
<div class="twikoo-container">
<script <%= theme.global.single_page === true && 'data-swup-reload-script' %>
src='<%- theme.comment_version.twikoo %>'
></script>
<div id="twikoo-comment"></div>
<script <%= theme.global.single_page === true && 'data-swup-reload-script' %>>
function loadTwikoo() {
twikoo.init({
el: '#twikoo-comment',
envId: '<%= theme.comment.config.twikoo.server_url %>',
region: '<%= theme.comment.config.twikoo.region %>',
});
}
if ('<%= theme.global.single_page %>') {
const loadTwikooTimeout = setTimeout(() => {
loadTwikoo();
clearTimeout(loadTwikooTimeout);
}, 1000);
} else {
window.addEventListener('DOMContentLoaded', loadTwikoo);
}
</script>
</div>
<% } %>

View File

@@ -0,0 +1,34 @@
<% if(theme.comment.system === 'waline' && theme.comment.config.waline.serverUrl && theme.comment.config.waline.lang) { %>
<div id="waline"></div>
<script type="module" data-swup-reload-script>
import { init } from '<%= url_for('js/libs/waline.mjs') %>';
function loadWaline() {
init({
el: '#waline',
serverURL: '<%= theme.comment.config.waline.serverUrl %>',
dark: 'body[class~="dark-mode"]',
reaction: <%- waline_reaction_config(theme.comment.config.waline.reaction) %>,
requiredMeta: ['nick', 'mail'],
emoji: <%- waline_array_config(theme.comment.config.waline.emoji) %>,
<%- waline_config_options({
lang: theme.comment.config.waline.lang,
locale: theme.comment.config.waline.locale,
login: theme.comment.config.waline.login,
wordLimit: theme.comment.config.waline.wordLimit,
pageSize: theme.comment.config.waline.pageSize,
commentSorting: theme.comment.config.waline.commentSorting,
meta: theme.comment.config.waline.meta,
recaptchaV3Key: theme.comment.config.waline.recaptchaV3Key,
turnstileKey: theme.comment.config.waline.turnstileKey
}) %>
});
}
if (typeof swup !== 'undefined') {
loadWaline();
} else {
window.addEventListener('DOMContentLoaded', loadWaline);
}
</script>
<% } %>

View File

@@ -0,0 +1,99 @@
<footer class="footer mt-5 py-5 h-auto text-base text-third-text-color relative border-t-2 border-t-border-color">
<div class="info-container py-3 text-center">
<% if (theme.footer.hasOwnProperty('customize') && theme.footer.customize) { %>
<div class="customize-info my-1"><%- theme.footer.customize %></div>
<% } %>
<div class="text-center">
&copy;
<% if (theme.footer.hasOwnProperty('start') && theme.footer.start) { %>
<span><%= date(new Date(theme.footer.start), 'YYYY') %></span>
-
<% } %>
<%= date(new Date(), 'YYYY') %>&nbsp;&nbsp;<%- theme.footer.icon || '<i class="fa-regular fa-computer-classic"></i>' %>&nbsp;&nbsp;<a href="<%= config.root %>"><%= theme.info.author || config.author %></a>
<% if (theme.footer.hasOwnProperty('statistics') && theme.footer.statistics) {%>
<%
const sitePostsCount = site.posts.length;
let siteWordCount = null;
try{
siteWordCount = totalcount(site);
} catch (e) {
siteWordCount = null;
}
%>
<p class="post-count space-x-0.5">
<span>
<%- __("site_posts", sitePostsCount) %>
</span>
<% if (siteWordCount) {%>
<span>
<%- __("site_wordcount", siteWordCount) %>
</span>
<% } %>
</p>
<% } %>
</div>
<% if (theme.global.website_counter.enable === true) { %>
<script <%= theme.global.single_page === true && 'data-swup-reload-script' %> src="<%= theme.global.website_counter.url ? theme.global.website_counter.url : "https://vercount.one/js" %>"></script>
<div class="relative text-center lg:absolute lg:right-[20px] lg:top-1/2 lg:-translate-y-1/2 lg:text-right">
<% if (theme.global.website_counter.site_uv) { %>
<span id="busuanzi_container_site_uv" class="lg:!block">
<span class="text-sm"><%- __('site_uv') %></span>
<span id="busuanzi_value_site_uv"></span>
</span>
<% } %>
<% if (theme.global.website_counter.site_pv) { %>
<span id="busuanzi_container_site_pv" class="lg:!block">
<span class="text-sm"><%- __('site_pv') %></span>
<span id="busuanzi_value_site_pv"></span>
</span>
<% } %>
</div>
<% } %>
<div class="relative text-center lg:absolute lg:left-[20px] lg:top-1/2 lg:-translate-y-1/2 lg:text-left">
<span class="lg:block text-sm"><%- __('powered_by', '<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="relative top-[2px] inline-block align-baseline" version="1.1" id="圖層_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1rem" height="1rem" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve"><path fill="#0E83CD" d="M256.4,25.8l-200,115.5L56,371.5l199.6,114.7l200-115.5l0.4-230.2L256.4,25.8z M349,354.6l-18.4,10.7l-18.6-11V275H200v79.6l-18.4,10.7l-18.6-11v-197l18.5-10.6l18.5,10.8V237h112v-79.6l18.5-10.6l18.5,10.8V354.6z"/></svg><a target="_blank" class="text-base" href="https://hexo.io">Hexo</a>') %></span>
<%# 保留主题信息是对作者的尊重,感谢! %><span class="text-sm lg:block"><%- __('theme') %>&nbsp;<a class="text-base" target="_blank" href="https://github.com/EvanNotFound/hexo-theme-redefine">Redefine v<%- getThemeVersion() %></a></span><%# 保留主题信息是对作者的尊重,感谢! %>
</div>
<% if (theme.footer.icp.enable && theme.footer.icp.hasOwnProperty('number')) { %>
<div class="icp-info my-1"><a target="_blank" rel="nofollow" href="
<% if (theme.footer.icp.hasOwnProperty('url') && theme.footer.icp.url) { %>
<%= theme.footer.icp.url %>
<% } else { %>
https://beian.miit.gov.cn
<% } %>
"><%= theme.footer.icp.number %></a></div>
<% } %>
<% if (theme.footer.runtime === true) {%>
<div>
<%= __('runtime') %> <span class="odometer" id="runtime_days" ></span> <%= __('days') %> <span class="odometer" id="runtime_hours"></span> <%= __('hours') %> <span class="odometer" id="runtime_minutes"></span> <%= __('minutes') %> <span class="odometer" id="runtime_seconds"></span> <%= __('seconds') %>
</div>
<% } %>
<% if (theme.footer.runtime === true) {%>
<script <%= theme.global.single_page === true && 'data-swup-reload-script' %>>
try {
function odometer_init() {
const elements = document.querySelectorAll('.odometer');
elements.forEach(el => {
new Odometer({
el,
format: '( ddd).dd',
duration: 200
});
});
}
odometer_init();
} catch (error) {}
</script>
<% } %>
<% if (theme.inject.enable === true) { %>
<% for (let i in theme.inject.footer) { %>
<% if (theme.inject.footer[i] !== null ){ %>
<% if (theme.global.single_page === true) { %>
<%- theme.inject.footer[i].replace("<script", "<script data-swup-reload-script") %>
<% } else { %>
<%- theme.inject.footer[i] %>
<% } } %>
<% } }%>
</div>
</footer>

View File

@@ -0,0 +1,268 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="<%= page.keywords || config.keywords || 'Hexo Theme Redefine' %>">
<% if (!theme.global.open_graph) { %>
<meta name="description" content="<%= page.description || config.description || 'Hexo Theme Redefine' %>">
<% }%>
<meta name="author" content="<%= theme.info.author || config.author || 'Redefine Team' %>">
<!-- Completely eliminate flash of wrong theme -->
<script>
(function() {
const THEME_KEY = "REDEFINE-THEME-STATUS";
const DARK = "dark", LIGHT = "light";
// Get preferred theme
function getTheme() {
try {
const saved = localStorage.getItem(THEME_KEY);
if (saved) {
const { isDark } = JSON.parse(saved);
return isDark ? DARK : LIGHT;
}
} catch (e) {}
return matchMedia("(prefers-color-scheme: dark)").matches ? DARK : LIGHT;
}
// Apply theme to document
function applyTheme(theme) {
const isDark = theme === DARK;
const root = document.documentElement;
// Set data attribute for CSS variables
root.setAttribute("data-theme", theme);
// Set classes for compatibility
root.classList.add(theme);
root.classList.remove(isDark ? LIGHT : DARK);
root.style.colorScheme = theme;
}
// Initial application
const theme = getTheme();
applyTheme(theme);
// Listen for system preference changes
matchMedia("(prefers-color-scheme: dark)").addEventListener("change", ({ matches }) => {
// Only update if using system preference (no localStorage entry)
if (!localStorage.getItem(THEME_KEY)) {
applyTheme(matches ? DARK : LIGHT);
}
});
// Set body classes once DOM is ready
if (document.readyState !== "loading") {
document.body.classList.add(theme + "-mode");
} else {
document.addEventListener("DOMContentLoaded", () => {
document.body.classList.add(theme + "-mode");
document.body.classList.remove((theme === DARK ? LIGHT : DARK) + "-mode");
});
}
})();
</script>
<!-- Critical CSS to prevent flash -->
<style>
:root[data-theme="dark"] {
--background-color: #202124;
--background-color-transparent: rgba(32, 33, 36, 0.6);
--second-background-color: #2d2e32;
--third-background-color: #34353a;
--third-background-color-transparent: rgba(32, 33, 36, 0.6);
--primary-color: #0066CC;
--first-text-color: #ffffff;
--second-text-color: #eeeeee;
--third-text-color: #bebec6;
--fourth-text-color: #999999;
--default-text-color: #bebec6;
--invert-text-color: #373D3F;
--border-color: rgba(255, 255, 255, 0.08);
--selection-color: #0066CC;
--shadow-color-1: rgba(255, 255, 255, 0.08);
--shadow-color-2: rgba(255, 255, 255, 0.05);
}
:root[data-theme="light"] {
--background-color: #fff;
--background-color-transparent: rgba(255, 255, 255, 0.6);
--second-background-color: #f8f8f8;
--third-background-color: #f2f2f2;
--third-background-color-transparent: rgba(241, 241, 241, 0.6);
--primary-color: #0066CC;
--first-text-color: #16171a;
--second-text-color: #2f3037;
--third-text-color: #5e5e5e;
--fourth-text-color: #eeeeee;
--default-text-color: #373D3F;
--invert-text-color: #bebec6;
--border-color: rgba(0, 0, 0, 0.08);
--selection-color: #0066CC;
--shadow-color-1: rgba(0, 0, 0, 0.08);
--shadow-color-2: rgba(0, 0, 0, 0.05);
}
body {
background-color: var(--background-color);
color: var(--default-text-color);
}
/* Apply body classes as soon as DOM is ready */
:root[data-theme="dark"] body {
background-color: var(--background-color);
color: var(--default-text-color);
}
</style>
<!-- preconnect -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<% if (theme.cdn.enable) { %>
<% const provider = theme.cdn.provider; %>
<% const cdnLinks = {
'jsdelivr': 'https://cdn.jsdelivr.net',
'unpkg': 'https://unpkg.com',
'aliyun': 'https://evan.beee.top',
'cdnjs': 'https://cdnjs.cloudflare.com',
'zstatic': 'https://s4.zstatic.net',
'npmmirror': 'https://registry.npmmirror.com',
}; %>
<% if (cdnLinks[provider]) { %>
<link rel="preconnect" href="<%= cdnLinks[provider] %>" crossorigin>
<% } %>
<% } %>
<!--- Seo Part-->
<%- generateMeta(theme, page) %>
<%- autoCanonical(config, page) %>
<meta name="robots" content="index,follow">
<meta name="googlebot" content="index,follow">
<meta name="revisit-after" content="1 days">
<% checkDeprecation(
theme.global.open_graph === true,
'open_graph',
"Using 'open_graph: true' is deprecated. Please update to the new format:\nglobal:\n open_graph:\n enable: true\n image: your_image_path\n description: your_description"
) %>
<% if (theme.global.open_graph?.enable || theme.global.open_graph === true) { %>
<%
let ogImage = page.og_image || theme.global.open_graph?.image;
let ogDescription = page.og_description || theme.global.open_graph?.description || page.description || config.description;
let author = page.author || config.author || 'Redefine Team';
%>
<%- open_graph({
image: ogImage,
author: author,
description: ogDescription,
twitter_card: 'summary',
twitter_image: ogImage,
}) %>
<% } %>
<% if (theme.global.google_analytics.enable) { %>
<!-- Google tag (gtag.js) -->
<script src="https://www.googletagmanager.com/gtag/js?id=<%= theme.global.google_analytics.id %>"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '<%= theme.global.google_analytics.id %>');
</script>
<% } %>
<!--- Icon Part-->
<link rel="icon" type="image/png" href="<%= url_for(theme.defaults.favicon) %>" sizes="192x192">
<link rel="apple-touch-icon" sizes="180x180" href="<%= url_for(theme.defaults.favicon) %>">
<meta name="theme-color" content="<%= theme.colors.primary %>">
<%- favicon_tag(theme.defaults.favicon) %>
<!--- Page Info-->
<%
let title = page.title;
if (is_archive()) {
title = __('archive');
if (is_month()) {
title += ': ' + page.year + '/' + page.month;
} else if (is_year()) {
title += ': ' + page.year;
}
} else if (is_category()) {
title = __('category') + ': ' + page.category;
} else if (is_tag()) {
title = __('tag') + ': ' + page.tag;
} else {
title = __(page.title);
}
%>
<title>
<% if (title) { %>
<%= title %> | <%= theme.info.title || config.title || 'Redefine Theme' %>
<% } else { %>
<%= theme.info.title || config.title || 'Redefine Theme' %> - <%= theme.info.subtitle || config.subtitle || 'Redefine Your Hexo Journey.' %>
<% } %>
</title>
<%- renderCSS('fonts/Chillax/chillax.css') %>
<!--- Inject Part-->
<% if (theme.inject.enable == true) { %>
<% for (let i in theme.inject.head) { %>
<% if (theme.inject.head[i] !== null){ %>
<% if (theme.global.single_page == true) { %>
<%- theme.inject.head[i].replace("<script", "<script data-swup-reload-script") %>
<% } else { %>
<%- theme.inject.head[i] %>
<% } }%>
<% } }%>
<%- css('css/style') %>
<% if (theme.developer && theme.developer.enable) {%>
<%- css('css/build/tailwind.css') %>
<% } else {%>
<%- renderCSS('css/build/tailwind.css') %>
<% } %>
<%- renderCSS('fonts/GeistMono/geist-mono.css') %>
<%- renderCSS('fonts/Geist/geist.css') %>
<!--- Font Part-->
<% if (theme.home_banner.custom_font.enable) { %>
<link href="<%- theme.home_banner.custom_font.url %>" rel="stylesheet">
<% } %>
<% if (theme.articles.code_block.font.enable) { %>
<link href="<%- theme.articles.code_block.font.url %>" rel="stylesheet">
<% } %>
<% if (theme.global.fonts.chinese.enable) { %>
<link href="<%- theme.global.fonts.chinese.url %>" rel="stylesheet">
<% } %>
<% if (theme.global.fonts.english.enable) { %>
<link href="<%- theme.global.fonts.english.url %>" rel="stylesheet">
<% } %>
<% if (theme.global.fonts.title.enable) { %>
<link href="<%- theme.global.fonts.title.url %>" rel="stylesheet">
<% } %>
<% if (theme.global.preloader === true || theme.global.preloader.enable === true) { %>
<%- renderJS('libs/anime.min.js')%>
<% } %>
<%- export_config() %>
<!--- Fontawesome Part-->
<%- renderCSS('fontawesome/fontawesome.min.css') %>
<%- renderCSS('fontawesome/brands.min.css') %>
<%- renderCSS('fontawesome/solid.min.css') %>
<%- renderCSS('fontawesome/regular.min.css') %>
<% if (theme.fontawesome.thin == true) { %>
<%- renderCSS('fontawesome/thin.min.css') %>
<% } %>
<% if (theme.fontawesome.light == true) { %>
<%- renderCSS('fontawesome/light.min.css') %>
<% } %>
<% if (theme.fontawesome.duotone == true) { %>
<%- renderCSS('fontawesome/duotone.min.css') %>
<% } %>
<% if (theme.fontawesome.sharp_solid == true) { %>
<%- renderCSS('fontawesome/sharp-solid.min.css') %>
<% } %>
</head>

View File

@@ -0,0 +1,163 @@
<header class="navbar-container px-6 md:px-12">
<div class="navbar-content transition-navbar <%- (theme.home_banner.enable === true && is_home() && !page.prev) ? 'has-home-banner' : '' %>">
<div class="left">
<% if (theme.defaults.hasOwnProperty('logo') && theme.defaults.logo) { %>
<a class="logo-image h-8 w-8 sm:w-10 sm:h-10 mr-3" href="<%= config.root %>">
<%- image_tag(theme.defaults.logo, {
class: "w-full h-full rounded-xs"
}) %>
</a>
<% } %>
<a class="logo-title" href="<%= config.root %>">
<%- is_home() ? '<h1>' : '' %>
<%= theme.info.title || config.title || 'Redefine Theme' %>
<%- is_home() ? '</h1>' : '' %>
</a>
</div>
<div class="right">
<!-- PC -->
<div class="desktop">
<ul class="navbar-list">
<% for (let i in theme.navbar.links) { %>
<% if (theme.navbar.links[i].path === 'none') {
} else { %>
<%
let link = theme.navbar.links[i];
let hasSubmenus = link.submenus;
let isActive = isHomePagePagination(page.path, link.path) || is_current(link.path);
let linkHref = hasSubmenus ? '#' : url_for(link.path);
let onClickAction = hasSubmenus ? 'onClick="return false;"' : '';
let iconClass = link.icon ? `<i class="${link.icon} fa-fw"></i>` : '';
let linkText = __(i.toLowerCase()).toUpperCase();
let dropdownIcon = hasSubmenus ? '<i class="fa-solid fa-chevron-down fa-fw"></i>' : '';
%>
<li class="navbar-item">
<!-- Menu -->
<a class="<%= hasSubmenus ? 'has-dropdown' : (isActive ? 'active' : '') %>"
href="<%= linkHref %>"
<%= onClickAction %>>
<%- iconClass %>
<%= linkText %>
<%- dropdownIcon %>
</a>
<!-- Submenu -->
<% if (hasSubmenus) { %>
<ul class="sub-menu">
<% for (var submenu in link.submenus) { %>
<li>
<a href="<%- url_for(link.submenus[submenu]) %>">
<%= __(submenu.toLowerCase()).toUpperCase() %>
</a>
</li>
<% } %>
</ul>
<% } %>
</li>
<% } } %>
<% if (theme.navbar.search.enable === true) { %>
<li class="navbar-item search search-popup-trigger">
<i class="fa-solid fa-magnifying-glass"></i>
</li>
<% } %>
</ul>
</div>
<!-- Mobile -->
<div class="mobile">
<% if (theme.navbar.search.enable === true) { %>
<div class="icon-item search search-popup-trigger"><i class="fa-solid fa-magnifying-glass"></i>
</div>
<% } %>
<div class="icon-item navbar-bar">
<div class="navbar-bar-middle"></div>
</div>
</div>
</div>
</div>
<!-- Mobile sheet -->
<div class="navbar-drawer h-dvh w-full absolute top-0 left-0 bg-background-color flex flex-col justify-between">
<ul class="drawer-navbar-list flex flex-col px-4 justify-center items-start">
<% for (let i in theme.navbar.links) { %>
<% if (theme.navbar.links[i].path !== 'none') { %>
<%
// Function to check if link is active
function isActiveLink(pagePath, linkPath) {
return isHomePagePagination(pagePath, linkPath) || is_current(linkPath);
}
// Variables for cleaner code
let linkData = theme.navbar.links[i];
let hasSubmenus = linkData.submenus;
let isActive = isActiveLink(page.path, linkData.path);
let iconClass = linkData.icon;
let linkText = __(i.toLowerCase()).toUpperCase();
let linkPath = hasSubmenus ? '#' : url_for(linkData.path);
let drawerNavbarItemClass = hasSubmenus ? 'drawer-navbar-item-sub' : 'drawer-navbar-item';
%>
<li class="<%= drawerNavbarItemClass %> text-base my-1.5 flex flex-col w-full">
<% if (hasSubmenus) {%>
<div class="py-1.5 px-2 flex flex-row items-center justify-between gap-1 hover:!text-primary active:!text-primary cursor-pointer text-2xl font-semibold group border-b border-border-color hover:border-primary w-full <%= isActive ? 'active' : '' %>"
navbar-data-toggle="submenu-<%= i %>"
>
<span>
<%= linkText %>
</span>
<% if (iconClass) { %>
<i class="fa-solid fa-chevron-right fa-sm fa-fw transition-all"></i>
<% } %>
</div>
<% } else { %>
<a class="py-1.5 px-2 flex flex-row items-center justify-between gap-1 hover:!text-primary active:!text-primary text-2xl font-semibold group border-b border-border-color hover:border-primary w-full <%= isActive ? 'active' : '' %>"
href="<%= linkPath %>"
>
<span>
<%= linkText %>
</span>
<% if (iconClass) { %>
<i class="<%= iconClass %> fa-sm fa-fw"></i>
<% } %>
</a>
<% } %>
<% if (hasSubmenus) { %>
<div class="flex-col items-start px-2 py-2 hidden" data-target="submenu-<%= i %>">
<% for (var submenu in linkData.submenus) { %>
<div class="drawer-navbar-item text-base flex flex-col justify-center items-start hover:underline active:underline hover:underline-offset-1 rounded-3xl">
<a class=" text-third-text-color text-xl"
href="<%- url_for(linkData.submenus[submenu]) %>"><%= __(submenu.toLowerCase()).toUpperCase() %></a>
</div>
<% } %>
</div>
<% } %>
</li>
<% } } %>
<%# Add sidebar links %>
<% if (theme.home.sidebar.links !== null && theme.home.sidebar.show_on_mobile !== false) {%>
<% for (let i in theme.home.sidebar.links) { %>
<% if (theme.navbar.links && theme.navbar.links.hasOwnProperty(i)) {
continue;
} %>
<li class="drawer-navbar-item text-base my-1.5 flex flex-col w-full">
<a class="py-1.5 px-2 flex flex-row items-center justify-between gap-1 hover:!text-primary active:!text-primary text-2xl font-semibold group border-b border-border-color hover:border-primary w-full active"
href="<%= url_for(theme.home.sidebar.links[i].path) %>"
>
<span><%= __(i) %></span>
<i class="<%= theme.home.sidebar.links[i].icon %> fa-sm fa-fw"></i>
</a>
</li>
<% } %>
<% } %>
</ul>
<%- partial("components/sidebar/statistics") %>
</div>
<div class="window-mask"></div>
</header>

View File

@@ -0,0 +1,148 @@
<style>
:root {
--preloader-background-color: #fff;
--preloader-text-color: #000;
}
@media (prefers-color-scheme: dark) {
:root {
--preloader-background-color: #202124;
--preloader-text-color: #fff;
}
}
@media (prefers-color-scheme: light) {
:root {
--preloader-background-color: #fff;
--preloader-text-color: #000;
}
}
@media (max-width: 600px) {
.ml13 {
font-size: 2.6rem !important; /* Adjust this value as needed */
}
}
.preloader {
display: flex;
flex-direction: column;
gap: 1rem; /* Tailwind 'gap-4' is 1rem */
align-items: center;
justify-content: center;
position: fixed;
padding: 12px;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100vw;
height: 100vh; /* 'h-screen' is 100% of the viewport height */
background-color: var(--preloader-background-color);
z-index: 1100; /* 'z-[1100]' sets the z-index */
transition: opacity 0.2s ease-in-out;
}
.ml13 {
font-size: 3.2rem;
/* text-transform: uppercase; */
color: var(--preloader-text-color);
letter-spacing: -1px;
font-weight: 500;
font-family: 'Chillax-Variable', sans-serif;
text-align: center;
}
.ml13 .word {
display: inline-flex;
flex-wrap: wrap;
white-space: nowrap;
}
.ml13 .letter {
display: inline-block;
line-height: 1em;
}
</style>
<div class="preloader">
<h2 class="ml13">
<%=
theme.global.preloader.custom_message || theme.info.title
%>
</h2>
<script>
var textWrapper = document.querySelector('.ml13');
// Split text into words
var words = textWrapper.textContent.trim().split(' ');
// Clear the existing content
textWrapper.innerHTML = '';
// Wrap each word and its letters in spans
words.forEach(function(word) {
var wordSpan = document.createElement('span');
wordSpan.classList.add('word');
wordSpan.innerHTML = word.replace(/\S/g, "<span class='letter'>$&</span>");
textWrapper.appendChild(wordSpan);
textWrapper.appendChild(document.createTextNode(' ')); // Add space between words
});
var animation = anime.timeline({ loop: true })
.add({
targets: '.ml13 .letter',
translateY: [20, 0],
translateZ: 0,
opacity: [0, 1],
filter: ['blur(5px)', 'blur(0px)'],
easing: "easeOutExpo",
duration: 1200,
delay: (el, i) => 300 + 20 * i,
})
.add({
targets: '.ml13 .letter',
translateY: [0, -20],
opacity: [1, 0],
filter: ['blur(0px)', 'blur(5px)'],
easing: "easeInExpo",
duration: 1000,
delay: (el, i) => 15 * i,
complete: function() {
hidePreloader();
}
}, '-=700');
let themeStatus = JSON.parse(localStorage.getItem('REDEFINE-THEME-STATUS'))?.isDark;
// If the theme status is not found in local storage, check the preferred color scheme
if (themeStatus === undefined || themeStatus === null) {
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
themeStatus = 'dark';
} else {
themeStatus = 'light';
}
}
// Now you can use the themeStatus variable in your code
if (themeStatus) {
document.documentElement.style.setProperty('--preloader-background-color', '#202124');
document.documentElement.style.setProperty('--preloader-text-color', '#fff');
} else {
document.documentElement.style.setProperty('--preloader-background-color', '#fff');
document.documentElement.style.setProperty('--preloader-text-color', '#000');
}
window.addEventListener('load', function () {
setTimeout(hidePreloader, 5000); // Call hidePreloader after 5000 milliseconds if not already called by animation
});
function hidePreloader() {
var preloader = document.querySelector('.preloader');
preloader.style.opacity = '0';
setTimeout(function () {
preloader.style.display = 'none';
}, 200);
}
</script>
</div>

View File

@@ -0,0 +1,12 @@
<div class="progress-bar-container">
<% if (theme.global.scroll_progress.bar === true) { %>
<span class="scroll-progress-bar"></span>
<% } %>
<% if (theme.global.single_page === true) { %>
<span class="pjax-progress-bar"></span>
<!-- <span class="swup-progress-icon">-->
<!-- <i class="fa-solid fa-circle-notch fa-spin"></i>-->
<!-- </span>-->
<% } %>
</div>

View File

@@ -0,0 +1,3 @@
<div id="aplayer"></div>
<%- renderJS('libs/APlayer.min.js') %>
<%- renderJS('plugins/aplayer.js') %>

View File

@@ -0,0 +1,90 @@
<%- renderJS([
'tools/imageViewer.js',
'utils.js',
'main.js',
'layouts/navbarShrink.js',
'tools/scrollTopBottom.js',
'tools/lightDarkSwitch.js',
'layouts/categoryList.js'
],{
module: true
}) %>
<% if (theme.navbar.search.enable) { %>
<%- renderJS('tools/localSearch.js', {
module: true
}) %>
<% } %>
<% if (theme.articles.code_block.copy) { %>
<%- renderJS('tools/codeBlock.js', {
module: true
}) %>
<% } %>
<% if (theme.articles.lazyload) { %>
<%- renderJS('layouts/lazyload.js', {
module: true
}) %>
<% } %>
<% if (theme.footer.runtime) { %>
<%- renderJS('tools/runtime.js') %>
<%- renderJS('libs/odometer.min.js') %>
<%- renderCSS('assets/odometer-theme-minimal.css') %>
<% } %>
<% if (theme.home_banner.subtitle.length !== 0) { %>
<%- renderJS('libs/Typed.min.js') %>
<%- renderJS('plugins/typed.js', {
module: true
}) %>
<% } %>
<% if (theme.plugins.mermaid.enable) { %>
<% if (theme.plugins.mermaid.version === '11.4.1') { %>
<%- renderJS('libs/mermaid.min.js') %>
<% } else { %>
<script src="https://cdn.jsdelivr.net/npm/mermaid@<%= theme.plugins.mermaid.version %>/dist/mermaid.min.js"></script>
<% } %>
<%- renderJS('plugins/mermaid.js') %>
<% } %>
<% if (theme.masonry || theme.photos || theme.gallery) { %>
<%- renderJS('libs/minimasonry.min.js') %>
<%- renderJS('plugins/masonry.js', {
module: true
}) %>
<% } %>
<% if (theme.global.preloader === false || theme.global.preloader.enable === false) { %>
<%- renderJS('libs/anime.min.js')%>
<% } %>
<% if (theme.articles.toc.enable) { %>
<%- renderJS([
'tools/tocToggle.js',
'layouts/toc.js',
'plugins/tabs.js'
], {
module: true,
swupReload: true
}) %>
<% } %>
<%- renderJS('libs/moment-with-locales.min.js', { swupReload: true }) %>
<%- renderJS('layouts/essays.js', { swupReload: true, module: true }) %>
<% if (theme.articles.pangu_js) { %>
<%- renderJS([
'libs/pangu.min.js',
'plugins/pangu.js'
]) %>
<% } %>
<% if (theme.bookmarks && theme.bookmarks.length !== 0) { %>
<%- renderJS('layouts/bookmarkNav.js', {
module: true
}) %>
<% } %>

View File

@@ -0,0 +1,6 @@
<div class="author flex flex-col justify-center my-2.5 mx-0">
<div class="name"><%= theme.info.author || config.author %></div>
<% if (theme.hasOwnProperty('articles') && theme.articles.author_label.enable === true) { %>
<div class="label"><%- getAuthorLabel(site.posts.length, theme.articles.author_label.auto, theme.articles.author_label.list) %></div>
<% } %>
</div>

View File

@@ -0,0 +1,3 @@
<div class="avatar flex justify-center">
<%- image_tag(theme.defaults.avatar) %>
</div>

View File

@@ -0,0 +1,14 @@
<div class="statistics flex justify-around my-2.5">
<a class="item tag-count-item flex flex-col justify-center items-center w-20" href="<%- url_for(config.tag_dir) %>">
<div class="number text-2xl sm:text-xl text-second-text-color font-semibold"><%= site.tags.length %></div>
<div class="label text-third-text-color text-sm"><%- __('tags') %></div>
</a>
<a class="item tag-count-item flex flex-col justify-center items-center w-20" href="<%- url_for(config.category_dir) %>">
<div class="number text-2xl sm:text-xl text-second-text-color font-semibold"><%= site.categories.length %></div>
<div class="label text-third-text-color text-sm"><%- __('categories') %></div>
</a>
<a class="item tag-count-item flex flex-col justify-center items-center w-20" href="<%- url_for(config.archive_dir) %>">
<div class="number text-2xl sm:text-xl text-second-text-color font-semibold"><%= site.posts.length %></div>
<div class="label text-third-text-color text-sm"><%- __('posts') %></div>
</a>
</div>

27
node_modules/hexo-theme-redefine/layout/components/swup.ejs generated vendored Executable file
View File

@@ -0,0 +1,27 @@
<%- renderJS([
'libs/Swup.min.js',
'libs/SwupSlideTheme.min.js',
'libs/SwupScriptsPlugin.min.js',
'libs/SwupProgressPlugin.min.js',
'libs/SwupScrollPlugin.min.js',
'libs/SwupPreloadPlugin.min.js']
) %>
<script>
const swup = new Swup({
plugins: [
new SwupScriptsPlugin({
optin: true,
}),
new SwupProgressPlugin(),
new SwupScrollPlugin({
offset: 80,
}),
new SwupSlideTheme({
mainElement: ".main-content-body",
}),
new SwupPreloadPlugin(),
],
containers: ["#swup"],
});
</script>

1
node_modules/hexo-theme-redefine/layout/index.ejs generated vendored Executable file
View File

@@ -0,0 +1 @@
<%- partial('page') %>

13
node_modules/hexo-theme-redefine/layout/layout.ejs generated vendored Executable file
View File

@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="<%= config.language %>">
<%- partial('components/header/head') %>
<body>
<%- body %>
<%- partial('components/scripts') %>
<% if (theme.plugins.aplayer.enable) { %>
<%- partial('components/plugins/aplayer') %>
<% } %>
</body>
</html>

57
node_modules/hexo-theme-redefine/layout/page.ejs generated vendored Executable file
View File

@@ -0,0 +1,57 @@
<%- partial('components/header/progress-bar') %>
<% if (theme.global.preloader === true || theme.global.preloader.enable === true) { %>
<%- partial('components/header/preloader') %>
<% } %>
<main class="page-container" id="swup">
<% if (theme.home_banner.enable === true && is_home() && !page.prev) { %>
<%- partial('pages/home/home-banner') %>
<% } else if (theme.home_banner.enable === true && is_home() && page.prev && theme.home_banner.style === "fixed") { %>
<%- partial('pages/home/home-background') %>
<% } %>
<div class="main-content-container flex flex-col justify-between min-h-dvh">
<div class="main-content-header">
<%- partial('components/header/navbar') %>
</div>
<div class="main-content-body transition-fade-up">
<% if (is_home() && theme.home.sidebar.enable === true && theme.home.sidebar.position === "left") { %>
<%- partial('pages/home/home-sidebar') %>
<% } %>
<div class="main-content">
<%- partial(getPagePartialPath(page)) %>
</div>
<% if (is_home() && theme.home.sidebar.enable === true && theme.home.sidebar.position === "right") { %>
<%- partial('pages/home/home-sidebar') %>
<% } %>
</div>
<div class="main-content-footer">
<%- partial('components/footer/footer') %>
</div>
</div>
<% if (is_post()) { %>
<div class="post-tools">
<%- partial('pages/post/post-tools') %>
</div>
<% } %>
<div class="right-side-tools-container">
<%- partial('utils/side-tools') %>
</div>
<%- partial('utils/image-viewer') %>
<% if (theme.navbar.search.enable) { %>
<%- partial('utils/local-search') %>
<% } %>
</main>
<% if (theme.global.single_page !== false) { %>
<%- partial('components/swup') %>
<% } %>

View File

@@ -0,0 +1,3 @@
<div class="archive-container shadow-none hover:shadow-none sm:shadow-redefine sm:hover:shadow-redefine-hover">
<%- partial('utils/posts-list', {posts: site.posts}) %>
</div>

View File

@@ -0,0 +1,68 @@
<div class="py-8 sm:py-0">
<h1 class="page-title-header">
<%- getPageTitle(page) %>
</h1>
<div class="flex flex-col md:flex-row gap-6 md:gap-12 w-full">
<!-- Left Sidebar - Categories -->
<div class="w-full md:w-48 shrink-0 md:sticky md:top-[var(--navbar-height)] h-fit sm:py-6">
<nav class="flex md:block overflow-x-auto scrollbar-hide pb-4 md:pb-0 gap-2">
<% for (const category of theme.bookmarks) { %>
<a href="#<%= category.category.toLowerCase().replace(/\s+/g, '-') %>" class="whitespace-nowrap md:whitespace-normal block px-3 py-2 rounded-lg
hover:bg-second-background-color hover:text-primary hover:scale-102
transition-all duration-200 border border-transparent
hover:border-second-background-color
shrink-0 font-medium
bookmark-nav-item"
data-category="<%= category.category.toLowerCase().replace(/\s+/g, '-') %>">
<i class="fa-regular <%= category.icon %> mr-2 w-6 h-6"></i>
<%= category.category %>
</a>
<% } %>
</nav>
</div>
<!-- Right Content - Bookmarks -->
<div class="flex-1 max-w-full">
<% for (const category of theme.bookmarks) { %>
<section id="<%= category.category.toLowerCase().replace(/\s+/g, '-') %>" class="mb-12">
<h2 class="text-2xl font-semibold text-second-text-color mb-4 pb-2 border-b border-border-color">
<%= category.category %>
</h2>
<div class="grid gap-6 lg:grid-cols-2">
<% for (const item of category.items) { %>
<a href="<%= item.link %>" target="_blank" rel="noopener noreferrer" class="group block">
<div class="p-5 rounded-xl redefine-box-shadow-flat transition-all duration-300
hover:transform hover:-translate-y-1">
<div class="flex items-center gap-5">
<div class="w-12 h-12 rounded-xl overflow-hidden bg-second-background-color shrink-0
transform group-hover:scale-105 transition-transform duration-300">
<img src="<%= item.image %>" alt="<%= item.name %>" class="w-full h-full object-cover" onerror="this.src='/images/bookmark-placeholder.svg'">
</div>
<div class="flex-1 min-w-0 flex flex-col gap-1">
<div class="flex items-center justify-between">
<h3 class="font-medium text-second-text-color group-hover:text-primary transition-colors">
<%= item.name %>
</h3>
<i class="fa-regular fa-arrow-right text-third-text-color opacity-0 group-hover:opacity-100 -translate-x-1
group-hover:translate-x-0 transition-all duration-300"></i>
</div>
<p class="text-sm text-third-text-color line-clamp-2">
<%= item.description %>
</p>
</div>
</div>
</div>
</a>
<% } %>
</div>
</section>
<% } %>
</div>
</div>
</div>

View File

@@ -0,0 +1,11 @@
<h1 class="page-title-header">
<%- getPageTitle(page) %>
</h1>
<div class="category-list-content">
<%- list_categories(site.categories, { class: 'all-category', depth: 5,
style: 'list' }) %>
</div>
<div class="category-comments">
<% if (page.comment) { %> <%- partial('components/comments/comment') %>
<% } %>
</div>

View File

@@ -0,0 +1,6 @@
<div class="category-name">
<i class="fa-solid fa-folder"></i>&nbsp;<%= page.category %>
</div>
<div class="category-post-list">
<%- partial('utils/posts-list', {posts: page.posts}) %>
</div>

View File

@@ -0,0 +1,59 @@
<div class="friends-link-container flex flex-col">
<h1 class="text-[3.2rem] mt-1.5 mb-5 font-bold leading-[1]"><%= page.title %></h1>
<% for (const category of theme.links) { %>
<div class="mt-2 mb-4">
<h2 class="text-2xl font-bold"><%= category.links_category %></h2>
</div>
<% if (category.has_thumbnail == true) { %>
<ul class="grid grid-cols-2 mb-6 w-full gap-4">
<% for (const f of category.list) { %>
<li class="group transform scale-100 transition-transform duration-100 ease-linear active:scale-95">
<a href="<%= f.link %>">
<div class="content rounded-lg redefine-box-shadow-flat">
<div class="thumbnail rounded-t-lg h-32 md:h-44 overflow-hidden">
<img class="rounded-t-lg object-cover w-full h-full" src="<%= f.thumbnail %>" />
</div>
<div class="avainfo flex flex-row items-center gap-1 sm:gap-2 overflow-hidden min-w-0">
<div class="avatar h-16 w-16 rounded-bl-lg bg-third-background-color">
<% if (f.avatar) { %>
<img class="rounded-bl-lg h-16 w-16 max-w-none" src="<%= f.avatar %>" onerror="this.style.display='none'">
<% } else { %>
<i class="fa-solid fa-user-group"></i>
<% } %>
</div>
<div class="flex flex-col min-w-0">
<div class="text-lg text-second-text-color ellipsis group-hover:!text-primary"><%= f.name %></div>
<div class="text-third-text-color ellipsis"><%= f.description %></div>
</div>
</div>
</div>
</a>
</li>
<% } %>
</ul>
<% } else { %>
<ul class="grid mb-6 gap-4 <%= theme.page_templates.friends_column === 3 ? "grid-cols-2 sm:grid-cols-3" : "grid-cols-2" %>">
<% for (const f of category.list) { %>
<li class="group transform scale-100 transition-transform duration-100 ease-linear active:scale-95">
<a href="<%= f.link %>">
<div class="flex flex-row items-center gap-1 sm:gap-2 overflow-hidden min-w-0 rounded-lg shadow-redefine-flat">
<div class="h-16 w-16 rounded-bl-lg bg-third-background-color">
<% if (f.avatar) { %>
<img class="rounded-l-lg h-16 w-16 max-w-none" src="<%= f.avatar %>" onerror="this.style.display='none'">
<% } else { %>
<i class="fa-solid fa-user-group"></i>
<% } %>
</div>
<div class="flex flex-col min-w-0">
<div class="text-lg text-second-text-color ellipsis group-hover:!text-primary"><%= f.name %></div>
<div class="text-third-text-color ellipsis"><%= f.description %></div>
</div>
</div>
</a>
</li>
<% } %>
</ul>
<% } %>
<% } %>
<div class="clear"></div>
</div>

View File

@@ -0,0 +1,52 @@
<div class="home-article-meta-info-container">
<div class="home-article-meta-info">
<span><i class="fa-solid fa-calendars"></i>&nbsp;
<span class="home-article-date" data-date="<%= post.date %>">
<% if (theme.home.article_date_format == 'auto' || theme.home.article_date_format == 'relative') { %>
<%= date(post.date, config.date_format) %>
<% } else { %>
<%= date(post.date, theme.home.article_date_format) %>
<% } %>
</span>
</span>
<% if (post.categories.length && theme.home.categories.enable === true) { %>
<span class="home-article-category">
<i class="fa-solid fa-folders"></i>&nbsp;
<ul>
<% let previousParentId = null; %>
<% post.categories.forEach((category, i) => { %>
<% if (previousParentId !== category.parent) { %>
<% if (previousParentId !== null) { %>
<li>></li>
<% } %>
<li>
<a href="<%- url_for(category.path) %>"><%= category.name %></a>&nbsp;
</li>
<% } else { %>
<li>
| <a href="<%- url_for(category.path) %>"><%= category.name %></a>&nbsp;
</li>
<% } %>
<% previousParentId = category.parent; %>
<% }); %>
</ul>
</span>
<% } %>
<% if (post.tags.length && theme.home.tags.enable === true) { %>
<span class="home-article-tag">
<i class="fa-solid fa-tags"></i>&nbsp;
<ul>
<% post.tags.forEach((tag, i) => {
if (theme.home.tags.limit === 0 || i + 1 <= theme.home.tags.limit) { %>
<li>
<%= i === 0 ? '' : '| ' %>
<a href="<%- url_for(tag.path) %>"><%= tag.name %></a>&nbsp;
</li>
<% }}); %>
</ul>
</span>
<% } %>
</div>
<a href="<%- url_for(post.path) %>"><%- __('read_more') %><span class="seo-reader-text"><%= post.title %></span>&nbsp;<i class="fa-solid fa-angle-right"></i></a>
</div>

View File

@@ -0,0 +1,33 @@
<style>
.home-article-item,
.sidebar-links,
.sidebar-content,
a.page-number,
a.extend,
.sidebar-links .links:hover,
.right-bottom-tools,
footer.footer {
background-color: var(--background-color-transparent-80) !important;
}
.right-bottom-tools:hover,
a.page-number:hover,
a.extend:hover {
background-color: var(--primary-color) !important;
}
.site-info,
.home-article-sticky-label {
background-color: var(--background-color-transparent-15) !important;
}
.home-article-sticky-label {
backdrop-filter: none !important;
}
.home-banner-background {
filter: blur(15px);
}
</style>
<div class="home-banner-background transition-fade fixed top-0 left-0 w-screen h-screen scale-125 sm:scale-110 box-border will-change-transform bg-cover">
<img src="<%- url_for(theme.home_banner.image.light) %>" alt="home-banner-background" class="w-full h-full object-cover dark:hidden">
<img src="<%- url_for(theme.home_banner.image.dark) %>" alt="home-banner-background" class="w-full h-full object-cover hidden dark:block">
</div>

View File

@@ -0,0 +1,153 @@
<% if (theme.home_banner.style === "fixed") { %>
<style>
.home-banner-container {
background: none !important;
}
.home-article-item,
.sidebar-links,
.sidebar-content,
a.page-number,
a.extend,
.sidebar-links .links:hover,
.right-bottom-tools,
footer.footer {
background-color: var(--background-color-transparent-80) !important;
}
.right-bottom-tools:hover,
a.page-number:hover,
a.extend:hover {
background-color: var(--primary-color) !important;
}
.site-info,
.home-article-sticky-label {
background-color: var(--background-color-transparent-15) !important;
}
.home-article-sticky-label {
backdrop-filter: none !important;
}
</style>
<div class="home-banner-background transition-fade fixed top-0 left-0 w-screen h-screen scale-125 sm:scale-110 box-border will-change-transform bg-cover">
<img src="<%- url_for(theme.home_banner.image.light) %>" alt="home-banner-background" class="w-full h-full object-cover dark:hidden">
<img src="<%- url_for(theme.home_banner.image.dark) %>" alt="home-banner-background" class="w-full h-full object-cover hidden dark:block">
</div>
<% } %>
<div class="home-banner-container flex justify-center items-center transition-fade relative">
<% if (theme.home_banner.style !== "fixed") {%>
<div class="home-banner-background transition-fade absolute top-0 left-0 w-screen h-screen scale-125 sm:scale-110 box-border will-change-transform bg-cover">
<img src="<%- url_for(theme.home_banner.image.light) %>" alt="home-banner-background" class="w-full h-full object-cover dark:hidden">
<img src="<%- url_for(theme.home_banner.image.dark) %>" alt="home-banner-background" class="w-full h-full object-cover hidden dark:block">
</div>
<% } %>
<div class="content mt-8 flex flex-col justify-center items-center transition-fade-down">
<div class="description flex flex-col justify-center items-center w-screen font-medium text-center"
<% if (theme.home_banner.custom_font.enable) { %>
style="font-family: '<%- theme.home_banner.custom_font.family %>', sans-serif; !important;"
<% } %>
>
<%- theme.home_banner.title || theme.style.first_screen.description || config.description %>
<%# theme.style.first_screen.description is deprecated %>
<% if (theme.home_banner.subtitle.length !== 0) { %>
<p><i id="subtitle"></i></p>
<% } %>
</div>
<% if (theme.home_banner.social_links.enable) { %>
<%
const flexDirection = theme.home_banner.social_links.style === "reverse" ? "flex-row-reverse" : "flex-row";
const justify = theme.home_banner.social_links.style === "center" ? "justify-center" : "justify-between";
const display = theme.home_banner.social_links.style === "center" ? "hidden" : "flex";
%>
<div class="absolute bottom-0.5 flex <%- flexDirection %> <%- justify %> max-w-[1340px] items-center w-full px-8 sm:px-12">
<div class="<%- display %> p-3 bg-gray-300/50 dark:bg-gray-500/40 backdrop-blur-lg border border-white/20 dark:border-gray-500/30 group rounded-full cursor-pointer flex justify-center items-center aspect-square h-full shadow-redefine-flat hover:shadow-redefine-flat-hover transition-shadow" onclick="scrollToMain()" >
<i class="fa-solid fa-arrow-down fa-fw fa-lg group-hover:translate-y-1 transition-transform"></i>
</div>
<div class="social-contacts px-6 py-3 bg-gray-300/50 dark:bg-gray-500/40 backdrop-blur-lg border border-white/20 dark:border-gray-500/30 shadow-redefine-flat rounded-full flex flex-row gap-3 items-center">
<% for (const key in theme.home_banner.social_links.links) { %>
<% if(theme.home_banner.social_links.links[key]) { %>
<% if(key === 'email') { %>
<span class="social-contact-item <%= key %> ">
<a href="mailto:<%- theme.home_banner.social_links.links[key] %>">
<i class="fa-solid fa-fw fa-at fa-lg"></i>
</a>
</span>
<% } else if(key.includes("fa-")) { %>
<span class="social-contact-item">
<a target="_blank" href="<%- theme.home_banner.social_links.links[key] %>">
<i class="<%= key %> fa-fw fa-lg"></i>
</a>
</span>
<% } else if(key.startsWith('/') || key.startsWith('http')) { %>
<span class="social-contact-item">
<a target="_blank" href="<%- theme.home_banner.social_links.links[key] %>">
<img src="<%- url_for(key) %>" alt="social-icon" class="w-5 h-5 object-contain">
</a>
</span>
<% } else { %>
<span class="social-contact-item <%= key %>">
<a target="_blank" href="<%- theme.home_banner.social_links.links[key] %>">
<i class="fa-brands fa-fw fa-lg fa-<%= key %>"></i>
</a>
</span>
<% } %>
<% } %>
<% } %>
<%
let qrs = theme.home_banner.social_links.qrs;
let qrCount = 0;
for (const key in qrs) {
if(qrs[key]) {
qrCount++;
}
}
if (qrs && qrCount >= 1) { %>
<div class="social-links-divider vertical-separator w-[1px] h-4 bg-third-text-color mx-0.5"></div>
<% for (const key in qrs) { %>
<% if(qrs[key]) { %>
<% if(key.includes("fa-")) { %>
<span class="social-contact-item-qr cursor-pointer group">
<a target="_blank">
<i class="<%= key %> fa-fw fa-lg"></i>
<div class="social-qr-container absolute h-auto bg-background-color-transparent-40 border border-white/20 dark:border-gray-500/30 overflow-hidden rounded-2xl bottom-0 mb-14 right-0 invisible group-hover:visible opacity-0 group-hover:opacity-100 translate-y-0.5 group-hover:translate-y-0 transition-all">
<img class="social-contacts-qr w-64"
src="<%- url_for(theme.home_banner.social_links.qrs[key]) %>"/>
</div>
</a>
</span>
<% } else if(key.startsWith('/') || key.startsWith('http')) { %>
<span class="social-contact-item-qr cursor-pointer group">
<a target="_blank">
<img src="<%- url_for(key) %>" alt="social-icon" class="w-5 h-5 object-contain">
<div class="social-qr-container absolute h-auto bg-background-color-transparent-40 border border-white/20 dark:border-gray-500/30 overflow-hidden rounded-2xl bottom-0 mb-14 right-0 invisible group-hover:visible opacity-0 group-hover:opacity-100 translate-y-0.5 group-hover:translate-y-0 transition-all">
<img class="social-contacts-qr w-64"
src="<%- url_for(theme.home_banner.social_links.qrs[key]) %>"/>
</div>
</a>
</span>
<% } else { %>
<span class="social-contact-item-qr <%= key %> cursor-pointer group">
<a target="_blank">
<i class="fa-brands fa-fw fa-lg fa-<%= key %>"></i>
<div class="social-qr-container absolute h-auto bg-background-color-transparent-40 border border-white/20 dark:border-gray-500/30 overflow-hidden rounded-2xl bottom-0 mb-14 right-0 invisible group-hover:visible opacity-0 group-hover:opacity-100 translate-y-0.5 group-hover:translate-y-0 transition-all">
<img class="social-contacts-qr w-64"
src="<%- url_for(theme.home_banner.social_links.qrs[key]) %>"/>
</div>
</a>
</span>
<% } %>
<% } %>
<% } %>
<% } %>
</div>
</div>
<% } %>
</div>
<script>
const scrollToMain = ()=> {
console.log('scroll');
const target = document.querySelector('.main-content-container');
target.scrollIntoView({ behavior: 'smooth'});
}
</script>
</div>

View File

@@ -0,0 +1,62 @@
<div class="home-content-container">
<ul class="home-article-list">
<% page.posts.forEach(post => { %>
<li class="home-article-item">
<% if (post.sticky) { %>
<div class="absolute top-[12px] right-[12px] text-[0.7rem] text-third-text-color rounded-medium bg-background-color-transparent-15 py-[2px] px-[10px] border border-border-color z-1 hover:text-first-text-color cursor-default">
<i class="fa-regular fa-thumbtack mr-[3px] text-[0.65rem]"></i><%- __('sticky') %>
</div>
<% } %>
<% let articleThumbnail = "";
if (post.cover || post.banner || (post.thumbnail && post.thumbnail !== false)) { %>
<%
if (post.thumbnail && post.thumbnail !== null) {
articleThumbnail = post.thumbnail;
} else if (post.cover && post.cover.includes("/")) {
articleThumbnail = post.cover;
} else if (post.banner && post.banner.includes("/")) {
articleThumbnail = post.banner;
} else if (config.marked.postAsset && config.marked.postAsset == true) {
articleThumbnail = [post.path, post.cover || post.banner].join("/");
}
%>
<% } %>
<% if (post.thumbnail !== false && (post.thumbnail || post.cover || post.banner)) { %>
<div id="home-article-thumbnail" class="home-article-thumbnail relative h-[150px] overflow-hidden rounded-t-large">
<a href="<%- url_for(post.path) %>">
<img src="<%- url_for(articleThumbnail) %>" alt="<%= post.title %>" class="w-full h-full object-cover dark:brightness-75 transition-all" />
</a>
</div>
<% } %>
<div class="flex flex-col gap-5 px-7 pb-7 <%= post.thumbnail !== false && (post.thumbnail || post.cover || post.banner) ? "pt-5" : "pt-7" %>">
<h3 class="home-article-title">
<a href="<%- url_for(post.path) %>">
<%= post.title %>
</a>
</h3>
<div class="home-article-content markdown-body">
<% if (post.excerpt && post.excerpt == "false") { %>
<% } else if (post.excerpt && post.excerpt !== "false") { %>
<%- render(post.excerpt, "markdown") %>
<% } else { %>
<%
const excerptLength = theme.home.excerpt_length || 200;
%>
<%- truncate(strip_html(post.content), {length: excerptLength}) %>
<% } %>
</div>
<%- partial('pages/home/home-article', {post: post}) %>
</div>
</li>
<% }) %>
</ul>
<div class="home-paginator px-7 py-5">
<%- partial('utils/paginator', {pageObject: page}) %>
</div>
</div>

View File

@@ -0,0 +1,78 @@
<div class="home-sidebar-container">
<div class="sticky-container sticky">
<%
const hasSidebarLinks = theme.home.sidebar.links !== null;
const hasSidebarAnnouncement = theme.home.sidebar.announcement !== null;
%>
<% if (theme.home.sidebar.first_item === "info") { %>
<div class="sidebar-content">
<%- partial("components/sidebar/avatar") %>
<%- partial("components/sidebar/author") %>
<%- partial('components/sidebar/statistics')%>
</div>
<% if (hasSidebarLinks || hasSidebarAnnouncement) {%>
<div class="sidebar-links" <% if (hasSidebarLinks || hasSidebarAnnouncement) { %> marginTop <% } %>>
<div class="site-info">
<div class="site-name"><%= theme.info.title || config.title %></div>
<% if (hasSidebarAnnouncement && hasSidebarLinks) { %>
<div class="announcement">
<%- theme.home.sidebar.announcement %>
</div>
<% } %>
</div>
<% if (hasSidebarLinks) {%>
<% for (let i in theme.home.sidebar.links) { %>
<% if (theme.home.sidebar.links[i].path === 'none') {} else {%>
<a class="links" href="<%= url_for(theme.home.sidebar.links[i].path) %>">
<% if (theme.home.sidebar.links[i].icon) { %>
<i class="<%- theme.home.sidebar.links[i].icon %> icon-space"></i>
<% } %>
<span class="link-name"><%= __(i) %></span>
</a>
<% } %>
<% } %>
<% } else {%>
<div class="announcement-outside">
<%- theme.home.sidebar.announcement %>
</div>
<% } %>
</div>
<% } %>
<% } else { %>
<% if (hasSidebarLinks || hasSidebarAnnouncement) {%>
<div class="sidebar-links">
<div class="site-info">
<div class="site-name"><%= theme.info.title || config.title %></div>
<% if (hasSidebarAnnouncement && hasSidebarLinks) { %>
<div class="announcement">
<%- theme.home.sidebar.announcement %>
</div>
<% } %>
</div>
<% if (hasSidebarLinks) {%>
<% for (let i in theme.home.sidebar.links) { %>
<% if (theme.home.sidebar.links[i].path === 'none') {} else {%>
<a class="links" href="<%= url_for(theme.home.sidebar.links[i].path) %>">
<% if (theme.home.sidebar.links[i].icon) { %>
<i class="<%- theme.home.sidebar.links[i].icon %> icon-space"></i>
<% } %>
<span class="link-name"><%= __(i) %></span>
</a>
<% } %>
<% } %>
<% } else {%>
<div class="announcement-outside">
<%- theme.home.sidebar.announcement %>
</div>
<% } %>
</div>
<% } %>
<div class="sidebar-content" <% if (hasSidebarLinks || hasSidebarAnnouncement) { %> marginTop <% } %>>
<%- partial("components/sidebar/avatar") %>
<%- partial("components/sidebar/author") %>
<%- partial('components/sidebar/statistics')%>
</div>
<% } %>
</div>
</div>

View File

@@ -0,0 +1,28 @@
<%
// Define an array of images to display in the masonry layout
const images = theme.masonry;
%>
<h1 class="page-title-header">
<%- getPageTitle(page) %>
</h1>
<div class="loading-placeholder">
<div class="flex-grid generic-card">
<div class="card loading"></div>
<div class="card loading"></div>
<div class="card loading"></div>
</div>
</div>
<div id="masonry-container">
<% images.forEach(function(image) { %>
<div class="masonry-item">
<div class="image-container">
<img src="<%- image.image %>" alt="<%- image.title %>">
<div class="image-title"><%- image.title %></div>
<div class="image-description"><%- image.description %></div>
</div>
</div>
<% }); %>
</div>

View File

@@ -0,0 +1,8 @@
<div class="nf-container">
<div class="nf-text">
<h1>404<br>Page Not Found</h1>
</div>
<div class="nf-button">
<a href="/" class="button large center"><i class="fa-regular fa-house"></i> <%= __("go-back-home") %></a>
</div>
</div>

View File

@@ -0,0 +1,23 @@
<div class="page-template-container">
<% const pageData = getPageData(page); %>
<% if (pageData) { %>
<%- partial(pageData.partial) %>
<% } %>
<div class="page-template-content markdown-body">
<% if (!pageData) { %>
<h1><%- page.title %></h1>
<% } %>
<%- page.content %>
</div>
<div class="page-template-comments">
<% if (page.hasOwnProperty('comment') && (page.comment === true || page.comments === true) ) { %>
<%- partial('components/comments/comment') %>
<% } %>
</div>
</div>
<%- partial('utils/paginator', {pageObject: page}) %>

View File

@@ -0,0 +1,153 @@
<div class="post-page-container flex relative justify-between box-border w-full h-full">
<div class="article-content-container">
<div class="article-title relative w-full">
<% if (page.cover || page.banner || (page.thumbnail && page.thumbnail !== false)) { %>
<% let articleCover = "";
if (page.cover && page.cover.includes("/")) {
articleCover = page.cover;
} else if (page.banner && page.banner.includes("/")) {
articleCover = page.banner;
} else if (page.thumbnail && page.thumbnail !== null) {
articleCover = page.thumbnail;
} else if (config.marked.postAsset && config.marked.postAsset == true) {
articleCover = [page.path, page.cover || page.banner].join("/");
}
%>
<% if (articleCover) { %>
<img src="<%= url_for(articleCover) %>" alt="<%= page.title %>" class="w-full h-60 sm:h-72 md:h-80 object-cover sm:rounded-t-large dark:brightness-75" />
<% } %>
<div class="w-full flex items-center absolute bottom-0 <%= theme.articles.style.title_alignment === "center" ? "justify-center" : "justify-start" %>">
<h1 class="article-title-cover text-center mx-6 my-6 text-second-text-color bg-background-color-transparent px-4 py-3 text-3xl sm:text-4xl md:text-5xl font-semibold backdrop-blur-lg rounded-xl border border-border-color "><%= page.title %></h1>
</div>
<% } else { %>
<div class="w-full flex items-center pt-6 <%= theme.articles.style.title_alignment === "center" ? "justify-center" : "justify-start" %>">
<h1 class="article-title-regular text-second-text-color tracking-tight text-4xl md:text-6xl font-semibold px-2 sm:px-6 md:px-8 py-3"><%= page.title %></h1>
</div>
<% } %>
</div>
<% if (theme.info.author || config.author) { %>
<div class="article-header flex flex-row gap-2 items-center px-2 sm:px-6 md:px-8">
<div class="avatar w-[46px] h-[46px] flex-shrink-0 rounded-medium border border-border-color p-[1px]">
<%- image_tag((typeof page.avatar === "string" && (page.avatar)) || page.author?.avatar || theme.defaults.avatar) %>
</div>
<div class="info flex flex-col justify-between">
<div class="author flex items-center">
<span class="name text-default-text-color text-lg font-semibold"><%= (typeof page.author === "string" && (page.author)) || page.author?.name || theme.info.author || config.author %></span>
<% if (theme.hasOwnProperty('articles') && theme.articles.author_label.enable === true) { %>
<span class="author-label ml-1.5 text-xs px-2 py-0.5 rounded-small text-third-text-color border border-shadow-color-1"><%- getAuthorLabel(site.posts.length, theme.articles.author_label.auto, theme.articles.author_label.list) %></span>
<% } %>
</div>
<div class="meta-info">
<%- partial('pages/post/article-info', {articleObject: page, index: true}) %>
</div>
</div>
</div>
<% } else { %>
<div class="article-header-meta-info px-2 sm:px-6 md:px-8">
<div class="meta-info">
<%- partial('pages/post/article-info', {articleObject: page, index: true}) %>
</div>
</div>
<% } %>
<% if (page?.expires && page?.expires !== "") {%>
<div class="article-expire mt-4 mx-2 sm:mx-6 md:mx-8 note p-4 rounded-lg red icon hidden" id="expiration-container">
<i class="expire-icon fa-solid fa-timer mr-0.5 text-red-600 dark:text-red-400"></i>
<span class="expire-label text-red-600 dark:text-red-400 " id="expiration-date"><%= __('expired', "some") %></span>
</div>
<script data-swup-reload-script>
function updateExpirationDate() {
try {
const expiredDate = new Date("<%= page?.expires %>");
const updatedDate = new Date("<%= page?.updated %>");
const now = new Date();
const expirationValue = document.getElementById("expiration-date");
const expirationContainer = document.getElementById("expiration-container");
let daysAgo = Math.floor((now - updatedDate) / (1000 * 60 * 60 * 24));
if (expiredDate < now) {
expirationContainer.classList.remove("hidden");
// console.log(daysAgo)
expirationValue.innerHTML = expirationValue.innerHTML.replace("some", daysAgo);
}
} catch (e) {}
}
document.addEventListener("DOMContentLoaded", function() {
updateExpirationDate();
});
try {
swup.hooks.on("page:view", updateExpirationDate)
} catch (e) {}
</script>
<% } %>
<div class="article-content markdown-body px-2 sm:px-6 md:px-8 pb-8">
<%- page.content %>
</div>
<% if (theme.articles.copyright.enable || theme.articles.copyright === true) { %>
<div class="post-copyright-info w-full my-8 px-2 sm:px-6 md:px-8">
<%- partial('pages/post/article-copyright') %>
</div>
<% } %>
<% if (page?.tags?.length) { %>
<ul class="post-tags-box text-lg mt-1.5 flex-wrap justify-center flex md:hidden">
<% page.tags.forEach((tag) => { %>
<li class="tag-item mx-0.5">
<a href="<%- url_for(tag.path) %>">#<%= tag.name %></a>&nbsp;
</li>
<% }); %>
</ul>
<% } %>
<%- articleRecommendationGenerator(page) %>
<% if (page?.prev || page?.next) { %>
<div class="article-nav my-8 flex justify-between items-center px-2 sm:px-6 md:px-8">
<% if (page?.prev) { %>
<div class="article-prev border-border-color shadow-redefine-flat shadow-shadow-color-2 rounded-medium px-4 py-2 hover:shadow-redefine-flat-hover hover:shadow-shadow-color-2">
<a class="prev" rel="prev" href="<%= url_for(page.prev.path) %>">
<span class="left arrow-icon flex justify-center items-center">
<i class="fa-solid fa-chevron-left"></i>
</span>
<span class="title flex justify-center items-center">
<span class="post-nav-title-item truncate max-w-48"><%= page.prev.title %></span>
<span class="post-nav-item"><%= __('prev_posts') %></span>
</span>
</a>
</div>
<% } %>
<% if (page?.next) { %>
<div class="article-next border-border-color shadow-redefine-flat shadow-shadow-color-2 rounded-medium px-4 py-2 hover:shadow-redefine-flat-hover hover:shadow-shadow-color-2">
<a class="next" rel="next" href="<%= url_for(page.next.path) %>">
<span class="title flex justify-center items-center">
<span class="post-nav-title-item truncate max-w-48"><%= page.next.title %></span>
<span class="post-nav-item"><%= __('next_posts') %></span>
</span>
<span class="right arrow-icon flex justify-center items-center">
<i class="fa-solid fa-chevron-right"></i>
</span>
</a>
</div>
<% } %>
</div>
<% } %>
<% if (theme.comment.enable === true && theme.comment.hasOwnProperty('system') && page.comment !== false) { %>
<div class="comment-container px-2 sm:px-6 md:px-8 pb-8">
<%- partial('components/comments/comment') %>
</div>
<% } %>
</div>
<% if (is_post() && theme.articles.toc.enable === true) { %>
<div class="toc-content-container">
<%- partial('pages/post/toc') %>
</div>
<% } %>
</div>

View File

@@ -0,0 +1,69 @@
<div class="article-copyright-info-container">
<ul>
<li><strong><%- __('copyright.title') %>:</strong> <%= page.title %></li>
<li><strong><%- __('copyright.author') %>:</strong> <%=(typeof page.author === "string" && (page.author)) || page.author?.name || theme.info.author || config.author %></li>
<li><strong><%- __('copyright.create_time') %>
:</strong> <%= date(page.date, `${config.date_format} ${config.time_format}`) %></li>
<% if (page.updated && page.updated !== page.date) { %>
<li>
<strong><%- __('copyright.update_time') %>
:</strong> <%= date(page.updated, `${config.date_format} ${config.time_format}`) %>
</li>
<% } %>
<li>
<strong><%- __('copyright.link') %>:</strong> <%= getPostUrl((theme.info.url || config.url), page.path) %>
</li>
<li>
<strong>
<%- __('copyright.license_title') %>:
</strong>
<%
const licenseMap = {
'all_rights_reserved': {
label: __('copyright.all_rights_reserved', theme.info.author),
url: null
},
'cc_by': {
label: __('copyright.license_content', '<a class="license" href="https://creativecommons.org/licenses/by/4.0">CC BY 4.0</a>'),
url: 'https://creativecommons.org/licenses/by/4.0'
},
'cc_by_sa': {
label: __('copyright.license_content', '<a class="license" href="https://creativecommons.org/licenses/by-sa/4.0">CC BY-SA 4.0</a>'),
url: 'https://creativecommons.org/licenses/by-sa/4.0'
},
'cc_by_nc': {
label: __('copyright.license_content', '<a class="license" href="https://creativecommons.org/licenses/by-nc/4.0">CC BY-NC 4.0</a>'),
url: 'https://creativecommons.org/licenses/by-nc/4.0'
},
'cc_by_nd': {
label: __('copyright.license_content', '<a class="license" href="https://creativecommons.org/licenses/by-nd/4.0">CC BY-ND 4.0</a>'),
url: 'https://creativecommons.org/licenses/by-nd/4.0'
},
'cc_by_nc_sa': {
label: __('copyright.license_content', '<a class="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0">CC BY-NC-SA 4.0</a>'),
url: 'https://creativecommons.org/licenses/by-nc-sa/4.0'
},
'public_domain': {
label: __('copyright.public_domain'),
url: null
}
};
let licenseType = 'cc_by_nc_sa'; // Default license type
if (page.copyright && page.copyright !== "") {
licenseType = 'custom';
} else if (page.license && licenseMap[page.license]) {
licenseType = page.license;
} else if (theme.articles.copyright.default && licenseMap[theme.articles.copyright.default]) {
licenseType = theme.articles.copyright.default;
}
%>
<% if (licenseType === 'custom') { %>
<%- page.copyright %>
<% } else { %>
<%- licenseMap[licenseType].label %>
<% } %>
</li>
</ul>
</div>

View File

@@ -0,0 +1,78 @@
<div class="article-meta-info">
<span class="article-date article-meta-item">
<i class="fa-regular fa-pen-fancy"></i>&nbsp;
<span class="desktop"><%= date(articleObject.date, is_post() ? `${config.date_format} ${config.time_format}` : `${config.date_format}`).replace(" 00:00:00", "").replace(":00", "") %></span>
<span class="mobile"><%= date(articleObject.date, is_post() ? `${config.date_format} ${config.time_format}` : `${config.date_format}`).replace(" 00:00:00", "").replace(":00", "") %></span>
<span class="hover-info"><%= __("create_time") %></span>
</span>
<% if (articleObject?.updated && articleObject.updated !== articleObject.date) { %>
<span class="article-date article-meta-item">
<i class="fa-regular fa-wrench"></i>&nbsp;
<span class="desktop"><%= date(articleObject.updated, is_post() ? `${config.date_format} ${config.time_format}` : `${config.date_format}`).replace(" 00:00:00", "").replace(":00", "") %></span>
<span class="mobile"><%= date(articleObject.updated, is_post() ? `${config.date_format} ${config.time_format}` : `${config.date_format}`).replace(" 00:00:00", "").replace(":00", "") %></span>
<span class="hover-info"><%= __("update_time") %></span>
</span>
<% } %>
<% if (articleObject?.categories?.length) { %>
<span class="article-categories article-meta-item">
<i class="fa-regular fa-folders"></i>&nbsp;
<ul>
<% let previousParentId = null; %>
<% articleObject.categories.forEach((category, i) => { %>
<% if (previousParentId !== category.parent) { %>
<% if (previousParentId !== null) { %>
<li>></li>
<% } %>
<li>
<a href="<%- url_for(category.path) %>"><%= category.name %></a>&nbsp;
</li>
<% } else { %>
<li>
| <a href="<%- url_for(category.path) %>"><%= category.name %></a>&nbsp;
</li>
<% } %>
<% previousParentId = category.parent; %>
<% }); %>
</ul>
</span>
<% } %>
<% if (articleObject?.tags?.length) { %>
<span class="article-tags article-meta-item">
<i class="fa-regular fa-tags"></i>&nbsp;
<ul>
<% articleObject.tags.forEach((tag, i) => { %>
<li>
<%= i === 0 ? '' : '| ' %><a href="<%- url_for(tag.path) %>"><%= tag.name %></a>&nbsp;
</li>
<% }); %>
</ul>
</span>
<% } %>
<%
let temp_wordcount, temp_min2read = null;
try {
temp_wordcount = wordcount(page.content);
temp_min2read = min2read(page.content);
} catch (e) {
temp_wordcount = 0;
temp_min2read = 0;
}
%>
<% if(is_post() && theme.hasOwnProperty('articles') && theme.articles.word_count.enable && theme.articles.word_count.count && temp_wordcount){ %>
<span class="article-wordcount article-meta-item">
<i class="fa-regular fa-typewriter"></i>&nbsp;<span><%= temp_wordcount %> <%- __('wordcount') %></span>
</span>
<% } %>
<% if(is_post() && theme.hasOwnProperty('articles') && theme.articles.word_count.enable && theme.articles.word_count.min2read && temp_min2read){ %>
<span class="article-min2read article-meta-item">
<i class="fa-regular fa-clock"></i>&nbsp;<span><%= temp_min2read %> <%- __('min2read') %></span>
</span>
<% } %>
<% if (is_post() && theme.global.website_counter.enable && theme.global.website_counter.post_pv) { %>
<span class="article-pv article-meta-item">
<i class="fa-regular fa-eye"></i>&nbsp;<span id="busuanzi_value_page_pv"></span>
</span>
<% } %>
</div>

View File

@@ -0,0 +1,17 @@
<div class="post-tools-container">
<ul class="article-tools-list">
<!-- TOC aside toggle -->
<% if (theme.articles.toc.enable) { %>
<li class="right-bottom-tools page-aside-toggle">
<i class="fa-regular fa-outdent"></i>
</li>
<% } %>
<!-- go comment -->
<% if (theme.comment.enable === true && theme.comment.hasOwnProperty('system') && page.comment !== false) { %>
<li class="go-comment">
<i class="fa-regular fa-comments"></i>
</li>
<% } %>
</ul>
</div>

15
node_modules/hexo-theme-redefine/layout/pages/post/toc.ejs generated vendored Executable file
View File

@@ -0,0 +1,15 @@
<div class="post-toc-wrap">
<div class="post-toc">
<div class="toc-title"><%- __('toc') %></div>
<div class="page-title"><%= page.title %></div>
<%- toc(
page.content,
{
class: 'nav',
list_number: theme.articles.toc.number,
max_depth: theme.articles.toc.max_depth,
}
) %>
</div>
</div>

View File

@@ -0,0 +1,23 @@
<div class="mb-4">
<h1 class="page-title-header"><%= page.title %></h1>
<ul class="flex flex-col mb-4 gap-6">
<%
const timezone = config.timezone || 'Asia/Shanghai';
const newessays = theme.essays.sort((a, b) => moment(b.date).diff(a.date));
%>
<% for (const e of newessays) { %>
<li class="w-full flex flex-row relative">
<div class="w-10 h-10 mr-4 rounded-lg overflow-hidden border border-border-color p-[1px] shrink-0">
<%- image_tag(theme.defaults.avatar, {class: "w-full h-full rounded-[6.2px]"}) %>
</div>
<div class="w-full border-border-color rounded-xl rounded-tl-none shadow-redefine-flat overflow-hidden">
<!-- Pass the raw date here in a data attribute -->
<% rawDate = moment(e.date).utc().format('YYYY-MM-DD HH:mm:ss') %>
<div class="essay-date px-4 py-1.5 text-sm border-b border-border-color bg-zinc-50 dark:bg-zinc-800 text-third-text-color" data-date="<%= moment(rawDate).tz(timezone).format() %>">Loading Date...</div>
<div id="shuoshuo-content" class="px-4 py-2"><%- markdown(e.content) %></div>
</div>
<div class="absolute left-[50.5px] top-3 transform w-2 h-2 border-solid border-t border-l bg-zinc-50 -rotate-45 border-border-color dark:bg-zinc-800"></div>
</li>
<% } %>
</ul>
</div>

View File

@@ -0,0 +1,6 @@
<div class="tag-name">
<i class="fa-solid fa-tag"></i>&nbsp;<%= page.tag %>
</div>
<div class="tag-post-list">
<%- partial('utils/posts-list', {posts: page.posts}) %>
</div>

24
node_modules/hexo-theme-redefine/layout/pages/tag/tags.ejs generated vendored Executable file
View File

@@ -0,0 +1,24 @@
<% if (site.tags.length){ %>
<h1 class="page-title-header">
<%- getPageTitle(page) %>
</h1>
<% if (theme.page_templates.tags_style == 'cloud') { %>
<div class="tagcloud-content">
<%- tagcloud({ min_font: 1, max_font: 5, unit: 'rem', amount: 100 }) %>
</div>
<% } else {%>
<div class="tagcloud-content">
<ul class="tag-list" data-show-value="true">
<% site.tags.forEach(function(tag){ %>
<li>
<a data-weight="<%- tag.posts.length %>" href="<%- url_for("/" + tag.path) %>">
<i class="fa-solid fa-hashtag"></i><%- tag.name %>
</a>
</li>
<% }) %>
</ul>
</div>
<% } %>
<% } %>

1
node_modules/hexo-theme-redefine/layout/post.ejs generated vendored Normal file
View File

@@ -0,0 +1 @@
<%- partial('page') %>

1
node_modules/hexo-theme-redefine/layout/tag.ejs generated vendored Executable file
View File

@@ -0,0 +1 @@
<%- partial('page') %>

1
node_modules/hexo-theme-redefine/layout/tags.ejs generated vendored Executable file
View File

@@ -0,0 +1 @@
<%- partial('page') %>

View File

@@ -0,0 +1,3 @@
<div class="image-viewer-container">
<img src="">
</div>

View File

@@ -0,0 +1,20 @@
<div class="search-pop-overlay">
<div class="popup search-popup">
<div class="search-header">
<span class="search-input-field-pre">
<i class="fa-solid fa-keyboard"></i>
</span>
<div class="search-input-container">
<input autocomplete="off" autocorrect="off" autocapitalize="off" placeholder="<%= __('search') %>" spellcheck="false" type="search" class="search-input">
</div>
<span class="popup-btn-close">
<i class="fa-solid fa-times"></i>
</span>
</div>
<div id="search-result">
<div id="no-result">
<i class="fa-solid fa-spinner fa-spin-pulse fa-5x fa-fw"></i>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,8 @@
<div class="paginator">
<%- paginator({
prev_text: '<i class="fa-regular fa-angle-left"></i>',
next_text: '<i class="fa-regular fa-angle-right"></i>',
escape: false
}) %>
</div>

View File

@@ -0,0 +1,28 @@
<% const postList = createNewArchivePosts(posts) %>
<div class="archive-list-container">
<% postList.forEach(postYear => { %>
<section class="archive-item mb-spacing-unit last:mb-0">
<div class="archive-item-header flex flex-row items-center mb-2">
<span class="archive-year font-semibold text-3xl mr-2"><%= postYear.year %></span>
<span class="archive-year-post-count text-xs md:text-sm font-bold rounded-small bg-third-background-color py-[2px] px-[10px] border border-border-color"><%= postYear.postList.length %></span>
</div>
<% let previousDate = null; %>
<ul class="article-list pl-0 md:pl-8 text-lg leading-[1.5]">
<% postYear.postList.sort((a,b) => (a.date > b.date ? -1 : (a.date < b.date ? 1 : a.title.localeCompare(b.title)))).forEach(post => { %>
<% const currentDate = date(post.date, 'MM-DD'); %>
<% if (previousDate !== currentDate) { %>
<% if (previousDate) { %>
</li>
<% } %> <!-- Close the previous LI if not the first item -->
<li class="article-item space-y-2 px-6 pt-10 pb-2 text-xl relative border-l-2 border-border-color" date-is='<%= currentDate %>'>
<% } %>
<a href="<%- url_for(post.path) %>" class="block w-fit">
<span class="article-title my-0.5 text-2xl"><%= post.title %></span>
</a>
<% previousDate = currentDate; %>
<% }) %>
</li> <!-- Ensure the last item is properly closed -->
</ul>
</section>
<% }) %>
</div>

51
node_modules/hexo-theme-redefine/layout/utils/side-tools.ejs generated vendored Executable file
View File

@@ -0,0 +1,51 @@
<div class="side-tools-container">
<ul class="hidden-tools-list">
<li class="right-bottom-tools tool-font-adjust-plus flex justify-center items-center">
<i class="fa-regular fa-magnifying-glass-plus"></i>
</li>
<li class="right-bottom-tools tool-font-adjust-minus flex justify-center items-center">
<i class="fa-regular fa-magnifying-glass-minus"></i>
</li>
<li class="right-bottom-tools tool-dark-light-toggle flex justify-center items-center">
<i class="fa-regular fa-moon"></i>
</li>
<!-- rss -->
<% if (theme.plugins.feed.enable && config.feed) { %>
<li class="right-bottom-tools rss flex justify-center items-center">
<a class="flex justify-center items-center" href="<%= '/' + config.feed.path %>" target="_blank">
<i class="fa-regular fa-rss"></i>
</a>
</li>
<% } %>
<% if (theme.global.scroll_progress.percentage !== true) { %>
<li class="right-bottom-tools tool-scroll-to-top flex justify-center items-center">
<i class="fa-regular fa-arrow-up"></i>
</li>
<% } %>
<li class="right-bottom-tools tool-scroll-to-bottom flex justify-center items-center">
<i class="fa-regular fa-arrow-down"></i>
</li>
</ul>
<ul class="visible-tools-list">
<li class="right-bottom-tools toggle-tools-list flex justify-center items-center">
<i class="fa-regular fa-cog <% if (theme.global.side_tools && theme.global.side_tools.gear_rotation !== false) { %>fa-spin<% } %>"></i>
</li>
<% if (theme.global.scroll_progress.percentage === true) { %>
<li class="right-bottom-tools tool-scroll-to-top flex justify-center items-center">
<i class="arrow-up fas fa-arrow-up"></i>
<span class="percent"></span>
</li>
<% } %>
<% if (theme.plugins.aplayer.enable && theme.plugins.aplayer.type === "mini") { %>
<li class="right-bottom-tools tool-aplayer flex justify-center items-center">
</li>
<% } %>
</ul>
</div>

46
node_modules/hexo-theme-redefine/package.json generated vendored Normal file
View File

@@ -0,0 +1,46 @@
{
"name": "hexo-theme-redefine",
"version": "2.8.4",
"private": false,
"description": "Redefine your writing with Hexo Theme Redefine.",
"scripts": {
"npm:publish": "npm run build && npm publish",
"build": "npm run build:css && npm run build:js",
"build:css": "npx @tailwindcss/cli -i source/css/tailwind.source.css -o source/css/build/tailwind.css --minify",
"build:js": "node source/js/build.js",
"watch:css": "npx @tailwindcss/cli -i source/css/tailwind.source.css -o source/css/build/tailwind.css --watch --minify",
"prepare": "husky",
"release": "standard-version",
"release:minor": "standard-version --release-as minor",
"release:patch": "standard-version --release-as patch",
"release:major": "standard-version --release-as major"
},
"repository": {
"type": "git",
"url": "git+https://github.com/EvanNotFound/hexo-theme-redefine.git"
},
"keywords": [
"hexo",
"theme",
"redefine",
"simple",
"pure",
"powerful",
"hexo-theme"
],
"author": "EvanNotFound",
"license": "GPL-3.0",
"bugs": {
"url": "https://github.com/EvanNotFound/hexo-theme-redefine/issues"
},
"homepage": "https://redefine.ohevan.com",
"devDependencies": {
"eslint": "^8.47.0",
"glob-promise": "^6.0.7",
"husky": "^9.1.6",
"postcss": "^8.4.47",
"standard-version": "^9.5.0",
"tailwindcss": "^4.1.11",
"terser": "^5.36.0"
}
}

66
node_modules/hexo-theme-redefine/scripts/config-export.js generated vendored Executable file
View File

@@ -0,0 +1,66 @@
/* main hexo */
"use strict";
const url = require("url");
const fs = require("fs");
const path = require("path");
const yaml = require("js-yaml");
const { version } = require("../package.json");
/**
* Export theme config to js
*/
hexo.extend.helper.register("export_config", function () {
let hexo_config = {
hostname: new URL(this.config.url).hostname || this.config.url,
root: this.config.root,
language: this.config.language,
};
if (this.config.search) {
hexo_config.path = this.config.search.path;
}
let theme_config = {
articles: this.theme.articles,
colors: this.theme.colors,
global: this.theme.global,
home_banner: this.theme.home_banner,
plugins: this.theme.plugins,
version: version,
code_block: this.theme.code_block,
navbar: this.theme.navbar,
page_templates: this.theme.page_templates,
home: this.theme.home,
footerStart: this.theme.footer.start,
};
const languageDir = path.join(__dirname, "../languages");
let file = fs
.readdirSync(languageDir)
.find((v) => v === `${this.config.language}.yml`);
file = languageDir + "/" + (file ? file : "en.yml");
let languageContent = fs.readFileSync(file, "utf8");
try {
languageContent = yaml.load(languageContent);
} catch (e) {
console.log(e);
}
let data_config = {
masonry: false,
};
if (this.theme.masonry) {
data_config.masonry = true;
}
return `<script id="hexo-configurations">
window.config = ${JSON.stringify(hexo_config)};
window.theme = ${JSON.stringify(theme_config)};
window.lang_ago = ${JSON.stringify(languageContent["ago"])};
window.data = ${JSON.stringify(data_config)};
</script>`;
});

37
node_modules/hexo-theme-redefine/scripts/data-handle.js generated vendored Executable file
View File

@@ -0,0 +1,37 @@
hexo.on('generateBefore', function () {
if (hexo.locals.get) {
const data = hexo.locals.get('data');
if (data) {
// theme config file handle
if (data._config) {
hexo.theme.config = data._config;
} else if (data.redefine) {
hexo.theme.config = data.redefine;
} else if (data._redefine) {
hexo.theme.config = data._redefine;
}
// friends link file handle
if (data.links || data.link) {
hexo.theme.config.links = (data.links || data.link);
}
if (data.essays || data.essay || data.shuoshuo) {
hexo.theme.config.essays = (data.essays || data.essay || data.shuoshuo);
}
if (data.masonry || data.gallery || data.photos) {
hexo.theme.config.masonry = (data.masonry || data.gallery || data.photos);
}
if (data.bookmarks || data.tools) {
hexo.theme.config.bookmarks = data.bookmarks || data.tools;
}
}
}
});

16
node_modules/hexo-theme-redefine/scripts/events/404.js generated vendored Executable file
View File

@@ -0,0 +1,16 @@
/**
* Theme Redefine
* 404 error page
*/
hexo.extend.generator.register('404', function (locals) {
return {
path: '404.html',
layout: '404',
data: {
title: 'Page Not Found',
type: 'notfound',
page: locals.pages.findOne({ path: '404.html' })
}
}
});

View File

@@ -0,0 +1,139 @@
/**
* Theme Redefine
* welcome.js
*/
const { version } = require("../../package.json");
const https = require("https");
hexo.on("ready", async () => {
const timeout = 3000;
async function fetchRedefineInfo() {
return new Promise((resolve, reject) => {
https
.get(
`https://redefine-version.ohevan.com/api/v2/info`,
{ timeout: timeout },
(response) => {
if (response.statusCode < 200 || response.statusCode > 299) {
logFailedInfo();
return reject(
new Error(
`Failed to load page, status code: ${response.statusCode}`,
),
);
}
let data = "";
response.on("data", (chunk) => {
data += chunk;
});
response.on("end", () => {
try {
const jsonData = JSON.parse(data);
if (jsonData.status !== "success") {
logFailedInfo();
return reject(
new Error(`Failed to fetch data: ${jsonData.message}`),
);
}
const redefineData = jsonData.data;
logInfo(redefineData);
checkVersionAndCDNAvailability(redefineData);
resolve();
} catch (error) {
logFailedInfo();
reject(new Error(`JSON parse failed: ${error.message}`));
}
});
},
)
.on("error", (error) => {
reject(error);
});
});
}
try {
await fetchRedefineInfo();
} catch (error) {
hexo.log.warn(`Check latest version failed: ${error}`);
hexo.locals.set(`cdnTestStatus_cdnjs`, 404);
hexo.locals.set(`cdnTestStatus_zstatic`, 404);
hexo.locals.set(`cdnTestStatus_npmMirror`, 404);
}
});
function logInfo(data) {
hexo.log.info(
`
+======================================================================================+
| |
| _____ _ _ _____ __ __ _____ ____ _____ ____ _____ _____ ___ _ _ _____ |
| |_ _| | | | ____| \\/ | ____| | _ \\| ____| _ \\| ____| ___|_ _| \\ | | ____| |
| | | | |_| | _| | |\\/| | _| | |_) | _| | | | | _| | |_ | || \\| | _| |
| | | | _ | |___| | | | |___ | _ <| |___| |_| | |___| _| | || |\\ | |___ |
| |_| |_| |_|_____|_| |_|_____| |_| \\_\\_____|____/|_____|_| |___|_| \\_|_____| |
| |
| current v${version} latest v${data.npmVersion} |
| https://github.com/EvanNotFound/hexo-theme-redefine |
+======================================================================================+
`,
);
}
function logFailedInfo() {
hexo.log.info(
`
+======================================================================================+
| |
| _____ _ _ _____ __ __ _____ ____ _____ ____ _____ _____ ___ _ _ _____ |
| |_ _| | | | ____| \\/ | ____| | _ \\| ____| _ \\| ____| ___|_ _| \\ | | ____| |
| | | | |_| | _| | |\\/| | _| | |_) | _| | | | | _| | |_ | || \\| | _| |
| | | | _ | |___| | | | |___ | _ <| |___| |_| | |___| _| | || |\\ | |___ |
| |_| |_| |_|_____|_| |_|_____| |_| \\_\\_____|____/|_____|_| |___|_| \\_|_____| |
| |
| current v${version} fetch latest failed |
| https://github.com/EvanNotFound/hexo-theme-redefine |
+======================================================================================+
`,
);
}
function checkVersionAndCDNAvailability(data) {
if (data.npmVersion > version) {
hexo.log.warn(
`\x1b[33m%s\x1b[0m`,
`Redefine v${version} is outdated, please update to v${data.npmVersion}!`,
);
}
if (data.npmMirrorCDN) {
hexo.log.info(
`\x1b[32m%s\x1b[0m`,
`CDN available: NPMMirror (Recommended)`,
);
hexo.locals.set(`cdnTestStatus_npmMirror`, 200);
} else {
hexo.log.warn(`\x1b[31m%s\x1b[0m`, `NPMMirror CDN is unavailable yet.`);
hexo.locals.set(`cdnTestStatus_npmMirror`, 404);
}
if (data.zstaticCDN) {
hexo.log.info(`\x1b[32m%s\x1b[0m`, `CDN available: ZStatic`);
hexo.locals.set(`cdnTestStatus_zstatic`, 200);
} else {
hexo.log.warn(`\x1b[31m%s\x1b[0m`, `ZStatic CDN is unavailable yet.`);
hexo.locals.set(`cdnTestStatus_zstatic`, 404);
}
if (data.cdnjsCDN) {
hexo.log.info(`\x1b[32m%s\x1b[0m`, `CDN available: CDNJS`);
hexo.locals.set(`cdnTestStatus_cdnjs`, 200);
} else {
hexo.log.warn(`\x1b[31m%s\x1b[0m`, `CDNJS CDN is unavailable yet.`);
hexo.locals.set(`cdnTestStatus_cdnjs`, 404);
}
}

View File

@@ -0,0 +1,27 @@
/* delete mask */
"use strict";
hexo.extend.filter.register(
"after_post_render",
function (data) {
const theme = this.theme;
// 处理del标签的代码
const regPureDelTag = /<del(?:\s+[^>]*)?>((?:(?!<\/?del[\s>])[^])*)<\/del>/g;
data.content = data.content.replace(
regPureDelTag,
function (match, html) {
// 只有在配置为true时才添加mask类
if (theme.config.articles.style.delete_mask === true) {
return `<del class="mask">${html}</del>`;
}
return match;
}
);
return data;
},
0
);

202
node_modules/hexo-theme-redefine/scripts/filters/encrypt.js generated vendored Executable file
View File

@@ -0,0 +1,202 @@
/* main hexo, __dirname */
"use strict";
const crypto = require("crypto");
const fs = require("fs");
const path = require("path");
const log = hexo.log;
const { hbeTheme } = require("./lib/hbe.default.js");
const defaultConfig = {
abstract:
"Here's something encrypted, password is required to continue reading.",
message: "Hey, password is required here.",
theme: "default",
wrong_pass_message:
"Oh, this is an invalid password. Check and try again, please.",
wrong_hash_message:
"OOPS, these decrypted content may changed, but you can still have a look.",
silent: false,
};
const keySalt = textToArray("too young too simple");
const ivSalt = textToArray("sometimes naive!");
// As we can't detect the wrong password with AES-CBC,
// so adding an empty tag and check it when decrption.
const knownPrefix = "<hbe-prefix></hbe-prefix>";
// disable log
var silent = false;
// use default theme
var theme = "default";
hexo.extend.filter.register(
"after_post_render",
(data) => {
const tagEncryptPairs = [];
let password = data.password;
let tagUsed = false;
// use a empty password to disable category encryption
if (password === "") {
return data;
}
if (hexo.config.encrypt === undefined) {
hexo.config.encrypt = [];
}
if ("encrypt" in hexo.config && "tags" in hexo.config.encrypt) {
hexo.config.encrypt.tags.forEach((tagObj) => {
tagEncryptPairs[tagObj.name] = tagObj.password;
});
}
if (data.tags) {
data.tags.forEach((cTag) => {
if (tagEncryptPairs.hasOwnProperty(cTag.name)) {
tagUsed = password ? tagUsed : cTag.name;
password = password || tagEncryptPairs[cTag.name];
}
});
}
if (password == undefined) {
return data;
}
password = password.toString();
// make sure toc can work.
data.origin = data.content;
// Let's rock n roll
const config = Object.assign(defaultConfig, hexo.config.encrypt, data);
silent = config.silent;
theme = config.theme.trim().toLowerCase();
// deprecate the template keyword
if (config.template) {
dlog(
"warn",
'Looks like you use a deprecated property "template" to set up template, consider to use "theme"? See https://github.com/D0n9X1n/hexo-blog-encrypt#encrypt-theme',
);
}
// read theme from file
let template = hbeTheme;
if (tagUsed === false) {
dlog(
"info",
`hexo-blog-encrypt: encrypting "${data.title.trim()}" based on the password configured in Front-matter with theme: ${theme}.`,
);
} else {
dlog(
"info",
`hexo-blog-encrypt: encrypting "${data.title.trim()}" based on Tag: "${tagUsed}" with theme ${theme}.`,
);
}
data.content = knownPrefix + data.content.trim();
data.encrypt = true;
const key = crypto.pbkdf2Sync(password, keySalt, 1024, 32, "sha256");
const iv = crypto.pbkdf2Sync(password, ivSalt, 512, 16, "sha256");
const cipher = crypto.createCipheriv("aes-256-cbc", key, iv);
const hmac = crypto.createHmac("sha256", key);
let encryptedData = cipher.update(data.content, "utf8", "hex");
hmac.update(data.content, "utf8");
encryptedData += cipher.final("hex");
const hmacDigest = hmac.digest("hex");
data.content = template
.replace(/{{hbeEncryptedData}}/g, encryptedData)
.replace(/{{hbeHmacDigest}}/g, hmacDigest)
.replace(/{{hbeWrongPassMessage}}/g, config.wrong_pass_message)
.replace(/{{hbeWrongHashMessage}}/g, config.wrong_hash_message)
.replace(/{{hbeMessage}}/g, config.message);
data.content += `<link href="${hexo.config.root}css/hbe.style.css" rel="stylesheet" type="text/css"><script data-swup-reload-script type="module" src="${hexo.config.root}js/plugins/hbe.js"></script>
<script data-swup-reload-script type="module">
import {initHBE} from "${hexo.config.root}js/plugins/hbe.js";
console.log("hexo-blog-encrypt: loaded.");
initHBE();
</script>
`;
data.excerpt = data.more = config.abstract;
return data;
},
1000,
);
hexo.extend.generator.register("hexo-blog-encrypt", () => [
{
data: () =>
fs.createReadStream(
path.resolve(__dirname, `../../source/assets/hbe.style.css`),
),
path: `css/hbe.style.css`,
},
{
data: () =>
fs.createReadStream(
path.resolve(__dirname, "../../source/js/plugins/hbe.js"),
),
path: "js/plugins/hbe.js",
},
]);
// log function
function dlog(level, x) {
switch (level) {
case "warn":
log.warn(x);
break;
case "info":
default:
if (silent) {
return;
}
log.info(x);
}
}
// Utils functions
function textToArray(s) {
var i = s.length;
var n = 0;
var ba = new Array();
for (var j = 0; j < i; ) {
var c = s.codePointAt(j);
if (c < 128) {
ba[n++] = c;
j++;
} else if (c > 127 && c < 2048) {
ba[n++] = (c >> 6) | 192;
ba[n++] = (c & 63) | 128;
j++;
} else if (c > 2047 && c < 65536) {
ba[n++] = (c >> 12) | 224;
ba[n++] = ((c >> 6) & 63) | 128;
ba[n++] = (c & 63) | 128;
j++;
} else {
ba[n++] = (c >> 18) | 240;
ba[n++] = ((c >> 12) & 63) | 128;
ba[n++] = ((c >> 6) & 63) | 128;
ba[n++] = (c & 63) | 128;
j += 2;
}
}
return new Uint8Array(ba);
}

View File

@@ -0,0 +1,9 @@
hexo.extend.filter.register('after_post_render', function(data) {
if (this.theme.config.articles.style.image_caption !== false) {
const class_name='image-caption';
if (data.layout === 'post' || data.layout === 'page' || data.layout === 'about') {
data.content = data.content.replace(/(<img [^>]*alt="([^"]+)"[^>]*>)/g, `<figure class="${class_name}">$1<figcaption>$2</figcaption></figure>`);
}
}
return data;
});

View File

@@ -0,0 +1,24 @@
'use strict'
hexo.extend.filter.register(
'after_post_render',
function (data) {
const theme = hexo.theme.config;
if (!theme.articles.lazyload || !theme.articles.lazyload) return;
data.content = data.content.replace(
// Match 'img' tags width the src attribute.
/<img([^>]*)src="([^"]*)"([^>\/]*)\/?\s*>/gim,
function (match, attrBegin, src, attrEnd) {
// Exit if the src doesn't exists.
if (!src) return match;
return `<img ${attrBegin}
lazyload
src="/images/loading.svg"
data-src="${src}"
${attrEnd}
>`
}
)
},
1
);

View File

@@ -0,0 +1,15 @@
const hbeTheme = `
<div class="hbe hbe-container" id="hexo-blog-encrypt" data-wpm="{{hbeWrongPassMessage}}" data-whm="{{hbeWrongHashMessage}}">
<script id="hbeData" type="hbeData" data-hmacdigest="{{hbeHmacDigest}}">{{hbeEncryptedData}}</script>
<div class="hbe hbe-content">
<div class="hbe hbe-input hbe-input-default">
<input class="hbe hbe-input-field hbe-input-field-default" type="password" id="hbePass">
<label class="hbe hbe-input-label hbe-input-label-default" for="hbePass">
<span class="hbe hbe-input-label-content hbe-input-label-content-default">{{hbeMessage}}</span>
</label>
</div>
</div>
</div>
`;
module.exports = { hbeTheme };

View File

@@ -0,0 +1,42 @@
/* main hexo */
"use strict";
hexo.extend.filter.register(
"after_post_render",
function (data) {
const theme = this.theme;
const config = this.config;
const url = new URL(config.url);
const siteHost = url.hostname || config.url;
// Match 'a' tags that don't contain html children.
const regPureATag = /<a([^>]*)href="([^"]*)"([^>]*)>([^<]*)<\/a>/gim;
data.content = data.content.replace(
regPureATag,
function (match, attrBegin, href, attrEnd, html) {
// Exit if the href attribute doesn't exists.
if (!href) return match;
let link = "";
try {
link = new URL(href);
} catch (e) {
// Invalid url, e.g. Anchor link.
return match;
}
// Exit if the url has same host with `config.url`, which means isn't an external link.
if (!link.protocol || link.hostname === siteHost) return match;
if (theme.config.articles.style.link_icon == false) {
return `<a class="link" ${attrBegin} href="${href}" ${attrEnd}>${html}</a>`;
} else {
return `<a class="link" ${attrBegin} href="${href}" ${attrEnd}>${html}<i class="fa-solid fa-arrow-up-right ml-[0.2em] font-light align-text-top text-[0.7em] link-icon"></i></a>`;
}
},
);
},
0,
);

View File

@@ -0,0 +1,9 @@
hexo.extend.filter.register('stylus:renderer', function (style) {
style.define('url-for', function (data) {
const urlRender = hexo.extend.helper.get('url_for').bind(hexo);
const url = urlRender(data.val);
return url;
});
})

View File

@@ -0,0 +1,11 @@
/*
'use strict';
hexo.extend.filter.register('after_post_render', function(data) {
const tableRegex = /<table(?![\s\S]*?class=["'].*?\bgutter\b.*?["'])[\s\S]*?<\/table>/g;
const wrappedTable = match => `<div class="table-container">${match}</div>`;
data.content = data.content.replace(tableRegex, wrappedTable);
return data;
});
*/

View File

@@ -0,0 +1,38 @@
hexo.extend.helper.register('generateMeta', function (theme, page) {
const hexo = this;
let robots_content="";
if (page.robots) {
robots_content = page.robots
} else if (theme.seo && theme.seo.robots) {
if (hexo.is_home()) {
if (page.prev == 0) {
robots_content=theme.seo.robots.home_first_page
}else{
robots_content=theme.seo.robots.home_other_pages
}
} else if (hexo.is_archive()) {
robots_content=theme.seo.robots.archive
} else if (hexo.is_category()) {
robots_content=theme.seo.robots.category
} else if (hexo.is_tag()) {
robots_content=theme.seo.robots.tag
}
}
if(robots_content){
return `<meta name="robots" content="${robots_content}">`
}
});
/**
* hexo-auto-canonical
* https://github.com/hyunseob/hexo-auto-canonical.git
* Copyright (c) 2015, HyunSeob
* Licensed under the MIT license.
*/
hexo.extend.helper.register('autoCanonical', function (config, page) {
var base_url = config.url;
if (config.url.charAt(config.url.length - 1) !== '/') base_url += '/';
return '<link rel="canonical" href="' + base_url + page.canonical_path.replace('index.html', '').toLowerCase() + '"/>';
});

View File

@@ -0,0 +1,153 @@
/*
pageData is an object that defines various page types and their associated rendering details.
Each page type includes the following properties:
- titles: An array of possible titles for the page, which are used to identify the page type.
- types: An array of page types that can be matched; the type takes precedence over the title for identification.
- partial: The path to the partial template that will be used to render the content of the page.
- layout: Specifies the layout style for the page. "raw" indicates that no theme layout will be applied, while "default" means the standard theme layout (container) will be used.
*/
const pageData = {
home: {
titles: ["home", "首页"],
types: ["home"],
partial: "pages/home/home-content",
layout: "raw",
},
archive: {
titles: ["archive", "归档"],
types: ["archive", "archives"],
partial: "pages/archive/archive",
layout: "raw",
},
post: {
titles: ["post", "文章"],
types: ["post", "posts"],
partial: "pages/post/article-content",
layout: "raw",
},
categories: {
titles: ["category", "categories"],
types: ["category", "categories"],
partial: "pages/category/categories",
layout: "default",
},
categoryDetail: {
titles: [],
types: [],
partial: "pages/category/category-detail",
layout: "default",
},
tags: {
titles: ["tag", "tags"],
types: ["tag", "tags"],
partial: "pages/tag/tags",
layout: "default",
},
tagDetail: {
titles: [],
types: [],
partial: "pages/tag/tag-detail",
layout: "default",
},
notFound: {
titles: ["404", "notfound"],
types: ["404", "notfound"],
partial: "pages/notfound/notfound",
layout: "raw",
},
friends: {
titles: ["friends", "links", "link", "friend", "友情链接"],
types: ["links", "link"],
partial: "pages/friends/friends-link",
layout: "default",
},
shuoshuo: {
titles: ["shuoshuo", "说说"],
types: ["essays", "essay", "shuoshuo"],
partial: "pages/shuoshuo/essays",
layout: "default",
},
masonry: {
titles: ["gallery", "瀑布流", "相册", "photos", "photo"],
types: ["masonry", "gallery", "瀑布流", "相册", "photos", "photo"],
partial: "pages/masonry/masonry",
layout: "default",
},
bookmarks: {
titles: [],
types: ["bookmarks", "bookmark", "tools"],
partial: "pages/bookmarks/bookmarks",
layout: "raw",
},
pageTemplate: {
titles: [],
types: [],
partial: "pages/page-template",
layout: "default",
},
};
hexo.extend.helper.register("getAllPageData", function () {
return pageData;
});
hexo.extend.helper.register("getPageData", function (page) {
if (this.is_home()) return pageData.home;
if (this.is_archive()) return pageData.archive;
if (this.is_post()) return pageData.post;
if (this.is_category()) return pageData.categoryDetail;
if (this.is_tag()) return pageData.tagDetail;
const currentPageConfig = Object.entries(pageData).find(([type, config]) => {
return config.types.includes(page.template || page.type) || config.titles.includes(page.title?.toLowerCase());
});
return currentPageConfig ? pageData[currentPageConfig[0]] : null;
});
hexo.extend.helper.register("getPagePartialPath", function (page) {
const matchesPageType = (type) => {
const config = pageData[type];
return (
config.types.includes(page.template || page.type) ||
config.titles.includes(page.title?.toLowerCase())
);
};
// Check built-in page types first
if (this.is_home()) return pageData.home.partial;
if (this.is_post()) return pageData.post.partial;
// Check custom page types
for (const [type, config] of Object.entries(pageData)) {
if (matchesPageType(type) && config.layout === "raw") {
return config.partial;
} else if (this.is_archive() && pageData.archive.layout === "raw") { // return raw layout for archive page
return pageData.archive.partial;
} else if (this.is_category() && pageData.categoryDetail.layout === "raw") { // return raw layout for category page
return pageData.categoryDetail.partial;
} else if (this.is_tag() && pageData.tagDetail.layout === "raw") { // return raw layout for tag page
return pageData.tagDetail.partial;
}
}
return pageData.pageTemplate.partial;
});
hexo.extend.helper.register("getPageTitle", function (page) {
const pageData = this.getPageData(page);
let type = null;
// Determine the type based on page properties
if (this.is_home()) type = "home";
else if (this.is_archive()) type = "archive";
else if (this.is_post()) type = "post";
else {
type = pageData.type;
}
// const config = type ? pageData[type] : null;
return page.title || this.__(type) || "Untitled";
});

View File

@@ -0,0 +1,367 @@
/*
* Optimized by: EvanNotFound
*/
const articleLibrary = [];
const corpus = [];
let flag = null;
hexo.extend.filter.register("template_locals", function (localVariables) {
const cfg = hexo.theme.config.articles.recommendation;
if (!cfg.enable) {
return localVariables;
}
if (!flag) {
flag = 1;
fetchData(localVariables.site.posts, cfg);
fetchData(localVariables.site.pages, cfg);
articleRecommendation(cfg);
}
return localVariables;
});
function fetchData(s, cfg) {
s.each(function (p) {
if (["post", "docs"].includes(p.layout)) {
articleLibrary.push({
path: p.path,
title: p.title || p.seo_title || p.short_title,
headimg: p.thumbnail || p.banner || p.cover || cfg.placeholder,
});
corpus.push(tokenize(p.raw));
}
});
}
function cleanData(data) {
const symbolLists = [
",",
".",
"?",
"!",
":",
";",
"、",
"……",
"~",
"&",
"@",
"#",
"",
"。",
"",
"",
"",
"",
"·",
"…",
"",
"",
"",
"",
"“",
"”",
"",
"",
"〝",
"〞",
'"',
"'",
"",
"",
"´",
"",
"(",
")",
"【",
"】",
"《",
"》",
"",
"",
"﹝",
"﹞",
"<",
">",
"(",
")",
"[",
"]",
"«",
"»",
"",
"",
"",
"",
"〈",
"〉",
"{",
"}",
"",
"",
"「",
"」",
"",
"",
"〖",
"〗",
"『",
"』",
"︵",
"︷",
"︹",
"︿",
"︽",
"﹁",
"﹃",
"︻",
"︗",
"/",
"|",
"\\",
"︶",
"︸",
"︺",
"﹀",
"︾",
"﹂",
"﹄",
"﹄",
"︼",
"︘",
"",
"",
"",
"_",
"¯",
"_",
" ̄",
"",
"﹋",
"",
"﹉",
"",
"﹊",
"`",
"ˋ",
"¦",
"︴",
"¡",
"¿",
"^",
"ˇ",
"­",
"¨",
"ˊ",
" ",
" ",
"%",
"*",
"-",
"+",
"=",
"¥",
"$",
"",
"",
];
data = data.replace(/\s/g, " ");
data = data.replace(/\!\[(.*?)\]\(.*?\)/g, (_a, b) => {
return b;
});
data = data.replace(
/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?/g,
" ",
);
for (const symbol of symbolLists) {
data = data.replace(new RegExp("\\" + symbol, "g"), " ");
}
data = data.replace(/\d+/g, " ");
data = data.replace(/\s/g, " ");
return data;
}
function tokenize(data) {
const jieba = require("nodejieba");
return jieba
.cut(cleanData(data), true)
.filter((word) => word !== " " && !/^[0-9]*$/.test(word));
}
function cosineSimilarity(vector1, vector2) {
let numerator = 0;
let sqrt1 = 0;
let sqrt2 = 0;
if (vector1.length == vector2.length) {
for (let i = 0; i < vector1.length; i++) {
numerator += vector1[i] * vector2[i];
sqrt1 += vector1[i] * vector1[i];
sqrt2 += vector2[i] * vector2[i];
}
return numerator / (Math.sqrt(sqrt1) * Math.sqrt(sqrt2));
}
}
function createWordLibrary(allWords) {
const wordLibrary = {};
allWords.forEach((word) => {
wordLibrary[word] = 0;
});
return wordLibrary;
}
function calculateWordFrequency(wordLibrary, wordsInArticle) {
const wordOccurrenceLibrary = wordsInArticle.reduce(
(wordCountObj, wordName) => {
if (wordName in wordCountObj) {
wordCountObj[wordName]++;
}
return wordCountObj;
},
JSON.parse(JSON.stringify(wordLibrary)),
);
const wordFrequency = JSON.parse(JSON.stringify(wordLibrary));
for (const word of Object.keys(wordLibrary)) {
wordFrequency[word] = wordOccurrenceLibrary[word] / wordsInArticle.length;
}
return wordFrequency;
}
function articleRecommendation(cfg) {
const dataSet = {};
const similaritySet = {};
const recommendationSet = {};
let allWordsInAllArticles = [];
for (const wordList of corpus) {
allWordsInAllArticles = [
...new Set(allWordsInAllArticles.concat(wordList)),
];
}
const wordLibrary = createWordLibrary(allWordsInAllArticles);
const documentCountLibrary = JSON.parse(JSON.stringify(wordLibrary));
for (let i = 0; i < corpus.length; i++) {
const articlePath = articleLibrary[i].path;
const wordsInArticle = corpus[i];
const wordFrequency = calculateWordFrequency(wordLibrary, wordsInArticle);
dataSet[articlePath] = { wordFrequency };
for (const word of Object.keys(wordLibrary)) {
if (wordFrequency[word]) {
documentCountLibrary[word]++;
}
}
}
for (let i = 0; i < corpus.length; i++) {
const articlePath = articleLibrary[i].path;
dataSet[articlePath]["inverseDocumentFrequency"] = JSON.parse(
JSON.stringify(wordLibrary),
);
dataSet[articlePath]["wordFrequency-inverseDocumentFrequency"] = JSON.parse(
JSON.stringify(wordLibrary),
);
dataSet[articlePath]["wordFrequencyVector"] = [];
for (const word of Object.keys(wordLibrary)) {
const inverseDocumentFrequency = Math.log(
corpus.length / (documentCountLibrary[word] + 1),
);
const wordFrequencyInverseDocumentFrequency =
dataSet[articlePath]["wordFrequency"][word] * inverseDocumentFrequency;
dataSet[articlePath]["wordFrequencyVector"].push(
wordFrequencyInverseDocumentFrequency,
);
}
}
for (let i = 0; i < corpus.length; i++) {
const articlePath1 = articleLibrary[i].path;
similaritySet[articlePath1] = {};
for (let j = 0; j < corpus.length; j++) {
const articlePath2 = articleLibrary[j].path;
similaritySet[articlePath1][articlePath2] = cosineSimilarity(
dataSet[articlePath1]["wordFrequencyVector"],
dataSet[articlePath2]["wordFrequencyVector"],
);
}
for (let j = 0; j < corpus.length; j++) {
recommendationSet[articlePath1] = Object.keys(
similaritySet[articlePath1],
).sort(function (a, b) {
return similaritySet[articlePath1][b] - similaritySet[articlePath1][a]; // Descending order
});
}
const index = recommendationSet[articlePath1].indexOf(articlePath1);
if (index > -1) {
recommendationSet[articlePath1].splice(index, 1);
}
recommendationSet[articlePath1] = recommendationSet[articlePath1].slice(
0,
cfg.limit,
);
for (let j = 0; j < recommendationSet[articlePath1].length; j++) {
const e = recommendationSet[articlePath1][j];
recommendationSet[articlePath1][j] = articleLibrary.filter(
(w) => w.path == e,
)[0];
}
}
hexo.locals.set("recommendationSet", function () {
return recommendationSet;
});
}
hexo.extend.helper.register("articleRecommendationGenerator", function (post) {
if (!post) return "";
const cfg = hexo.theme.config.articles.recommendation;
if (!cfg.enable) {
return "";
}
for (const dir of cfg.skip_dirs) {
if (new RegExp("^" + dir, "g").test(post.path)) {
return "";
}
}
const recommendationSet = hexo.locals.get("recommendationSet");
const recommendedArticles = recommendationSet[post.path];
return userInterface(recommendedArticles, cfg);
});
function userInterface(recommendedArticles, cfg) {
let html = "";
let htmlMobile = "";
for (const item of recommendedArticles) {
html += itemInterface(item);
}
for (const itemMobile of recommendedArticles.slice(0, cfg.mobile_limit)) {
htmlMobile += itemInterface(itemMobile);
}
return `
<div class="recommended-article px-2 sm:px-6 md:px-8">
<div class="recommended-desktop">
<div class="recommended-article-header text-xl md:text-3xl font-bold mt-10">
<i aria-hidden="true"></i><span>${cfg.title}</span>
</div>
<div class="recommended-article-group">${html}</div>
</div>
<div class="recommended-mobile">
<div class="recommended-article-header text-xl md:text-3xl font-bold mt-10">
<i aria-hidden="true"></i><span>${cfg.title}</span>
</div>
<div class="recommended-article-group">${htmlMobile}</div>
</div>
</div>`;
}
function itemInterface(item) {
return `<a class="recommended-article-item" href="${
hexo.config.root + item.path
}" title="${item.title}" rel="bookmark">
<img src="${item.headimg}" alt="${item.title}" class="!max-w-none">
<span class="title">${item.title}</span>
</a>`;
}

View File

@@ -0,0 +1,251 @@
/* main hexo */
"use strict";
const url = require("url");
const { version } = require("../../package.json");
const themeVersion = version;
hexo.extend.helper.register("isHomePagePagination", function (pagePath, route) {
if (pagePath.length > 5 && route === "/") {
return pagePath.slice(0, 5) === "page/";
}
return false;
});
/* code block language display */
hexo.extend.filter.register("after_post_render", function (data) {
// Only process if not already processed
if (data._processedHighlight) return data;
// Updated pattern to include numbers and other special characters
const pattern = /<figure class="highlight ([^"]+)">([\s\S]*?)<\/figure>/g;
data.content = data.content.replace(pattern, function (match, p1, p2) {
// If already has code-container anywhere in the match, return unchanged
if (match.includes('code-container')) {
return match;
}
let language = p1 || "code";
if (language === "plain") {
language = "code";
}
return '<div class="code-container" data-rel="' +
language.charAt(0).toUpperCase() +
language.slice(1) +
'">' +
match.replace(
'<figure class="highlight ',
'<figure class="iseeu highlight '
) +
"</div>";
});
// Mark as processed
data._processedHighlight = true;
return data;
});
hexo.extend.helper.register("createNewArchivePosts", function (posts) {
const postList = [],
postYearList = [];
posts.forEach((post) => postYearList.push(post.date.year()));
Array.from(new Set(postYearList)).forEach((year) => {
postList.push({
year: year,
postList: [],
});
});
postList.sort((a, b) => b.year - a.year);
postList.forEach((item) => {
posts.forEach(
(post) => item.year === post.date.year() && item.postList.push(post),
);
});
postList.forEach((item) =>
item.postList.sort((a, b) => b.date.unix() - a.date.unix()),
);
return postList;
});
hexo.extend.helper.register(
"getAuthorLabel",
function (postCount, isAuto, labelList) {
let level = Math.floor(Math.log2(postCount));
level = level < 2 ? 1 : level - 1;
if (isAuto === false && Array.isArray(labelList) && labelList.length > 0) {
return level > labelList.length
? labelList[labelList.length - 1]
: labelList[level - 1];
} else {
return `Lv${level}`;
}
},
);
hexo.extend.helper.register("getPostUrl", function (rootUrl, path) {
if (rootUrl) {
let { href } = new URL(rootUrl);
if (href.substring(href.length - 1) !== "/") {
href = href + "/";
}
return href + path;
} else {
return path;
}
});
hexo.extend.helper.register("renderJS", function (path, options = {}) {
const _js = hexo.extend.helper.get("js").bind(hexo);
const { module = false, async = false, swupReload = false } = options;
if (Array.isArray(path)) {
path = path.map((p) => "js/build/" + p);
} else {
path = "js/build/" + path;
}
const cdnProviders = {
zstatic:
"https://s4.zstatic.net/ajax/libs/hexo-theme-redefine/:version/:path",
cdnjs:
"https://cdnjs.cloudflare.com/ajax/libs/hexo-theme-redefine/:version/:path",
unpkg: "https://unpkg.com/hexo-theme-redefine@:version/source/:path",
jsdelivr:
"https://cdn.jsdelivr.net/npm/hexo-theme-redefine@:version/source/:path",
aliyun:
"https://evan.beee.top/projects/hexo-theme-redefine@:version/source/:path",
npmmirror:
"https://registry.npmmirror.com/hexo-theme-redefine/:version/files/source/:path",
custom: this.theme.cdn.custom_url,
};
const cdnPathHandle = (path) => {
const cdnBase =
cdnProviders[this.theme.cdn.provider] || cdnProviders.npmmirror;
let scriptTag;
const typeAttr = module ? 'type="module"' : "";
// const asyncAttr = async ? "async" : "";
const swupAttr = swupReload ? "data-swup-reload-script" : "";
if (this.theme.cdn.enable) {
if (this.theme.cdn.provider === "custom") {
const customUrl = cdnBase
.replace(":version", themeVersion)
.replace(":path", path);
scriptTag = `<script ${typeAttr} src="${
this.theme.cdn.enable ? customUrl : _js({ src: path })
}" ${swupAttr}></script>`;
} else {
scriptTag = `<script ${typeAttr} src="${cdnBase
.replace(":version", themeVersion)
.replace(":path", path)}" ${swupAttr}></script>`;
}
} else {
scriptTag = _js({
src: path,
type: module ? "module" : undefined,
"data-swup-reload-script": swupReload ? "" : undefined,
// async: async,
});
}
return scriptTag;
};
let renderedScripts = "";
if (Array.isArray(path)) {
renderedScripts = path.map(cdnPathHandle).join("");
} else {
renderedScripts = cdnPathHandle(path);
}
return renderedScripts;
});
hexo.extend.helper.register("renderCSS", function (path) {
const _css = hexo.extend.helper.get("css").bind(hexo);
const cdnProviders = {
zstatic:
"https://s4.zstatic.net/ajax/libs/hexo-theme-redefine/:version/:path",
cdnjs:
"https://cdnjs.cloudflare.com/ajax/libs/hexo-theme-redefine/:version/:path",
unpkg: "https://unpkg.com/hexo-theme-redefine@:version/source/:path",
jsdelivr:
"https://cdn.jsdelivr.net/npm/hexo-theme-redefine@:version/source/:path",
aliyun:
"https://evan.beee.top/projects/hexo-theme-redefine@:version/source/:path",
npmmirror:
"https://registry.npmmirror.com/hexo-theme-redefine/:version/files/source/:path",
custom: this.theme.cdn.custom_url,
};
const cdnPathHandle = (path) => {
const cdnBase =
cdnProviders[this.theme.cdn.provider] || cdnProviders.npmmirror;
let cssLink;
if (this.theme.cdn.enable) {
if (this.theme.cdn.provider === "custom") {
const customUrl = cdnBase
.replace(":version", themeVersion)
.replace(":path", path);
cssLink = `<link rel="stylesheet" href="${customUrl}">`;
} else {
cssLink = `<link rel="stylesheet" href="${cdnBase
.replace(":version", themeVersion)
.replace(":path", path)}">`;
}
} else {
cssLink = _css(path);
}
return cssLink;
};
if (Array.isArray(path)) {
return path.map(cdnPathHandle).join("");
} else {
return cdnPathHandle(path);
}
});
hexo.extend.helper.register("getThemeVersion", function () {
return themeVersion;
});
hexo.extend.helper.register("checkDeprecation", function (condition, id, message) {
if (condition) {
// Use Set to ensure each warning is only logged once per Hexo process
if (!global.deprecationWarnings) {
global.deprecationWarnings = new Set();
}
if (!global.deprecationWarnings.has(id)) {
hexo.log.warn(`${message}`);
global.deprecationWarnings.add(id);
}
return true;
}
return false;
});
hexo.extend.helper.register("configOptions", function (obj, indent = ' ') {
if (!obj || typeof obj !== 'object') return '';
return Object.entries(obj)
.filter(([key, value]) => value !== undefined && value !== null && value !== '')
.map(([key, value]) => {
if (typeof value === 'string') {
return `${indent}${key}: '${value}',`;
}
return `${indent}${key}: ${value},`;
})
.join('\n');
});

View File

@@ -0,0 +1,33 @@
hexo.extend.helper.register('waline_reaction_config', function(reactionConfig) {
if (Array.isArray(reactionConfig) && reactionConfig.length) {
return `[${reactionConfig.map(item => `'${item}'`).join(', ')}]`;
} else {
return Boolean(reactionConfig);
}
});
hexo.extend.helper.register('waline_array_config', function(arrayConfig) {
if (Array.isArray(arrayConfig) && arrayConfig.length) {
return `[${arrayConfig.map(item => `'${item}'`).join(', ')}]`;
}
return '[]';
});
hexo.extend.helper.register('waline_config_options', function(config) {
if (!config || typeof config !== 'object') return '';
const formatValue = (value) => {
if (typeof value === 'string') {
return `'${value}'`;
}
if (Array.isArray(value)) {
return `[${value.map(item => typeof item === 'string' ? `'${item}'` : item).join(', ')}]`;
}
return value;
};
return Object.entries(config)
.filter(([key, value]) => value !== undefined && value !== null && value !== '')
.map(([key, value]) => ` ${key}: ${formatValue(value)},`)
.join('\n');
});

85
node_modules/hexo-theme-redefine/scripts/modules/btn.js generated vendored Executable file
View File

@@ -0,0 +1,85 @@
"use strict";
/**
* Single Button module for Hexo theme Redefine
* Creates standalone button elements
*/
/**
* Creates a single button
*
* @param {Array} args - Button arguments (class, text, url, icon)
* @returns {String} HTML for a single button
*/
function postBtn(args) {
// Parse arguments - support both '::' and ',' as separators
let parsedArgs;
const argsStr = args.join(" ");
if (argsStr.includes("::")) {
parsedArgs = argsStr.split("::");
} else {
parsedArgs = argsStr.split(",");
}
// Default values
let cls = "";
let text = "";
let url = "";
let icon = "";
// Parse arguments based on count
switch(parsedArgs.length) {
case 4: // class, text, url, icon
cls = parsedArgs[0];
text = parsedArgs[1];
url = parsedArgs[2];
icon = parsedArgs[3];
break;
case 3:
// Check if third arg is an icon (contains fa-)
if (parsedArgs[2].includes("fa-")) {
// text, url, icon
text = parsedArgs[0];
url = parsedArgs[1];
icon = parsedArgs[2];
} else {
// class, text, url
cls = parsedArgs[0];
text = parsedArgs[1];
url = parsedArgs[2];
}
break;
case 2: // text, url
text = parsedArgs[0];
url = parsedArgs[1];
break;
case 1: // text only
text = parsedArgs[0];
break;
}
// Clean up values
cls = cls.trim();
icon = icon.trim();
text = text.trim();
url = url.trim();
// Build attributes
const hrefAttr = url ? `href='${url}'` : '';
const classAttr = cls ? `${cls}` : '';
// Build button HTML
if (icon) {
return `<a class="button ${classAttr}" ${hrefAttr} title='${text}'><i class='${icon}'></i> ${text}</a>`;
}
return `<a class="button ${classAttr}" ${hrefAttr} title='${text}'>${text}</a>`;
}
// Register Hexo tags
hexo.extend.tag.register("btn", postBtn);
hexo.extend.tag.register("button", postBtn);

71
node_modules/hexo-theme-redefine/scripts/modules/btns.js generated vendored Executable file
View File

@@ -0,0 +1,71 @@
'use strict';
/**
* Buttons module for Hexo theme Redefine
* Creates button containers and button elements
*/
/**
* Creates a buttons container
*
* @param {Array} args - Class names for the container
* @param {String} content - Button content (cells)
* @returns {String} HTML for the buttons container
*/
function postBtns(args, content) {
const classes = args.join(' ');
return `<div class="btns ${classes}">
${content}
</div>`;
}
/**
* Creates a single button cell
*
* @param {Array} args - Button properties (text, url, icon/image)
* @returns {String} HTML for a single button
*/
function postCell(args, content) {
// Parse arguments - support both '::' and ',' as separators
let parsedArgs;
const argsStr = args.join(' ');
if (argsStr.includes('::')) {
parsedArgs = argsStr.split('::');
} else {
parsedArgs = argsStr.split(',');
}
// Extract button properties
const text = (parsedArgs[0] || '').trim();
const url = (parsedArgs[1] || '').trim();
const buttonClasses = ['button'];
// Handle URL
const hrefAttr = url ? `href='${url}'` : '';
// Handle icon or image
let iconOrImage = '';
if (parsedArgs.length > 2) {
const iconOrImgSrc = parsedArgs[2].trim();
// Check if it's a FontAwesome icon
if (iconOrImgSrc.includes('fa-')) {
iconOrImage = `<i class='${iconOrImgSrc}'></i> `;
} else {
// Use specified image or default
const imgSrc = iconOrImgSrc || hexo.theme.config.default.image;
iconOrImage = `<img src='${imgSrc}'>`;
}
}
// Return complete button HTML
return `<a class="${buttonClasses.join(' ')}" ${hrefAttr} title='${text}'>${iconOrImage}${text}</a>`;
}
// Register Hexo tags
hexo.extend.tag.register('btns', postBtns, {ends: true});
hexo.extend.tag.register('buttons', postBtns, {ends: true});
hexo.extend.tag.register('cell', postCell);

34
node_modules/hexo-theme-redefine/scripts/modules/folding.js generated vendored Executable file
View File

@@ -0,0 +1,34 @@
'use strict';
const postFolding = (args, content) => {
// Parse arguments - support both '::' and ',' as delimiters
const delimiter = args.join(' ').includes('::') ? '::' : ',';
const [style, title = ''] = args.join(' ').split(delimiter).map(arg => arg.trim());
// Render markdown content
const renderedContent = hexo.render.renderSync({
text: content,
engine: 'markdown'
}).split('\n').join('');
// Replace heading tags with paragraph tags that have heading classes
const processedContent = renderedContent.replace(
/<(h[1-6])>/g,
(_, tag) => `<p class='${tag}'>`
).replace(
/<\/(h[1-6])>/g,
() => '</p>'
);
// Build the HTML with or without custom style
const styleAttr = style ? ` class="${style}"` : '';
return `<details${styleAttr} data-header-exclude>
<summary><i class="fa-solid fa-chevron-right"></i>${title} </summary>
<div class='content'>
${processedContent}
</div>
</details>`;
};
hexo.extend.tag.register('folding', postFolding, {ends: true});

View File

@@ -0,0 +1,72 @@
function postNoteLarge(args, content) {
if (args.length === 0) {
args.push("default", "Warning");
}
let icon = "";
let title = "";
// Extract color from args[0]
const color = args[0];
// Process all arguments after color to build icon and title
const remainingArgs = args.slice(1);
// Find all fa- prefixed arguments
const faArgs = [];
const faIndices = [];
remainingArgs.forEach((arg, index) => {
if (arg && arg.startsWith('fa-')) {
faArgs.push(arg);
faIndices.push(index);
}
});
// Handle FontAwesome icons based on how many fa- args we found
if (faArgs.length === 2) {
// Two fa- args: first is style, second is icon
icon = `<i class="notel-icon ${faArgs[0]} ${faArgs[1]}"></i>`;
// Remove both FA args (remove higher index first to preserve positions)
remainingArgs.splice(faIndices[1], 1);
remainingArgs.splice(faIndices[0], 1);
} else if (faArgs.length === 1) {
// One fa- arg: it's the icon, default to fa-solid
icon = `<i class="notel-icon fa-solid ${faArgs[0]}"></i>`;
// Remove the FA arg
remainingArgs.splice(faIndices[0], 1);
}
// Join all remaining args as the title
title = remainingArgs.join(" ");
// If no title was provided, set a default
if (!title) {
title = "Note";
}
return `
<div class="note-large ${color}">
<div class="notel-title rounded-t-lg p-3 font-bold text-lg flex flex-row gap-2 items-center">
${icon}${hexo.render.renderSync({
text: title,
engine: "markdown",
})}
</div>
<div class="notel-content">
${hexo.render.renderSync({
text: content,
engine: "markdown",
})}
</div>
</div>`;
}
hexo.extend.tag.register("noteL", postNoteLarge, { ends: true });
hexo.extend.tag.register("notel", postNoteLarge, { ends: true });
hexo.extend.tag.register("notelarge", postNoteLarge, { ends: true });
hexo.extend.tag.register("notel-large", postNoteLarge, { ends: true });
hexo.extend.tag.register("notes-large", postNoteLarge, { ends: true });
hexo.extend.tag.register("subwarning", postNoteLarge, { ends: true });

View File

@@ -0,0 +1,64 @@
function postNote(args, content) {
if (args.length === 0) {
args.push("default");
}
let icon = "";
// Extract style classes from all args except potential icon classes
let classes = [];
const remainingArgs = [...args]; // Copy args array
// Add first arg as main class
if (remainingArgs.length > 0) {
classes.push(remainingArgs[0]);
remainingArgs.shift();
}
// Find all fa- prefixed arguments
const faArgs = [];
const faIndices = [];
remainingArgs.forEach((arg, index) => {
if (arg && arg.startsWith('fa-')) {
faArgs.push(arg);
faIndices.push(index);
}
});
// Handle FontAwesome icons based on how many fa- args we found
if (faArgs.length === 2) {
// Two fa- args: first is style, second is icon
icon = `<i class="note-icon ${faArgs[0]} ${faArgs[1]}"></i>`;
// Remove both FA args (remove higher index first to preserve positions)
remainingArgs.splice(faIndices[1], 1);
remainingArgs.splice(faIndices[0], 1);
} else if (faArgs.length === 1) {
// One fa- arg: it's the icon, default to fa-solid
icon = `<i class="note-icon fa-solid ${faArgs[0]}"></i>`;
// Remove the FA arg
remainingArgs.splice(faIndices[0], 1);
}
// Add any remaining args as additional classes
classes = classes.concat(remainingArgs);
// Add icon-padding class if icon exists
if (icon) {
classes.push("icon-padding");
}
return `
<div class="note p-4 mb-4 rounded-small ${classes.join(" ")}">
${icon}${hexo.render.renderSync({
text: content,
engine: "markdown",
})}
</div>`;
}
hexo.extend.tag.register("note", postNote, { ends: true });
hexo.extend.tag.register("notes", postNote, { ends: true });
hexo.extend.tag.register("subnote", postNote, { ends: true });

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