Permalink
Browse files

Update all the things

  • Loading branch information...
1 parent 722810d commit e9b36eb4285fc91736860ce368c6b3bc74942c44 @excid3 committed Dec 25, 2012
@@ -37,19 +37,28 @@ input[type="file"] { line-height: normal; }
color: #888;
float: right;
font-size: 0.7em;
+ opacity: .25;
+ -webkit-transition: ease-out all 300ms;
+ -webkit-transition-delay: 0ms;
+ -moz-transition: ease-out all 300ms 0ms;
+ -o-transition: ease-out all 300ms 0ms;
+ transition: ease-out all 300ms 0ms;
+
+ &:hover {
+ opacity: 1;
+ }
}
.hits {
margin-left: 6px;
}
.link-actions {
- float: right;
display: none;
}
&:hover {
- .link-actions { display: block; }
+ .link-actions { display: inline-block; }
}
}
@@ -81,12 +90,10 @@ input[type="file"] { line-height: normal; }
.contributor {
position: relative;
- margin-left: 20px;
- padding-left: 80px;
+ padding-left: 60px;
min-height: 80px;
img {
- border-radius: 4px;
position: absolute;
top: 0;
left: 0;
@@ -104,16 +111,14 @@ input[type="file"] { line-height: normal; }
.comment {
position: relative;
- margin-left: 20px;
- padding-left: 80px;
+ padding-left: 60px;
min-height: 80px;
.avatar {
img {
- border-radius: 4px;
- position: absolute;
- top: 0;
- left: 0;
+ position: absolute;
+ top: 0;
+ left: 0;
}
}
@@ -1,4 +1,9 @@
module ApplicationHelper
+ def avatar_image(email, options=nil)
+ options ||= {gravatar: {size: 48, default: "mm"}, class: "img-rounded"}
+ gravatar_image_tag(email, options)
+ end
+
def nav_link(active_on, &block)
active = controller_name == active_on ? "active" : ""
content_tag :li, class: active, &block
@@ -10,14 +10,14 @@
<h4>Feed Contributors</h4>
<div class="contributor">
- <%= link_to gravatar_image_tag("excid3@gmail.com", gravatar: {size: 60, default: "mm"}), "http://excid3.com", target: "_blank" %>
+ <%= link_to avatar_image("excid3@gmail.com"), "http://excid3.com", target: "_blank" %>
<div class="name"><%= link_to "Chris Oliver", "http://excid3.com" %></div>
<div class="twitter">
<a href="https://twitter.com/excid3" class="twitter-follow-button" data-show-count="false" data-lang="en">Follow @excid3</a>
</div>
</div>
<div class="contributor">
- <%= link_to gravatar_image_tag("cosmodrome@gmail.com", gravatar: {size: 60, default: "mm"}), "http://archetyp.al", target: "_blank" %>
+ <%= link_to avatar_image("cosmodrome@gmail.com"), "http://archetyp.al", target: "_blank" %>
<div class="name"><%= link_to "Rob Long", "http://archetyp.al/", target: "_blank" %></div>
<div class="twitter">
<a href="https://twitter.com/plantimals" class="twitter-follow-button" data-show-count="false" data-lang="en">Follow @plantimals</a>
@@ -1,30 +1,27 @@
<div class="link well well-small">
<div class="details">
- Posted <%= time_ago_in_words link.created_at %> ago by <%= link.user.try(:full_name) %>
+ <%= link_to avatar_image(link.user.email), "#", rel: "tooltip", data: {placement: "left"}, title: "Posted by #{link.user.full_name} #{time_ago_in_words(link.created_at)} ago" %>
</div>
<%= link_to go_link_path(link), target: "_blank" do %><strong><%= link.title %></strong><% end %>
<br/>
<%= link_to go_link_path(link), target: "_blank" do %><small><%= truncate link.url, length: 80 %></small><% end %>
- <% if user_signed_in? %>
- <div class="pull-right hits"><span class="label"><%= pluralize link.link_hit.try(:count) || 0, "hit" %></span></div>
- <% end %>
- <div class="pull-right hits">
- <span class="label <%= "label-warning" if link.comments.count > 0 %>"><%= link_to link do %><i class="icon-comments"></i> <%= pluralize(link.comments.count, "comment") %><% end %>
- </span>
- </div>
+ <br />
+
+ <span class="label <%= "label-warning" if link.comments.count > 0 %>"><%= link_to link do %><i class="icon-comments"></i> <%= pluralize(link.comments.count, "comment") %><% end %></span>
<% if link.podcast %>
- <br />
- <span class="badge badge-warning">
+ <span class="label label-warning">
<%= link_to podcast_path(link.podcast) do %>
<i class="icon-headphones"></i> Podcast Available
<% end %>
</span>
<% end %>
<% if user_signed_in? %>
+ <span class="label"><%= pluralize link.link_hit.try(:count) || 0, "hit" %></span>
+
<div class="link-actions">
<%= link_to edit_link_path(link) do %>
<i class="icon-cog"></i>
@@ -1,13 +1,14 @@
<%= render partial: "link", locals: {link: @link} %>
<h4><%= pluralize @link.comments.count, "Comment" %></h4>
+<hr />
<% if user_signed_in? %>
<% @link.comments.each do |comment| %>
<div class="comment">
<div class="avatar">
- <%= gravatar_image_tag(comment.user.email, gravatar: {size: 60, default: "mm"}) %>
+ <%= avatar_image(comment.user.email) %>
</div>
<div>
@@ -24,7 +25,7 @@
<div class="comment">
<div class="avatar">
- <%= gravatar_image_tag(current_user.email, gravatar: {size: 60, default: "mm"}) %>
+ <%= avatar_image(current_user.email) %>
</div>
<div class="body">
<%= form_for [@link, @comment] do |f| %>
@@ -1,14 +1,14 @@
<h4>Feed Forward Hosts</h4>
<div class="contributor">
- <%= link_to gravatar_image_tag("excid3@gmail.com", gravatar: {size: 60, default: "mm"}), "http://excid3.com", target: "_blank" %>
+ <%= link_to avatar_image("excid3@gmail.com"), "http://excid3.com", target: "_blank" %>
<div class="name"><%= link_to "Chris Oliver", "http://excid3.com" %></div>
<div class="twitter">
<a href="https://twitter.com/excid3" class="twitter-follow-button" data-show-count="false" data-lang="en">Follow @excid3</a>
</div>
</div>
<div class="contributor">
- <%= link_to gravatar_image_tag("cosmodrome@gmail.com", gravatar: {size: 60, default: "mm"}), "http://archetyp.al", target: "_blank" %>
+ <%= link_to avatar_image("cosmodrome@gmail.com"), "http://archetyp.al", target: "_blank" %>
<div class="name"><%= link_to "Rob Long", "http://archetyp.al/", target: "_blank" %></div>
<div class="twitter">
<a href="https://twitter.com/plantimals" class="twitter-follow-button" data-show-count="false" data-lang="en">Follow @plantimals</a>

0 comments on commit e9b36eb

Please sign in to comment.