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

@@ -34,7 +34,9 @@ class Artist < ApplicationRecord
extend ActiveSupport::Concern
def sorted_urls
urls.sort {|a, b| a.priority <=> b.priority}
urls.sort_by do |url|
[url.is_active? ? 0 : 1, url.priority, url.domain, url.secondary_url? ? 1 : 0, url.url]
end
end
def url_array