Passwortschutz von der Hauptseite entfernen
Das clientseitige Login-Gate (#login-gate, SHA256-Cookie-Pruefung) stammt aus der Vorschau-Phase. Nach Befoerderung der Vorschau zur Live-Hauptseite ist es nicht mehr erforderlich; der gesamte Block inkl. CSS, HTML und JS wurde entfernt. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Dieser Commit ist enthalten in:
35
index.html
35
index.html
@@ -55,41 +55,6 @@
|
|||||||
<link rel="stylesheet" href="/cookie-consent.css">
|
<link rel="stylesheet" href="/cookie-consent.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- Password Gate -->
|
|
||||||
<style>
|
|
||||||
#login-gate{position:fixed;inset:0;z-index:10000;background:#0A1832;display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:'Inter',system-ui,sans-serif}
|
|
||||||
#login-gate .gate-logo{width:80px;height:80px;margin-bottom:2rem}
|
|
||||||
#login-gate .gate-logo img{width:100%;height:100%;background:#fff;border-radius:12px;padding:6px}
|
|
||||||
#login-gate h1{font-size:1.6rem;font-weight:700;color:#C8A851;margin-bottom:.5rem}
|
|
||||||
#login-gate p{font-size:.95rem;color:#A0A8B8;margin-bottom:1.5rem}
|
|
||||||
#login-gate .pw-form{display:flex;gap:.5rem}
|
|
||||||
#login-gate .pw-input{padding:.7rem 1rem;border:1px solid rgba(200,168,81,.3);border-radius:6px;background:rgba(255,255,255,.05);color:#E8E8E8;font-family:inherit;font-size:.95rem;width:220px;outline:none}
|
|
||||||
#login-gate .pw-input:focus{border-color:#C8A851}
|
|
||||||
#login-gate .pw-input::placeholder{color:#5A6478}
|
|
||||||
#login-gate .pw-btn{padding:.7rem 1.2rem;border:none;border-radius:6px;background:#C8A851;color:#0A1832;font-family:inherit;font-size:.95rem;font-weight:600;cursor:pointer}
|
|
||||||
#login-gate .pw-btn:hover{background:#D4B96A}
|
|
||||||
#login-gate .pw-error{color:#E85454;font-size:.85rem;margin-top:.75rem;display:none}
|
|
||||||
body.locked{overflow:hidden}
|
|
||||||
</style>
|
|
||||||
<div id="login-gate">
|
|
||||||
<div class="gate-logo"><img src="/assets/images/logos/AegisSightLogo_NavyGold.svg" alt="AegisSight"></div>
|
|
||||||
<h1>Vorschau</h1>
|
|
||||||
<p>Zugang nur mit Passwort</p>
|
|
||||||
<form class="pw-form" onsubmit="return checkPassword(event)">
|
|
||||||
<input type="password" class="pw-input" id="pw-input" placeholder="Passwort" autofocus>
|
|
||||||
<button type="submit" class="pw-btn">Weiter</button>
|
|
||||||
</form>
|
|
||||||
<div class="pw-error" id="pw-error">Falsches Passwort</div>
|
|
||||||
</div>
|
|
||||||
<script>
|
|
||||||
var PW_HASH='feab257468bdb1b836bae5bc439db625d9a1b9a56ca60e0916ab04fb04c2ec31';
|
|
||||||
function sha256(s){return crypto.subtle.digest('SHA-256',new TextEncoder().encode(s)).then(function(b){return Array.from(new Uint8Array(b)).map(function(x){return x.toString(16).padStart(2,'0')}).join('')})}
|
|
||||||
function getCookie(n){var m=document.cookie.match(new RegExp('(?:^|; )'+n+'=([^;]*)'));return m?m[1]:null}
|
|
||||||
function setCookie(n,v,d){var e=new Date();e.setTime(e.getTime()+d*864e5);document.cookie=n+'='+v+';expires='+e.toUTCString()+';path=/vorschau/;SameSite=Strict;Secure'}
|
|
||||||
function unlock(){document.getElementById('login-gate').style.display='none';document.body.classList.remove('locked')}
|
|
||||||
function checkPassword(e){e.preventDefault();sha256(document.getElementById('pw-input').value).then(function(h){if(h===PW_HASH){setCookie('vorschau_auth',h,30);unlock()}else{document.getElementById('pw-error').style.display='block';document.getElementById('pw-input').value='';document.getElementById('pw-input').focus()}});return false}
|
|
||||||
if(getCookie('vorschau_auth')===PW_HASH){unlock()}else{document.body.classList.add('locked')}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- Navigation -->
|
<!-- Navigation -->
|
||||||
<nav class="navbar" id="navbar">
|
<nav class="navbar" id="navbar">
|
||||||
|
|||||||
In neuem Issue referenzieren
Einen Benutzer sperren