Astra — 시네마틱 우주 여행 랜딩 페이지
MIT 라이선스
pulkitxm/claude-directory갤러리에서 가져온 랜딩 페이지.
'astra'를 위한 단일 페이지 우주 여행 랜딩 사이트로, 두 개의 전체 높이 섹션(히어로와 역량 쇼케이스)을 포함하며, 두 섹션 모두 커스텀 rAF 기반 JavaScript 루틴(No CSS 전환)으로 크로스페이드되는 루프 배경 비디오 위에 있습니다. 페이지는 모든 크롬(네비게이션, 칩, 카드, CTA)에 '액체 유리' 디자인 시스템을 공유합니다. 모든 텍스트는 어두운 오버레이 없이 전체 너비 비디오 위에 흰색으로 표시되므로 대비는 오로지 유리 크롬에서만 제공됩니다.
워크플로
example.html을 사용자의 작업 공간에 작업 파일로 복제합니다.- 플레이스홀더 콘텐츠를 사용자의 실제 브랜드 이름, 헤드라인, 본문, 숫자 및 이미지로 바꿉니다. 자산을 교체할 때 기존 이미지 크기를 일치시킵니다.
- 디자인 시스템을 유지합니다. 아래 빌드 사양의 팔레트, 글꼴 크기, 간격 리듬 및 모션은 정체성입니다. 글꼴을 대체하거나, 팔레트 색상을 변경하거나, 장식 요소를 제거하지 마십시오.
- 섹션을 복제하여 확장합니다. 다른 템플릿에서 레이아웃을 가져오지 마십시오. 섹션이 누락된 경우 이 템플릿의 자체 어휘로 처음부터 디자인하십시오.
- 모션을 접근 가능하게 유지합니다. 모든 애니메이션은 빌드 사양에서 요구하는 대로
prefers-reduced-motion뒤에 있어야 합니다.
출력 계약
<artifact> 태그 사이에 출력합니다:
<artifact identifier="space-voyage-landing" type="text/html" title="Astra — 시네마틱 우주 여행 랜딩 페이지">
<!doctype html>
<html>...</html>
</artifact>
빌드 사양
이 디자인을 생성한 업스트림 프롬프트입니다. (그대로)
Astra — 시네마틱 우주 여행 랜딩 페이지
개요
두 개의 전체 높이 섹션(히어로와 역량 쇼케이스)을 포함하는 단일 페이지 우주 여행 랜딩 사이트를 구축합니다. 두 섹션 모두 커스텀 rAF 기반 JavaScript 루틴(No CSS 전환)으로 크로스페이드되는 루프 배경 비디오 위에 있습니다. 페이지는 모든 크롬(네비게이션, 칩, 카드, CTA)에 '액체 유리' 디자인 시스템을 사용하고 Motion(Framer Motion)을 입장 애니메이션에 사용합니다(단어별 블러인 헤드라인 포함). 모든 텍스트는 어두운 오버레이 없이 전체 너비 비디오 위에 흰색으로 표시됩니다. 대비는 전적으로 액체 유리 크롬에서 제공됩니다.
기술 스택
- 런타임 / 프레임워크: React 18.3.1 (CDN에서 로드된 UMD 개발 빌드 — 번들러 없음).
- JSX 컴파일: 브라우저 내에서 Babel Standalone 7.29.0을 통해; 모든 컴포넌트는
window.X = X에 자신을 내보내는<script type="text/babel">파일입니다. - 애니메이션: Framer Motion 11.11.17 (UMD 빌드,
window.Motion으로 노출됨). - 스타일링: 인라인
tailwind.config가 있는 CDN<script>(https://cdn.tailwindcss.com)를 통한 Tailwind CSS와 액체 유리 유틸리티를 위한 수동<style>블록. - 폰트: Google Fonts — 헤드라인용 Instrument Serif(
ital@0;1), 본문용 Barlow(wght@300;400;500;600). - 마운트 포인트:
ReactDOM.createRoot를 통해#root에 마운트된 React 앱. - 주목할 만한 기술: 커스텀 rAF 크로스페이드 루핑 비디오, IntersectionObserver 트리거 블러인 텍스트, 마스킹된
::before의사 요소를 통한 액체 유리 그라데이션 테두리.
전역 설정
index.html
<html lang="en">, 문자셋 UTF-8, 반응형 뷰포트 메타.<title>:astra — Venture Past Our Sky.- 파비콘: 인라인 SVG 데이터 URI — 가운데에 기울임꼴 Georgia 세리프 소문자 흰색
a가 있는 검은색rounded직사각형(rx='16'). - 바디:
<body class="bg-black antialiased">는<div id="root"></div>뒤에 스크립트 태그만 포함합니다. <style>블록에html, body { background: #000; }설정.
CDN 스크립트 (고정, CDN 전용)
<head> 안에 다음 순서로 로드:
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/[email protected]/umd/react.development.js" integrity="sha384-hD6/rw4ppMLGNu3tX5cjIb+uRZ7UkRJ6BPkLpg4hAu/6onKUg4lLsHAs9EBPT82L" crossorigin="anonymous"></script>
<script src="https://unpkg.com/[email protected]/umd/react-dom.development.js" integrity="sha384-u6aeetuaXnQ38mYT8rp6sbXaQe3NL9t+IBXmnYxwkUI2Hw4bsp2Wvmx4yRQF1uAm" crossorigin="anonymous"></script>
<script src="https://unpkg.com/@babel/[email protected]/babel.min.js" integrity="sha384-m08KidiNqLdpJqLq95G/LEi8Qvjl/xUYll3QILypMoQ65QorJ9Lvtp2RXYGBFj1y" crossorigin="anonymous"></script>
<script src="https://unpkg.com/[email protected]/dist/framer-motion.js"></script>
<script>window.Motion = window.FramerMotion;</script>
폰트
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Barlow:wght@300;400;500;600&display=swap" rel="stylesheet" />
Tailwind 설정
컴포넌트 전에 인라인으로 테마 확장:
tailwind.config = {
theme: {
extend: {
fontFamily: {
heading: ['"Instrument Serif"', 'serif'],
body: ['Barlow', 'sans-serif'],
},
borderRadius: {
DEFAULT: '9999px',
},
},
},
};
font-heading→'Instrument Serif', serif(항상 기울임꼴 사용).font-body→'Barlow', sans-serif.- 기본 테두리 반경 재정의
DEFAULT: '9999px'로rounded만으로 알약 모양이 됩니다.
Framer Motion 개발 경고 억제
Framer Motion의 목록 키에 대한 개발 경고는 무해합니다. console.error 래퍼로 필터링:
(function () {
var origError = console.error;
console.error = function () {
var first = arguments[0];
if (typeof first === 'string' && (first.indexOf('unique "key" prop') !== -1 || first.indexOf('Each child in a list') !== -1)) return;
origError.apply(console, arguments);
};
})();
컴포넌트 스크립트 로드 순서
<body> 끝에 각 Babel 컴포넌트 파일을 순서대로 로드:
<script type="text/babel" src="js/icons.js"></script>
<script type="text/babel" src="js/FadingVideo.js"></script>
<script type="text/babel" src="js/BlurText.js"></script>
<script type="text/babel" src="js/Navbar.js"></script>
<script type="text/babel" src="js/Hero.js"></script>
<script type="text/babel" src="js/Capabilities.js"></script>
<script type="text/babel" src="js/App.js"></script>
액체 유리 유틸리티
<style> 블록에 두 가지 변형 — .liquid-glass (미묘, 네비게이션/칩/카드용) 및 .liquid-glass-strong (더 무거운 블러, 기본 CTA용). 각각은 마스킹된 ::before 의사 요소를 통해 그라데이션 테두리를 그립니다.
.liquid-glass {
background: rgba(255,255,255,0.01);
background-blend-mode: luminosity;
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
border: none;
box-shadow: inset 0 1px 1px rgba(255,255,255,0.1);
position: relative;
overflow: hidden;
}
.liquid-glass::before {
content: "";
position: absolute; inset: 0;
border-radius: inherit;
padding: 1.4px;
background: linear-gradient(180deg,
rgba(255,255,255,0.45) 0%,
rgba(255,255,255,0.15) 20%,
rgba(255,255,255,0) 40%,
rgba(255,255,255,0) 60%,
rgba(255,255,255,0.15) 80%,
rgba(255,255,255,0.45) 100%);
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
-webkit-mask-composite: xor;
mask-composite: exclude;
pointer-events: none;
}
.liquid-glass-strong {
background: rgba(255,255,255,0.01);
background-blend-mode: luminosity;
backdrop-filter: blur(50px);
-webkit-backdrop-filter: blur(50px);
border: none;
box-shadow: 4px 4px 4px rgba(0,0,0,0.05), inset 0 1px 1px rgba(255,255,255,0.15);
position: relative;
overflow: hidden;
}
.liquid-glass-strong::before {
content: "";
position: absolute; inset: 0;
border-radius: inherit;
padding: 1.4px;
background: linear-gradient(180deg,
rgba(255,255,255,0.5) 0%,
rgba(255,255,255,0.2) 20%,
rgba(255,255,255,0) 40%,
rgba(255,255,255,0) 60%,
rgba(255,255,255,0.2) 80%,
rgba(255,255,255,0.5) 100%);
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
-webkit-mask-composite: xor;
mask-composite: exclude;
pointer-events: none;
}
- 강한 변형은
backdrop-filter: blur(50px), box-shadow(4px 4px 4px rgba(0,0,0,0.05), inset 0 1px 1px rgba(255,255,255,0.15)), 그리고::before그라데이션 중단점(0.5 / 0.2 / 0 / 0 / 0.2 / 0.5)을 제외하고 미묘한 변형과 동일합니다.
아이콘 — js/icons.js
인라인 Lucide 스타일 SVG 아이콘(currentColor 스트로크)과 Material Icon 글리프. 각각은 window에 할당됩니다. 모든 것을 IIFE로 감쌉니다.
ArrowUpRight({ className })—24×24,viewBox="0 0 24 24",fill="none",stroke="currentColor",strokeWidth="2", 둥근 캡/조인,aria-hidden. 두 개의 경로:M7 17L17 7및M7 7h10v10.PlayIcon({ className })—24×24,viewBox="0 0 24 24",fill="currentColor",stroke="none",aria-hidden. 채워진 다각형points="6 4 20 12 6 20 6 4".ClockIcon— 흰색28×28윤곽선 SVG 아이콘(시계), 통계 카드 1에 사용.GlobeIcon— 흰색28×28윤곽선 SVG 아이콘(지구), 통계 카드 2에 사용.- Material Icons SVG — 흰색 Material Icons SVG(
fill currentColor,h-6 w-6 text-white), 역량 카드 내부에 사용.
FadingVideo — js/FadingVideo.js
커스텀 JS 크로스페이드 루핑 비디오. CSS 전환 없음: 모든 페이드는 rAF 기반이며, 루핑은 ended 이벤트를 통해 수동으로 구현됩니다(네이티브 loop 속성은 OFF).
- 상수:
FADE_MS = 500,FADE_OUT_LEAD = 0.55(페이드 아웃을 시작하기 전 남은 시간(초)). FadingVideo({ src, className, style })는style={{ opacity: 0, ...style }}(불투명도 0에서 시작)로<video ref muted autoPlay playsInline preload="auto" />를 렌더링합니다.React.useRef를 통한 참조:videoRef,rafRef(현재 rAF ID),fadingOutRef(부울).- 모든 배선은
React.useEffect(..., [src])에 있습니다.
fadeTo(target, duration = FADE_MS):
rafRef.current !== null이면 시작하기 전에cancelAnimationFrame(rafRef.current)을 호출합니다(새 페이드가 이전 페이드를 중단).parseFloat(video.style.opacity || '0')로 시작 값을 읽어 각 새 페이드가 이전 페이드가 중단된 곳에서 재개됩니다.- 시작 시간에
performance.now()를 사용합니다. 각requestAnimationFrame틱에서t = Math.min((now - start) / duration, 1)을 계산하고,video.style.opacity = String(from + (target - from) * t)를 설정하고,t >= 1이 될 때까지 프레임을 계속 요청한 다음rafRef.current = null로 설정합니다.
이벤트 핸들러:
loadeddata:opacity = '0'설정,video.play().catch(() => {}), 그런 다음fadeTo(1).timeupdate:remaining = video.duration - video.currentTime;!fadingOutRef.current && remaining <= FADE_OUT_LEAD && remaining > 0이면fadingOutRef.current = true로 설정하고fadeTo(0).ended:opacity = '0'설정, 그런 다음setTimeout(..., 100)후에currentTime = 0,play(),fadingOutRef.current = false를 지우고fadeTo(1).- 리스너가 연결될 때
video.readyState >= 2이면onLoadedData()를 즉시 호출합니다.
언마운트 시 정리: rAF(cancelAnimationFrame(rafRef.current))를 취소하고 세 리스너를 모두 제거합니다.
BlurText — js/BlurText.js
단어별 블러인 헤드라인, 10% 가시성에서 트리거. const { motion } = window.Motion을 가져옵니다. 상수 STEP_DURATION = 0.35.
BlurText({ text, className, delay = 100 }).{ threshold: 0.1 }이 있는 IntersectionObserver는 첫 번째 교차 시inView = true로 설정한 다음observer.unobserve(el); 정리 시 연결 해제.- 공백으로 텍스트 분할:
const words = text.split(' '). display: flex; flexWrap: wrap; justifyContent: center; rowGap: 0.1em스타일의<p ref className>렌더링.- 각 단어는
key={${word}-${i}}가 있는motion.span입니다:initial={{ filter: 'blur(10px)', opacity: 0, y: 50 }}.- 보일 때 애니메이션 키프레임:
그렇지 않으면{ filter: ['blur(10px)', 'blur(5px)', 'blur(0px)'], opacity: [0, 0.5, 1], y: [50, -5, 0], }{ filter: 'blur(10px)', opacity: 0, y: 50 }을 유지합니다. transition={{ duration: STEP_DURATION * 2, times: [0, 0.5, 1], ease: 'easeOut', delay: (i * delay) / 1000 }}.style={{ display: 'inline-block', marginRight: '0.28em' }}—-4px글자 간격이 nbsp를 먹기 때문에 공백 대신marginRight가 사용됩니다.
Navbar — js/Navbar.js
떠다니는 액체 유리 크롬. const { ArrowUpRight } = window를 가져옵니다. NAV_LINKS = ['Home', 'Voyages', 'Worlds', 'Innovation', 'Plan Launch'].
<nav>클래스:fixed top-4 left-0 right-0 z-50 px-8 lg:px-16 flex items-center justify-between.- 로고 (왼쪽):
liquid-glass rounded-full w-12 h-12 flex items-center justify-center shrink-0가 있는<a href="#" aria-label="astra home">. 내부:<span class="font-heading italic text-white text-2xl leading-none -translate-y-px">a</span>(기울임꼴 세리프 소문자 "a"). - 중앙 알약 (데스크톱 전용):
<div class="hidden md:flex items-center liquid-glass rounded-full px-1.5 py-1.5">보유:- 5개의 네비게이션 링크, 각각
<a href="#" key={link}>는px-3 py-2 text-sm font-medium text-white/90 font-body whitespace-nowrap hover:text-white. - 흰색 알약 버튼:
<a href="#" class="flex items-center gap-1.5 bg-white text-black rounded-full px-4 py-2 text-sm font-medium font-body whitespace-nowrap">텍스트Claim a Spot뒤에<ArrowUpRight className="h-4 w-4" />.
- 5개의 네비게이션 링크, 각각
- 오른쪽: 로고 균형을 맞추는 보이지 않는 48×48 스페이서 —
<div class="w-12 h-12 invisible shrink-0" aria-hidden="true" />.
섹션 1 — Hero (js/Hero.js)
전체 뷰포트 섹션: 크로스페이딩 비디오, 네비게이션 바, 블러인 헤드라인, CTA, 통계 카드, 파트너 행. const { motion } = window.Motion 및 const { FadingVideo, BlurText, Navbar, ArrowUpRight, PlayIcon, ClockIcon, GlobeIcon } = window를 가져옵니다.
HERO_VIDEO = 'assets/hf_20260418_080021_d598092b-c4c2-4e53-8e46-94cf9064cd50.mp4'.
입장 애니메이션 도우미: 모든 히어로 콘텐츠는 Motion을 사용하여 애니메이션됩니다:
const HIDDEN = { filter: 'blur(10px
… (잘림 - 번역을 위해 잘림)