Orbis.Nft — 暗黑太空 NFT 登陸頁面
登陸頁面取自 MIT 授權的
pulkitxm/claude-directory圖庫。
一個單頁式 NFT 登陸頁面,包含四個滿版區塊(英雄區、關於區、收藏區、行動呼籲區),採用暗黑色太空主題。頁面使用循環播放的靜音背景影片、CSS 液態玻璃 UI 效果、固定的顆粒紋理疊加層,以及嚴謹的色彩系統(深海軍藍 #010828、米白 #EFF4FF、螢光綠 #6FFF00;Anton 標題、Condiment 手寫強調字體、系統等寬內文)。展示一個三卡式 NFT 收藏網格,包含稀有度評分與影片預覽。
工作流程
- 將
example.html複製到使用者的工作區,作為工作檔案。 - 替換佔位內容為使用者真實的品牌名稱、標題、內文、數字與圖像。更換素材時,請比對現有圖像的尺寸。
- 保留設計系統。 下方建置規格中的調色盤、字級、間距節奏與動態效果即為頁面的識別核心——請勿替換字型、變更調色盤或移除裝飾元素。
- 透過複製區塊來擴展,絕對不要從其他版型導入版面配置。若缺少某個區塊,請以此版型自身的設計語彙從頭設計。
- 確保動畫的無障礙性。 每個動畫都必須置於
prefers-reduced-motion之後,如建置規格所要求。
輸出合約
在 <artifact> 標籤內輸出:
<artifact identifier="orbis-nft-landing" type="text/html" title="Orbis.Nft — 暗黑太空 NFT 登陸頁面">
<!doctype html>
<html>...</html>
</artifact>
建置規格
以下為產生此設計的上游提示,逐字呈現。
Orbis.Nft — 暗黑太空 NFT 登陸頁面
概述
建立一個名為 Orbis.Nft 的單頁式 NFT 登陸頁面,包含四個採用暗黑太空主題的滿版區塊。頁面依賴循環播放的靜音背景影片、「液態玻璃」UI 效果、固定的顆粒/紋理疊加層,以及嚴格的色彩/字型系統。請完全按照以下描述重建。
技術棧
- 框架: React 18(
react^18.3.1、react-dom^18.3.1)+ TypeScript(^5.6.3) - 建置工具: Vite(
^5.4.10)搭配@vitejs/plugin-react(^4.3.3);入口點src/main.tsx渲染至<div id="root"> - 樣式: Tailwind CSS(
^3.4.14)搭配postcss(^8.4.49)與autoprefixer(^10.4.20) - 圖示: Lucide(
lucide-react^0.460.0)—Mail、Twitter、Github - 字型: 透過 Google Fonts 載入 Anton 與 Condiment;內文使用系統等寬字型
- 值得注意的技術: 循環播放的靜音自動播放 HTML 影片背景、CSS 液態玻璃效果(
backdrop-filter模糊 + 漸層邊框遮罩)、固定全螢幕紋理疊加層(使用mix-blend-mode)、padding-bottom方形長寬比技巧、使用sm:/md:/lg:響應式斷點 - 不需要 Vite + React + Tailwind 提供的套件以外的額外套件。
原始的背景/卡片影片來自 CloudFront 來源 (
https://d8j0ntlcm91z4.cloudfront.net/user_38xzzbokvigwjottwixh07lwa1p/...)。在專案中,它們被本地放置在public/assets/下,並透過/assets/...路徑引用(請參閱下方每個區塊)。本地的小寫檔案名稱是唯一依據。
全域設定
字型(Google Fonts)
- Anton — 用於所有標題與導覽文字(在 Tailwind 中別名為
font-grotesk)。 - Condiment — 一種手寫草書字型,用於強調/疊加文字(在 Tailwind 中別名為
font-condiment)。 - 系統等寬字型(
font-mono)— 用於內文/描述段落。
在 index.html 中載入(包含 preconnect 提示):
<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=Anton&family=Condiment&display=swap"
rel="stylesheet"
/>
文件 <title> 為 Orbis.Nft — Beyond Earth,Meta 描述為 Orbis.Nft — a collection of space objects beyond earth and its familiar boundaries.
色彩系統(Tailwind 設定)
在 Tailwind 主題中擴充這些命名色彩:
background:#010828— 深暗海軍藍cream:#EFF4FF— 米白色,用於所有文字neon:#6FFF00— 亮綠色,用於強調手寫文字與底線條
/** @type {import('tailwindcss').Config} */
export default {
content: ['./index.html', './src/**/*.{ts,tsx}'],
theme: {
extend: {
colors: {
background: '#010828',
cream: '#EFF4FF',
neon: '#6FFF00',
},
fontFamily: {
grotesk: ['Anton', 'sans-serif'],
condiment: ['Condiment', 'cursive'],
},
},
},
plugins: [],
}
基礎樣式(src/index.css)
Tailwind 層級加上基礎 body 樣式、液態玻璃元件類別,以及紋理疊加層:
@tailwind base;
@tailwind components;
@tailwind utilities;
html {
scroll-behavior: smooth;
}
body {
background-color: #010828;
color: #eff4ff;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@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;
}
.texture-overlay {
position: fixed;
inset: 0;
z-index: 50;
pointer-events: none;
background-image: url('/texture.png');
background-size: cover;
mix-blend-mode: lighten;
opacity: 0.6;
}
}
液態玻璃效果
透過 .liquid-glass 類別套用。用於導覽列、社交圖示按鈕、NFT 卡片與卡片疊加層。此效果結合了近乎透明的白色背景、background-blend-mode: luminosity、blur(4px) backdrop filter、inset 高光 box-shadow,以及一個使用漸層遮罩的 ::before 偽元素,用來繪製微妙的 1.4px 高光邊框。
紋理疊加層
一個全螢幕固定的紋理疊加層位於所有內容之上(z-50、pointer-events: none)。它使用 /texture.png 圖片,搭配 mix-blend-mode: lighten 且 opacity: 0.6,透過 background-size: cover 覆蓋整個視口。在 App 中最後渲染為 <div className="texture-overlay" aria-hidden="true" />。
App 結構
App 渲染一個單一的 <main className="bg-background text-cream">,依序包裹四個區塊,最後是紋理疊加層:
import About from './components/About'
import Collection from './components/Collection'
import Cta from './components/Cta'
import Hero from './components/Hero'
export default function App() {
return (
<main className="bg-background text-cream">
<Hero />
<About />
<Collection />
<Cta />
{/* 全螢幕顆粒疊加層,位於所有內容之上 */}
<div className="texture-overlay" aria-hidden="true" />
</main>
)
}
共享社交資料(src/socials.ts)
一個共享的 SOCIALS 陣列驅動所有社交圖示列表(英雄區桌面版、英雄區行動版與行動呼籲區):
import { Github, Mail, Twitter, type LucideIcon } from 'lucide-react'
export interface Social {
label: string
href: string
Icon: LucideIcon
}
export const SOCIALS: Social[] = [
{ label: 'Email', href: 'mailto:[email protected]', Icon: Mail },
{ label: 'Twitter', href: 'https://twitter.com', Icon: Twitter },
{ label: 'Github', href: 'https://github.com', Icon: Github },
]
全域版面慣例
- 內容最大寬度: 所有區塊均為
1831px(max-w-[1831px],透過mx-auto置中)。 - 水平內邊距: 內部容器使用
px-5 sm:px-8 lg:px-12。 - 響應式: 行動優先,全程使用
sm:、md:、lg:斷點。 - 所有影片: 包含
autoPlay loop muted playsInline屬性。 - 大小寫: 所有文字均為大寫,但 Condiment 手寫強調文字除外,後者使用正常大小寫(
normal-case)。在 JSX 中,文案以自然大小寫書寫,並透過uppercase工具程式渲染為大寫。
區塊 1 — 英雄區(src/components/Hero.tsx)
滿版視口:<section className="relative h-screen overflow-hidden rounded-b-[32px]"> — 注意 rounded-b-[32px] 底部圓角會裁剪影片。
- 背景: 全滿版循環播放的靜音自動播放影片,覆蓋整個區塊,使用
object-cover(className="absolute inset-0 h-full w-full object-cover")。- 影片:
/assets/hf_20260331_045634_e1c98c76-1265-4f5c-882a-4276f2080894.mp4
- 影片:
- 容器:
relative z-10 mx-auto flex h-full max-w-[1831px] flex-col px-5 sm:px-8 lg:px-12。
頁首
<header className="relative flex items-center justify-between pt-6 lg:pt-8">
- 左側標誌:
Orbis.Nft連結,使用 Anton 字型,text-[16px],大寫,tracking-wide text-cream(font-grotesk text-[16px] uppercase tracking-wide text-cream)。 - 中央導覽: 一個液態玻璃導覽列,
rounded-[28px] px-[52px] py-[24px],絕對置中(absolute left-1/2 -translate-x-1/2),並在行動裝置上隱藏(hidden ... lg:block)。它包含一個flex items-center gap-10的 5 個連結列表:Homepage、Gallery、Buy NFT、FAQ、Contact。每個連結都是 Anton 字型text-[13px]大寫tracking-wide text-cream,並帶有transition-colors hover:text-neon。 - 社交圖示(桌面版): 一個
hidden flex-col gap-3 lg:flex的直列位於右上角,渲染 3 個SocialButton。
英雄內容
一個垂直置中的區塊:flex flex-1 flex-col items-start justify-center,標題群組偏移 lg:ml-32。
-
標題(
<h1>)使用 Anton 字型,大寫,text-cream,響應式text-[40px]行動 /sm:text-[60px]/md:text-[75px]/lg:text-[90px];行高leading-[1.05]行動,sm:leading-[1]平板以上;最大寬度max-w-[640px]上升到lg:max-w-[780px]。文案(行間有<br />):Beyond earth and ( its ) familiar boundaries -
疊加手寫強調文字: 文字
Nft collection使用 Condiment 字型(font-condiment)、normal-case、螢光綠(text-neon)、opacity-90 mix-blend-exclusion、略微旋轉(-rotate-1),相對於標題絕對定位於右側(absolute -right-2 bottom-[18%]→sm:-right-6→lg:-right-16)。響應式尺寸:text-[24px]/sm:text-[32px]/md:text-[40px]/lg:text-[48px]。 -
社交圖示(行動版): 相同的 3 個按鈕在標題下方水平置中(
mt-10 flex w-full justify-center gap-4 lg:hidden)。
SocialButton(英雄區)
每個都是 56×56px 的正方形(h-14 w-14)液態玻璃錨點,rounded-[1rem]、圖示置中、text-cream,帶有 transition hover:bg-white/10。Lucide 圖示為 h-5 w-5(20×20px),strokeWidth={1.75}:
function SocialButton({ label, href, Icon }: (typeof SOCIALS)[number]) {
return (
<a
href={href}
aria-label={label}
className="liquid-glass flex h-14 w-14 items-center justify-center rounded-[1rem] text-cream transition hover:bg-white/10"
>
<Icon className="h-5 w-5" strokeWidth={1.75} />
</a>
)
}
區塊 2 — 關於區 / 介紹區(src/components/About.tsx)
滿版視口:<section className="relative min-h-screen overflow-hidden">
- 背景: 全滿版循環播放的靜音自動播放影片,使用
object-cover(absolute inset-0 h-full w-full object-cover)。- 影片:
/assets/hf_20260331_151551_992053d1-3d3e-4b8c-abac-45f22158f411.mp4
- 影片:
- 容器: 相同的
max-w-[1831px]、置中、flex min-h-screen ... flex-col justify-between,帶有寬裕的垂直內邊距py-16 md:py-20 lg:py-24以及px-5 sm:px-8 lg:px-12。
頂部行
flex flex-col gap-10 lg:flex-row lg:items-start lg:justify-between
-
左側標題(
<h2>)使用 Anton 字型、大寫、text-cream、leading-[1.05]、響應式text-[32px]/sm:text-[40px]/md:text-[48px]/lg:text-[60px]。文案(包含<br />):Hello! I'm orbis(撇號使用
’實體:I’m orbis。) -
疊加手寫強調文字:
Orbis使用 Condiment 字型、normal-case、螢光綠(text-neon)、mix-blend-exclusion、略微旋轉(-rotate-2),相對於標題絕對定位於右下角(absolute -bottom-6 -right-10→sm:-right-16→lg:-bottom-8 lg:-right-24)。響應式尺寸:text-[36px]/sm:text-[48px]/md:text-[56px]/lg:text-[68px]。 -
右側段落: 等寬字型、大寫、米白色、
max-w-[266px]、響應式text-[14px]→lg:text-[16px]、leading-relaxed。文字:A digital object fixed beyond time and place. An exploration of distance, form, and silence in space
底部行 — 裝飾性幽靈文案
mt-16 flex justify-between 包含兩個 GhostParagraphs 欄位。右欄為 hidden lg:block。
每個 GhostParagraphs 是一個 flex max-w-[266px] flex-col gap-8 的欄位,包含 2 個相同的段落,使用相同的關於文案。它們的樣式為 font-mono text-[14px] uppercase leading-relaxed text-[#010828] opacity-10 lg:text-[16px] lg:text-cream——即幾乎不可見的裝飾性文案(opacity-10);在行動裝置上文字顏色為 text-[#010828](深色,在影片背景下實際不可見),在桌面版上切換為 lg:text-cream。
區塊 3 — NFT 收藏網格(src/components/Collection.tsx)
<section className="bg-[#010828] py-16 md:py-20 lg:py-24"> — 純色 #010828 背景,沒有影片。
-
容器: 相同的
max-w-[1831px]、置中、px-5 sm:px-8 lg:px-12。 -
標題(
<h2>)使用 Anton 字型、大寫、text-cream、text-[40px] sm:text-[48px] md:text-[56px] lg:text-[72px]、leading-[1.1]、mb-12 lg:mb-16、text-left。文案:Our Collection -
網格:
grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3。
NFT 卡片(CollectionCard)
每個卡片都是一個 <article>,包含 liquid-glass rounded-[32px] overflow-hidden group。結構:
- 影片容器:
relative w-full,使用aspect-square(Tailwind 的pb-[100%]技巧),包含一個absolute inset-0 h-full w-full object-cover的影片元素。 - 疊加層:
absolute inset-0 bg-gradient-to-t from-background/80 via-transparent to-transparent。 - 稀有度徽章:
absolute top-4 right-4 liquid-glass px-4 py-2 rounded-full text-[12px] font-mono uppercase tracking-wide。顯示Rarity: #{score}分數(/100),顏色為text-neon。分數作為 prop 傳入。 - 底部資訊:
absolute bottom-4 left-4 right-4 flex items-center justify-between。- 左側:名稱(Anton 字型,
text-[18px]大寫text-cream)與價格(等寬字型,text-[14px]text-cream/70)。 - 右側:一個液態玻璃「Buy」按鈕(
liquid-glass px-6 py-2 rounded-full text-[12px] font-grotesk uppercase tracking-wide text-cream transition hover:bg-white/10)。
- 左側:名稱(Anton 字型,
function CollectionCard({ name, price, rarity, video }: CollectionCardProps) {
return (
<article className="liquid-glass group rounded-[32px] overflow-hidden">
<div className="relative w-full pb-[100%]">
<video
src={video}
autoPlay
loop
muted
playsInline
className="absolute inset-0 h-full w-full object-cover"
/>
<div className="absolute inset-0 bg-gradient-to-t from-background/80 via-transparent to-transparent" />
<div className="absolute top-4 right-4 liquid-glass px-4 py-2 rounded-full text-[12px] font-mono uppercase tracking-wide text-neon">
Rarity: #{rarity}/100
</div>
<div className="absolute bottom-4 left-4 right-4 flex items-center justify-between">
<div>
<h3 className="font-grotesk text-[18px] uppercase text-cream">
{name}
</h3>
<p className="font-mono text-[14px] text-cream/70">{price}</p>
</div>
<button className="liquid-glass px-6 py-2 rounded-full text-[12px] font-grotesk uppercase tracking-wide text-cream transition hover:bg-white/10">
Buy
</button>
</div>
</div>
</article>
)
}
範例資料
在 Collection.tsx 中,傳入 3 張卡片:
const CARDS = [
{
name: 'Stellar Drift',
price: '2.5 ETH',
rarity: 97,
video: '/assets/hf_20260331_145929_b9c9bcc9-22f3-4435-8e59-7d34171e7e7f.mp4',
},
{
name: 'Chromatic Rift',
price: '1.8 ETH',
rarity: 84,
video: '/assets/hf_20260331_150401_82ef3e7a-40e2-40f7-8a1d-9a89f5a3e850.mp4',
},
{
name: 'Event Horizon',
price: '3.2 ETH',
rarity: 92,
video: '/assets/hf_20260331_150800_a19d7210-a49a-4fc6-9f40-7518de2d6497.mp4',
},
]
區塊 4 — 行動呼籲區(src/components/Cta.tsx)
<section className="relative min-h-screen overflow-hidden">
- 背景: 全滿版循環播放的靜音自動播放影片,使用
object-cover(absolute inset-0 h-full w-full object-cover)。- 影片:
/assets/hf_20260331_151551_992053d1-3d3e-4b8c-abac-45f22158f411.mp4(與關於區相同的影片)
- 影片:
- 容器:
relative z-10 mx-auto flex min-h-screen max-w-[1831px] flex-col items-center justify-center px-5 sm:px-8 lg:px-12。
內容區塊
一個置中的內容區塊,text-center,包含:
-
標題(
<h2>)使用 Anton 字型、大寫、text-cream、響應式text-[40px] sm:text-[56px] md:text-[68px] lg:text-[84px]、leading-[1.05]、max-w-[800px]。文案(行間有<br />):Ready to explore beyond -
疊加手寫強調文字:
Orbis使用 Condiment 字型、normal-case、螢光綠(text-neon)、mix-blend-exclusion、略微旋轉(-rotate-3)、位於標題下方:mt-[-0.25em]。響應式尺寸:text-[36px]/sm:text-[48px]/md:text-[56px]/lg:text-[68px]。 -
按鈕: 一個液態玻璃 CTA 按鈕:
liquid-glass mt-12 px-10 py-5 rounded-[40px] text-[16px] font-grotesk uppercase tracking-wide text-cream transition hover:bg-white/10。文字:Join the waitlist。 -
社交圖示(桌面版): 相同的 3 個
SocialButton,位於按鈕下方:mt-16 flex gap-4。使用英雄區相同的SocialButton元件與SOCIALS陣列。
CTA 的 SocialButton
與英雄區的 SocialButton 完全相同,但未在此處重新定義。使用共享的 SocialButton(或請確認其可及性以導入)。
附註
- 除了上述資料之外,請勿從網際網路載入任何外部資源。所有影片與紋理圖片均為本地
/assets/路徑。 - 紋理疊加層
<div className="texture-overlay" aria-hidden="true" />必須為fixed、inset-0、z-50、pointer-events: none。 - 所有動畫必須遵守
prefers-reduced-motion。對於正交prefers-reduced-motion: no-preference,允許使用 CSS 過渡效果。 - 所有圖片(例如紋理)必須具有適當的
alt文字或aria-hidden。