a simple web player for subsonic tinysub.devins.page
subsonic navidrome javascript
9
fork

Configure Feed

Select the types of activity you want to include in your feed.

create a lookup table for all icons

the js bits just load the icons from the lookup table if need be.

Signed-off-by: oppiliappan <me@oppi.li>

authored by

oppiliappan and committed by
Tangled
fca3564d a0178e98

+20 -8
+12
src/index.html
··· 9 9 <link rel="stylesheet" href="css/components.css" /> 10 10 </head> 11 11 <body> 12 + <!-- icons used by tinysub --> 13 + <!-- this serves as a lookup table for the build process, which inlines the imgs into a single html --> 14 + <div id="icon-cache" style="display: none;"> 15 + <img id="icon-play" src="static/famfamfam-silk/control_play_blue.png" /> 16 + <img id="icon-pause" src="static/famfamfam-silk/control_pause_blue.png" /> 17 + <img id="icon-play-next" src="static/famfamfam-silk/control_fastforward_blue.png" /> 18 + <img id="icon-add" src="static/famfamfam-silk/add.png" /> 19 + <img id="icon-favorite" src="static/famfamfam-silk/heart.png" /> 20 + <img id="icon-move-up" src="static/famfamfam-silk/arrow_up.png" /> 21 + <img id="icon-move-down" src="static/famfamfam-silk/arrow_down.png" /> 22 + <img id="icon-remove" src="static/famfamfam-silk/cross.png" /> 23 + </div> 12 24 <!-- login panel --> 13 25 <div id="auth-modal" class="modal"> 14 26 <div class="modal-content">
+8 -8
src/js/constants.js
··· 64 64 }; 65 65 66 66 const ICONS = { 67 - PLAY: "static/famfamfam-silk/control_play_blue.png", 68 - PAUSE: "static/famfamfam-silk/control_pause_blue.png", 69 - PLAY_NEXT: "static/famfamfam-silk/control_fastforward_blue.png", 70 - ADD: "static/famfamfam-silk/add.png", 71 - FAVORITE: "static/famfamfam-silk/heart.png", 72 - MOVE_UP: "static/famfamfam-silk/arrow_up.png", 73 - MOVE_DOWN: "static/famfamfam-silk/arrow_down.png", 74 - REMOVE: "static/famfamfam-silk/cross.png", 67 + PLAY: document.getElementById("icon-play")?.src || "static/famfamfam-silk/control_play_blue.png", 68 + PAUSE: document.getElementById("icon-pause")?.src || "static/famfamfam-silk/control_pause_blue.png", 69 + PLAY_NEXT: document.getElementById("icon-play-next")?.src || "static/famfamfam-silk/control_fastforward_blue.png", 70 + ADD: document.getElementById("icon-add")?.src || "static/famfamfam-silk/add.png", 71 + FAVORITE: document.getElementById("icon-favorite")?.src || "static/famfamfam-silk/heart.png", 72 + MOVE_UP: document.getElementById("icon-move-up")?.src || "static/famfamfam-silk/arrow_up.png", 73 + MOVE_DOWN: document.getElementById("icon-move-down")?.src || "static/famfamfam-silk/arrow_down.png", 74 + REMOVE: document.getElementById("icon-remove")?.src || "static/famfamfam-silk/cross.png", 75 75 };