Skip to content

Commit 0e6520f

Browse files
btraversclaude
andcommitted
feat(theme): docs chrome refinements — navbar logo, hero, feature cards (1.3.0)
Apply the docs half of the design-system refinement (claude design `refined/theme/vitepress.css`), layered on the current AA-tuned token model: - Navbar logo: size to 30px (24px default read as a speck beside the wordmark) + a touch more title gap; 26px on mobile. - Robust light/dark logo swap by file name (`[src*="-dark"]`), so the correct artwork shows even if a repo swaps the two paths — fixes the light-coloured logo showing near-invisibly on the white navbar in light. - Home hero: tighter letter-spacing on name/text. - Feature cards: hairline border + soft lift on hover (echoing the landing package cards) + brand-tinted icon chip. Minor bump 1.2.1 → 1.3.0. Verified by simulating the rules on the live amqp-contract docs in both schemes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 16957d1 commit 0e6520f

2 files changed

Lines changed: 33 additions & 6 deletions

File tree

packages/theme/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@btravstack/theme",
3-
"version": "1.2.1",
3+
"version": "1.3.0",
44
"description": "Shared VitePress theme and design tokens for btravstack sites",
55
"license": "MIT",
66
"author": "Benoit TRAVERS",

packages/theme/src/style.css

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,44 @@
8484
.VPHero .image-src { filter: drop-shadow(0 18px 40px rgba(142, 26, 82, 0.4)); }
8585
@keyframes btv-floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
8686

87-
/* Feature cards: rounder, with a brand-tinted lift on hover */
87+
/* Navbar logo: VitePress ships a 24px mark — next to the wordmark the beetroot
88+
reads as a speck. Give it presence and a little more breathing room. */
89+
.VPNavBarTitle .logo { height: 30px; width: auto; }
90+
.VPNavBarTitle .title { gap: 9px; }
91+
@media (max-width: 768px) { .VPNavBarTitle .logo { height: 26px; } }
92+
93+
/* Robust light/dark logo switching. With `logo: { light, dark }` VitePress
94+
toggles the two variants by class; we also key off the file name, so the
95+
right artwork shows even when a repo's config has the two paths swapped — the
96+
symptom being the light-coloured dark-scheme logo showing on the white navbar
97+
in light mode, where it's all but invisible. Single-file logo.svg is fine. */
98+
:root:not(.dark) .VPNavBarTitle .logo[src*="-dark"] { display: none !important; }
99+
:root.dark .VPNavBarTitle .logo[src*="-light"] { display: none !important; }
100+
101+
/* Home hero: tighten the display type. (The hero `image:` is one file per repo,
102+
set in index.md frontmatter; for a crisp mark in both schemes make it
103+
scheme-aware there — hero.image.light / hero.image.dark.) */
104+
.VPHero .name { letter-spacing: -1.5px; }
105+
.VPHero .text { letter-spacing: -0.5px; }
106+
107+
/* Feature cards: hairline border + a soft lift on hover, echoing the landing
108+
page's package cards; brand-tinted icon chip. */
88109
.VPFeature {
89-
border-radius: var(--radius-xl);
110+
border: 1px solid var(--vp-c-divider);
111+
border-radius: var(--radius-lg);
90112
transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
91113
}
92114
.VPFeature:hover {
93115
transform: translateY(-4px);
94-
border-color: var(--vp-c-brand-1);
95-
box-shadow: 0 18px 40px -24px rgba(var(--accent-rgb), 0.5);
116+
border-color: var(--vp-c-border);
117+
box-shadow: var(--shadow-card);
118+
}
119+
.VPFeature .icon {
120+
border-radius: var(--radius) !important;
121+
background: var(--vp-c-brand-soft) !important;
122+
border: 1px solid rgba(var(--accent-rgb), 0.22);
96123
}
97-
.VPFeature .icon { border-radius: var(--radius) !important; }
124+
.VPFeature .title { letter-spacing: -0.3px; }
98125

99126
/* Brand buttons: springy hover */
100127
.VPButton.brand { transition: filter 0.15s, transform 0.15s; }

0 commit comments

Comments
 (0)