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

Move all source files to src folder

This commit is contained in:
Arne Schlüter 2018-05-28 13:24:15 +02:00
commit 47c37e198c
20 changed files with 24 additions and 9 deletions

View file

@ -0,0 +1,15 @@
(ns airsonic-ui.views.cover
(:require [re-frame.core :refer [subscribe]]
[airsonic-ui.subs :as subs]
[airsonic-ui.api :as api]))
;; FIXME: The direct dependency on these subs is a bit ugly
(defn cover
[item size]
(let [server @(subscribe [::subs/server])
login @(subscribe [::subs/login])
url (partial api/cover-url server login item)]
[:figure {:class-name (str "image is-" size "x" size)}
[:img {:src (url size)
:srcset (str (url size) ", " (url (* 2 size)) " 2x")}]]))