aboutsummaryrefslogtreecommitdiff
path: root/landing/layouts/partials
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/partials
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/layouts/partials/dashboard-url.html14
-rw-r--r--landing/layouts/partials/header.html2
2 files changed, 15 insertions, 1 deletions
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>