From c1183fd0c114d68d28e19bca8db17f3e93b56773 Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Tue, 25 Oct 2022 13:57:31 +0800 Subject: [PATCH] css --- _config.yml | 2 +- _data/widgets.yml | 4 +- layout/_partial/sidebar/widgets/markdown.ejs | 2 +- layout/_partial/sidebar/widgets/recent.ejs | 17 ++-- .../widgets/{wiki_more.ejs => related.ejs} | 14 ++-- layout/_partial/sidebar/widgets/timeline.ejs | 2 +- source/css/_layout/partial/related.styl | 77 +++++++++---------- source/css/_layout/sidebar/sidebar.styl | 55 +++++-------- 8 files changed, 74 insertions(+), 99 deletions(-) rename layout/_partial/sidebar/widgets/{wiki_more.ejs => related.ejs} (69%) diff --git a/_config.yml b/_config.yml index c8b1ef3..3bfb9e7 100755 --- a/_config.yml +++ b/_config.yml @@ -28,7 +28,7 @@ sidebar: index: [welcome, recent, timeline] # for home/wiki/categories/tags/archives/404 pages page: [welcome, toc] # for pages using 'layout:page' post: [toc, ghrepo] # for pages using 'layout:post' - wiki: [toc, ghrepo, wiki_more] # for pages using 'layout:wiki' + wiki: [toc, ghrepo, related] # for pages using 'layout:wiki' ######## Main ######## diff --git a/_data/widgets.yml b/_data/widgets.yml index a3ce81f..2c90eb4 100644 --- a/_data/widgets.yml +++ b/_data/widgets.yml @@ -6,8 +6,8 @@ # ---- 内置组件,暂时不支持覆盖 ---- ghrepo: layout: ghrepo -wiki_more: - layout: wiki_more +related: + layout: related # ---- 默认组件,可以覆盖自定义配置 ---- # 将其覆盖设置为空,可删除一个默认组件,例如 welcome: diff --git a/layout/_partial/sidebar/widgets/markdown.ejs b/layout/_partial/sidebar/widgets/markdown.ejs index a56f3b5..3ddb2f5 100644 --- a/layout/_partial/sidebar/widgets/markdown.ejs +++ b/layout/_partial/sidebar/widgets/markdown.ejs @@ -5,7 +5,7 @@ function layoutDiv() { return el; } el += '
'; - el += '
'; + el += '
'; el += '' + item.title + ''; el += '
'; el += '
'; diff --git a/layout/_partial/sidebar/widgets/recent.ejs b/layout/_partial/sidebar/widgets/recent.ejs index 9e351df..ae68938 100644 --- a/layout/_partial/sidebar/widgets/recent.ejs +++ b/layout/_partial/sidebar/widgets/recent.ejs @@ -2,7 +2,7 @@ function layoutDiv() { var el = '
'; // header - el += '
'; + el += '
'; el += '' + __("meta.recent_update") + ''; if (item.rss) { el += ''; @@ -25,23 +25,20 @@ function layoutDiv() { return p.title && p.title.length > 0; }); } - el += '
'; + el += ''; diff --git a/layout/_partial/sidebar/widgets/wiki_more.ejs b/layout/_partial/sidebar/widgets/related.ejs similarity index 69% rename from layout/_partial/sidebar/widgets/wiki_more.ejs rename to layout/_partial/sidebar/widgets/related.ejs index bbbda8f..0e7d2b3 100644 --- a/layout/_partial/sidebar/widgets/wiki_more.ejs +++ b/layout/_partial/sidebar/widgets/related.ejs @@ -16,21 +16,21 @@ function layoutDiv() { var el = ''; if (related.length > 0) { el += '