feat(docs): redesign portal with shared UI system
This commit is contained in:
@@ -256,7 +256,7 @@ function shell(title: string, description: string, content: string, state = ""):
|
||||
${state}
|
||||
view {
|
||||
<div class="docs-shell">
|
||||
<a class="skip-link" href="#main">Skip to content</a>
|
||||
<SkipLink label="Skip to content" href="#main" class="docs-skip-link" />
|
||||
<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></nav>
|
||||
@@ -264,7 +264,8 @@ ${state}
|
||||
</header>
|
||||
<div class="mobile-doc-nav"><details><summary>Browse documentation</summary><nav><a href="/getting-started">Get started</a><a href="/packages">Packages</a><a href="/language">Language</a><a href="/architecture">Architecture</a><a href="/tutorial">Tutorial</a><a href="/guides/project-structure">Guides</a><a href="/examples">Examples</a><a href="/search">Search</a></nav></details></div>
|
||||
${content}
|
||||
<footer>WRNexusJS ${frameworkVersion} · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.</footer>
|
||||
<footer><div class="footer-brand"><span class="footer-mark" aria-hidden="true">W</span><p><strong>WRNexusJS ${frameworkVersion}</strong><span>Complete API documentation generated from installed package declarations.</span></p></div><nav aria-label="Footer"><a href="/packages">All packages</a><a href="/getting-started">Get started</a><a href="/security">Security</a><a href="/support">Support</a><a href="/llms.txt">AI guide</a></nav><p class="footer-meta">Private Developer Preview · Bun-native</p></footer>
|
||||
<BackToTop />
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
||||
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from "node:fs";
|
||||
import { join, resolve } from "node:path";
|
||||
import { format } from "prettier";
|
||||
|
||||
@@ -77,12 +77,13 @@ function shell(title: string, description: string, body: string, section = "Docu
|
||||
canonical = "https://wrnexusjs.dev${routeFor(title)}"
|
||||
}
|
||||
view {
|
||||
<a class="skip-link" href="#main">Skip to content</a>
|
||||
<SkipLink label="Skip to content" href="#main" class="docs-skip-link" />
|
||||
<div class="docs-shell">
|
||||
<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>${mobileNav}</nav></details></div>
|
||||
<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>
|
||||
<footer><div class="footer-brand"><span class="footer-mark" aria-hidden="true">W</span><p><strong>WRNexusJS ${version}</strong><span>Server-first documentation for the Bun-native framework.</span></p></div><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 class="footer-meta">Created by <a href="https://workroot.in/">WorkRoot</a> · Private Developer Preview</p></footer>
|
||||
<BackToTop />
|
||||
</div>
|
||||
}
|
||||
}`;
|
||||
@@ -116,12 +117,13 @@ function marketingShell(description: string, body: string) {
|
||||
canonical = "https://wrnexusjs.dev/"
|
||||
}
|
||||
view {
|
||||
<a class="skip-link" href="#main">Skip to content</a>
|
||||
<SkipLink label="Skip to content" href="#main" class="docs-skip-link" />
|
||||
<div class="docs-shell marketing-shell">
|
||||
<header class="topbar marketing-header"><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></nav><div class="topbar-actions"><a class="preview-pill" href="/access">Private preview · v${version}</a><button data-wire-theme-toggle class="theme-button" aria-label="Toggle color theme">◐</button></div></header>
|
||||
<div class="marketing-mobile-nav"><details><summary>Menu</summary><nav><a href="/getting-started">Get started</a><a href="/packages">Packages</a><a href="/language">Language</a><a href="/architecture">Architecture</a><a href="/tutorial">Tutorial</a><a href="/examples">Examples</a></nav></details></div>
|
||||
<main id="main" class="marketing-main">${marketingBody}</main>
|
||||
<footer><p><strong>WRNexusJS ${version}</strong> · Bun-native · Created by <a href="https://workroot.in/">WorkRoot</a></p><nav aria-label="Footer"><a href="/getting-started">Documentation</a><a href="/roadmap">Roadmap</a><a href="/security">Security</a><a href="/support">Support</a><a href="/llms.txt">AI guide</a></nav></footer>
|
||||
<footer><div class="footer-brand"><span class="footer-mark" aria-hidden="true">W</span><p><strong>WRNexusJS ${version}</strong><span>Build from the server. Ship only what matters.</span></p></div><nav aria-label="Footer"><a href="/getting-started">Documentation</a><a href="/roadmap">Roadmap</a><a href="/security">Security</a><a href="/support">Support</a><a href="/llms.txt">AI guide</a></nav><p class="footer-meta">Bun-native · Created by <a href="https://workroot.in/">WorkRoot</a></p></footer>
|
||||
<BackToTop />
|
||||
</div>
|
||||
}
|
||||
}`;
|
||||
@@ -151,7 +153,7 @@ function page(route: string, title: string, description: string, body: string, s
|
||||
writeFileSync(path, shell(title, description, body, section));
|
||||
}
|
||||
|
||||
const status = `<span class="status status-beta"><span aria-hidden="true">●</span> Private Developer Preview</span>`;
|
||||
const status = `<Badge class="status status-beta" label="Private Developer Preview" variant="info" />`;
|
||||
writeFileSync(
|
||||
join(pages, "index.wrn"),
|
||||
marketingShell(
|
||||
@@ -554,6 +556,26 @@ writeFileSync(
|
||||
join(docs, "audits", "2026-07-12-baseline.md"),
|
||||
`# Baseline audit\n\nAutomated Bun install/docs/test/check/build passed before implementation. Lighthouse, browser accessibility, and screenshots were unavailable; no scores are claimed.\n`,
|
||||
);
|
||||
|
||||
// Historical release notes are intentionally immutable content, but they share
|
||||
// the current accessible shell controls and interaction behavior.
|
||||
const releasesDirectory = join(pages, "releases");
|
||||
for (const file of readdirSync(releasesDirectory).filter((name) => name.endsWith(".wrn"))) {
|
||||
const releasePath = join(releasesDirectory, file);
|
||||
let source = readFileSync(releasePath, "utf8");
|
||||
source = source.replace(
|
||||
'<a class="skip-link" href="#main">Skip to content</a>',
|
||||
'<SkipLink label="Skip to content" href="#main" class="docs-skip-link" />',
|
||||
);
|
||||
source = source.replace("<BackToTop threshold={480} />", "<BackToTop />");
|
||||
if (!source.includes("<BackToTop")) {
|
||||
source = source.replace(
|
||||
/\n {4}<\/div>\n {2}}\n}\s*$/,
|
||||
"\n <BackToTop />\n </div>\n }\n}\n",
|
||||
);
|
||||
}
|
||||
writeFileSync(releasePath, source);
|
||||
}
|
||||
console.log(
|
||||
`Generated portal pages, ${urls.length} discovery URLs, and audit deliverables for WRNexusJS ${version}.`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user