diff --git a/app/javascript/src/styles/specific/comments.scss b/app/javascript/src/styles/specific/comments.scss index 0f3ae4f35..935a13f97 100644 --- a/app/javascript/src/styles/specific/comments.scss +++ b/app/javascript/src/styles/specific/comments.scss @@ -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 { diff --git a/app/javascript/src/styles/specific/forum.scss b/app/javascript/src/styles/specific/forum.scss index 21fca430e..b57e0bc45 100644 --- a/app/javascript/src/styles/specific/forum.scss +++ b/app/javascript/src/styles/specific/forum.scss @@ -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); } diff --git a/app/javascript/src/styles/specific/posts.scss b/app/javascript/src/styles/specific/posts.scss index bba21e189..c6a677755 100644 --- a/app/javascript/src/styles/specific/posts.scss +++ b/app/javascript/src/styles/specific/posts.scss @@ -320,10 +320,6 @@ div#c-posts { } } - div.notices { - margin: 1em 0; - } - #image-container { margin: 1em 0 0.5em; } diff --git a/app/views/comments/partials/index/_list.html.erb b/app/views/comments/partials/index/_list.html.erb index 52a522227..480bea2db 100644 --- a/app/views/comments/partials/index/_list.html.erb +++ b/app/views/comments/partials/index/_list.html.erb @@ -3,13 +3,13 @@ <%= render "comments/partials/index/header", :post => post %> <% end %> -
- <% 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) %> +
<%= 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 %> - <% end %> -
+
+ <% end %>
<% if comments.present? %> diff --git a/app/views/comments/partials/show/_comment.html.erb b/app/views/comments/partials/show/_comment.html.erb index 5906f847c..2dfcf2fae 100644 --- a/app/views/comments/partials/show/_comment.html.erb +++ b/app/views/comments/partials/show/_comment.html.erb @@ -12,22 +12,19 @@ data-below-threshold="<%= comment.score < CurrentUser.user.comment_threshold %>" data-is-voted="<%= comment.voted_by?(CurrentUser.user) %>">
-

+

<%= link_to_user comment.creator %> <% if comment.is_deleted? %> (deleted) <% end %> -

-

- <%= time_ago_in_words_tagged(comment.created_at) %> -

+ + <%= time_ago_in_words_tagged(comment.created_at) %>
<%= format_text(comment.body) %> - - <%= render "application/update_notice", record: comment %>
+ <%= render "application/update_notice", record: comment %> <% if CurrentUser.is_member? %> diff --git a/app/views/forum_posts/_forum_post.html.erb b/app/views/forum_posts/_forum_post.html.erb index 6c2909af4..0c5826b53 100644 --- a/app/views/forum_posts/_forum_post.html.erb +++ b/app/views/forum_posts/_forum_post.html.erb @@ -7,9 +7,7 @@ (deleted) <% end %> -

- <%= time_ago_in_words_tagged(forum_post.created_at) %> -

+ <%= time_ago_in_words_tagged(forum_post.created_at) %>