镜像自地址
https://github.com/JGZYES/ParlzPackageManger.git
已同步 2026-09-11 08:52:45 +08:00
web: docs left-tree/right-md layout + minimal color-only homepage
- docs/index.php: left sidebar directory tree (grouped 开始/了解/社区) + right rendered .md content (breadcrumb + body). Replaces the horizontal pill nav. - assets/style.css: .docs-layout two-column (sticky tree + content), replaces the old .docs-nav pills; keeps the existing grayscale palette. - index.php: strip the Earth-canvas/map logic — now a minimal brand hero with docs/install/download entry cards, using the existing color scheme only.
这个提交包含在:
+12
-6
@@ -298,12 +298,18 @@ code{font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,"Co
|
|||||||
.rel-dl{margin-left:auto;font-size:12px;color:var(--muted);border:1px solid var(--line);border-radius:6px;padding:3px 10px;text-decoration:none;white-space:nowrap}
|
.rel-dl{margin-left:auto;font-size:12px;color:var(--muted);border:1px solid var(--line);border-radius:6px;padding:3px 10px;text-decoration:none;white-space:nowrap}
|
||||||
.rel-dl:hover{color:#fff;border-color:#fff}
|
.rel-dl:hover{color:#fff;border-color:#fff}
|
||||||
|
|
||||||
/* ---------- docs site ---------- */
|
/* ---------- docs site (left tree + right md) ---------- */
|
||||||
.docs-nav{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:24px;border-bottom:1px solid var(--line);padding-bottom:14px}
|
.docs-layout{display:flex;gap:32px;max-width:1120px;margin:0 auto;padding:28px 24px 60px}
|
||||||
.docs-link{font-size:13.5px;color:var(--muted);text-decoration:none;padding:6px 14px;border:1px solid var(--line);border-radius:999px;white-space:nowrap}
|
.docs-sidebar{flex:0 0 216px;position:sticky;top:16px;align-self:flex-start}
|
||||||
.docs-link:hover{color:#fff;border-color:#fff}
|
.docs-sidebar-brand{font-weight:700;font-size:15px;color:#fff;padding:0 12px 14px;border-bottom:1px solid var(--line);margin-bottom:10px}
|
||||||
.docs-link.active{color:var(--ink);background:var(--accent);border-color:var(--accent)}
|
.docs-group{font-size:11px;letter-spacing:1.2px;text-transform:uppercase;color:var(--dim);padding:14px 12px 6px}
|
||||||
.docs-body{max-width:860px;line-height:1.8;color:var(--text)}
|
.docs-tree{display:flex;flex-direction:column;gap:2px}
|
||||||
|
.docs-link{display:block;font-size:14px;color:var(--muted);text-decoration:none;padding:7px 12px;border-radius:8px}
|
||||||
|
.docs-link:hover{color:#fff;background:var(--panel)}
|
||||||
|
.docs-link.active{color:var(--ink);background:var(--accent)}
|
||||||
|
.docs-content{flex:1 1 auto;min-width:0}
|
||||||
|
.docs-crumb{font-size:12px;color:var(--dim);margin-bottom:18px}
|
||||||
|
.docs-body{max-width:820px;line-height:1.8;color:var(--text)}
|
||||||
.docs-body h1{font-size:30px;margin:0 0 18px;letter-spacing:-.5px;border-bottom:1px solid var(--line);padding-bottom:14px}
|
.docs-body h1{font-size:30px;margin:0 0 18px;letter-spacing:-.5px;border-bottom:1px solid var(--line);padding-bottom:14px}
|
||||||
.docs-body h2{font-size:20px;margin:34px 0 12px;color:#fff}
|
.docs-body h2{font-size:20px;margin:34px 0 12px;color:#fff}
|
||||||
.docs-body h3{font-size:16px;margin:26px 0 10px;color:#fff}
|
.docs-body h3{font-size:16px;margin:26px 0 10px;color:#fff}
|
||||||
|
|||||||
+25
-9
@@ -1,20 +1,30 @@
|
|||||||
<?php
|
<?php
|
||||||
/* PMM docs site — renders sibling .md files with the shared md() renderer.
|
/* PMM docs site — left sidebar directory + right rendered .md content.
|
||||||
* URL: docs/index.php?page=<name> (defaults to "index"). */
|
* URL: docs/index.php?page=<name> (defaults to "index"). */
|
||||||
define('PMM_SITE', 1);
|
define('PMM_SITE', 1);
|
||||||
require dirname(__DIR__) . '/_common.php';
|
require dirname(__DIR__) . '/_common.php';
|
||||||
|
|
||||||
/* doc pages: [slug, title] */
|
/* doc pages: [slug, title] — grouped sections */
|
||||||
$pages = [
|
$groups = [
|
||||||
|
'开始' => [
|
||||||
'index' => '快速开始',
|
'index' => '快速开始',
|
||||||
'install' => '安装',
|
'install' => '安装',
|
||||||
'download' => '下载',
|
'download'=> '下载',
|
||||||
|
],
|
||||||
|
'了解' => [
|
||||||
'features' => '核心特性',
|
'features' => '核心特性',
|
||||||
'cli' => '命令参考',
|
'cli' => '命令参考',
|
||||||
'mirror' => '镜像源',
|
'mirror' => '镜像源',
|
||||||
|
],
|
||||||
|
'社区' => [
|
||||||
'translate' => '翻译 / 语言包',
|
'translate' => '翻译 / 语言包',
|
||||||
'source' => '源码',
|
'source' => '源码',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
// flatten for page lookup
|
||||||
|
$pages = [];
|
||||||
|
foreach ($groups as $g => $list) foreach ($list as $slug => $t) $pages[$slug] = $t;
|
||||||
|
|
||||||
$page = isset($_GET['page']) ? (string)$_GET['page'] : 'index';
|
$page = isset($_GET['page']) ? (string)$_GET['page'] : 'index';
|
||||||
if (!isset($pages[$page])) $page = 'index';
|
if (!isset($pages[$page])) $page = 'index';
|
||||||
$title = $pages[$page];
|
$title = $pages[$page];
|
||||||
@@ -28,15 +38,21 @@ if (is_file($mdPath)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pmm_header('docs', '文档 · ' . $title);
|
pmm_header('docs', '文档 · ' . $title);
|
||||||
pmm_page_open('DOCS', $title);
|
|
||||||
?>
|
?>
|
||||||
<section class="section">
|
<section class="docs-layout">
|
||||||
<div class="wrap">
|
<aside class="docs-sidebar">
|
||||||
<nav class="docs-nav">
|
<div class="docs-sidebar-brand"><span>PMM 文档</span></div>
|
||||||
<?php foreach ($pages as $slug => $t): ?>
|
<nav class="docs-tree">
|
||||||
|
<?php foreach ($groups as $g => $list): ?>
|
||||||
|
<div class="docs-group"><?php echo htmlspecialchars($g); ?></div>
|
||||||
|
<?php foreach ($list as $slug => $t): ?>
|
||||||
<a class="docs-link<?php echo $slug === $page ? ' active' : ''; ?>" href="index.php?page=<?php echo $slug; ?>"><?php echo htmlspecialchars($t); ?></a>
|
<a class="docs-link<?php echo $slug === $page ? ' active' : ''; ?>" href="index.php?page=<?php echo $slug; ?>"><?php echo htmlspecialchars($t); ?></a>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
<?php endforeach; ?>
|
||||||
</nav>
|
</nav>
|
||||||
|
</aside>
|
||||||
|
<div class="docs-content">
|
||||||
|
<div class="docs-crumb">文档 / <?php echo htmlspecialchars($title); ?></div>
|
||||||
<div class="docs-body"><?php echo $body; ?></div>
|
<div class="docs-body"><?php echo $body; ?></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
+4
-61
@@ -1,76 +1,23 @@
|
|||||||
<?php
|
<?php
|
||||||
/* PMM home — brand hero + rotating Earth + live mirror status. Content lives
|
/* PMM home — minimal brand page. All content lives in the docs site. */
|
||||||
* in the docs site (web/docs). */
|
|
||||||
define('PMM_SITE', 1);
|
define('PMM_SITE', 1);
|
||||||
require __DIR__ . '/_common.php';
|
require __DIR__ . '/_common.php';
|
||||||
|
|
||||||
/* Coarse world map, '#'=land — reused as the dot cloud on the globe. */
|
|
||||||
$map = [
|
|
||||||
" ",
|
|
||||||
" #################### ",
|
|
||||||
" ########################## ",
|
|
||||||
" ##### ############# ### ",
|
|
||||||
" ##### ###### ### ## #### ",
|
|
||||||
" ### ### #### ## ### ######### ",
|
|
||||||
" ### ### ### ## #### ########### ",
|
|
||||||
" ### ### ## ########## ##### ## ",
|
|
||||||
" ###### ### ### ## ## ############ ### ## ",
|
|
||||||
" ####### ###### ## ### ######## ## ## ",
|
|
||||||
" ### # #### ### ########## #### ## ",
|
|
||||||
" ## ### ### # ########## ### ## ",
|
|
||||||
" ## ## ##### ### ## #### ##### ## ## ",
|
|
||||||
" ## ######## ## # ## ### ## ",
|
|
||||||
" # ## #### ## ## # ## ## ",
|
|
||||||
" ### ### ### ## ## ",
|
|
||||||
" # ### ###### ### ## ## ## ",
|
|
||||||
" ### ## #### ## ## ## ## ",
|
|
||||||
" #### ## ## ## ### ## ## ## ",
|
|
||||||
" ### ### ### ## ########### ## ",
|
|
||||||
" ### # ## # # # ### ### ### ",
|
|
||||||
" ### ## # ## # ##### ## ### ## ",
|
|
||||||
" ## # ### # ### ### ## # # ",
|
|
||||||
" ### ## #### #### ######## # ",
|
|
||||||
" ### ## ## # # # ### ## # ",
|
|
||||||
" ## ## ## ### #### ### ######## ## ",
|
|
||||||
" ## # # ## # # ## ## ## ## ",
|
|
||||||
" # ## ## # ## ## # ",
|
|
||||||
" # ## # # # ### ##### ## ",
|
|
||||||
" ## ## # ## ## # # ",
|
|
||||||
" # # # # # # ",
|
|
||||||
" ## ## ## # ## ",
|
|
||||||
" # # # # # ",
|
|
||||||
" ",
|
|
||||||
];
|
|
||||||
$ROWS = count($map);
|
|
||||||
$COLS = 0;
|
|
||||||
foreach ($map as $row) $COLS = max($COLS, strlen($row));
|
|
||||||
for ($r = 0; $r < $ROWS; $r++) $map[$r] = str_pad($map[$r], $COLS);
|
|
||||||
if ($COLS === 0) $COLS = 1;
|
|
||||||
$dots = array();
|
|
||||||
for ($r = 0; $r < $ROWS; $r++)
|
|
||||||
for ($c = 0; $c < $COLS; $c++)
|
|
||||||
if ($map[$r][$c] === '#') $dots[] = array($r, $c);
|
|
||||||
|
|
||||||
pmm_header('home', '跨平台 C 语言包管理器');
|
pmm_header('home', '跨平台 C 语言包管理器');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<header id="top" class="hero">
|
<header id="top" class="hero">
|
||||||
<div class="hero-inner">
|
<div class="hero-inner">
|
||||||
<div class="hero-copy">
|
|
||||||
<div class="hero-badge">v<?php echo PMM_VERSION; ?> · C11 · Windows / Linux / macOS</div>
|
<div class="hero-badge">v<?php echo PMM_VERSION; ?> · C11 · Windows / Linux / macOS</div>
|
||||||
<h1>ParlzPackageManager <span class="accent">(PMM)</span></h1>
|
<h1>ParlzPackageManager <span class="accent">(PMM)</span></h1>
|
||||||
<p class="hero-tag">一个用 <strong>C 语言</strong>从零编写的跨平台包管理器。像 apt 一样多用镜像源,也能直接从 <strong>GitHub / GitLab / Gitea / Forgejo</strong> Release 装包。</p>
|
<p class="hero-tag">一个用 <strong>C 语言</strong>从零编写的跨平台包管理器。像 apt 一样多用镜像源,也能直接从 <strong>GitHub / GitLab / Gitea / Forgejo</strong> Release 装包。</p>
|
||||||
<div class="hero-cta">
|
<div class="hero-cta">
|
||||||
<a class="btn btn-primary" href="docs/index.php">文档 · 安装</a>
|
<a class="btn btn-primary" href="docs/index.php">文档 ▸</a>
|
||||||
|
<a class="btn btn-ghost" href="docs/index.php?page=install">安装</a>
|
||||||
<a class="btn btn-ghost" href="docs/index.php?page=download">下载 v<?php echo PMM_VERSION; ?> ↓</a>
|
<a class="btn btn-ghost" href="docs/index.php?page=download">下载 v<?php echo PMM_VERSION; ?> ↓</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="hero-note"><span class="dot ok"></span> 双镜像 · 深圳 / 香港 实时在线</div>
|
<div class="hero-note"><span class="dot ok"></span> 双镜像 · 深圳 / 香港 实时在线</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="hero-globe">
|
|
||||||
<canvas id="globe" aria-label="PMM 服务分布地球"></canvas>
|
|
||||||
<div class="globe-caption">全球镜像 · 深圳 · 香港</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section class="section entry-section">
|
<section class="section entry-section">
|
||||||
@@ -79,7 +26,7 @@ pmm_header('home', '跨平台 C 语言包管理器');
|
|||||||
<a class="entry-card" href="docs/index.php">
|
<a class="entry-card" href="docs/index.php">
|
||||||
<span class="entry-icon">▸</span>
|
<span class="entry-icon">▸</span>
|
||||||
<span class="entry-title">文档</span>
|
<span class="entry-title">文档</span>
|
||||||
<span class="entry-desc">特性、安装、下载、CLI、镜像、翻译</span>
|
<span class="entry-desc">特性、命令参考、镜像、翻译</span>
|
||||||
</a>
|
</a>
|
||||||
<a class="entry-card" href="docs/index.php?page=install">
|
<a class="entry-card" href="docs/index.php?page=install">
|
||||||
<span class="entry-icon">▸</span>
|
<span class="entry-icon">▸</span>
|
||||||
@@ -97,8 +44,4 @@ pmm_header('home', '跨平台 C 语言包管理器');
|
|||||||
|
|
||||||
<p class="tips" style="padding-bottom:40px"><code>pmm install nodejs</code> · <code>pmm install php</code> · <code>pmm install pmm</code>(升级自身)</p>
|
<p class="tips" style="padding-bottom:40px"><code>pmm install nodejs</code> · <code>pmm install php</code> · <code>pmm install pmm</code>(升级自身)</p>
|
||||||
|
|
||||||
<script>
|
|
||||||
window.PMM_MAP = <?php echo json_encode($dots); ?>;
|
|
||||||
window.PMM_DIMS = { rows: <?php echo $ROWS; ?>, cols: <?php echo $COLS; ?> };
|
|
||||||
</script>
|
|
||||||
<?php pmm_footer(); ?>
|
<?php pmm_footer(); ?>
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户