This repository has been archived on 2026-10-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
karldns.de/router_dyndns/web/styles.py
T

780 lines
14 KiB
Python
Raw Normal View History

2026-05-20 23:55:27 +02:00
from __future__ import annotations
APP_CSS = """
:root {
color-scheme: light;
--bs-primary: #000000;
--bs-primary-rgb: 0, 0, 0;
--bs-link-color: #000000;
--bs-link-hover-color: #3f3f46;
--bs-border-radius: 12px;
--bs-border-radius-sm: 10px;
--bs-border-radius-lg: 12px;
--rp-bg: #ffffff;
--rp-canvas: #ffffff;
--rp-surface: #ffffff;
--rp-surface-alt: #fafafa;
--rp-field: #fafafa;
--rp-ink: #000000;
--rp-muted: #737373;
--rp-charcoal: #52525b;
--rp-mute: #a1a1aa;
--rp-line: #e5e5e5;
--rp-soft-line: #eeeeee;
--rp-danger: #b42318;
--rp-focus-ring: rgba(0, 0, 0, 0.18);
--rp-terminal: #ffffff;
--rp-terminal-ink: #000000;
--rp-success: #1d6f42;
}
[data-bs-theme="dark"] {
color-scheme: dark;
--bs-body-bg: #0f0f0f;
--bs-body-color: #f5f5f5;
--bs-secondary-color: #a1a1aa;
--bs-border-color: rgba(255, 255, 255, 0.16);
--bs-tertiary-bg: #171717;
--rp-bg: #0f0f0f;
--rp-canvas: #0f0f0f;
--rp-surface: #171717;
--rp-surface-alt: #1f1f1f;
--rp-field: #1f1f1f;
--rp-ink: #f5f5f5;
--rp-muted: #a3a3a3;
--rp-charcoal: #d4d4d4;
--rp-mute: #737373;
--rp-line: rgba(255, 255, 255, 0.16);
--rp-soft-line: rgba(255, 255, 255, 0.1);
--rp-danger: #ff8a80;
--rp-focus-ring: rgba(255, 255, 255, 0.24);
--rp-terminal: #171717;
--rp-terminal-ink: #f5f5f5;
--rp-success: #62c383;
}
* {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
overflow-x: clip;
}
body {
min-height: 100vh;
overflow-x: clip;
background: var(--rp-bg);
color: var(--rp-ink);
font: 400 16px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.justify-items-center {
justify-items: center;
}
.container {
max-width: 1040px;
}
.container.narrow {
max-width: 760px;
}
.skip-link {
position: fixed;
left: 16px;
top: 10px;
z-index: 40;
transform: translateY(-140%);
padding: 8px 20px;
border-radius: 999px;
background: var(--rp-ink);
color: var(--rp-bg);
text-decoration: none;
font-size: 14px;
transition: transform 0.16s ease;
}
.skip-link:focus {
transform: translateY(0);
}
.site-nav {
min-height: 63px;
padding: 14px 0;
border-bottom: 0;
background: var(--rp-canvas);
}
.site-nav .container {
display: flex;
align-items: center;
gap: 12px;
min-width: 0;
}
.brand {
display: inline-flex;
align-items: center;
flex: 0 0 auto;
gap: 8px;
color: var(--rp-ink);
font-size: 14px;
font-weight: 600;
letter-spacing: 0;
white-space: nowrap;
}
.brand:hover {
color: var(--rp-ink);
}
.brand img {
width: 26px;
height: 26px;
display: block;
}
.nav-label {
max-width: min(38vw, 320px);
}
.site-nav-actions {
min-width: 0;
flex-wrap: wrap;
}
.navbar .nav-link,
.navbar-text {
color: var(--rp-muted);
font-size: 13px;
font-weight: 500;
}
.navbar .nav-link:hover {
color: var(--rp-ink);
}
.theme-toggle {
min-width: 58px;
}
.hero-band {
min-height: auto;
display: grid;
align-items: center;
border-bottom: 0;
background: var(--rp-canvas);
text-align: center;
padding: 96px 0 88px;
}
.hero-band .container {
max-width: 720px;
min-width: 0;
}
.hero-band .container > * {
max-width: 100%;
min-width: 0;
}
.hero-logo {
width: 80px;
height: 80px;
margin-inline: auto;
}
.hero-band.compact {
min-height: auto;
padding: 56px 0 48px;
}
.section {
padding: 88px 0;
border-bottom: 0;
background: var(--rp-canvas);
}
.section + .section {
border-top: 0;
}
.success-section {
background: var(--rp-surface-alt);
}
.danger-section {
background: var(--rp-surface);
border-top: 1px solid var(--rp-soft-line);
}
.page-heading,
.admin-heading .container {
max-width: 760px;
}
.admin-heading {
padding: 56px 0 48px;
}
h1,
h2,
h3,
p {
margin: 0;
}
h1,
h2 {
font-family: "SF Pro Rounded", ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
h1 {
max-width: 720px;
font-size: 36px;
line-height: 1.11;
font-weight: 500;
letter-spacing: 0;
overflow-wrap: anywhere;
}
h2 {
font-size: 28px;
line-height: 1.22;
font-weight: 500;
letter-spacing: 0;
}
h3 {
font-size: 19px;
line-height: 1.35;
font-weight: 500;
}
.eyebrow {
color: var(--rp-charcoal);
font-size: 13px;
font-weight: 600;
letter-spacing: 0;
text-transform: none;
}
.lead {
max-width: 660px;
color: var(--rp-muted);
font-size: 16px;
line-height: 1.5;
letter-spacing: 0;
}
.section-copy,
.intro {
margin-top: 12px;
max-width: 560px;
color: var(--rp-muted);
font-size: 15px;
line-height: 1.5;
}
.install-pill {
display: inline-flex;
align-items: center;
max-width: 100%;
min-width: 0;
min-height: 48px;
padding: 12px 20px;
border: 0;
border-radius: 9999px;
background: var(--rp-field);
color: var(--rp-ink);
}
.install-pill code {
min-width: 0;
overflow: hidden;
color: var(--rp-ink);
text-overflow: ellipsis;
white-space: nowrap;
font: 400 15px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.card {
background: var(--rp-surface);
border: 1px solid var(--rp-line);
border-radius: 16px;
box-shadow: none;
overflow: clip;
}
.card-body {
padding: 24px;
}
label {
display: grid;
gap: 8px;
color: var(--rp-charcoal);
font-size: 14px;
font-weight: 500;
}
.form-control,
input {
width: 100%;
min-height: 44px;
border: 1px solid var(--rp-line);
border-radius: 9999px;
padding: 10px 16px;
color: var(--bs-body-color);
font: inherit;
background: var(--rp-field);
outline: none;
}
.form-select {
min-height: 38px;
border-color: var(--rp-line);
border-radius: 9999px;
background-color: var(--rp-field);
color: var(--rp-ink);
}
.form-control:focus,
input:focus,
.form-select:focus {
border-color: var(--rp-ink);
box-shadow: 0 0 0 3px var(--rp-focus-ring);
}
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
border-radius: 9999px;
font-size: 14px;
font-weight: 600;
line-height: 1;
transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.btn:not(.btn-sm) {
min-height: 42px;
padding: 10px 22px;
}
.btn-sm {
min-width: 34px;
min-height: 34px;
padding-inline: 14px;
border-radius: 9999px;
}
.btn:active {
transform: scale(0.97);
}
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
outline: 2px solid var(--rp-focus-ring);
outline-offset: 3px;
}
.btn-primary {
--bs-btn-color: #ffffff;
--bs-btn-bg: #000000;
--bs-btn-border-color: #000000;
--bs-btn-hover-color: #ffffff;
--bs-btn-hover-bg: #1c1c1c;
--bs-btn-hover-border-color: #1c1c1c;
--bs-btn-active-color: #ffffff;
--bs-btn-active-bg: #1c1c1c;
--bs-btn-active-border-color: #1c1c1c;
--bs-btn-disabled-bg: var(--rp-surface-alt);
--bs-btn-disabled-border-color: var(--rp-line);
--bs-btn-disabled-color: var(--rp-mute);
}
.btn-outline-primary {
--bs-btn-color: var(--rp-ink);
--bs-btn-border-color: var(--rp-line);
--bs-btn-hover-color: var(--rp-ink);
--bs-btn-hover-bg: var(--rp-surface-alt);
--bs-btn-hover-border-color: var(--rp-line);
--bs-btn-active-color: var(--rp-ink);
--bs-btn-active-bg: var(--rp-surface-alt);
--bs-btn-active-border-color: var(--rp-line);
}
.btn-outline-secondary,
.btn-light {
--bs-btn-bg: var(--rp-field);
--bs-btn-border-color: var(--rp-line);
--bs-btn-color: var(--rp-ink);
--bs-btn-hover-bg: var(--rp-surface-alt);
--bs-btn-hover-border-color: var(--rp-line);
--bs-btn-hover-color: var(--rp-ink);
}
.btn-outline-danger {
--bs-btn-color: var(--rp-danger);
--bs-btn-border-color: var(--rp-line);
--bs-btn-hover-color: #ffffff;
--bs-btn-hover-bg: var(--rp-danger);
--bs-btn-hover-border-color: var(--rp-danger);
}
.text-primary {
color: var(--rp-ink) !important;
}
.text-bg-primary {
color: #ffffff !important;
background-color: #000000 !important;
}
.text-bg-secondary,
.text-bg-warning {
color: var(--rp-charcoal) !important;
background-color: var(--rp-field) !important;
border: 1px solid var(--rp-line);
}
.text-bg-primary.rounded-circle {
width: 32px;
height: 32px;
display: inline-grid;
place-items: center;
border-radius: 9999px !important;
}
.alert-info,
.alert-warning {
--bs-alert-color: var(--rp-charcoal);
--bs-alert-bg: var(--rp-surface-alt);
--bs-alert-border-color: var(--rp-line);
border-radius: 12px;
}
.copy-field {
min-width: 0;
max-width: 100%;
}
.copy-field .input-group-text {
min-width: 150px;
border-color: var(--rp-line);
color: var(--rp-muted);
font-size: 13px;
background: var(--rp-surface-alt);
}
.copy-label {
display: inline-flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.copy-field .form-control {
min-width: 0;
border-color: var(--rp-line);
background: var(--rp-field);
}
.copy-field .copy-value {
min-width: 0;
overflow-wrap: anywhere;
}
.copy-field code.form-control {
width: 1%;
flex: 1 1 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.copy-field code {
min-height: 42px;
margin: 0;
color: var(--rp-ink);
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
font-size: 13px;
line-height: 1.6;
background: var(--rp-field);
}
.manual-code {
overflow-x: auto;
padding: 16px;
border: 1px solid var(--rp-line);
border-radius: 12px;
color: var(--rp-terminal-ink);
background: var(--rp-terminal);
font: 400 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.terminal-card {
display: grid;
gap: 8px;
padding: 18px 20px;
border: 1px solid var(--rp-line);
border-radius: 12px;
color: var(--rp-terminal-ink);
background: var(--rp-terminal);
font: 400 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.terminal-card code {
display: block;
overflow-wrap: anywhere;
color: inherit;
font: inherit;
}
.admin-table-scroll {
max-height: 560px;
overflow: auto;
background: var(--rp-surface);
border-color: var(--rp-line) !important;
border-radius: 16px !important;
-webkit-overflow-scrolling: touch;
}
.admin-table-scroll thead th {
position: sticky;
top: 0;
z-index: 1;
background: var(--rp-surface-alt);
}
.table-page-size {
width: auto;
min-width: 76px;
}
.admin-table-shell .form-control {
max-width: 360px;
}
.status-table-shell {
max-width: 100%;
border: 1px solid var(--rp-line);
border-radius: 16px;
background: var(--rp-surface);
}
.pagination {
--bs-pagination-color: var(--rp-muted);
--bs-pagination-bg: var(--rp-surface);
--bs-pagination-border-color: var(--rp-line);
--bs-pagination-hover-color: var(--rp-ink);
--bs-pagination-hover-bg: var(--rp-field);
--bs-pagination-hover-border-color: var(--rp-line);
--bs-pagination-active-color: #ffffff;
--bs-pagination-active-bg: #000000;
--bs-pagination-active-border-color: #000000;
--bs-pagination-disabled-color: var(--rp-mute);
--bs-pagination-disabled-bg: var(--rp-surface);
--bs-pagination-disabled-border-color: var(--rp-line);
}
.site-footer {
padding: 32px 0;
background: var(--rp-canvas);
}
.site-footer .nav-link:hover {
color: var(--rp-ink) !important;
}
table {
width: 100%;
border-collapse: collapse;
font-size: 14px;
font-variant-numeric: tabular-nums;
color: var(--rp-ink);
}
.table {
--bs-table-bg: transparent;
--bs-table-color: var(--rp-ink);
--bs-table-border-color: var(--rp-soft-line);
--bs-table-hover-bg: var(--rp-field);
margin-bottom: 0;
}
th,
td {
border-bottom: 1px solid var(--rp-soft-line);
padding: 14px 10px;
text-align: left;
white-space: nowrap;
}
td {
max-width: 38rem;
overflow: hidden;
text-overflow: ellipsis;
}
.status-table {
min-width: min(100%, 420px);
}
.status-table th,
.status-table td {
white-space: normal;
overflow-wrap: anywhere;
}
tr:last-child th,
tr:last-child td {
border-bottom: 0;
}
th {
color: var(--rp-muted);
font-size: 12px;
font-weight: 600;
background: var(--rp-surface-alt);
}
.empty {
color: var(--rp-muted);
text-align: center;
padding: 28px;
}
@media (max-width: 860px) {
.section,
.hero-band {
padding: 64px 0;
}
.hero-band {
min-height: auto;
}
h1 {
font-size: 32px;
}
}
@media (max-width: 560px) {
.container,
.container.narrow,
.hero-band .container {
width: 100%;
max-width: 100%;
}
.site-nav {
padding: 10px 0;
}
.site-nav .container {
align-items: flex-start;
}
.site-nav-actions {
max-width: calc(100% - 108px);
row-gap: 8px;
}
.brand {
font-size: 14px;
}
.brand img {
width: 24px;
height: 24px;
}
.navbar .nav-link,
.navbar-text {
font-size: 12px;
}
.nav-label {
max-width: 100%;
}
.hero-band .btn,
.card button,
.danger-section form,
.danger-section button {
width: 100%;
}
.install-pill {
width: 100%;
}
.hero-logo {
width: 68px;
height: 68px;
}
.copy-field {
display: grid;
grid-template-columns: 1fr;
}
.copy-field .input-group-text {
min-width: 0;
border-radius: 14px 14px 0 0;
white-space: normal;
}
.copy-field .copy-value,
.copy-field code {
width: 100%;
white-space: normal;
overflow-wrap: anywhere;
border-radius: 0;
}
.copy-field .btn {
width: 100%;
border-radius: 0;
}
.copy-field .btn:last-child {
border-radius: 0 0 14px 14px;
}
.admin-table-shell .form-control {
max-width: none;
}
.admin-table-shell [data-table-count] {
white-space: normal !important;
}
.pagination {
flex-wrap: wrap;
justify-content: flex-start !important;
}
th,
td {
padding: 12px 9px;
}
h1 {
font-size: 28px;
line-height: 1.15;
}
h2 {
font-size: 24px;
}
}
""".strip()