247 lines
7.4 KiB
Go
247 lines
7.4 KiB
Go
package report
|
|
|
|
// cactusTheme is a light-mode pastel theme: sage green and terracotta on a
|
|
// near-white background, system sans-serif font, flat soft shadows, no
|
|
// glow effects, and pill-shaped badges.
|
|
var cactusTheme = themeAssets{
|
|
CSS: `
|
|
:root {
|
|
--bg: #f6f9f1;
|
|
--bg2: #eaf2e1;
|
|
--c1: #6b9b52;
|
|
--c2: #5b8fa3;
|
|
--c3: #e0956b;
|
|
--warn: #d99a3d;
|
|
--err: #c96a5b;
|
|
--text: #33402d;
|
|
--border: #d3e0c8;
|
|
}
|
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
body {
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
font-size: 14px;
|
|
min-height: 100vh;
|
|
}
|
|
header {
|
|
background: var(--bg2);
|
|
border-bottom: 1px solid var(--border);
|
|
padding: 28px 32px;
|
|
text-align: center;
|
|
}
|
|
header h1 {
|
|
font-size: 2.2rem;
|
|
font-weight: 700;
|
|
color: var(--c1);
|
|
letter-spacing: 3px;
|
|
}
|
|
header .subtitle {
|
|
color: var(--text);
|
|
margin-top: 8px;
|
|
font-size: 0.85rem;
|
|
letter-spacing: 1px;
|
|
opacity: 0.7;
|
|
}
|
|
.nav-back {
|
|
padding: 10px 32px;
|
|
background: var(--bg2);
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.nav-back a {
|
|
color: var(--c1);
|
|
text-decoration: none;
|
|
font-size: 0.85rem;
|
|
font-weight: 600;
|
|
}
|
|
.nav-back a:hover { text-decoration: underline; }
|
|
.container { max-width: 1400px; margin: 0 auto; padding: 24px 16px; }
|
|
h2 {
|
|
color: var(--c1);
|
|
font-size: 1.15rem;
|
|
font-weight: 700;
|
|
letter-spacing: 1px;
|
|
margin-bottom: 16px;
|
|
border-bottom: 2px solid var(--border);
|
|
padding-bottom: 8px;
|
|
}
|
|
.section { margin-bottom: 40px; }
|
|
.cards {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 16px;
|
|
margin-bottom: 40px;
|
|
}
|
|
.card {
|
|
background: var(--bg2);
|
|
border: 1px solid var(--border);
|
|
border-radius: 14px;
|
|
padding: 22px;
|
|
box-shadow: 0 2px 10px rgba(60,80,50,0.08);
|
|
text-align: center;
|
|
}
|
|
.card .label {
|
|
color: var(--c2);
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
letter-spacing: 1px;
|
|
text-transform: uppercase;
|
|
margin-bottom: 10px;
|
|
}
|
|
.card .value {
|
|
color: var(--c1);
|
|
font-size: 1.8rem;
|
|
font-weight: 700;
|
|
}
|
|
.charts-row {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
|
|
gap: 20px;
|
|
margin-bottom: 40px;
|
|
}
|
|
.chart-card {
|
|
background: var(--bg2);
|
|
border: 1px solid var(--border);
|
|
border-radius: 14px;
|
|
padding: 20px;
|
|
box-shadow: 0 2px 10px rgba(60,80,50,0.08);
|
|
}
|
|
.chart-card h3 {
|
|
color: var(--c2);
|
|
font-size: 0.8rem;
|
|
font-weight: 600;
|
|
letter-spacing: 1px;
|
|
text-transform: uppercase;
|
|
margin-bottom: 14px;
|
|
}
|
|
canvas { max-width: 100%; }
|
|
.table-controls {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 12px;
|
|
margin-bottom: 12px;
|
|
}
|
|
.search-bar { display: flex; align-items: center; gap: 10px; }
|
|
.search-bar input {
|
|
background: #fff;
|
|
border: 1px solid var(--border);
|
|
color: var(--text);
|
|
font-family: inherit;
|
|
font-size: 13px;
|
|
padding: 8px 14px;
|
|
width: 280px;
|
|
outline: none;
|
|
border-radius: 8px;
|
|
}
|
|
.search-bar input:focus { border-color: var(--c1); }
|
|
.search-bar input::placeholder { color: #93a389; }
|
|
.search-bar label {
|
|
color: var(--c2);
|
|
font-size: 0.8rem;
|
|
font-weight: 600;
|
|
letter-spacing: 1px;
|
|
text-transform: uppercase;
|
|
}
|
|
.page-info { color: #6b7b62; font-size: 0.8rem; letter-spacing: 1px; min-width: 140px; }
|
|
.page-size-select { display: flex; align-items: center; gap: 6px; }
|
|
.page-size-select label { color: var(--c2); font-size: 0.8rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
|
|
.page-size-select select {
|
|
background: #fff;
|
|
border: 1px solid var(--border);
|
|
color: var(--text);
|
|
font-family: inherit;
|
|
font-size: 13px;
|
|
padding: 6px 10px;
|
|
outline: none;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
}
|
|
.page-btns { display: flex; gap: 8px; margin-left: auto; }
|
|
.page-btns button {
|
|
background: #fff;
|
|
border: 1px solid var(--c1);
|
|
color: var(--c1);
|
|
font-family: inherit;
|
|
font-weight: 600;
|
|
font-size: 12px;
|
|
padding: 6px 16px;
|
|
cursor: pointer;
|
|
border-radius: 8px;
|
|
letter-spacing: 0.5px;
|
|
transition: background 0.15s;
|
|
}
|
|
.page-btns button:hover:not(:disabled) { background: #eef5e8; }
|
|
.page-btns button:disabled { opacity: 0.35; cursor: default; }
|
|
.table-wrap { overflow-x: auto; }
|
|
table { width: 100%; border-collapse: collapse; font-size: 13px; }
|
|
thead th {
|
|
background: var(--bg2);
|
|
color: var(--c2);
|
|
font-size: 0.75rem;
|
|
font-weight: 700;
|
|
letter-spacing: 1px;
|
|
text-transform: uppercase;
|
|
padding: 10px 14px;
|
|
border-bottom: 2px solid var(--border);
|
|
text-align: left;
|
|
white-space: nowrap;
|
|
}
|
|
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s; }
|
|
tbody tr:hover { background: #f0f6ea; }
|
|
tbody td { padding: 9px 14px; color: var(--text); vertical-align: top; word-break: break-all; }
|
|
tbody td:first-child { color: var(--c1); font-weight: 700; white-space: nowrap; }
|
|
.status { display: inline-block; padding: 2px 9px; border-radius: 999px; font-weight: 700; font-size: 12px; }
|
|
.s2xx { color: #2f6a26; background: #dff3d8; }
|
|
.s3xx { color: #2c5f73; background: #dcebf2; }
|
|
.s4xx { color: #8a5a13; background: #fbe9d0; }
|
|
.s5xx { color: #93372a; background: #fadbd8; }
|
|
.level { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
|
|
.l-error, .l-crit, .l-alert, .l-emerg { color: #93372a; background: #fadbd8; }
|
|
.l-warn { color: #8a5a13; background: #fbe9d0; }
|
|
.l-info, .l-notice { color: #2c5f73; background: #dcebf2; }
|
|
.l-debug { color: #6b7b62; background: #e9efe3; }
|
|
.rank { color: var(--c3); font-weight: 700; }
|
|
footer {
|
|
text-align: center;
|
|
padding: 24px;
|
|
color: #8a9880;
|
|
font-size: 0.75rem;
|
|
border-top: 1px solid var(--border);
|
|
letter-spacing: 1px;
|
|
}
|
|
.day-link { color: var(--c1); text-decoration: none; font-weight: 600; }
|
|
.day-link:hover { text-decoration: underline; }
|
|
.err-low { color: var(--c1); font-weight: 600; }
|
|
.err-med { color: var(--warn); font-weight: 600; }
|
|
.err-high { color: var(--err); font-weight: 600; }
|
|
`,
|
|
ExtraCSS: `
|
|
#map { height: 480px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg2); }
|
|
.map-label {
|
|
background: #ffffff !important;
|
|
border: 1px solid var(--c3) !important;
|
|
border-radius: 8px !important;
|
|
color: var(--text) !important;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
|
|
font-size: 11px !important;
|
|
padding: 3px 8px !important;
|
|
white-space: nowrap !important;
|
|
box-shadow: 0 2px 8px rgba(60,80,50,0.15) !important;
|
|
pointer-events: none !important;
|
|
}
|
|
.map-label::before { display: none !important; }
|
|
`,
|
|
ChartFont: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
|
|
ChartText: "#33402d",
|
|
ChartGrid: "#d3e0c8",
|
|
Chart1: "#6b9b52",
|
|
Chart2: "#5b8fa3",
|
|
Chart2Fill: "rgba(91,143,163,0.15)",
|
|
Chart3: "#e0956b",
|
|
ChartWarn: "#d99a3d",
|
|
ChartErr: "#c96a5b",
|
|
MapTileURL: "https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",
|
|
MapAttribution: `© <a href="https://carto.com/">CARTO</a>`,
|
|
MarkerColor: "#e0956b",
|
|
}
|