From 2feb581830e1868e9c4be2024176edc1faf9f706 Mon Sep 17 00:00:00 2001 From: Jukka Lampikoski Date: Sun, 8 Mar 2026 14:53:09 +0200 Subject: [PATCH] Hide admin panel from navigation and protect admin page Remove HALLINTA link from nav, add subtle footer gear icon link. Hide admin UI content until successful login (display:none by default). Co-Authored-By: Claude Opus 4.6 --- admin.html | 4 ++++ index.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/admin.html b/admin.html index f2663d6..ecf8c44 100644 --- a/admin.html +++ b/admin.html @@ -235,6 +235,7 @@ +
@@ -479,6 +481,7 @@ const data = await apiPost('admin_login', { password: pw }); if (data.ok) { document.getElementById('loginOverlay').style.display = 'none'; + document.getElementById('adminContent').style.display = ''; await loadAdminData(); } else { err.textContent = data.error || 'Kirjautuminen epäonnistui.'; @@ -947,6 +950,7 @@ const data = await apiGet('admin_check'); if (data.loggedIn) { document.getElementById('loginOverlay').style.display = 'none'; + document.getElementById('adminContent').style.display = ''; await loadAdminData(); } else { document.getElementById('adminPwInput').focus(); diff --git a/index.html b/index.html index b9ca21c..60c3d50 100644 --- a/index.html +++ b/index.html @@ -22,7 +22,6 @@ - @@ -76,6 +75,7 @@

🍳 tykkää.fi — © 2026

+