diff --git a/README.md b/README.md index 1a3b92d..7f8be21 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,9 @@ 移植自 `bigfa `大大的 `hugo-theme-farallon` 原汁原味,可以直接使用 原主题的CSS 精简部分 JS. +- 2024.7.4 +把分类图片以`mid.jpg`的形式在主题`img`目录下,自动匹配 + - 2024.6.12 更新豆瓣API获取方式 @@ -50,9 +53,9 @@ https://github.com/bigfa/hugo-theme-farallon ### 已知问题 -由于typecho分类并无图片,所以默认使用 -`bigfa` 的 `https://static.fatesinger.com/2021/12/vhp6eou5x2wqh2zy.jpg` -可以自行替换或者删除 +~~由于typecho分类并无图片,所以默认使用~~ +~~`bigfa` 的 `https://static.fatesinger.com/2021/12/vhp6eou5x2wqh2zy.jpg` ~~ +~~可以自行替换或者删除~~ ### 豆瓣观影 diff --git a/comments.php b/comments.php index 9a4d5ed..41375d8 100644 --- a/comments.php +++ b/comments.php @@ -43,7 +43,6 @@ comments()->to($comments); ?> allow('comment')): ?> is('attachment')) : ?> -

commentsNum(_t('0'), _t('1'), _t('%d')); ?> -

+ + commentsNum(_t('0'), _t('1'), _t('%d')); ?> + +
    @@ -76,7 +77,6 @@

    -

    @@ -84,9 +84,8 @@
    - + -
      have()): ?> listComments(); ?> -
        - comments()->to($comments); ?> - next()): ?> - -
      diff --git a/page-categories.php b/page-categories.php index aebb820..29f7096 100644 --- a/page-categories.php +++ b/page-categories.php @@ -12,17 +12,26 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>

      content(); ?>

      - widget('Widget_Metas_Category_List')->parse(' -
      - -
      - {name} - ({count}) - -
      {description}
      -
      -
      - '); ?> + widget('Widget_Metas_Category_List')->to($categories); ?> +next()): ?> + mid; + // 获取主题URL + $themeUrl = $this->options->themeUrl; + // 为每个分类生成图片地址 + $categoryImage = $themeUrl . 'img/' . $categoryId . '.jpg'; + ?> +
      + <?php $categories->name(); ?> +
      + name(); ?> + (count(); ?>) +
      description(); ?> +
      +
      +
      +
      need('footer.php'); ?> \ No newline at end of file