Skip to content

Commit 3c32d92

Browse files
committed
Refine hero CTA artwork and hook
1 parent 302cee4 commit 3c32d92

2 files changed

Lines changed: 112 additions & 52 deletions

File tree

website/src/lib/sections/Hero.svelte

Lines changed: 112 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import PrimaryButton from '$lib/components/PrimaryButton.svelte';
44
import SecondaryButton from '$lib/components/SecondaryButton.svelte';
55
import { links } from '$lib/data/links';
6-
import { logEvent, logGitHubClick } from '$lib/utils/analytics';
6+
import { logDownload, logEvent, logGitHubClick } from '$lib/utils/analytics';
77
import { Download, Github } from 'lucide-svelte';
88
99
let { onDownload }: { onDownload: () => void } = $props();
@@ -18,6 +18,11 @@
1818
return () => mq.removeEventListener('change', update);
1919
});
2020
21+
function handleStoreDownload(url: string, platform: string) {
22+
logDownload(platform, 'hero');
23+
window.open(url, '_blank', 'noopener');
24+
}
25+
2126
function handleDownload() {
2227
logEvent('hero_download_click');
2328
onDownload();
@@ -30,36 +35,37 @@
3035
</script>
3136

3237
<section id="hero" class="hero section-scroll-margin" aria-labelledby="hero-title">
33-
<ContentContainer padding={isMobile ? '64px 0 64px' : '140px 0 120px'}>
38+
<ContentContainer padding={isMobile ? '56px 0 56px' : '92px 0 96px'}>
3439
<div class="hero-content">
35-
<div class="badge">
36-
<span class="dot"></span>
37-
<span>Open Source & Privacy-First</span>
38-
</div>
40+
<div class="hook">
41+
<div class="badge">
42+
<span class="dot"></span>
43+
<span>Private OCD journaling & ERP practice</span>
44+
</div>
3945

40-
<h1 id="hero-title" class="headline serif">
41-
Patterns OCD<br />tracker.
42-
</h1>
43-
44-
<p class="subhead">
45-
A private iPhone-first app for OCD journaling, tracking obsessions and compulsions,
46-
rating distress, and supporting ERP practice — calm, local-first, and built to help
47-
you see the pattern clearly.
48-
</p>
49-
50-
<div class="cta-row">
51-
<PrimaryButton
52-
label="Download for Free"
53-
icon={Download}
54-
onclick={handleDownload}
55-
fullWidth={isMobile}
56-
/>
57-
<SecondaryButton
58-
label="View on GitHub"
59-
icon={Github}
60-
onclick={handleGitHub}
61-
fullWidth={isMobile}
62-
/>
46+
<h1 id="hero-title" class="headline serif">
47+
See the loop.<br />Choose your next response.
48+
</h1>
49+
50+
<p class="subhead">
51+
Patterns helps you journal, track OCD events, practice ERP, and spot trends
52+
without accounts, cloud sync, or anyone else reading your notes.
53+
</p>
54+
55+
<div class="cta-row">
56+
<PrimaryButton
57+
label="Download for Free"
58+
icon={Download}
59+
onclick={handleDownload}
60+
fullWidth={isMobile}
61+
/>
62+
<SecondaryButton
63+
label="View on GitHub"
64+
icon={Github}
65+
onclick={handleGitHub}
66+
fullWidth={isMobile}
67+
/>
68+
</div>
6369
</div>
6470

6571
<figure class="app-preview">
@@ -71,6 +77,22 @@
7177
height="1024"
7278
fetchpriority="high"
7379
/>
80+
<a
81+
class="store-link app-store-link"
82+
href={links.ios}
83+
target="_blank"
84+
rel="noopener noreferrer"
85+
aria-label="Download Patterns on the App Store"
86+
onclick={() => handleStoreDownload(links.ios, 'iOS')}
87+
></a>
88+
<a
89+
class="store-link play-store-link"
90+
href={links.playStore}
91+
target="_blank"
92+
rel="noopener noreferrer"
93+
aria-label="Get Patterns on Google Play"
94+
onclick={() => handleStoreDownload(links.playStore, 'Android')}
95+
></a>
7496
<figcaption class="sr-only">
7597
Patterns mobile app CTA with App Store and Google Play download badges
7698
</figcaption>
@@ -94,6 +116,13 @@
94116
text-align: center;
95117
}
96118
119+
.hook {
120+
display: flex;
121+
flex-direction: column;
122+
align-items: center;
123+
max-width: 760px;
124+
}
125+
97126
.badge {
98127
display: inline-flex;
99128
align-items: center;
@@ -103,9 +132,9 @@
103132
border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
104133
background: color-mix(in srgb, var(--accent) 10%, transparent);
105134
font-size: 13px;
106-
font-weight: 500;
135+
font-weight: 600;
107136
color: var(--accent);
108-
letter-spacing: 0.5px;
137+
letter-spacing: 0.03em;
109138
}
110139
111140
.dot {
@@ -116,18 +145,17 @@
116145
}
117146
118147
.headline {
119-
margin: 40px 0 0;
120-
font-size: 80px;
121-
line-height: 1.08;
122-
letter-spacing: -0.03em;
148+
margin: 36px 0 0;
149+
font-size: 72px;
150+
line-height: 1.06;
123151
font-weight: 400;
124152
}
125153
126154
.subhead {
127-
margin: 24px 0 0;
128-
max-width: 560px;
155+
margin: 22px 0 0;
156+
max-width: 620px;
129157
font-size: 19px;
130-
line-height: 1.6;
158+
line-height: 1.58;
131159
color: var(--text-secondary);
132160
}
133161
@@ -136,22 +164,48 @@
136164
flex-wrap: wrap;
137165
justify-content: center;
138166
gap: 16px;
139-
margin-top: 48px;
167+
margin-top: 40px;
140168
}
141169
142170
.app-preview {
171+
position: relative;
143172
width: 100%;
144-
max-width: 1120px;
145-
margin: 80px 0 0;
173+
max-width: 1160px;
174+
margin: 72px 0 0;
175+
border-radius: 28px;
176+
overflow: hidden;
177+
box-shadow: 0 34px 100px -42px rgba(0, 0, 0, 0.9);
146178
}
147179
148180
.mobile-preview {
149181
width: 100%;
150182
height: auto;
151-
border-radius: 24px;
152-
box-shadow:
153-
0 24px 64px -16px rgba(0, 0, 0, 0.55),
154-
0 8px 24px color-mix(in srgb, var(--accent) 10%, transparent);
183+
display: block;
184+
}
185+
186+
.store-link {
187+
position: absolute;
188+
display: block;
189+
border-radius: 12px;
190+
}
191+
192+
.store-link:focus-visible {
193+
outline: 3px solid var(--accent);
194+
outline-offset: 3px;
195+
}
196+
197+
.app-store-link {
198+
left: 5.9%;
199+
top: 82.15%;
200+
width: 15.4%;
201+
height: 6.35%;
202+
}
203+
204+
.play-store-link {
205+
left: 22.7%;
206+
top: 82.15%;
207+
width: 14.35%;
208+
height: 6.35%;
155209
}
156210
157211
.sr-only {
@@ -168,16 +222,24 @@
168222
169223
@media (max-width: 1023px) {
170224
.headline {
171-
font-size: 64px;
225+
font-size: 60px;
172226
}
173227
174-
.app-preview { max-width: 960px; }
228+
.app-preview {
229+
max-width: 980px;
230+
border-radius: 24px;
231+
}
175232
}
176233
177234
@media (max-width: 599px) {
235+
.badge {
236+
font-size: 12px;
237+
padding: 7px 12px;
238+
}
239+
178240
.headline {
179-
font-size: 48px;
180241
margin-top: 28px;
242+
font-size: 44px;
181243
}
182244
183245
.subhead {
@@ -186,14 +248,12 @@
186248
}
187249
188250
.cta-row {
189-
margin-top: 36px;
251+
margin-top: 32px;
190252
}
191253
192254
.app-preview {
255+
width: calc(100% + 12px);
193256
margin-top: 48px;
194-
}
195-
196-
.mobile-preview {
197257
border-radius: 18px;
198258
}
199259
}
666 KB
Loading

0 commit comments

Comments
 (0)