mirror of
https://github.com/heyarne/airsonic-ui.git
synced 2026-05-07 02:33:39 +02:00
Simplify album listing view function, add text-overflow to thumbs
This commit is contained in:
parent
d5c81f3b3a
commit
042d56bd24
3 changed files with 15 additions and 9 deletions
|
|
@ -17,7 +17,7 @@
|
||||||
(defn listing [albums]
|
(defn listing [albums]
|
||||||
;; always show 5 in a row
|
;; always show 5 in a row
|
||||||
[:div
|
[:div
|
||||||
(for [albums (partition-all 6 albums)]
|
[:div.columns.is-multiline.is-mobile
|
||||||
[:div.columns
|
|
||||||
(for [[idx album] (map-indexed vector albums)]
|
(for [[idx album] (map-indexed vector albums)]
|
||||||
[:div.column.is-2 {:key idx} [preview album]])])])
|
^{:key idx} [:div.column.is-one-fifth-desktop.is-one-quarter-tablet.is-one-half-mobile
|
||||||
|
[preview album]])]])
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,8 @@
|
||||||
[(if is-playing? :media-pause :media-play) ::events/toggle-play-pause]
|
[(if is-playing? :media-pause :media-play) ::events/toggle-play-pause]
|
||||||
[:media-step-forward ::events/next-song]]]
|
[:media-step-forward ::events/next-song]]]
|
||||||
(map (fn [[icon-glyph event]]
|
(map (fn [[icon-glyph event]]
|
||||||
[:p.control>button.button.is-light {:on-click #(dispatch [event])}
|
^{:key icon-glyph} [:p.control>button.button.is-light
|
||||||
|
{:on-click #(dispatch [event])}
|
||||||
[icon icon-glyph]])
|
[icon icon-glyph]])
|
||||||
buttons))])
|
buttons))])
|
||||||
|
|
||||||
|
|
@ -29,7 +30,6 @@
|
||||||
(defn bottom-bar []
|
(defn bottom-bar []
|
||||||
(let [currently-playing @(subscribe [::subs/currently-playing])
|
(let [currently-playing @(subscribe [::subs/currently-playing])
|
||||||
is-playing? @(subscribe [::subs/is-playing?])]
|
is-playing? @(subscribe [::subs/is-playing?])]
|
||||||
(println "is-playing?" is-playing?)
|
|
||||||
[:nav.navbar.is-fixed-bottom.playback-area
|
[:nav.navbar.is-fixed-bottom.playback-area
|
||||||
[:div.navbar-brand
|
[:div.navbar-brand
|
||||||
[:div.navbar-item
|
[:div.navbar-item
|
||||||
|
|
|
||||||
|
|
@ -49,8 +49,14 @@
|
||||||
.missing-cover
|
.missing-cover
|
||||||
display: block
|
display: block
|
||||||
|
|
||||||
// make sure the grid doesn't overflow
|
.album-preview
|
||||||
.album-preview &
|
.title,
|
||||||
|
.subtitle
|
||||||
|
overflow: hidden
|
||||||
|
white-space: nowrap
|
||||||
|
text-overflow: ellipsis
|
||||||
|
|
||||||
|
.image.is-256x256
|
||||||
width: auto
|
width: auto
|
||||||
height: auto
|
height: auto
|
||||||
max-width: 256px
|
max-width: 256px
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue