From 755ea16e4b43bfc1bcb4edebbec3d0024a96a589 Mon Sep 17 00:00:00 2001 From: awinds Date: Sat, 14 Sep 2024 10:10:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=87=B3v1.4.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +++++ assets/css/xa-ink.css | 4 ++++ comments.php | 8 ++++++-- core/menu.php | 38 +++++++++++++++++++++++++++++++++----- functions.php | 21 +++++++++++++++------ header.php | 2 +- index.php | 2 +- 7 files changed, 65 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 3e91c34..938de7c 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,11 @@ Open sourced under the MIT license. 保留Theme by Xaink,谢谢! # 更新说明 +## 1.4.8 + 1. 分类目录显示控制数量,增加更多下拉显示一级目录。 + 2. 控制台->外观->设置外观->目录显示的分类数。 + 3. 优化文章导读的高亮显示颜色。 + 4. 优化评论提示显示效果。 ## 1.4.7 1. 分类目录增加自定义设置icon显示(svg)。 2. 控制台->外观->设置外观->分类对应图标SVG。 diff --git a/assets/css/xa-ink.css b/assets/css/xa-ink.css index d41f8a9..bb6acb0 100644 --- a/assets/css/xa-ink.css +++ b/assets/css/xa-ink.css @@ -115,6 +115,10 @@ color: #f5f6f5; } +.outline-navigator-parent .outline-navigator__main .outline-navigator_highlight { + color : rgb(59,130,246); +} + svg { display: inline-block; } diff --git a/comments.php b/comments.php index f5d2a55..5e7410c 100644 --- a/comments.php +++ b/comments.php @@ -116,9 +116,13 @@ function threadedComments($comments, $options)
have()): ?> - listComments(); ?> + listComments(); ?> +
没有更多啦
+ + allow("comment")): ?> +
等风等雨等你来
+ -
没有更多啦
diff --git a/core/menu.php b/core/menu.php index bd68ebb..21172e8 100644 --- a/core/menu.php +++ b/core/menu.php @@ -8,14 +8,26 @@ 首页 widget('Widget_Metas_Category_List')->to($categorys); ?> - have()): ?> - next()): + have()): + $idx = 1; + $maxNum = $this->options->authorInstagram ? intval($this->options->authorInstagram) : 6; + $mores = []; + while ($categorys->next()): if($categorys->levels != 0) { continue; } $childs = $categorys->getAllChildren($categorys->mid); $svgicon = xaGetCategorySvg($categorys->mid); - ?> + if($idx >= $maxNum) { + $mores[] = [ + 'svg' =>$svgicon, + 'permalink' => $categorys->permalink, + 'name' => $categorys->name, + 'childs' => $childs + ]; + continue; + } + ?>
  • @@ -30,7 +42,7 @@ 0 && !xaIsListCategory($categorys->mid)): ?> -
  • - + + 0): ?> +
  • + 更多 + +
  • + diff --git a/functions.php b/functions.php index 04e1bcd..74da9dd 100644 --- a/functions.php +++ b/functions.php @@ -167,14 +167,14 @@ function themeConfig($form) ); $form->addInput($siteFooterHtml); - $categoryListStyle = new Text( - 'categoryListStyle', + $menuCategoryNum = new Text( + 'menuCategoryNum', null, - null, - _t('有子目录则显示子目录的列表,没子目录则显示文章的标题列表,列表ID(多个用半角,分隔):1,2'), - _t('所有分类:'.xaGetCategoryies()) + 6, + _t('目录显示的分类数(包括首页),超过使用更多下拉,更多只显示一级分类'), + _t('太多的分类显示不好看,默认6个') ); - $form->addInput($categoryListStyle); + $form->addInput($menuCategoryNum); $categoryIconSvg = new Textarea( 'categoryIconSvg', @@ -184,6 +184,15 @@ function themeConfig($form) _t('所有分类:'.xaGetCategoryies()) ); $form->addInput($categoryIconSvg); + + $categoryListStyle = new Text( + 'categoryListStyle', + null, + null, + _t('有子目录则显示子目录的列表,没子目录则显示文章的标题列表,列表ID(多个用半角,分隔):1,2'), + _t('一般用于小说目录页,所有分类:'.xaGetCategoryies()) + ); + $form->addInput($categoryListStyle); } /** diff --git a/header.php b/header.php index 9fcb48e..590dd5f 100644 --- a/header.php +++ b/header.php @@ -53,9 +53,9 @@ " rel="stylesheet"/> + - diff --git a/index.php b/index.php index 08f7eb9..b7cb314 100644 --- a/index.php +++ b/index.php @@ -5,7 +5,7 @@ * * @package XaInk * @author XiaoA - * @version 1.4.7 + * @version 1.4.8 * @link https://www.xa.ink/ */ if (!defined('__TYPECHO_ROOT_DIR__')) exit;