Merge violasong changes

This commit is contained in:
Kyle Drake 2014-10-24 16:26:40 -07:00
commit 58131f4964
7 changed files with 59 additions and 26 deletions

2
app.rb
View file

@ -471,7 +471,7 @@ get '/surf/?' do
end
get '/surf/:username' do |username|
@site = Site.select(:id, :username, :title, :domain, :views).where(username: username).first
@site = Site.select(:id, :username, :title, :domain, :views, :stripe_customer_id).where(username: username).first
@title = @site.title
not_found if @site.nil?
erb :'surf', layout: false

View file

@ -5,7 +5,7 @@
background:$c-Dark;
@include border-radius($radius*6);
@include box-shadow($bs-1);
color:$c-Lighter;
color:$c-Lighter!important;
cursor:pointer;
display:inline-block;
font:{family:$arial; size:$base}

View file

@ -510,6 +510,9 @@ a.tag:hover {
margin: 0 4px 4px 0;
float: left;
}
.misc-page.columns a:visited {
color: $c-Brand-1;
}
.news-item {
width: 100%;
float: left;
@ -520,7 +523,10 @@ a.tag:hover {
}
.news-item .user {
font-weight: bold;
color: #000;
color: #000!important;
}
.news-item .you {
color: #000!important;
}
.news-item .comment {
color: #000;
@ -533,7 +539,6 @@ a.tag:hover {
margin-top: .2em;
font-size: .9em;
margin-bottom: -.1em;
margin-left: 2.35em;
}
.news-item .icon {
width: 20px;
@ -579,7 +584,7 @@ a.tag:hover {
margin-top: .5em;
}
.news-item .date a {
color: #aaa;
color: #aaa!important;
}
.news-item .files {
background: #F5F5F5;
@ -616,15 +621,30 @@ a.tag:hover {
float: none;
margin-left: 4px;
}
.news-item .comments .actions, .news-item .comments p {
margin-left: 47px;
}
.news-item .comments p {
margin-bottom: .4em;
margin-top: .15em;
font-size: 1em;
}
.news-item .actions {
font-size: 11px;
margin-left: 2.9em;
margin-left: 32px;
}
.news-item .actions a {
margin-right: 6px;
}
.news-item .content {
padding: 0 0 0 32px;
padding: 0;
margin-left: 32px;
}
.news-item.comment .actions, .news-item.comment .content {
margin-left: 20px;
}
.news-item.comment .comments .actions {
margin-left: 47px;
}
.news-item .comments {
margin-top: .7em;
@ -632,6 +652,7 @@ a.tag:hover {
.news-item .comments .comment {
font-size: .8em;
clear: both;
margin-top: 1em;
}
.news-item .comments .comment .user {
margin-right: 5px;
@ -639,6 +660,10 @@ a.tag:hover {
.news-item .comments .comment .actions {
margin-top: .3em;
}
.news-item .comment-symbol {
font-size: 80%;
margin-left: .2em;
}
.news-item .avatar {
margin-right: 10px;
}
@ -662,6 +687,9 @@ a.tag:hover {
.interior .header-Outro .actions a {
margin-right: 6px;
}
.interior .header-Outro .actions a:first-of-type {
margin-left: 0;
}
.interior .header-Outro .stats {
margin-bottom: 1.2em;
float: left;

View file

@ -13,7 +13,7 @@
<% events.each do |event| %>
<% if event.profile_comment_id %>
<div class="news-item comment for-me" id="event_<%= event.id %>">
<%== erb :'_news_profile_comment', layout: false, locals: {profile_comment: event.profile_comment} %>
<%== erb :'_news_profile_comment', layout: false, locals: {profile_comment: event.profile_comment, event: event} %>
<% elsif event.follow_id %>
<div class="news-item follow">
<div class="title">
@ -22,15 +22,15 @@
<% event_site = event.site_dataset.select(:id, :username, :title, :domain, :stripe_customer_id).first %>
<% if current_site && current_site.id == actioning_site.id %>
You
<a href="/site/<%= current_site.username %>" class="you">You</a>
<% else %>
<i class="fa fa-user"><% if actioning_site.supporter? && !actioning_site.ended_supporter? %><i class="fa fa-heart"></i><% end %></i><a href="/site/<%= actioning_site.username %>" class="user" title="<%= actioning_site.title %>"><%= actioning_site.username %></a>
<a href="/site/<%= actioning_site.username %>" class="user" title="<%= actioning_site.title %>"><i class="fa fa-user"><% if actioning_site.supporter? && !actioning_site.ended_supporter? %><i class="fa fa-heart"></i><% end %></i><%= actioning_site.username %></a>
<% end %>
started following
followed
<% if current_site && event_site.id == current_site.id %>
your site.
<a href="/site/<%= current_site.username %>" class="you">you</a>
<% else %>
<a href="/site/<%= event_site.username %>" class="user" title="<%= event_site.title %>"><i class="fa fa-user"><% if event_site.supporter? && !event_site.ended_supporter? %><i class="fa fa-heart"></i><% end %></i><%= event_site.username %></a>
<% end %>
@ -91,7 +91,7 @@
<% comment_actioning_site = comment.actioning_site_dataset.select(:id, :title, :domain, :username, :stripe_customer_id).first %>
<div class="comment" id="comment_<%= comment.id %>">
<img class="avatar" src="<%= comment_actioning_site.screenshot_url('index.html', '50x50') %>">
<i class="fa fa-user"><% if comment_actioning_site.supporter? && !comment_actioning_site.ended_supporter? %><i class="fa fa-heart"></i><% end %></i><a href="/site/<%= comment_actioning_site.username %>" class="user" title="<%= comment_actioning_site.title %>"><%= comment_actioning_site.username %></a>
<a href="/site/<%= comment_actioning_site.username %>" class="user" title="<%= comment_actioning_site.title %>"><i class="fa fa-user"><% if comment_actioning_site.supporter? && !comment_actioning_site.ended_supporter? %><i class="fa fa-heart"></i><% end %></i><%= comment_actioning_site.username %></a>
<span class="date">
<a href="?event_id=<%= event.id %>"><%= comment.created_at.ago %></a>
</span>

View file

@ -8,13 +8,7 @@
<% end %>
<% end %>
<% if current_site && event.site.profile_comments_enabled && current_site.commenting_allowed? %>
<a id="reply" href="#" onclick="Template.renderComment(<%= event.id %>); return false">
<% if event.profile_comment_id %>
Reply
<% else %>
Comment
<% end %>
</a>
<a id="reply" href="#" onclick="Template.renderComment(<%= event.id %>); return false"><% if event.profile_comment_id %>Reply<% else %>Comment<% end %></a>
<% if event.profile_comment_id && event.created_by?(current_site) %>
<a id="editLink" href="#" onclick="ProfileComment.displayEditor('<%= event.id %>'); return false">Edit</a>
<% end %>

View file

@ -5,15 +5,17 @@
<div class="icon" style="background-image:url(<%= actioning_site.screenshot_url('index.html', '100x100') %>);"></div>
<% if current_site && current_site.id == actioning_site.id %>
You
<a href="/site/<%= current_site.username %>" class="you">You</a>
<% else %>
<i class="fa fa-user"><% if actioning_site.supporter? && !actioning_site.ended_supporter? %><i class="fa fa-heart"></i><% end %></i><a href="/site/<%= actioning_site.username %>" class="user"><%= actioning_site.username %></a>
<a href="/site/<%= actioning_site.username %>" class="user"><i class="fa fa-user"><% if actioning_site.supporter? && !actioning_site.ended_supporter? %><i class="fa fa-heart"></i><% end %></i><%= actioning_site.username %></a>
<% end %>
<i class="fa fa-chevron-right comment-symbol" title="commented on"></i>
<% if current_site && current_site.id == profile_comment.site_id %>
left a comment on <a href="/site/<%= current_site.username %>">your profile</a>:
<a href="/site/<%= current_site.username %>" class="you">You</a>
<% else %>
left a comment on <i class="fa fa-user"><% if profile_comment.site.supporter? && !profile_comment.site.ended_supporter? %><i class="fa fa-heart"></i><% end %></i><a href="/site/<%= profile_comment.site.username %>" class="user"><%= profile_comment.site.username %></a><%= site.username[site.username.length-1] == 's' ? "" : "'s" %> profile:
<a href="/site/<%= profile_comment.site.username %>" class="user"><i class="fa fa-user"><% if profile_comment.site.supporter? && !profile_comment.site.ended_supporter? %><i class="fa fa-heart"></i><% end %></i><%= profile_comment.site.username %></a>
<% end %>
<span class="date">
<a href="?event_id=<%= profile_comment.event.id %>"><%= profile_comment.created_at.ago %></a>

View file

@ -122,7 +122,16 @@
#top-bar .invisible a {
color: #3B3B3B;
}
#top-bar .fa-heart {
font-size: 0.7em;
color: #e93250;
vertical-align: .45em;
margin-left: -.15em;
}
#top-bar .fa-user {
display: inline;
font-size: 11px;
}
.hidden {
display:none!important;
visibility:hidden
@ -168,7 +177,7 @@
<% end %>
</ul>
<ul class="site-actions">
<li><a href="/site/<%= @site.username %>"><i class="fa fa-user"></i> <strong><%= @site.username %></strong></a></li>
<li><a href="/site/<%= @site.username %>"><i class="fa fa-user"><% if @site.supporter? && !@site.ended_supporter? %><i class="fa fa-heart"></i><% end %></i> <strong><%= @site.username %></strong></a></li>
<% if current_site && current_site != @site %>
<li>