Skip to content

Commit 7fb3685

Browse files
Lum1104claude
andcommitted
feat(homepage): add Substack release-updates subscribe to Hero
Adds a collapsed "Subscribe to release updates" disclosure below the Hero CTA row. Default state preserves the existing dark-luxury layout; clicking expands the Substack embed iframe in place. Uses native <details> to avoid runtime JS. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 822b20d commit 7fb3685

1 file changed

Lines changed: 89 additions & 0 deletions

File tree

homepage/src/components/Hero.astro

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,27 @@ const githubUrl = 'https://github.com/Lum1104/Understand-Anything';
3636
Star on GitHub
3737
</a>
3838
</div>
39+
40+
<details class="hero-subscribe anim anim-6">
41+
<summary class="hero-subscribe-toggle">
42+
<span>Subscribe to release updates</span>
43+
<svg class="hero-subscribe-chevron" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
44+
<polyline points="6 9 12 15 18 9"></polyline>
45+
</svg>
46+
</summary>
47+
<div class="hero-subscribe-frame">
48+
<p class="hero-subscribe-hint">No spam, unsubscribe anytime</p>
49+
<iframe
50+
src="https://yuxianglin.substack.com/embed"
51+
title="Subscribe to release updates"
52+
width="480"
53+
height="150"
54+
loading="lazy"
55+
scrolling="no"
56+
frameborder="0"
57+
></iframe>
58+
</div>
59+
</details>
3960
</div>
4061
</section>
4162

@@ -217,6 +238,72 @@ const githubUrl = 'https://github.com/Lum1104/Understand-Anything';
217238
text-decoration: none;
218239
}
219240

241+
/* Subscribe */
242+
.hero-subscribe {
243+
margin-top: 2rem;
244+
width: 100%;
245+
max-width: 480px;
246+
text-align: center;
247+
}
248+
249+
.hero-subscribe-toggle {
250+
display: inline-flex;
251+
align-items: center;
252+
gap: 0.4rem;
253+
cursor: pointer;
254+
color: #8a8578;
255+
font-size: 0.95rem;
256+
list-style: none;
257+
transition: color 0.2s ease;
258+
user-select: none;
259+
}
260+
261+
.hero-subscribe-toggle::-webkit-details-marker {
262+
display: none;
263+
}
264+
265+
.hero-subscribe-toggle:hover {
266+
color: #d4a574;
267+
}
268+
269+
.hero-subscribe-chevron {
270+
transition: transform 0.25s ease;
271+
}
272+
273+
.hero-subscribe[open] .hero-subscribe-chevron {
274+
transform: rotate(180deg);
275+
}
276+
277+
.hero-subscribe-frame {
278+
margin-top: 1rem;
279+
background: rgba(10, 10, 10, 0.6);
280+
border: 1px solid rgba(212, 165, 116, 0.25);
281+
border-radius: 10px;
282+
padding: 6px 6px 0;
283+
overflow: hidden;
284+
animation: subscribeFadeIn 0.3s ease-out;
285+
}
286+
287+
.hero-subscribe-hint {
288+
font-size: 0.78rem;
289+
color: #8a8578;
290+
margin: 0.25rem 0 0.5rem;
291+
text-align: center;
292+
}
293+
294+
.hero-subscribe-frame iframe {
295+
display: block;
296+
width: 100%;
297+
height: 150px;
298+
border: 0;
299+
background: transparent;
300+
}
301+
302+
@keyframes subscribeFadeIn {
303+
from { opacity: 0; transform: translateY(-4px); }
304+
to { opacity: 1; transform: translateY(0); }
305+
}
306+
220307
/* Staggered entrance */
221308
@keyframes heroIn {
222309
from {
@@ -239,6 +326,7 @@ const githubUrl = 'https://github.com/Lum1104/Understand-Anything';
239326
.anim-3 { animation-delay: 0.55s; }
240327
.anim-4 { animation-delay: 0.75s; }
241328
.anim-5 { animation-delay: 0.95s; }
329+
.anim-6 { animation-delay: 1.15s; }
242330

243331
/* Responsive */
244332
@media (max-width: 768px) {
@@ -250,5 +338,6 @@ const githubUrl = 'https://github.com/Lum1104/Understand-Anything';
250338
.hero-actions { flex-direction: column; gap: 1rem; }
251339
.hero-pillars { flex-direction: column; gap: 0.4rem; }
252340
.pillar-dot { display: none; }
341+
.hero-subscribe-toggle { font-size: 0.85rem; }
253342
}
254343
</style>

0 commit comments

Comments
 (0)