Skip to content

Commit f0a49a8

Browse files
committed
fix(website): animate counter swap and simplify mobile navbar
animate-in/fade-in/slide-in utilities have no plugin in this repo, so the metric swap had no transition. Define a counter-in keyframe in the theme. Hide the GitHub pill and Get Started below sm; both stay reachable from the mobile menu.
1 parent b701314 commit f0a49a8

3 files changed

Lines changed: 18 additions & 7 deletions

File tree

‎src/app/globals.css‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,22 @@
4343
--color-emerald-950: #00120c;
4444
}
4545

46+
/* ── Landing: GitHub counter metric swap ── */
47+
@theme {
48+
--animate-counter-in: counter-in 300ms ease-out;
49+
50+
@keyframes counter-in {
51+
from {
52+
opacity: 0;
53+
transform: translateY(0.25rem);
54+
}
55+
to {
56+
opacity: 1;
57+
transform: translateY(0);
58+
}
59+
}
60+
}
61+
4662
/* ── Fumadocs theming ── */
4763
:root {
4864
color-scheme: light;

‎src/components/landing/github-counter.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ export function RotatingGitHubCounter({
267267
<span className="flex flex-1 items-center justify-center gap-1.5 pl-2 pr-3 overflow-hidden">
268268
<span
269269
key={activeMetric}
270-
className="inline-flex items-center gap-1.5 transition-all duration-300 motion-safe:animate-in motion-safe:fade-in motion-safe:slide-in-from-bottom-1"
270+
className="inline-flex items-center gap-1.5 motion-safe:animate-counter-in"
271271
>
272272
{formattedCount && (
273273
<span className="text-xs font-medium sm:text-sm">{formattedCount}</span>

‎src/components/landing/navbar.tsx‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,10 @@ export function Navbar({ stats, starsCount }: NavbarProps = {}) {
5353
<RotatingGitHubCounter stats={resolvedStats} />
5454
</div>
5555

56-
{/* GitHub counter - mobile */}
57-
<div className="sm:hidden">
58-
<GitHubCounter metric="stars" count={resolvedStarsCount} hideCountOnMobile />
59-
</div>
60-
6156
{/* Get Started button */}
6257
<Link
6358
href="/docs/getting-started"
64-
className="group relative isolate inline-flex h-9 items-center justify-center overflow-hidden rounded-full bg-emerald-500 px-4 text-left text-sm font-medium text-black shadow-[0_0_20px_rgba(16,185,129,0.3)] transition-all duration-300 hover:bg-emerald-400 hover:shadow-[0_0_25px_rgba(16,185,129,0.5)] sm:h-10 sm:px-5"
59+
className="group relative isolate hidden h-9 items-center justify-center overflow-hidden rounded-full bg-emerald-500 px-4 text-left text-sm font-medium text-black shadow-[0_0_20px_rgba(16,185,129,0.3)] transition-all duration-300 hover:bg-emerald-400 hover:shadow-[0_0_25px_rgba(16,185,129,0.5)] sm:inline-flex sm:h-10 sm:px-5"
6560
>
6661
<span className="relative z-10 flex items-center gap-2">
6762
<span>Get Started</span>

0 commit comments

Comments
 (0)