Files
hyperframes/registry/components/glass-code-block/demo.html
T
Miguel Angel Simon Sierra e9172e3331 feat(registry): polish demo previews to shadcn-grade across catalog
Improve all 169 component demo previews for catalog legibility and polish:
- replace jagged clip-path cursor with a crisp SVG pointer (context-menu,
  cursor, simulated-cursor)
- scale under-sized UI primitives to fill the frame; enrich sparse demos
  with context (sibling rows, skeleton content, profile cards)
- normalize toward a neutral zinc/stone palette, bump small type, tidy
  spacing/radius/shadows
- preserve GSAP timelines, data-* composition attrs, and determinism
2026-06-25 00:57:26 -04:00

160 lines
4.6 KiB
HTML
Vendored

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=1920, height=1080" />
<title>Glass Code Block - Demo</title>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
<style>
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
width: 1920px;
height: 1080px;
overflow: hidden;
}
#demo {
width: 1920px;
height: 1080px;
display: grid;
place-items: center;
background: #f7f7f8;
font-family: Inter, system-ui, sans-serif;
}
.demo-frame {
display: grid;
place-items: center;
padding: 52px;
transform: scale(0.70);
transform-origin: center center;
}
.hf-remocn-glass-code-block {
--hf-accent: #2563eb;
--hf-ink: #111827;
--hf-muted: #6b7280;
--hf-surface: #ffffff;
color: var(--hf-ink);
font-family: Inter, system-ui, sans-serif;
}
.hf-remocn-glass-code-block {
width: 760px;
border-radius: 24px;
overflow: hidden;
background: #0f172a;
color: #dbeafe;
box-shadow: 0 28px 80px rgba(15, 23, 42, 0.2);
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.hf-remocn-glass-code-block .chrome {
height: 48px;
display: flex;
align-items: center;
gap: 8px;
padding: 0 18px;
background: #111827;
color: #94a3b8;
font-size: 15px;
font-weight: 500;
letter-spacing: 0.01em;
}
.hf-remocn-glass-code-block .dot {
width: 11px;
height: 11px;
border-radius: 999px;
background: #ef4444;
box-shadow:
18px 0 #f59e0b,
36px 0 #22c55e;
}
.hf-remocn-glass-code-block .body {
display: grid;
grid-template-columns: 210px 1fr;
min-height: 340px;
}
.hf-remocn-glass-code-block .files {
padding: 22px;
border-right: 1px solid rgba(148, 163, 184, 0.18);
color: #94a3b8;
font-size: 14px;
line-height: 1.9;
}
.hf-remocn-glass-code-block .editor {
padding: 22px;
display: grid;
gap: 12px;
}
.hf-remocn-glass-code-block .line {
display: block;
height: 16px;
border-radius: 999px;
background: linear-gradient(90deg, #38bdf8, #a78bfa);
transform: scaleX(var(--hf-line, 1));
transform-origin: left center;
opacity: var(--hf-line-opacity, 1);
}
.hf-remocn-glass-code-block .terminal {
padding: 18px 22px 24px;
border-top: 1px solid rgba(148, 163, 184, 0.18);
color: #86efac;
min-height: 78px;
font-size: 15px;
}
</style>
</head>
<body>
<div
id="demo"
data-composition-id="glass-code-block-demo"
data-start="0"
data-width="1920"
data-height="1080"
data-duration="5"
>
<div class="demo-frame">
<div class="hf-remocn-glass-code-block">
<div class="chrome"><span class="dot"></span><span>Glass Code Block</span></div>
<div class="body">
<div class="files">index.html<br />style.css<br />timeline.js</div>
<div class="editor">
<span class="line" style="width: 92%"></span
><span class="line" style="width: 72%"></span
><span class="line" style="width: 84%"></span
><span class="line" style="width: 58%"></span
><span class="line" style="width: 78%"></span>
</div>
</div>
<div class="terminal">$ hyperframes render --skill=glass-code-block</div>
</div>
</div>
<script>
const tl = gsap.timeline({ paused: true });
const startTime = 0.5;
tl.fromTo(
".hf-remocn-glass-code-block .line",
{ "--hf-line": 0, "--hf-line-opacity": 0 },
{
"--hf-line": 1,
"--hf-line-opacity": 1,
duration: 0.24,
stagger: 0.08,
ease: "power2.out",
},
startTime,
);
tl.fromTo(
".hf-remocn-glass-code-block .terminal",
{ opacity: 0, y: 16 },
{ opacity: 1, y: 0, duration: 0.34, ease: "power2.out" },
startTime + 0.48,
);
tl.set({}, {}, 5);
window.__timelines = window.__timelines || {};
window.__timelines["glass-code-block-demo"] = tl;
</script>
</div>
</body>
</html>