From db86bb4726d28d679e425d09e5b98672ede1ac10 Mon Sep 17 00:00:00 2001 From: Eltrac Koalar Date: Sat, 24 Sep 2022 23:54:29 +0800 Subject: [PATCH] =?UTF-8?q?:newspaper:=20Add:=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E3=80=8C=E7=9B=B8=E5=85=B3=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E3=80=8D=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/matcha/matcha.libs.css | 6 ++- assets/matcha/matcha.page.css | 69 ++++++++++++++++++++++++++++++++++- assets/matcha/matcha.post.css | 15 +++++--- includes/post-list.php | 6 +++ libs/Matcha.php | 48 +++++++++++++++++++++++- libs/Options.php | 14 +++++++ 6 files changed, 147 insertions(+), 11 deletions(-) diff --git a/assets/matcha/matcha.libs.css b/assets/matcha/matcha.libs.css index e8aa9fb..652c310 100644 --- a/assets/matcha/matcha.libs.css +++ b/assets/matcha/matcha.libs.css @@ -128,12 +128,14 @@ div.code-toolbar>.toolbar>.toolbar-item>button::before { padding: 0 .5em } -.post-content .bracketdown-underline { +.post-content .bracketdown-underline, +.section-title { text-decoration: none; position: relative; z-index: 1 } -.post-content .bracketdown-underline::before{ +.post-content .bracketdown-underline::before, +.section-title::before { content: ""; position: absolute; height: .8em; diff --git a/assets/matcha/matcha.page.css b/assets/matcha/matcha.page.css index 782d0a8..865f24d 100644 --- a/assets/matcha/matcha.page.css +++ b/assets/matcha/matcha.page.css @@ -191,7 +191,7 @@ } @media(max-width:768px) { - .header,.post-title,.post-meta { + .header { text-align: center; } } @@ -558,4 +558,71 @@ clear: both; width: 100%; margin: 2em 0; +} + +/* 首页相关链接 */ + +.indexlink { + display: flex; + flex-direction: row; + flex-wrap: wrap; + gap: 2%; + align-items: stretch +} + +.indexlink-item { + width: 100%; + border: 2px solid var(--light-gray-bg); + box-sizing: border-box; + transition: border-color .3s; + margin-bottom: 1em +} +@media (min-width: 674px) { + .indexlink-item { + width: 49%; + } +} +@media (min-width: 962px) { + .indexlink-item { + width: 32%; + } +} + +.indexlink-item:hover { + border-color: var(--theme-color) +} +.indexlink-item:hover a h2 { + color: var(--theme-color) +} + +.indexlink-item a { + display: block; + color: var(--text-color); + padding: 1.2em; + height: 100% +} + +.indexlink-item a h2 { + transition: color .3s; + font-size: 1.3em +} + +.indexlink-item a h2, +.indexlink-item a p { + margin: .25em 0 +} + +/* index section */ + +.section-title { + width: fit-content +} + +.section-title::before { + bottom: 0!important; + height: .5em!important +} + +.section-title:first-child { + margin-top: 0 } \ No newline at end of file diff --git a/assets/matcha/matcha.post.css b/assets/matcha/matcha.post.css index ab97a2d..5c11ede 100644 --- a/assets/matcha/matcha.post.css +++ b/assets/matcha/matcha.post.css @@ -10,12 +10,8 @@ font-size: 1.05em; margin: 2em 0 } -.post:first-child { - margin: 0 -} - -.post:first-child { - padding-top: 0 +.post-atmain:first-child { + margin-top: 0 } .post-title { @@ -608,6 +604,13 @@ h3.comment-closed.fade { background: var(--theme-color) } +/* 继续阅读按钮 */ + +@media (min-width: 768px) { + .more { + display: none + } +} /* 其他 */ diff --git a/includes/post-list.php b/includes/post-list.php index 7e695a8..583ae60 100644 --- a/includes/post-list.php +++ b/includes/post-list.php @@ -6,7 +6,12 @@ 'tag' => _t('标签 %s 下的文章'), 'author' => _t('%s 发布的文章') ), '', ''); ?> + is('index') && $this->options->relatedLinks!=''): ?> + options->relatedLinksTitle!=''): ?>

options->relatedLinksTitle(); ?>

+ + options->relatedLinksTitle!='' && $this->options->relatedLinks!=''): ?>

最新文章

+
next()): ?>
@@ -26,6 +31,7 @@
+