b82f14ee7b
The 'pick a station to begin' state was too subtle on first install
(David's own 30-second panic moment when he uninstalled the dev build
and reinstalled from the Web Store, 2026-06-09 evening).
Two layered cues, both pure CSS driven by a body.is-first-run class:
1. Subtle accent-green glow pulses around:
- popup: the station list section
- newtab: the Quick Stations chip row
(rgba alpha 0.18-0.25, 2.4s ease-in-out infinite — visible but not noisy)
2. Bouncing ↓ arrow appended to the 'Pick a station to begin' text in
both surfaces (after-pseudo with translateY animation).
The is-first-run class is toggled in popup.js + newtab.js via a new
reflectFirstRunHint() function called from:
- init() once stations + currentStation are resolved
- onPickStation() the moment a user picks
- the chrome.storage.onChanged listener when another surface picks
(so the hint disappears on both surfaces simultaneously)
Existing users with stored currentStationId never see either cue —
the class only attaches when currentStation is null.
Working on branch v0.4.0-prep so the live main (= what shipped to
Web Store v0.3.0) is unchanged. Merge to main when ready to bump the
manifest version + readme.txt + CHANGELOG.md for v0.4.0 release.
348 lines
6.5 KiB
CSS
348 lines
6.5 KiB
CSS
/* RangerHQ Tuner popup — ~360x520, dark earthy palette echoing the
|
|
RangerHQ family brand (forest green + warm cream). Vanilla CSS,
|
|
no preprocessor, no build step. */
|
|
|
|
:root {
|
|
--bg: #0f1411;
|
|
--bg-soft: #1a221c;
|
|
--bg-row: #1f2823;
|
|
--bg-row-hi: #2a3530;
|
|
--fg: #e8e4d4;
|
|
--fg-muted: #97a094;
|
|
--accent: #6dbf7a; /* RangerHQ green */
|
|
--accent-dim: #2a7d3e;
|
|
--cream: #f4e9b7;
|
|
--danger: #c9685b;
|
|
--radius: 6px;
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
html, body {
|
|
margin: 0;
|
|
padding: 0;
|
|
width: 360px;
|
|
background: var(--bg);
|
|
color: var(--fg);
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
font-size: 13px;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
/* Header */
|
|
.tuner-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 10px 12px;
|
|
background: var(--bg-soft);
|
|
border-bottom: 1px solid #000;
|
|
}
|
|
|
|
.tuner-brand {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.tuner-brand h1 {
|
|
margin: 0;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
letter-spacing: 0.2px;
|
|
}
|
|
|
|
.tuner-dot {
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 50%;
|
|
background: var(--accent);
|
|
box-shadow: 0 0 8px var(--accent);
|
|
}
|
|
|
|
.tuner-state {
|
|
font-size: 11px;
|
|
color: var(--fg-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
padding: 2px 8px;
|
|
border-radius: 999px;
|
|
background: var(--bg-row);
|
|
}
|
|
|
|
.tuner-state[data-state="playing"] {
|
|
color: var(--bg);
|
|
background: var(--accent);
|
|
}
|
|
|
|
.tuner-state[data-state="buffering"] {
|
|
color: var(--bg);
|
|
background: var(--cream);
|
|
}
|
|
|
|
.tuner-state[data-state="error"] {
|
|
color: var(--cream);
|
|
background: var(--danger);
|
|
}
|
|
|
|
/* Now playing */
|
|
.now-playing {
|
|
padding: 10px 12px;
|
|
background: var(--bg-soft);
|
|
border-bottom: 1px solid #000;
|
|
}
|
|
|
|
.np-station {
|
|
font-weight: 600;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.np-track {
|
|
font-size: 12px;
|
|
color: var(--fg-muted);
|
|
margin-top: 2px;
|
|
min-height: 1.4em;
|
|
}
|
|
|
|
/* Controls */
|
|
.controls {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 10px 12px;
|
|
border-bottom: 1px solid #000;
|
|
}
|
|
|
|
.btn {
|
|
padding: 6px 14px;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
border: 1px solid var(--accent-dim);
|
|
border-radius: var(--radius);
|
|
background: var(--bg-row);
|
|
color: var(--fg);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.btn:hover:not(:disabled) {
|
|
background: var(--bg-row-hi);
|
|
}
|
|
|
|
.btn:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: var(--accent-dim);
|
|
}
|
|
|
|
.btn-primary[aria-pressed="true"] {
|
|
background: var(--accent);
|
|
color: var(--bg);
|
|
}
|
|
|
|
.vol-wrap {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
flex: 1;
|
|
}
|
|
|
|
.vol-label {
|
|
font-size: 11px;
|
|
color: var(--fg-muted);
|
|
}
|
|
|
|
#volume {
|
|
flex: 1;
|
|
accent-color: var(--accent);
|
|
}
|
|
|
|
/* Search */
|
|
.search-wrap {
|
|
display: block;
|
|
padding: 8px 12px 4px;
|
|
}
|
|
|
|
#search {
|
|
width: 100%;
|
|
padding: 6px 8px;
|
|
font-size: 12px;
|
|
background: var(--bg-row);
|
|
color: var(--fg);
|
|
border: 1px solid var(--bg-row-hi);
|
|
border-radius: var(--radius);
|
|
}
|
|
|
|
#search:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
/* Station list */
|
|
.station-list {
|
|
margin: 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
max-height: 280px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.station-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 8px 12px;
|
|
border-bottom: 1px solid var(--bg-soft);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.station-row:hover {
|
|
background: var(--bg-row);
|
|
}
|
|
|
|
.station-row.is-active {
|
|
background: var(--bg-row-hi);
|
|
border-left: 3px solid var(--accent);
|
|
padding-left: 9px;
|
|
}
|
|
|
|
.station-art {
|
|
width: 28px;
|
|
height: 28px;
|
|
border-radius: 4px;
|
|
background: var(--bg-soft);
|
|
flex-shrink: 0;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.station-meta {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.station-name {
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.station-genre {
|
|
font-size: 10px;
|
|
color: var(--fg-muted);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.station-empty {
|
|
padding: 16px;
|
|
text-align: center;
|
|
color: var(--fg-muted);
|
|
font-size: 12px;
|
|
}
|
|
|
|
/* Nav — quick-link row above the footer */
|
|
.tuner-nav {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
background: var(--bg-soft);
|
|
border-top: 1px solid #000;
|
|
gap: 1px;
|
|
}
|
|
|
|
.tuner-nav-btn {
|
|
background: var(--bg-soft);
|
|
color: var(--fg-muted);
|
|
border: 0;
|
|
padding: 8px 4px;
|
|
font: inherit;
|
|
font-size: 11px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 3px;
|
|
font-family: inherit;
|
|
}
|
|
|
|
.tuner-nav-btn:hover {
|
|
background: var(--bg-row);
|
|
color: var(--fg);
|
|
}
|
|
|
|
.tuner-nav-btn:active {
|
|
background: var(--bg-row-hi);
|
|
}
|
|
|
|
.tuner-nav-icon {
|
|
font-size: 14px;
|
|
line-height: 1;
|
|
color: var(--accent);
|
|
}
|
|
|
|
.tuner-nav-label {
|
|
letter-spacing: 0.3px;
|
|
}
|
|
|
|
/* Footer */
|
|
.tuner-footer {
|
|
padding: 6px 12px;
|
|
background: var(--bg-soft);
|
|
border-top: 1px solid var(--bg-row);
|
|
font-size: 10px;
|
|
color: var(--fg-muted);
|
|
text-align: center;
|
|
}
|
|
|
|
/* Scrollbar styling — subtle, on-brand */
|
|
.station-list::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
.station-list::-webkit-scrollbar-thumb {
|
|
background: var(--bg-row-hi);
|
|
border-radius: 3px;
|
|
}
|
|
.station-list::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
/* ──────────────────────────────────────────────────────────────────────
|
|
First-run UX hint (v0.4.0)
|
|
When body.is-first-run is set (no station picked), the station list
|
|
subtly pulses with an accent-green glow and the now-playing area gets
|
|
a bouncing ↓ arrow pointing the user at the list. Both removed the
|
|
moment a station is picked, so existing users never see them again.
|
|
────────────────────────────────────────────────────────────────────── */
|
|
|
|
@keyframes tuner-pulse-glow {
|
|
0%, 100% { box-shadow: 0 0 0 0 rgba(109, 191, 122, 0); }
|
|
50% { box-shadow: 0 0 0 4px rgba(109, 191, 122, 0.25); }
|
|
}
|
|
|
|
@keyframes tuner-bounce {
|
|
0%, 100% { transform: translateY(0); }
|
|
50% { transform: translateY(3px); }
|
|
}
|
|
|
|
body.is-first-run .stations {
|
|
animation: tuner-pulse-glow 2.4s ease-in-out infinite;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
body.is-first-run .np-track {
|
|
color: var(--accent);
|
|
font-weight: 500;
|
|
}
|
|
|
|
body.is-first-run .np-track::after {
|
|
content: " ↓";
|
|
display: inline-block;
|
|
animation: tuner-bounce 1.8s ease-in-out infinite;
|
|
margin-left: 4px;
|
|
}
|