Add login modal to landing page

- Show login modal when user is not authenticated
- Add handleLogin, showLoginModal, closeLoginModal functions
- Add login modal HTML with username/password form
- Add CSS styles for modal

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
uroma
2026-01-21 14:46:19 +00:00
Unverified
parent b830e1187e
commit f6ba241062
5 changed files with 201 additions and 2 deletions

View File

@@ -417,3 +417,115 @@ body.sessions-page {
padding-top: 80px;
}
}
/* === Login Modal === */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
justify-content: center;
align-items: center;
z-index: 10000;
}
.modal-content {
background: #1a1a1a;
border: 1px solid #333;
border-radius: 12px;
padding: 0;
width: 100%;
max-width: 400px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 24px;
border-bottom: 1px solid #333;
}
.modal-header h2 {
margin: 0;
font-size: 18px;
color: #e0e0e0;
}
.modal-close {
background: none;
border: none;
color: #888;
font-size: 24px;
cursor: pointer;
padding: 0;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
}
.modal-close:hover {
color: #fff;
}
.modal-body {
padding: 24px;
}
.form-group {
margin-bottom: 16px;
}
.form-group label {
display: block;
margin-bottom: 6px;
color: #aaa;
font-size: 13px;
}
.form-group input {
width: 100%;
padding: 10px 12px;
background: #0d0d0d;
border: 1px solid #333;
border-radius: 6px;
color: #e0e0e0;
font-size: 14px;
}
.form-group input:focus {
outline: none;
border-color: #4a9eff;
}
.btn-primary {
width: 100%;
padding: 12px;
background: #4a9eff;
color: white;
border: none;
border-radius: 6px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
}
.btn-primary:hover {
background: #3a8eef;
}
.login-error {
margin-bottom: 16px;
padding: 10px 12px;
background: rgba(255, 107, 107, 0.1);
border: 1px solid #ff6b6b;
border-radius: 6px;
color: #ff6b6b;
font-size: 13px;
}