i18n
xaoxuu 4 years ago
parent c5e89d9b7d
commit 76f857555e
  1. 170
      _config.yml
  2. 7
      languages/en.yml
  3. 7
      languages/zh-CN.yml
  4. 7
      languages/zh-HK.yml
  5. 7
      languages/zh-TW.yml
  6. 0
      layout/_meta/category.ejs
  7. 32
      layout/_meta/wordcount.ejs
  8. 174
      layout/_partial/article.ejs
  9. 64
      layout/_partial/side.ejs
  10. 2
      layout/_third-party/aplayer.ejs
  11. 8
      layout/_widget/blogger.ejs
  12. 4
      layout/_widget/category.ejs
  13. 4
      layout/_widget/grid.ejs
  14. 8
      layout/_widget/header.ejs
  15. 4
      layout/_widget/list.ejs
  16. 6
      layout/_widget/music.ejs
  17. 6
      layout/_widget/plain.ejs
  18. 4
      layout/_widget/related_posts.ejs
  19. 14
      layout/_widget/tagcloud.ejs
  20. 6
      layout/_widget/text.ejs
  21. 4
      layout/_widget/toc.ejs
  22. 15
      layout/tag.ejs
  23. 4
      source/less/_article.less
  24. 7
      source/less/_side.less

@ -4,7 +4,7 @@ info:
docs: https://xaoxuu.com/wiki/material-x/
cdn: # 要使用CDN,请在根目录的config文件中写上 use_cdn: true
css:
style: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@20.2.11/css/style.css
# style: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@20.2.11/css/style.css
js:
app: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@20.2/js/app.js
search: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@20.2/js/search.js
@ -18,12 +18,12 @@ style: pure # pure: 导航栏和标题栏背景是白色
############################### 服务开关 ###############################
commentTyping: false # 文本框打字机特效
scrollreveal: true # 页面滚动显示动画
nodewaves: true # 按钮点击效果
busuanzi: true # 访问量统计
# fastclick: true
# commentTyping: true # 文本框打字机特效
# wordcount: true # 文章字数统计、阅读时长,开启需要安装插件: npm i --save hexo-wordcount
############################### 默认值 ###############################
@ -34,7 +34,7 @@ music:
mode: circulation # random (随机) single (单曲) circulation (列表循环) order (列表)
server: netease # netease(网易云音乐)tencent(QQ音乐) xiami(虾米) kugou(酷狗)
type: playlist # song (单曲) album (专辑) playlist (歌单) search (搜索)
id: 2615636388 # 歌曲/专辑/歌单 ID
id: 3175833810 # 歌曲/专辑/歌单 ID
volume: 0.7 # 音量, 0~1
autoplay: false # 自动播放
@ -45,14 +45,12 @@ avatar_placeholder: https://cdn.jsdelivr.net/gh/xaoxuu/assets@master/avatar/avat
date_format: 'YYYY-MM-DD' # 文章发布日期的格式
updated_date_format: 'll' # 文章更新日期的格式
# 文章字数统计、阅读时长,默认关闭,开启需要安装插件: npm i --save hexo-wordcount
word_count: false
# 幻灯片
backstretch:
position: full # cover: 封面背景 full: 整个网页背景
duration: 6000 # 持续时间(毫秒)
fade: 2500 # 渐变(毫秒)
position: background # cover: 封面背景 background: 整个网页背景
duration: 6000 # 持续时间(毫秒)
fade: 2500 # 渐变(毫秒)
images:
- https://i.loli.net/2020/02/08/HNuVoted2mUxILl.jpg
- https://i.loli.net/2020/02/08/dNJyR4LHtarTqPu.jpg
@ -64,7 +62,7 @@ backstretch:
############################### 自定义 ###############################
# page的封面
cover:
scheme: search # 后期将会提供多种封面方案
scheme: search # 后期将会提供多种封面布局方案
height: half # full(默认值): 首页封面占据整个第一屏幕,其他页面占半个屏幕高度, half: 所有页面都封面都只占半个屏幕高度
title: Demo
# logo: assets/logo.png # logo和title只显示一个,若同时设置,则只显示logo
@ -92,18 +90,22 @@ menu_desktop:
- name: 示例
icon: fas fa-grin
url: /
target: _self
- name: 分类
icon: fas fa-folder-open
url: blog/categories/
rel: nofollow
target: _self
- name: 标签
icon: fas fa-hashtag
url: blog/tags/
rel: nofollow
target: _self
- name: 归档
icon: fas fa-archive
url: blog/archives/
rel: nofollow
target: _self
# 手机端导航菜单(从右上角的按钮点击展开)
menu_mobile:
@ -130,39 +132,104 @@ menu_mobile:
url: about/
rel: nofollow
# 布局
layout:
# 文章列表(主页、自定义的列表)布局
posts:
# 列表中每一篇文章的meta信息
meta: [title, author, date, categories, wordcount, top]
meta: [title, author, date, category, wordcount, top]
# 列表类页面的侧边栏
sidebar: [author, plain, list, grid, category, tagcloud, music]
sidebar: [blogger, dao_hang, huan_ying, category, tagcloud, music, tui_jian]
# 文章页面布局
article:
# 文章页面主体元素,你也可以在页面的Front-matter中设置
body: [article, comments]
body: [article, comments ]
# 默认的meta信息,文章中没有配置则按照这里的配置来显示,设置为false则不显示
# 其中,title只在header中有效,music和thumbnail无需在这里设置,文章中有则显示
# 如果tags放置在meta.header中,那么在post列表中不显示(因为卡片下方已经有了)
header: [title, author, date, categories, counter, wordcount, top]
header: [title, author, date, category, counter, wordcount, top]
footer: [updated, tags, share]
# 文章页面的侧边栏
sidebar: [author, plain, toc, grid, category, tagcloud, list, related_posts]
sidebar: [blogger, toc, category, tagcloud]
# 其他的页面布局暂时等于文章列表
# 侧边栏小部件配置
sidebar:
- widget: author
# 组件库配置
widget:
# ---------------------------------------
# 博主信息小部件配置
- id: blogger
class: blogger
avatar: https://cdn.jsdelivr.net/gh/xaoxuu/assets@master/avatar/avatar.png
jinrishici: true
# title: 标题
# subtitle: 副标题
jinrishici: true # 今日诗词。可以设置字符串,加载失败时会显示占位字符串。
social: true
- widget: plain
# ---------------------------------------
# 目录小部件配置(仅在文章中有效)
- id: toc
class: toc
icon: fas fa-list
title: 本文目录
list_number: false # 是否显示章节
max_depth: 5 # 由于宽度有限,主题没有针对所有层级进行布局优化,建议文章最多分为:H2/H3/H4/H5四个层级
# ---------------------------------------
# 文章分类小部件配置
- id: category
class: category
icon: fas fa-folder-open
title: 文章分类
more: # 右上角的按钮
icon: fas fa-expand-arrows-alt
url: blog/categories/
rel: external nofollow noopener noreferrer
target: _self
# ---------------------------------------
# 标签云小部件配置
- id: tagcloud
class: tagcloud
icon: fas fa-tags
title: 热门标签
more: # 右上角的按钮
icon: fas fa-expand-arrows-alt
url: blog/tags/
rel: external nofollow noopener noreferrer
target: _self
min_font: 14
max_font: 24
color: true
start_color: '#999'
end_color: '#555'
order: -1
# ---------------------------------------
# 相关文章小部件配置
- id: related_posts
class: related_posts # 需要安装插件 npm i -S hexo-related-popular-posts
icon: fas fa-bookmark
title: 相关文章
# ---------------------------------------
# 音乐小部件配置
- id: music
class: music
icon: fas fa-compact-disc
title: "最近在听"
more: # 右上角的按钮
icon: far fa-heart
url: https://music.163.com/#/user/home?id=63035382
rel: external nofollow noopener noreferrer
target: _blank
server: netease # netease(网易云音乐)tencent(QQ音乐) xiami(虾米) kugou(酷狗)
type: playlist # song (单曲) album (专辑) playlist (歌单) search (搜索)
mid: 3175833810 # 歌曲/专辑/歌单 ID
# ---------------------------------------
# 自定义组件,仿照如下写法
- id: huan_ying # 唯一标识,自己命名,建议全英文
class: text # 小部件类型,对应_widget文件夹中的文件名
icon: fas fa-file
title: 文本部件
body: '这是一段支持markdown的文本<br>![](https://img.vim-cn.com/4e/3c87a2fd28fd0b9c2f27ce3f83f1e9275d0488.png)'
- widget: toc
- widget: grid
- id: dao_hang
class: grid
icon: fas fa-map-signs
title: 站内导航
rows:
@ -172,63 +239,55 @@ sidebar:
- name: 文章归档
icon: fas fa-archive
url: blog/archives/
rel: nofollow
rel: external nofollow noopener noreferrer
target: _self
- name: 开源项目
icon: fas fa-code-branch
url: projects/
- name: 我的友链
icon: fas fa-link
url: friends/
rel: nofollow
rel: external nofollow noopener noreferrer
target: _self
- name: 主题文档
icon: fas fa-book
url: https://xaoxuu.com/wiki/material-x/
rel: nofollow
rel: external nofollow noopener noreferrer
target: _blank
- name: 关于小站
icon: fas fa-info-circle
url: about/
rel: nofollow
- widget: category
more:
icon: fas fa-expand-arrows-alt
url: blog/categories/
rel: nofollow
- widget: tagcloud
icon: fas fa-tags
more:
icon: fas fa-expand-arrows-alt
url: blog/tags/
rel: nofollow
# - widget: related_posts # 需要安装插件 npm i -S hexo-related-popular-posts
- widget: music
icon: fas fa-compact-disc
title: "最近在听"
more:
icon: far fa-heart
url: https://music.163.com/#/user/home?id=63035382
rel: external nofollow noopener noreferrer
target: _blank
server: netease # netease(网易云音乐)tencent(QQ音乐) xiami(虾米) kugou(酷狗)
type: playlist # song (单曲) album (专辑) playlist (歌单) search (搜索)
id: 3175833810 # 歌曲/专辑/歌单 ID
- widget: list
rel: external nofollow noopener noreferrer
target: _self
- id: tui_jian
class: list
icon: fas fa-thumbs-up
title: 强烈推荐
rows:
- name: Hexo脚本(Mac)
url: https://xaoxuu.com/wiki/hexo.sh/
rel: external nofollow noopener noreferrer
target: _blank
- name: 图床脚本(Mac)
url: https://xaoxuu.com/wiki/vim-cn.sh/
rel: external nofollow noopener noreferrer
target: _blank
- name: 图片在线压缩
url: https://yasuotu.com
rel: external nofollow noopener noreferrer
target: _blank
- name: 生成Favicon
url: https://realfavicongenerator.net
rel: external nofollow noopener noreferrer
target: _blank
- name: 简历主题
url: https://mxclub.github.io/resume/
rel: external nofollow noopener noreferrer
target: _blank
# 社交信息
# 社交信息配置
social:
- icon: fas fa-rss
url: atom.xml
@ -241,7 +300,6 @@ social:
# 分享按钮
# 当id为qrcode时需要安装插件 npm i -S hexo-helper-qrcode
share:
- id: qq
name: QQ好友
@ -249,18 +307,18 @@ share:
- id: qzone
name: QQ空间
img: https://cdn.jsdelivr.net/gh/xaoxuu/assets@19.1.9/logo/128/qzone.png
# - id: qrcode
# - id: qrcode # 当id为qrcode时需要安装插件 npm i -S hexo-helper-qrcode
# name: 微信
# img: https://cdn.jsdelivr.net/gh/xaoxuu/assets@19.1.9/logo/128/wechat.png
- id: weibo
name: 微博
img: https://cdn.jsdelivr.net/gh/xaoxuu/assets@19.1.9/logo/128/weibo.png
# - id: qrcode
# - id: qrcode # 当id为qrcode时需要安装插件 npm i -S hexo-helper-qrcode
# name: QRcode
# img: https://cdn.jsdelivr.net/gh/xaoxuu/assets@19.1.9/logo/128/qrcode.png
footer_post: '<center>这是文章页脚,可以设置打赏图片:<br><fancybox>![](https://img.vim-cn.com/4a/5f8244a7c6e1e069a781b84ed11008e7955e16.png)</fancybox></center>'
footer_post: '<blockquote>这是文章页脚,可以放置版权说明以及打赏图片。</blockquote><center><fancybox><img src="https://img.vim-cn.com/4a/5f8244a7c6e1e069a781b84ed11008e7955e16.png" width=64px></fancybox></center>'
# footer: '网页页脚文字,支持[markdown](/)'

