feat: test and save results

This commit is contained in:
robin committed 2026-11-01 14:48:09 +01:00
1 parent 92807e857a
commit 255699a25c
12 files changed
+797 -3

No files matched your search

+119
View File
@@ -0,0 +1,119 @@
/* A/B-Player. Nutzt die Variablen aus base.html (--surface, --border, --accent, ...) */
.ab-player {
display: flex;
flex-direction: column;
gap: .75rem;
}
.ab-player .status {
margin: 0;
color: var(--muted);
font-size: .95rem;
}
.ab-player .status:empty { display: none; }
.ab-player.is-loading .track { opacity: .5; }
/* --- Spuren -------------------------------------------------------------- */
.ab-player .track {
display: flex;
gap: .75rem;
padding: .5rem;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
transition: border-color .15s;
}
.ab-player .track.is-active { border-color: var(--accent); }
.ab-player .track canvas {
flex: 1;
min-width: 0;
width: 100%;
height: 72px;
display: block;
cursor: pointer;
touch-action: manipulation;
}
.ab-player .track-label {
flex: none;
width: 2.75rem;
padding: 0;
font-weight: 700;
color: var(--text);
background: transparent;
border: 1px solid var(--border);
border-radius: 8px;
}
.ab-player .track.is-active .track-label {
color: var(--accent-text);
background: var(--accent);
border-color: var(--accent);
}
/* --- Steuerung ----------------------------------------------------------- */
.ab-player .transport {
display: flex;
align-items: center;
gap: 1rem;
flex-wrap: wrap;
}
.ab-player .play {
display: grid;
place-items: center;
width: 3.25rem;
height: 3.25rem;
padding: 0;
border-radius: 50%;
}
.ab-player .play:disabled { opacity: .4; cursor: default; }
.ab-player .play svg { width: 1.4rem; height: 1.4rem; fill: currentColor; }
.ab-player:not(.is-playing) .icon-pause { display: none; }
.ab-player.is-playing .icon-play { display: none; }
.ab-player .time {
color: var(--muted);
font-variant-numeric: tabular-nums;
}
.ab-player .hint {
margin: 0 0 0 auto;
color: var(--muted);
font-size: .85rem;
}
.ab-player button:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.ab-player .toggle {
min-height: 2.75rem;
padding: 0 1rem;
color: var(--text);
background: transparent;
border: 1px solid var(--border);
}
.ab-player .toggle:disabled { opacity: .4; cursor: default; }
/* --- Handy --------------------------------------------------------------- */
@media (max-width: 480px) {
.ab-player .track { gap: .5rem; }
.ab-player .track canvas { height: 56px; }
.ab-player .track-label { width: 2.5rem; }
}
/* Tastaturhinweis nur dort, wo es eine Tastatur gibt */
@media (hover: none) {
.ab-player .hint { display: none; }
}
+83
View File
@@ -0,0 +1,83 @@
.rating {
margin-top: 1.5rem;
padding-top: 1.25rem;
border-top: 1px solid var(--border);
}
.rating fieldset {
margin: 0 0 1rem;
padding: 0;
border: 0;
min-width: 0;
}
.rating legend {
padding: 0;
margin-bottom: .75rem;
font-size: 1.05rem;
font-weight: 600;
}
.rating .choices {
display: grid;
grid-template-columns: 1fr 1fr 2fr;
gap: .5rem;
}
.rating .choice {
position: relative;
display: block;
}
/* Das echte Radio bleibt für Tastatur und Screenreader erhalten, ist aber unsichtbar */
.rating .choice input {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
opacity: 0;
cursor: pointer;
}
.rating .choice span {
display: grid;
place-items: center;
min-height: 3rem;
padding: 0 .75rem;
text-align: center;
font-weight: 600;
color: var(--text);
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
transition: border-color .15s, background-color .15s;
}
.rating .choice input:hover + span { border-color: var(--accent); }
.rating .choice input:checked + span {
color: var(--accent-text);
background: var(--accent);
border-color: var(--accent);
}
.rating .choice input:focus-visible + span {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.rating button[type="submit"] {
min-height: 2.75rem;
padding: 0 1.75rem;
font-weight: 600;
}
.rating button[type="submit"]:disabled { opacity: .5; cursor: default; }
@media (max-width: 480px) {
.rating .choices { grid-template-columns: 1fr 1fr; }
.rating .choice-none { grid-column: 1 / -1; }
.rating button[type="submit"] { width: 100%; }
}