fix: Passwort-Gate in Vorschau-Seite wiederhergestellt
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dieser Commit ist enthalten in:
@@ -10,6 +10,85 @@
|
|||||||
<link rel="stylesheet" href="css/style.css">
|
<link rel="stylesheet" href="css/style.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: 0.5rem;
|
||||||
|
}
|
||||||
|
#login-gate p {
|
||||||
|
font-size: 0.95rem; color: #A0A8B8;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
}
|
||||||
|
#login-gate .pw-form {
|
||||||
|
display: flex; gap: 0.5rem;
|
||||||
|
}
|
||||||
|
#login-gate .pw-input {
|
||||||
|
padding: 0.7rem 1rem;
|
||||||
|
border: 1px solid rgba(200,168,81,0.3);
|
||||||
|
border-radius: 6px;
|
||||||
|
background: rgba(255,255,255,0.05);
|
||||||
|
color: #E8E8E8;
|
||||||
|
font-family: inherit; font-size: 0.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: 0.7rem 1.2rem; border: none; border-radius: 6px;
|
||||||
|
background: #C8A851; color: #0A1832;
|
||||||
|
font-family: inherit; font-size: 0.95rem; font-weight: 600;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
#login-gate .pw-btn:hover { background: #D4B96A; }
|
||||||
|
#login-gate .pw-error {
|
||||||
|
color: #E85454; font-size: 0.85rem;
|
||||||
|
margin-top: 0.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">
|
||||||
<div class="nav-container">
|
<div class="nav-container">
|
||||||
|
|||||||
In neuem Issue referenzieren
Einen Benutzer sperren