Skip to content

Commit

Permalink
improve: show warning when page size is not 12
Browse files Browse the repository at this point in the history
  • Loading branch information
KawaiiZapic committed Nov 5, 2024
1 parent a99c855 commit 4af2bf0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@

function themeConfig(Form $form): void {
Matecho::generateThemeCSS();
$options = Helper::options();
if ($options->pageSize % 12 != 0) { ?>
<div>
<b>警告:</b> "每页文章数目"不为12的整倍数, 可能会导致在不同大小屏幕下文章列表底部大面积留白.
<a href="/admin/options-reading.php">修改设置</a>
</div>
<?php }
$form->addInput(new Text("ColorScheme", null, "", "主题色", "十六进制的主题色, 如#E91E63."));
$form->addInput(new Text("GravatarURL", null, "https://gravatar.loli.net/avatar/", "Gravatar镜像", ""));
if (!is_writable(__DIR__."/assets/color-scheme.css")) {
Expand Down

0 comments on commit 4af2bf0

Please sign in to comment.