Fixes shoutbox styling

This commit is contained in:
Luke Barratt 2014-05-10 13:43:40 +01:00
parent 314d47b7bf
commit 9156865068
3 changed files with 23 additions and 8 deletions

View file

@ -35,7 +35,12 @@
}
.shoutbox-messages {
@include span-columns(12);
display: table;
width: 100%;
.user {
width: 10%;
}
.timestamp {
margin: 0 5px 5px;

View file

@ -10,9 +10,12 @@
display: table-row;
margin-bottom: 5px;
clear: both;
position: relative;
.timestamp {
@extend .highlight;
.destroy {
position: absolute;
top: 0;
right: -10px;
}
.user {
@ -34,6 +37,11 @@
.message {
max-width: 66%;
display: table-cell;
padding-left: 10px;
.contents {
position: relative;
display: block;
padding: 0 10px;
}
}
}

View file

@ -1,9 +1,6 @@
<div class="shoutmsg">
<div class="user">
<span class="username">
<% if shoutmsg.can_destroy? cuser %>
<%= link_to icon('times'), shoutmsg, method: :delete %>
<% end %>
<%= namelink shoutmsg.user %>
</span>
<span class="time">
@ -11,6 +8,11 @@
</span>
</div>
<div class="message">
<%= shoutmsg.text %>
<div class="contents">
<%= shoutmsg.text %>
<% if shoutmsg.can_destroy? cuser %>
<%= link_to icon('times'), shoutmsg, method: :delete, class: 'destroy' %>
<% end %>
</div>
</div>
</div>