i18n
xaoxuu 4 years ago
parent 957fd06f19
commit 80861cb564
  1. 38
      _config.yml
  2. 46
      layout/_meta/btns.ejs
  3. 40
      layout/_meta/links.ejs
  4. 4
      layout/_partial/scripts.ejs

@ -112,8 +112,8 @@ cover:
icon: fas fa-play-circle
url: examples/
- name: 源码
icon: fas fa-code-branch
url: https://github.com/xaoxuu/hexo-theme-material-x/
icon: fas fa-file-code
url: https://github.com/xaoxuu/hexo-theme-volantis/
rel: external nofollow noopener noreferrer
target: _blank
- name: 鸣谢
@ -202,7 +202,7 @@ layout:
# 如果tags放置在meta.header中,那么在post列表中不显示(因为卡片下方已经有了)
meta:
header: [title, author, category, date, top]
footer: [links, tags]
footer: [btns, tags]
# 文章页脚,自动在每一篇文章末尾添加
footer: #[copyright, qrcode]
# 文章页面的侧边栏
@ -261,9 +261,13 @@ meta:
# name: QRcode
# img: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/logo/128/qrcode.png
# 链接
links:
btns:
edit:
icon: fas fa-edit
title: 在GitHub上编辑此页
color: '#888'
repo: # 源码链接
icon: fas fa-code-branch
icon: fas fa-file-code
title: 源码
color: '#508EF2'
bug: # BUG反馈链接
@ -375,21 +379,26 @@ widget:
icon: fas fa-map-signs
title: 文档导航
rows:
- name: 近期消息
icon: fas fa-bullhorn
url: /
- name: 消息归档
icon: fas fa-file-archive
url: news/archives/
- name: 常见问题
icon: fas fa-question-circle
url: faqs/
- name: 示例博客
icon: fas fa-play-circle
url: examples/
- name: 特别感谢
icon: fas fa-handshake
url: contributors/
- name: 历史事件
icon: fas fa-file-archive
url: news/archives/
- name: 主题源码
icon: fas fa-file-code
url: https://github.com/xaoxuu/hexo-theme-volantis/
rel: external nofollow noopener noreferrer
target: _blank
- name: 更新日志
icon: fas fa-clipboard-list
url: https://github.com/xaoxuu/hexo-theme-material-x/releases/
url: https://github.com/xaoxuu/hexo-theme-volantis/releases/
rel: external nofollow noopener noreferrer
target: _blank
- id: repos
@ -460,13 +469,14 @@ aplayer:
#valine配置
valine:
enable: true # 如果你想用Valine评论系统,请设置enable为true
volantis: true # 是否启用volantis版本(禁止匿名,增加若干贴吧、QQ表情)
# 还需要在根目录配置文件中添加下面这三行内容
# leancloud:
# app_id: 你的appId
# app_key: 你的appKey
# valine_path: 全站采用同一个path(共用同一个评论框数据)
guest_info: nick,mail,link #valine comment header info
placeholder: 快来评论吧~ # valine comment input placeholder(like: Please leave your footprints )
# placeholder: 快来评论吧~ # valine comment input placeholder(like: Please leave your footprints )
placeholder: 这里仅供用户之间进行交流,如需反馈请移步「GitHub Issues」。
avatar: mp # gravatar style https://valine.js.org/avatar
pageSize: 10 # comment list page size
verify: true # valine verify code (true/false)

