aboutsummaryrefslogtreecommitdiff
path: root/landing/layouts/_default/baseof.html
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/_default/baseof.html
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/_default/baseof.html')
-rw-r--r--landing/layouts/_default/baseof.html30
1 files changed, 27 insertions, 3 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" . }}