Cards & content / Media & mockups
Muted Painting Terminal Video
1080px wide looping muted video of a darkened impressionist water-lily painting with a faint translucent terminal window (traffic-light dots, 'Terminal — zsh', blinking cursor) centred, blended into the cobalt page.
Rebuilt from hermes-agent.nousresearch.com in the Electric Ultramarine Engraving style.
Looks exactly like hermes-agent.nousresearch.com: brings its fonts and colours, namespaced so your own theme stays untouched.
Restyled to your project: uses your shadcn colours, fonts and radius, so it matches the rest of your app. Layout, type sizes and motion stay as designed.
Usage
Props: imageSrc (painting backdrop), title (terminal title), prompt, and phrases (array typed in the terminal). Renders standalone; the image drifts slowly to stand in for the looping video.
components/video-terminal-showcase.tsx
"use client"; import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type RefObject } from "react"; export default function MutedPaintingTerminalVideo({ imageSrc = "https://yoink-app.fly.dev/stock/nature-3.jpg", title = "Terminal — zsh", prompt = "~ %", phrases = ["npx create-studio@latest", "studio init --theme dusk", "studio deploy"], }: { imageSrc?: string; title?: string; prompt?: string; phrases?: string[]; }) { return ( <section className="bg-cobalt px-4 py-10 md:px-8"> <div className="relative mx-auto aspect-[1080/632] w-full max-w-[1080px] overflow-hidden bg-cobalt-shade"> <img src={imageSrc} alt="Dark painted water lilies on a pond" width={1024} height={768} className="absolute inset-0 h-full w-full scale-110 object-cover opacity-60 motion-safe:animate-pulse [animation-duration:8s]" /> <div className="absolute inset-0 bg-cobalt/30 mix-blend-multiply" /> <div className="absolute inset-0 bg-black/45" /> <div className="absolute inset-0 flex items-center justify-center p-4"> <div className="aspect-[515/250] w-full max-w-[515px] overflow-hidden rounded-lg bg-black/25 backdrop-blur-[2px]"> <div className="relative flex items-center bg-black/15 px-4 py-2.5"> <div className="flex gap-2" aria-hidden="true"> <span className="h-2.5 w-2.5 rounded-full bg-[#7a2a22]" /> <span className="h-2.5 w-2.5 rounded-full bg-[#7a5a1c]" /> <span className="h-2.5 w-2.5 rounded-full bg-[#1f6a2c]" /> </div> <span className="absolute inset-x-0 text-center font-mono text-[13px] text-paper/40">{title}</span> </div> <div className="px-4 py-3 font-mono text-[13px] text-paper/50"> <span className="text-[#3f9a5a]">{prompt}</span>{" "} <Typewriter phrases={phrases} typeSpeed={55} deleteSpeed={30} pause={1800} loop caret /> </div> </div> </div> </div> </section> ); } // ---- Yoink motion (inlined, no dependencies): Typewriter ---- const useYkLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect; function ykReducedMotion(): boolean { return typeof window !== "undefined" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches; } const ykSrOnly: CSSProperties = { position: "absolute", width: 1, height: 1, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0 0 0 0)", whiteSpace: "nowrap", border: 0 }; // "idle": untouched (visible) · "hidden": waiting below the fold · "shown": play the entrance. // Content is only hidden once we know we can show it again (IntersectionObserver exists, motion allowed, // and there is a box to watch), and a safety net reveals anything on screen that is still hidden. type YkRevealState = "idle" | "hidden" | "shown"; function useYkReveal(ref: RefObject<Element | null>, once = true): YkRevealState { const [state, setState] = useState<YkRevealState>("idle"); useYkLayoutEffect(() => { const el = ref.current; if (!el || ykReducedMotion() || typeof IntersectionObserver === "undefined") return; // watch the element's own box, or its children when it has none (display: contents) const boxes = () => (getComputedStyle(el).display === "contents" ? Array.from(el.children) : [el]); const onScreen = (t: Element) => { const r = t.getBoundingClientRect(); return (r.width > 0 || r.height > 0) && r.bottom > 0 && r.right > 0 && r.top < window.innerHeight && r.left < window.innerWidth; }; if (!boxes().some((t) => t.getBoundingClientRect().width > 0 || t.getBoundingClientRect().height > 0)) return; // e.g. hidden at mount: leave it visible let shown = false; const show = (v: boolean) => { if (v !== shown) (shown = v), setState(v ? "shown" : "hidden"); }; setState("hidden"); const inView = new Set<Element>(); const io = new IntersectionObserver((entries) => { for (const e of entries) { if (e.isIntersecting) inView.add(e.target); else inView.delete(e.target); } if (inView.size) { show(true); if (once) io.disconnect(); } else if (!once) show(false); }); const watched = new Set<Element>(); const watch = () => boxes().forEach((t) => !watched.has(t) && (watched.add(t), io.observe(t))); watch(); // safety net: styles that land after mount (display: contents) get watched too, and nothing // stays hidden for more than a moment while it is actually on screen const start = Date.now(); const net = setInterval(() => { if (shown) return once && clearInterval(net); watch(); if (Date.now() - start > 2400 && boxes().some(onScreen)) show(true); }, 600); return () => { io.disconnect(); clearInterval(net); }; }, [once]); return state; } const YK_CARET_CSS = `@keyframes yk-caret{50%{opacity:0}}@media (prefers-reduced-motion:reduce){[data-yk-caret]{animation:none!important}}`; /** Types out phrases one character at a time, deletes them, and moves on to the next. */ function Typewriter({ phrases = ["Ship faster.", "Look sharper.", "Sleep better."], typeSpeed = 55, deleteSpeed = 30, pause = 1600, loop = true, caret = true, className, style, }: { phrases?: string[]; typeSpeed?: number; deleteSpeed?: number; pause?: number; loop?: boolean; caret?: boolean; className?: string; style?: CSSProperties; }) { const ref = useRef<HTMLSpanElement>(null); const state = useYkReveal(ref); const [text, setText] = useState(phrases[0] ?? ""); useYkLayoutEffect(() => { if (state === "hidden") setText(""); }, [state]); useEffect(() => { if (state !== "shown" || !phrases.length) return; let p = 0, n = 0, deleting = false, timer: ReturnType<typeof setTimeout>; const tick = () => { const full = phrases[p]; if (!deleting) { n++; setText(full.slice(0, n)); if (n < full.length) return (timer = setTimeout(tick, typeSpeed)); if (!loop && p === phrases.length - 1) return; deleting = true; return (timer = setTimeout(tick, pause)); } n--; setText(full.slice(0, n)); if (n > 0) return (timer = setTimeout(tick, deleteSpeed)); deleting = false; p = (p + 1) % phrases.length; timer = setTimeout(tick, typeSpeed * 4); }; timer = setTimeout(tick, typeSpeed * 4); return () => clearTimeout(timer); }, [state, phrases.join("|"), typeSpeed, deleteSpeed, pause, loop]); return ( <span ref={ref} className={className} style={style}> <span style={ykSrOnly}>{phrases.join(" ")}</span> <span aria-hidden="true"> {text} {caret && ( <> <style>{YK_CARET_CSS}</style> <span data-yk-caret="" style={{ display: "inline-block", width: "0.08em", height: "1em", marginLeft: "0.06em", verticalAlign: "-0.12em", background: "currentColor", animation: "yk-caret 1s steps(1) infinite" }} /> </> )} </span> </span> ); }"use client"; import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type RefObject } from "react"; export default function MutedPaintingTerminalVideo({ imageSrc = "https://yoink-app.fly.dev/stock/nature-3.jpg", title = "Terminal — zsh", prompt = "~ %", phrases = ["npx create-studio@latest", "studio init --theme dusk", "studio deploy"], }: { imageSrc?: string; title?: string; prompt?: string; phrases?: string[]; }) { return ( <section className="bg-background px-4 py-10 md:px-8"> <div className="relative mx-auto aspect-[1080/632] w-full max-w-[1080px] overflow-hidden bg-primary"> <img src={imageSrc} alt="Dark painted water lilies on a pond" width={1024} height={768} className="absolute inset-0 h-full w-full scale-110 object-cover opacity-60 motion-safe:animate-pulse [animation-duration:8s]" /> <div className="absolute inset-0 bg-background/30 mix-blend-multiply" /> <div className="absolute inset-0 bg-background/45" /> <div className="absolute inset-0 flex items-center justify-center p-4"> <div className="aspect-[515/250] w-full max-w-[515px] overflow-hidden rounded-md bg-background/25 backdrop-blur-[2px]"> <div className="relative flex items-center bg-background/15 px-4 py-2.5"> <div className="flex gap-2" aria-hidden="true"> <span className="h-2.5 w-2.5 rounded-full bg-[#7a2a22]" /> <span className="h-2.5 w-2.5 rounded-full bg-[#7a5a1c]" /> <span className="h-2.5 w-2.5 rounded-full bg-[#1f6a2c]" /> </div> <span className="absolute inset-x-0 text-center font-mono text-[13px] text-foreground/40">{title}</span> </div> <div className="px-4 py-3 font-mono text-[13px] text-foreground/50"> <span className="text-[#3f9a5a]">{prompt}</span>{" "} <Typewriter phrases={phrases} typeSpeed={55} deleteSpeed={30} pause={1800} loop caret /> </div> </div> </div> </div> </section> ); } // ---- Yoink motion (inlined, no dependencies): Typewriter ---- const useYkLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect; function ykReducedMotion(): boolean { return typeof window !== "undefined" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches; } const ykSrOnly: CSSProperties = { position: "absolute", width: 1, height: 1, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0 0 0 0)", whiteSpace: "nowrap", border: 0 }; // "idle": untouched (visible) · "hidden": waiting below the fold · "shown": play the entrance. // Content is only hidden once we know we can show it again (IntersectionObserver exists, motion allowed, // and there is a box to watch), and a safety net reveals anything on screen that is still hidden. type YkRevealState = "idle" | "hidden" | "shown"; function useYkReveal(ref: RefObject<Element | null>, once = true): YkRevealState { const [state, setState] = useState<YkRevealState>("idle"); useYkLayoutEffect(() => { const el = ref.current; if (!el || ykReducedMotion() || typeof IntersectionObserver === "undefined") return; // watch the element's own box, or its children when it has none (display: contents) const boxes = () => (getComputedStyle(el).display === "contents" ? Array.from(el.children) : [el]); const onScreen = (t: Element) => { const r = t.getBoundingClientRect(); return (r.width > 0 || r.height > 0) && r.bottom > 0 && r.right > 0 && r.top < window.innerHeight && r.left < window.innerWidth; }; if (!boxes().some((t) => t.getBoundingClientRect().width > 0 || t.getBoundingClientRect().height > 0)) return; // e.g. hidden at mount: leave it visible let shown = false; const show = (v: boolean) => { if (v !== shown) (shown = v), setState(v ? "shown" : "hidden"); }; setState("hidden"); const inView = new Set<Element>(); const io = new IntersectionObserver((entries) => { for (const e of entries) { if (e.isIntersecting) inView.add(e.target); else inView.delete(e.target); } if (inView.size) { show(true); if (once) io.disconnect(); } else if (!once) show(false); }); const watched = new Set<Element>(); const watch = () => boxes().forEach((t) => !watched.has(t) && (watched.add(t), io.observe(t))); watch(); // safety net: styles that land after mount (display: contents) get watched too, and nothing // stays hidden for more than a moment while it is actually on screen const start = Date.now(); const net = setInterval(() => { if (shown) return once && clearInterval(net); watch(); if (Date.now() - start > 2400 && boxes().some(onScreen)) show(true); }, 600); return () => { io.disconnect(); clearInterval(net); }; }, [once]); return state; } const YK_CARET_CSS = `@keyframes yk-caret{50%{opacity:0}}@media (prefers-reduced-motion:reduce){[data-yk-caret]{animation:none!important}}`; /** Types out phrases one character at a time, deletes them, and moves on to the next. */ function Typewriter({ phrases = ["Ship faster.", "Look sharper.", "Sleep better."], typeSpeed = 55, deleteSpeed = 30, pause = 1600, loop = true, caret = true, className, style, }: { phrases?: string[]; typeSpeed?: number; deleteSpeed?: number; pause?: number; loop?: boolean; caret?: boolean; className?: string; style?: CSSProperties; }) { const ref = useRef<HTMLSpanElement>(null); const state = useYkReveal(ref); const [text, setText] = useState(phrases[0] ?? ""); useYkLayoutEffect(() => { if (state === "hidden") setText(""); }, [state]); useEffect(() => { if (state !== "shown" || !phrases.length) return; let p = 0, n = 0, deleting = false, timer: ReturnType<typeof setTimeout>; const tick = () => { const full = phrases[p]; if (!deleting) { n++; setText(full.slice(0, n)); if (n < full.length) return (timer = setTimeout(tick, typeSpeed)); if (!loop && p === phrases.length - 1) return; deleting = true; return (timer = setTimeout(tick, pause)); } n--; setText(full.slice(0, n)); if (n > 0) return (timer = setTimeout(tick, deleteSpeed)); deleting = false; p = (p + 1) % phrases.length; timer = setTimeout(tick, typeSpeed * 4); }; timer = setTimeout(tick, typeSpeed * 4); return () => clearTimeout(timer); }, [state, phrases.join("|"), typeSpeed, deleteSpeed, pause, loop]); return ( <span ref={ref} className={className} style={style}> <span style={ykSrOnly}>{phrases.join(" ")}</span> <span aria-hidden="true"> {text} {caret && ( <> <style>{YK_CARET_CSS}</style> <span data-yk-caret="" style={{ display: "inline-block", width: "0.08em", height: "1em", marginLeft: "0.06em", verticalAlign: "-0.12em", background: "currentColor", animation: "yk-caret 1s steps(1) infinite" }} /> </> )} </span> </span> ); }
Quality checks
Automated, in a real browser · 5d ago- Accessible: passedNo serious accessibility problems (axe-core): readable contrast, labelled buttons and images.
- Responsive: passedRenders at phone (390px), tablet (768px) and desktop width without sideways scrolling.
- Dark mode: passedStill readable when installed in your theme and switched to dark mode.
- Themeable: not passed4 hard-coded colours (bg-[#7a2a22], bg-[#7a5a1c], bg-[#1f6a2c], text-[#3f9a5a]). These ignore the theme and break dark mode.
- Animates cleanly: passedIts animation plays and finishes with everything visible, and it stays still for people who turn on reduced motion.