Web page style added
This commit is contained in:
+172
-16
@@ -1,23 +1,179 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>mxPIC EDA - Login</title>
|
||||
<!-- Importing the same clean font used in the dashboard -->
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
/* Shared Dark Theme Variables */
|
||||
:root {
|
||||
--bg-main: #0f172a;
|
||||
--bg-card: #1e293b;
|
||||
--text-main: #f8fafc;
|
||||
--text-muted: #94a3b8;
|
||||
--accent: #38bdf8;
|
||||
--accent-hover: #0284c7;
|
||||
--border: #334155;
|
||||
--input-bg: #0b1120;
|
||||
--error-text: #ef4444;
|
||||
--error-bg: rgba(239, 68, 68, 0.1);
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Inter', sans-serif;
|
||||
background-color: var(--bg-main);
|
||||
color: var(--text-main);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* Centered Login Card */
|
||||
.login-card {
|
||||
background-color: var(--bg-card);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 12px;
|
||||
padding: 40px;
|
||||
width: 100%;
|
||||
max-width: 380px;
|
||||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
/* Branding */
|
||||
.brand-header {
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.brand-logo {
|
||||
font-size: 1.75rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: 1px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.brand-logo span {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.system-title {
|
||||
color: var(--text-muted);
|
||||
font-size: 0.9rem;
|
||||
font-weight: 400;
|
||||
letter-spacing: 2px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
/* Form Layout */
|
||||
form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
label {
|
||||
font-size: 0.85rem;
|
||||
color: var(--text-muted);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
input[type="password"] {
|
||||
background-color: var(--input-bg);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text-main);
|
||||
font-family: inherit;
|
||||
font-size: 1rem;
|
||||
padding: 12px 15px;
|
||||
border-radius: 6px;
|
||||
outline: none;
|
||||
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
input[type="text"]:focus,
|
||||
input[type="password"]:focus {
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
|
||||
}
|
||||
|
||||
/* Submit Button */
|
||||
button[type="submit"] {
|
||||
background-color: var(--accent);
|
||||
color: #0f172a;
|
||||
font-family: inherit;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
padding: 12px;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s ease, transform 0.1s ease;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
button[type="submit"]:hover {
|
||||
background-color: var(--accent-hover);
|
||||
color: white;
|
||||
}
|
||||
|
||||
button[type="submit"]:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
/* Error Message Styling */
|
||||
.error-message {
|
||||
background-color: var(--error-bg);
|
||||
color: var(--error-text);
|
||||
border: 1px solid var(--error-text);
|
||||
padding: 12px;
|
||||
border-radius: 6px;
|
||||
font-size: 0.85rem;
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Login to mxPIC System</h2>
|
||||
<!-- The form sends data to the /login route in server.py -->
|
||||
<form action="/login" method="POST">
|
||||
<label>Username:</label><br>
|
||||
<input type="text" name="username" required><br><br>
|
||||
|
||||
<label>Password:</label><br>
|
||||
<input type="password" name="password" required><br><br>
|
||||
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
<!-- Display error messages if login fails -->
|
||||
{% if error %}
|
||||
<p style="color:red;">{{ error }}</p>
|
||||
{% endif %}
|
||||
|
||||
<div class="login-card">
|
||||
<div class="brand-header">
|
||||
<div class="brand-logo">opti<span>hk</span></div>
|
||||
<div class="system-title">mxPIC Core Access</div>
|
||||
</div>
|
||||
|
||||
<!-- The form sends data to the /login route in server.py -->
|
||||
<form action="/login" method="POST">
|
||||
<div class="input-group">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" id="username" name="username" required autocomplete="username">
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" id="password" name="password" required autocomplete="current-password">
|
||||
</div>
|
||||
|
||||
<button type="submit">Log In</button>
|
||||
</form>
|
||||
|
||||
<!-- Elegantly styled error message block -->
|
||||
{% if error %}
|
||||
<div class="error-message">
|
||||
{{ error }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user