css ausgelagert

This commit is contained in:
Bernd Reuther committed 2026-10-05 19:51:31 +02:00
1 parent 3e70c4c968
commit d8620186ca
3 files changed
+403 -500

No files matched your search

+9 -250
View File
@@ -714,256 +714,8 @@ HTML = """
<title>{{ page_title }}</title>
{% if favicon_url %}<link rel="icon" href="{{ favicon_url }}">{% endif %}
<style>
{{ theme_css|safe }}
* {
box-sizing: border-box;
}
.site-header { display:flex; align-items:center; gap:18px; margin-bottom:24px; }
.site-logo { max-width:140px; max-height:48px; object-fit:contain; display:block; flex:0 0 auto; }
.site-header h1 { margin:0; }
body {
margin: 0;
padding: 24px;
background: var(--color-background);
color: var(--color-text);
font-family: Arial, Helvetica, sans-serif;
}
h1 {
margin: 0 0 8px 0;
font-size: 28px;
}
.subtitle {
color: var(--color-text-muted);
margin-bottom: 24px;
}
.status {
display: inline-block;
padding: 8px 14px;
border-radius: 6px;
margin-bottom: 24px;
font-weight: bold;
}
.status.recording {
background: var(--color-danger);
color:var(--color-white);
}
.status.idle {
background: var(--color-border);
color: var(--color-text-secondary);
}
.status.error {
background: var(--color-warning);
color:var(--color-white);
}
.recording {
border: 1px solid var(--color-recording);
background: var(--color-live-surface);
border-radius: 8px;
padding: 16px;
margin-bottom: 24px;
}
.recording-title {
font-size: 20px;
font-weight: bold;
margin-bottom: 8px;
}
.recording-info {
color: var(--color-text-secondary);
margin-bottom: 12px;
}
.live-panel {
display: flex;
gap: 16px;
border: 1px solid var(--color-recording);
background: var(--color-live-surface);
border-radius: 8px;
padding: 16px;
margin-bottom: 24px;
}
.live-item {
flex: 1;
min-width: 0;
}
.live-item + .live-item {
border-left: 1px solid var(--color-recording-border);
padding-left: 16px;
}
.live-title {
font-size: 19px;
font-weight: bold;
margin-bottom: 6px;
}
.live-info {
color: var(--color-text-muted);
font-size: 14px;
margin-bottom: 10px;
}
.filter-bar {
display: grid;
grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr) minmax(220px, 1.8fr);
gap: 10px;
margin-bottom: 14px;
}
.filter-bar label {
color: var(--color-text-muted);
font-size: 13px;
}
.filter-bar input,
.filter-bar select {
width: 100%;
margin-top: 5px;
padding: 9px;
background: var(--color-background);
color: var(--color-text);
border: 1px solid var(--color-control-hover);
border-radius: 5px;
font-size: 15px;
}
.filter-bar .search {
grid-column: auto;
}
.filter-info {
color: var(--color-text-muted);
font-size: 13px;
margin-bottom: 10px;
}
table {
width: 100%;
border-collapse: collapse;
background: var(--color-surface);
border-radius: 8px;
overflow: hidden;
}
th {
text-align: left;
background: var(--color-table-header);
padding: 12px;
color: var(--color-text-secondary);
}
td {
padding: 12px;
color: var(--color-table-text);
border-top: 1px solid var(--color-border-subtle);
vertical-align: middle;
}
audio {
width: 500px;
max-width: 100%;
height: 48px;
}
/* Die Positionsleiste der nativen Audio-Steuerung besser bedienbar machen.
Chromium/WebKit erlaubt zusätzlich eine direkte Vergrößerung der Timeline. */
audio::-webkit-media-controls-timeline {
height: 8px;
}
audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
font-size: 13px;
}
a.button {
display: inline-block;
padding: 8px 12px;
margin-left: 8px;
background: var(--color-border);
color: var(--color-white);
text-decoration: none;
border-radius: 5px;
}
a.button:hover {
background: var(--color-control-hover);
}
.empty {
padding: 30px;
text-align: center;
color: var(--color-text-faint);
}
.footer-links { display:flex; justify-content:center; align-items:center; gap:16px; margin-top:8px; }
.footer-links a { color:var(--color-footer); text-decoration:none; }
.footer-links a:hover { color:var(--color-text); text-decoration:underline; }
.git-icon { display:inline-block; margin-right:4px; font-size:16px; line-height:1; }
.footer {
margin-top: 24px;
color: var(--color-footer);
font-size: 13px;
}
@media (max-width: 900px) {
.filter-bar {
grid-template-columns: 1fr 1fr;
}
.filter-bar .search {
grid-column: auto;
}
}
@media (max-width:800px) {
body { padding:12px; }
.finished-table, .finished-table tbody, .finished-table tr, .finished-table td { display:block; }
.finished-table { background:transparent; border:0; overflow:visible; }
.finished-table thead { display:none; }
.finished-table tbody { display:grid; gap:18px; }
.finished-table tr { display:grid; grid-template-columns:1fr auto; grid-template-areas:"event date" "title title" "speaker speaker" "duration duration" "audio audio" "actions actions"; gap:0 12px; margin:0; padding:20px; background:var(--color-surface); border:1px solid var(--color-border); border-radius:20px; box-shadow:0 8px 24px var(--color-shadow); }
.finished-table td { border:0; padding:0; min-width:0; }
.finished-table td:nth-child(4) { grid-area:event; justify-self:start; align-self:start; padding:6px 10px; color:var(--color-primary-hover); background:var(--color-selection); border-radius:999px; font-size:12px; font-weight:700; line-height:1.2; }
.finished-table td:nth-child(1) { grid-area:date; justify-self:end; align-self:center; color:var(--color-text-muted); font-size:12px; white-space:nowrap; }
.finished-table td:nth-child(3) { grid-area:title; margin-top:16px; color:var(--color-text); font-size:20px; font-weight:750; line-height:1.25; }
.finished-table td:nth-child(2) { grid-area:speaker; margin-top:6px; color:var(--color-text-muted); font-size:14px; font-weight:600; }
.finished-table td:nth-child(5) { grid-area:duration; margin-top:16px; color:var(--color-text-muted); font-size:13px; }
.finished-table td:nth-child(5)::before { content:"⏱ "; font-size:14px; }
.finished-table td:nth-child(6) { grid-area:audio; margin-top:4px; }
.finished-table td:nth-child(7) { grid-area:actions; margin-top:14px; padding-top:14px; border-top:1px solid var(--color-border-subtle); }
.finished-table audio { width:100%; height:42px; margin:0; }
.finished-table a.button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:0 16px; margin:0; border-radius:12px; }
.live-panel { display:block; }
.live-item + .live-item { border-left:0; border-top:1px solid var(--color-recording-border); padding-left:0; padding-top:16px; margin-top:16px; }
a.button { margin-left:0; margin-right:8px; }
}
#dynamic-content {
background: var(--color-surface-dark);
color: var(--color-white);
border: 1px solid var(--color-primary);
border-radius: 8px;
padding: 16px;
margin: 0 0 24px 0;
box-shadow: 0 2px 6px var(--color-shadow);
}
</style>
<style>{{ theme_css|safe }}</style>
<link rel="stylesheet" href="/static/style.css?v=1">
</head>
<body>
@@ -1387,6 +1139,13 @@ def render_index():
)
@app.route("/static/style.css")
def static_style():
if not STYLE_FILE.is_file():
abort(404)
return send_file(STYLE_FILE, mimetype="text/css")
@app.route("/branding/logo")
def branding_logo():
settings = load_settings()