Skip to content

Commit e9666b6

Browse files
fix(pages): harden enhancement layer, JS-off tagline, drop unused font
1 parent 8322ee9 commit e9666b6

4 files changed

Lines changed: 19 additions & 20 deletions

File tree

-14.5 KB
Binary file not shown.

docs/assets/main.js

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,13 @@
3737
}
3838
})();
3939
});
40-
promise.skip = skip;
4140
return { promise: promise, skip: skip };
4241
}
4342

43+
// sessionStorage helpers — silently degrade when storage is blocked/sandboxed.
44+
function booted() { try { return sessionStorage.getItem('mkcertos_booted') === '1'; } catch (e) { return false; } }
45+
function markBooted() { try { sessionStorage.setItem('mkcertos_booted', '1'); } catch (e) {} }
46+
4447
// --- Boot sequence ---
4548
function runBoot() {
4649
var boot = document.getElementById('boot');
@@ -53,10 +56,10 @@
5356
window.removeEventListener('click', onSkip);
5457
}
5558
var t;
56-
function onSkip() { if (t) t.skip(); sessionStorage.setItem('mkcertos_booted', '1'); dismiss(); }
59+
function onSkip() { if (t) t.skip(); markBooted(); dismiss(); }
5760

5861
// Skip entirely if already booted this session or reduced motion.
59-
if (sessionStorage.getItem('mkcertos_booted') === '1' || reduceMotion) {
62+
if (booted() || reduceMotion) {
6063
return;
6164
}
6265

@@ -79,7 +82,7 @@
7982
window.addEventListener('click', onSkip);
8083
t = typeLines(textEl, lines, { speed: 14, linePause: 160 });
8184
t.promise.then(function () {
82-
sessionStorage.setItem('mkcertos_booted', '1');
85+
markBooted();
8386
setTimeout(dismiss, 650);
8487
});
8588
}
@@ -146,13 +149,15 @@
146149
window.MKCERTOS = { typeLines: typeLines, reduceMotion: reduceMotion };
147150

148151
document.addEventListener('DOMContentLoaded', function () {
149-
runBoot();
150-
var tagline = document.getElementById('hero-tagline');
151-
if (tagline) {
152-
window.MKCERTOS.typeLines(tagline, ['Local TLS, minus the pain.'],
153-
{ speed: 38, linePause: 0 });
154-
}
155-
initCopyButtons();
156-
initConsole();
152+
try { runBoot(); } catch (e) {}
153+
try {
154+
var tagline = document.getElementById('hero-tagline');
155+
if (tagline) {
156+
window.MKCERTOS.typeLines(tagline, ['Local TLS, minus the pain.'],
157+
{ speed: 38, linePause: 0 });
158+
}
159+
} catch (e) {}
160+
try { initCopyButtons(); } catch (e) {}
161+
try { initConsole(); } catch (e) {}
157162
});
158163
})();

docs/assets/styles.css

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@
1313
src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
1414
font-weight: 400; font-style: normal; font-display: swap;
1515
}
16-
@font-face {
17-
font-family: 'IBM Plex Mono';
18-
src: url('fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
19-
font-weight: 500; font-style: normal; font-display: swap;
20-
}
21-
2216
:root {
2317
--bg: #070b07;
2418
--bg-panel: #0c130c;

docs/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<body>
1717
<div class="crt" aria-hidden="true"></div>
1818
<div id="boot" class="boot" role="status" aria-label="System boot sequence">
19-
<pre id="boot-text" class="boot-text"></pre>
19+
<pre id="boot-text" class="boot-text" aria-hidden="true"></pre>
2020
<p class="boot-hint">[ PRESS ANY KEY TO SKIP ]</p>
2121
</div>
2222
<a class="skip-link" href="#main">Skip to content</a>
@@ -30,7 +30,7 @@
3030
<section class="hero">
3131
<div class="wrap">
3232
<h1 class="hero-title display">mkcert&nbsp;Web&nbsp;UI</h1>
33-
<p class="hero-tagline" id="hero-tagline" aria-label="Local TLS, minus the pain."></p>
33+
<p class="hero-tagline" id="hero-tagline" aria-label="Local TLS, minus the pain.">Local TLS, minus the pain.</p>
3434
<p class="hero-sub">A secure web interface for managing local TLS certificates with mkcert — generation, SCEP enrollment, multiple formats, Docker-ready.</p>
3535
<nav class="hero-actions" aria-label="Primary">
3636
<a class="btn btn-primary" href="https://github.com/jeffcaldwellca/mkcertWeb">[ DEPLOY VIA DOCKER ]</a>

0 commit comments

Comments
 (0)