Updated alignments for new newsfeed

This commit is contained in:
Victoria Wang 2015-04-09 12:48:45 -07:00
parent baf5884b7b
commit a945904cfc
2 changed files with 32 additions and 36 deletions

View file

@ -708,8 +708,7 @@ a.tag:hover {
.news-item { .news-item {
width: 100%; width: 100%;
float: left; float: left;
margin: 1.25em 0 1.25em 0; padding: 1.2em 0 1.2em 0;
padding: 1em 0 0 0;
border-top: 1px solid #EBEBEB; border-top: 1px solid #EBEBEB;
} }
.news-item:nth-of-type(1) { .news-item:nth-of-type(1) {
@ -749,12 +748,6 @@ a.tag:hover {
} }
.news-item.comment .icon { .news-item.comment .icon {
background: #DAEEA5; background: #DAEEA5;
}
.news-item.comment.for-me .icon, .news-item.tip.for-me .icon {
}
.news-item .icon-mini {
} }
.news-item.update .icon { .news-item.update .icon {
background: #E93250; background: #E93250;
@ -762,9 +755,6 @@ a.tag:hover {
.news-item.tip .icon { .news-item.tip .icon {
background: #FFCC00; background: #FFCC00;
} }
.news-item.follow {
margin: .3em 0 .3em 0;
}
.news-item.follow .icon { .news-item.follow .icon {
background: #3399CC; background: #3399CC;
} }
@ -773,11 +763,16 @@ a.tag:hover {
position: relative; position: relative;
width: 100%; width: 100%;
float: left; float: left;
.text {
float: left;
margin-top: .45em;
}
} }
.news-item .date { .news-item .date {
float: right; float: right;
font-size: 11px; font-size: 11px;
margin-top: .5em; margin-top: 1.1em;
} }
.news-item .date a { .news-item .date a {
color: #aaa!important; color: #aaa!important;
@ -828,18 +823,15 @@ a.tag:hover {
.news-item .actions { .news-item .actions {
font-size: 11px; font-size: 11px;
} }
.news-item > .actions {
margin-left: 61px!important;
}
.news-item .actions a { .news-item .actions a {
margin-right: 6px; margin-right: 6px;
} }
.news-item .content { .news-item .content {
padding: 0; padding: 0;
margin-left: 32px; margin-left: 61px;
} }
.news-item.comment .actions, .news-item.comment .content { .news-item .actions, .news-item.comment .content {
margin-left: 20px; margin-left: 61px;
} }
.news-item.comment .comments .actions { .news-item.comment .comments .actions {
margin-left: 47px; margin-left: 47px;

View file

@ -22,20 +22,22 @@
<div class="icon"><a href="/site/<%= actioning_site.username %>" title="<%= actioning_site.username %>" class="avatar" style="background-image: url(<%= actioning_site.screenshot_url 'index.html', '50x50' %>);"></a></div> <div class="icon"><a href="/site/<%= actioning_site.username %>" title="<%= actioning_site.username %>" class="avatar" style="background-image: url(<%= actioning_site.screenshot_url 'index.html', '50x50' %>);"></a></div>
<% if current_site && current_site.id == actioning_site.id %> <div class="text">
<a href="/site/<%= current_site.username %>" class="you">You</a> <% if current_site && current_site.id == actioning_site.id %>
<% else %> <a href="/site/<%= current_site.username %>" class="you">You</a>
<a href="/site/<%= actioning_site.username %>" class="user" title="<%= actioning_site.title %>"><i class="fa fa-user"><% if actioning_site.supporter? %><i class="fa fa-heart"></i><% end %></i><%= actioning_site.username %></a> <% else %>
<% end %> <a href="/site/<%= actioning_site.username %>" class="user" title="<%= actioning_site.title %>"><i class="fa fa-user"><% if actioning_site.supporter? %><i class="fa fa-heart"></i><% end %></i><%= actioning_site.username %></a>
<% end %>
started following started following
<% if current_site && event_site.id == current_site.id %> <% if current_site && event_site.id == current_site.id %>
<a href="/site/<%= current_site.username %>" class="you">you</a> <a href="/site/<%= current_site.username %>" class="you">you</a>
<% else %> <% else %>
the <a class="user" href="http://<%= event_site.host %>" title="<%= event_site.title %>">site</a> of the <a class="user" href="http://<%= event_site.host %>" title="<%= event_site.title %>">site</a> of
<a href="/site/<%= event_site.username %>" class="user" title="<%= event_site.title %>"><i class="fa fa-user"><% if event_site.supporter? %><i class="fa fa-heart"></i><% end %></i><%= event_site.username %></a> <a href="/site/<%= event_site.username %>" class="user" title="<%= event_site.title %>"><i class="fa fa-user"><% if event_site.supporter? %><i class="fa fa-heart"></i><% end %></i><%= event_site.username %></a>
<% end %> <% end %>
</div>
<span class="date"> <span class="date">
<a href="/site/<%= event_site.username %>?event_id=<%= event.id %>"><%= event.created_at.ago %></a> <a href="/site/<%= event_site.username %>?event_id=<%= event.id %>"><%= event.created_at.ago %></a>
@ -45,12 +47,14 @@
<div class="news-item update"> <div class="news-item update">
<div class="title"> <div class="title">
<div class="icon"></div> <div class="icon"></div>
<% event_site = event.site_dataset.select(:id, :username, :title, :domain).first %> <div class="text">
<% if current_site && event_site.id == current_site.id %> <% event_site = event.site_dataset.select(:id, :username, :title, :domain).first %>
Your site was updated. <% if current_site && event_site.id == current_site.id %>
<% else %> Your site was updated.
<a href="/site/<%= event_site.username %>" class="user" title="<%= event_site.title %>"><%= event_site.title.shorten(45) %></a> has been updated. <% else %>
<% end %> <a href="/site/<%= event_site.username %>" class="user" title="<%= event_site.title %>"><%= event_site.title.shorten(45) %></a> has been updated.
<% end %>
</div>
<span class="date"> <span class="date">
<a href="/site/<%= event_site.username %>?event_id=<%= event.id %>"><%= event.created_at.ago %></a> <a href="/site/<%= event_site.username %>?event_id=<%= event.id %>"><%= event.created_at.ago %></a>
</span> </span>