diff options
author | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-01-22 01:19:14 +0100 |
---|---|---|
committer | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-01-22 01:19:14 +0100 |
commit | 8aa8a8c12e6caffa1957a37c17296428c866fc9f (patch) | |
tree | fca4bb8fb5cfb341ae459a641345a1454f274bba /src | |
parent | 4f38020ffee95002a9c9f0ee1dfae093d626e80a (diff) |
feat(frontend): refine audio player styles
Diffstat (limited to 'src')
-rw-r--r-- | src/frontend/tubo/components/audio_player.cljs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/frontend/tubo/components/audio_player.cljs b/src/frontend/tubo/components/audio_player.cljs index d11bd3e..50cf704 100644 --- a/src/frontend/tubo/components/audio_player.cljs +++ b/src/frontend/tubo/components/audio_player.cljs @@ -55,10 +55,19 @@ muted? @(rf/subscribe [:muted]) !elapsed-time @(rf/subscribe [:elapsed-time]) !player @(rf/subscribe [:player]) + {:keys [current-theme]} @(rf/subscribe [:settings]) player-ready? (and @!player (> (.-readyState @!player) 0))] (when show-audio-player? - [:div.sticky.bottom-0.z-40.bg-white.dark:bg-neutral-900.p-3.sm:p-5.absolute.box-border.m-0 - {:style {:borderTop (str "2px solid " service-color) :display (when show-media-queue? "none")}} + [:div.sticky.bottom-0.z-40.p-3.sm:p-5.absolute.box-border.m-0 + {:style + {:display (when show-media-queue? "none") + :background-image (str (if (= current-theme "dark") + "linear-gradient(0deg, rgba(23, 23, 23, 0.95), rgba(23, 23, 23, 0.95)), url(\"" + "linear-gradient(0deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95)), url(\"") + thumbnail-url "\")") + :backgroundSize "cover" + :backgroundPosition "center" + :backgroundRepeat "no-repeat"}} [:div.flex.items-center.justify-between [:div.flex.items-center [:div {:style {:height "40px" :width "70px" :maxWidth "70px" :minWidth "70px"}} |