Skip to content

Commit 5d8dcfe

Browse files
committed
initial commit
1 parent 0903999 commit 5d8dcfe

49 files changed

Lines changed: 2880 additions & 123 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ It documents BinaryNoir's open-source VitePress plugins, Vite plugins and comman
1212
| [`@binarynoir/vitepress-auto-navbar`](https://github.com/binarynoir/vitepress-auto-navbar) | Builds the top navbar from the folder tree |
1313
| [`@binarynoir/vitepress-markdown-tags`](https://github.com/binarynoir/vitepress-markdown-tags) | Status badges and tagged-page lists |
1414
| [`@binarynoir/vitepress-reading-time-tag`](https://github.com/binarynoir/vitepress-reading-time-tag) | `[[readingTime]]` tip blocks |
15-
| [`markdown-it-glossary`](https://github.com/binarynoir/markdown-it-glossary) | Hover definitions from `docs/glossary.md` |
15+
| [`markdown-it-glossary`](https://github.com/binarynoir/markdown-it-glossary) | Hover definitions from `docs/reference/glossary.md` |
1616
| [`@binarynoir/vite-plugin-optimize-images`](https://github.com/binarynoir/vite-plugin-optimize-images) | Re-compresses images in the build output |
1717
| [`@binarynoir/vite-plugin-image-fallback`](https://github.com/binarynoir/vite-plugin-image-fallback) | Placeholder for missing images (one is missing on purpose) |
1818

‎assets/detective-only-black.svg‎

Lines changed: 174 additions & 0 deletions
Loading

‎assets/detective-only.svg‎

Lines changed: 166 additions & 0 deletions
Loading

‎assets/full-logo.svg‎

Lines changed: 742 additions & 0 deletions
Loading

‎docs/.nav‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
plugins
33
apps
44
guide
5+
reference
56
...
6-
glossary.md
7-
tagged-pages.md

‎docs/.vitepress/config.mts‎

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,19 @@ export default defineConfig({
2424
sitemap: { hostname: SITE_URL },
2525

2626
head: [
27-
['link', { rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' }],
28-
['meta', { name: 'theme-color', content: '#7a5add' }],
27+
['link', { rel: 'icon', type: 'image/svg+xml', href: '/favicon.svg' }],
28+
// Above-the-fold display font, fetched early to avoid a flash of fallback text.
29+
[
30+
'link',
31+
{
32+
rel: 'preload',
33+
href: '/fonts/film-noir.woff2',
34+
as: 'font',
35+
type: 'font/woff2',
36+
crossorigin: '',
37+
},
38+
],
39+
['meta', { name: 'theme-color', content: '#111111' }],
2940
['meta', { property: 'og:type', content: 'website' }],
3041
['meta', { property: 'og:title', content: 'BinaryNoir' }],
3142
[
@@ -39,7 +50,7 @@ export default defineConfig({
3950
],
4051

4152
themeConfig: {
42-
logo: '/logo.svg',
53+
logo: { light: '/logo-light.svg', dark: '/logo-dark.svg', alt: 'BinaryNoir' },
4354

4455
// @binarynoir/vitepress-auto-navbar: top nav built from the folder tree.
4556
// `.nav` files set order and titles; `.inherit` borrows titles from `.sidebar`.
@@ -72,9 +83,9 @@ export default defineConfig({
7283
markdown: {
7384
theme: { light: 'github-light', dark: 'github-dark' },
7485
config(md) {
75-
// markdown-it-glossary: hover definitions from docs/glossary.md on every page.
86+
// markdown-it-glossary: hover definitions from docs/reference/glossary.md on every page.
7687
// A page opts out with `glossary: false` in its frontmatter.
77-
md.use(glossaryAbbr, { file: path.join(docsRoot, 'glossary.md') });
88+
md.use(glossaryAbbr, { file: path.join(docsRoot, 'reference/glossary.md') });
7889
// @binarynoir/vitepress-reading-time-tag: [[readingTime]] becomes a tip block.
7990
md.use(readingTimeTag);
8091
// @binarynoir/vitepress-markdown-tags: ((tag|Done|green)) becomes a badge.

‎docs/.vitepress/theme/custom.css‎

Lines changed: 242 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,49 @@
1+
/* ---- Logo typefaces -------------------------------------------------------
2+
Film Noir : display. Wordmark, hero title and page titles (the big, rare text).
3+
Rockwell : slab serif for section headings and card titles.
4+
Body text, code and navigation stay on the system sans so documentation reads fast.
5+
Font files live in docs/public/fonts. */
6+
7+
@font-face {
8+
font-family: 'Film Noir';
9+
src: url('/fonts/film-noir.woff2') format('woff2');
10+
font-display: swap;
11+
}
12+
13+
@font-face {
14+
font-family: 'Rockwell';
15+
src: url('/fonts/rockwell.woff2') format('woff2');
16+
font-display: swap;
17+
}
18+
119
:root {
2-
--vp-c-brand-1: #7a5add;
3-
--vp-c-brand-2: #8d70e6;
4-
--vp-c-brand-3: #6a49c9;
5-
--vp-c-brand-soft: rgba(122, 90, 221, 0.14);
20+
--bn-font-display: 'Film Noir', 'Impact', 'Arial Narrow', sans-serif;
21+
--bn-font-slab: 'Rockwell', 'Rockwell Nova', 'Roboto Slab', 'Georgia', serif;
22+
}
23+
24+
:root {
25+
/* Noir palette, taken from the logo: black, white and one mid grey. */
26+
--vp-c-brand-1: #1f1f1f;
27+
--vp-c-brand-2: #3a3a3a;
28+
--vp-c-brand-3: #111111;
29+
--vp-c-brand-soft: rgba(17, 17, 17, 0.08);
630

731
--vp-home-hero-name-color: transparent;
8-
--vp-home-hero-name-background: linear-gradient(120deg, #7a5add 30%, #3aa6c9);
32+
--vp-home-hero-name-background: linear-gradient(120deg, #111111 30%, #8a8a8a);
933
}
1034

1135
.dark {
12-
--vp-c-brand-1: #a58cf0;
13-
--vp-c-brand-2: #9577e8;
14-
--vp-c-brand-3: #7a5add;
36+
--vp-c-brand-1: #f0f0f0;
37+
--vp-c-brand-2: #d4d4d4;
38+
--vp-c-brand-3: #e5e5e5;
39+
--vp-c-brand-soft: rgba(240, 240, 240, 0.14);
40+
41+
/* Brand buttons are light in dark mode, so their text must be dark. */
42+
--vp-button-brand-text: #111111;
43+
--vp-button-brand-hover-text: #111111;
44+
--vp-button-brand-active-text: #111111;
45+
46+
--vp-home-hero-name-background: linear-gradient(120deg, #ffffff 30%, #8a8a8a);
1547
}
1648

1749
/* Tooltips from markdown-it-glossary render as plain <abbr title>. Make them discoverable. */
@@ -24,3 +56,205 @@ abbr[title] {
2456
.vp-doc img {
2557
border-radius: 8px;
2658
}
59+
60+
/* ---- Noir identity -------------------------------------------------------
61+
Hard edges, strong contrast and one grey, to match the logo. */
62+
63+
:root {
64+
--vp-font-family-base:
65+
'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
66+
sans-serif;
67+
--bn-line: rgba(17, 17, 17, 0.16);
68+
--bn-line-strong: #111111;
69+
--bn-radius: 2px;
70+
}
71+
72+
.dark {
73+
--bn-line: rgba(240, 240, 240, 0.18);
74+
--bn-line-strong: #f0f0f0;
75+
}
76+
77+
/* Wordmark and titles: Film Noir. */
78+
.VPNavBarTitle .title,
79+
.VPHero .name,
80+
.vp-doc h1 {
81+
font-family: var(--bn-font-display);
82+
font-weight: 400;
83+
letter-spacing: 0.06em;
84+
text-transform: uppercase;
85+
}
86+
87+
.VPHero .name {
88+
font-size: clamp(48px, 7vw, 72px);
89+
/* Film Noir is tall; a roomy line box keeps the gradient text from clipping. */
90+
line-height: 1.3;
91+
padding-block: 4px;
92+
letter-spacing: 0.08em;
93+
}
94+
95+
.vp-doc h1 {
96+
letter-spacing: 0.05em;
97+
}
98+
99+
/* Tag badges inside headings keep the body font so they stay legible. */
100+
.vp-doc h1 .md-tag,
101+
.vp-doc h2 .md-tag {
102+
font-family: var(--vp-font-family-base);
103+
letter-spacing: 0;
104+
text-transform: none;
105+
}
106+
107+
/* Section headings and card titles: Rockwell. */
108+
.vp-doc h2,
109+
.vp-doc h3,
110+
.vp-doc h4,
111+
.VPHero .text,
112+
.VPFeature .title {
113+
font-family: var(--bn-font-slab);
114+
font-weight: 400;
115+
}
116+
117+
.VPHero .text {
118+
letter-spacing: -0.01em;
119+
}
120+
121+
.VPNavBarTitle .logo {
122+
height: 28px;
123+
}
124+
125+
/* Hero: the full logo is portrait, so cap its height and drop the colored glow. */
126+
.VPHero .image-bg {
127+
display: none;
128+
}
129+
130+
.VPHero .image-src {
131+
position: static;
132+
transform: none;
133+
max-height: 360px;
134+
max-width: 100%;
135+
width: auto;
136+
margin-inline: auto;
137+
border-radius: 0;
138+
}
139+
140+
.VPHero .image {
141+
margin: 0 0 24px;
142+
}
143+
144+
@media (min-width: 640px) {
145+
.VPHero .image {
146+
margin: 0 0 24px;
147+
}
148+
}
149+
150+
@media (min-width: 960px) {
151+
.VPHero .image {
152+
margin: 0;
153+
}
154+
}
155+
156+
.VPHero .image-container {
157+
display: flex;
158+
justify-content: center;
159+
height: auto;
160+
/* VitePress pulls the image up with negative margins on small screens, which
161+
slid the logo under the navbar and over the title. */
162+
margin: 0;
163+
padding-block: 24px;
164+
}
165+
166+
@media (min-width: 960px) {
167+
.VPHero .image-container {
168+
width: auto;
169+
min-width: 320px;
170+
}
171+
}
172+
173+
.VPHero .tagline {
174+
max-width: 34rem;
175+
}
176+
177+
/* Buttons: square, to match the logo's frame. */
178+
.VPButton.VPButton {
179+
border-radius: var(--bn-radius);
180+
font-weight: 600;
181+
}
182+
183+
.VPButton.VPButton.alt {
184+
border-color: var(--bn-line-strong);
185+
}
186+
187+
/* Feature cards: outlined panels with a boxed icon, no soft fill. */
188+
.VPFeatures .VPFeature {
189+
background: transparent;
190+
border: 1px solid var(--bn-line);
191+
border-radius: var(--bn-radius);
192+
transition:
193+
border-color 0.15s,
194+
transform 0.15s;
195+
}
196+
197+
.VPFeatures .VPFeature:hover {
198+
border-color: var(--bn-line-strong);
199+
transform: translateY(-2px);
200+
}
201+
202+
.VPFeatures .VPFeature .icon {
203+
background: transparent;
204+
border: 1px solid var(--bn-line-strong);
205+
border-radius: var(--bn-radius);
206+
width: 52px;
207+
height: 52px;
208+
}
209+
210+
.VPFeatures .VPFeature .icon img {
211+
width: 28px;
212+
height: 28px;
213+
}
214+
215+
.VPFeatures .VPFeature .link-text-value {
216+
font-weight: 600;
217+
}
218+
219+
/* Content: a scanline rule under each H2, echoing the dashes behind the detective. */
220+
.vp-doc h2 {
221+
border-top: 0;
222+
padding-top: 0;
223+
margin-top: 56px;
224+
}
225+
226+
.vp-doc h2::after {
227+
content: '';
228+
display: block;
229+
height: 4px;
230+
margin-top: 10px;
231+
background: repeating-linear-gradient(90deg, var(--bn-line-strong) 0 24px, transparent 24px 30px);
232+
opacity: 0.55;
233+
width: 120px;
234+
}
235+
236+
.vp-doc table,
237+
.vp-doc div[class*='language-'] {
238+
border-radius: var(--bn-radius);
239+
}
240+
241+
.vp-doc th {
242+
text-transform: uppercase;
243+
letter-spacing: 0.06em;
244+
font-size: 13px;
245+
}
246+
247+
/* Keep keyboard focus obvious. */
248+
:focus-visible {
249+
outline: 2px solid var(--bn-line-strong);
250+
outline-offset: 2px;
251+
}
252+
253+
@media (prefers-reduced-motion: reduce) {
254+
.VPFeature {
255+
transition: none;
256+
}
257+
.VPFeatures .VPFeature:hover {
258+
transform: none;
259+
}
260+
}

‎docs/apps/roadmap.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ tagged:
77

88
# Apps roadmap
99

10-
Every `Done` and `Planned` tag used on the app pages, collected automatically. This page has no list of its own: it is a [tagged page](/plugins/markdown-tags#tagged-pages) scoped to the `apps/` folder, so it stays current as the app pages change.
10+
Every `Done` and `Planned` tag used on the app pages, collected automatically. This page has no list of its own: it is a [tagged page](/plugins/markdown-tags/vitepress#tagged-pages) scoped to the `apps/` folder, so it stays current as the app pages change.
1111

1212
<!-- tagged-pages -->

‎docs/guide/how-this-site-works.md‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,13 @@ This site is plain VitePress 2 plus seven plugins. There is no hand-written navi
1414
docs/
1515
.nav top navbar order
1616
index.md home page
17-
glossary.md terms for hover tooltips
18-
tagged-pages.md generated list of every tag
1917
plugins/ developer docs for each plugin
2018
.sidebar order and titles for this section
2119
apps/ user docs for the CLI apps
2220
guide/ this section
21+
reference/ glossary terms and the generated list of every tag
2322
assets/ images imported by pages
24-
public/ files served as-is (logo)
23+
public/ files served as-is (logos, favicon, icons)
2524
.vitepress/
2625
config.mts the one config file
2726
theme/ registers tag badges, brand colors
@@ -33,7 +32,7 @@ docs/
3332
| ------------------------------- | --------------------------------------------- | ------------------------------------- |
3433
| Top navbar | [Auto Navbar](/plugins/auto-navbar) | `themeConfig.nav` in `config.mts` |
3534
| Left sidebar | [Auto Sidebar](/plugins/auto-sidebar) | `themeConfig.sidebar` in `config.mts` |
36-
| Status badges | [Markdown Tags](/plugins/markdown-tags) | `markdown.config`, plus the theme |
35+
| Status badges | [Markdown Tags](/plugins/markdown-tags/) | `markdown.config`, plus the theme |
3736
| "Reading time" box | [Reading Time Tag](/plugins/reading-time-tag) | `markdown.config` |
3837
| Dotted-underline hovers | [Glossary Tooltips](/plugins/glossary) | `markdown.config` |
3938
| Smaller images | [Optimize Images](/plugins/optimize-images) | `vite.plugins` |

0 commit comments

Comments
 (0)