Spaces:
Sleeping
Sleeping
Update templates/login.html
Browse files- templates/login.html +200 -16
templates/login.html
CHANGED
|
@@ -5,20 +5,176 @@
|
|
| 5 |
<title>Login</title>
|
| 6 |
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
| 7 |
<style>
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</style>
|
| 20 |
</head>
|
| 21 |
<body>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
<div class="card">
|
| 23 |
<h2>Login</h2>
|
| 24 |
|
|
@@ -31,11 +187,11 @@
|
|
| 31 |
{% endwith %}
|
| 32 |
|
| 33 |
<form method="post" action="{{ url_for('login') }}">
|
| 34 |
-
<label for="email">Email</label
|
| 35 |
-
<input id="email" name="email" type="email" required value="{{ email|default('') }}"
|
| 36 |
|
| 37 |
-
<label for="password">Password</label
|
| 38 |
-
<input id="password" name="password" type="password" required
|
| 39 |
|
| 40 |
<button type="submit">Login</button>
|
| 41 |
</form>
|
|
@@ -44,5 +200,33 @@
|
|
| 44 |
<p>Don't have an account? <a class="link" href="{{ url_for('register') }}">Register</a></p>
|
| 45 |
</div>
|
| 46 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
</body>
|
| 48 |
-
</html>
|
|
|
|
| 5 |
<title>Login</title>
|
| 6 |
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
| 7 |
<style>
|
| 8 |
+
/* Base styles */
|
| 9 |
+
body {
|
| 10 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 11 |
+
display: flex;
|
| 12 |
+
align-items: center;
|
| 13 |
+
justify-content: center;
|
| 14 |
+
height: 100vh;
|
| 15 |
+
margin: 0;
|
| 16 |
+
background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
|
| 17 |
+
overflow: hidden;
|
| 18 |
+
position: relative;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
/* Animated background elements */
|
| 22 |
+
.balls-container {
|
| 23 |
+
position: absolute;
|
| 24 |
+
top: 0;
|
| 25 |
+
left: 0;
|
| 26 |
+
width: 100%;
|
| 27 |
+
height: 100%;
|
| 28 |
+
z-index: 0;
|
| 29 |
+
overflow: hidden;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
.ball {
|
| 33 |
+
position: absolute;
|
| 34 |
+
border-radius: 50%;
|
| 35 |
+
opacity: 0.7;
|
| 36 |
+
filter: blur(5px);
|
| 37 |
+
animation: float 15s infinite linear;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
@keyframes float {
|
| 41 |
+
0% {
|
| 42 |
+
transform: translate(0, 0) scale(1);
|
| 43 |
+
}
|
| 44 |
+
25% {
|
| 45 |
+
transform: translate(20vw, 40vh) scale(1.1);
|
| 46 |
+
}
|
| 47 |
+
50% {
|
| 48 |
+
transform: translate(40vw, 10vh) scale(0.9);
|
| 49 |
+
}
|
| 50 |
+
75% {
|
| 51 |
+
transform: translate(60vw, 30vh) scale(1.2);
|
| 52 |
+
}
|
| 53 |
+
100% {
|
| 54 |
+
transform: translate(0, 0) scale(1);
|
| 55 |
+
}
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
/* Card styling */
|
| 59 |
+
.card {
|
| 60 |
+
background: rgba(255, 255, 255, 0.1);
|
| 61 |
+
backdrop-filter: blur(10px);
|
| 62 |
+
padding: 30px;
|
| 63 |
+
border-radius: 16px;
|
| 64 |
+
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
|
| 65 |
+
width: 340px;
|
| 66 |
+
border: 1px solid rgba(255, 255, 255, 0.18);
|
| 67 |
+
z-index: 1;
|
| 68 |
+
position: relative;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
h2 {
|
| 72 |
+
margin-top: 0;
|
| 73 |
+
margin-bottom: 20px;
|
| 74 |
+
font-size: 24px;
|
| 75 |
+
color: #fff;
|
| 76 |
+
text-align: center;
|
| 77 |
+
text-shadow: 0 0 10px rgba(100, 149, 237, 0.8);
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
label {
|
| 81 |
+
color: #e0e0e0;
|
| 82 |
+
font-size: 14px;
|
| 83 |
+
margin-bottom: 5px;
|
| 84 |
+
display: block;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
input[type="email"], input[type="password"] {
|
| 88 |
+
width: 100%;
|
| 89 |
+
padding: 12px;
|
| 90 |
+
margin: 6px 0 16px 0;
|
| 91 |
+
border-radius: 8px;
|
| 92 |
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
| 93 |
+
box-sizing: border-box;
|
| 94 |
+
background: rgba(255, 255, 255, 0.1);
|
| 95 |
+
color: #fff;
|
| 96 |
+
transition: all 0.3s ease;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
input[type="email"]:focus, input[type="password"]:focus {
|
| 100 |
+
outline: none;
|
| 101 |
+
border-color: #6495ed;
|
| 102 |
+
box-shadow: 0 0 10px rgba(100, 149, 237, 0.5);
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
input::placeholder {
|
| 106 |
+
color: rgba(255, 255, 255, 0.5);
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
button {
|
| 110 |
+
width: 100%;
|
| 111 |
+
padding: 12px;
|
| 112 |
+
border-radius: 8px;
|
| 113 |
+
border: none;
|
| 114 |
+
background: linear-gradient(45deg, #6495ed, #7b68ee);
|
| 115 |
+
color: white;
|
| 116 |
+
font-weight: 600;
|
| 117 |
+
cursor: pointer;
|
| 118 |
+
transition: all 0.3s ease;
|
| 119 |
+
box-shadow: 0 4px 15px rgba(100, 149, 237, 0.4);
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
button:hover {
|
| 123 |
+
transform: translateY(-2px);
|
| 124 |
+
box-shadow: 0 6px 20px rgba(100, 149, 237, 0.6);
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
.small {
|
| 128 |
+
margin-top: 20px;
|
| 129 |
+
text-align: center;
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
.small p {
|
| 133 |
+
color: #e0e0e0;
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
.link {
|
| 137 |
+
color: #6495ed;
|
| 138 |
+
text-decoration: none;
|
| 139 |
+
font-weight: 600;
|
| 140 |
+
transition: all 0.3s ease;
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
.link:hover {
|
| 144 |
+
text-shadow: 0 0 8px rgba(100, 149, 237, 0.8);
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
.flash {
|
| 148 |
+
padding: 12px;
|
| 149 |
+
border-radius: 8px;
|
| 150 |
+
margin-bottom: 16px;
|
| 151 |
+
font-size: 14px;
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
.flash.success {
|
| 155 |
+
background: rgba(209, 250, 229, 0.2);
|
| 156 |
+
color: #a7f3d0;
|
| 157 |
+
border: 1px solid rgba(167, 243, 208, 0.3);
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
.flash.danger {
|
| 161 |
+
background: rgba(254, 226, 226, 0.2);
|
| 162 |
+
color: #fecaca;
|
| 163 |
+
border: 1px solid rgba(254, 202, 202, 0.3);
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
.flash.warning {
|
| 167 |
+
background: rgba(255, 247, 237, 0.2);
|
| 168 |
+
color: #fed7aa;
|
| 169 |
+
border: 1px solid rgba(254, 215, 170, 0.3);
|
| 170 |
+
}
|
| 171 |
</style>
|
| 172 |
</head>
|
| 173 |
<body>
|
| 174 |
+
<!-- Animated background balls -->
|
| 175 |
+
<div class="balls-container" id="ballsContainer"></div>
|
| 176 |
+
|
| 177 |
+
<!-- Login card -->
|
| 178 |
<div class="card">
|
| 179 |
<h2>Login</h2>
|
| 180 |
|
|
|
|
| 187 |
{% endwith %}
|
| 188 |
|
| 189 |
<form method="post" action="{{ url_for('login') }}">
|
| 190 |
+
<label for="email">Email</label>
|
| 191 |
+
<input id="email" name="email" type="email" required value="{{ email|default('') }}" placeholder="Enter your email">
|
| 192 |
|
| 193 |
+
<label for="password">Password</label>
|
| 194 |
+
<input id="password" name="password" type="password" required placeholder="Enter your password">
|
| 195 |
|
| 196 |
<button type="submit">Login</button>
|
| 197 |
</form>
|
|
|
|
| 200 |
<p>Don't have an account? <a class="link" href="{{ url_for('register') }}">Register</a></p>
|
| 201 |
</div>
|
| 202 |
</div>
|
| 203 |
+
|
| 204 |
+
<script>
|
| 205 |
+
// Create animated balls for background
|
| 206 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 207 |
+
const container = document.getElementById('ballsContainer');
|
| 208 |
+
const ballCount = 15;
|
| 209 |
+
const colors = ['#6495ed', '#7b68ee', '#4169e1', '#6a5acd', '#9370db'];
|
| 210 |
+
|
| 211 |
+
for (let i = 0; i < ballCount; i++) {
|
| 212 |
+
const ball = document.createElement('div');
|
| 213 |
+
ball.classList.add('ball');
|
| 214 |
+
|
| 215 |
+
// Random properties for each ball
|
| 216 |
+
const size = Math.random() * 60 + 20;
|
| 217 |
+
const color = colors[Math.floor(Math.random() * colors.length)];
|
| 218 |
+
|
| 219 |
+
ball.style.width = `${size}px`;
|
| 220 |
+
ball.style.height = `${size}px`;
|
| 221 |
+
ball.style.background = `radial-gradient(circle at 30% 30%, ${color}, ${color}00)`;
|
| 222 |
+
ball.style.left = `${Math.random() * 100}vw`;
|
| 223 |
+
ball.style.top = `${Math.random() * 100}vh`;
|
| 224 |
+
ball.style.animationDuration = `${Math.random() * 20 + 15}s`;
|
| 225 |
+
ball.style.animationDelay = `${Math.random() * 5}s`;
|
| 226 |
+
|
| 227 |
+
container.appendChild(ball);
|
| 228 |
+
}
|
| 229 |
+
});
|
| 230 |
+
</script>
|
| 231 |
</body>
|
| 232 |
+
</html>
|