Files
danbooru/app/views/posts/partials/index/_excerpt.html.erb
evazion 1e80540a04 css: refactor CSS to use Tailwind-style utility classes.
Refactor CSS to use standard Tailwind-style utility classes instead of
ad-hoc rules. This eliminates a lot of single-purpose rules for specific
UI elements and standardizes margins to be more consistent throughout
the site.

Utility classes are defined manually on an as-needed basis instead of
importing Tailwind as a whole. Naming conventions mostly follow
Tailwind's conventions, otherwise they follow Bootstrap.

* https://tailwindcss.com/docs/
* https://getbootstrap.com/docs/5.0/utilities/spacing/
2021-02-16 09:28:38 -06:00

71 lines
2.5 KiB
Plaintext

<%# post_set %>
<div id="excerpt" style="display: none;">
<% if post_set.artist.present? && post_set.artist.is_banned? && !policy(post_set.artist).can_view_banned? %>
<p>The artist requested removal of this page.</p>
<% elsif post_set.artist.present? %>
<% post_set.artist.tap do |artist| %>
<% unless artist.wiki_page.blank? %>
<div class="prose">
<%= format_text(artist.wiki_page.body) %>
</div>
<% end %>
<div>
<%= render "artists/summary", artist: artist %>
<%= render "tag_relationships/alias_and_implication_list", tag: artist.tag %>
<p class="mt-4">
<% if artist.wiki_page.present? %>
<%= link_to "View wiki", artist.wiki_page, id: "view-wiki-link" %> |
<% end %>
<%= link_to "View artist", artist, id: "view-artist-link" %>
</p>
</div>
<% end %>
<% elsif post_set.wiki_page.present? %>
<% post_set.wiki_page.tap do |wiki_page| %>
<div class="prose">
<% if wiki_page.other_names.present? %>
<p><%= wiki_page_other_names_list(wiki_page) %></p>
<% end %>
<%= format_text(wiki_page.body) %>
<%= render "tag_relationships/alias_and_implication_list", tag: wiki_page.tag %>
<p class="mt-4">
<%= link_to_wiki "View wiki", wiki_page.title, id: "view-wiki-link" %>
</p>
</div>
<% end %>
<% elsif post_set.pool.present? %>
<% post_set.pool.tap do |pool| %>
<h2>
<%= pool.pretty_category %>:
<%= link_to pool.pretty_name, pool_path(pool), :class => "pool-category-#{pool.category}" %>
<% if pool.is_deleted? %>
<span class="inactive">(deleted)</span>
<% end %>
</h2>
<div id="description" class="prose">
<%= format_text(post_set.pool.description) %>
</div>
<p class="mt-4">
<%= link_to "View pool", pool_path(post_set.pool.id) %>
</p>
<% end %>
<% elsif post_set.favgroup.present? %>
<h2>
Favorite Group:
<%= link_to post_set.favgroup.pretty_name, favorite_group_path(post_set.favgroup) %>
</h2>
Creator: <%= link_to_user post_set.favgroup.creator %>
<% elsif post_set.has_blank_wiki? %>
<p>There is currently no wiki page for the tag <%= link_to_wiki post_set.tag.pretty_name %>. You can <%= link_to "create one", new_wiki_page_path(wiki_page: { title: post_set.tag.name }), rel: "nofollow" %>.</p>
<%= render "tag_relationships/alias_and_implication_list", tag: post_set.tag %>
<% end %>
</div>