First attempt: Move username on top of embedded posts

This commit is contained in:
Robin Ward 2014-05-09 15:14:00 -04:00
parent 6b5d9a1ede
commit e713cc40c4
2 changed files with 31 additions and 22 deletions

View File

@ -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;

View File

@ -1,4 +1,4 @@
<header>
<header class='embedded'>
<% 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 @@
<div class='author'>
<a href='/users/<%= post.username %>' target="_blank"><img src='<%= post.user.small_avatar_url %>'></a>
<h3 class='username'>
<a href='/users/<%= post.username %>' target="_blank" class='<% if post.user.staff? %>staff<% end %><% if post.user.new_user? %>new-user<% end %>'><%= post.user.username %></a>
</h3>
</div>
<div class='cooked'>
<h3 class='username'>
<a href='/users/<%= post.username %>' target="_blank" class='<% if post.user.staff? %>staff<% end %><% if post.user.new_user? %>new-user<% end %>'><%= post.user.username %></a>
<%- if post.user.title.present? %>
<span class='title'><%= post.user.title %></span>
<%- end %>
</h3>
<%= raw post.cooked %>
<%- if post.reply_count > 0 %>