Redesign login page with improved UI and error display

Revamps the login page layout and styles for a more modern, 'hacker' terminal look. Adds animated background effects, updates the login box and input styling, and enhances error messages with a new format. Also removes the tracked intercept.db file and ensures it is ignored in .gitignore.
This commit is contained in:
Jon Ander Oribe
2026-01-18 09:03:17 +01:00
parent 58a825976d
commit aa763b0f81
4 changed files with 172 additions and 77 deletions
+1
View File
@@ -34,3 +34,4 @@ build/
uv.lock
*.db
*.sqlite3
instance/intercept.db
Binary file not shown.
+112 -25
View File
@@ -1,36 +1,123 @@
/* Container Layout */
.landing-overlay {
position: fixed;
top: 0; left: 0; width: 100%; height: 100%;
background: var(--bg-primary);
display: flex;
flex-direction: column; /* Stack logo, title, box vertically */
align-items: center;
justify-content: center;
overflow: hidden;
}
.landing-content {
position: relative;
z-index: 10;
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}
/* Background Effects */
.landing-scanline {
position: absolute;
top: 0; left: 0; width: 100%; height: 2px;
background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
animation: scanlineMove 5s linear infinite;
opacity: 0.4;
z-index: 1; /* Behind content */
pointer-events: none;
}
@keyframes scanlineMove {
0% { top: 0; }
100% { top: 100%; }
}
/* Typography */
.landing-title {
font-family: 'JetBrains Mono', monospace;
font-size: 2.2rem;
font-weight: 700;
letter-spacing: 0.4em;
color: var(--text-primary);
margin: 20px 0 5px 0;
text-indent: 0.4em;
text-align: center;
}
.landing-tagline {
font-family: 'JetBrains Mono', monospace;
color: var(--accent-cyan);
font-size: 0.9rem;
letter-spacing: 0.15em;
margin-bottom: 30px;
}
/* The Login Box */
.login-box {
background: rgba(10, 10, 26, 0.9);
border: 1px solid var(--accent-cyan);
background: var(--bg-secondary);
border: 1px solid var(--border-color);
padding: 30px;
border-radius: 4px;
box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
width: 100%;
max-width: 400px;
margin-top: 20px;
width: 380px;
z-index: 20;
box-shadow: 0 0 40px rgba(0, 0, 0, 0.6), inset 0 0 20px var(--accent-cyan-dim);
box-sizing: border-box; /* Ensures padding doesn't hide inputs */
display: flex;
flex-direction: column;
}
/* Hacker Style Error */
.flash-error {
font-family: 'JetBrains Mono', monospace;
font-size: 10px;
color: var(--accent-red);
background: rgba(239, 68, 68, 0.1);
border-left: 3px solid var(--accent-red);
padding: 10px;
margin-bottom: 20px;
display: flex;
gap: 10px;
text-transform: uppercase;
box-sizing: border-box;
}
.error-prefix { font-weight: 700; opacity: 0.7; }
/* Inputs */
.form-input {
width: 100%;
background: #050510;
border: 1px solid #1a1a40;
background: var(--bg-primary);
border: 1px solid var(--border-color);
color: var(--accent-cyan);
padding: 12px;
margin: 10px 0;
font-family: 'JetBrains Mono', monospace;
outline: none;
}
.form-input:focus {
border-color: var(--accent-green);
box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}
.flash-error {
color: var(--accent-red);
font-size: 11px;
margin-bottom: 15px;
text-transform: uppercase;
border: 1px solid var(--accent-red);
padding: 8px;
background: rgba(255, 0, 0, 0.1);
font-family: 'JetBrains Mono', monospace;
font-size: 11px;
outline: none;
box-sizing: border-box; /* Crucial for visibility */
}
.landing-enter-btn {
width: 100%;
background: transparent;
border: 2px solid var(--accent-cyan);
color: var(--accent-cyan);
padding: 15px;
font-family: 'JetBrains Mono', monospace;
font-weight: 600;
letter-spacing: 3px;
cursor: pointer;
transition: all 0.3s ease;
box-sizing: border-box;
}
.landing-version {
margin-top: 25px;
font-family: 'JetBrains Mono', monospace;
font-size: 10px;
color: rgba(255, 255, 255, 0.3);
letter-spacing: 2px;
}
+59 -52
View File
@@ -1,58 +1,65 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>iNTERCEPT // Restricted Access</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/index.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/login.css') }}">
</head>
<body>
<div class="landing-overlay">
<div class="landing-content">
<div class="landing-logo">
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<!-- Signal brackets - left side -->
<path d="M15 30 Q5 50, 15 70" stroke="#00d4ff" stroke-width="3" fill="none" stroke-linecap="round" opacity="0.5" class="signal-wave signal-wave-1"/>
<path d="M22 35 Q14 50, 22 65" stroke="#00d4ff" stroke-width="2.5" fill="none" stroke-linecap="round" opacity="0.7" class="signal-wave signal-wave-2"/>
<path d="M29 40 Q23 50, 29 60" stroke="#00d4ff" stroke-width="2" fill="none" stroke-linecap="round" class="signal-wave signal-wave-3"/>
<!-- Signal brackets - right side -->
<path d="M85 30 Q95 50, 85 70" stroke="#00d4ff" stroke-width="3" fill="none" stroke-linecap="round" opacity="0.5" class="signal-wave signal-wave-1"/>
<path d="M78 35 Q86 50, 78 65" stroke="#00d4ff" stroke-width="2.5" fill="none" stroke-linecap="round" opacity="0.7" class="signal-wave signal-wave-2"/>
<path d="M71 40 Q77 50, 71 60" stroke="#00d4ff" stroke-width="2" fill="none" stroke-linecap="round" class="signal-wave signal-wave-3"/>
<!-- The 'i' letter -->
<circle cx="50" cy="22" r="6" fill="#00ff88" class="logo-dot"/>
<rect x="44" y="35" width="12" height="45" rx="2" fill="#00d4ff"/>
<rect x="38" y="35" width="24" height="4" rx="1" fill="#00d4ff"/>
<rect x="38" y="76" width="24" height="4" rx="1" fill="#00d4ff"/>
</svg>
</div>
<link
rel="stylesheet"
href="{{ url_for('static', filename='css/index.css') }}"
/>
<link
rel="stylesheet"
href="{{ url_for('static', filename='css/login.css') }}"
/>
</head>
<body>
<div class="landing-overlay">
<div class="landing-scanline"></div>
<h1 class="landing-title" style="font-size: 2.5rem;">SECURE LOGIN</h1>
<p class="landing-tagline">// Restricted Terminal Access</p>
<div class="login-box">
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<div class="flash-error">{{ message }}</div>
{% endfor %}
{% endif %}
{% endwith %}
<form method="POST">
<input type="text" name="username" placeholder="OPERATOR ID" class="form-input" required autofocus>
<input type="password" name="password" placeholder="ENCRYPTION KEY" class="form-input" required>
<button type="submit" class="landing-enter-btn" style="width: 100%; margin-top: 20px;">
<span class="btn-text">INITIALIZE SESSION</span>
</button>
</form>
</div>
<p class="landing-version">SYSTEM AUTH v{{ version }}</p>
<div class="landing-content">
<div class="landing-logo">
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15 30 Q5 50, 15 70" stroke="#00d4ff" stroke-width="3" fill="none" stroke-linecap="round" opacity="0.5" class="signal-wave signal-wave-1"/>
<path d="M22 35 Q14 50, 22 65" stroke="#00d4ff" stroke-width="2.5" fill="none" stroke-linecap="round" opacity="0.7" class="signal-wave signal-wave-2"/>
<path d="M29 40 Q23 50, 29 60" stroke="#00d4ff" stroke-width="2" fill="none" stroke-linecap="round" class="signal-wave signal-wave-3"/>
<path d="M85 30 Q95 50, 85 70" stroke="#00d4ff" stroke-width="3" fill="none" stroke-linecap="round" opacity="0.5" class="signal-wave signal-wave-1"/>
<path d="M78 35 Q86 50, 78 65" stroke="#00d4ff" stroke-width="2.5" fill="none" stroke-linecap="round" opacity="0.7" class="signal-wave signal-wave-2"/>
<path d="M71 40 Q77 50, 71 60" stroke="#00d4ff" stroke-width="2" fill="none" stroke-linecap="round" class="signal-wave signal-wave-3"/>
<circle cx="50" cy="22" r="6" fill="#00ff88" class="logo-dot" />
<rect x="44" y="35" width="12" height="45" rx="2" fill="#00d4ff" />
<rect x="38" y="35" width="24" height="4" rx="1" fill="#00d4ff" />
<rect x="38" y="76" width="24" height="4" rx="1" fill="#00d4ff" />
</svg>
</div>
<div class="landing-scanline"></div>
<h1 class="landing-title">SECURE LOGIN</h1>
<p class="landing-tagline">// Restricted Terminal Access</p>
<div class="login-box">
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<div class="flash-error">
<span class="error-prefix">ERROR_SIG:</span>
<span class="error-message">ACCESS_DENIED // {{ message|upper }}</span>
</div>
{% endfor %}
{% endif %}
{% endwith %}
<form method="POST">
<input type="text" name="username" placeholder="OPERATOR ID" class="form-input" required autofocus />
<input type="password" name="password" placeholder="ENCRYPTION KEY" class="form-input" required />
<button type="submit" class="landing-enter-btn">
<span class="btn-text">INITIALIZE SESSION</span>
</button>
</form>
</div>
<p class="landing-version">SYSTEM AUTH v{{ version }}</p>
</div>
</body>
</html>
</div>
</body>
</html>