@ -1,12 +1,9 @@
sidebar:
category: Categories
tagcloud: Hot Tags
toc: TOC
related_posts: Related Posts
post:
top: Top
read_more: Read More
sticky: Sticky
wordcount: '%s words'
duration: '%s min'
comments: Comments
comments_placeholder: Unable to load %s, please make sure your network can access.
copy_button: Copy

@ -1,12 +1,9 @@
sidebar:
category: 文章分类
tagcloud: 热门标签
toc: 本文目录
related_posts: 相关文章
post:
top: 置顶
read_more: 阅读全文
sticky: 置顶
wordcount: '字数:%s字'
duration: '时长:%s分钟'
comments: 评论
comments_placeholder: 无法加载%s评论系统,请确保您的网络能够正常访问。
copy_button: 复制

@ -1,12 +1,9 @@
sidebar:
category: 文章分類
tagcloud: 熱門標籤
toc: 本文目錄
related_posts: 相關文章
post:
top: 置頂
read_more: 閱讀全文
sticky: 置頂
wordcount: '字數:%s字'
  duration: '時長:%s分鐘'
comments: 評論
comments_placeholder: 無法加載%s評論系統,請確保您的網絡能夠正常訪問。
copy_button: 複製

@ -1,12 +1,9 @@
sidebar:
category: 文章分類
tagcloud: 熱門標籤
toc: 本文目錄
related_posts: 相關文章
post:
top: 置頂
read_more: 閱讀全文
sticky: 置頂
wordcount: '字數:%s字'
  duration: '時長:%s分鐘'
