Merge branch 'master' into local
# Conflicts: # _config.yml
This commit is contained in:
commit
45456e4b37
70
.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
70
.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Something isn't working as expected
|
||||
title: ""
|
||||
labels: Bug
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate.
|
||||
请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
|
||||
|
||||
## Issue Checklist <!-- 我确认我已经查看了 -->
|
||||
|
||||
<!-- Change [ ] to [x] to select (将 [ ] 换成 [x] 来选择) -->
|
||||
|
||||
- [ ] I am using [the latest](https://github.com/Shen-Yu/hexo-theme-ayer) version of hexo-theme-ayer.
|
||||
- [ ] I have reviewed the latest Roadmap on GitHub and searched for current [Ayer Issues](https://github.com/Shen-Yu/hexo-theme-ayer/issues), which does not help me.
|
||||
|
||||
---
|
||||
|
||||
## Expected behavior <!-- 预期行为 -->
|
||||
|
||||
## Actual behavior <!-- 实际行为 -->
|
||||
|
||||
<!-- Please provide at least one of the following information (请至少提供以下的一项信息) -->
|
||||
|
||||
- Links to demo site with this issue: N/A
|
||||
- Links to repository or source code of the blog: N/A
|
||||
|
||||
## Steps to reproduce the behavior <!-- 重现步骤 -->
|
||||
|
||||
1. N/A
|
||||
2. N/A
|
||||
3. N/A
|
||||
|
||||
## Environment Information
|
||||
|
||||
### Node.js and NPM Information
|
||||
|
||||
<!-- Paste output from `node -v && npm -v` (粘贴 `node -v && npm -v` 输出的信息) -->
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
### Package dependencies Information
|
||||
|
||||
<!-- Paste output from `npm ls --depth 0` (粘贴 `npm ls --depth 0` 输出的信息) -->
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
### HTML Configuration
|
||||
|
||||
<!-- Paste configuration from HTML (粘贴 HTML 配置 中的内容) -->
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
### MiniValine Configuration
|
||||
|
||||
<!-- Paste configuration from MiniValine (粘贴 MiniValine 配置 中的内容) -->
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
## Other Information <!-- (Like Browser, System, Screenshots) -->
|
36
.github/ISSUE_TEMPLATE/feature-request.md
vendored
Normal file
36
.github/ISSUE_TEMPLATE/feature-request.md
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: Suggest an idea for this project
|
||||
title: ""
|
||||
labels: Feature Request
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate.
|
||||
请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
|
||||
|
||||
## Issue Checklist <!-- 我确认我已经查看了 -->
|
||||
|
||||
<!-- Change [ ] to [x] to select (将 [ ] 换成 [x] 来选择) -->
|
||||
|
||||
- [ ] I am using [the latest](https://github.com/Shen-Yu/hexo-theme-ayer) version of hexo-theme-ayer.
|
||||
- [ ] I have reviewed the latest Roadmap on GitHub and searched for current [Ayer Issues](https://github.com/Shen-Yu/hexo-theme-ayer/issues), which does not help me.
|
||||
|
||||
---
|
||||
|
||||
## Expected behavior <!-- 预期行为 -->
|
||||
|
||||
## Actual behavior <!-- 实际行为 -->
|
||||
|
||||
<!-- Please provide at least one of the following information (请至少提供以下的一项信息) -->
|
||||
|
||||
- Links to demo site with this feature: N/A
|
||||
- Links to repository or source code of the blog: N/A
|
||||
|
||||
## Steps to reproduce the behavior <!-- 重现步骤 -->
|
||||
|
||||
1. N/A
|
||||
2. N/A
|
||||
3. N/A
|
||||
|
||||
## Other Information <!-- Like Browser, System, Screenshots -->
|
21
.github/ISSUE_TEMPLATE/other.md
vendored
Normal file
21
.github/ISSUE_TEMPLATE/other.md
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
name: Other
|
||||
about: Not a question, feature request or bug report
|
||||
title: ""
|
||||
labels: ""
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate.
|
||||
请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
|
||||
|
||||
## Issue Checklist <!-- 我确认我已经查看了 -->
|
||||
|
||||
<!-- Change [ ] to [x] to select (将 [ ] 换成 [x] 来选择) -->
|
||||
|
||||
- [ ] I am using [the latest](https://github.com/Shen-Yu/hexo-theme-ayer) version of hexo-theme-ayer.
|
||||
- [ ] I have reviewed the latest Roadmap on GitHub and searched for current [Ayer Issues](https://github.com/Shen-Yu/hexo-theme-ayer/issues), which does not help me.
|
||||
|
||||
---
|
||||
|
||||
## Other Information <!-- Like Browser, System, Screenshots -->
|
70
.github/ISSUE_TEMPLATE/question.md
vendored
Normal file
70
.github/ISSUE_TEMPLATE/question.md
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
---
|
||||
name: Question
|
||||
about: I have a question for Ayer
|
||||
title: ""
|
||||
labels: Question
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate.
|
||||
请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
|
||||
|
||||
## Issue Checklist <!-- 我确认我已经查看了 -->
|
||||
|
||||
<!-- Change [ ] to [x] to select (将 [ ] 换成 [x] 来选择) -->
|
||||
|
||||
- [ ] I am using [the latest](https://github.com/Shen-Yu/hexo-theme-ayer) version of hexo-theme-ayer.
|
||||
- [ ] I have reviewed the latest Roadmap on GitHub and searched for current [Ayer Issues](https://github.com/Shen-Yu/hexo-theme-ayer/issues), which does not help me.
|
||||
|
||||
---
|
||||
|
||||
## Expected behavior <!-- 预期行为 -->
|
||||
|
||||
## Actual behavior <!-- 实际行为 -->
|
||||
|
||||
<!-- Please provide at least one of the following information (请至少提供以下的一项信息) -->
|
||||
|
||||
- Links to demo site with this issue: N/A
|
||||
- Links to repository or source code of the blog: N/A
|
||||
|
||||
## Steps to reproduce the behavior <!-- 重现步骤 -->
|
||||
|
||||
1. N/A
|
||||
2. N/A
|
||||
3. N/A
|
||||
|
||||
## Environment Information
|
||||
|
||||
### Node.js and NPM Information
|
||||
|
||||
<!-- Paste output from `node -v && npm -v` (粘贴 `node -v && npm -v` 输出的信息) -->
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
### Package dependencies Information
|
||||
|
||||
<!-- Paste output from `npm ls --depth 0` (粘贴 `npm ls --depth 0` 输出的信息) -->
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
### HTML Configuration
|
||||
|
||||
<!-- Paste configuration from HTML (粘贴 HTML 配置 中的内容) -->
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
### Ayer Configuration
|
||||
|
||||
<!-- Paste configuration from Ayer (粘贴 Ayer 配置 中的内容) -->
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
## Other Information <!-- (Like Browser, System, Screenshots) -->
|
12
.github/config.yml
vendored
Normal file
12
.github/config.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
# =============================================================================================== #
|
||||
# Configuration for welcome - https://github.com/behaviorbot/welcome
|
||||
|
||||
# Comment to be posted to on first time issues
|
||||
newIssueWelcomeComment: >
|
||||
Thanks for opening this issue, maintainers will get back to you as soon as possible!
|
||||
# Comment to be posted to on PRs from first time contributors in your repository
|
||||
newPRWelcomeComment: >
|
||||
Thanks so much for opening your first PR here!
|
||||
# Comment to be posted to on pull requests merged by a first time user
|
||||
firstPRMergeComment: >
|
||||
Congrats on merging your first pull request here! :tada: How awesome!
|
18
README.md
18
README.md
@ -3,18 +3,17 @@
|
||||
<h3 align="center">一个安静且优雅的 Hexo 主题</h3>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/Shen-Yu/hexo-theme-ayer/blob/master/LICENSE" target="_blank" rel="noopener noreferrer"><img alt="LICENSE" src="https://img.shields.io/badge/LICENSE-SATA-red">
|
||||
</a>
|
||||
<a href="https://shen-yu.gitee.io" target="_blank" rel="noopener noreferrer">
|
||||
<img alt="platform" src="https://img.shields.io/badge/platform-PC--ios--android-ea5a76.svg">
|
||||
</a>
|
||||
<br>
|
||||
<a href="https://travis-ci.org/Shen-Yu/hexo-theme-ayer?branch=master" target="_blank" rel="noopener noreferrer">
|
||||
<img alt="travis-ci" src="https://travis-ci.org/Shen-Yu/hexo-theme-ayer.svg?branch=master">
|
||||
</a>
|
||||
<a href="http://standardjs.com" target="_blank" rel="noopener noreferrer">
|
||||
<img alt="js-standard-style" src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg">
|
||||
</a>
|
||||
<br>
|
||||
<a href="https://hubble.js.org?owner=Shen-Yu&repo=hexo-theme-ayer&start"><img src="https://img.shields.io/badge/since-2019-409eff.svg" alt="Hubble"></a>
|
||||
<a href="https://shen-yu.gitee.io" target="_blank" rel="noopener noreferrer">
|
||||
<img alt="platform" src="https://img.shields.io/badge/platform-PC--ios--android-ea5a76.svg">
|
||||
</a>
|
||||
<a href="https://gitter.im/hexo-theme-ayer/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge" target="_blank" rel="noopener noreferrer">
|
||||
<img alt="Gitter" src="https://badges.gitter.im/Join%20Chat.svg">
|
||||
</a>
|
||||
@ -22,11 +21,10 @@
|
||||
<a href="https://github.com/Shen-Yu/hexo-theme-ayer/releases" target="_blank" rel="noopener noreferrer">
|
||||
<img alt="GitHub tag (latest by date)" src="https://img.shields.io/github/v/tag/Shen-Yu/hexo-theme-ayer?color=blue">
|
||||
</a>
|
||||
<img alt="language" src="https://img.shields.io/badge/language-ejs--stylus-orange.svg">
|
||||
<a href="https://hexo.io/zh-cn/" target="_blank" rel="noopener noreferrer">
|
||||
<img alt="hexo" src="https://img.shields.io/badge/hexo-%3E%3D3.0-blue.svg">
|
||||
</a>
|
||||
<img alt="language" src="https://img.shields.io/badge/language-ejs--stylus-green.svg">
|
||||
<img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/Shen-Yu/hexo-theme-ayer?color=%23af8ddc">
|
||||
<a href="https://github.com/Shen-Yu/hexo-theme-ayer/blob/master/LICENSE" target="_blank" rel="noopener noreferrer"><img alt="LICENSE" src="https://img.shields.io/badge/LICENSE-sata-orange">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
92
_config.yml
92
_config.yml
@ -97,7 +97,7 @@ rss: /atom.xml
|
||||
darkmode: true
|
||||
|
||||
# 动态背景效果: 0-关闭,1-动态线条(跟随鼠标)
|
||||
canvas_bg: 1
|
||||
canvas_bg: 0
|
||||
|
||||
# 自定义鼠标样式,直接替换/images/mouse.cur文件
|
||||
mouse:
|
||||
@ -112,31 +112,6 @@ layout:
|
||||
article_width: 80rem
|
||||
sidebar_width: 8rem
|
||||
|
||||
# 评论:1、Valine(推荐);2、Gitalk
|
||||
|
||||
# 1、Valine[一款快速、简洁且高效的无后端评论系统](https://github.com/xCss/Valine)
|
||||
# 启用Valine必须先创建leancloud应用, 获取 id|key 填入即可
|
||||
leancloud:
|
||||
enable: true
|
||||
app_id: chaSYi8FMdJBwzIBpxeNjqWC-gzGzoHsz
|
||||
app_key: PqqkLYgPkHvH1BmyQqySWnSK
|
||||
# Valine配置
|
||||
valine:
|
||||
enable: true # 是否启用
|
||||
verify: false # 是否启用防垃圾验证
|
||||
notify: true # 是否开启邮件提醒(https://valine.js.org/notify.html)
|
||||
avatar: monsterid # 头像样式(https://valine.js.org/avatar.html)
|
||||
placeholder: 给我的文章加点评论吧~ # placeholder
|
||||
|
||||
# 2、Gitalk(https://github.com/gitalk/gitalk)
|
||||
gitalk:
|
||||
enable: false # true
|
||||
clientID: # GitHub Application Client ID
|
||||
clientSecret: # Client Secret
|
||||
repo: # Repository name
|
||||
owner: # GitHub ID
|
||||
admin: # GitHub ID
|
||||
|
||||
# GitHub Ribbons-封面右上角的forkme,换样式直接在source/images目录下替换forkme图片
|
||||
github:
|
||||
# (关闭请设置为false)
|
||||
@ -178,7 +153,7 @@ katex:
|
||||
# 网站成立年份(默认为 2019,若填入年份小于当前年份,则显示为 2018-2019 类似的格式)
|
||||
since: 2015
|
||||
|
||||
# 是否显示页脚信息(建议保留,有助于本主题的推广)
|
||||
# 是否显示页脚信息(建议保留)
|
||||
pageFooter: true
|
||||
|
||||
#ICP备案信息尾部显示
|
||||
@ -186,3 +161,66 @@ icp:
|
||||
enable: false
|
||||
url: "http://www.beian.miit.gov.cn/" # 备案链接
|
||||
text: "浙ICP备88888888" # 备案信息
|
||||
|
||||
# 评论:1、Valine(推荐);2、Gitalk;3、MiniValine
|
||||
|
||||
# 1、Valine[一款快速、简洁且高效的无后端评论系统](https://github.com/xCss/Valine)
|
||||
# 启用Valine必须先创建leancloud应用, 获取 id|key 填入即可
|
||||
leancloud:
|
||||
enable: true
|
||||
app_id: chaSYi8FMdJBwzIBpxeNjqWC-gzGzoHsz
|
||||
app_key: PqqkLYgPkHvH1BmyQqySWnSK
|
||||
# Valine配置
|
||||
valine:
|
||||
enable: true # 是否启用
|
||||
avatar: monsterid # 头像样式(https://valine.js.org/avatar.html)
|
||||
placeholder: 给我的文章加点评论吧~ # placeholder
|
||||
|
||||
# 2、Gitalk(https://github.com/gitalk/gitalk)
|
||||
gitalk:
|
||||
enable: false # true
|
||||
clientID: # GitHub Application Client ID
|
||||
clientSecret: # Client Secret
|
||||
repo: # Repository name
|
||||
owner: # GitHub ID
|
||||
admin: # GitHub ID
|
||||
|
||||
# 3、MiniValine
|
||||
# See: https://github.com/MiniValine/MiniValine
|
||||
minivaline:
|
||||
enable: false
|
||||
mode: DesertsP # DesertsP or xCss
|
||||
placeholder: Write a Comment # Comment box placeholder
|
||||
math: true # Support MathJax.
|
||||
md: true # Support Markdown.
|
||||
enableQQ: false # Enable QQ avatar API.
|
||||
NoRecordIP: false # Do not record commenter IP.
|
||||
visitor: true # Article reading statistics.
|
||||
maxNest: 6 # Sub-comment maximum nesting depth.
|
||||
pageSize: 6 # Pagination size.
|
||||
adminEmailMd5: de8a7aa53d07e6b6bceb45c64027763d # The MD5 of Admin Email to show Admin Flag.[Just Only DesertsP Style mode]
|
||||
tagMeta: # The String Array of Words to show Flag.[Just Only xCss Style mode]
|
||||
- 管理员
|
||||
- 小伙伴
|
||||
- 访客
|
||||
master: # The MD5 String Array of master Email to show master Flag.[Just Only xCss Style mode]
|
||||
- de8a7aa53d07e6b6bceb45c64027763d
|
||||
friends: # The MD5 String Array of friends Email to show friends Flag.[Just Only xCss Style mode]
|
||||
- b5bd5d836c7a0091aa8473e79ed4c25e
|
||||
- adb7d1cd192658a55c0ad22a3309cecf
|
||||
- 3ce1e6c77b4910f1871106cb30dc62b0
|
||||
- cfce8dc43725cc14ffcd9fb4892d5bfc
|
||||
# MiniValine's display language depends on user's browser or system environment
|
||||
# If you want everyone visiting your site to see a uniform language, you can set a force language value
|
||||
# Available values: en | zh-CN | (and many more)
|
||||
# More i18n info: https://github.com/MiniValine/minivaline-i18n
|
||||
lang:
|
||||
# Expression Url.
|
||||
# https://github.com/MiniValine/MiniValine/blob/master/.github/FAQ.md#how-to-customize-emoticons
|
||||
emoticonUrl:
|
||||
- https://cdn.jsdelivr.net/npm/alus@latest
|
||||
- https://cdn.jsdelivr.net/gh/MiniValine/qq@latest
|
||||
- https://cdn.jsdelivr.net/gh/MiniValine/Bilibilis@latest
|
||||
- https://cdn.jsdelivr.net/gh/MiniValine/tieba@latest
|
||||
- https://cdn.jsdelivr.net/gh/MiniValine/twemoji@latest
|
||||
- https://cdn.jsdelivr.net/gh/MiniValine/weibo@latest
|
||||
|
@ -1,42 +1,35 @@
|
||||
<article id="<%= post.layout %>-<%= post.slug %>" class="article article-type-<%= post.layout %>" itemscope
|
||||
itemprop="blogPost" data-scroll-reveal>
|
||||
|
||||
<article
|
||||
id="<%= post.layout %>-<%= post.slug %>"
|
||||
class="article article-type-<%= post.layout %>"
|
||||
itemscope
|
||||
itemprop="blogPost"
|
||||
data-scroll-reveal
|
||||
>
|
||||
<div class="article-inner">
|
||||
<% if (post.link || post.title){ %>
|
||||
<header class="article-header">
|
||||
<%- partial('post/title', {class_name: 'article-title'}) %>
|
||||
</header>
|
||||
<% } %>
|
||||
|
||||
<% if (index || is_post()) { %>
|
||||
<% } %> <% if (index || is_post()) { %>
|
||||
<div class="article-meta">
|
||||
<%- partial('post/date', {class_name: 'article-date', date_format: null}) %>
|
||||
<%- partial('post/category') %>
|
||||
<% if(theme.word_count && theme.word_count.enable && !post.no_word_count){%>
|
||||
<%- partial('post/word') %>
|
||||
<% } %>
|
||||
<%- partial('post/date', {class_name: 'article-date', date_format: null})
|
||||
%> <%- partial('post/category') %> <% if(theme.word_count &&
|
||||
theme.word_count.enable && !post.no_word_count){%> <%-
|
||||
partial('post/word') %> <% } %>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<% if (theme.toc && is_post()){ %>
|
||||
<%- partial('post/tocbot') %>
|
||||
<% } %>
|
||||
|
||||
<% if (theme.excerpt_all&&index){ %>
|
||||
<% }else{ %>
|
||||
<% } %> <% if (theme.toc && is_post()){ %> <%- partial('post/tocbot') %> <%
|
||||
} %> <% if (theme.excerpt_all&&index){ %> <% }else{ %>
|
||||
<div class="article-entry" itemprop="articleBody">
|
||||
<%- partial('post/justifiedGallery') %>
|
||||
<%- partial('post/gallery') %>
|
||||
<% if (post.excerpt && index){ %>
|
||||
<%- post.excerpt %>
|
||||
<% if (theme.excerpt_link){ %>
|
||||
<a class="article-more-link" href="<%- url_for(post.path) %>"><%= theme.excerpt_link %></a>
|
||||
<% } %>
|
||||
<% } else { %>
|
||||
<%- post.content %>
|
||||
<% } %>
|
||||
<%- partial('post/justifiedGallery') %> <%- partial('post/gallery') %> <%
|
||||
if (post.excerpt && index){ %> <%- post.excerpt %> <% if
|
||||
(theme.excerpt_link){ %>
|
||||
<a class="article-more-link" href="<%- url_for(post.path) %>"
|
||||
><%= theme.excerpt_link %></a
|
||||
>
|
||||
<% } %> <% } else { %> <%- post.content %> <% } %>
|
||||
<!-- reward -->
|
||||
<% if ((theme.reward_type === 2 || (theme.reward_type === 1 && post.reward)) && !index && !post.no_reward){ %>
|
||||
<% if ((theme.reward_type === 2 || (theme.reward_type === 1 &&
|
||||
post.reward)) && !index && !post.no_reward){ %>
|
||||
<div id="reward-btn">
|
||||
<%= __('post.reward') %>
|
||||
</div>
|
||||
@ -45,7 +38,8 @@
|
||||
<% } %>
|
||||
|
||||
<!-- copyright -->
|
||||
<% if (((theme.copyright_type === 2) || (theme.copyright_type === 1 && post.copyright)) && !index){ %>
|
||||
<% if (((theme.copyright_type === 2) || (theme.copyright_type === 1 &&
|
||||
post.copyright)) && !index){ %>
|
||||
<div class="declare">
|
||||
<ul class="post-copyright">
|
||||
<li>
|
||||
@ -57,29 +51,15 @@
|
||||
</div>
|
||||
<% } %>
|
||||
<footer class="article-footer">
|
||||
<% if (!index && theme.share_enable){ %>
|
||||
<%- partial('post/share') %>
|
||||
<% } %>
|
||||
<%- partial('post/tag') %>
|
||||
|
||||
<% if (!index && theme.share_enable){ %> <%- partial('post/share') %> <% }
|
||||
%> <%- partial('post/tag') %>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<% if (!index){ %>
|
||||
<%- partial('post/nav') %>
|
||||
<% } %>
|
||||
|
||||
<% if (theme.valine && theme.valine.enable && !post.no_valine){ %>
|
||||
<%- partial('post/valine', {
|
||||
key: post.slug,
|
||||
title: post.title,
|
||||
url: config.url+url_for(post.path)
|
||||
}) %>
|
||||
<% } %>
|
||||
|
||||
<% if (is_post()) { %>
|
||||
<%- partial('post/gitalk') %>
|
||||
<% } %>
|
||||
|
||||
<% if (!index){ %> <%- partial('post/nav') %> <% } %> <% if (theme.valine &&
|
||||
theme.valine.enable && !post.no_valine){ %> <%- partial('post/valine', { key:
|
||||
post.slug, title: post.title, url: config.url+url_for(post.path) }) %> <% } %>
|
||||
<% if (is_post()) { %> <%- partial('post/gitalk') %> <% } %> <% if
|
||||
(theme.minivaline && theme.minivaline.enable && !post.no_minivaline){ %> <%-
|
||||
partial('post/minivaline') %> <% } %>
|
||||
</article>
|
88
layout/_partial/post/minivaline.ejs
Normal file
88
layout/_partial/post/minivaline.ejs
Normal file
@ -0,0 +1,88 @@
|
||||
<% if (!index && theme.leancloud && theme.leancloud.enable){ %>
|
||||
<!-- minivaline评论 -->
|
||||
<div id="mvcomments-box">
|
||||
<div id="mvcomments"></div>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/minivaline@2/dist/MiniValine.min.js"></script>
|
||||
<script>
|
||||
new MiniValine({
|
||||
el: '#mvcomments',
|
||||
appId: '<%- theme.leancloud.app_id %>',
|
||||
appKey: '<%- theme.leancloud.app_key %>',
|
||||
mode: '<%- theme.minivaline.mode %>',
|
||||
placeholder: '<%- theme.minivaline.placeholder %>',
|
||||
pathname: window.location.pathname,
|
||||
lang: '<%- theme.minivaline.lang %>',
|
||||
adminEmailMd5: '<%- theme.minivaline.adminEmailMd5 %>',
|
||||
tagMeta: <%- '["' + theme.minivaline.tagMeta.join('", "') + '"]' %>,
|
||||
master: <%- '["' + theme.minivaline.master.join('", "') + '"]' %>,
|
||||
friends: <%- '["' + theme.minivaline.friends.join('", "') + '"]' %>,
|
||||
math: <%- theme.minivaline.math %>,
|
||||
md: <%- theme.minivaline.md %>,
|
||||
enableQQ: <%- theme.minivaline.enableQQ %>,
|
||||
NoRecordIP: <%- theme.minivaline.NoRecordIP %>,
|
||||
visitor: <%- theme.minivaline.visitor %>,
|
||||
maxNest: <%- theme.minivaline.maxNest %>,
|
||||
pageSize: <%- theme.minivaline.pageSize %>,
|
||||
serverURLs: '<%- theme.minivaline.serverURLs %>',
|
||||
emoticonUrl: <%- '["' + theme.minivaline.emoticonUrl.join('", "') + '"]' %>,
|
||||
});
|
||||
const infoEle = document.querySelector('#mvcomments .info');
|
||||
if (infoEle && infoEle.childNodes && infoEle.childNodes.length > 0) {
|
||||
infoEle.childNodes.forEach(function (item) {
|
||||
item.parentNode.removeChild(item);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
#mvcomments-box {
|
||||
padding: 5px 30px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
#mvcomments-box {
|
||||
padding: 5px 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.v .vlist .vcard .vh {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.v .vlist .vcard {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.darkmode .commentTrigger{
|
||||
background-color: #403e3e !important;
|
||||
}
|
||||
.darkmode .MiniValine .vpage .more{
|
||||
background: #21232F
|
||||
}
|
||||
.darkmode img{
|
||||
filter: brightness(30%)
|
||||
}
|
||||
.darkmode .MiniValine .vlist .vcard .vcomment-body .text-wrapper .vcomment.expand:before{
|
||||
background: linear-gradient(180deg, rgba(246,246,246,0), rgba(0,0,0,0.9))
|
||||
}
|
||||
.darkmode .MiniValine .vlist .vcard .vcomment-body .text-wrapper .vcomment.expand:after{
|
||||
background: rgba(0,0,0,0.9)
|
||||
}
|
||||
.darkmode .MiniValine .vlist .vcard .vcomment-body .text-wrapper .vcomment pre{
|
||||
background: #282c34
|
||||
border: 1px solid #282c34
|
||||
}
|
||||
.darkmode .MiniValine .vinputs-area .textarea-wrapper textarea{
|
||||
color: #000;
|
||||
}
|
||||
.darkmode .MiniValine .vinputs-area .auth-section .input-wrapper input{
|
||||
color: #000;
|
||||
}
|
||||
.darkmode .MiniValine .info .col .count{
|
||||
color: #000;
|
||||
}
|
||||
.darkmode .MiniValine .vinputs-area .vextra-area .vsmile-icons{
|
||||
background: transparent;
|
||||
}
|
||||
</style>
|
||||
<% } %>
|
@ -1,24 +1,21 @@
|
||||
<% if (!index && theme.leancloud && theme.leancloud.enable){ %>
|
||||
<!-- valine评论 -->
|
||||
<div id="vcomments-box">
|
||||
<div id="vcomments">
|
||||
</div>
|
||||
<div id="vcomments"></div>
|
||||
</div>
|
||||
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
|
||||
<script src='https://cdn.jsdelivr.net/npm/valine@1.3.10/dist/Valine.min.js'></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/valine@1.4.14/dist/Valine.min.js"></script>
|
||||
<script>
|
||||
new Valine({
|
||||
el: '#vcomments',
|
||||
app_id: '<%- theme.leancloud.app_id %>',
|
||||
app_key: '<%- theme.leancloud.app_key %>',
|
||||
el: "#vcomments",
|
||||
app_id: "<%- theme.leancloud.app_id %>",
|
||||
app_key: "<%- theme.leancloud.app_key %>",
|
||||
path: window.location.pathname,
|
||||
notify: <%- theme.valine.notify %>,
|
||||
verify: <%- theme.valine.verify %>,
|
||||
avatar: '<%- theme.valine.avatar %>',
|
||||
placeholder: '<%- theme.valine.placeholder %>',
|
||||
recordIP: true
|
||||
avatar: "<%- theme.valine.avatar %>",
|
||||
placeholder: "<%- theme.valine.placeholder %>",
|
||||
recordIP: true,
|
||||
});
|
||||
const infoEle = document.querySelector('#vcomments .info');
|
||||
const infoEle = document.querySelector("#vcomments .info");
|
||||
if (infoEle && infoEle.childNodes && infoEle.childNodes.length > 0) {
|
||||
infoEle.childNodes.forEach(function (item) {
|
||||
item.parentNode.removeChild(item);
|
||||
|
@ -2,6 +2,22 @@
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
<% if (theme.click_effect===2){ %>
|
||||
<canvas class="fireworks"></canvas>
|
||||
<style>
|
||||
.fireworks {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 99999;
|
||||
pointer-events: none;
|
||||
}
|
||||
</style>
|
||||
<% } %>
|
||||
<% if (theme.click_effect===3){ %>
|
||||
<canvas width="1777" height="841"
|
||||
style="position: fixed; left: 0px; top: 0px; z-index: 99999; pointer-events: none;"></canvas>
|
||||
<% } %>
|
||||
<main class="content on">
|
||||
<%- body %>
|
||||
<%- partial('_partial/footer', null, {cache: !config.relative_link}) %>
|
||||
@ -24,23 +40,6 @@
|
||||
<% if (theme.music&&theme.music.enable){ %>
|
||||
<%- partial('_partial/music') %>
|
||||
<% } %>
|
||||
|
||||
<% if (theme.click_effect===2){ %>
|
||||
<canvas class="fireworks"></canvas>
|
||||
<style>
|
||||
.fireworks {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 99999;
|
||||
pointer-events: none;
|
||||
}
|
||||
</style>
|
||||
<% } %>
|
||||
<% if (theme.click_effect===3){ %>
|
||||
<canvas width="1777" height="841"
|
||||
style="position: fixed; left: 0px; top: 0px; z-index: 99999; pointer-events: none;"></canvas>
|
||||
<% } %>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user