Skip to content

Commit

Permalink
Dont re-render sharing boxes, they are global
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Johansson committed Jun 18, 2011
1 parent e222b61 commit 281bcc9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
9 changes: 0 additions & 9 deletions app/views/jokes/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,3 @@
</div>
</div>
<% end %>

<div class="sharing">
<div>
<a href="http://twitter.com/share?url=<%= url_encode(request.host) %>&text=<%= url_encode("Did you just #Gotanjoke?! http://#{request.host}") %>&related=richardjohansso,joakwest" class="twitter-share-button" data-count="vertical">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</div>
<div>
<iframe src="http://www.facebook.com/plugins/like.php?app_id=137347343007578&amp;href=<%= url_encode(request.host) %>&amp;send=false&amp;layout=box_count&amp;width=50&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;font&amp;height=90" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"> </iframe>
</div>
</div>
9 changes: 9 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@

<%= yield %>
</article>

<div class="sharing">
<div>
<a href="http://twitter.com/share?url=<%= url_encode(request.host) %>&text=<%= url_encode("Did you just #Gotanjoke?! http://#{request.host}") %>&related=richardjohansso,joakwest" class="twitter-share-button" data-count="vertical">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</div>
<div>
<iframe src="http://www.facebook.com/plugins/like.php?app_id=137347343007578&amp;href=<%= url_encode(request.host) %>&amp;send=false&amp;layout=box_count&amp;width=50&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;font&amp;height=90" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"> </iframe>
</div>
</div>

<% if Rails.env.production? %>
<!-- Chartbeat start -->
Expand Down
2 changes: 1 addition & 1 deletion public/stylesheets/tc1.css
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ input[type="submit"].primary:hover;{

.sharing{
text-align: center;
margin: 30px auto;
margin: 0 auto;
}

.sharing div{
Expand Down

0 comments on commit 281bcc9

Please sign in to comment.