comments: 評論
comments_placeholder: 無法加載%s評論系統,請確保您的網絡能夠正常訪問。
copy_button: 複製

@ -1,18 +1,14 @@
<% if(isPostList || !isPostList){ %>
<% if (theme.word_count && !post.no_word_count) { %>
<div class="new-meta-item wordcount">
<a class='notlink'>
<i class="fas fa-keyboard" aria-hidden="true"></i>
<p>字数统计:</p>
<p><%= wordcount(post.content) %>字</p>
</a>
</div>
<div class="new-meta-item readtime">
<a class='notlink'>
<i class="fas fa-hourglass-half" aria-hidden="true"></i>
<p>阅读时长≈</p>
<p><%= min2read(post.content) %>分</p>
</a>
</div>
<% } %>
<% } %>
<% if (theme.wordcount) { %>
<div class="new-meta-item wordcount">
<a class='notlink'>
<i class="fas fa-keyboard" aria-hidden="true"></i>
<p><%- __('post.wordcount', wordcount(post.content))%></p>
</a>
</div>
<div class="new-meta-item readtime">
<a class='notlink'>
<i class="fas fa-hourglass-half" aria-hidden="true"></i>
<p><%- __('post.duration', min2read(post.content))%></p>
</a>
</div>
<% } %>

