votes: fixup various minor issues.

* Add a gap between thumbnails on mobile.
* Adjust CSS for scores and vote buttons.
* Include "Private favorites" as an incentive on the user upgrade page.
* Fix vote buttons not being visible beneath thumbnails on mobile.
* Fix the "Show scores" link not preserving the current page number.
* Fix vote buttons being unintentionally enabled for all thumbnails by default.
* Fix banned and restricted users being able to favorite posts by
  tagging them with `fav:self`.
* Fix search engines being able to crawl /posts?view=score pages.
* Fix broken tests.
This commit is contained in:
evazion
2021-11-19 22:40:34 -06:00
parent 3ae62d08eb
commit eda23c719a
20 changed files with 108 additions and 94 deletions

View File

@@ -55,8 +55,8 @@
<% end %>
</p>
<% elsif show_votes -%>
<p class="desc">
<div class="post-preview-score text-sm mt-1">
<%= render_post_votes post, current_user: current_user %>
</p>
</div>
<% end -%>
<% end -%>

View File

@@ -1,12 +1,10 @@
@import "../../javascript/src/styles/base/000_vars.scss";
article.post-preview {
width: 154px;
margin: 0 10px 10px 0;
text-align: center;
display: inline-block;
position: relative;
vertical-align: top;
overflow: hidden;
a {
display: inline-block;
@@ -119,38 +117,16 @@ body[data-current-user-can-approve-posts="true"] .post-preview {
}
}
@media screen and (max-width: 660px) {
@media screen and (min-width: 660px) {
article.post-preview {
margin: 0;
text-align: center;
vertical-align: middle;
display: inline-block;
a {
margin: 0 auto;
}
img {
max-width: 33.3vw;
max-height: 33.3vw;
border: none !important;
}
}
.user-disable-cropped-false {
article.post-preview {
width: 33.3%;
height: 33.3vw;
overflow: hidden;
}
img {
width: 33.3vw;
height: 33.3vw;
&.has-cropped-false {
object-fit: cover;
}
}
width: 154px;
margin: 0 10px 10px 0;
vertical-align: top;
}
}
@media screen and (max-width: 660px) {
article.post-preview img {
border: none !important;
}
}