Refector code

This commit is contained in:
iamdoubz committed 2026-07-24 05:34:07 -05:00
1 parent 6ab627ba60
commit 2fbbf4b0fc
23 files changed
+1518 -1069

No files matched your search

+175
View File
@@ -0,0 +1,175 @@
/*
* radio.css — all colors/fonts come from CSS variables defined in <head>
* (see partials/head.php, fed by .env). Restyle a station without editing CSS.
*/
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
background: var(--bg);
color: var(--text);
font-family: var(--font);
text-align: center;
-webkit-font-smoothing: antialiased;
}
a { color: var(--muted); text-decoration: none; }
a:hover, a:focus { color: var(--text); text-decoration: underline; }
/* ------------------------------------------------------------- layout */
.row {
display: flex;
justify-content: center;
width: 100%;
padding: 16px;
}
.column {
width: 100%;
max-width: 420px;
padding: 24px;
background: var(--surface);
border-radius: calc(var(--radius) + 10px);
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
/* --------------------------------------------------------- album art */
.album-art {
width: 86%;
max-width: 100%;
height: auto;
border-radius: var(--radius);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
opacity: 0.85;
transition: opacity .2s ease-in-out, border-radius .2s ease-in-out;
}
.album-art:hover, .album-art:focus {
opacity: 1;
border-radius: 0;
}
/* --------------------------------------------------- now-playing text */
.np {
margin: 0;
font-size: 1.2rem;
font-weight: 600;
line-height: 1.4;
min-height: 1.4em;
word-break: break-word;
}
/* --------------------------------------------------------- audio player */
.player {
width: 100%;
outline: 0;
}
audio[data-nostream] { display: none; }
/* -------------------------------------------------------------- buttons */
.btn-accent {
min-width: 120px;
padding: 9px 16px;
background: var(--accent);
color: var(--accent-text);
font-variant: small-caps;
font-size: 1rem;
border: 1px solid var(--accent);
border-radius: 6px;
cursor: pointer;
transition: background .15s ease, box-shadow .15s ease;
}
.btn-accent:hover, .btn-accent:focus {
background: var(--accent-hover);
border-color: var(--accent-hover);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
outline: 0;
}
/* --------------------------------------------------------------- lyrics */
.lyrics {
width: 100%;
max-height: 40vh;
overflow-y: auto;
text-align: left;
white-space: pre-line;
line-height: 1.5;
padding: 8px 4px;
color: var(--text);
}
/* ----------------------------------------------------- history panel */
.history-toggle {
position: fixed;
top: 16px;
right: 16px;
z-index: 30;
padding: 8px 14px;
background: var(--accent);
color: var(--accent-text);
font-variant: small-caps;
border: none;
border-radius: 8px;
cursor: pointer;
}
.history-toggle:hover, .history-toggle:focus { background: var(--accent-hover); outline: 0; }
.history {
position: fixed;
top: 0;
right: 0;
height: 100%;
width: min(90vw, 420px);
padding: 64px 16px 16px;
background: var(--surface);
box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
transform: translateX(100%);
transition: transform .35s ease;
overflow-y: auto;
z-index: 25;
}
.history.open { transform: translateX(0); }
.history-table {
width: 100%;
border-collapse: collapse;
font-size: 0.9rem;
text-align: left;
}
.history-table th, .history-table td {
padding: 6px 8px;
border-bottom: 1px solid rgba(255, 255, 255, 0.12);
vertical-align: top;
}
.history-table th { color: var(--muted); font-weight: 600; }
/* ------------------------------------------------------------ listeners */
.listeners {
position: fixed;
bottom: 12px;
left: 12px;
font-size: 0.9rem;
color: var(--text);
opacity: 0.8;
}
/* ------------------------------------------------------------ responsive */
@media (max-width: 575px) {
body { background: var(--bg-mobile); }
.column { background: transparent; padding: 12px; }
.history { width: min(96vw, 420px); }
}
@media print {
html, body { display: none; }
}