From e944eda8347ae868365722141f9fc2920b1c41ba Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Sun, 9 Feb 2020 21:19:31 +0800 Subject: [PATCH] update --- _config.yml | 2 +- layout/_partial/post.ejs | 2 +- layout/category.ejs | 3 +-- layout/tag.ejs | 29 ++++++++++++++--------------- source/less/_archive.less | 17 +++++++++++++++++ 5 files changed, 34 insertions(+), 19 deletions(-) diff --git a/_config.yml b/_config.yml index bcddf9b..4fc7ff6 100755 --- a/_config.yml +++ b/_config.yml @@ -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.9/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 diff --git a/layout/_partial/post.ejs b/layout/_partial/post.ejs index e56d708..a0d6a12 100755 --- a/layout/_partial/post.ejs +++ b/layout/_partial/post.ejs @@ -4,7 +4,7 @@
<%- post.excerpt || post.description %> <% if (post.readmore != false && post.path) { %> -
+
<%- __('post.read_more') %> diff --git a/layout/category.ejs b/layout/category.ejs index fc1ea2a..8917499 100755 --- a/layout/category.ejs +++ b/layout/category.ejs @@ -8,9 +8,8 @@

<%- page.title %>

-
-
+
<% if (site.categories.length){ %> <% site.categories.sort('path').each(function(category){ %> diff --git a/layout/tag.ejs b/layout/tag.ejs index f928c1a..9fd1ba4 100755 --- a/layout/tag.ejs +++ b/layout/tag.ejs @@ -1,5 +1,5 @@ <% page.comments = false; %> -
+
'> <% if (site.posts && site.posts.length > 0) { %> <% if (page.layout == 'tag') { %>
@@ -8,21 +8,20 @@

<%- page.title %>

-
-
- <% if (site.tags.length){ %> - <% site.tags.sort('path').each(function(tags){ %> - <% if (tags.posts.length){ %> - - - - (<%- tags.posts.length %>) - - - <% } %> - <% }) %> - <% } %> +
+ <% theme.sidebar.forEach(function(item){ %> + <% let widget_name = item.widget ? item.widget : 'plain'; %> + <% if (item.enable != false && widget_name == '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', + }) %> + <% } %> + <% }) %>

<%- page.content %> diff --git a/source/less/_archive.less b/source/less/_archive.less index f1ddc84..7cd9221 100755 --- a/source/less/_archive.less +++ b/source/less/_archive.less @@ -73,5 +73,22 @@ } } } + + .all-tags { + display: flex; + flex-wrap: wrap; + align-items: flex-start; + justify-content: flex-start; + align-items: baseline; + word-spacing: @gap/2; + text-align: center; + a { + color: fade(@color_text_main, 80%); + margin-right: @gap; + &:hover,&:active,&.active{ + color: @color_text_highlight; + } + } + } } }