[Posts] Remove "captioned" css class from post previews

It's always set and serves no purpose
This commit is contained in:
Earlopain 2022-12-25 19:52:38 +01:00
parent 9a232ec448
commit df703a1c90
No known key found for this signature in database
GPG Key ID: 6CFB948E15246897
3 changed files with 4 additions and 12 deletions

View File

@ -7,9 +7,7 @@ class PostsDecorator < ApplicationDecorator
def preview_class(options)
post = object
klass = ["post-preview", "captioned"]
# Always captioned with new post stats section.
# klass << "captioned" if pool || size || similarity
klass = ["post-preview"]
klass << "post-status-pending" if post.is_pending?
klass << "post-status-flagged" if post.is_flagged?
klass << "post-status-deleted" if post.is_deleted?

View File

@ -5,23 +5,19 @@
article.post-preview {
box-sizing: border-box;
height: 154px;
height: auto;
width: 154px;
margin: 0 10px 10px 0;
overflow: hidden;
text-align: center;
display: inline-block;
position: relative;
vertical-align: text-top;
a {
display: inline-block;
}
&.captioned {
height: auto;
vertical-align: text-top;
}
.desc {
@include themable {
background-color: lighten( themed("color-section"), 5%);

View File

@ -88,9 +88,7 @@ class PostPresenter < Presenter
end
def self.preview_class(post, pool: nil, size: nil, similarity: nil, **options)
klass = ["post-preview", "captioned"]
# Always captioned with new post stats section.
# klass << "captioned" if pool || size || similarity
klass = ["post-preview"]
klass << "post-status-pending" if post.is_pending?
klass << "post-status-flagged" if post.is_flagged?
klass << "post-status-deleted" if post.is_deleted?