Require password to access logs page
This commit is contained in:
169
templates/login.html
Normal file
169
templates/login.html
Normal file
@@ -0,0 +1,169 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Login - DokkuStatus</title>
|
||||
<link rel="icon"
|
||||
href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='0.9em' font-size='90'>⚡</text></svg>" />
|
||||
<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=JetBrains+Mono:wght@400;500;600;700&display=swap"
|
||||
rel="stylesheet">
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'JetBrains Mono', monospace;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: #0a0e17;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #c9d1d9;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.login-box {
|
||||
background: #161b22;
|
||||
border: 2px solid #00d9ff;
|
||||
box-shadow: 0 0 30px rgba(0, 217, 255, 0.3);
|
||||
padding: 32px;
|
||||
}
|
||||
|
||||
.login-box::before {
|
||||
content: '[LOGIN REQUIRED]';
|
||||
display: block;
|
||||
background: #161b22;
|
||||
color: #00d9ff;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 2px;
|
||||
text-align: center;
|
||||
margin: -32px -32px 24px -32px;
|
||||
padding: 12px;
|
||||
border-bottom: 2px solid #00d9ff;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0 0 24px 0;
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
color: #00d9ff;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
color: #8b949e;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 1px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
input[type="password"] {
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
background: #0a0e17;
|
||||
border: 2px solid #30363d;
|
||||
color: #c9d1d9;
|
||||
font-family: 'JetBrains Mono', monospace;
|
||||
font-size: 14px;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
input[type="password"]:focus {
|
||||
outline: none;
|
||||
border-color: #00d9ff;
|
||||
box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
|
||||
}
|
||||
|
||||
button {
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
background: rgba(0, 217, 255, 0.1);
|
||||
border: 2px solid #00d9ff;
|
||||
color: #00d9ff;
|
||||
font-family: 'JetBrains Mono', monospace;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 2px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background: rgba(0, 217, 255, 0.2);
|
||||
box-shadow: 0 0 20px rgba(0, 217, 255, 0.4);
|
||||
}
|
||||
|
||||
.error {
|
||||
margin-top: 16px;
|
||||
padding: 12px;
|
||||
background: rgba(255, 85, 85, 0.1);
|
||||
border: 2px solid #ff5555;
|
||||
color: #ff5555;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.back-link {
|
||||
display: block;
|
||||
margin-top: 20px;
|
||||
text-align: center;
|
||||
color: #8b949e;
|
||||
text-decoration: none;
|
||||
font-size: 12px;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.back-link:hover {
|
||||
color: #00d9ff;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="login-container">
|
||||
<div class="login-box">
|
||||
<h1>DokkuStatus</h1>
|
||||
|
||||
<form method="POST" action="/login">
|
||||
<div class="form-group">
|
||||
<label for="password">[PASSWORD]</label>
|
||||
<input type="password" id="password" name="password" placeholder="Enter password..." autofocus
|
||||
required />
|
||||
</div>
|
||||
|
||||
<button type="submit">[ACCESS LOGS]</button>
|
||||
</form>
|
||||
|
||||
{% if error %}
|
||||
<div class="error">[!] {{ error }}</div>
|
||||
{% endif %}
|
||||
|
||||
<a href="/" class="back-link">← Back to Dashboard</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user