Skip to content

Commit 31bfde7

Browse files
cquil11claudeadibarra
authored
feat: minecraft splash text + fix music pause on navigation (#189)
* feat: add splash text + fix music pause on navigation - Add Minecraft-style bouncing yellow splash text on the landing page with 30 inference-themed phrases (only visible in minecraft mode) - Use Next.js Link for all header navigation to prevent music from pausing when switching between pages Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * revert: restore layoutGroup NavLink workaround for cross-layout soft nav bug --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Alec Ibarra <93070681+adibarra@users.noreply.github.com>
1 parent 56fa9b1 commit 31bfde7

3 files changed

Lines changed: 119 additions & 1 deletion

File tree

packages/app/src/app/globals.css

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,47 @@
285285
display: none;
286286
}
287287

288+
/* Minecraft splash text — yellow bouncing rotated text like the title screen */
289+
@keyframes minecraft-splash-bounce {
290+
0%,
291+
100% {
292+
transform: rotate(-15deg) scale(1);
293+
}
294+
50% {
295+
transform: rotate(-15deg) scale(1.1);
296+
}
297+
}
298+
299+
.minecraft-splash-wrapper {
300+
position: absolute;
301+
top: -1.75rem;
302+
right: 0;
303+
z-index: 10;
304+
pointer-events: none;
305+
overflow: visible;
306+
}
307+
308+
.minecraft-splash {
309+
display: inline-block;
310+
color: #ffff00;
311+
font-weight: bold;
312+
font-size: 0.85rem;
313+
white-space: nowrap;
314+
text-shadow: 2px 2px 0px #3f3f00;
315+
animation: minecraft-splash-bounce 1.5s ease-in-out infinite;
316+
transform-origin: right center;
317+
}
318+
319+
@media (min-width: 640px) {
320+
.minecraft-splash {
321+
font-size: 1.1rem;
322+
}
323+
.minecraft-splash-wrapper {
324+
top: -2rem;
325+
right: 1rem;
326+
}
327+
}
328+
288329
@layer base {
289330
* {
290331
@apply border-border outline-ring/50;

packages/app/src/components/intro-section.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Quote } from 'lucide-react';
22

33
import { Card } from '@/components/ui/card';
4+
import { MinecraftSplash } from '@/components/minecraft/minecraft-splash';
45
import { QuoteCarousel } from '@/components/quote-carousel';
56
import { QUOTES, CAROUSEL_ORGS, CAROUSEL_LABELS } from '@/components/quotes/quotes-data';
67

@@ -15,11 +16,12 @@ export function IntroSection() {
1516
return (
1617
<section>
1718
<Card data-testid="intro-section">
18-
<div className="flex items-center gap-2 mb-4">
19+
<div className="relative flex items-center gap-2 mb-4">
1920
<Quote className="h-5 w-5 text-brand" />
2021
<h2 className="text-lg font-semibold">
2122
Open Source Continuous Inference Benchmark Trusted by GigaWatt Token Factories
2223
</h2>
24+
<MinecraftSplash />
2325
</div>
2426
<div>
2527
<QuoteCarousel
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
'use client';
2+
3+
import { useState, useEffect, useRef } from 'react';
4+
5+
const SPLASHES = [
6+
'Now with more tokens!',
7+
'GPU go brrr!',
8+
'Also try SGLang!',
9+
'Tensor cores activated!',
10+
'FP8 is the new FP16!',
11+
'100% open source!',
12+
'Benchmarked on real hardware!',
13+
'Not just vibes!',
14+
'Tokens per second!',
15+
'Time to first token!',
16+
'May contain NaN!',
17+
'Works on my GPU!',
18+
'DeepSeek approved!',
19+
'Lower latency!',
20+
'Higher throughput!',
21+
'Runs on a single node!',
22+
'NVLink go brrr!',
23+
'Attention is all you need!',
24+
'Powered by CUDA!',
25+
'Batch size = 1!',
26+
'No synthetic benchmarks!',
27+
'Real-world workloads!',
28+
'Out of VRAM!',
29+
'KV cache optimized!',
30+
'Prefill gang!',
31+
'Disagg or no disagg?',
32+
'GB200 NVL72!',
33+
'More flops!',
34+
'PCIe bottleneck!',
35+
'Roofline analysis!',
36+
];
37+
38+
/**
39+
* Minecraft-style splash text — yellow, rotated, bouncing text
40+
* that appears on the landing page when minecraft mode is active.
41+
*/
42+
export function MinecraftSplash() {
43+
const [isMinecraft, setIsMinecraft] = useState(false);
44+
const [splash, setSplash] = useState('');
45+
const hasInitialized = useRef(false);
46+
47+
useEffect(() => {
48+
function check() {
49+
setIsMinecraft(document.documentElement.classList.contains('minecraft'));
50+
}
51+
check();
52+
53+
const observer = new MutationObserver(check);
54+
observer.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] });
55+
return () => observer.disconnect();
56+
}, []);
57+
58+
useEffect(() => {
59+
if (isMinecraft && !hasInitialized.current) {
60+
hasInitialized.current = true;
61+
setSplash(SPLASHES[Math.floor(Math.random() * SPLASHES.length)]);
62+
}
63+
if (!isMinecraft) {
64+
hasInitialized.current = false;
65+
}
66+
}, [isMinecraft]);
67+
68+
if (!isMinecraft || !splash) return null;
69+
70+
return (
71+
<div className="minecraft-splash-wrapper">
72+
<span className="minecraft-splash">{splash}</span>
73+
</div>
74+
);
75+
}

0 commit comments

Comments
 (0)