aboutsummaryrefslogtreecommitdiff
path: root/landing
diff options
context:
space:
mode:
authorbenj <benj@rse8.com>2026-04-10 11:13:34 +0800
committerbenj <benj@rse8.com>2026-04-10 11:13:34 +0800
commit493746b14c1251a45b061d2e3edd9160c929d2b9 (patch)
tree1607cceb94c1aac1a17a01bb5c0d71b97342e892 /landing
parentc041641634650c31e03c70dcad132fd94cb08e63 (diff)
downloadtidyindex-493746b14c1251a45b061d2e3edd9160c929d2b9.tar
tidyindex-493746b14c1251a45b061d2e3edd9160c929d2b9.tar.gz
tidyindex-493746b14c1251a45b061d2e3edd9160c929d2b9.tar.bz2
tidyindex-493746b14c1251a45b061d2e3edd9160c929d2b9.tar.lz
tidyindex-493746b14c1251a45b061d2e3edd9160c929d2b9.tar.xz
tidyindex-493746b14c1251a45b061d2e3edd9160c929d2b9.tar.zst
tidyindex-493746b14c1251a45b061d2e3edd9160c929d2b9.zip
a basic ui and landing web interface for tidyindex.com
Diffstat (limited to '')
-rw-r--r--landing/data/urls.toml17
-rw-r--r--landing/layouts/_default/baseof.html30
-rw-r--r--landing/layouts/index.html4
-rw-r--r--landing/layouts/partials/dashboard-url.html14
-rw-r--r--landing/layouts/partials/header.html2
-rw-r--r--landing/static/css/style.css29
-rw-r--r--landing/static/fonts/fraunces-latin.woff2bin0 -> 67304 bytes
-rw-r--r--landing/static/fonts/inter-latin.woff2bin0 -> 48256 bytes
-rw-r--r--landing/static/fonts/jetbrains-mono-latin.woff2bin0 -> 31432 bytes
9 files changed, 90 insertions, 6 deletions
diff --git a/landing/data/urls.toml b/landing/data/urls.toml
new file mode 100644
index 0000000..4385afb
--- /dev/null
+++ b/landing/data/urls.toml
@@ -0,0 +1,17 @@
+# Canonical cross-app URLs. Both the Hugo landing site and the SvelteKit
+# dashboard read from this one file — don't hard-code these URLs anywhere
+# else. Hugo loads this automatically into `site.Data.urls`; the dashboard
+# reads it via a relative path at build time if/when it needs to.
+
+[dashboard]
+# The SvelteKit UI ("API Key" app) — lives at web/ui in the repo.
+prod = "https://ui.tidyindex.com"
+# The UI's Vite dev server — see web/ui/vite.config.js.
+# Hugo's own dev server lives on :1313, so the UI uses :5174 to
+# avoid a collision when both are running locally.
+dev = "http://localhost:5174"
+
+[landing]
+# The marketing site you're reading this from.
+prod = "https://tidyindex.com"
+dev = "http://localhost:1313"
diff --git a/landing/layouts/_default/baseof.html b/landing/layouts/_default/baseof.html
index bab1b56..7cd776f 100644
--- a/landing/layouts/_default/baseof.html
+++ b/landing/layouts/_default/baseof.html
@@ -15,13 +15,37 @@
<meta name="twitter:title" content="{{ .Site.Title }}" />
<meta name="twitter:description" content="{{ .Site.Params.description }}" />
- <link rel="preconnect" href="https://fonts.googleapis.com">
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
- <link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300..600&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
+ {{/* Preload the three self-hosted webfonts so the browser fetches
+ them in parallel with the CSS, not after it. */}}
+ <link rel="preload" href="{{ "fonts/fraunces-latin.woff2" | relURL }}" as="font" type="font/woff2" crossorigin>
+ <link rel="preload" href="{{ "fonts/inter-latin.woff2" | relURL }}" as="font" type="font/woff2" crossorigin>
+ <link rel="preload" href="{{ "fonts/jetbrains-mono-latin.woff2" | relURL }}" as="font" type="font/woff2" crossorigin>
<link rel="stylesheet" href="{{ "css/style.css" | relURL }}" />
<link rel="icon" type="image/svg+xml" href="{{ "favicon.svg" | relURL }}" />
<link rel="alternate" type="text/plain" title="LLM-readable site description" href="{{ "llms.txt" | relURL }}" />
+
+ {{/* Prevent FOUT: hide the body until webfonts are loaded, with a
+ 1500ms safety timeout so the page never stays blank forever. */}}
+ <style>html.fonts-pending body { visibility: hidden; }</style>
+ <script>
+ (function () {
+ var d = document;
+ d.documentElement.classList.add('fonts-pending');
+ var done = false;
+ function reveal() {
+ if (done) return;
+ done = true;
+ d.documentElement.classList.remove('fonts-pending');
+ }
+ if (d.fonts && d.fonts.ready && typeof d.fonts.ready.then === 'function') {
+ d.fonts.ready.then(reveal);
+ } else {
+ reveal();
+ }
+ setTimeout(reveal, 1500);
+ })();
+ </script>
</head>
<body>
{{ partial "header.html" . }}
diff --git a/landing/layouts/index.html b/landing/layouts/index.html
index a08109e..c37e66b 100644
--- a/landing/layouts/index.html
+++ b/landing/layouts/index.html
@@ -11,7 +11,7 @@
designed for humans, machines, and LLM agents alike.
</p>
<div class="hero-cta">
- <a href="mailto:contact@tidyindex.com" class="btn btn-primary">
+ <a href="{{ partial "dashboard-url.html" . }}" class="btn btn-primary">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="7.5" cy="15.5" r="5.5"/>
<path d="m11.5 11.5 9.5-9.5"/>
@@ -146,7 +146,7 @@ Source: https://apps.irs.gov/app/eos/details/?ein=200049703</code></pre>
<p class="section-marker">§ 04 &nbsp;&middot;&nbsp; start</p>
<h2 class="section-headline">Ready when you are.</h2>
</div>
- <a href="mailto:contact@tidyindex.com" class="btn btn-primary btn-lg">
+ <a href="{{ partial "dashboard-url.html" . }}" class="btn btn-primary btn-lg">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="7.5" cy="15.5" r="5.5"/>
<path d="m11.5 11.5 9.5-9.5"/>
diff --git a/landing/layouts/partials/dashboard-url.html b/landing/layouts/partials/dashboard-url.html
new file mode 100644
index 0000000..62e5e5e
--- /dev/null
+++ b/landing/layouts/partials/dashboard-url.html
@@ -0,0 +1,14 @@
+{{- /*
+ Returns the URL of the Tidy Index dashboard (the "API Key" app).
+
+ Pulls from landing/data/urls.toml — the single source of truth for
+ cross-app URLs. Defaults to the dev URL, swaps to prod when the build
+ is running in the production environment (i.e. `hugo` or `hugo --minify`,
+ NOT `hugo server`).
+
+ Usage:
+ <a href="{{ partial "dashboard-url.html" . }}">API Key</a>
+*/ -}}
+{{- $url := site.Data.urls.dashboard.dev -}}
+{{- if hugo.IsProduction }}{{ $url = site.Data.urls.dashboard.prod }}{{ end -}}
+{{- return $url -}}
diff --git a/landing/layouts/partials/header.html b/landing/layouts/partials/header.html
index e7a9d40..92ab6f4 100644
--- a/landing/layouts/partials/header.html
+++ b/landing/layouts/partials/header.html
@@ -12,7 +12,7 @@
</a>
<div class="header-meta">
<span class="header-status"><span class="status-dot" aria-hidden="true"></span> Private beta</span>
- <a href="mailto:contact@tidyindex.com" class="header-cta">API&nbsp;Key &rarr;</a>
+ <a href="{{ partial "dashboard-url.html" . }}" class="header-cta">API&nbsp;Key &rarr;</a>
</div>
</div>
</header>
diff --git a/landing/static/css/style.css b/landing/static/css/style.css
index 33ddc1b..1d4c46f 100644
--- a/landing/static/css/style.css
+++ b/landing/static/css/style.css
@@ -6,6 +6,35 @@
labels, hairline rules.
---------------------------------------------------------------- */
+/* ---------- self-hosted webfonts ---------- */
+
+@font-face {
+ font-family: 'Fraunces';
+ font-style: normal;
+ font-weight: 300 600;
+ font-display: swap;
+ src: url('/fonts/fraunces-latin.woff2') format('woff2');
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+@font-face {
+ font-family: 'Inter';
+ font-style: normal;
+ font-weight: 400 600;
+ font-display: swap;
+ src: url('/fonts/inter-latin.woff2') format('woff2');
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+@font-face {
+ font-family: 'JetBrains Mono';
+ font-style: normal;
+ font-weight: 400 500;
+ font-display: swap;
+ src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
:root {
--c-bg: #ffffff;
--c-bg-soft: #f7f9fc;
diff --git a/landing/static/fonts/fraunces-latin.woff2 b/landing/static/fonts/fraunces-latin.woff2
new file mode 100644
index 0000000..cb295bf
--- /dev/null
+++ b/landing/static/fonts/fraunces-latin.woff2
Binary files differ
diff --git a/landing/static/fonts/inter-latin.woff2 b/landing/static/fonts/inter-latin.woff2
new file mode 100644
index 0000000..d15208d
--- /dev/null
+++ b/landing/static/fonts/inter-latin.woff2
Binary files differ
diff --git a/landing/static/fonts/jetbrains-mono-latin.woff2 b/landing/static/fonts/jetbrains-mono-latin.woff2
new file mode 100644
index 0000000..4d09cda
--- /dev/null
+++ b/landing/static/fonts/jetbrains-mono-latin.woff2
Binary files differ