专为宠物爱好者打造的温馨社区平台
专为宠物爱好者打造的温馨社区平台:Pawsome是一个专为宠物爱好者打造的温馨社区平台,采用React + Vite + TypeScript + Tailwind CSS技术栈开发。平台设计风格暗黑奢华,融入Apple风格的"液态玻璃"视觉特效,以纯黑背景配合温暖的奶油色调,营
完整提示词
Build a single-page landing page for **Pawsome — a cozy community for pet parents to share daily moments and shop curated goods for cats and dogs**. Use React + Vite + TypeScript + Tailwind CSS + shadcn/ui. The aesthetic is dark, premium, Apple-inspired with a custom "liquid glass" morphism effect. Pure black background throughout, with warm cream/honey/caramel accent highlights to convey the cozy, heartwarming pet community vibe.
The site has one dynamic feature: a real-time "Paw Check-in" live visitor counter powered by an edge function with KV storage (see the EDGE FUNCTION REQUIREMENT section).
═══════════════════════════════════════════════════
FONTS & DESIGN SYSTEM
═══════════════════════════════════════════════════
Google Fonts import:
- Instrument Serif (italic) — headings
- Barlow (300, 400, 500, 600) — body text
Tailwind config — extend fontFamily:
- heading: ["'Instrument Serif'", "serif"]
- body: ["'Barlow'", "sans-serif"]
CSS Variables (:root in index.css):
--background: 30 25% 8%;
--foreground: 0 0% 100%;
--primary: 0 0% 100%;
--primary-foreground: 30 25% 8%;
--accent: 32 70% 65%;
--border: 0 0% 100% / 0.2;
--radius: 9999px;
--font-heading: 'Instrument Serif', serif;
--font-body: 'Barlow', sans-serif;
All headings: font-heading italic text-white tracking-tight leading-[0.9]
All body text: font-body font-light text-white/60 text-sm
All buttons: font-body rounded-full
IMPORTANT — smooth scroll for anchor navigation:
In index.css, on the `html` element add:
scroll-behavior: smooth;
scroll-padding-top: 80px;
═══════════════════════════════════════════════════
LIQUID GLASS CSS (in @layer components)
═══════════════════════════════════════════════════
Two variants — .liquid-glass (subtle) and .liquid-glass-strong (more visible):
.liquid-glass:
- background: rgba(255, 255, 255, 0.01);
- background-blend-mode: luminosity;
- backdrop-filter: blur(4px);
- border: none;
- box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
- position: relative;
- overflow: hidden;
::before pseudo-element — a gradient border mask:
- 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: Same but backdrop-filter: blur(50px), stronger box-shadow: 4px 4px 4px rgba(0,0,0,0.05), inset 0 1px 1px rgba(255,255,255,0.15), and slightly higher gradient opacity (0.5 / 0.2).
═══════════════════════════════════════════════════
SHARED HOOK — Lazy autoplay video
═══════════════════════════════════════════════════
Create a shared hook at `src/lib/useLazyVideo.ts`:
- Returns a `videoRef` (React ref to HTMLVideoElement)
- Uses IntersectionObserver with `rootMargin: '300px'` to observe the video element
- When the video enters the viewport, call `videoRef.current.play()` (ignore AbortError)
- When the video leaves the viewport, call `videoRef.current.pause()`
- Cleanup observer on unmount
- All 4 background videos (Hero, HowItWorks, Stats, CtaFooter) must use this hook so only visible videos actually play. Prevents mobile Safari throttling of concurrent autoplay and saves bandwidth.
═══════════════════════════════════════════════════
BRAND LOGO — Pawsome Paw Mark (shared component)
═══════════════════════════════════════════════════
Create a reusable logo component at `src/components/Logo.tsx`.
Props:
- `size?: "nav" | "footer"` (default "nav")
- `asLink?: boolean` (default true) — wraps in `<a href="#home">`
Layout: horizontal flex, `items-center gap-3`, two parts:
1. **Paw mark icon** — hand-crafted inline SVG (NOT emoji, NOT image file), 40×40 px in "nav" / 48×48 px in "footer". A stylized pet paw with one large pad + four small toe beans, rendered in warm cream `#F4E5C9` with soft amber drop-shadow. Exact SVG markup (viewBox 0 0 64 64):可替换内容
- ["'Instrument Serif'", "serif"]
- ["'Barlow'", "sans-serif"]
- [0.9]
分类与标签
AI 图片