@ -1,94 +1,90 @@
<% var sections = page.body ? page.body : theme.layout.article.body; %>
<% if (sections.indexOf('article') > -1) { %>
<article id="<%= post.layout %>" class="post white-box article-type-<%= post.layout %>" itemscope itemprop="blogPost">
<%- partial('meta', {post: post, position: 'header'}) %>
<section class="article typo">
<div class="article-entry" itemprop="articleBody">
<%- post.content %>
</div>
<% if(theme.footer_post){ %>
<br>
<%- markdown(theme.footer_post) %>
<% } %>
<% if(post.layout == 'post'){ %>
<br>
<%- partial('meta', {post: post, position: 'footer'}) %>
<% } %>
<% if(post.prev || post.next){ %>
<div class="prev-next">
<% if(post.prev){ %>
<section class="prev">
<span class="art-item-left">
<h6><i class="fas fa-chevron-left" aria-hidden="true"></i>&nbsp;<%- __('post.prev_page') %></h6>
<h4>
<a href="<%=url_for(post.prev.path)%>" rel="prev" title="<%=post.prev.title%>">
<% if(post.prev.title){ %>
<%= post.prev.title %>
<% } else if (post.prev.date) { %>
<%= date(post.prev.date, config.date_format) %>
<% } %>
</a>
</h4>
<% if (post.prev.tags && post.prev.tags.length && post.prev.tags.each) { %>
<%
var items = [];
post.prev.tags.each(function(item){
items.push('<a class="tag" href="'+url_for(item.path)+'"><i class="fas fa-tag fa-fw" aria-hidden="true"></i> ' + item.name + '</a>');
});
%>
<h6 class="tags">
<%- items.join(' ') %>
</h6>
<% } %>
</span>
</section>
<% } %>
<% if(post.next){ %>
<section class="next">
<span class="art-item-right" aria-hidden="true">
<h6><%- __('post.next_page') %>&nbsp;<i class="fas fa-chevron-right" aria-hidden="true"></i></h6>
<h4>
<a href="<%=url_for(post.next.path)%>" rel="prev" title="<%=post.next.title%>">
<% if(post.next.title){ %>
<%= post.next.title %>
<% } else if (post.next.date) { %>
<%= date(post.next.date, config.date_format) %>
<% } %>
</a>
</h4>
<% if (post.next.tags && post.next.tags.length && post.next.tags.each) { %>
<%
var items = [];
post.next.tags.each(function(item){
items.push('<a class="tag" href="'+url_for(item.path)+'"><i class="fas fa-tag fa-fw" aria-hidden="true"></i> ' + item.name + '</a>');
});
%>
<h6 class="tags">
<%- items.join(' ') %>
</h6>
<% } %>
</span>
</section>
<%} %>
</div>
<%} %>
</section>
</article>
<% } %>
<% if (sections.indexOf('category') > -1 || sections.indexOf('tagcloud') > -1 || sections.indexOf('related_posts') > -1) { %>
<% sections.forEach(function(sectionName){ %>
<% if (['category', 'tagcloud', 'related_posts'].indexOf(sectionName) > -1) { %>
<% theme.sidebar.forEach(function(item){ %>
<% if (item.widget == sectionName) { %>
<%- partial('../_widget/' + item.widget, {item: item}) %>
<% sections.forEach(function(widget_id){ %>
<% if (widget_id == 'article') { %>
<article id="<%= post.layout %>" class="post white-box article-type-<%= post.layout %>" itemscope itemprop="blogPost">
<%- partial('meta', {post: post, position: 'header'}) %>
<section class="article typo">
<div class="article-entry" itemprop="articleBody">
<%- post.content %>
<% if(theme.footer_post){ %>
<br>
<%- markdown(theme.footer_post) %>
<% } %>
</div>
<% if(post.layout == 'post'){ %>
<br>
<%- partial('meta', {post: post, position: 'footer'}) %>
<% } %>
<% }) %>
<% } %>
<% }) %>
<% } %>
<% if (sections.indexOf('comments') > -1) { %>
<%- partial('../_third-party/comments') %>
<% } %>
<% if(post.prev || post.next){ %>
<div class="prev-next">
<% if(post.prev){ %>
<section class="prev">
<span class="art-item-left">
<h6><i class="fas fa-chevron-left" aria-hidden="true"></i>&nbsp;<%- __('post.prev_page') %></h6>
<h4>
<a href="<%=url_for(post.prev.path)%>" rel="prev" title="<%=post.prev.title%>">
<% if(post.prev.title){ %>
<%= post.prev.title %>
<% } else if (post.prev.date) { %>
<%= date(post.prev.date, config.date_format) %>
<% } %>
</a>
</h4>
<% if (post.prev.tags && post.prev.tags.length && post.prev.tags.each) { %>
<%
var items = [];
post.prev.tags.each(function(item){
items.push('<a class="tag" href="'+url_for(item.path)+'"><i class="fas fa-tag fa-fw" aria-hidden="true"></i> ' + item.name + '</a>');
});
%>
<h6 class="tags">
<%- items.join(' ') %>
</h6>
<% } %>
</span>
</section>
<% } %>
<% if(post.next){ %>
<section class="next">
<span class="art-item-right" aria-hidden="true">
<h6><%- __('post.next_page') %>&nbsp;<i class="fas fa-chevron-right" aria-hidden="true"></i></h6>
<h4>
<a href="<%=url_for(post.next.path)%>" rel="prev" title="<%=post.next.title%>">
<% if(post.next.title){ %>
<%= post.next.title %>
<% } else if (post.next.date) { %>
<%= date(post.next.date, config.date_format) %>
<% } %>
</a>
</h4>
<% if (post.next.tags && post.next.tags.length && post.next.tags.each) { %>
<%
var items = [];
post.next.tags.each(function(item){
items.push('<a class="tag" href="'+url_for(item.path)+'"><i class="fas fa-tag fa-fw" aria-hidden="true"></i> ' + item.name + '</a>');
});
%>
<h6 class="tags">
<%- items.join(' ') %>
</h6>
<% } %>
</span>
</section>
<%} %>
</div>
<%} %>
</section>
</article>
<% } else if (widget_id == 'comments') { %>
<%- partial('../_third-party/comments') %>
<% } else { %>
<% theme.widget.forEach(function(widget){ %>
<% if (widget.id == widget_id){ %>
<%- partial('../_widget/' + widget.class, {item: widget}) %>
<% } %>
<% }) %>
<% } %>
<% }) %>
<%
if (sections.indexOf('comments') < 0) {

@ -1,44 +1,32 @@
<aside class='l_side'>
<% if (theme.sidebar && theme.sidebar.length){ %>
<% if (page.sidebar) { %>
<% page.sidebar.forEach(function(widget_id){ %>
<% theme.widget.forEach(function(widget){ %>
<% if (widget.id == widget_id){ %>
<%- partial('../_widget/' + widget.class, {item: widget}) %>
<% } %>
<% }) %>
<% }) %>
<% } else { %>
<%
let supportWidgets = ['author', 'category', 'list', 'music', 'tagcloud', 'toc', 'plain', 'related_posts', 'grid'];
var ids = [];
if(is_home() || is_category() || is_archive() || is_tag() || page.layout == 'list') {
var isPostList = true;
} else {
var isPostList = false;
}
if (isPostList) {
ids = theme.layout.posts.sidebar;
} else {
ids = theme.layout.article.sidebar;
}
%>
<% if (page.sidebar) { %>
<% page.sidebar.forEach(function(name){ %>
<% theme.sidebar.forEach(function(item){ %>
<% let widget_name = item.widget ? item.widget : 'plain'; %>
<% if (item.enable != false && widget_name == name){ %>
<% if (supportWidgets.indexOf(widget_name) > -1){ %>
<%- partial('../_widget/' + item.widget, {item: item}) %>
<% } %>
<% } %>
<% }) %>
<% }) %>
<% } else { %>
<%
var names = [];
if(is_home() || is_category() || is_archive() || is_tag() || page.layout == 'list') {
var isPostList = true;
} else {
var isPostList = false;
}
if (isPostList) {
names = theme.layout.posts.sidebar;
} else {
names = theme.layout.article.sidebar;
}
%>
<% names.forEach(function(name){ %>
<% theme.sidebar.forEach(function(item){ %>
<% let widget_name = item.widget ? item.widget : 'plain'; %>
<% if (item.enable != false && widget_name == name){ %>
<% if (supportWidgets.indexOf(widget_name) > -1){ %>
<%- partial('../_widget/' + item.widget, {item: item}) %>
<% } %>
<% } %>
<% }) %>
<% ids.forEach(function(widget_id){ %>
<% theme.widget.forEach(function(widget){ %>
<% if (widget.id == widget_id){ %>
<%- partial('../_widget/' + widget.class, {item: widget}) %>
<% } %>
<% }) %>
<% } %>
<% }) %>
<% } %>
</aside>

@ -7,7 +7,7 @@
data-mode="<%- aplayer_mode != undefined ? aplayer_mode : theme.music.mode %>"
data-server="<%= aplayer_server != undefined ? aplayer_server : theme.music.server %>"
data-type="<%= aplayer_type != undefined ? aplayer_type : theme.music.type %>"
data-id="<%= aplayer_id != undefined ? aplayer_id : theme.music.id %>"
data-id="<%= aplayer_id != undefined ? aplayer_id : theme.music.mid %>"
data-volume="<%= aplayer_volume != undefined ? aplayer_volume : theme.music.volume %>">
</div>
<script src="https://cdn.jsdelivr.net/npm/aplayer@1.7.0/dist/APlayer.min.js"></script>

@ -1,17 +1,17 @@
<section class='widget <%- item.widget %>'>
<section class='widget <%- item.class %>'>
<div class='content <%= theme.style %>'>
<% if(item.avatar) { %>
<div class='avatar'>
<img class='avatar' src='<%- url_for(item.avatar) %>'/>
</div>
<%} %>
<% if (item.title || item.body || item.jinrishici) { %>
<% if (item.title || item.subtitle || item.jinrishici) { %>
<div class='text'>
<% if (item.title){ %>
<h2><%- item.title %></h2>
<% } %>
<% if (item.body){ %>
<%- markdown(item.body) %>
<% if (item.subtitle){ %>
<%- markdown(item.subtitle) %>
<% } %>
<% if (item.jinrishici){ %>
<p><span id="jinrishici-sentence"><%- item.jinrishici != true ? item.jinrishici : config.title %></span></p>

@ -1,6 +1,6 @@
<% if (site.categories.length){ %>
<section class='widget <%- item.widget %>'>
<%- partial('header', {item: item, defIcon: 'fas fa-folder-open', defTitle: __('sidebar.category')}) %>
<section class='widget <%- item.class %>'>
<%- partial('header', {item: item}) %>
<div class='content <%= theme.style %>'>
<ul class="entry">
<% site.categories.sort('path').each(function(category){ %>

@ -1,5 +1,5 @@
<section class='widget <%- item.widget %>'>
<%- partial('header', {item: item, defIcon: '', defTitle: ''}) %>
<section class='widget <%- item.class %>'>
<%- partial('header', {item: item}) %>
<div class='content <%= theme.style %>'>
<ul class="grid navgation">
<% (item.rows||[]).forEach(function(row){ %>

@ -1,10 +1,6 @@
<%
let icon = item.icon ? item.icon : defIcon;
let title = item.title ? item.title : defTitle;
%>
<header class='<%= theme.style %>'>
<div><i class="<%- icon %> fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;<%- title %></div>
<% if (item.widget == 'toc') { %>
<div><i class="<%- item.icon %> fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;<%- item.title %></div>
<% if (item.class == 'toc') { %>
<!-- <div class='wrapper'><a class="s-toc rightBtn" rel="external nofollow noopener noreferrer" href="javascript:void(0)"><i class="fas fa-thumbtack fa-fw"></i></a></div> -->
<% } else if(item.more && item.more.url) { %>
<a class="rightBtn<%- item.more.animate ? ' ' + item.more.animate : '' %>"

@ -1,5 +1,5 @@
<section class='widget <%- item.widget %>'>
<%- partial('header', {item: item, defIcon: '', defTitle: ''}) %>
<section class='widget <%- item.class %>'>
<%- partial('header', {item: item}) %>
<div class='content <%= theme.style %>'>
<ul class="entry">
<% (item.rows||[]).forEach(function(row){ %>

@ -9,12 +9,12 @@ if (page.widget && page.widget.music == false) {
%>
<% if (theme.music && theme.music.enable == true && needDisplay == true) { %>
<section class='widget <%- item.widget %>'>
<%- partial('header', {item: item, defIcon: '', defTitle: ''}) %>
<section class='widget <%- item.class %>'>
<%- partial('header', {item: item}) %>
<div class='content <%= theme.style %>'>
<%- partial('../_third-party/aplayer',
{aplayer_theme: item.color, aplayer_mini: false, aplayer_mode: item.mode,
aplayer_server: item.server, aplayer_type: item.type, aplayer_id: item.id,
aplayer_server: item.server, aplayer_type: item.type, aplayer_id: item.mid,
aplayer_volume: item.volume, aplayer_autoplay: item.autoplay?item.autoplay:false }) %>
</div>
</section>

@ -1,6 +0,0 @@
<section class='widget <%- item.widget?item.widget:'plain' %>'>
<%- partial('header', {item: item, defIcon: '', defTitle: ''}) %>
<div class='content <%= theme.style %>'>
<%- markdown(item.body) %>
</div>
</section>

@ -1,6 +1,6 @@
<% if(page.layout == 'post' && page.content && page.path != undefined){ %>
<section class='widget <%- item.widget %>'>
<%- partial('header', {item: item, defIcon: 'fas fa-bookmark', defTitle: __('sidebar.related_posts')}) %>
<section class='widget <%- item.class %>'>
<%- partial('header', {item: item}) %>
<div class="content <%= theme.style %>">
<%- popular_posts( { maxCount: 10 , ulClass: 'popular-posts' , PPMixingRate: 0.2 } , page ) %>
</div>

@ -1,13 +1,13 @@
<% if (site.tags.length){ %>
<section class='widget <%- item.widget %>'>
<%- partial('header', {item: item, defIcon: 'fas fa-tags', defTitle: __('sidebar.tagcloud')}) %>
<section class='widget <%- item.class %>'>
<%- partial('header', {item: item}) %>
<div class='content <%= theme.style %>'>
<%- tagcloud(site.tags, {
min_font: 14,
max_font: 24,
color: true,
start_color: item.start_color ? item.start_color : '#999',
end_color: item.end_color ? item.end_color : '#555',
min_font: item.min_font,
max_font: item.max_font,
color: item.color,
start_color: item.start_color,
end_color: item.end_color,
}) %>
</div>
</section>

@ -0,0 +1,6 @@
<section class='widget <%- item.class?item.class:'text' %>'>
<%- partial('header', {item: item}) %>
<div class='content <%= theme.style %>'>
<%- markdown(item.body) %>
</div>
</section>

@ -1,8 +1,8 @@
<% if(page.layout == 'post' && page.content && toc(page.content).length > 0){ %>
<section class='widget toc-wrapper'>
<%- partial('header', {item: item, defIcon: 'fas fa-list', defTitle: __('sidebar.toc')}) %>
<%- partial('header', {item: item}) %>
<div class='content <%= theme.style %>'>
<%- toc(page.content, {list_number: false}) %>
<%- toc(page.content, {list_number: item.list_number, max_depth: item.max_depth}) %>
</div>
</section>
<% } %>

@ -10,15 +10,14 @@
<h2><%- page.title %></h2>
</div>
<div class="archive-item all-tags">
<% theme.sidebar.forEach(function(item){ %>
<% let widget_name = item.widget ? item.widget : 'plain'; %>
<% if (item.enable != false && widget_name == 'tagcloud'){ %>
<% theme.widget.forEach(function(item){ %>
<% if (item.class == 'tagcloud'){ %>
<%- tagcloud(site.tags, {
min_font: 16,
max_font: 32,
color: false,
start_color: item.start_color ? item.start_color : '#999',
end_color: item.end_color ? item.end_color : '#666',
min_font: item.min_font,
max_font: item.max_font,
color: item.color,
start_color: item.start_color,
end_color: item.end_color,
}) %>
<% } %>
<% }) %>

@ -44,8 +44,8 @@
// text-align: justify;
strong{
color: @color_text_main;
padding-left: 2px;
padding-right: 2px;
// padding-left: 2px;
// padding-right: 2px;
}
max-width: 100%;
overflow: auto;

@ -114,7 +114,7 @@
}
&.author{
&.blogger{
.enable-trans();
.content{
padding: 0;
@ -148,6 +148,7 @@
text-align: center;
font-weight: bold;
margin: @gap/2;
margin-top: @gap;
@media(max-width: @on_pad){
margin: @gap/2;
}
@ -193,12 +194,12 @@
}
@media(max-width: @on_pad){
box-shadow: none;
background: @theme_background;
background: transparent;
margin-top: 2*@gap;
}
}
&.plain{
&.text{
.content{
font-size: @fontsize_small;
font-weight: bold;

Loading…
Cancel
Save