posts: change how the mode menu indicates the active mode.

Instead of changing the background color of the entire page when you
change modes in the post mode menu (which was ugly, and not obvious what
the colors meant), show a notice and make it so that hovering a post
gives it a blue outline. This indicates that clicking the post will do
something different.
This commit is contained in:
evazion
2021-02-23 06:50:29 -06:00
parent de44f6c8e4
commit ac05da8de6
5 changed files with 27 additions and 44 deletions

View File

@@ -1,10 +1,10 @@
<%= tag.article id: "post_#{post.id}", **article_attrs do -%>
<%= link_to polymorphic_path(link_target, q: tags) do -%>
<picture>
<%= tag.picture do -%>
<%= tag.source media: "(max-width: 660px)", srcset: cropped_url -%>
<%= tag.source media: "(min-width: 660px)", srcset: post.preview_file_url -%>
<%= tag.img class: "has-cropped-#{post.has_cropped?}", src: post.preview_file_url, style: "min-width: #{preview_dimensions[:width]}px; min-height: #{preview_dimensions[:height]}px;", title: tooltip, alt: "post ##{post.id}" -%>
</picture>
<% end -%>
<% end -%>
<% if pool -%>
<p class="desc">

View File

@@ -4,10 +4,10 @@ article.post-preview {
height: 154px;
width: 154px;
margin: 0 10px 10px 0;
overflow: hidden;
text-align: center;
display: inline-block;
position: relative;
vertical-align: top;
a {
display: inline-block;