From e713cc40c4c3cc7a227cfefe9099188dd56431c6 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 9 May 2014 15:14:00 -0400 Subject: [PATCH] First attempt: Move username on top of embedded posts --- app/assets/stylesheets/embed.css.scss | 42 +++++++++++++++------------ app/views/embed/comments.html.erb | 11 ++++--- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/app/assets/stylesheets/embed.css.scss b/app/assets/stylesheets/embed.css.scss index f5900c97b6a..51d2afe8b35 100644 --- a/app/assets/stylesheets/embed.css.scss +++ b/app/assets/stylesheets/embed.css.scss @@ -2,6 +2,8 @@ //= require ./common/foundation/base @import "./common/foundation/variables"; +@import "./common/foundation/colors"; +@import "./common/base/onebox"; article.post { border-bottom: 1px solid #ddd; @@ -39,32 +41,36 @@ article.post { } .author { - padding: 20px 0; - width: 92px; + padding: 10px 5px; float: left; - text-align: center; + } - h3 { - text-align: center; - color: #0088cc; - font-size: 13px; - margin: 5px 0 0 0; - word-wrap: break-word; + h3.username { + font-size: 13px; + margin: 0 0 10px 0; + word-wrap: break-word; - a.staff { - background-color: #ffffc2; - } + a { + color: #5c5c5c + } + a.staff { + background-color: #ffffc2; + } - a.new-user { - color: lighten($primary, 35%); - } + a.new-user { + color: lighten($primary, 35%); + } + + span.title { + font-weight: normal; + color: #999; } } .cooked { - padding: 20px 0; - margin-left: 100px; + padding: 5px 0; + margin-left: 70px; word-wrap: break-word; img { @@ -99,7 +105,7 @@ img.emoji { color: #999; } -header { +header.embedded { padding: 10px 10px 20px 10px; font-size: 18px; border-bottom: 1px solid #ddd; diff --git a/app/views/embed/comments.html.erb b/app/views/embed/comments.html.erb index 04f6714c505..5428fd99c7e 100644 --- a/app/views/embed/comments.html.erb +++ b/app/views/embed/comments.html.erb @@ -1,4 +1,4 @@ -
+
<% if @topic_view.topic.posts_count < 2 %> <%= link_to(I18n.t('embed.start_discussion'), @topic_view.topic.url, class: 'button', target: '_blank') %> <% elsif @topic_view.topic.posts_count > 10 %> @@ -17,11 +17,14 @@
+

+ <%= post.user.username %> + <%- if post.user.title.present? %> + <%= post.user.title %> + <%- end %> +

<%= raw post.cooked %> <%- if post.reply_count > 0 %>