artists: make artist pages less shit.

* Group URLs by site.
* List most important URLs first and dead URLs last.
* Add site icons next to URLs.
* Put other names and group name beneath the artist name, instead of beneath the wiki.
This commit is contained in:
evazion
2022-02-08 20:04:51 -06:00
parent 51ba56e8a3
commit 7bbe6e9d22
9 changed files with 106 additions and 73 deletions

View File

@@ -11,8 +11,6 @@ class SourceDataComponent < ApplicationComponent
end
def profile_urls(artist)
artist.urls.active.reject(&:secondary_url?).sort_by do |artist_url|
[artist_url.priority, artist_url.domain, artist_url.url]
end
artist.sorted_urls.select(&:is_active?).reject(&:secondary_url?)
end
end