Added user icon to usernames, with heart icon denoting supporter status

This commit is contained in:
Victoria Wang 2014-10-21 16:25:52 -07:00
parent f30b77a3e0
commit a1ba1a0974
5 changed files with 27 additions and 16 deletions

View file

@ -1176,7 +1176,19 @@ a.tag:hover {
padding-top: 0px;
padding-bottom: 4px;
}
.dropdown-submenu .dropdown-menu {
width: 1px;
}
.fa-heart {
font-size: 0.7em;
color: #e93250;
vertical-align: .45em;
margin-left: -.15em;
}
.fa-user {
margin-right: 0.25em;
display: inline;
font-size: 10px;
vertical-align: .1em;
margin-left: .1em;
}

View file

@ -37,10 +37,6 @@
width: 28%;
text-align: right;
}
.fa-user {
margin-right: .45em;
display: inline;
}
.site-tags {
width: 100%;
height: 1.4em;
@ -50,6 +46,9 @@
.site-tags .fa-tag {
vertical-align: -2px;
}
.fa-user {
margin-right: .45em;
}
}
.title {
margin-top: 8px;

View file

@ -18,13 +18,13 @@
<div class="news-item follow">
<div class="title">
<div class="icon"></div>
<% actioning_site = event.actioning_site_dataset.select(:id, :username, :title, :domain).first %>
<% event_site = event.site_dataset.select(:id, :username, :title, :domain).first %>
<% actioning_site = event.actioning_site_dataset.select(:id, :username, :title, :domain, :stripe_customer_id).first %>
<% event_site = event.site_dataset.select(:id, :username, :title, :domain, :stripe_customer_id).first %>
<% if current_site && current_site.id == actioning_site.id %>
You
<% else %>
<a href="/site/<%= actioning_site.username %>" class="user" title="<%= actioning_site.title %>"><%= actioning_site.username %></a>
<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>
<% end %>
started following
@ -32,7 +32,7 @@
<% if current_site && event_site.id == current_site.id %>
your site!
<% else %>
<a href="/site/<%= event_site.username %>" class="user" title="<%= event_site.title %>"><%= 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? && !event_site.ended_supporter? %><i class="fa fa-heart"></i><% end %></i><%= event_site.username %></a>
<% end %>
<span class="date">
@ -86,10 +86,10 @@
<div class="content">
<div class="comments">
<% event.comments.each do |comment| %>
<% comment_actioning_site = comment.actioning_site_dataset.select(:id, :title, :domain, :username).first %>
<% 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', '82x62') %>">
<a href="/site/<%= comment_actioning_site.username %>" class="user" title="<%= comment_actioning_site.title %>"><%= comment_actioning_site.username %></a>
<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>
<span class="date">
<a href="?event_id=<%= event.id %>"><%= comment.created_at.ago %></a>
</span>

View file

@ -1,5 +1,5 @@
<% actioning_site = profile_comment.actioning_site_dataset.select(:id, :username).first %>
<% site = profile_comment.site_dataset.select(:id, :username).first %>
<% actioning_site = profile_comment.actioning_site_dataset.select(:id, :username, :stripe_customer_id).first %>
<% site = profile_comment.site_dataset.select(:id, :username, :stripe_customer_id).first %>
<div class="title">
<div class="icon" style="background-image:url(<%= actioning_site.screenshot_url('index.html', '100x100') %>);"></div>
@ -7,14 +7,14 @@
<% if current_site && current_site.id == actioning_site.id && request.path == '/' %>
You
<% else %>
<a href="/site/<%= actioning_site.username %>" class="user"><%= actioning_site.username %></a>
<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>
<% end %>
<% if request.path == '/' %>
<% if current_site && current_site.id == profile_comment.site_id %>
left a comment on <a href="/site/<%= current_site.username %>">your profile</a>:
<% else %>
left a comment on <a href="/site/<%= profile_comment.site.username %>" class="user"><%= profile_comment.site.username %></a><%= site.username[site.username.length-1] == 's' ? "'" : "'s" %> site profile:
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:
<% end %>
<% end %>
<span class="date">

View file

@ -74,7 +74,7 @@
<div class="site-info">
<div class="username">
<a href="/site/<%= site.username %>" title="Profile">
<i class="fa fa-user"></i><%= site.username %>
<i class="fa fa-user"><% if site.supporter? && !site.ended_supporter? %><i class="fa fa-heart"></i><% end %></i><%= site.username %>
</a>
</div>
<div class="site-stats">