Files
uptimesebi/internal/web/assets/app.css
T
Sebastian UnterschützandClaude Opus 5.5 3a7bed5a3e
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 6m31s
ci / test (pull_request) Successful in 13m28s
ci / build (pull_request) Successful in 10m23s
ci / image (pull_request) Successful in 5m51s
fix(monitors): stop selecting more regions than the limit allows
The monitor form let users tick any number of regions and only the save
failed with the region limit. The form now knows the organization's
regions-per-monitor limit: it says how many regions a monitor may use,
counts the ticked ones, and once the limit is reached locks the other
regions that count towards it, in the list and on the map, until one is
unticked. Own regions stay free unless they count. The server still
enforces the limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-29 12:17:08 +01:00

202 lines
5.9 KiB
CSS

@import "tailwindcss";
@source "../**/*.templ";
@font-face {
font-family: "IBM Plex Sans";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("/static/dist/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
font-family: "IBM Plex Sans";
font-style: normal;
font-weight: 500;
font-display: swap;
src: url("/static/dist/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
font-family: "IBM Plex Sans";
font-style: normal;
font-weight: 600;
font-display: swap;
src: url("/static/dist/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
font-family: "IBM Plex Mono";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("/static/dist/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
font-family: "IBM Plex Mono";
font-style: normal;
font-weight: 500;
font-display: swap;
src: url("/static/dist/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}
@theme {
--font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
--font-mono: "IBM Plex Mono", ui-monospace, monospace;
--color-ink: #1c1d1f;
--color-paper: #f4f2ee;
--color-rule: #d9d5cc;
--color-muted: #6b675f;
--color-up: #2f7d4f;
--color-down: #b3361f;
--color-degraded: #b57b14;
--color-unknown: #8a8a86;
--color-maintenance: #3d6fa6;
--radius-box: 2px;
}
@layer base {
html {
@apply bg-paper text-ink font-sans antialiased;
font-feature-settings: "tnum";
}
@media (prefers-color-scheme: dark) {
html {
--color-ink: #e6e3dc;
--color-paper: #16171a;
--color-rule: #2c2d31;
--color-muted: #9a968d;
}
}
}
/* Markdown of legal documents, written by operators and organizations. */
@layer components {
.legal-text {
@apply text-sm leading-relaxed;
}
.legal-text h1 { @apply mb-6 text-xl font-semibold; }
.legal-text h2 { @apply mb-3 mt-8 text-base font-semibold; }
.legal-text h3 { @apply mb-2 mt-6 text-sm font-semibold; }
.legal-text p,
.legal-text ul,
.legal-text ol,
.legal-text table { @apply mb-4; }
.legal-text ul { @apply list-disc pl-5; }
.legal-text ol { @apply list-decimal pl-5; }
.legal-text a { @apply underline underline-offset-2; }
.legal-text th,
.legal-text td { @apply border border-rule px-2 py-1 text-left; }
.legal-text code { @apply font-mono text-xs; }
}
/* Swagger UI: keep its layout, use the console's fonts and colors. */
.api-docs .swagger-ui,
.api-docs .swagger-ui .info .title,
.api-docs .swagger-ui .opblock-tag {
font-family: var(--font-sans);
}
.api-docs .swagger-ui .topbar {
display: none;
}
@media (prefers-color-scheme: dark) {
.api-docs .swagger-ui {
filter: invert(0.92) hue-rotate(180deg);
}
}
/* Outside any layer so it wins over text-sm and text-xs: iOS zooms into
form fields whose text is smaller than 16px. */
@media (pointer: coarse) {
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
font-size: max(16px, 1em);
}
}
/* Region maps: a labelled pin per region, filled when it is selected;
its dot is green while a checker of the region is live. */
.region-pin {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 3px 9px 3px 5px;
border: 1px solid var(--color-rule);
border-radius: 9999px;
background: var(--color-paper);
color: var(--color-ink);
font: 500 11px/1.3 var(--font-sans);
white-space: nowrap;
cursor: pointer;
box-shadow: 0 1px 4px rgb(0 0 0 / 0.25);
transition: background-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.region-pin-dot {
flex: none;
width: 8px;
height: 8px;
border-radius: 9999px;
background: var(--color-unknown);
box-shadow: 0 0 0 2px var(--color-paper);
}
.region-pin:not([data-live="0"]) .region-pin-dot { background: var(--color-up); }
.region-pin.is-checked {
border-color: var(--color-ink);
background: var(--color-ink);
color: var(--color-paper);
}
.region-pin.is-checked .region-pin-dot { box-shadow: 0 0 0 2px var(--color-ink); }
.maplibregl-marker.is-hover,
.maplibregl-marker:hover { z-index: 3; }
.is-hover > .region-pin,
.region-pin:hover {
transform: scale(1.1);
box-shadow: 0 2px 8px rgb(0 0 0 / 0.35);
}
@media (pointer: coarse) {
.region-pin {
padding: 6px 11px 6px 8px;
font-size: 12px;
}
}
/* Pins whose label would cover another one turn it to the left of their
point, or show only their dot until hovered. */
.is-flipped > .region-pin {
flex-direction: row-reverse;
padding: 3px 5px 3px 9px;
translate: calc(16px - 100%);
}
.maplibregl-marker:is(.is-flipped, .is-compact):not(.is-hover, :hover) { z-index: 2; }
.is-compact > .region-pin { gap: 0; padding: 3px 5px; }
.is-compact:not(.is-hover, :hover) > .region-pin > :last-child { display: none; }
.is-compact.is-hover > .region-pin,
.is-compact:hover > .region-pin { gap: 6px; padding: 3px 9px 3px 5px; }
@media (pointer: coarse) {
.is-flipped > .region-pin { padding: 6px 8px 6px 11px; }
.is-compact > .region-pin { padding: 6px 8px; }
}
/* Regions locked by the monitor's region limit. */
label.is-locked { opacity: 0.5; cursor: not-allowed; }
/* Opaque, so stacked pins do not show through each other. */
.region-pin.is-disabled { color: var(--color-muted); cursor: not-allowed; box-shadow: none; }
.region-pin.is-disabled .region-pin-dot { background: var(--color-unknown); }
.is-hover > .region-pin.is-disabled,
.region-pin.is-disabled:hover { transform: none; }
.region-pin:focus-visible { outline: 2px solid var(--color-maintenance); outline-offset: 2px; }
.region-pick {
width: 14px;
height: 14px;
border: 2px solid var(--color-paper);
border-radius: 9999px;
background: var(--color-down);
box-shadow: 0 1px 4px rgb(0 0 0 / 0.4);
}
.region-row { transition: background-color 0.15s; }
.region-row.is-hover { background: color-mix(in srgb, var(--color-ink) 7%, transparent); }
.region-map .maplibregl-ctrl-attrib { font-size: 10px; }