diff --git a/app/assets/stylesheets/specific/posts.scss b/app/assets/stylesheets/specific/posts.scss index b32c1a254..ae118f21d 100644 --- a/app/assets/stylesheets/specific/posts.scss +++ b/app/assets/stylesheets/specific/posts.scss @@ -60,6 +60,10 @@ a.blacklisted-active { display: none; } +#excerpt p.links { + margin-top: 1em; +} + #image-container p.desc { font-size: 80%; color: grey; diff --git a/app/models/artist.rb b/app/models/artist.rb index cf324d5c4..7b10c2e25 100644 --- a/app/models/artist.rb +++ b/app/models/artist.rb @@ -108,13 +108,15 @@ class Artist < ActiveRecord::Base end def domains - Post.raw_tag_match(name).pluck(:source).map do |x| - begin - map_domain(Addressable::URI.parse(x).domain) - rescue Addressable::URI::InvalidURIError - nil - end - end.compact.inject(Hash.new(0)) {|h, x| h[x] += 1; h} + Cache.get("artist-domains-#{id}", 1.day) do + Post.raw_tag_match(name).pluck(:source).map do |x| + begin + map_domain(Addressable::URI.parse(x).domain) + rescue Addressable::URI::InvalidURIError + nil + end + end.compact.inject(Hash.new(0)) {|h, x| h[x] += 1; h}.sort {|a, b| b[1] <=> a[1]} + end end end diff --git a/app/views/posts/partials/index/_excerpt.html.erb b/app/views/posts/partials/index/_excerpt.html.erb index 3acf78220..0e6559226 100644 --- a/app/views/posts/partials/index/_excerpt.html.erb +++ b/app/views/posts/partials/index/_excerpt.html.erb @@ -4,75 +4,93 @@