1
0
Fork 0
mirror of https://github.com/heyarne/airsonic-ui.git synced 2026-05-07 02:33:39 +02:00

Fix incorrect sizing of canvases, closes issue #36

Plus probably another of other unnoticed css-bugs because hiccup doesn't
interpret :class-name anymore
This commit is contained in:
Arne Schlüter 2018-12-26 16:22:07 +01:00
commit aef4724953
4 changed files with 5 additions and 5 deletions

View file

@ -50,7 +50,7 @@
(.fill)))) (.fill))))
(defn current-progress [current-time seekable duration] (defn current-progress [current-time seekable duration]
[canvas {:class-name "current-progress-canvas" [canvas {:class "current-progress-canvas"
:draw #(draw-progress % current-time seekable duration)}]) :draw #(draw-progress % current-time seekable duration)}])
;; FIXME: It's ugly to have the canvas padding and styling scattered everywhere (sass, drawing code above, and here) ;; FIXME: It's ugly to have the canvas padding and styling scattered everywhere (sass, drawing code above, and here)

View file

@ -8,7 +8,7 @@
[:ul (for [[idx [route label]] (map-indexed vector items)] [:ul (for [[idx [route label]] (map-indexed vector items)]
(let [[_ params _] route] (let [[_ params _] route]
^{:key idx} [:li (when (= params active-item) ^{:key idx} [:li (when (= params active-item)
{:class-name "is-active"}) {:class "is-active"})
[:a {:href (apply url-for route)} label]]))]]) [:a {:href (apply url-for route)} label]]))]])
;; this variable determines how many pages before the first known page we should list ;; this variable determines how many pages before the first known page we should list

View file

@ -33,7 +33,7 @@
(defn missing-cover (defn missing-cover
[item size] [item size]
[canvas {:class-name "missing-cover" [canvas {:class "missing-cover"
:draw #(generate-cover % item)}]) :draw #(generate-cover % item)}])
(defn has-cover? [item] (defn has-cover? [item]
@ -45,7 +45,7 @@
[item size] [item size]
(let [original @(subscribe [::subs/cover-url item size]) (let [original @(subscribe [::subs/cover-url item size])
retina @(subscribe [::subs/cover-url item (* 2 size)])] retina @(subscribe [::subs/cover-url item (* 2 size)])]
[:figure {:class-name (str "image is-" size "x" size)} [:figure {:class (str "image is-" size "x" size)}
(if (has-cover? item) (if (has-cover? item)
[:img {:src original [:img {:src original
:srcSet (str original ", " retina " 2x")}] :srcSet (str original ", " retina " 2x")}]

View file

@ -9,6 +9,6 @@
(let [class (case (:level notification) (let [class (case (:level notification)
:error "danger" :error "danger"
"info")] "info")]
^{:key id} [:div {:class-name (str "notification is-small is-" class)} ^{:key id} [:div {:class (str "notification is-small is-" class)}
[:button.delete {:on-click #(dispatch [:notification/hide id])}] [:button.delete {:on-click #(dispatch [:notification/hide id])}]
(:message notification)]))]) (:message notification)]))])