Add onboarding/soft-paywall/free-tier design spec + Stitch design reference
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
227
design/stitch-onboarding/personalization_question/code.html
Normal file
227
design/stitch-onboarding/personalization_question/code.html
Normal file
@@ -0,0 +1,227 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html class="h-full" lang="en"><head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" name="viewport"/>
|
||||
<title>GreenLens - Onboarding Plant Count</title>
|
||||
<script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script>
|
||||
<link href="https://fonts.googleapis.com" rel="preconnect"/>
|
||||
<link crossorigin="" href="https://fonts.gstatic.com" rel="preconnect"/>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet"/>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap" rel="stylesheet"/>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap" rel="stylesheet"/>
|
||||
<script id="tailwind-config">
|
||||
tailwind.config = {
|
||||
darkMode: "class",
|
||||
theme: {
|
||||
extend: {
|
||||
"colors": {
|
||||
"tertiary": "#375d00",
|
||||
"on-surface": "#191d16",
|
||||
"on-secondary-fixed": "#012104",
|
||||
"on-secondary-fixed-variant": "#2d4e2b",
|
||||
"surface-container-lowest": "#ffffff",
|
||||
"surface-container-low": "#f2f5e9",
|
||||
"error-container": "#ffdad6",
|
||||
"secondary": "#446741",
|
||||
"outline": "#72796a",
|
||||
"on-secondary": "#ffffff",
|
||||
"surface-container": "#ecefe4",
|
||||
"on-error": "#ffffff",
|
||||
"on-surface-variant": "#42493c",
|
||||
"background": "#f8fbef",
|
||||
"error": "#ba1a1a",
|
||||
"outline-variant": "#c2c9b7",
|
||||
"on-secondary-container": "#486b45",
|
||||
"secondary-fixed": "#c5edbd",
|
||||
"on-tertiary": "#ffffff",
|
||||
"primary": "#2b5f0b",
|
||||
"surface-dim": "#d8dbd0",
|
||||
"primary-container": "#437824",
|
||||
"tertiary-fixed-dim": "#a5d56e",
|
||||
"inverse-on-surface": "#eff2e7",
|
||||
"surface-container-high": "#e7e9de",
|
||||
"surface-bright": "#f8fbef",
|
||||
"inverse-surface": "#2e322a",
|
||||
"on-background": "#191d16",
|
||||
"on-primary-fixed": "#092100",
|
||||
"secondary-container": "#c2eaba",
|
||||
"on-tertiary-container": "#cbfd91",
|
||||
"primary-fixed": "#b6f390",
|
||||
"tertiary-container": "#4d771b",
|
||||
"primary-fixed-dim": "#9bd776",
|
||||
"tertiary-fixed": "#c0f287",
|
||||
"surface-tint": "#366a17",
|
||||
"secondary-fixed-dim": "#aad1a2",
|
||||
"surface-variant": "#e1e4d9",
|
||||
"on-error-container": "#93000a",
|
||||
"on-tertiary-fixed-variant": "#2e4f00",
|
||||
"on-primary": "#ffffff",
|
||||
"on-primary-container": "#c1ff99",
|
||||
"surface-container-highest": "#e1e4d9",
|
||||
"on-tertiary-fixed": "#0f2000",
|
||||
"on-primary-fixed-variant": "#205100",
|
||||
"inverse-primary": "#9bd776",
|
||||
"surface": "#f8fbef"
|
||||
},
|
||||
"borderRadius": {
|
||||
"DEFAULT": "0.25rem",
|
||||
"lg": "0.5rem",
|
||||
"xl": "0.75rem",
|
||||
"full": "9999px"
|
||||
},
|
||||
"spacing": {
|
||||
"xs": "8px",
|
||||
"xl": "32px",
|
||||
"base": "4px",
|
||||
"sm": "12px",
|
||||
"gutter": "16px",
|
||||
"md": "16px",
|
||||
"lg": "24px",
|
||||
"container-margin": "20px"
|
||||
},
|
||||
"fontFamily": {
|
||||
"label-md": ["Plus Jakarta Sans"],
|
||||
"body-lg": ["Plus Jakarta Sans"],
|
||||
"label-lg": ["Plus Jakarta Sans"],
|
||||
"body-md": ["Plus Jakarta Sans"],
|
||||
"headline-lg": ["Plus Jakarta Sans"],
|
||||
"display": ["Plus Jakarta Sans"],
|
||||
"headline-md": ["Plus Jakarta Sans"]
|
||||
},
|
||||
"fontSize": {
|
||||
"label-md": ["12px", {"lineHeight": "16px", "fontWeight": "600"}],
|
||||
"body-lg": ["17px", {"lineHeight": "26px", "fontWeight": "500"}],
|
||||
"label-lg": ["13px", {"lineHeight": "18px", "letterSpacing": "0.05em", "fontWeight": "700"}],
|
||||
"body-md": ["15px", {"lineHeight": "22px", "fontWeight": "400"}],
|
||||
"headline-lg": ["28px", {"lineHeight": "36px", "letterSpacing": "-0.01em", "fontWeight": "800"}],
|
||||
"display": ["34px", {"lineHeight": "42px", "letterSpacing": "-0.02em", "fontWeight": "800"}],
|
||||
"headline-md": ["22px", {"lineHeight": "28px", "fontWeight": "700"}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
body {
|
||||
background-color: #FBFAF3; /* Enforced from style guidance level 0 */
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
/* Custom styles for precise matching */
|
||||
.card-shadow {
|
||||
box-shadow: 0px 4px 20px rgba(16, 28, 18, 0.06);
|
||||
}
|
||||
|
||||
.progress-track {
|
||||
background-color: #E6EADF;
|
||||
}
|
||||
|
||||
.progress-fill {
|
||||
background-color: #A6D66F;
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.option-card {
|
||||
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
.option-card:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.selected-card {
|
||||
border-color: #437824;
|
||||
background-color: rgba(166, 214, 111, 0.15); /* Tint derived from #A6D66F */
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
body {
|
||||
min-height: max(884px, 100dvh);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="h-full flex justify-center bg-[#FBFAF3] font-body-md text-on-surface antialiased">
|
||||
<!-- iPhone 15 Frame Simulator -->
|
||||
<div class="relative w-full max-w-[393px] h-[852px] bg-[#FBFAF3] sm:rounded-[3rem] sm:shadow-2xl sm:overflow-hidden sm:my-8 flex flex-col">
|
||||
<!-- Status Bar Area (Safe Area Top) -->
|
||||
<div class="h-12 w-full shrink-0"></div>
|
||||
<!-- Top Navigation Area -->
|
||||
<div class="px-container-margin pt-2 pb-4 flex items-center shrink-0 relative">
|
||||
<button aria-label="Go back" class="w-10 h-10 flex items-center justify-center rounded-full bg-surface-container-lowest card-shadow active:scale-95 transition-transform text-primary absolute left-container-margin">
|
||||
<span class="material-symbols-outlined" style="font-variation-settings: 'FILL' 0;">arrow_back</span>
|
||||
</button>
|
||||
<div class="w-full flex justify-center">
|
||||
<div class="w-24 h-2 rounded-full progress-track overflow-hidden">
|
||||
<div class="h-full rounded-full progress-fill"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Main Content Area -->
|
||||
<main class="flex-1 flex flex-col px-container-margin overflow-y-auto pb-24 pt-4">
|
||||
<!-- Header Text -->
|
||||
<div class="text-center mb-xl">
|
||||
<h1 class="font-headline-lg text-headline-lg text-on-surface mb-xs">
|
||||
How many plants do you have?
|
||||
</h1>
|
||||
<p class="font-body-md text-body-md text-on-surface-variant px-sm">
|
||||
This helps us personalize your care plan.
|
||||
</p>
|
||||
</div>
|
||||
<!-- Options List -->
|
||||
<div class="flex flex-col gap-sm">
|
||||
<!-- Option 1 -->
|
||||
<button class="option-card w-full text-left bg-surface-container-lowest card-shadow rounded-[16px] p-lg border-2 border-transparent flex items-center gap-md">
|
||||
<span class="text-[28px] leading-none select-none">🌱</span>
|
||||
<span class="font-body-lg text-body-lg text-on-surface">Just starting (1-3)</span>
|
||||
</button>
|
||||
<!-- Option 2 -->
|
||||
<button class="option-card w-full text-left bg-surface-container-lowest card-shadow rounded-[16px] p-lg border-2 border-transparent flex items-center gap-md">
|
||||
<span class="text-[28px] leading-none select-none">🪴</span>
|
||||
<span class="font-body-lg text-body-lg text-on-surface">A few (4-10)</span>
|
||||
</button>
|
||||
<!-- Option 3 (Selected) -->
|
||||
<button class="option-card w-full text-left card-shadow rounded-[16px] p-lg border-2 flex items-center gap-md selected-card">
|
||||
<span class="text-[28px] leading-none select-none">🌿</span>
|
||||
<span class="font-body-lg text-body-lg text-primary-container font-bold">Quite a jungle (11-25)</span>
|
||||
</button>
|
||||
<!-- Option 4 -->
|
||||
<button class="option-card w-full text-left bg-surface-container-lowest card-shadow rounded-[16px] p-lg border-2 border-transparent flex items-center gap-md">
|
||||
<span class="text-[28px] leading-none select-none">🌳</span>
|
||||
<span class="font-body-lg text-body-lg text-on-surface">Full jungle (25+)</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="flex-1 min-h-[32px]"></div>
|
||||
<!-- Floating Decorative Element (Abstract Blur to keep it visually interesting per styling guidelines) -->
|
||||
<div class="absolute bottom-32 -right-16 w-64 h-64 bg-tertiary-fixed-dim/20 rounded-full blur-[60px] pointer-events-none z-0"></div>
|
||||
</main>
|
||||
<!-- Bottom Action Area -->
|
||||
<div class="px-container-margin pb-10 pt-4 bg-[#FBFAF3]/90 backdrop-blur-md shrink-0 relative z-10 w-full rounded-b-[3rem]">
|
||||
<button class="w-full h-[56px] bg-primary-container text-on-primary rounded-[14px] font-label-lg text-label-lg active:scale-98 transition-transform shadow-[0px_8px_16px_rgba(67,120,36,0.2)] flex items-center justify-center">
|
||||
Continue
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
// Simple JS for interaction demonstration
|
||||
document.querySelectorAll('.option-card').forEach(card => {
|
||||
card.addEventListener('click', function() {
|
||||
// Remove selected class from all
|
||||
document.querySelectorAll('.option-card').forEach(c => {
|
||||
c.classList.remove('selected-card');
|
||||
c.classList.add('bg-surface-container-lowest', 'border-transparent');
|
||||
c.querySelector('span:last-child').classList.remove('text-primary-container', 'font-bold');
|
||||
c.querySelector('span:last-child').classList.add('text-on-surface');
|
||||
});
|
||||
|
||||
// Add to clicked
|
||||
this.classList.add('selected-card');
|
||||
this.classList.remove('bg-surface-container-lowest', 'border-transparent');
|
||||
|
||||
let textSpan = this.querySelector('span:last-child');
|
||||
textSpan.classList.remove('text-on-surface');
|
||||
textSpan.classList.add('text-primary-container', 'font-bold');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body></html>
|
||||
Reference in New Issue
Block a user