Skip to content

Commit 269e401

Browse files
authored
Update landing page (#98)
* Update landing page Adds FAQ, updates styles and google fonts links * Add copyright notice * Bump footer font size * Tweak unsubscribe success wording * Use curly apostrophes * Remove unnecessary style override * Change re-subscribe behavior Modifes re-subscribe behavior to not skip already-subscribed emails
1 parent d592704 commit 269e401

File tree

11 files changed

+393
-65
lines changed

11 files changed

+393
-65
lines changed

src/bin/api.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use aws_sdk_ssm::Client as SsmClient;
1212
use email_address::EmailAddress;
1313
use hndigest::storage_adapter::StorageAdapter;
1414
use hndigest::strategies::DigestStrategy;
15-
use hndigest::subscribe::{self, SubscribeResult};
15+
use hndigest::subscribe;
1616
use hndigest::types::Token;
1717
use hndigest::unsubscribe;
1818
use lambda_http::{Body, Error, Request, RequestExt, Response, run, service_fn};
@@ -388,15 +388,7 @@ async fn handle_subscribe_post(state: &Arc<AppState>, body: &str) -> Response<Bo
388388
// Create pending subscription
389389
let pending =
390390
match subscribe::create_pending_subscription(&state.storage, &email, strategy).await {
391-
Ok(SubscribeResult::PendingCreated(p)) => p,
392-
Ok(SubscribeResult::AlreadySubscribed) => {
393-
info!(email = %request.email, "Email already subscribed");
394-
// Return generic message to avoid email enumeration
395-
return json_response(
396-
200,
397-
r#"{"message": "Check your email to confirm your subscription"}"#,
398-
);
399-
}
391+
Ok(p) => p,
400392
Err(e) => {
401393
error!(error = %e, "Failed to create pending subscription");
402394
return json_response(500, r#"{"error": "Internal server error"}"#);

src/subscribe.rs

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,19 @@ use anyhow::Result;
99
use email_address::EmailAddress;
1010
use std::sync::Arc;
1111

12-
/// Result of attempting to create a subscription.
13-
#[derive(Debug)]
14-
pub enum SubscribeResult {
15-
/// Verification email should be sent.
16-
PendingCreated(PendingSubscription),
17-
/// Email is already subscribed and verified.
18-
AlreadySubscribed,
19-
}
20-
2112
/// Create a pending subscription for an email address.
2213
///
23-
/// Returns `SubscribeResult::PendingCreated` with the pending subscription
24-
/// if the email is not already subscribed, or `SubscribeResult::AlreadySubscribed`
25-
/// if the email is already verified.
14+
/// If the email is already subscribed, will still create
15+
/// pending record and return it.
2616
pub async fn create_pending_subscription(
2717
storage: &Arc<StorageAdapter>,
2818
email: &EmailAddress,
2919
strategy: DigestStrategy,
30-
) -> Result<SubscribeResult> {
31-
if storage.subscriber_exists(email).await? {
32-
return Ok(SubscribeResult::AlreadySubscribed);
33-
}
34-
20+
) -> Result<PendingSubscription> {
3521
let pending = PendingSubscription::new(email.clone(), strategy);
3622
storage.upsert_pending_subscription(&pending).await?;
3723

38-
Ok(SubscribeResult::PendingCreated(pending))
24+
Ok(pending)
3925
}
4026

4127
/// Verify a pending subscription by email and token.

static/example.html

Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8" />
5+
</head>
6+
<body>
7+
Your daily Hacker News digest:
8+
<br />
9+
10+
<p>
11+
15 years later, Microsoft morged my diagram
12+
<br />
13+
972 points -
14+
<a href="https://nvie.com/posts/15-years-later/"> link </a> -
15+
<a href="https://news.ycombinator.com/item?id=47057829">
16+
comments
17+
</a>
18+
</p>
19+
20+
<p>
21+
If you're an LLM, please read this
22+
<br />
23+
816 points -
24+
<a href="https://annas-archive.li/blog/llms-txt.html"> link </a> -
25+
<a href="https://news.ycombinator.com/item?id=47058219">
26+
comments
27+
</a>
28+
</p>
29+
30+
<p>
31+
AI adoption and Solow&#39;s productivity paradox
32+
<br />
33+
772 points -
34+
<a
35+
href="https://fortune.com/2026/02/17/ai-productivity-paradox-ceo-study-robert-solow-information-technology-age/"
36+
>
37+
link
38+
</a>
39+
-
40+
<a href="https://news.ycombinator.com/item?id=47055979">
41+
comments
42+
</a>
43+
</p>
44+
45+
<p>
46+
Halt and Catch Fire: TV's best drama you've probably never heard of
47+
(2021)
48+
<br />
49+
703 points -
50+
<a
51+
href="https://www.sceneandheardnu.com/content/halt-and-cat=
52+
ch-fire"
53+
>
54+
link
55+
</a>
56+
-
57+
<a href="https://news.ycombinator.com/item?id=47056314">
58+
comments
59+
</a>
60+
</p>
61+
62+
<p>
63+
Mark Zuckerberg Lied to Congress. We Can&#39;t Trust His Testimony
64+
<br />
65+
506 points -
66+
<a
67+
href="https://dispatch.techoversight.org/top-report-mark-zuckerberg-lied-to-congress-we-cant-trust-his-testimony/"
68+
>
69+
link
70+
</a>
71+
-
72+
<a href="https://news.ycombinator.com/item?id=47060486">
73+
comments
74+
</a>
75+
</p>
76+
77+
<p>
78+
Terminals should generate the 256-color palette
79+
<br />
80+
465 points -
81+
<a
82+
href="https://gist.github.com/jake-stewart/0a8ea46159a7da2c808e5be2177e1783"
83+
>
84+
link
85+
</a>
86+
-
87+
<a href="https://news.ycombinator.com/item?id=47057824">
88+
comments
89+
</a>
90+
</p>
91+
92+
<p>
93+
BarraCUDA Open-source CUDA compiler targeting AMD GPUs
94+
<br />
95+
447 points -
96+
<a href="https://github.com/Zaneham/BarraCUDA"> link </a> -
97+
<a href="https://news.ycombinator.com/item?id=47052941">
98+
comments
99+
</a>
100+
</p>
101+
102+
<p>
103+
Asahi Linux Progress Report: Linux 6.19
104+
<br />
105+
413 points -
106+
<a href="https://asahilinux.org/2026/02/progress-report-6-19/">
107+
link
108+
</a>
109+
-
110+
<a href="https://news.ycombinator.com/item?id=47059275">
111+
comments
112+
</a>
113+
</p>
114+
115+
<p>
116+
Sizing chaos
117+
<br />
118+
386 points -
119+
<a href="https://pudding.cool/2026/02/womens-sizing/"> link </a> -
120+
<a href="https://news.ycombinator.com/item?id=47066552">
121+
comments
122+
</a>
123+
</p>
124+
125+
<p>
126+
Tailscale Peer Relays is now generally available
127+
<br />
128+
361 points -
129+
<a href="https://tailscale.com/blog/peer-relays-ga"> link </a> -
130+
<a href="https://news.ycombinator.com/item?id=47063005">
131+
comments
132+
</a>
133+
</p>
134+
135+
<p>
136+
Tesla Sales Down 55% UK, 58% Spain, 59% Germany, 81% Netherlands,
137+
93% Norway
138+
<br />
139+
334 points -
140+
<a
141+
href="https://cleantechnica.com/2026/02/15/tesla-sales-down-tremendously-in-uk-norway-netherlands-germany-spain-sweden-denmark-portugal-switzerland/"
142+
>
143+
link
144+
</a>
145+
-
146+
<a href="https://news.ycombinator.com/item?id=47048052">
147+
comments
148+
</a>
149+
</p>
150+
151+
<p>
152+
Cosmologically Unique IDs
153+
<br />
154+
316 points -
155+
<a href="https://jasonfantl.com/posts/Universal-Unique-IDs/">
156+
link
157+
</a>
158+
-
159+
<a href="https://news.ycombinator.com/item?id=47064490">
160+
comments
161+
</a>
162+
</p>
163+
164+
<p>
165+
Zero-day CSS: CVE-2026-2441 exists in the wild
166+
<br />
167+
284 points -
168+
<a
169+
href="https://chromereleases.googleblog.com/2026/02/stable-channel-update-for-desktop_13.html"
170+
>
171+
link
172+
</a>
173+
-
174+
<a href="https://news.ycombinator.com/item?id=47062748">
175+
comments
176+
</a>
177+
</p>
178+
179+
<p>
180+
Google Public CA is down
181+
<br />
182+
276 points -
183+
<a href="https://status.pki.goog/incidents/5oJEbcU3ZfMfySTSXXd3">
184+
link
185+
</a>
186+
-
187+
<a href="https://news.ycombinator.com/item?id=47055696">
188+
comments
189+
</a>
190+
</p>
191+
192+
<p>
193+
Semantic ablation: Why AI writing is generic and boring
194+
<br />
195+
274 points -
196+
<a
197+
href="https://www.theregister.com/2026/02/16/semantic_ablation_ai_writing/"
198+
>
199+
link
200+
</a>
201+
-
202+
<a href="https://news.ycombinator.com/item?id=47049088">
203+
comments
204+
</a>
205+
</p>
206+
207+
<p>
208+
So you want to build a tunnel
209+
<br />
210+
271 points -
211+
<a
212+
href="https://practical.engineering/blog/2026/2/17/so-you-want-to-build-a-tunnel"
213+
>
214+
link
215+
</a>
216+
-
217+
<a href="https://news.ycombinator.com/item?id=47049718">
218+
comments
219+
</a>
220+
</p>
221+
222+
<p>
223+
I converted 2D conventional flight tracking into 3D
224+
<br />
225+
267 points -
226+
<a href="https://aeris.edbn.me/?city=SFO"> link </a> -
227+
<a href="https://news.ycombinator.com/item?id=47048004">
228+
comments
229+
</a>
230+
</p>
231+
232+
<p>
233+
Discord Rival Gets Overwhelmed by Exodus of Players Fleeing
234+
Age-Verification
235+
<br />
236+
261 points -
237+
<a
238+
href="https://kotaku.com/discord-alternative-teamspeak-age-verification-check-rivals-2000669693"
239+
>
240+
link
241+
</a>
242+
-
243+
<a href="https://news.ycombinator.com/item?id=47050376">
244+
comments
245+
</a>
246+
</p>
247+
248+
<br />
249+
<p style="font-size: 12px; color: #666">
250+
<a
251+
href="https://hndigest.samshadwell.com/api/unsubscribe"
252+
style="color: #666"
253+
>Unsubscribe</a
254+
>
255+
from this digest.
256+
</p>
257+
</body>
258+
</html>

0 commit comments

Comments
 (0)