Responsiveness adjustements, source link

This commit is contained in:
2026-05-09 11:45:13 -03:00
parent 6cf711ad97
commit 321d3ccf62
4 changed files with 111 additions and 19 deletions
+14 -12
View File
@@ -16,10 +16,6 @@ const lightboxImage = document.querySelector('#lightbox-image');
const lightboxDownload = document.querySelector('#lightbox-download'); const lightboxDownload = document.querySelector('#lightbox-download');
const lightboxId = document.querySelector('#lightbox-id'); const lightboxId = document.querySelector('#lightbox-id');
const scrollIndicator = document.querySelector('#scroll-indicator'); const scrollIndicator = document.querySelector('#scroll-indicator');
const statStatus = document.querySelector('#stat-status');
const statLatency = document.querySelector('#stat-latency');
const statNodes = document.querySelector('#stat-nodes');
const statMemes = document.querySelector('#stat-memes');
let currentPage = 0; let currentPage = 0;
let totalPages = 1; let totalPages = 1;
@@ -285,15 +281,21 @@ async function refreshStatus() {
const response = await fetch('/api/status', { cache: 'no-store' }); const response = await fetch('/api/status', { cache: 'no-store' });
const status = await response.json(); const status = await response.json();
if (!response.ok) throw new Error('status failed'); if (!response.ok) throw new Error('status failed');
statStatus.textContent = status.ok ? 'ONLINE' : 'DEGRADED'; setStat('status', status.ok ? 'ONLINE' : 'DEGRADED');
statLatency.textContent = `${Math.max(1, Math.round(performance.now() - started))}MS`; setStat('latency', `${Math.max(1, Math.round(performance.now() - started))}MS`);
statNodes.textContent = formatCount(status.liveClients); setStat('nodes', formatCount(status.liveClients));
statMemes.textContent = formatCount(status.memeCount); setStat('memes', formatCount(status.memeCount));
} catch { } catch {
statStatus.textContent = 'OFFLINE'; setStat('status', 'OFFLINE');
statLatency.textContent = '--MS'; setStat('latency', '--MS');
statNodes.textContent = '--'; setStat('nodes', '--');
statMemes.textContent = '--'; setStat('memes', '--');
}
}
function setStat(name, value) {
for (const element of document.querySelectorAll(`[data-stat="${name}"]`)) {
element.textContent = value;
} }
} }
+77 -2
View File
@@ -399,10 +399,44 @@ a {
opacity: 1; opacity: 1;
} }
.repo-footer {
display: flex;
justify-content: center;
margin-top: -8px;
padding-bottom: 8px;
}
.repo-footer a {
display: inline-flex;
align-items: center;
gap: 6px;
color: var(--outline);
font-size: 9px;
font-weight: 600;
letter-spacing: 0.12em;
opacity: 0.45;
text-decoration: none;
text-transform: uppercase;
transition: color 120ms ease, opacity 120ms ease;
}
.repo-footer a:hover,
.repo-footer a:focus-visible {
color: var(--primary-dim);
opacity: 0.85;
}
.repo-footer img {
width: auto;
height: 20px;
object-fit: contain;
opacity: 0.8;
}
.side-terminal { .side-terminal {
position: fixed; position: fixed;
left: 16px; left: 16px;
top: 50%; top: calc(64px + (100vh - 64px) / 2);
transform: translateY(-50%); transform: translateY(-50%);
width: 192px; width: 192px;
padding-left: 8px; padding-left: 8px;
@@ -419,10 +453,31 @@ a {
text-decoration: underline; text-decoration: underline;
} }
.terminal-strip {
display: none;
margin-top: 0;
padding: 10px 0;
color: var(--outline);
font-size: 10px;
font-weight: 600;
letter-spacing: 0.1em;
text-transform: uppercase;
}
.terminal-strip strong {
color: var(--muted);
font-weight: 600;
}
.terminal-strip .active {
color: var(--primary-dim);
text-decoration: underline;
}
.scroll-indicator { .scroll-indicator {
position: fixed; position: fixed;
right: 16px; right: 16px;
top: 50%; top: calc(64px + (100vh - 64px) / 2);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 8px; gap: 8px;
@@ -635,6 +690,25 @@ dialog::backdrop {
} }
} }
@media (max-width: 1759px) and (min-width: 901px) {
.side-terminal {
display: none;
}
.terminal-strip {
display: flex;
flex-wrap: wrap;
gap: 8px 20px;
align-items: center;
}
}
@media (min-width: 1760px) {
.terminal-strip {
display: none;
}
}
@media (max-width: 900px) { @media (max-width: 900px) {
.topbar, .topbar,
.shell { .shell {
@@ -647,6 +721,7 @@ dialog::backdrop {
} }
.side-terminal, .side-terminal,
.terminal-strip,
.scroll-indicator { .scroll-indicator {
display: none; display: none;
} }
Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

+20 -5
View File
@@ -22,20 +22,35 @@
<span class="live"><span class="pulse"></span>LIVE_FEED</span> <span class="live"><span class="pulse"></span>LIVE_FEED</span>
</div> </div>
<aside class="terminal-strip" aria-live="polite">
<span>STATUS: <strong data-stat="status">SYNCING</strong></span>
<span>LATENCY: <strong data-stat="latency">--MS</strong></span>
<span>NODES: <strong data-stat="nodes">--</strong></span>
<span>MEMES: <strong data-stat="memes">--</strong></span>
<span class="active">MEMETICALLY_ACTIVE</span>
</aside>
<section class="meme-grid" id="meme-grid" aria-label="Meme feed"></section> <section class="meme-grid" id="meme-grid" aria-label="Meme feed"></section>
<div class="feed-loader" id="feed-loader" aria-live="polite"> <div class="feed-loader" id="feed-loader" aria-live="polite">
<div class="loader-ring" aria-hidden="true"></div> <div class="loader-ring" aria-hidden="true"></div>
<span id="feed-loader-label">FETCHING_NEXT_BLOCK...</span> <span id="feed-loader-label">FETCHING_NEXT_BLOCK...</span>
</div> </div>
<footer class="repo-footer">
<a href="https://git.yoonect.com/Nautilus/bitsforfree" rel="noopener noreferrer" target="_blank">
<img src="/assets/yoonect-logo.png" alt="" aria-hidden="true">
<span>SOURCE</span>
</a>
</footer>
</main> </main>
<aside class="side-terminal" aria-live="polite"> <aside class="side-terminal" aria-live="polite">
<div>STATUS: <span id="stat-status">SYNCING</span></div> <div>STATUS: <span data-stat="status">SYNCING</span></div>
<div>LATENCY: <span id="stat-latency">--MS</span></div> <div>LATENCY: <span data-stat="latency">--MS</span></div>
<div>NODES: <span id="stat-nodes">--</span></div> <div>NODES: <span data-stat="nodes">--</span></div>
<div>MEMES: <span id="stat-memes">--</span></div> <div>MEMES: <span data-stat="memes">--</span></div>
<div class="active" id="stat-pun">MEMETICALLY_ACTIVE</div> <div class="active">MEMETICALLY_ACTIVE</div>
</aside> </aside>
<div class="scroll-indicator" id="scroll-indicator" aria-hidden="true"> <div class="scroll-indicator" id="scroll-indicator" aria-hidden="true">