Add page publication history and reusable blocks

This commit is contained in:
2026-11-28 18:12:30 +08:00
parent 1c927d360c
commit 3b13f6533d
40 changed files with 1239 additions and 165 deletions
+51
View File
@@ -257,4 +257,55 @@ foreach ($newSuites as $theme => [$name, $description, $templates]) {
$groups[$theme] = compact('name', 'description', 'pages');
}
$fwnet = [
['🌐', 'IX', '基于 <a href="https://github.com/ntop/n2n">n2n</a> 的二层交换中心,自动 NAT 打洞以建立 P2P 连接'],
['↔️', 'Route Server', '多台 Route Server 便于建立对等连接,并减少单点故障'],
['🚀', 'BFD', '大幅加快路由收敛速度,及时检测故障并更新'],
['🗡️', 'RPKI', '异常路由的终结者,避免错误蔓延至全网'],
['🏷️', 'DNS', '基于 PowerDNS 的 DNS 系统,提供内部特色后缀域名解析'],
['🔐', 'CA', '支持 ACME,用 TLS 保护数据传输安全'],
['🔍️', 'Looking Glass', '强大的分析工具,洞察路由传播情况,快速定位故障'],
['🥰', 'Love', '若干年的迭代升级离不开各位参与者对网络技术的热爱'],
];
$cards = '<div class="fwnet-grid">';
foreach ($fwnet as [$icon, $title, $copy]) {
$url = $title === 'Looking Glass' ? 'https://lg.fw.ac.cn/' : null;
$cards .= '<article class="fwnet-card"><span class="fwnet-card-icon">' . $escape($icon)
. '</span><h3>' . ($url ? '<a href="' . $url . '">' . $escape($title) . '</a>' : $escape($title))
. '</h3><p>' . $copy . '</p></article>';
}
$cards .= '</div>';
$groups['fwnet'] = [
'name' => 'fwnet · 实验网络',
'description' => '根据 fwnet 首页改编,适合项目介绍、服务索引与技术文档入口。',
'pages' => ['fwnet-home' => [
'name' => 'fwnet 项目首页', 'heading' => 'fwnet', 'description' => 'fwnet 是一个实验性网络。',
'image' => '/assets/system/fwnet-banner.webp', 'alt' => 'fwnet',
'visibility' => ['header' => false, 'footer' => false],
'presentation' => ['heroHtml' => <<<'HTML'
<nav class="fwnet-nav wrap" aria-label="fwnet">
<a class="fwnet-brand" href="https://fw.ac.cn/"><img src="/assets/system/fwnet-mark.webp" width="26" height="26" alt=""> fwnet</a>
<div><a href="https://fw.ac.cn/">Home</a><a href="https://github.com/SerinaNya/fwnet-docs">GitHub</a></div>
</nav>
<div class="fwnet-hero wrap">
<div>
<h1><span>fwnet</span><br>an experimental network</h1>
<p>一个实验性网络</p>
<div class="actions">
<a class="button button-primary" href="https://fw.ac.cn/what-is-fwnet">什么是 fwnet?</a>
<a class="button button-outline" href="https://fw.ac.cn/getting-started">快速开始</a>
</div>
</div>
<img src="/assets/system/fwnet-banner.webp" width="660" height="220" alt="fwnet 图形标识">
</div>
HTML],
'actions' => [],
'sections' => [
['capabilities', '', 'plain', $cards, null],
['attribution', '', 'layout', '<div class="fwnet-credit"><p>原作 <a href="https://fw.ac.cn/">fwnet</a>,由 <a href="https://serinanya.cn/">SerinaNya</a> 创作。原站内容采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a>,本模板经站长同意改编。</p></div>', null],
],
]],
];
return $groups;