From 7361eac3379001917180318f66e25527fadbe67f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=91=E8=8B=8D=E7=8B=97?= Date: Thu, 23 May 2024 11:06:37 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=88=20style:=20=E5=BD=92=E6=A1=A3?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/source/_posts/code_snippet.md | 2 + demo/source/_posts/hello-world.md | 2 + demo/source/_posts/katex.md | 2 + demo/source/_posts/markdown.md | 1 + demo/source/_posts/tag_plugins.md | 1 + demo/source/tags/index.md | 5 +++ .../layout/_partial/page/archive.ejs | 12 ++--- .../layout/_partial/page/category.ejs | 2 +- .../layout/_partial/page/tag.ejs | 2 +- .../scripts/helper/list_archives.js | 8 ++-- .../scripts/helper/list_categories.js | 2 +- .../source/css/_components/list.less | 45 ++++++++++++++++--- 12 files changed, 64 insertions(+), 20 deletions(-) create mode 100644 demo/source/tags/index.md diff --git a/demo/source/_posts/code_snippet.md b/demo/source/_posts/code_snippet.md index ffd30b8d..cdedf57e 100644 --- a/demo/source/_posts/code_snippet.md +++ b/demo/source/_posts/code_snippet.md @@ -1,6 +1,8 @@ --- title: Code Snippet date: 2023-01-05 15:08:29 +tags: [code] +categories: 测试分类四 --- {% include_code lang:yaml config.yml %} diff --git a/demo/source/_posts/hello-world.md b/demo/source/_posts/hello-world.md index bcfa6fd4..915dc832 100644 --- a/demo/source/_posts/hello-world.md +++ b/demo/source/_posts/hello-world.md @@ -3,6 +3,8 @@ title: Hello Theme Async date: 2022-09-21 15:08:29 cover: [https://hexo-theme-async.imalun.com/imgs/demo2.png] sticky: 1 +categories: 测试分类三 +tags: [hexo-theme-async] --- ![1663833969157.png](https://hexo-theme-async.imalun.com/imgs/demo2.png)_示例图_ diff --git a/demo/source/_posts/katex.md b/demo/source/_posts/katex.md index a996fe87..f62354b7 100644 --- a/demo/source/_posts/katex.md +++ b/demo/source/_posts/katex.md @@ -3,6 +3,8 @@ title: KaTeX date: 2022-09-22 15:45:29 katex: true toc: false +categories: 测试分类二 +tags: [KaTeX] --- ## KaTeX diff --git a/demo/source/_posts/markdown.md b/demo/source/_posts/markdown.md index 1e27fe03..e887ef21 100644 --- a/demo/source/_posts/markdown.md +++ b/demo/source/_posts/markdown.md @@ -3,6 +3,7 @@ title: Markdown date: 2022-09-21 15:25:29 categories: 测试分类 katex: true +tags: [Markdown] --- 主题 Hexo-theme-async 文章页面适配预览。 diff --git a/demo/source/_posts/tag_plugins.md b/demo/source/_posts/tag_plugins.md index 71403d1e..37684a96 100644 --- a/demo/source/_posts/tag_plugins.md +++ b/demo/source/_posts/tag_plugins.md @@ -2,6 +2,7 @@ title: Tag Plugins date: 2022-12-30 15:08:29 categories: Plugins +tags: [plugins] --- 主题内置的一些标签插件说明和示例。 diff --git a/demo/source/tags/index.md b/demo/source/tags/index.md new file mode 100644 index 00000000..9f11fdb9 --- /dev/null +++ b/demo/source/tags/index.md @@ -0,0 +1,5 @@ +--- +title: 标签 +date: 2019-11-16 10:46:27 +layout: tag +--- diff --git a/packages/hexo-theme-async/layout/_partial/page/archive.ejs b/packages/hexo-theme-async/layout/_partial/page/archive.ejs index cf7b9c3b..059b117c 100644 --- a/packages/hexo-theme-async/layout/_partial/page/archive.ejs +++ b/packages/hexo-theme-async/layout/_partial/page/archive.ejs @@ -5,18 +5,18 @@ <% if(is_archive()){%> <%- list_archives({ type: "yearly", - ulclass: "row trm", - liclass: "col-lg-4 trm" + ulclass: "trm-tag", + liclass: "trm-tag" }) %> <% } else if (is_category()){ %> <%- list_categories({ - ulclass: "row trm", - liclass: "col-lg-4 trm" + ulclass: "trm-tag", + liclass: "trm-tag" }) %> <% } else if (is_tag()) { %> <%- list_tags({ class: { - ul: "row trm-tag-list trm-list", - li:"col-lg-4 trm-list-item" + ul: "trm-tag-list", + li:"trm-tag-list-item" } }) %> <% } %> diff --git a/packages/hexo-theme-async/layout/_partial/page/category.ejs b/packages/hexo-theme-async/layout/_partial/page/category.ejs index 8300f378..60c4c709 100644 --- a/packages/hexo-theme-async/layout/_partial/page/category.ejs +++ b/packages/hexo-theme-async/layout/_partial/page/category.ejs @@ -2,7 +2,7 @@
- <%- list_categories({ ulclass: "row trm" , liclass: "col-lg-4 trm" }) %> + <%- list_categories({ ulclass: "trm-tag" , liclass: "trm-tag" }) %>
diff --git a/packages/hexo-theme-async/layout/_partial/page/tag.ejs b/packages/hexo-theme-async/layout/_partial/page/tag.ejs index 80276688..7955ad83 100644 --- a/packages/hexo-theme-async/layout/_partial/page/tag.ejs +++ b/packages/hexo-theme-async/layout/_partial/page/tag.ejs @@ -3,7 +3,7 @@
- <%- list_tags({ class: { ul: "row trm-tag-list trm-list" , li:"col-lg-4 trm-list-item" } }) %> + <%- list_tags({ class: { ul: "trm-tag-list" , li:"trm-tag-list-item" } }) %>
diff --git a/packages/hexo-theme-async/scripts/helper/list_archives.js b/packages/hexo-theme-async/scripts/helper/list_archives.js index 149e8093..b378059d 100644 --- a/packages/hexo-theme-async/scripts/helper/list_archives.js +++ b/packages/hexo-theme-async/scripts/helper/list_archives.js @@ -65,12 +65,12 @@ function listArchivesHelper(options = {}) { }; if (style === 'list') { - result += `