aboutsummaryrefslogtreecommitdiff
path: root/landing/layouts
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/layouts
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 'landing/layouts')
-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
4 files changed, 44 insertions, 6 deletions
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>