First attempt: Move username on top of embedded posts
This commit is contained in:
parent
6b5d9a1ede
commit
e713cc40c4
|
@ -2,6 +2,8 @@
|
||||||
//= require ./common/foundation/base
|
//= require ./common/foundation/base
|
||||||
|
|
||||||
@import "./common/foundation/variables";
|
@import "./common/foundation/variables";
|
||||||
|
@import "./common/foundation/colors";
|
||||||
|
@import "./common/base/onebox";
|
||||||
|
|
||||||
article.post {
|
article.post {
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
|
@ -39,32 +41,36 @@ article.post {
|
||||||
}
|
}
|
||||||
|
|
||||||
.author {
|
.author {
|
||||||
padding: 20px 0;
|
padding: 10px 5px;
|
||||||
width: 92px;
|
|
||||||
float: left;
|
float: left;
|
||||||
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
h3 {
|
h3.username {
|
||||||
text-align: center;
|
font-size: 13px;
|
||||||
color: #0088cc;
|
margin: 0 0 10px 0;
|
||||||
font-size: 13px;
|
word-wrap: break-word;
|
||||||
margin: 5px 0 0 0;
|
|
||||||
word-wrap: break-word;
|
|
||||||
|
|
||||||
a.staff {
|
a {
|
||||||
background-color: #ffffc2;
|
color: #5c5c5c
|
||||||
}
|
}
|
||||||
|
a.staff {
|
||||||
|
background-color: #ffffc2;
|
||||||
|
}
|
||||||
|
|
||||||
a.new-user {
|
a.new-user {
|
||||||
color: lighten($primary, 35%);
|
color: lighten($primary, 35%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span.title {
|
||||||
|
font-weight: normal;
|
||||||
|
color: #999;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cooked {
|
.cooked {
|
||||||
padding: 20px 0;
|
padding: 5px 0;
|
||||||
margin-left: 100px;
|
margin-left: 70px;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
@ -99,7 +105,7 @@ img.emoji {
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header.embedded {
|
||||||
padding: 10px 10px 20px 10px;
|
padding: 10px 10px 20px 10px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<header>
|
<header class='embedded'>
|
||||||
<% if @topic_view.topic.posts_count < 2 %>
|
<% if @topic_view.topic.posts_count < 2 %>
|
||||||
<%= link_to(I18n.t('embed.start_discussion'), @topic_view.topic.url, class: 'button', target: '_blank') %>
|
<%= link_to(I18n.t('embed.start_discussion'), @topic_view.topic.url, class: 'button', target: '_blank') %>
|
||||||
<% elsif @topic_view.topic.posts_count > 10 %>
|
<% elsif @topic_view.topic.posts_count > 10 %>
|
||||||
|
@ -17,11 +17,14 @@
|
||||||
|
|
||||||
<div class='author'>
|
<div class='author'>
|
||||||
<a href='/users/<%= post.username %>' target="_blank"><img src='<%= post.user.small_avatar_url %>'></a>
|
<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>
|
||||||
<div class='cooked'>
|
<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 %>
|
<%= raw post.cooked %>
|
||||||
|
|
||||||
<%- if post.reply_count > 0 %>
|
<%- if post.reply_count > 0 %>
|
||||||
|
|
Loading…
Reference in New Issue