Spaces:
Sleeping
Sleeping
File size: 3,280 Bytes
7c8619c c21ae5c 7c8619c c21ae5c 7c8619c c21ae5c 7c8619c c21ae5c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
---
interface Props {
isVisible?: boolean
}
const { isVisible = true } = Astro.props
---
<div id="login-overlay" class={`login-overlay ${isVisible ? 'visible' : 'hidden'}`}>
<div class="login-modal">
<div class="login-header">
<h2>Login to Track Progress</h2>
<p>Enter your email and password to track completed tasks</p>
</div>
<form id="login-form" class="login-form">
<div class="form-field">
<label for="email">Email</label>
<input type="email" id="email" name="email" required autocomplete="email">
</div>
<div class="form-field">
<label for="password">Password</label>
<input type="password" id="password" name="password" required autocomplete="current-password">
</div>
<div class="form-actions">
<button type="submit" class="login-btn">Login</button>
</div>
</form>
<div id="login-error" class="login-error hidden">
Invalid email or password
</div>
<div class="login-footer">
<p>Session expires after 1 week</p>
</div>
</div>
</div>
<style>
.login-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.9);
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
backdrop-filter: blur(8px);
}
.login-overlay.hidden {
display: none;
}
.login-modal {
background-color: #161b22;
border: 1px solid #30363d;
border-radius: 12px;
padding: 2rem;
width: 100%;
max-width: 400px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.login-header {
text-align: center;
margin-bottom: 2rem;
}
.login-header h2 {
color: #f0f6fc;
font-size: 1.5rem;
margin-bottom: 0.5rem;
}
.login-header p {
color: #8b949e;
font-size: 0.9rem;
}
.login-form {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.form-field {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.form-field label {
color: #f0f6fc;
font-weight: 500;
font-size: 0.9rem;
}
.form-field input {
background-color: #0d1117;
border: 1px solid #30363d;
border-radius: 6px;
padding: 0.75rem;
color: #f0f6fc;
font-size: 1rem;
transition: border-color 0.2s ease;
}
.form-field input:focus {
outline: none;
border-color: #58a6ff;
box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}
.login-btn {
background-color: #238636;
color: white;
border: none;
border-radius: 6px;
padding: 0.75rem 1.5rem;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s ease;
}
.login-btn:hover {
background-color: #2ea043;
}
.login-btn:disabled {
background-color: #30363d;
cursor: not-allowed;
}
.login-error {
background-color: rgba(248, 81, 73, 0.1);
border: 1px solid rgba(248, 81, 73, 0.3);
border-radius: 6px;
padding: 0.75rem;
color: #f85149;
font-size: 0.9rem;
text-align: center;
}
.login-error.hidden {
display: none;
}
.login-footer {
text-align: center;
margin-top: 1.5rem;
}
.login-footer p {
color: #8b949e;
font-size: 0.8rem;
}
</style>
|