fix: unify responsive design across documentation portal

This commit is contained in:
2026-07-12 23:39:21 +05:30
parent dea22aa3da
commit d150e99809
72 changed files with 371 additions and 279 deletions
+6 -4
View File
@@ -203,9 +203,8 @@ ${state}
<a class="skip-link" href="#main">Skip to content</a>
<header class="topbar">
<a class="brand" href="/"><span>W</span> WRNexusJS</a>
<nav aria-label="Primary"><a href="/getting-started">Get started</a><a href="/packages">Packages</a><a href="/language">Language</a><a href="/architecture">Architecture</a><a href="/support">Support</a></nav>
<a class="preview-pill" href="/access">Private preview · v${frameworkVersion}</a>
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
<nav aria-label="Primary"><a href="/getting-started">Get started</a><a href="/tutorial">Tutorial</a><a href="/packages">Packages</a><a href="/guides/project-structure">Guides</a><a href="/language">.wrn language</a><a href="/examples">Examples</a><a href="/search">Search</a></nav>
<div class="topbar-actions"><a class="preview-pill" href="/access">Preview · v${frameworkVersion}</a><button data-wire-theme-toggle class="theme-button" aria-label="Toggle color theme" title="Toggle color theme">◐</button></div>
</header>
${content}
<footer>WRNexusJS ${frameworkVersion} · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.</footer>
@@ -255,7 +254,10 @@ for (const [name, category, summary] of catalog) {
const typesPath = join(packageRoot, "dist", "index.d.ts");
if (!existsSync(readmePath) || !existsSync(typesPath))
throw new Error(`Install @wrnexus/${name} before generating docs`);
const readme = readFileSync(readmePath, "utf8").replace(/^#\s+[^\n]+\n?/, "");
const readme = readFileSync(readmePath, "utf8")
.replace(/^#\s+[^\n]+\n?/, "")
.replace(/^## Installation\s*$[\s\S]*?(?=^##\s|\s*$)/m, "")
.replace(/\bWrNexus\b/g, "WRNexusJS");
const types = readFileSync(typesPath, "utf8");
const guide = markdown(readme);
const toc = [
+8 -8
View File
@@ -16,19 +16,19 @@ const code = (s: string) =>
const navigation = [
["/getting-started", "Get started"],
["/tutorial", "Tutorial"],
["/architecture", "Architecture"],
["/language", ".wrn language"],
["/packages", "Packages"],
["/guides/project-structure", "Guides"],
["/language", ".wrn language"],
["/examples", "Examples"],
["/roadmap", "Roadmap"],
["/changelog", "Changelog"],
["/security", "Security"],
["/support", "Support"],
["/search", "Search"],
] as const;
function shell(title: string, description: string, body: string, section = "Documentation") {
const nav = navigation.map(([href, label]) => `<a href="${href}">${label}</a>`).join("");
const breadcrumbs =
title === "Home"
? ""
: `<nav class="breadcrumbs" aria-label="Breadcrumb"><a href="/">Home</a><span aria-hidden="true">/</span><span>${section}</span><span aria-hidden="true">/</span><span aria-current="page">${title}</span></nav>`;
return `page ${title.replace(/[^A-Za-z0-9]/g, "") || "Guide"} {
seo {
title = "${title.replaceAll('"', "'")}"
@@ -38,9 +38,9 @@ function shell(title: string, description: string, body: string, section = "Docu
view {
<a class="skip-link" href="#main">Skip to content</a>
<div class="docs-shell">
<header class="topbar"><a class="brand" href="/"><span>W</span> WRNexusJS</a><nav aria-label="Primary">${nav}</nav><a class="preview-pill" href="/access">Private preview · v${version}</a><button data-wire-theme-toggle class="theme-button" aria-label="Toggle color theme">Theme</button></header>
<header class="topbar"><a class="brand" href="/"><span>W</span> WRNexusJS</a><nav aria-label="Primary">${nav}</nav><div class="topbar-actions"><a class="preview-pill" href="/access">Preview · v${version}</a><button data-wire-theme-toggle class="theme-button" aria-label="Toggle color theme" title="Toggle color theme">◐</button></div></header>
<div class="mobile-doc-nav"><details><summary>Browse documentation</summary><nav>${nav}</nav></details></div>
<main id="main" class="portal-main"><nav class="breadcrumbs" aria-label="Breadcrumb"><a href="/">Home</a><span aria-hidden="true">/</span><span>${section}</span><span aria-hidden="true">/</span><span aria-current="page">${title}</span></nav>${body}</main>
<main id="main" class="portal-main">${breadcrumbs}${body}</main>
<footer><p><strong>WRNexusJS ${version}</strong> · Private Developer Preview · Bun-native</p><nav aria-label="Footer"><a href="/access">Request access</a><a href="/license">License</a><a href="/security">Security</a><a href="/support">Support</a><a href="/llms.txt">AI guide</a></nav><p>WRNexusJS is created by <a href="https://workroot.in/">WorkRoot</a>. WRNexus is a separate SaaS product.</p></footer>
</div>
}