diff --git a/_config.yml b/_config.yml index cd0c951..0550936 100755 --- a/_config.yml +++ b/_config.yml @@ -23,7 +23,7 @@ widgets: title: "博文分类" # 文章标签的默认配置 tagcloud: - icon: fas fa-tags + icon: fas fa-fire title: "热门话题" # 文章目录的默认配置 toc: diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs index bff5c42..e632468 100755 --- a/layout/_partial/article.ejs +++ b/layout/_partial/article.ejs @@ -92,7 +92,7 @@
-<%- partial('comments') %> +<%- partial('../_third-party/comments') %> - + <%- partial('../_third-party/aplayer', + {aplayer_theme: '', aplayer_mini: true, aplayer_mode: 'circulation', + aplayer_server: post.music.server, aplayer_type: post.music.type, aplayer_id: post.music.id, + aplayer_volume: '0.7', aplayer_autoplay: false }) %> <% } %>
<% if(isPostList){ %> diff --git a/layout/_partial/scripts.ejs b/layout/_partial/scripts.ejs index 4be629f..3863cc2 100755 --- a/layout/_partial/scripts.ejs +++ b/layout/_partial/scripts.ejs @@ -74,7 +74,6 @@ <% } else { %> <%- js('js/volantis.js') %> <% } %> - + diff --git a/layout/_partial/comments.ejs b/layout/_third-party/comments.ejs similarity index 99% rename from layout/_partial/comments.ejs rename to layout/_third-party/comments.ejs index 3a74b24..5c0885c 100644 --- a/layout/_partial/comments.ejs +++ b/layout/_third-party/comments.ejs @@ -39,7 +39,6 @@ <% } %> <% } %> <% } %> - <% } %> diff --git a/layout/_partial/recommended_posts.ejs b/layout/_third-party/recommended_posts.ejs similarity index 100% rename from layout/_partial/recommended_posts.ejs rename to layout/_third-party/recommended_posts.ejs diff --git a/layout/_widget/author.ejs b/layout/_widget/author.ejs index b3eb8f8..c97dae8 100755 --- a/layout/_widget/author.ejs +++ b/layout/_widget/author.ejs @@ -1,24 +1,29 @@ -<% if(item.avatar) { %> -
- -
-<%} %> -<% if (item.title || item.body) { %> -
- <% if (item.title){ %> -

<%- item.title %>

+
+
+ <% if(item.avatar) { %> +
+ +
+ <%} %> + <% if (item.title || item.body) { %> +
+ <% if (item.title){ %> +

<%- item.title %>

+ <% } %> + <% if (item.body){ %> + <%- markdown(item.body) %> + <% } %> +
<% } %> - <% if (item.body){ %> - <%- markdown(item.body) %> + <% if (item.social == true && config.social) { %> + <% } %>
-<% } %> -<% if (item.social == true && config.social) { %> - -<% } %> + +
diff --git a/layout/_widget/category.ejs b/layout/_widget/category.ejs index 1c3e21c..e239514 100755 --- a/layout/_widget/category.ejs +++ b/layout/_widget/category.ejs @@ -1,7 +1,12 @@ <% if (site.categories.length){ %> - +
+ <%- partial('header', {item: item, defIcon: theme.widgets.category.icon, defTitle: theme.widgets.category.title}) %> +
+ +
+
<% } %> diff --git a/layout/_widget/header.ejs b/layout/_widget/header.ejs new file mode 100755 index 0000000..7e3c3a2 --- /dev/null +++ b/layout/_widget/header.ejs @@ -0,0 +1,16 @@ +<% + let icon = item.icon ? item.icon : defIcon; + let title = item.title ? item.title : defTitle; +%> +
+
  <%- title %>
+ <% if (item.widget == 'toc') { %> +
+ <% } else if(item.more && item.more.url) { %> + + + <% } %> +
diff --git a/layout/_widget/list.ejs b/layout/_widget/list.ejs index 25a217f..f2ffa34 100755 --- a/layout/_widget/list.ejs +++ b/layout/_widget/list.ejs @@ -1,19 +1,24 @@ - +
+ <%- partial('header', {item: item, defIcon: '', defTitle: ''}) %> + +
diff --git a/layout/_widget/music.ejs b/layout/_widget/music.ejs index eaca01c..560693a 100755 --- a/layout/_widget/music.ejs +++ b/layout/_widget/music.ejs @@ -39,14 +39,13 @@ if (theme.widgets.music && theme.widgets.music.display) { %> <% if (needDisplay == true) { %> - -
-
- - +
+ <%- partial('header', {item: item, defIcon: '', defTitle: ''}) %> +
+ <%- 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_volume: item.volume, aplayer_autoplay: item.autoplay?item.autoplay:false }) %> +
+
<% } %> diff --git a/layout/_widget/plain.ejs b/layout/_widget/plain.ejs index 1ea86cc..112ffe0 100755 --- a/layout/_widget/plain.ejs +++ b/layout/_widget/plain.ejs @@ -1 +1,6 @@ -<%- markdown(item.body) %> +
'> + <%- partial('header', {item: item, defIcon: '', defTitle: ''}) %> +
+ <%- markdown(item.body) %> +
+
diff --git a/layout/_widget/tagcloud.ejs b/layout/_widget/tagcloud.ejs index 0a65f3b..822db6b 100755 --- a/layout/_widget/tagcloud.ejs +++ b/layout/_widget/tagcloud.ejs @@ -1,7 +1,14 @@ -<%- tagcloud(site.tags, { - min_font: 14, - max_font: 24, - color: true, - start_color: '#999', - end_color: '#555', -}) %> +<% if (site.tags.length){ %> +
+ <%- partial('header', {item: item, defIcon: theme.widgets.tagcloud.icon, defTitle: theme.widgets.tagcloud.title}) %> +
+ <%- tagcloud(site.tags, { + min_font: 14, + max_font: 24, + color: true, + start_color: '#999', + end_color: '#555', + }) %> +
+
+<% } %> diff --git a/layout/_widget/toc.ejs b/layout/_widget/toc.ejs index 4f7ec84..8a5599d 100755 --- a/layout/_widget/toc.ejs +++ b/layout/_widget/toc.ejs @@ -1,5 +1,8 @@ <% if(page.layout == 'post' && page.content && page.toc!==false && toc(page.content).length > 0){ %> -
- <%- toc(page.content, {list_number: false}) %> -
+
+ <%- partial('header', {item: item, defIcon: theme.widgets.toc.icon, defTitle: theme.widgets.toc.title}) %> +
+ <%- toc(page.content, {list_number: false}) %> +
+
<% } %> diff --git a/layout/links.ejs b/layout/links.ejs index ba974f3..f4bac4c 100755 --- a/layout/links.ejs +++ b/layout/links.ejs @@ -44,4 +44,4 @@
-<%- partial('_partial/comments') %> +<%- partial('_third-party/comments') %> diff --git a/source/less/_color.less b/source/less/_color.less index 4739f13..80dc6df 100755 --- a/source/less/_color.less +++ b/source/less/_color.less @@ -1,11 +1,12 @@ // 如果你只想简单地换个风格,可以只改这里的几项: // 网页背景颜色 -@theme_background: #efefef; // 暗色主题示例:#454545; +@theme_background: #EFEFEF; +// @theme_background: #454545; // 暗色主题 // 主题色 @theme_main: #1BC3FB; // 卡片背景颜色 -@theme_cardbg: white; // 暗色主题示例:#555; - +@theme_cardbg: white; +// @theme_cardbg: #555; // 暗色主题 @@ -34,4 +35,5 @@ // 在主题色中显示的文本(一般为白或深灰) @color_text_in_header: white; // 正文文字颜色 -@color_text_main: @dark; // 暗色主题示例:white; +@color_text_main: @dark; +// @color_text_main: white; // 暗色主题 diff --git a/source/less/_header.less b/source/less/_header.less index 32e2078..9509219 100755 --- a/source/less/_header.less +++ b/source/less/_header.less @@ -91,12 +91,12 @@ padding: 0 8px; &:hover{ color: @color_text_in_header; - border-bottom: 4px solid @theme_cardbg; + border-bottom: @loading_height solid @theme_cardbg; background: fade(@theme_cardbg, 10%); } &:active,&.active{ color: @color_text_in_header; - border-bottom: 4px solid @theme_cardbg; + border-bottom: @loading_height solid @theme_cardbg; } } @media(max-width: @on_phone){ diff --git a/source/less/_main.less b/source/less/_main.less index 4e26127..9482790 100755 --- a/source/less/_main.less +++ b/source/less/_main.less @@ -148,10 +148,7 @@ margin: 8px 8px 0 8px; .emoji{ height: 24px; - // &.aru{ - // height: 18px; - // margin-top: 3px; - // } + margin-top: 6px; } } } diff --git a/source/less/_widget.less b/source/less/_widget.less index a0e4484..10d4107 100755 --- a/source/less/_widget.less +++ b/source/less/_widget.less @@ -247,7 +247,7 @@ text-align: justify; padding: @gap/2 @gap; &.pure{ - padding-top: 0; // 适合白色导航栏背景 + padding: 0 @gap @gap @gap; // 适合白色导航栏背景 } a{ display:inline-block;