mirror of
https://github.com/heyarne/airsonic-ui.git
synced 2026-05-06 18:33:38 +02:00
Add links to similar artists in collection
This commit is contained in:
parent
f8094f0bde
commit
2d05cdf9d6
2 changed files with 30 additions and 11 deletions
|
|
@ -28,18 +28,30 @@
|
||||||
(when (:musicBrainzId artist-info)
|
(when (:musicBrainzId artist-info)
|
||||||
[musicbrainz-link artist-info])]))
|
[musicbrainz-link artist-info])]))
|
||||||
|
|
||||||
|
(defn similar-artists
|
||||||
|
"Given an artist-info response will return a list of similar artists"
|
||||||
|
[{similar-artists :similarArtist}]
|
||||||
|
[:div.tags.similar-artists
|
||||||
|
(for [{:keys [id name]} similar-artists]
|
||||||
|
^{:key id} [:a.tag {:href (routes/url-for ::routes/artist.detail {:id id})} name])])
|
||||||
|
|
||||||
(defn detail
|
(defn detail
|
||||||
"Creates a nice artist page displaying the artist's name, bio (if available and
|
"Creates a nice artist page displaying the artist's name, bio (if available and
|
||||||
listing) their albums."
|
listing) their albums."
|
||||||
[{:keys [artist artist-info]}]
|
[{:keys [artist artist-info]}]
|
||||||
[:div
|
[:div
|
||||||
[:section.hero>div.hero-body
|
[:section.hero.is-small>div.hero-body>div.container
|
||||||
[:div.container
|
[:h1.title (:name artist)]
|
||||||
[:h1.title (:name artist)]
|
[:div.content
|
||||||
[:div.content
|
[lastfm-bio artist-info]
|
||||||
[lastfm-bio artist-info]
|
[artist-links artist-info]]]
|
||||||
[artist-links artist-info]]]]
|
[:section.section.is-small>div.container
|
||||||
[:section.section>div.container [collection/listing (:album artist)]]])
|
[:h2.subtitle "Albums"]
|
||||||
|
[collection/listing (:album artist)]]
|
||||||
|
(when (:similarArtist artist-info)
|
||||||
|
[:section.section.is-small>div.container
|
||||||
|
[:h2.subtitle "Similar artists in your collection"]
|
||||||
|
[similar-artists artist-info]])])
|
||||||
|
|
||||||
(defn alphabetical-listing
|
(defn alphabetical-listing
|
||||||
[artists]
|
[artists]
|
||||||
|
|
|
||||||
|
|
@ -148,13 +148,20 @@
|
||||||
background-color: $light !important
|
background-color: $light !important
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
|
|
||||||
|
// useful in general to pull elements closer together; bulma es very generous
|
||||||
|
// with whitespace
|
||||||
|
.section.is-small
|
||||||
|
padding-top: 24px
|
||||||
|
padding-bottom: 24px
|
||||||
|
|
||||||
// occurs on many pages at the top to show details
|
// occurs on many pages at the top to show details
|
||||||
.hero
|
.hero
|
||||||
|
&.is-small + .section
|
||||||
|
padding-top: 0
|
||||||
|
|
||||||
.media-content
|
.media-content
|
||||||
align-self: center
|
align-self: center
|
||||||
|
|
||||||
&.is-small + .section
|
|
||||||
padding-top: 0
|
|
||||||
|
|
||||||
// floating notifications
|
// floating notifications
|
||||||
.notifications:not(:empty)
|
.notifications:not(:empty)
|
||||||
|
|
@ -199,7 +206,7 @@
|
||||||
|
|
||||||
ol
|
ol
|
||||||
list-style: none
|
list-style: none
|
||||||
|
|
||||||
+tablet
|
+tablet
|
||||||
column-count: 3
|
column-count: 3
|
||||||
+widescreen
|
+widescreen
|
||||||
|
|
@ -207,7 +214,7 @@
|
||||||
|
|
||||||
.group
|
.group
|
||||||
margin-bottom: 1.5rem
|
margin-bottom: 1.5rem
|
||||||
.subtitle.is-4
|
.subtitle.is-4
|
||||||
margin-bottom: 1rem
|
margin-bottom: 1rem
|
||||||
|
|
||||||
.album.detail
|
.album.detail
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue