Spaces:
Running
Running
Update index.html
Browse files- index.html +128 -57
index.html
CHANGED
|
@@ -3,16 +3,17 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>
|
| 7 |
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 8 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 9 |
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;700&display=swap" rel="stylesheet">
|
| 10 |
|
| 11 |
<style>
|
| 12 |
:root {
|
| 13 |
-
--metal: #
|
| 14 |
-
--brass: #
|
| 15 |
-
--etch: #
|
|
|
|
| 16 |
}
|
| 17 |
|
| 18 |
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
@@ -23,6 +24,17 @@
|
|
| 23 |
font-family: 'Space Grotesk', sans-serif;
|
| 24 |
min-height: 100vh;
|
| 25 |
padding: 40px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
}
|
| 27 |
|
| 28 |
.container { width: 100%; max-width: 100%; }
|
|
@@ -36,118 +48,156 @@
|
|
| 36 |
align-items: center;
|
| 37 |
}
|
| 38 |
|
| 39 |
-
h1 {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
.add-btn {
|
| 42 |
-
background: none;
|
| 43 |
-
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
}
|
| 46 |
-
.add-btn:hover { background: var(--brass); color: #000; }
|
| 47 |
|
| 48 |
-
/* Grid
|
| 49 |
.exams-grid {
|
| 50 |
display: grid;
|
| 51 |
-
grid-template-columns: repeat(auto-fill, minmax(
|
| 52 |
-
gap:
|
| 53 |
width: 100%;
|
|
|
|
| 54 |
}
|
| 55 |
|
| 56 |
-
/* 4x3 Rectangular Plate */
|
| 57 |
.brushed-plate {
|
| 58 |
position: relative;
|
| 59 |
-
background: #
|
| 60 |
border: 1px solid var(--etch);
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
|
| 64 |
cursor: pointer;
|
| 65 |
-
aspect-ratio: 4 / 3;
|
| 66 |
display: flex;
|
| 67 |
flex-direction: column;
|
| 68 |
justify-content: space-between;
|
|
|
|
|
|
|
| 69 |
}
|
| 70 |
|
|
|
|
| 71 |
.brushed-plate:hover {
|
| 72 |
border-color: var(--brass);
|
| 73 |
-
|
| 74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
}
|
| 76 |
|
| 77 |
.card-header {
|
| 78 |
-
font-weight:
|
| 79 |
letter-spacing: 0.2em;
|
| 80 |
text-transform: uppercase;
|
| 81 |
color: var(--brass);
|
| 82 |
-
font-size:
|
| 83 |
-
border-left:
|
| 84 |
padding-left: 15px;
|
| 85 |
}
|
| 86 |
|
| 87 |
.digit-flipper {
|
| 88 |
-
font-size: clamp(
|
| 89 |
font-weight: 700;
|
| 90 |
line-height: 0.8;
|
| 91 |
color: #fff;
|
| 92 |
margin: 20px 0;
|
|
|
|
| 93 |
}
|
| 94 |
|
| 95 |
.label-text {
|
| 96 |
-
font-size: 0.
|
| 97 |
-
letter-spacing: 0.
|
| 98 |
opacity: 0.4;
|
| 99 |
text-transform: uppercase;
|
| 100 |
-
margin-top: 10px;
|
| 101 |
}
|
| 102 |
|
| 103 |
footer {
|
| 104 |
font-family: monospace;
|
| 105 |
-
opacity: 0.
|
| 106 |
-
letter-spacing:
|
| 107 |
-
font-size:
|
| 108 |
text-transform: uppercase;
|
|
|
|
| 109 |
}
|
| 110 |
|
| 111 |
.del {
|
| 112 |
position: absolute; top: 20px; right: 20px;
|
| 113 |
-
color: #
|
| 114 |
cursor: pointer; font-size: 1.5rem; transition: 0.3s;
|
|
|
|
|
|
|
| 115 |
}
|
| 116 |
-
.del:hover { color: #ff4b2b; }
|
| 117 |
|
| 118 |
/* Modal Styles */
|
| 119 |
.modal {
|
| 120 |
display: none; position: fixed; inset: 0;
|
| 121 |
-
background: rgba(0,0,0,0.
|
| 122 |
align-items: center; justify-content: center; padding: 20px;
|
|
|
|
| 123 |
}
|
| 124 |
.modal.active { display: flex; }
|
| 125 |
-
.modal-box {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
|
| 127 |
input, textarea {
|
| 128 |
width: 100%; background: #000; border: 1px solid var(--etch);
|
| 129 |
padding: 20px; color: #fff; font-family: inherit;
|
| 130 |
margin: 20px 0; outline: none; font-size: 1rem;
|
| 131 |
}
|
| 132 |
-
input:focus
|
| 133 |
|
| 134 |
.action-btn {
|
| 135 |
background: var(--brass); color: #000; border: none;
|
| 136 |
padding: 20px; width: 100%; font-weight: 700;
|
| 137 |
-
cursor: pointer; text-transform: uppercase; letter-spacing:
|
| 138 |
}
|
| 139 |
|
| 140 |
-
@media (max-width:
|
| 141 |
-
.exams-grid { grid-template-columns: 1fr; gap:
|
| 142 |
-
|
| 143 |
}
|
| 144 |
</style>
|
| 145 |
</head>
|
| 146 |
<body>
|
| 147 |
<div class="container">
|
| 148 |
<header>
|
| 149 |
-
<h1>
|
| 150 |
-
<button class="add-btn" id="openBtn">
|
| 151 |
</header>
|
| 152 |
<div id="examsGrid" class="exams-grid"></div>
|
| 153 |
</div>
|
|
@@ -155,22 +205,22 @@
|
|
| 155 |
<!-- Modals -->
|
| 156 |
<div class="modal" id="addModal">
|
| 157 |
<div class="modal-box">
|
| 158 |
-
<h2 style="color: var(--brass); letter-spacing:
|
| 159 |
<form id="addForm">
|
| 160 |
-
<input type="text" id="nameIn" placeholder="
|
| 161 |
<input type="date" id="dateIn" required>
|
| 162 |
-
<button type="submit" class="action-btn">
|
| 163 |
</form>
|
| 164 |
</div>
|
| 165 |
</div>
|
| 166 |
|
| 167 |
<div class="modal" id="syllModal">
|
| 168 |
-
<div class="modal-box" style="max-width:
|
| 169 |
-
<h2 id="syllTitle" style="color: var(--brass); font-weight: 300;"></h2>
|
| 170 |
<form id="syllForm">
|
| 171 |
-
<textarea id="syllArea" rows="
|
| 172 |
<input type="hidden" id="syllId">
|
| 173 |
-
<button type="submit" class="action-btn">
|
| 174 |
</form>
|
| 175 |
</div>
|
| 176 |
</div>
|
|
@@ -208,26 +258,47 @@
|
|
| 208 |
const diff = Math.ceil((target - now) / 86400000);
|
| 209 |
|
| 210 |
let val = diff < 0 ? 'OK' : diff;
|
| 211 |
-
let label = diff < 0 ? '
|
| 212 |
|
| 213 |
return `
|
| 214 |
-
<div class="brushed-plate" onclick="showSyll('${e.id}')">
|
| 215 |
<button class="del" onclick="event.stopPropagation(); window.delEx('${e.id}')">×</button>
|
| 216 |
-
<div class="card-
|
| 217 |
-
|
| 218 |
-
<div
|
| 219 |
-
|
|
|
|
|
|
|
|
|
|
| 220 |
</div>
|
| 221 |
-
<footer>${new Date(e.date).toDateString()}</footer>
|
| 222 |
</div>`;
|
| 223 |
}).join('');
|
| 224 |
}
|
| 225 |
|
| 226 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 227 |
|
| 228 |
window.showSyll = (id) => {
|
| 229 |
const e = dataStore.find(x => x.id === id);
|
| 230 |
-
document.getElementById('syllTitle').innerText = e.name
|
| 231 |
document.getElementById('syllArea').value = e.syllabus || '';
|
| 232 |
document.getElementById('syllId').value = id;
|
| 233 |
document.getElementById('syllModal').classList.add('active');
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Neural Exam Interface</title>
|
| 7 |
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 8 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 9 |
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;700&display=swap" rel="stylesheet">
|
| 10 |
|
| 11 |
<style>
|
| 12 |
:root {
|
| 13 |
+
--metal: #050506;
|
| 14 |
+
--brass: #00d4ff; /* Switched to a Sci-Fi Cyan, or keep #c5a059 if you prefer gold */
|
| 15 |
+
--etch: #1a1a1c;
|
| 16 |
+
--glow: rgba(0, 212, 255, 0.3);
|
| 17 |
}
|
| 18 |
|
| 19 |
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
|
|
| 24 |
font-family: 'Space Grotesk', sans-serif;
|
| 25 |
min-height: 100vh;
|
| 26 |
padding: 40px;
|
| 27 |
+
overflow-x: hidden;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
/* Background Detail */
|
| 31 |
+
body::before {
|
| 32 |
+
content: "";
|
| 33 |
+
position: fixed;
|
| 34 |
+
top: 0; left: 0; width: 100%; height: 100%;
|
| 35 |
+
background-image: radial-gradient(circle at 2px 2px, #111 1px, transparent 0);
|
| 36 |
+
background-size: 40px 40px;
|
| 37 |
+
z-index: -1;
|
| 38 |
}
|
| 39 |
|
| 40 |
.container { width: 100%; max-width: 100%; }
|
|
|
|
| 48 |
align-items: center;
|
| 49 |
}
|
| 50 |
|
| 51 |
+
h1 {
|
| 52 |
+
font-weight: 300;
|
| 53 |
+
letter-spacing: 0.5em;
|
| 54 |
+
text-transform: uppercase;
|
| 55 |
+
color: var(--brass);
|
| 56 |
+
font-size: 1.1rem;
|
| 57 |
+
text-shadow: 0 0 10px var(--glow);
|
| 58 |
+
}
|
| 59 |
|
| 60 |
.add-btn {
|
| 61 |
+
background: none;
|
| 62 |
+
border: 1px solid var(--brass);
|
| 63 |
+
color: var(--brass);
|
| 64 |
+
padding: 12px 30px;
|
| 65 |
+
cursor: pointer;
|
| 66 |
+
font-family: inherit;
|
| 67 |
+
font-size: 0.75rem;
|
| 68 |
+
transition: 0.3s;
|
| 69 |
+
letter-spacing: 3px;
|
| 70 |
+
box-shadow: inset 0 0 0 0 var(--glow);
|
| 71 |
+
}
|
| 72 |
+
.add-btn:hover {
|
| 73 |
+
background: var(--brass);
|
| 74 |
+
color: #000;
|
| 75 |
+
box-shadow: 0 0 20px var(--glow);
|
| 76 |
}
|
|
|
|
| 77 |
|
| 78 |
+
/* Grid */
|
| 79 |
.exams-grid {
|
| 80 |
display: grid;
|
| 81 |
+
grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
|
| 82 |
+
gap: 80px;
|
| 83 |
width: 100%;
|
| 84 |
+
perspective: 2000px; /* Essential for 3D */
|
| 85 |
}
|
| 86 |
|
| 87 |
+
/* 4x3 Rectangular Plate with 3D Effect */
|
| 88 |
.brushed-plate {
|
| 89 |
position: relative;
|
| 90 |
+
background: #0d0d0f;
|
| 91 |
border: 1px solid var(--etch);
|
| 92 |
+
padding: 45px;
|
| 93 |
+
transition: transform 0.2s ease-out, border-color 0.3s, box-shadow 0.3s;
|
|
|
|
| 94 |
cursor: pointer;
|
| 95 |
+
aspect-ratio: 4 / 3;
|
| 96 |
display: flex;
|
| 97 |
flex-direction: column;
|
| 98 |
justify-content: space-between;
|
| 99 |
+
transform-style: preserve-3d;
|
| 100 |
+
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
|
| 101 |
}
|
| 102 |
|
| 103 |
+
/* Hover state - handled by JS for tilt, but fallback here */
|
| 104 |
.brushed-plate:hover {
|
| 105 |
border-color: var(--brass);
|
| 106 |
+
box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 15px var(--glow);
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
/* 3D Inner Elements */
|
| 110 |
+
.card-content {
|
| 111 |
+
transform: translateZ(50px); /* Makes content "pop" off the plate */
|
| 112 |
+
height: 100%;
|
| 113 |
+
display: flex;
|
| 114 |
+
flex-direction: column;
|
| 115 |
+
justify-content: space-between;
|
| 116 |
+
pointer-events: none;
|
| 117 |
}
|
| 118 |
|
| 119 |
.card-header {
|
| 120 |
+
font-weight: 700;
|
| 121 |
letter-spacing: 0.2em;
|
| 122 |
text-transform: uppercase;
|
| 123 |
color: var(--brass);
|
| 124 |
+
font-size: 0.9rem;
|
| 125 |
+
border-left: 2px solid var(--brass);
|
| 126 |
padding-left: 15px;
|
| 127 |
}
|
| 128 |
|
| 129 |
.digit-flipper {
|
| 130 |
+
font-size: clamp(6rem, 14vw, 10rem);
|
| 131 |
font-weight: 700;
|
| 132 |
line-height: 0.8;
|
| 133 |
color: #fff;
|
| 134 |
margin: 20px 0;
|
| 135 |
+
filter: drop-shadow(0 0 15px rgba(255,255,255,0.1));
|
| 136 |
}
|
| 137 |
|
| 138 |
.label-text {
|
| 139 |
+
font-size: 0.8rem;
|
| 140 |
+
letter-spacing: 0.6em;
|
| 141 |
opacity: 0.4;
|
| 142 |
text-transform: uppercase;
|
|
|
|
| 143 |
}
|
| 144 |
|
| 145 |
footer {
|
| 146 |
font-family: monospace;
|
| 147 |
+
opacity: 0.6;
|
| 148 |
+
letter-spacing: 3px;
|
| 149 |
+
font-size: 1.1rem; /* Larger Date */
|
| 150 |
text-transform: uppercase;
|
| 151 |
+
color: var(--brass);
|
| 152 |
}
|
| 153 |
|
| 154 |
.del {
|
| 155 |
position: absolute; top: 20px; right: 20px;
|
| 156 |
+
color: #333; background: none; border: none;
|
| 157 |
cursor: pointer; font-size: 1.5rem; transition: 0.3s;
|
| 158 |
+
z-index: 10;
|
| 159 |
+
transform: translateZ(20px);
|
| 160 |
}
|
| 161 |
+
.del:hover { color: #ff4b2b; transform: translateZ(30px) scale(1.2); }
|
| 162 |
|
| 163 |
/* Modal Styles */
|
| 164 |
.modal {
|
| 165 |
display: none; position: fixed; inset: 0;
|
| 166 |
+
background: rgba(0,0,0,0.95); z-index: 100;
|
| 167 |
align-items: center; justify-content: center; padding: 20px;
|
| 168 |
+
backdrop-filter: blur(10px);
|
| 169 |
}
|
| 170 |
.modal.active { display: flex; }
|
| 171 |
+
.modal-box {
|
| 172 |
+
background: #0d0d0f; border: 1px solid var(--brass);
|
| 173 |
+
padding: 60px; width: 100%; max-width: 600px;
|
| 174 |
+
box-shadow: 0 0 50px var(--glow);
|
| 175 |
+
}
|
| 176 |
|
| 177 |
input, textarea {
|
| 178 |
width: 100%; background: #000; border: 1px solid var(--etch);
|
| 179 |
padding: 20px; color: #fff; font-family: inherit;
|
| 180 |
margin: 20px 0; outline: none; font-size: 1rem;
|
| 181 |
}
|
| 182 |
+
input:focus { border-color: var(--brass); }
|
| 183 |
|
| 184 |
.action-btn {
|
| 185 |
background: var(--brass); color: #000; border: none;
|
| 186 |
padding: 20px; width: 100%; font-weight: 700;
|
| 187 |
+
cursor: pointer; text-transform: uppercase; letter-spacing: 4px;
|
| 188 |
}
|
| 189 |
|
| 190 |
+
@media (max-width: 700px) {
|
| 191 |
+
.exams-grid { grid-template-columns: 1fr; gap: 40px; }
|
| 192 |
+
.brushed-plate { aspect-ratio: auto; min-height: 400px; }
|
| 193 |
}
|
| 194 |
</style>
|
| 195 |
</head>
|
| 196 |
<body>
|
| 197 |
<div class="container">
|
| 198 |
<header>
|
| 199 |
+
<h1>NEURAL_EXAM_INTERFACE_v4.0</h1>
|
| 200 |
+
<button class="add-btn" id="openBtn">INITIALIZE_DATA_LINK</button>
|
| 201 |
</header>
|
| 202 |
<div id="examsGrid" class="exams-grid"></div>
|
| 203 |
</div>
|
|
|
|
| 205 |
<!-- Modals -->
|
| 206 |
<div class="modal" id="addModal">
|
| 207 |
<div class="modal-box">
|
| 208 |
+
<h2 style="color: var(--brass); letter-spacing: 5px; font-weight: 300; margin-bottom: 20px;">SYNC_NEW_NODE</h2>
|
| 209 |
<form id="addForm">
|
| 210 |
+
<input type="text" id="nameIn" placeholder="NODE_IDENTIFIER" required>
|
| 211 |
<input type="date" id="dateIn" required>
|
| 212 |
+
<button type="submit" class="action-btn">ESTABLISH_LINK</button>
|
| 213 |
</form>
|
| 214 |
</div>
|
| 215 |
</div>
|
| 216 |
|
| 217 |
<div class="modal" id="syllModal">
|
| 218 |
+
<div class="modal-box" style="max-width: 900px;">
|
| 219 |
+
<h2 id="syllTitle" style="color: var(--brass); font-weight: 300; letter-spacing: 2px;"></h2>
|
| 220 |
<form id="syllForm">
|
| 221 |
+
<textarea id="syllArea" rows="15" placeholder="DECRYPTING_SYLLABUS_DATA..."></textarea>
|
| 222 |
<input type="hidden" id="syllId">
|
| 223 |
+
<button type="submit" class="action-btn">UPDATE_CORE_MEMORY</button>
|
| 224 |
</form>
|
| 225 |
</div>
|
| 226 |
</div>
|
|
|
|
| 258 |
const diff = Math.ceil((target - now) / 86400000);
|
| 259 |
|
| 260 |
let val = diff < 0 ? 'OK' : diff;
|
| 261 |
+
let label = diff < 0 ? 'MISSION_COMPLETE' : (diff === 1 ? 'CYCLE_REMAINING' : 'CYCLES_REMAINING');
|
| 262 |
|
| 263 |
return `
|
| 264 |
+
<div class="brushed-plate" onmousemove="tilt(event, this)" onmouseleave="resetTilt(this)" onclick="showSyll('${e.id}')">
|
| 265 |
<button class="del" onclick="event.stopPropagation(); window.delEx('${e.id}')">×</button>
|
| 266 |
+
<div class="card-content">
|
| 267 |
+
<div class="card-header">${e.name}</div>
|
| 268 |
+
<div>
|
| 269 |
+
<div class="digit-flipper">${val}</div>
|
| 270 |
+
<div class="label-text">${label}</div>
|
| 271 |
+
</div>
|
| 272 |
+
<footer>${new Date(e.date).toLocaleDateString('en-US', {month: 'long', day: 'numeric', year: 'numeric'})}</footer>
|
| 273 |
</div>
|
|
|
|
| 274 |
</div>`;
|
| 275 |
}).join('');
|
| 276 |
}
|
| 277 |
|
| 278 |
+
// --- 3D Tilt Logic ---
|
| 279 |
+
window.tilt = (e, card) => {
|
| 280 |
+
const rect = card.getBoundingClientRect();
|
| 281 |
+
const x = e.clientX - rect.left;
|
| 282 |
+
const y = e.clientY - rect.top;
|
| 283 |
+
|
| 284 |
+
const centerX = rect.width / 2;
|
| 285 |
+
const centerY = rect.height / 2;
|
| 286 |
+
|
| 287 |
+
const rotateX = (y - centerY) / 10;
|
| 288 |
+
const rotateY = (centerX - x) / 10;
|
| 289 |
+
|
| 290 |
+
card.style.transform = `rotateX(${rotateX}deg) rotateY(${rotateY}deg) translateY(-10px)`;
|
| 291 |
+
};
|
| 292 |
+
|
| 293 |
+
window.resetTilt = (card) => {
|
| 294 |
+
card.style.transform = `rotateX(0deg) rotateY(0deg) translateY(0px)`;
|
| 295 |
+
};
|
| 296 |
+
|
| 297 |
+
window.delEx = (id) => { if(confirm("DESTRUCT NODE?")) remove(ref(database, `exams/${id}`)); };
|
| 298 |
|
| 299 |
window.showSyll = (id) => {
|
| 300 |
const e = dataStore.find(x => x.id === id);
|
| 301 |
+
document.getElementById('syllTitle').innerText = `ACCESSING_FILE: ${e.name}`;
|
| 302 |
document.getElementById('syllArea').value = e.syllabus || '';
|
| 303 |
document.getElementById('syllId').value = id;
|
| 304 |
document.getElementById('syllModal').classList.add('active');
|