Files
gods-eye-view/src/ui/styles/news.css
T
Denis Groshev e95ae7b80c Keep the news layer inside its day and its memory bounds
From review of the news layer:
- An event's other sides older than 24 hours (or undated) are no longer
  listed, and a report dated more than 15 minutes ahead is outside the
  window, as in the regional brief.
- Picture cards are one canvas per event in a bounded cache (24), repainted
  in place when the age changes, with each card's picture dropped with it;
  the age in the key had made a new canvas every minute.
- The feed list drops reports that leave the window and is capped at 600.
- "In view" is filtered from the reports the layer already holds; it reads
  the feed only with minor news on, once per refresh, never per pan.
- Infinite scroll restarts after a filter change or a failed read.
- The two filter selects stack, so "Significant and above" is not cut off.
- The timeout tests hold the event loop until aborted, so they pass on
  Node 22 as well.
2026-11-06 00:45:25 +01:00

381 lines
7.9 KiB
CSS

/* News rail panel (#news-panel): the last 24 hours as a doom-scroll of event
cards drawn with GEV's own tokens. Colour is
severity only (the layer sets --news-color per card); never a side. The
rail owns placement and height; only the body scrolls. */
.news-panel-inner {
position: relative;
display: flex;
flex-direction: column;
gap: 8px;
min-height: 0;
max-height: 100%;
box-sizing: border-box;
padding: 14px;
border: 1px solid var(--glass-border);
border-radius: var(--panel-radius);
background: var(--glass-bg);
backdrop-filter: blur(24px) saturate(1.4);
-webkit-backdrop-filter: blur(24px) saturate(1.4);
box-shadow:
0 8px 32px rgba(0, 0, 0, 0.5),
0 0 0 1px rgba(255, 255, 255, 0.03) inset,
0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
#news-panel .panel-glow {
position: absolute;
inset: -18px;
background: radial-gradient(
ellipse at center,
rgba(0, 212, 255, 0.16) 0%,
transparent 65%
);
filter: blur(16px);
opacity: 0.25;
pointer-events: none;
}
#news-panel .panel-header {
flex: 0 0 auto;
}
#news-panel-count {
color: var(--text-secondary);
font: 9px var(--font-mono);
}
#news-panel-body {
min-height: 0;
max-height: calc(var(--right-stack-max-height, 50svh) - 64px);
overflow-y: auto;
overscroll-behavior: contain;
}
#news-panel.collapsed #news-panel-body,
#news-panel[hidden] {
display: none !important;
}
#right-context-rail > #news-panel {
position: relative;
inset: auto;
flex: 0 0 auto;
width: 100%;
max-height: 100%;
pointer-events: auto;
}
#right-context-rail > #news-panel:not(.collapsed) {
display: flex;
flex-direction: column;
flex-shrink: 1;
min-height: 0;
}
#right-context-rail.layout-focus > #news-panel:not(.collapsed) {
flex: 0 1 var(--right-panel-allocated-height);
height: var(--right-panel-allocated-height);
min-height: 0;
max-height: var(--right-panel-allocated-height);
}
#right-context-rail.layout-focus
> #news-panel:not(.collapsed)
.news-panel-inner {
height: 100%;
}
#right-context-rail[data-rail-measuring]
> #news-panel:not(.collapsed)
> .news-panel-inner {
height: auto !important;
}
#right-context-rail #news-panel.collapsed {
width: var(--right-display-collapsed-width);
margin-inline-start: auto;
}
#right-context-rail #news-panel.collapsed .news-panel-inner {
height: 50px;
min-height: 50px;
padding-bottom: 10px;
}
@media (max-width: 720px) {
#right-context-rail #news-panel.collapsed {
width: 100%;
}
}
:root[data-ui-theme='cyber'] .news-panel-inner {
border-radius: 0;
clip-path: var(--cyber-panel-frame);
box-shadow: var(--cyber-panel-shadow);
}
.news-readout {
display: flex;
flex-direction: column;
gap: 10px;
min-width: 0;
color: var(--text-primary);
font: 11px/1.4 var(--font-sans);
}
.news-readout__window,
.news-readout__head {
margin: 0;
color: var(--text-secondary);
font: 600 9px var(--font-mono);
letter-spacing: 0.12em;
text-transform: uppercase;
}
.news-readout__chips {
display: flex;
flex-wrap: wrap;
gap: 4px;
}
/* One select per row: at the rail's width two side by side cut off
"Significant and above" (and longer translations). */
.news-readout__filters {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 6px;
}
.news-filter {
min-width: 0;
}
.news-toggle {
display: flex;
align-items: center;
gap: 6px;
color: var(--text-secondary);
font-size: 10px;
cursor: pointer;
}
.news-toggle input {
accent-color: var(--accent);
}
.news-readout__section {
display: flex;
flex-direction: column;
gap: 6px;
}
.news-readout__list {
display: flex;
flex-direction: column;
gap: 6px;
margin: 0;
padding: 0;
list-style: none;
}
.news-readout__list.is-stale {
opacity: 0.5;
}
.news-readout__status,
.news-readout__empty {
color: var(--text-dim);
font: 10px var(--font-mono);
}
.news-readout__footer {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.news-card {
border: 1px solid var(--glass-border);
border-inline-start: 3px solid var(--news-color, var(--glass-border));
border-radius: 6px;
background: rgba(255, 255, 255, 0.02);
}
.news-card:hover,
.news-card.is-open {
border-color: var(--glass-border-hover);
border-inline-start-color: var(--news-color);
background: rgba(0, 212, 255, 0.06);
}
.news-card.is-unmapped .news-card__title {
color: var(--text-secondary);
}
.news-card__main {
display: grid;
grid-template-columns: 96px 1fr;
column-gap: 8px;
row-gap: 3px;
width: 100%;
padding: 6px;
border: 0;
background: transparent;
color: inherit;
font: inherit;
text-align: start;
cursor: pointer;
}
.news-card__main > :not(.news-card__thumb) {
grid-column: 1 / -1;
}
.news-card__thumb ~ * {
grid-column: 2 !important;
}
.news-card__thumb {
position: relative;
grid-row: 1 / span 5;
width: 96px;
height: 64px;
overflow: hidden;
border-radius: 4px;
background: var(--bg-dark);
}
.news-card__thumb img {
width: 100%;
height: 100%;
object-fit: cover;
}
.news-card__credit {
position: absolute;
inset-inline-end: 0;
bottom: 0;
max-width: 100%;
overflow: hidden;
padding: 0 4px;
background: rgba(0, 0, 0, 0.6);
color: var(--text-primary);
font-size: 8px;
text-overflow: ellipsis;
white-space: nowrap;
}
.news-card__title {
display: -webkit-box;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
font-size: 12px;
font-weight: 600;
line-height: 1.3;
}
.news-card__note,
.news-card__sides {
color: var(--text-secondary);
font-size: 10px;
}
.news-card__meta {
display: flex;
align-items: center;
gap: 5px;
min-width: 0;
color: var(--text-secondary);
font: 10px var(--font-mono);
}
.news-card__marker {
flex: none;
display: inline-grid;
place-items: center;
width: 14px;
height: 14px;
border: 1px solid rgba(0, 0, 0, 0.8);
border-radius: 50%;
background: var(--news-color);
}
.news-card__marker svg {
width: 9px;
height: 9px;
fill: none;
stroke: var(--bg-dark);
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
}
.news-card__marker.solid svg {
fill: var(--bg-dark);
stroke: none;
}
.news-card__chips {
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.news-chip {
padding: 1px 6px;
border: 1px solid var(--glass-border-hover);
border-radius: 999px;
color: var(--text-secondary);
font: 9px var(--font-mono);
}
.news-chip--official,
.news-chip--confirmed {
border-color: rgba(0, 212, 255, 0.45);
color: var(--text-primary);
}
.news-chip--claimed {
border-style: dashed;
}
.news-card__open {
display: flex;
flex-direction: column;
gap: 6px;
padding: 0 8px 8px;
}
.news-card__original,
.news-card__snippet {
margin: 0;
color: var(--text-primary);
font-size: 11px;
}
.news-card__original {
color: var(--text-secondary);
}
.news-card__others {
display: flex;
flex-direction: column;
gap: 3px;
margin: 0;
padding: 0;
list-style: none;
font-size: 10px;
}
.news-card__others a,
.news-card__link {
color: var(--accent);
text-decoration: none;
overflow-wrap: anywhere;
}
.news-card__others a:hover,
.news-card__link:hover {
text-decoration: underline;
}
.news-card__side {
margin-inline-end: 6px;
color: var(--text-secondary);
}
.news-card__actions {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
font: 10px var(--font-mono);
}
.news-legend {
color: var(--text-secondary);
font-size: 10px;
}
.news-legend summary {
cursor: pointer;
}
.news-legend p {
margin: 4px 0;
}
.news-legend__severity {
display: flex;
flex-wrap: wrap;
gap: 4px 10px;
margin: 4px 0;
padding: 0;
list-style: none;
}
.news-legend__severity li::before {
content: '';
display: inline-block;
width: 8px;
height: 8px;
margin-inline-end: 4px;
border-radius: 50%;
background: var(--news-color);
}
@media (prefers-reduced-motion: no-preference) {
.news-card,
.news-readout__list {
transition:
background var(--transition-fast),
border-color var(--transition-fast),
opacity var(--transition-fast);
}
}