Files
planet/frontend/public/earth/css/news-panel.css
linkong f14ff6ec0f
Some checks failed
ci / backend (push) Has been cancelled
ci / frontend (push) Has been cancelled
ci / delivery (push) Has been cancelled
release / images (push) Has been cancelled
release: bump version to 0.56.0
2026-05-13 18:21:03 +08:00

428 lines
10 KiB
CSS

/* news-panel.css */
.earth-news-ticker {
--news-ticker-width: min(calc(820px * var(--hud-scale)), 58vw);
position: absolute;
top: calc(var(--hud-offset) + calc(2px * var(--hud-scale)));
left: 50%;
transform: translateX(-50%);
width: var(--news-ticker-width);
height: calc(38px * var(--hud-scale));
border: 0;
border-top: 1px solid var(--hud-border);
border-bottom: 1px solid var(--hud-border);
border-radius: 0;
padding: 0 calc(18px * var(--hud-scale));
display: grid;
grid-template-columns: auto minmax(0, 1fr);
align-items: center;
gap: calc(12px * var(--hud-scale));
color: var(--hud-text);
background:
linear-gradient(90deg, transparent 0%, rgba(17, 31, 53, 0.82) 11%, rgba(7, 17, 31, 0.78) 89%, transparent 100%),
radial-gradient(circle at 50% -80%, rgba(145, 186, 255, 0.18), transparent 58%);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.08),
inset 0 -1px 0 rgba(255, 255, 255, 0.03),
0 14px 34px rgba(1, 7, 16, 0.22);
backdrop-filter: blur(16px) saturate(122%);
-webkit-backdrop-filter: blur(16px) saturate(122%);
cursor: pointer;
z-index: 24;
overflow: hidden;
transition: opacity 0.18s ease, transform 0.24s ease;
}
.earth-news-ticker.is-hidden {
opacity: 0;
pointer-events: none;
}
.earth-news-ticker::before,
.earth-news-ticker::after {
content: "";
position: absolute;
top: -1px;
bottom: -1px;
width: calc(96px * var(--hud-scale));
pointer-events: none;
z-index: 2;
}
.earth-news-ticker::before {
left: 0;
background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(8, 18, 32, 0.08));
}
.earth-news-ticker::after {
right: 0;
background: linear-gradient(270deg, rgba(0, 0, 0, 0), rgba(8, 18, 32, 0.08));
}
.earth-news-ticker__region {
position: relative;
z-index: 3;
color: var(--hud-accent-strong);
font-size: calc(0.66rem * var(--hud-scale));
font-weight: 800;
letter-spacing: 0.12em;
text-transform: uppercase;
white-space: nowrap;
}
.earth-news-ticker__viewport {
min-width: 0;
overflow: hidden;
-webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 9%, #000 91%, transparent 100%);
mask-image: linear-gradient(90deg, transparent 0%, #000 9%, #000 91%, transparent 100%);
}
.earth-news-ticker__track {
display: inline-flex;
align-items: center;
gap: calc(30px * var(--hud-scale));
min-width: max-content;
color: rgba(232, 242, 252, 0.92);
font-size: calc(0.84rem * var(--hud-scale));
font-weight: 600;
line-height: 1;
white-space: nowrap;
animation: earthNewsTickerScroll var(--news-ticker-duration, 28s) linear infinite;
}
.earth-news-ticker:hover .earth-news-ticker__track,
.earth-news-ticker:focus-visible .earth-news-ticker__track {
animation-play-state: paused;
}
.earth-news-ticker__item {
display: inline-flex;
align-items: center;
gap: calc(8px * var(--hud-scale));
}
.earth-news-ticker__source {
color: var(--hud-text-soft);
font-size: calc(0.64rem * var(--hud-scale));
letter-spacing: 0.08em;
text-transform: uppercase;
}
.earth-news-hud {
position: fixed;
left: 50%;
top: max(calc(86px * var(--hud-scale)), 10vh);
transform: translateX(-50%);
width: min(calc(720px * var(--hud-scale)), calc(100vw - 40px));
height: min(calc(660px * var(--hud-scale)), calc(100vh - 140px));
padding: calc(14px * var(--hud-scale));
display: flex;
flex-direction: column;
gap: var(--hud-gap-sm);
z-index: 220;
min-width: calc(420px * var(--hud-scale));
min-height: calc(360px * var(--hud-scale));
}
.earth-news-hud.hud-panel-hidden {
display: none;
}
.earth-news-hud.is-morphing {
display: flex;
overflow: hidden;
min-width: 0;
min-height: 0;
transition:
left 0.28s cubic-bezier(0.22, 1, 0.36, 1),
top 0.28s cubic-bezier(0.22, 1, 0.36, 1),
width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
opacity 0.2s ease;
}
.earth-news-hud.is-morphing > * {
opacity: 0;
}
.earth-news-hud.is-resizing {
transition: none !important;
user-select: none;
}
.earth-news-hud__header {
flex: 0 0 auto;
}
.earth-news-hud__body {
flex: 1 1 auto;
min-height: 0;
display: flex;
}
.earth-news-hud-edge {
position: absolute;
z-index: 10;
}
.earth-news-hud-edge[data-edge="r"] {
right: 0;
top: calc(12px * var(--hud-scale));
bottom: calc(12px * var(--hud-scale));
width: calc(6px * var(--hud-scale));
cursor: ew-resize;
}
.earth-news-hud-edge[data-edge="b"] {
bottom: 0;
left: calc(12px * var(--hud-scale));
right: calc(12px * var(--hud-scale));
height: calc(6px * var(--hud-scale));
cursor: ns-resize;
}
.earth-news-hud-edge[data-edge="l"] {
left: 0;
top: calc(12px * var(--hud-scale));
bottom: calc(12px * var(--hud-scale));
width: calc(6px * var(--hud-scale));
cursor: ew-resize;
}
.earth-news-hud-edge[data-edge="br"] {
right: 0;
bottom: 0;
width: calc(20px * var(--hud-scale));
height: calc(20px * var(--hud-scale));
cursor: nwse-resize;
}
.earth-news-hud-edge[data-edge="bl"] {
left: 0;
bottom: 0;
width: calc(20px * var(--hud-scale));
height: calc(20px * var(--hud-scale));
cursor: nesw-resize;
}
.earth-news-hud-edge[data-edge="br"]::before {
content: "";
position: absolute;
inset: calc(4px * var(--hud-scale));
border-right: 2px solid rgba(223, 235, 248, 0.4);
border-bottom: 2px solid rgba(223, 235, 248, 0.4);
transition: border-color 0.18s ease;
}
.earth-news-hud-edge[data-edge="br"]:hover::before {
border-color: rgba(244, 249, 255, 0.75);
}
@keyframes earthNewsTickerScroll {
from {
transform: translateX(0);
}
to {
transform: translateX(-50%);
}
}
.news-panel-title-row {
display: flex;
align-items: center;
min-width: 0;
flex: 1 1 auto;
}
.news-region-chip {
--news-accent: #d6e6ff;
border: 1px solid color-mix(in srgb, var(--news-accent) 46%, transparent);
border-radius: 999px;
padding: calc(3px * var(--hud-scale)) calc(8px * var(--hud-scale));
color: color-mix(in srgb, var(--news-accent) 82%, white);
background: color-mix(in srgb, var(--news-accent) 12%, transparent);
font-size: calc(0.62rem * var(--hud-scale));
letter-spacing: 0.08em;
text-transform: uppercase;
}
.news-panel-subtitle {
color: var(--hud-text-soft);
font-size: calc(0.7rem * var(--hud-scale));
}
.news-panel-body {
display: flex;
flex: 1 1 auto;
flex-direction: column;
gap: var(--hud-gap-sm);
min-height: 0;
overflow: hidden;
}
.earth-news-hud .news-panel-body {
width: 100%;
}
.news-panel-focus {
display: grid;
grid-template-columns: 1fr auto;
gap: calc(10px * var(--hud-scale));
padding: calc(12px * var(--hud-scale));
border-radius: calc(16px * var(--hud-scale));
background:
radial-gradient(circle at 16% 18%, rgba(123, 205, 255, 0.12), transparent 36%),
linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(104, 166, 232, 0.04));
border: 1px solid rgba(205, 231, 255, 0.08);
}
.news-focus-kicker,
.news-board-status {
color: var(--hud-text-soft);
font-size: calc(0.66rem * var(--hud-scale));
letter-spacing: 0.08em;
text-transform: uppercase;
}
.news-focus-label {
margin-top: calc(4px * var(--hud-scale));
color: var(--hud-text);
font-size: calc(1rem * var(--hud-scale));
font-weight: 600;
}
.news-focus-coords {
margin-top: calc(3px * var(--hud-scale));
color: var(--hud-text-muted);
font-size: calc(0.74rem * var(--hud-scale));
}
.news-source-count {
align-self: start;
color: var(--hud-accent-strong);
font-size: calc(0.72rem * var(--hud-scale));
}
.news-board {
display: flex;
flex: 1 1 auto;
flex-direction: column;
gap: var(--hud-gap-sm);
min-height: 0;
overflow: hidden;
}
.news-board-list {
display: flex;
flex: 1 1 auto;
flex-direction: column;
gap: calc(8px * var(--hud-scale));
min-height: 0;
max-height: none;
overflow-y: auto;
padding-right: calc(4px * var(--hud-scale));
scrollbar-width: thin;
scrollbar-color: rgba(160, 220, 255, 0.36) transparent;
}
.news-board-list::-webkit-scrollbar {
width: 6px;
}
.news-board-list::-webkit-scrollbar-track {
background: transparent;
}
.news-board-list::-webkit-scrollbar-thumb {
background: linear-gradient(180deg, rgba(210, 237, 255, 0.24), rgba(110, 176, 255, 0.28));
border-radius: 999px;
}
.news-story-card {
display: flex;
flex-direction: column;
gap: calc(8px * var(--hud-scale));
text-decoration: none;
padding: calc(12px * var(--hud-scale));
border-radius: calc(16px * var(--hud-scale));
border: 1px solid rgba(201, 225, 247, 0.08);
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(92, 151, 218, 0.03));
transition:
border-color 0.18s ease,
background 0.18s ease,
transform 0.18s ease;
}
.news-story-card:hover {
border-color: rgba(214, 235, 255, 0.16);
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(92, 151, 218, 0.06));
transform: translateY(-1px);
}
.news-story-card--focus {
border-color: rgba(127, 219, 255, 0.22);
box-shadow: 0 0 0 1px rgba(122, 214, 255, 0.08) inset;
}
.news-story-card--cruise {
border-color: rgba(255, 213, 128, 0.42);
background:
linear-gradient(180deg, rgba(255, 248, 220, 0.1), rgba(255, 184, 77, 0.08));
box-shadow:
0 0 0 1px rgba(255, 213, 128, 0.18) inset,
0 0 18px rgba(255, 184, 77, 0.12);
}
.news-story-meta,
.news-story-tags {
display: flex;
align-items: center;
justify-content: space-between;
gap: calc(8px * var(--hud-scale));
flex-wrap: wrap;
}
.news-story-source,
.news-story-time,
.news-story-tag {
color: var(--hud-text-soft);
font-size: calc(0.66rem * var(--hud-scale));
}
.news-story-source {
color: var(--hud-accent-strong);
}
.news-story-title {
color: var(--hud-text);
font-size: calc(0.9rem * var(--hud-scale));
font-weight: 600;
line-height: 1.4;
}
.news-story-summary {
color: var(--hud-text-muted);
font-size: calc(0.74rem * var(--hud-scale));
line-height: 1.45;
}
.news-story-tag {
border-radius: 999px;
padding: calc(3px * var(--hud-scale)) calc(7px * var(--hud-scale));
background: rgba(255, 255, 255, 0.04);
}
.news-board-empty {
color: var(--hud-text-muted);
font-size: calc(0.82rem * var(--hud-scale));
line-height: 1.5;
padding: calc(16px * var(--hud-scale)) calc(4px * var(--hud-scale));
}
.layout-mode-mobile .earth-news-ticker,
.layout-mode-mobile .earth-news-hud {
display: none !important;
}