Something went wrong. Try again.
a simple but full-featured web player for OpenSubsonic music servers (Navidrome, Gonic, Ampache, etc) devins.page/tinysub
svelte typescript javascript subsonic gonic navidrome
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532/* LAYOUT */body { height: 100vh; display: grid; grid-template-columns: 20rem 1fr; grid-template-rows: 1fr auto auto; grid-template-areas: "sidebar main" "header header" "footer footer";}
@supports (height: 100dvh) { body { height: 100dvh; }}
/* HEADER */header { grid-area: header; display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.5rem; border-top: 1px solid var(--border); background: var(--bg-tertiary);}
#progress { flex: 1;}
#playback #loop-btn { opacity: 0.5;}
#playback #loop-btn.active { opacity: 1;}
/* BASE STYLES */button { background: none; border: none; display: inline-flex; align-items: center; gap: 0.5rem; color: inherit; font: inherit;}
@keyframes pulse { 0%, 100% { background-color: var(--playing); } 50% { background-color: var(--playing-pulse); }}
/* SIDEBAR */#sidebar { grid-area: sidebar; border-right: 1px solid var(--border); background: var(--bg-secondary); display: flex; flex-direction: column; min-height: 0;}
#sidebar h2 { font-size: 1rem; margin-block-start: 0.5rem;}
#sidebar h2 a { color: inherit; text-decoration: none;}
#sidebar ul { list-style: none;}
#sidebar li { margin-block-start: 0.5rem;}
/* sidebar - library */#sidebar #library { flex: 1; overflow-y: auto; min-height: 0; padding-inline: 1rem;}
/* sidebar - library - tree items */#sidebar #library .tree-item { display: flex; align-items: center; gap: 0.5rem;}
#sidebar #library .tree-toggle,#sidebar #library .tree-name { color: inherit; text-decoration: none; flex: 1; display: flex; gap: 0.5rem; align-items: center; min-width: 0;}
#sidebar #library .tree-toggle span,#sidebar #library .tree-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
#sidebar #library .tree-action.disabled { opacity: 0.5;}
#sidebar #library .tree-toggle img,#sidebar #library .tree-name img { width: var(--art-artist); height: var(--art-artist); aspect-ratio: 1 / 1; object-fit: cover; flex-shrink: 0;}
#sidebar #library ul.nested > li .tree-toggle img,#sidebar #library ul.nested > li .tree-name img { width: var(--art-album); height: var(--art-album);}
#sidebar #library .nested,#sidebar #library .nested-songs { list-style: none; margin-inline-start: 1rem;}
#sidebar #library .nested li { margin-block-start: 0.25rem;}
#sidebar #library #library-search { width: 100%; margin-block-start: 0.5rem;}
#sidebar #library .tree-toggle.focused,#sidebar #library .tree-name.focused,#sidebar #library .section-toggle.focused { background: Highlight; color: HighlightText;}
#sidebar #library:not(:focus-within) .tree-toggle.focused,#sidebar #library:not(:focus-within) .tree-name.focused,#sidebar #library:not(:focus-within) .section-toggle.focused { background: GrayText;}
/* sidebar - now playing */#sidebar #now-playing { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 1rem; border-top: 1px solid var(--border-subtle); flex-shrink: 0;}
#sidebar #now-playing #cover-art { width: var(--art-now-playing); height: var(--art-now-playing); object-fit: cover;}
#sidebar #now-playing #track-info { text-align: center; width: 100%;}
#sidebar #now-playing #track-title { font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
#sidebar #now-playing #track-artist { font-size: 0.8rem; opacity: 0.75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
#sidebar #now-playing #track-lyric { font-size: 0.8rem; opacity: 0.75;}
/* QUEUE */#queue { grid-area: main; overflow-y: auto; padding-inline: 1rem;}
#queue #queue-table { width: 100%; border-collapse: collapse; table-layout: fixed; margin-block-start: 0.5rem;}
#queue #queue-table th,#queue #queue-table td { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
/* queue - cover art column */#queue #queue-table th:nth-child(1),#queue #queue-table td:nth-child(1) { width: calc(var(--art-song) * 1.5);}
/* queue - duration column */#queue #queue-table th:nth-child(5),#queue #queue-table td:nth-child(5) { width: 6rem;}
/* queue - actions column */#queue #queue-table th:nth-child(6),#queue #queue-table td:nth-child(6) { text-align: right; overflow: visible; white-space: normal;}
#queue #queue-table td:nth-child(6) button { margin-inline-start: 0.5rem;}
/* queue - rows */#queue #queue-table tbody tr.stripe { background: var(--bg-secondary);}
html:not(.no-animations) #queue #queue-table tbody tr.currently-playing { animation: pulse 4s linear infinite;}
#queue #queue-table tbody tr.currently-playing { background: var(--playing);}
#queue #queue-table tbody tr.dragging { opacity: 0.5;}
#queue #queue-table tbody tr.selected { background: Highlight; color: HighlightText;}
#queue:not(:focus-within) #queue-table tbody tr.selected { background: GrayText;}
#queue #queue-table tbody tr.drag-over-above { border-block-start: 2px solid currentColor;}
#queue #queue-table tbody tr.drag-over-below { border-block-end: 2px solid currentColor;}
/* queue - row items */#queue #queue-table .queue-cover { width: var(--art-song); height: var(--art-song); aspect-ratio: 1 / 1; object-fit: cover; flex-shrink: 0;}
#queue #queue-table .queue-favorite { opacity: 0.25;}
#queue #queue-table .queue-favorite:hover { opacity: 0.5;}
#queue #queue-table .queue-favorite.favorited { opacity: 1;}
#queue #queue-table .queue-rating-star { opacity: 0.25;}
#queue #queue-table .queue-rating-star:hover { opacity: 0.5;}
#queue #queue-table .queue-rating-star.rated { opacity: 1;}
#queue #queue-table .queue-play,#queue #queue-table .queue-play-next,#queue #queue-table .queue-move-up,#queue #queue-table .queue-move-down { display: none;}
/* FOOTER */#footer { grid-area: footer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 1rem; border-top: 1px solid var(--border-subtle); background: var(--bg-tertiary);}
#footer #actions { display: flex; align-items: center; gap: 1rem;}
/* CONTEXT MENU */#context-menu { position: fixed; background: Menu; border: 1px solid var(--border); border-radius: 0.25rem; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); z-index: 1000; min-width: 10rem;}
html:not(.no-animations) #context-menu { background: var(--bg-context-menu); backdrop-filter: blur(16px);}
#context-menu .context-menu-item { display: block; width: 100%; padding: 0.25rem 1rem; background: none; border: none; text-align: left;}
#context-menu .context-menu-item:hover { background: Highlight; color: HighlightText;}
#context-menu .context-menu-item.focused { background: Highlight; color: HighlightText;}
/* MODAL */.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.75); display: flex; align-items: center; justify-content: center; z-index: 2000;}
.modal.hidden { display: none;}
.modal-content { background: Menu; border: 1px solid var(--border); padding: 1rem; max-height: 100%; min-width: 24rem; overflow-y: auto; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); display: flex; flex-direction: column; gap: 1rem;}
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end;}
.modal-actions button { background: ButtonFace; padding: 0.5rem 1rem;}
#keyboard-help-modal .shortcuts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem;}
#keyboard-help-modal .shortcut-section-group { display: flex; flex-direction: column; gap: 0.5rem;}
#keyboard-help-modal .shortcuts-items-grid { display: grid; grid-template-columns: 10rem 1fr; gap: 0.5rem 1rem;}
#keyboard-help-modal kbd { background: ButtonFace; padding: 0.25rem 0.5rem; font-family: ui-monospace, monospace;}
/* form groups */.form-group { display: flex; flex-direction: column; gap: 1rem;}
.modal-content form { display: flex; flex-direction: column; gap: 1rem;}
/* UTILITIES *//* danger */.danger { color: var(--error-color);}
button.danger { background-color: var(--error-color); color: white;}
/* famfamfam-silk icons - force pixelated rendering for retina displays */img[src*="famfamfam-silk"] { image-rendering: pixelated;}
/* MEDIA QUERIES */@media (max-width: 768px) { /* layout */ body { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr auto auto; grid-template-areas: "main" "sidebar" "header" "footer"; }
/* queue - hide album and duration columns */ #queue-table th:nth-child(4), #queue-table th:nth-child(5), #queue-table td:nth-child(4), #queue-table td:nth-child(5) { display: none; }
#sidebar { border-right: none; border-top: 1px solid var(--border); overflow: hidden; }
/* sidebar - now playing cover art */ #now-playing #cover-art { display: none; }
/* footer - button labels */ footer button span { display: none; }}
@media (pointer: coarse) { /* queue - show action buttons */ #queue #queue-table .queue-play, #queue #queue-table .queue-play-next, #queue #queue-table .queue-move-up, #queue #queue-table .queue-move-down { display: inline-block; }
/* queue - hide artist column */ #queue-table th:nth-child(3), #queue-table td:nth-child(3) { display: none; }}