Files
PolyWeather/monitoring-web/static/style.css
T
2569718930@qq.com db9071101a @
添加市场监控 Rust 网页版:Axum+Askama+HTMX,直读 SQLite

- 11 城市卡片网格,暗色主题,响应式布局
- 60s HTMX 轮询局部刷新
- 当前温度、今日最高、趋势箭头(线性回归)
- 首尔/釜山跑道温度(预留)
- 零 Python 依赖,编译后 ~3MB 二进制

Constraint: 读 POLYWEATHER_DB_PATH 指向的 SQLite
@
2026-05-13 19:24:24 +08:00

185 lines
3.1 KiB
CSS

* { margin:0; padding:0; box-sizing:border-box; }
body {
background: #0f1117;
color: #c8cdd4;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
min-height: 100vh;
}
.page {
max-width: 1400px;
margin: 0 auto;
padding: 20px 24px;
}
.header {
display: flex;
justify-content: space-between;
align-items: baseline;
margin-bottom: 24px;
padding-bottom: 12px;
border-bottom: 1px solid #1e2130;
}
.header h1 {
font-size: 22px;
font-weight: 600;
color: #e8eaed;
letter-spacing: 0.02em;
}
.updated {
font-size: 13px;
color: #5a6170;
}
/* ── grid ── */
.card-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 14px;
}
@media (max-width: 1280px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }
/* ── card ── */
.card {
background: #161822;
border: 1px solid #1e2130;
border-radius: 10px;
padding: 16px 18px;
transition: border-color 0.3s, box-shadow 0.3s;
position: relative;
}
.card:hover {
border-color: #2a2e40;
}
/* ── card-top ── */
.card-top {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 10px;
font-size: 13px;
flex-wrap: wrap;
}
.city-name {
color: #e0e3e8;
font-weight: 600;
}
.airport {
color: #6a7180;
}
.local-time {
margin-left: auto;
color: #4a5160;
font-variant-numeric: tabular-nums;
}
.badge {
font-size: 11px;
padding: 1px 6px;
border-radius: 4px;
font-weight: 600;
}
.new-high {
background: rgba(124, 58, 237, 0.18);
color: #a78bfa;
}
/* ── temp ── */
.card-temp {
margin: 4px 0 6px;
font-weight: 700;
line-height: 1.1;
}
.temp-value {
font-size: 40px;
color: #e8eaed;
letter-spacing: -0.02em;
}
.temp-value.na {
color: #3a4050;
font-size: 28px;
}
.temp-unit {
font-size: 18px;
color: #5a6170;
margin-left: 2px;
}
/* ── meta ── */
.card-meta {
display: flex;
flex-direction: column;
gap: 3px;
margin-bottom: 4px;
}
.meta-row {
display: flex;
justify-content: space-between;
font-size: 13px;
}
.meta-row .label {
color: #4a5160;
}
.meta-row .value {
color: #9aa0b0;
font-variant-numeric: tabular-nums;
}
.meta-row .value.na {
color: #3a4050;
}
/* ── trend ── */
.trend { font-size: 15px; font-weight: 600; }
.trend.rising { color: #34d399; }
.trend.falling { color: #60a5fa; }
.trend.flat { color: #5a6170; }
/* ── runway ── */
.card-runway { margin-top: 8px; }
.runway-divider {
height: 1px;
background: #1e2130;
margin-bottom: 6px;
}
.runway-row {
display: flex;
justify-content: space-between;
font-size: 12px;
margin-bottom: 1px;
}
.runway-label { color: #4a5160; }
.runway-temp { color: #7a8290; font-variant-numeric: tabular-nums; }
/* ── HTMX indicator ── */
.htmx-indicator {
text-align: center;
padding: 12px;
font-size: 13px;
color: #3a4050;
display: none;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { display: block; }