可选 readmore 按钮

i18n
xaoxuu 4 years ago
parent 3036333558
commit 206dbd3f40
  1. 16
      README.md
  2. 32
      _config.yml
  3. 2
      layout/_meta/tags.ejs
  4. 2
      layout/_partial/head.ejs
  5. 20
      layout/_partial/post.ejs

@ -16,7 +16,7 @@ A minimalist card-style Hexo blog theme.
#### Easy to extend #### Easy to extend
- Use the [import](https://xaoxuu.com/wiki/material-x/config/#import) field to easily import css and js into the theme. - Use the [import](https://xaoxuu.com/wiki/volantis/config/#import) field to easily import css and js into the theme.
#### Mobile optimization #### Mobile optimization
@ -44,7 +44,7 @@ A minimalist card-style Hexo blog theme.
| [@xaoxuu](https://xaoxuu.com) | Not open source yet | myblog branch effect | | [@xaoxuu](https://xaoxuu.com) | Not open source yet | myblog branch effect |
- **For more examples, please see [#Example Blog](https://github.com/xaoxuu/hexo-theme-material-x/issues/97)** - **For more examples, please see [#Example Blog](https://github.com/xaoxuu/hexo-theme-volantis/issues/97)**
@ -70,7 +70,7 @@ hexo.sh i x
1. Download theme to `themes /` folder 1. Download theme to `themes /` folder
```bash ```bash
git clone https://github.com/xaoxuu/hexo-theme-material-x themes / material-x git clone https://github.com/xaoxuu/hexo-theme-volantis themes/volantis
``` ```
2. Then install the necessary dependencies 2. Then install the necessary dependencies
@ -84,7 +84,7 @@ npm i -S hexo-generator-search hexo-generator-json-content hexo-renderer-less
## Documentation ## Documentation
https://xaoxuu.com/wiki/material-x/ https://xaoxuu.com/wiki/volantis/
<br> <br>
@ -109,7 +109,7 @@ https://xaoxuu.com/wiki/material-x/
#### 易于扩展 #### 易于扩展
- 使用 [import](https://xaoxuu.com/wiki/material-x/config/#import) 字段方便导入css和js到主题中。 - 使用 [import](https://xaoxuu.com/wiki/volantis/config/#import) 字段方便导入css和js到主题中。
#### 移动端优化 #### 移动端优化
@ -137,7 +137,7 @@ https://xaoxuu.com/wiki/material-x/
| [@xaoxuu](https://xaoxuu.com) | 暂未开源 | myblog分支效果 | | [@xaoxuu](https://xaoxuu.com) | 暂未开源 | myblog分支效果 |
- **更多示例请见 [#示例博客](https://github.com/xaoxuu/hexo-theme-material-x/issues/97)** - **更多示例请见 [#示例博客](https://github.com/xaoxuu/hexo-theme-volantis/issues/97)**
@ -163,7 +163,7 @@ hexo.sh i x
1. 下载主题到 `themes/` 文件夹 1. 下载主题到 `themes/` 文件夹
```bash ```bash
git clone https://github.com/xaoxuu/hexo-theme-material-x themes/material-x git clone https://github.com/xaoxuu/hexo-theme-volantis themes/volantis
``` ```
2. 然后安装必要的依赖包 2. 然后安装必要的依赖包
@ -177,4 +177,4 @@ npm i -S hexo-generator-search hexo-generator-json-content hexo-renderer-less
## 文档 ## 文档
https://xaoxuu.com/wiki/material-x/ https://xaoxuu.com/wiki/volantis/

@ -1,17 +1,17 @@
############################### 主题基本信息 ############################### ############################### 主题基本信息 ###############################
info: info:
name: Material X name: Volantis
version: 1.5 version: 1.5.2
docs: https://xaoxuu.com/wiki/material-x/ docs: https://xaoxuu.com/wiki/volantis/
cdn: # 要使用CDN,请在根目录的config文件中写上 use_cdn: true cdn: # 要使用CDN,请在根目录的config文件中写上 use_cdn: true
css: css:
style: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@20.2.23/css/style.css # style: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@20.2.23/css/style.css
js: js:
app: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@20.2/js/app.js app: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@20.2.22/js/app.js
search: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@20.2/js/search.js search: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@20.2.22/js/search.js
volantis: https://cdn.jsdelivr.net/gh/xaoxuu/volantis@1.0.6/js/volantis.min.js volantis: https://cdn.jsdelivr.net/gh/xaoxuu/volantis@1.0.6/js/volantis.min.js
backstretch: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@20.2/js/backstretch.min.js backstretch: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@20.2.22/js/backstretch.min.js
commentTyping: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@20.2/js/commentTyping.js commentTyping: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@20.2.22/js/commentTyping.js
############################### 服务开关 ############################### ############################### 服务开关 ###############################
@ -41,6 +41,8 @@ style:
# 有背景图:开启毛玻璃,关闭卡片阴影 # 有背景图:开启毛玻璃,关闭卡片阴影
# 无背景图:关闭毛玻璃,开启卡片阴影 # 无背景图:关闭毛玻璃,开启卡片阴影
# readmore: true
# 幻灯片背景 # 幻灯片背景
backstretch: backstretch:
position: background # cover: 封面背景 background: 整个网页背景 position: background # cover: 封面背景 background: 整个网页背景
@ -131,13 +133,13 @@ navbar:
rel: nofollow rel: nofollow
- name: 主题文档 - name: 主题文档
icon: fas fa-book icon: fas fa-book
url: https://xaoxuu.com/wiki/material-x/ url: https://xaoxuu.com/wiki/volantis/
rel: nofollow rel: nofollow
- name: 关于小站 - name: 关于小站
icon: fas fa-info-circle icon: fas fa-info-circle
url: about/ url: about/
rel: nofollow rel: nofollow
# search: 搜索一下 # 搜索框文字 search: 搜索一下 # 搜索框文字
@ -148,7 +150,7 @@ layout:
# 文章列表(主页、自定义的列表)布局 # 文章列表(主页、自定义的列表)布局
on_list: on_list:
# 列表中每一篇文章的meta信息 # 列表中每一篇文章的meta信息
meta: [title, author, date, category, wordcount, top] meta: [title, author, date, category, tags, wordcount, top]
# 列表类页面的侧边栏 # 列表类页面的侧边栏
sidebar: [blogger, dao_hang, huan_ying, category, tagcloud, tui_jian, donate] sidebar: [blogger, dao_hang, huan_ying, category, tagcloud, tui_jian, donate]
# 文章页面布局 # 文章页面布局
@ -318,9 +320,9 @@ widget:
# fancybox: true # 是否允许点击放大 # fancybox: true # 是否允许点击放大
images: images:
- https://img.vim-cn.com/4e/3c87a2fd28fd0b9c2f27ce3f83f1e9275d0488.png - https://img.vim-cn.com/4e/3c87a2fd28fd0b9c2f27ce3f83f1e9275d0488.png
# - https://img.vim-cn.com/4e/3c87a2fd28fd0b9c2f27ce3f83f1e9275d0488.png - https://img.vim-cn.com/4e/3c87a2fd28fd0b9c2f27ce3f83f1e9275d0488.png
# - https://img.vim-cn.com/4e/3c87a2fd28fd0b9c2f27ce3f83f1e9275d0488.png - https://img.vim-cn.com/4e/3c87a2fd28fd0b9c2f27ce3f83f1e9275d0488.png
# - https://img.vim-cn.com/4e/3c87a2fd28fd0b9c2f27ce3f83f1e9275d0488.png - https://img.vim-cn.com/4e/3c87a2fd28fd0b9c2f27ce3f83f1e9275d0488.png
# --------------------------------------- # ---------------------------------------
# 自定义组件,仿照如下写法 # 自定义组件,仿照如下写法
- id: huan_ying # 唯一标识,自己命名,建议全英文 - id: huan_ying # 唯一标识,自己命名,建议全英文
@ -354,7 +356,7 @@ widget:
target: _self target: _self
- name: 主题文档 - name: 主题文档
icon: fas fa-book icon: fas fa-book
url: https://xaoxuu.com/wiki/material-x/ url: https://xaoxuu.com/wiki/volantis/
rel: external nofollow noopener noreferrer rel: external nofollow noopener noreferrer
target: _blank target: _blank
- name: 关于小站 - name: 关于小站

@ -1,4 +1,4 @@
<% if (!isPostList && post.tags && post.tags.length) { %> <% if (post.tags && post.tags.length) { %>
<% <%
var items = []; var items = [];
post.tags.each(function(item){ post.tags.each(function(item){

@ -1,4 +1,4 @@
<head hexo-theme='Material X' version='<%- theme.info.version %>' docs='https://xaoxuu.com/wiki/material-x/'> <head hexo-theme='Volantis' version='<%- theme.info.version %>' docs='https://xaoxuu.com/wiki/volantis/'>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<% <%

@ -4,20 +4,24 @@
<div class="article-entry" itemprop="articleBody"> <div class="article-entry" itemprop="articleBody">
<%- post.excerpt || post.description || post.content %> <%- post.excerpt || post.description || post.content %>
<% if ((post.readmore != false) && (post.excerpt || post.description || post.link)) { %> <% if ((post.readmore != false) && (post.excerpt || post.description || post.link)) { %>
<div class="button readmore"> <% if (theme.readmore) { %>
<a href="<%- url_for(post.link || post.path) %>" class="flat-box"> <div class="button readmore">
<i class="fas fa-book-open fa-fw" aria-hidden="true"></i> <a href="<%- url_for(post.link || post.path) %>" class="flat-box">
<%- __('post.read_more') %> <i class="fas fa-book-open fa-fw" aria-hidden="true"></i>
</a> <%- __('post.read_more') %>
</div> </a>
</div>
<% } else { %>
<% } %>
<% } %> <% } %>
</div> </div>
<% if (post.tags && post.tags.length) { %> <!-- <% if (post.tags && post.tags.length) { %>
<div class="full-width auto-padding tags"> <div class="full-width auto-padding tags">
<% post.tags.each(function(item){ %> <% post.tags.each(function(item){ %>
<a href="<%- url_for(item.path) %>" rel="nofollow"><i class="fas fa-tag fa-fw"></i> <%=item.name %></a> <a href="<%- url_for(item.path) %>" rel="nofollow"><i class="fas fa-tag fa-fw"></i> <%=item.name %></a>
<%})%> <%})%>
</div> </div>
<% } %> <% } %> -->
</section> </section>
</article> </article>

Loading…
Cancel
Save