Spaces:
Running
Running
Upload 2 files
Browse files- static/app.js +0 -22
- static/style.css +2 -8
static/app.js
CHANGED
|
@@ -34,19 +34,6 @@ let facetRetryTimer = null;
|
|
| 34 |
let progressTimer = null;
|
| 35 |
let searchRequestSeq = 0;
|
| 36 |
let searchAbortController = null;
|
| 37 |
-
let viewportTimer = null;
|
| 38 |
-
|
| 39 |
-
function setViewportBottom() {
|
| 40 |
-
const viewport = window.visualViewport;
|
| 41 |
-
const bottom = viewport ? Math.max(0, window.innerHeight - viewport.height - viewport.offsetTop) : 0;
|
| 42 |
-
document.documentElement.style.setProperty("--viewport-bottom", `${Math.round(bottom)}px`);
|
| 43 |
-
}
|
| 44 |
-
|
| 45 |
-
function scheduleViewportBottom() {
|
| 46 |
-
clearTimeout(viewportTimer);
|
| 47 |
-
setViewportBottom();
|
| 48 |
-
viewportTimer = setTimeout(setViewportBottom, 120);
|
| 49 |
-
}
|
| 50 |
|
| 51 |
function escapeHTML(value) {
|
| 52 |
return String(value ?? "").replace(/[&<>"']/g, (ch) => ({
|
|
@@ -137,8 +124,6 @@ function applyStateToDom() {
|
|
| 137 |
DOM.leftSidebar.classList.toggle("expanded-wide", STATE.sidebarExpanded);
|
| 138 |
const sidebarOverlayOpen = STATE.isMobile && STATE.leftOpen;
|
| 139 |
DOM.overlay.style.display = sidebarOverlayOpen ? "block" : "none";
|
| 140 |
-
const footerLeft = STATE.isMobile || !STATE.leftOpen ? "0px" : STATE.sidebarExpanded ? "var(--sidebar-expanded-w)" : "var(--sidebar-w)";
|
| 141 |
-
document.documentElement.style.setProperty("--footer-left", footerLeft);
|
| 142 |
for (const [key, collapsed] of Object.entries(STATE.filterCollapsed)) {
|
| 143 |
const body = document.querySelector(`[data-filter-body="${key}"]`);
|
| 144 |
const toggle = document.querySelector(`[data-filter-toggle="${key}"]`);
|
|
@@ -597,12 +582,6 @@ function resetFilters() {
|
|
| 597 |
}
|
| 598 |
|
| 599 |
function attachEvents() {
|
| 600 |
-
window.addEventListener("resize", scheduleViewportBottom);
|
| 601 |
-
window.addEventListener("orientationchange", scheduleViewportBottom);
|
| 602 |
-
if (window.visualViewport) {
|
| 603 |
-
window.visualViewport.addEventListener("resize", scheduleViewportBottom);
|
| 604 |
-
window.visualViewport.addEventListener("scroll", scheduleViewportBottom);
|
| 605 |
-
}
|
| 606 |
DOM.searchForm.addEventListener("submit", (event) => {
|
| 607 |
event.preventDefault();
|
| 608 |
STATE.q = DOM.searchInput.value.trim();
|
|
@@ -814,7 +793,6 @@ function cacheDom() {
|
|
| 814 |
}
|
| 815 |
|
| 816 |
function init() {
|
| 817 |
-
setViewportBottom();
|
| 818 |
cacheDom();
|
| 819 |
STATE.isDark = localStorage.getItem("theme") !== "light";
|
| 820 |
const savedMobileMode = localStorage.getItem("mobileMode");
|
|
|
|
| 34 |
let progressTimer = null;
|
| 35 |
let searchRequestSeq = 0;
|
| 36 |
let searchAbortController = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
function escapeHTML(value) {
|
| 39 |
return String(value ?? "").replace(/[&<>"']/g, (ch) => ({
|
|
|
|
| 124 |
DOM.leftSidebar.classList.toggle("expanded-wide", STATE.sidebarExpanded);
|
| 125 |
const sidebarOverlayOpen = STATE.isMobile && STATE.leftOpen;
|
| 126 |
DOM.overlay.style.display = sidebarOverlayOpen ? "block" : "none";
|
|
|
|
|
|
|
| 127 |
for (const [key, collapsed] of Object.entries(STATE.filterCollapsed)) {
|
| 128 |
const body = document.querySelector(`[data-filter-body="${key}"]`);
|
| 129 |
const toggle = document.querySelector(`[data-filter-toggle="${key}"]`);
|
|
|
|
| 582 |
}
|
| 583 |
|
| 584 |
function attachEvents() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 585 |
DOM.searchForm.addEventListener("submit", (event) => {
|
| 586 |
event.preventDefault();
|
| 587 |
STATE.q = DOM.searchInput.value.trim();
|
|
|
|
| 793 |
}
|
| 794 |
|
| 795 |
function init() {
|
|
|
|
| 796 |
cacheDom();
|
| 797 |
STATE.isDark = localStorage.getItem("theme") !== "light";
|
| 798 |
const savedMobileMode = localStorage.getItem("mobileMode");
|
static/style.css
CHANGED
|
@@ -8,8 +8,6 @@
|
|
| 8 |
--font-mono: "SF Mono", "Cascadia Code", "Consolas", "Menlo", monospace;
|
| 9 |
|
| 10 |
--header-h: 48px;
|
| 11 |
-
--viewport-bottom: 0px;
|
| 12 |
-
|
| 13 |
--surface: #1a1c1e;
|
| 14 |
--surface-variant: #282a2d;
|
| 15 |
--surface-container: #1e2022;
|
|
@@ -101,6 +99,7 @@ body {
|
|
| 101 |
display: flex;
|
| 102 |
flex-direction: column;
|
| 103 |
height: 100vh;
|
|
|
|
| 104 |
-webkit-font-smoothing: antialiased;
|
| 105 |
-moz-osx-font-smoothing: grayscale;
|
| 106 |
}
|
|
@@ -1264,7 +1263,6 @@ body.mobile .multi-toggle { padding: 1px 4px; font-size: 11px; }
|
|
| 1264 |
flex-direction: column;
|
| 1265 |
min-height: 0;
|
| 1266 |
overflow: hidden;
|
| 1267 |
-
padding-bottom: 48px;
|
| 1268 |
}
|
| 1269 |
|
| 1270 |
.results-list {
|
|
@@ -1452,11 +1450,7 @@ body.mobile .multi-toggle { padding: 1px 4px; font-size: 11px; }
|
|
| 1452 |
font-size: 12px;
|
| 1453 |
color: var(--on-surface-variant);
|
| 1454 |
border-top: 1px solid var(--outline-variant);
|
| 1455 |
-
|
| 1456 |
-
left: var(--footer-left, 0px);
|
| 1457 |
-
right: 0;
|
| 1458 |
-
bottom: var(--viewport-bottom, 0px);
|
| 1459 |
-
z-index: 500;
|
| 1460 |
background: var(--surface-container);
|
| 1461 |
}
|
| 1462 |
|
|
|
|
| 8 |
--font-mono: "SF Mono", "Cascadia Code", "Consolas", "Menlo", monospace;
|
| 9 |
|
| 10 |
--header-h: 48px;
|
|
|
|
|
|
|
| 11 |
--surface: #1a1c1e;
|
| 12 |
--surface-variant: #282a2d;
|
| 13 |
--surface-container: #1e2022;
|
|
|
|
| 99 |
display: flex;
|
| 100 |
flex-direction: column;
|
| 101 |
height: 100vh;
|
| 102 |
+
height: 100dvh;
|
| 103 |
-webkit-font-smoothing: antialiased;
|
| 104 |
-moz-osx-font-smoothing: grayscale;
|
| 105 |
}
|
|
|
|
| 1263 |
flex-direction: column;
|
| 1264 |
min-height: 0;
|
| 1265 |
overflow: hidden;
|
|
|
|
| 1266 |
}
|
| 1267 |
|
| 1268 |
.results-list {
|
|
|
|
| 1450 |
font-size: 12px;
|
| 1451 |
color: var(--on-surface-variant);
|
| 1452 |
border-top: 1px solid var(--outline-variant);
|
| 1453 |
+
flex-shrink: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1454 |
background: var(--surface-container);
|
| 1455 |
}
|
| 1456 |
|