css: unify comment and forum post css.
Unify comments and forum posts to have the same CSS and HTML structure. Fixes various minor spacing and styling inconsistencies.
This commit is contained in:
@@ -1,14 +1,22 @@
|
||||
@import "../base/000_vars.scss";
|
||||
|
||||
div.comments-for-post {
|
||||
div.hidden-comments-notice {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
div.list-of-comments {
|
||||
article.comment {
|
||||
display: flex;
|
||||
margin-bottom: 2em;
|
||||
margin-top: 2em;
|
||||
word-wrap: break-word;
|
||||
padding: 5px;
|
||||
flex: 1;
|
||||
|
||||
&:first-of-type {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
&[data-is-sticky="true"] {
|
||||
background: var(--comment-sticky-background-color);
|
||||
}
|
||||
@@ -37,9 +45,8 @@ div.comments-for-post {
|
||||
flex-basis: 12em;
|
||||
margin-right: 1em;
|
||||
|
||||
h1 {
|
||||
display: block;
|
||||
font-size: $h3_size;
|
||||
time {
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,10 +73,6 @@ div#c-comments {
|
||||
strong, time {
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
|
||||
div.notices {
|
||||
margin: 1em 0;
|
||||
}
|
||||
}
|
||||
|
||||
div.post-preview {
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
div.list-of-forum-posts {
|
||||
article {
|
||||
article.forum-post {
|
||||
display: flex;
|
||||
margin-top: 3em;
|
||||
margin-top: 2em;
|
||||
word-wrap: break-word;
|
||||
|
||||
&:first-of-type {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
a.voted {
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -25,7 +29,8 @@ div.list-of-forum-posts {
|
||||
}
|
||||
|
||||
div.author {
|
||||
flex-basis: 13em;
|
||||
flex-basis: 12em;
|
||||
margin-right: 1em;
|
||||
|
||||
time {
|
||||
font-style: italic;
|
||||
@@ -40,8 +45,6 @@ div.list-of-forum-posts {
|
||||
}
|
||||
|
||||
menu {
|
||||
margin-top: 0.5em;
|
||||
|
||||
ul.votes {
|
||||
margin: 0.5em 0;
|
||||
}
|
||||
@@ -88,13 +91,14 @@ div#c-forum-topics {
|
||||
padding: 0 0.5em;
|
||||
}
|
||||
|
||||
div.list-of-forum-posts article {
|
||||
div.list-of-forum-posts article.forum-post {
|
||||
display: block;
|
||||
margin-top: 1em;
|
||||
border: var(--forum-post-border);
|
||||
|
||||
div.author {
|
||||
padding: 1em 1em 0;
|
||||
margin: 0;
|
||||
padding: 1em;
|
||||
border-bottom: var(--forum-post-border);
|
||||
background: var(--forum-post-author-background);
|
||||
}
|
||||
|
||||
@@ -320,10 +320,6 @@ div#c-posts {
|
||||
}
|
||||
}
|
||||
|
||||
div.notices {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
#image-container {
|
||||
margin: 1em 0 0.5em;
|
||||
}
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
<%= render "comments/partials/index/header", :post => post %>
|
||||
<% end %>
|
||||
|
||||
<div class="row notices">
|
||||
<% if post.comments.hidden(CurrentUser.user).any? || (page == :comments && post.comments.size > 6) %>
|
||||
<% if post.comments.hidden(CurrentUser.user).any? || (page == :comments && post.comments.size > 6) %>
|
||||
<div class="row hidden-comments-notice">
|
||||
<span class="info" id="threshold-comments-notice-for-<%= post.id %>">
|
||||
<%= link_to "Show #{pluralize post.comments.hidden(CurrentUser.user).size, "hidden comment"}", comments_path(post_id: post.id), id: "show-all-comments-link", remote: true %>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="list-of-comments">
|
||||
<% if comments.present? %>
|
||||
|
||||
@@ -12,22 +12,19 @@
|
||||
data-below-threshold="<%= comment.score < CurrentUser.user.comment_threshold %>"
|
||||
data-is-voted="<%= comment.voted_by?(CurrentUser.user) %>">
|
||||
<div class="author">
|
||||
<h1>
|
||||
<h4>
|
||||
<%= link_to_user comment.creator %>
|
||||
<% if comment.is_deleted? %>
|
||||
(deleted)
|
||||
<% end %>
|
||||
</h1>
|
||||
<p>
|
||||
<%= time_ago_in_words_tagged(comment.created_at) %>
|
||||
</p>
|
||||
</h4>
|
||||
<%= time_ago_in_words_tagged(comment.created_at) %>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="body prose">
|
||||
<%= format_text(comment.body) %>
|
||||
|
||||
<%= render "application/update_notice", record: comment %>
|
||||
</div>
|
||||
<%= render "application/update_notice", record: comment %>
|
||||
|
||||
<% if CurrentUser.is_member? %>
|
||||
<menu>
|
||||
|
||||
@@ -7,9 +7,7 @@
|
||||
(deleted)
|
||||
<% end %>
|
||||
</h4>
|
||||
<p>
|
||||
<%= time_ago_in_words_tagged(forum_post.created_at) %>
|
||||
</p>
|
||||
<%= time_ago_in_words_tagged(forum_post.created_at) %>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="prose">
|
||||
|
||||
Reference in New Issue
Block a user