* Replace the .category-N CSS classes on tags with .tag-type-N. Before we were inconsistent about whether tag colors were indicated with .category-N or .tag-type-N. Now it's always .tag-type-N. * Fix various places to not use Tag.category_for. Tag.category_for does one Redis call per tag lookup, which leads to N Redis calls on many pages. This was inefficient because usually we either already had the tags from the database, or we could fetch them easily.
31 lines
904 B
Plaintext
31 lines
904 B
Plaintext
<% page_title "#{@artist.pretty_name.titleize} | Artist Profile" %>
|
|
<%= render "secondary_links" %>
|
|
|
|
<div id="c-artists">
|
|
<div id="a-show">
|
|
<h1>Artist: <%= link_to @artist.pretty_name, posts_path(tags: @artist.name), class: tag_class(@artist.tag) %></h1>
|
|
|
|
<% if @artist.notes.present? %>
|
|
<div class="prose">
|
|
<%= format_text(@artist.notes, :disable_mentions => true) %>
|
|
</div>
|
|
|
|
<p><%= link_to "View wiki page", @artist.wiki_page %></p>
|
|
<% end %>
|
|
|
|
<%= yield %>
|
|
|
|
<% if @artist.tag.present? && @artist.tag.post_count > 0 %>
|
|
<div class="recent-posts">
|
|
<h2>Recent Posts <%= link_to "»", posts_path(tags: @artist.name) %></h2>
|
|
|
|
<%= render "posts/partials/common/inline_blacklist" %>
|
|
|
|
<div>
|
|
<%= post_previews_html(@artist.tag.posts.limit(8), tags: @artist.name) %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|