Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />


<!-- color-scheme on :root/.dark in index.css pins UA surfaces (scrollbars)
to the in-app theme; this meta opts the UA into both schemes first. -->
<meta name="color-scheme" content="light dark" />

<!-- HashRouter has no crawlable per-route URLs, so one site-level canonical is correct. -->
<link rel="canonical" href="https://hackertok.github.io/" />

<!-- Primary Meta Tags -->
<title>HackerTok</title>
<meta name="title" content="HackerTok - Your daily dose of Hacker News" />
Expand Down Expand Up @@ -41,7 +48,18 @@
<meta name="twitter:title" content="HackerTok - Your daily dose of Hacker News" />
<meta name="twitter:description" content="An open-source, blazingly fast, progressive Hacker News client. Swipe or scroll through stories, read comments, and install as an app." />
<meta name="twitter:image" content="https://hackertok.github.io/icons/og-image.png" />


<!-- Minimal WebSite node; its supported use is Google's "site name"
selection (the `name` property). No per-item nodes (hash routes aren't crawlable). -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"name": "HackerTok",
"url": "https://hackertok.github.io/"
}
</script>

<!-- Preconnect to APIs for faster first request -->
<!-- Algolia first: homepage uses it for initial stories -->
<link rel="preconnect" href="https://hn.algolia.com" />
Expand Down
3 changes: 3 additions & 0 deletions public/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<!-- /404.html itself serves 200 (only unknown paths get a real 404), so
noindex this contentless redirect shell. -->
<meta name="robots" content="noindex" />
<title>Redirecting…</title>
<script>
// GitHub Pages serves this for unknown paths (e.g. /item/123).
Expand Down
4 changes: 4 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ button {
/* ── Design Tokens ──────────────────────────────────────────────────── */
/* Light mode (default) — warm stone/taupe palette */
:root {
/* Pins UA surfaces (scrollbars etc.) to the in-app theme: .dark tracks the
app theme, not the OS. Pairs with the color-scheme meta in index.html. */
color-scheme: light;
--background: oklch(0.98 0.006 60); /* warm cream */
--foreground: oklch(0.22 0.01 60); /* warm near-black */
--card: oklch(0.995 0.003 60); /* warm near-white */
Expand Down Expand Up @@ -47,6 +50,7 @@ button {

/* Dark mode — soft dark, warm tones */
.dark {
color-scheme: dark;
--background: oklch(0.20 0.012 60); /* soft dark with warm tint */
--foreground: oklch(0.92 0.005 60); /* warm light text */
--card: oklch(0.24 0.012 60); /* slightly lighter than bg */
Expand Down