24 lines
2.8 KiB
Plaintext
24 lines
2.8 KiB
Plaintext
page FontsGuide {
|
|
layout = "showcase"
|
|
seo {
|
|
title = "Fonts"
|
|
description = "Select a font family globally while components continue to inherit typography correctly."
|
|
}
|
|
view {
|
|
<article class="page-docs guide-page">
|
|
<nav class="docs-breadcrumbs" aria-label="Breadcrumb"><a href="/docs">Docs</a><span aria-hidden="true">/</span><span>Fonts</span></nav>
|
|
<header class="docs-intro"><span class="showcase-eyebrow">Customization</span><h1>Fonts</h1><p>Select a font family globally while components continue to inherit typography correctly.</p></header>
|
|
<section class="guide-section guide-example"><h2>Configure and use it</h2><p>This is the smallest useful starting point. Copy it into the indicated application file or run it from the project root, then adjust the documented values for your product.</p><pre><code>fonts: <span>{</span>
|
|
sans: '"Plus Jakarta Sans", system-ui, sans-serif',
|
|
google: [<span>{</span> family: "Plus Jakarta Sans", weights: [400, 500, 600, 700] <span>}</span>],
|
|
<span>}</span></code></pre><h3>What changes after this</h3><p>Typography loads only required families and weights while preserving a readable system fallback.</p></section>
|
|
<section class="guide-section"><h2>Configure families</h2><p>Declare the application sans family and optional hosted families in wrnexus.config.ts. Components inherit typography without per-component imports.</p></section><section class="guide-section"><h2>Control loading</h2><p>Request only used weights and styles. Keep a system fallback so content remains readable before hosted fonts finish loading.</p></section><section class="guide-section"><h2>Preserve hierarchy</h2><p>Use semantic heading, body, label, caption, and code roles. Avoid arbitrary sizes that break density and responsive rhythm.</p></section><section class="guide-section"><h2>Test real content</h2><p>Check long headings, translated labels, numeric tables, code, and form errors. Font choices must remain legible at zoom and on narrow screens.</p></section>
|
|
<section class="guide-section"><h2>Verify the result</h2><p>Type-check the application, inspect the resolved package and styles, and build the production artifact. Test the page at a narrow viewport, with keyboard navigation, and in both color modes before shipping.</p><pre><code>bunx wrnexus typecheck .
|
|
bunx wrnexus inspect packages .
|
|
bunx wrnexus inspect styles .
|
|
bunx wrnexus build .</code></pre><h3>Expected result</h3><p>The commands exit successfully, the build reports the installed UI components and active theme, and the rendered page remains usable before and after hydration.</p></section>
|
|
<nav class="guide-next"><a href="/components/button">Explore components <span aria-hidden="true">→</span></a><a href="/block-library">Browse blocks <span aria-hidden="true">→</span></a></nav>
|
|
</article>
|
|
}
|
|
}
|