1
0
Fork 0
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:
Arne Schlüter 2018-06-03 15:40:00 +02:00
commit 042d56bd24
3 changed files with 15 additions and 9 deletions

View file

@ -17,7 +17,7 @@
(defn listing [albums]
;; always show 5 in a row
[:div
(for [albums (partition-all 6 albums)]
[:div.columns
[:div.columns.is-multiline.is-mobile
(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]])]])

View file

@ -20,7 +20,8 @@
[(if is-playing? :media-pause :media-play) ::events/toggle-play-pause]
[:media-step-forward ::events/next-song]]]
(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]])
buttons))])
@ -29,7 +30,6 @@
(defn bottom-bar []
(let [currently-playing @(subscribe [::subs/currently-playing])
is-playing? @(subscribe [::subs/is-playing?])]
(println "is-playing?" is-playing?)
[:nav.navbar.is-fixed-bottom.playback-area
[:div.navbar-brand
[:div.navbar-item

View file

@ -49,8 +49,14 @@
.missing-cover
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
height: auto
max-width: 256px