Spaces:
Sleeping
Sleeping
Update static/index.html
Browse files- static/index.html +12 -2
static/index.html
CHANGED
|
@@ -203,10 +203,20 @@
|
|
| 203 |
})();
|
| 204 |
|
| 205 |
// Panel toggle
|
| 206 |
-
|
| 207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 208 |
updateToggleIcon();
|
| 209 |
|
|
|
|
| 210 |
// Helpers
|
| 211 |
function escapeHtml(s){return (s||'').replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]));}
|
| 212 |
|
|
|
|
| 203 |
})();
|
| 204 |
|
| 205 |
// Panel toggle
|
| 206 |
+
// Panel toggle
|
| 207 |
+
const updateToggleIcon = () => {
|
| 208 |
+
toggle.textContent = panel.classList.contains('min') ? '▶' : '◀';
|
| 209 |
+
};
|
| 210 |
+
toggle.addEventListener('click', () => {
|
| 211 |
+
panel.classList.toggle('min');
|
| 212 |
+
updateToggleIcon();
|
| 213 |
+
});
|
| 214 |
+
|
| 215 |
+
// start minimized on load
|
| 216 |
+
panel.classList.add('min');
|
| 217 |
updateToggleIcon();
|
| 218 |
|
| 219 |
+
|
| 220 |
// Helpers
|
| 221 |
function escapeHtml(s){return (s||'').replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]));}
|
| 222 |
|