This commit is contained in:
浪子 2024-07-05 09:00:34 +08:00
parent d1e6567cc9
commit ce9ae76e8a
10 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
精简部分 JS.
- 2024.7.4
把分类图片以`mid.jpg`的形式在主题`img`目录下,自动匹配
把分类图片以`mid.png`的形式在主题`/dist/img`目录下,自动匹配
- 2024.6.12

BIN
dist/img/1.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

BIN
dist/img/2.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
dist/img/3.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

BIN
dist/img/4.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
dist/img/404.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
dist/img/477.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
dist/img/5.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

BIN
dist/img/6.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -20,7 +20,7 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
// 获取主题URL
$themeUrl = $this->options->themeUrl;
// 为每个分类生成图片地址
$categoryImage = $themeUrl . 'img/' . $categoryId . '.jpg';
$categoryImage = $themeUrl . '/dist/img/' . $categoryId . '.jpg';
?>
<div class="category--item">
<img class="category--cover" src="<?php echo $categoryImage; ?>" loading="lazy" alt="<?php $categories->name(); ?>">