From 7e559016de25257e5f1f49fb886116ffbfaa5de1 Mon Sep 17 00:00:00 2001 From: JGZYES Date: Sat, 5 Sep 2026 11:54:47 +0800 Subject: [PATCH] web: fix asset/css paths for the docs subdirectory docs/index.php lives in docs/, so relative 'assets/style.css' resolved to docs/assets/style.css (404 -> no styling). Switch _common.php asset/link paths to site-root-relative ('/assets/style.css', '/icon.png', '/assets/main.js', '/index.php', '/docs/index.php') so both the homepage and the docs site load the theme correctly. --- web/_common.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/web/_common.php b/web/_common.php index 14bd84a..6359622 100644 --- a/web/_common.php +++ b/web/_common.php @@ -8,8 +8,8 @@ define('PMM_VERSION', '0.3.6'); function pmm_nav_links(string $active): string { $items = [ - 'home' => ['index.php', '首页'], - 'docs' => ['docs/index.php', '文档'], + 'home' => ['/index.php', '首页'], + 'docs' => ['/docs/index.php', '文档'], ]; $html = ''; foreach ($items as $key => [$href, $label]) { @@ -43,13 +43,13 @@ function pmm_header(string $active, string $title): void { '' . "\n" . '' . $t . ' · ParlzPackageManager' . "\n" . '' . "\n" . -'' . "\n" . -'' . "\n" . -'' . "\n" . +'' . "\n" . +'' . "\n" . +'' . "\n" . '' . "\n" . '' . "\n" . '