@ -0,0 +1,46 @@
<% if(post && post.btns){ %>
<div class='new-meta-item link-btns'>
<% if(post.btns.repo){ %>
<a class='btn flat-box' href='<%- post.btns.repo %>' style='background: <%- theme.meta.btns.repo.color %>'>
<i class='<%- theme.meta.btns.repo.icon %>' aria-hidden='true'></i>
<p><%- theme.meta.btns.repo.title %></p>
</a>
<% } %>
<% if(post.btns.bug){ %>
<a class='btn flat-box' href='<%- post.btns.bug %>' style='background: <%- theme.meta.btns.bug.color %>'>
<i class='<%- theme.meta.btns.bug.icon %>' aria-hidden='true'></i>
<p><%- theme.meta.btns.bug.title %></p>
</a>
<% } %>
<% if(post.btns.doubt){ %>
<a class='btn flat-box' href='<%- post.btns.doubt %>' style='background: <%- theme.meta.btns.doubt.color %>'>
<i class='<%- theme.meta.btns.doubt.icon %>' aria-hidden='true'></i>
<p><%- theme.meta.btns.doubt.title %></p>
</a>
<% } %>
<% if(post.btns.idea){ %>
<a class='btn flat-box' href='<%- post.btns.idea %>' style='background: <%- theme.meta.btns.idea.color %>'>
<i class='<%- theme.meta.btns.idea.icon %>' aria-hidden='true'></i>
<p><%- theme.meta.btns.idea.title %></p>
</a>
<% } %>
<% if(post.btns.faq){ %>
<a class='btn flat-box' href='<%- post.btns.faq %>' style='background: <%- theme.meta.btns.faq.color %>'>
<i class='<%- theme.meta.btns.faq.icon %>' aria-hidden='true'></i>
<p><%- theme.meta.btns.faq.title %></p>
</a>
<% } %>
<% if(post.btns.feedback){ %>
<a class='btn flat-box' href='<%- post.btns.feedback %>' style='background: <%- theme.meta.btns.feedback.color %>'>
<i class='<%- theme.meta.btns.feedback.icon %>' aria-hidden='true'></i>
<p><%- theme.meta.btns.feedback.title %></p>
</a>
<% } %>
<% if(post.btns.edit){ %>
<a class='btn flat-box' href='<%- post.btns.edit %>' style='background: <%- theme.meta.btns.edit.color %>'>
<i class='<%- theme.meta.btns.edit.icon %>' aria-hidden='true'></i>
<p><%- theme.meta.btns.edit.title %></p>
</a>
<% } %>
</div>
<% } %>

@ -1,40 +0,0 @@
<% if(post && post.links){ %>
<div class='new-meta-item link-btns'>
<% if(post.links.repo){ %>
<a class='btn flat-box' href='<%- post.links.repo %>' style='background: <%- theme.meta.links.repo.color %>'>
<i class='<%- theme.meta.links.repo.icon %>' aria-hidden='true'></i>
<p><%- theme.meta.links.repo.title %></p>
</a>
<% } %>
<% if(post.links.bug){ %>
<a class='btn flat-box' href='<%- post.links.bug %>' style='background: <%- theme.meta.links.bug.color %>'>
<i class='<%- theme.meta.links.bug.icon %>' aria-hidden='true'></i>
<p><%- theme.meta.links.bug.title %></p>
</a>
<% } %>
<% if(post.links.doubt){ %>
<a class='btn flat-box' href='<%- post.links.doubt %>' style='background: <%- theme.meta.links.doubt.color %>'>
<i class='<%- theme.meta.links.doubt.icon %>' aria-hidden='true'></i>
<p><%- theme.meta.links.doubt.title %></p>
</a>
<% } %>
<% if(post.links.idea){ %>
<a class='btn flat-box' href='<%- post.links.idea %>' style='background: <%- theme.meta.links.idea.color %>'>
<i class='<%- theme.meta.links.idea.icon %>' aria-hidden='true'></i>
<p><%- theme.meta.links.idea.title %></p>
</a>
<% } %>
<% if(post.links.faq){ %>
<a class='btn flat-box' href='<%- post.links.faq %>' style='background: <%- theme.meta.links.faq.color %>'>
<i class='<%- theme.meta.links.faq.icon %>' aria-hidden='true'></i>
<p><%- theme.meta.links.faq.title %></p>
</a>
<% } %>
<% if(post.links.feedback){ %>
<a class='btn flat-box' href='<%- post.links.feedback %>' style='background: <%- theme.meta.links.feedback.color %>'>
<i class='<%- theme.meta.links.feedback.icon %>' aria-hidden='true'></i>
<p><%- theme.meta.links.feedback.title %></p>
</a>
<% } %>
</div>
<% } %>

@ -175,8 +175,10 @@
notify: notify,
verify: verify,
guest_info: guest_info,
<% if(page.valine && page.valine.path) { %>
<% if (page.valine && page.valine.path) { %>
path: "<%= page.valine.path %>",
<% } else if (config.leancloud.valine_path) { %>
path: "<%= config.leancloud.valine_path %>",
<% } %>
appId: "<%= config.leancloud.app_id %>",
appKey: "<%= config.leancloud.app_key %>",

Loading…
Cancel
Save