Asme — リキッドガラス ダークランディングページ
MITライセンス
pulkitxm/claude-directoryギャラリーからベンダリングされたランディングページ。
架空の知識・インサイトプラットフォーム Asme のピクセルスペック準拠のダークテーマシングルページマーケティングランディングサイト。特徴的な再利用可能な .liquid-glass サーフェス処理(輝度ブレンドされた半透明フィル、4px 背景ブラー、インセットトップハイライト、マスク付き ::before グラデーションボーダー)を、ナビゲーションピル、メールキャプチャ、ボタン、カード、アイコンチップ全体に一貫して適用。フルビューポートのヒーローは、ベンダリングしたローカルの .mp4 ビデオを、バニラの requestAnimationFrame 不透明度クロスフェード(canplay でフェードイン、残り0.55秒でフェードアウト、100msギャップで再スタート)でループ。4つのスクロールトリガーセクションが、Framer Motion の useInView でアニメーション表示:About、Featured Video、Innovation × Vision(ビデオ+反対側からスライドする2カラム)、Services(ホバーズームビデオ付きの2つのガラスカード)。Instrument Serif 表示タイプが、コンテンツ全体を通じてピュアブラックの背景に配置されます。
ワークフロー
example.htmlをクローンし、ユーザーのワークスペースに作業ファイルとして配置します。- プレースホルダーコンテンツを置き換え、ユーザーの実際のブランド名、見出し、ボディコピー、数値、画像に差し替えます。アセットを交換する際は、既存の画像寸法に合わせてください。
- デザインシステムを維持します。 以下のビルドスペックにあるパレット、タイプスケール、スペーシングリズム、モーションがアイデンティティです。フォントを代替したり、パレットの色を変更したり、装飾要素を取り除いたりしないでください。
- セクションを複製して拡張し、他のテンプレートからレイアウトをインポートしないでください。セクションが不足している場合は、このテンプレートの語彙でゼロからデザインしてください。
- モーションはアクセシブルに保ちます。 ビルドスペックで要求されているように、すべてのアニメーションは
prefers-reduced-motionの背後に留めておかなければなりません。
出力契約
<artifact> タグ内に出力します:
<artifact identifier="asme-liquid-glass-landing" type="text/html" title="Asme — リキッドガラス ダークランディングページ">
<!doctype html>
<html>...</html>
</artifact>
ビルドスペック
このデザインを生成した元のプロンプトを、そのまま記載します。
Asme — リキッドガラス ランディングページ
概要
「Asme」のための、ダークテーマのシングルページマーケティングランディングサイトを構築します。フルビューポートでループするヒーロービデオと、すべてのUI要素で再利用される特徴的な「リキッドガラス」サーフェス処理(フォスターブラー + グラデーションボーダー)を備えています。ヒーローの下には、4つのスクロールリビールセクション(about、featured video、philosophy、services)がビュー内にアニメーション表示され、すべてピュアブラックの背景に Instrument Serif のアクセントが設定されます。
技術スタック
- フレームワーク: React 18.3.1(TypeScript 5.6.3)、Vite 5.4.10(
@vitejs/plugin-react4.3.3)でバンドル。 - スタイリング: Tailwind CSS 3.4.14(PostCSS 8.4.49、Autoprefixer 10.4.20)。
- アニメーション: Framer Motion 11.11.17(
motion、useInView、MotionConfig)。 - アイコン: Lucide React 0.460.0(
ArrowRight、ArrowUpRight、Globe、Instagram、Twitter)。 - フォント: Instrument Serif(レギュラー + イタリック)、Google Fonts から読み込み。
- 注目すべきテクニック: 再利用可能な
.liquid-glassコンポーネントクラス(背景ブラー +::beforeによるマスク付きグラデーションボーダー)、ヒーロービデオ用のバニラJS /requestAnimationFrameクロスフェードループ(CSSトランジション不使用)、useInViewによるスクロールトリガーエントランスアニメーション、ローカルにベンダリングされ/assets/から提供される.mp4アセット。
グローバルセットアップ
ドキュメント(index.html)
<html lang="en" class="bg-black">および<body class="bg-black">。- ファビコンは、白い地球/円のインラインSVGデータURI(
stroke='white'、stroke-width='2')。 <title>:Asme — Know it all.- メタディスクリプション:
Asme — Know it all. Stay updated with the latest news and insights. - ビューポートメタ:
width=device-width, initial-scale=1.0。 <div id="root"></div>にマウントし、モジュールとして/src/main.tsxを読み込みます。
エントリーポイント(src/main.tsx)
import React from 'react';
import ReactDOM from 'react-dom/client';
import { MotionConfig } from 'framer-motion';
import Index from './pages/Index';
import './index.css';
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<MotionConfig reducedMotion="user">
<Index />
</MotionConfig>
</React.StrictMode>,
);
Tailwind設定(tailwind.config.js)
content:['./index.html', './src/**/*.{ts,tsx}']。theme.fontFamilyをカスタムのinstrumentファミリーで拡張し、font-instrumentユーティリティが'Instrument Serif', serifにマッピングされるようにします:
/** @type {import('tailwindcss').Config} */
export default {
content: ['./index.html', './src/**/*.{ts,tsx}'],
theme: {
extend: {
fontFamily: {
instrument: ["'Instrument Serif'", 'serif'],
},
},
},
plugins: [],
};
グローバルスタイル(src/index.css)
最初にフォントをインポートし、次にTailwindレイヤー、続いてベースレイヤーとコンポーネントレイヤーをインポートします。
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap');
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
html {
@apply bg-black;
}
body {
@apply bg-black text-white antialiased;
}
::selection {
background: rgba(255, 255, 255, 0.25);
color: #000;
}
:focus-visible {
outline: 1px solid rgba(255, 255, 255, 0.5);
outline-offset: 2px;
}
}
リキッドグラスクラス(src/index.css、@layer components 内)
すべてのガラス要素で使用される再利用可能な .liquid-glass クラスを作成します。これは、ほぼ透明で輝度ブレンドされた背景に4pxの背景ブラーとインセットトップハイライトを組み合わせます。マスクされた ::before は、上部と下部で最も明るい細い(1.4px)垂直グラデーションボーダーを描画します。
@layer components {
.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;
}
}
レイアウトとページ構造(src/pages/Index.tsx)
ページルートは <main className="bg-black"> で、順に、ヒーロー <section>、その後に <AboutSection />、<FeaturedVideoSection />、<PhilosophySection />、<ServicesSection /> を含みます。
モジュールスコープで定義される定数:
HERO_VIDEO_URL = '/assets/hf_20260405_074625_a81f018a-956b-43fb-9aee-4d1508e30e6a.mp4'FADE_MS = 500FADE_OUT_LEAD_S = 0.55RESTART_DELAY_MS = 100NAV_LINKS = ['Features', 'Pricing', 'About']
アセットに関する注意: 5つのビデオはすべてローカルにベンダリングされ、
/assets/から提供されます。ファイル名はCloudFrontアップロードに由来します(例:hf_20260405_074625_a81f018a-956b-43fb-9aee-4d1508e30e6a.mp4)が、アプリは外部ホストではなく、相対パス/assets/...を参照します。
セクション 1 — ヒーロー(フルビューポート)
コンテナ:<section className="min-h-screen overflow-hidden relative flex flex-col">。
背景ビデオ
<video>(ref={videoRef})、クラスabsolute inset-0 w-full h-full object-cover object-bottom、src={HERO_VIDEO_URL}。- 属性:
muted、autoPlay、playsInline、preload="auto"、aria-hidden="true"、tabIndex={-1}。 - インラインスタイル
style={{ opacity: 0 }}— 完全に透明から開始。
ビデオフェードロジック(Refを介したバニラJS、CSSトランジション不使用)
useEffect 内で useRef ハンドルを使用して実装:videoRef、rafRef(アクティブな requestAnimationFrame ID)、restartTimerRef(再スタート setTimeout ID)、hasStartedRef、isFadingOutRef。
animateOpacity(from, to, onDone?): 進行中のフレームをキャンセルし、performance.now()を開始時間としてキャプチャし、各requestAnimationFrameステップでt = Math.min((now - start) / FADE_MS, 1)を計算し、video.style.opacity = String(from + (to - from) * t)を設定します。t >= 1になるとrafRefをクリアし、onDoneを呼び出します。canplay時: まだ開始されていない場合、hasStartedRefをマークし、video.play()を呼び出し(autoplay-block 拒否を吞み込みます)、次にanimateOpacity(0, 1)を呼び出します。timeupdate時: まだフェードアウト中でなく、video.durationが有限の場合、remaining = video.duration - video.currentTimeを計算します。remaining <= FADE_OUT_LEAD_S(0.55秒)の場合、isFadingOutRefを設定し、現在の不透明度(Number.parseFloat(video.style.opacity || '1'))を読み取り、animateOpacity(current, 0)を呼び出します。ended時:opacity = '0'を設定し、RESTART_DELAY_MS(100ms)後にcurrentTime = 0をリセットし、play()を再度呼び出し、isFadingOutRefをクリアし、animateOpacity(0, 1)を呼び出します。- エフェクトのクリーンアップは、3つのリスナーをすべて削除し、保留中のフレームをキャンセルし、再スタートタイマーをクリアします。
これにより、再生間のスムーズなブラックへのクロスフェードを伴うシームレスなループが生成されます。
ナビゲーションバー
<header className="relative z-20 px-6 py-6"> には、<nav className="liquid-glass rounded-full max-w-5xl mx-auto px-6 py-3 flex items-center justify-between"> が含まれます。
- 左グループ(
flex items-center):- ブランドリンク(
flex items-center gap-2.5、aria-label="Asme home"):Globeアイコン(size={24}、text-white)+<span className="text-white font-semibold text-lg">Asme</span>。 - ナビゲーションリンクコンテナ
hidden md:flex items-center gap-8 ml-8は、NAV_LINKS(「Features」、「Pricing」、「About」)の各アイテムを、クラスtext-white/80 hover:text-white text-sm font-medium transition-colorsを持つ<a>としてレンダリングします。
- ブランドリンク(
- 右グループ(
flex items-center gap-4):- 「Sign Up」テキストボタン:
text-white text-sm font-medium。 - 「Login」ボタン:
liquid-glass rounded-full px-6 py-2 text-white text-sm font-medium hover:bg-white/5 transition-colors。
- 「Sign Up」テキストボタン:
ヒーローコンテンツ
<div className="relative z-10 flex-1 flex flex-col items-center justify-center px-6 py-12 text-center -translate-y-[20%]">:
- 見出し
<h1>、クラスtext-7xl md:text-8xl lg:text-9xl text-white tracking-tight whitespace-nowrap mb-10、インラインstyle={{ fontFamily: "'Instrument Serif', serif" }}。内容:Know it <em className="italic">all</em>.(「Know it all.」と表示されます)。 - メールフォーム
<form className="liquid-glass rounded-full max-w-xl w-full pl-6 pr-2 py-2 flex items-center gap-3">、onSubmitはevent.preventDefault()を呼び出します:<input type="email" autoComplete="email" placeholder="Enter your email" aria-label="Email address" className="flex-1 min-w-0 bg-transparent text-white placeholder:text-white/40 text-sm outline-none" />。- 送信ボタン(
type="submit"、aria-label="Subscribe"):bg-white rounded-full p-3 text-black shrink-0 hover:bg-white/90 transition-colors、ArrowRightアイコン(size={20})を含みます。
- サブタイトル
<p className="text-white text-sm leading-relaxed px-4 mt-6 max-w-md">:「Stay updated with the latest news and insights. Subscribe to our newsletter today and never miss out on exciting updates.」 - マニフェストボタン
<button type="button" className="liquid-glass rounded-full px-8 py-3 text-white text-sm font-medium hover:bg-white/5 transition-colors mt-8">、テキストは「Manifesto」。
ソーシャルアイコンフッター
<footer className="relative z-10 flex justify-center gap-4 pb-12"> は、[{ label: 'Instagram', Icon: Instagram }, { label: 'Twitter', Icon: Twitter }, { label: 'Website', Icon: Globe }] をマッピングします。各アイテムは、クラス liquid-glass rounded-full p-4 text-white/80 hover:text-white hover:bg-white/5 transition-all を持つ <a>(href="#"、aria-label={label})をレンダリングし、size={20} のアイコンを含みます。
セクション 2 — About(src/components/AboutSection.tsx)
useRef+useInView(ref, { once: true, margin: '-100px' })を使用。- セクション:
<section ref={ref} className="relative bg-black pt-32 md:pt-44 pb-10 md:pb-14 px-6 overflow-hidden">。 - ラジアルグラデーションオーバーレイ(
absolute inset-0、aria-hidden):bg-[radial-gradient(ellipse_at_top,_rgba(255,255,255,0.03)_0%,_transparent_70%)]。 - 内部ラッパー:
relative max-w-5xl mx-auto text-center。 - ラベル
motion.p、クラスtext-white/40 text-sm tracking-widest uppercase mb-8、テキスト「About Us」。initial={{ opacity: 0, y: 20 }}→{ opacity: 1, y: 0 }へとビュー内でアニメーション、transition={{ duration: 0.6 }}。 - 見出し
motion.h2、クラスtext-4xl md:text-6xl lg:text-7xl text-white leading-[1.1] tracking-tight。initial={{ opacity: 0, y: 40 }}→{ opacity: 1, y: 0 }へとアニメーション、transition={{ duration: 0.8, delay: 0.1 }}。構造:Pioneeringその後<span className="font-instrument italic text-white/60">ideas</span>その後for<br className="hidden md:block" />minds thatその後<span className="font-instrument italic text-white/60">create, build, and inspire.</span>
セクション 3 — 注目のビデオ(src/components/FeaturedVideoSection.tsx)
FEATURED_VIDEO_URL = '/assets/hf_20260402_054547_9875cfc5-155a-4229-8ec8-b7ba7125cbf8.mp4'。- 同じ
useInViewパターン({ once: true, margin: '-100px' })。 - セクション:
<section ref={ref} className="bg-black pt-6 md:pt-10 pb-20 md:pb-32 px-6 overflow-hidden">、内部max-w-6xl mx-auto。 - ビデオコンテナ
motion.div className="relative rounded-3xl overflow-hidden aspect-video"、initial={{ opacity: 0, y: 60 }}→{ opacity: 1, y: 0 }へとアニメーション、transition={{ duration: 0.9 }}。<video className="w-full h-full object-cover" src={FEATURED_VIDEO_URL}>、muted、autoPlay、loop、playsInline、preload="auto"、aria-hidden、tabIndex={-1}付き。- グラデーションオーバーレイ(
absolute inset-0、aria-hidden):bg-gradient-to-t from-black/60 via-transparent to-transparent。 - 下部オーバーレイ `<div className="absolute bottom-0 left-0 right-0 p-6 md:
...
[翻訳のため省略]