Upload 15 files
Browse files- static/503.html +145 -0
- static/elev-dashboard.html +5 -1
- static/index.html +29 -27
- static/profesor-dashboard.html +1 -1
- static/reset.html +1 -1
- static/signup.html +1 -1
static/503.html
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="ro">
|
| 3 |
+
<head>
|
| 4 |
+
<link rel="icon" type="image/svg+xml" href="favicon.svg">
|
| 5 |
+
<meta charset="UTF-8">
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
|
| 7 |
+
<title>SGE | 503</title>
|
| 8 |
+
<link rel="stylesheet" href="style.css">
|
| 9 |
+
<style>
|
| 10 |
+
body {
|
| 11 |
+
display:flex; flex-direction:column;
|
| 12 |
+
align-items:center; justify-content:center;
|
| 13 |
+
min-height:100dvh; padding:28px 20px;
|
| 14 |
+
text-align:center;
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
.e-logo {
|
| 18 |
+
width:38px; height:38px; opacity:0.18;
|
| 19 |
+
margin-bottom:28px;
|
| 20 |
+
animation:fadeIn 0.6s ease both;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
.e-code {
|
| 24 |
+
font-family:'Cormorant Garamond', serif;
|
| 25 |
+
font-size:96px; font-weight:600;
|
| 26 |
+
line-height:1; letter-spacing:10px;
|
| 27 |
+
color:rgba(240,240,240,0.05);
|
| 28 |
+
animation:fadeIn 0.6s ease 0.05s both;
|
| 29 |
+
user-select:none;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
.e-title {
|
| 33 |
+
font-family:'Cormorant Garamond', serif;
|
| 34 |
+
font-size:26px; letter-spacing:3px;
|
| 35 |
+
margin-top:4px; margin-bottom:10px;
|
| 36 |
+
animation:fadeIn 0.6s ease 0.1s both;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
.e-sub {
|
| 40 |
+
font-size:10px; color:var(--white-dim);
|
| 41 |
+
letter-spacing:2px; line-height:2.4;
|
| 42 |
+
margin-bottom:0;
|
| 43 |
+
animation:fadeIn 0.6s ease 0.15s both;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
/* Banner mentenanță — mai jos, bine spațiat */
|
| 47 |
+
.maintenance-banner {
|
| 48 |
+
display:none;
|
| 49 |
+
margin-top:32px; margin-bottom:0;
|
| 50 |
+
padding:14px 24px;
|
| 51 |
+
border:1px solid rgba(255,200,60,0.28);
|
| 52 |
+
background:rgba(35,26,4,0.7);
|
| 53 |
+
font-size:9px; letter-spacing:2px;
|
| 54 |
+
color:rgba(255,205,60,0.85);
|
| 55 |
+
animation:fadeIn 0.5s ease 0.2s both;
|
| 56 |
+
}
|
| 57 |
+
.maintenance-banner .mb-dot {
|
| 58 |
+
display:inline-block;
|
| 59 |
+
width:6px; height:6px; border-radius:50%;
|
| 60 |
+
background:rgba(255,200,60,0.8);
|
| 61 |
+
margin-right:8px; vertical-align:middle;
|
| 62 |
+
animation:blink 1.6s ease-in-out infinite;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
/* Status DB */
|
| 66 |
+
.db-status {
|
| 67 |
+
margin-top:32px;
|
| 68 |
+
font-size:9px; color:var(--white-faint);
|
| 69 |
+
letter-spacing:1px; line-height:2.6;
|
| 70 |
+
animation:fadeIn 0.6s ease 0.25s both;
|
| 71 |
+
}
|
| 72 |
+
.db-ok { color:rgba(77,154,77,0.7); }
|
| 73 |
+
.db-err { color:rgba(180,60,60,0.7); }
|
| 74 |
+
|
| 75 |
+
/* Buton */
|
| 76 |
+
.e-actions {
|
| 77 |
+
margin-top:36px;
|
| 78 |
+
animation:fadeIn 0.6s ease 0.3s both;
|
| 79 |
+
display:flex; gap:10px; justify-content:center; flex-wrap:wrap;
|
| 80 |
+
}
|
| 81 |
+
</style>
|
| 82 |
+
</head>
|
| 83 |
+
<body>
|
| 84 |
+
|
| 85 |
+
<img src="logo.svg" class="e-logo" alt="SGE">
|
| 86 |
+
|
| 87 |
+
<div class="e-code">503</div>
|
| 88 |
+
<div class="e-title">Serviciu Indisponibil</div>
|
| 89 |
+
<div class="e-sub">
|
| 90 |
+
Serverul este temporar indisponibil sau în mentenanță.<br>
|
| 91 |
+
Te rugăm să revii în câteva minute.
|
| 92 |
+
</div>
|
| 93 |
+
|
| 94 |
+
<div class="maintenance-banner" id="maintenance-banner">
|
| 95 |
+
<span class="mb-dot"></span>
|
| 96 |
+
SERVER ÎN MENTENANȚĂ · REVENIRE ÎN ~15 MINUTE
|
| 97 |
+
</div>
|
| 98 |
+
|
| 99 |
+
<div class="db-status">
|
| 100 |
+
<div><span class="db-ok">✓</span> Firebase Firestore — ACTIV</div>
|
| 101 |
+
<div><span class="db-ok">✓</span> Cloudinary Storage — ACTIV</div>
|
| 102 |
+
<div id="server-line"><span class="db-ok">✓</span> Server Flask — SE VERIFICĂ</div>
|
| 103 |
+
</div>
|
| 104 |
+
|
| 105 |
+
<div class="e-actions" id="e-actions">
|
| 106 |
+
<a href="index.html" class="btn-primary" style="text-decoration:none;padding:13px 28px;letter-spacing:3px;">
|
| 107 |
+
← LOGIN
|
| 108 |
+
</a>
|
| 109 |
+
</div>
|
| 110 |
+
|
| 111 |
+
<script>
|
| 112 |
+
const isMaintenance = localStorage.getItem('sge_maintenance') === '1';
|
| 113 |
+
const isAdmin = sessionStorage.getItem('vs_role') === 'admin';
|
| 114 |
+
|
| 115 |
+
if (isMaintenance) {
|
| 116 |
+
document.getElementById('maintenance-banner').style.display = 'block';
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
if (isAdmin) {
|
| 120 |
+
document.getElementById('e-actions').innerHTML = `
|
| 121 |
+
<a href="admin-dashboard.html" class="btn-primary" style="text-decoration:none;padding:13px 28px;letter-spacing:3px;">
|
| 122 |
+
ADMIN PANEL →
|
| 123 |
+
</a>
|
| 124 |
+
<a href="index.html" class="btn-ghost" style="text-decoration:none;padding:13px 20px;">
|
| 125 |
+
LOGIN
|
| 126 |
+
</a>`;
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
// Ping server
|
| 130 |
+
fetch('/drive/test', { signal: AbortSignal.timeout(5000) })
|
| 131 |
+
.then(r => {
|
| 132 |
+
const line = document.getElementById('server-line');
|
| 133 |
+
if (r.ok) {
|
| 134 |
+
line.innerHTML = '<span class="db-ok">✓</span> Server Flask — ACTIV';
|
| 135 |
+
} else {
|
| 136 |
+
line.innerHTML = '<span class="db-err">✕</span> Server Flask — EROARE ' + r.status;
|
| 137 |
+
}
|
| 138 |
+
})
|
| 139 |
+
.catch(() => {
|
| 140 |
+
document.getElementById('server-line').innerHTML =
|
| 141 |
+
'<span class="db-err">✕</span> Server Flask — INACTIV';
|
| 142 |
+
});
|
| 143 |
+
</script>
|
| 144 |
+
</body>
|
| 145 |
+
</html>
|
static/elev-dashboard.html
CHANGED
|
@@ -7,7 +7,7 @@
|
|
| 7 |
<title>SGE | Elev</title>
|
| 8 |
<link rel="stylesheet" href="style.css">
|
| 9 |
<script src="errors.js"></script>
|
| 10 |
-
<script>if(localStorage.getItem('sge_maintenance')==='1'){window.location.replace('
|
| 11 |
</head>
|
| 12 |
<body>
|
| 13 |
|
|
@@ -170,6 +170,10 @@ window.selectMat = function(id, name, btn) {
|
|
| 170 |
document.getElementById('no-mat-hint').style.display = 'none';
|
| 171 |
document.getElementById('upload-area').style.display = 'block';
|
| 172 |
loadFiles();
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
};
|
| 174 |
|
| 175 |
// ── Load files ──
|
|
|
|
| 7 |
<title>SGE | Elev</title>
|
| 8 |
<link rel="stylesheet" href="style.css">
|
| 9 |
<script src="errors.js"></script>
|
| 10 |
+
<script>if(localStorage.getItem('sge_maintenance')==='1'){window.location.replace('503.html');}</script>
|
| 11 |
</head>
|
| 12 |
<body>
|
| 13 |
|
|
|
|
| 170 |
document.getElementById('no-mat-hint').style.display = 'none';
|
| 171 |
document.getElementById('upload-area').style.display = 'block';
|
| 172 |
loadFiles();
|
| 173 |
+
// Scroll lin până la zona de upload
|
| 174 |
+
setTimeout(() => {
|
| 175 |
+
document.getElementById('upload-card').scrollIntoView({ behavior:'smooth', block:'start' });
|
| 176 |
+
}, 80);
|
| 177 |
};
|
| 178 |
|
| 179 |
// ── Load files ──
|
static/index.html
CHANGED
|
@@ -145,9 +145,9 @@ window._db=db; window._doc=doc; window._getDoc=getDoc;
|
|
| 145 |
// ── Verifica sesiune persistenta ──
|
| 146 |
const role = sessionStorage.getItem('vs_role');
|
| 147 |
if (role === 'elev') {
|
| 148 |
-
if(localStorage.getItem('sge_maintenance')==='1'){window.location.href='
|
| 149 |
} else if (role === 'profesor') {
|
| 150 |
-
if(localStorage.getItem('sge_maintenance')==='1'){window.location.href='
|
| 151 |
}
|
| 152 |
|
| 153 |
// ── Loader sequence ──
|
|
@@ -203,43 +203,45 @@ function switchRole(r, btn) {
|
|
| 203 |
if (_switching || r === role) return;
|
| 204 |
_switching = true;
|
| 205 |
|
| 206 |
-
const currentEl = document.getElementById('f-'+role);
|
| 207 |
-
const nextEl = document.getElementById('f-'+r);
|
| 208 |
|
| 209 |
-
//
|
| 210 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 211 |
currentEl.style.opacity = '0';
|
| 212 |
-
currentEl.style.transform = 'translateY(-
|
| 213 |
|
|
|
|
| 214 |
setTimeout(() => {
|
| 215 |
-
currentEl.classList.remove('show'
|
| 216 |
-
currentEl.style.
|
| 217 |
-
currentEl.style.
|
| 218 |
-
currentEl.style.
|
| 219 |
|
| 220 |
-
|
| 221 |
-
nextEl.style.
|
| 222 |
-
nextEl.style.
|
| 223 |
-
nextEl.classList.add('show'
|
| 224 |
-
nextEl.style.position = 'relative';
|
| 225 |
|
| 226 |
requestAnimationFrame(() => {
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
|
|
|
|
|
|
| 230 |
});
|
| 231 |
|
| 232 |
-
// Update tab styles
|
| 233 |
-
document.querySelectorAll('.role-tab').forEach(b => b.classList.remove('active'));
|
| 234 |
-
btn.classList.add('active');
|
| 235 |
role = r;
|
| 236 |
-
hideError('err-msg');
|
| 237 |
-
|
| 238 |
setTimeout(() => {
|
| 239 |
nextEl.style.transition = '';
|
| 240 |
_switching = false;
|
| 241 |
-
},
|
| 242 |
-
},
|
| 243 |
}
|
| 244 |
|
| 245 |
function checkElevPin() {
|
|
@@ -321,7 +323,7 @@ async function doLogin() {
|
|
| 321 |
fetch('/api/log',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({tip:'login',vpass:id,name:snap.data().nume,role:'profesor'})}).catch(()=>{});
|
| 322 |
document.getElementById('loader-text').textContent = 'ACCES ACORDAT';
|
| 323 |
await delay(400);
|
| 324 |
-
if(localStorage.getItem('sge_maintenance')==='1'){window.location.href='
|
| 325 |
|
| 326 |
} else {
|
| 327 |
// ADMIN — fara sesiune persistenta (sessionStorage doar)
|
|
|
|
| 145 |
// ── Verifica sesiune persistenta ──
|
| 146 |
const role = sessionStorage.getItem('vs_role');
|
| 147 |
if (role === 'elev') {
|
| 148 |
+
if(localStorage.getItem('sge_maintenance')==='1'){window.location.href='503.html';}else{window.location.href='elev-dashboard.html';}
|
| 149 |
} else if (role === 'profesor') {
|
| 150 |
+
if(localStorage.getItem('sge_maintenance')==='1'){window.location.href='503.html';}else{window.location.href='profesor-dashboard.html';}
|
| 151 |
}
|
| 152 |
|
| 153 |
// ── Loader sequence ──
|
|
|
|
| 203 |
if (_switching || r === role) return;
|
| 204 |
_switching = true;
|
| 205 |
|
| 206 |
+
const currentEl = document.getElementById('f-' + role);
|
| 207 |
+
const nextEl = document.getElementById('f-' + r);
|
| 208 |
|
| 209 |
+
// Update tab imediat
|
| 210 |
+
document.querySelectorAll('.role-tab').forEach(b => b.classList.remove('active'));
|
| 211 |
+
btn.classList.add('active');
|
| 212 |
+
hideError('err-msg');
|
| 213 |
+
|
| 214 |
+
// Fade OUT curent
|
| 215 |
+
currentEl.style.transition = 'opacity 0.35s ease, transform 0.35s ease';
|
| 216 |
currentEl.style.opacity = '0';
|
| 217 |
+
currentEl.style.transform = 'translateY(-8px)';
|
| 218 |
|
| 219 |
+
// După 1.5s apare următorul
|
| 220 |
setTimeout(() => {
|
| 221 |
+
currentEl.classList.remove('show');
|
| 222 |
+
currentEl.style.opacity = '';
|
| 223 |
+
currentEl.style.transform = '';
|
| 224 |
+
currentEl.style.transition= '';
|
| 225 |
|
| 226 |
+
nextEl.style.opacity = '0';
|
| 227 |
+
nextEl.style.transform = 'translateY(10px)';
|
| 228 |
+
nextEl.style.transition = 'none';
|
| 229 |
+
nextEl.classList.add('show');
|
|
|
|
| 230 |
|
| 231 |
requestAnimationFrame(() => {
|
| 232 |
+
requestAnimationFrame(() => {
|
| 233 |
+
nextEl.style.transition = 'opacity 0.4s ease, transform 0.4s ease';
|
| 234 |
+
nextEl.style.opacity = '1';
|
| 235 |
+
nextEl.style.transform = 'translateY(0)';
|
| 236 |
+
});
|
| 237 |
});
|
| 238 |
|
|
|
|
|
|
|
|
|
|
| 239 |
role = r;
|
|
|
|
|
|
|
| 240 |
setTimeout(() => {
|
| 241 |
nextEl.style.transition = '';
|
| 242 |
_switching = false;
|
| 243 |
+
}, 450);
|
| 244 |
+
}, 1500);
|
| 245 |
}
|
| 246 |
|
| 247 |
function checkElevPin() {
|
|
|
|
| 323 |
fetch('/api/log',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({tip:'login',vpass:id,name:snap.data().nume,role:'profesor'})}).catch(()=>{});
|
| 324 |
document.getElementById('loader-text').textContent = 'ACCES ACORDAT';
|
| 325 |
await delay(400);
|
| 326 |
+
if(localStorage.getItem('sge_maintenance')==='1'){window.location.href='503.html';}else{window.location.href='profesor-dashboard.html';}
|
| 327 |
|
| 328 |
} else {
|
| 329 |
// ADMIN — fara sesiune persistenta (sessionStorage doar)
|
static/profesor-dashboard.html
CHANGED
|
@@ -105,7 +105,7 @@
|
|
| 105 |
}
|
| 106 |
.file-row:hover { background: rgba(255,255,255,0.06) !important; border-color: rgba(255,255,255,0.12) !important; }
|
| 107 |
</style>
|
| 108 |
-
<script>if(localStorage.getItem('sge_maintenance')==='1'){window.location.replace('
|
| 109 |
</head>
|
| 110 |
<body>
|
| 111 |
|
|
|
|
| 105 |
}
|
| 106 |
.file-row:hover { background: rgba(255,255,255,0.06) !important; border-color: rgba(255,255,255,0.12) !important; }
|
| 107 |
</style>
|
| 108 |
+
<script>if(localStorage.getItem('sge_maintenance')==='1'){window.location.replace('503.html');}</script>
|
| 109 |
</head>
|
| 110 |
<body>
|
| 111 |
|
static/reset.html
CHANGED
|
@@ -24,7 +24,7 @@
|
|
| 24 |
.pulse-dot { width:8px; height:8px; border-radius:50%; background:rgba(255,255,255,0.4); animation:pulse 2s ease-in-out infinite; flex-shrink:0; }
|
| 25 |
@keyframes pulse { 0%,100%{opacity:0.3;transform:scale(0.8);}50%{opacity:1;transform:scale(1.2);} }
|
| 26 |
</style>
|
| 27 |
-
<script>if(localStorage.getItem('sge_maintenance')==='1'){window.location.replace('
|
| 28 |
</head>
|
| 29 |
<body>
|
| 30 |
|
|
|
|
| 24 |
.pulse-dot { width:8px; height:8px; border-radius:50%; background:rgba(255,255,255,0.4); animation:pulse 2s ease-in-out infinite; flex-shrink:0; }
|
| 25 |
@keyframes pulse { 0%,100%{opacity:0.3;transform:scale(0.8);}50%{opacity:1;transform:scale(1.2);} }
|
| 26 |
</style>
|
| 27 |
+
<script>if(localStorage.getItem('sge_maintenance')==='1'){window.location.replace('503.html');}</script>
|
| 28 |
</head>
|
| 29 |
<body>
|
| 30 |
|
static/signup.html
CHANGED
|
@@ -89,7 +89,7 @@
|
|
| 89 |
.err-code { font-size:9px; opacity:0.6; margin-right:4px; letter-spacing:1px; }
|
| 90 |
.footer-mini { text-align:center; margin-top:18px; font-size:9px; color:var(--white-faint); letter-spacing:1px; line-height:2; }
|
| 91 |
</style>
|
| 92 |
-
<script>if(localStorage.getItem('sge_maintenance')==='1'){window.location.replace('
|
| 93 |
</head>
|
| 94 |
<body>
|
| 95 |
<div class="wrap">
|
|
|
|
| 89 |
.err-code { font-size:9px; opacity:0.6; margin-right:4px; letter-spacing:1px; }
|
| 90 |
.footer-mini { text-align:center; margin-top:18px; font-size:9px; color:var(--white-faint); letter-spacing:1px; line-height:2; }
|
| 91 |
</style>
|
| 92 |
+
<script>if(localStorage.getItem('sge_maintenance')==='1'){window.location.replace('503.html');}</script>
|
| 93 |
</head>
|
| 94 |
<body>
|
| 95 |
<div class="wrap">
|