Skip to content

Commit

Permalink
Added Twitter sharing button
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Johansson committed Jun 18, 2011
1 parent 480e14f commit a4a96e4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
9 changes: 7 additions & 2 deletions app/views/jokes/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
</div>
<% end %>

<div class="facebook_like">
<iframe src="http://www.facebook.com/plugins/like.php?app_id=225510640812214&amp;href=<%= url_encode(joke_url(@joke)) %>&amp;send=false&amp;layout=standard&amp;width=300&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;font&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px; height:80px;" allowTransparency="true"></iframe>
<div class="sharing">
<div>
<a href="http://twitter.com/share?url=<%= url_encode(request.domain) %>" 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.domain) %>&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>
16 changes: 13 additions & 3 deletions public/stylesheets/tc1.css
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,19 @@ input[type="submit"].primary:hover;{
background: #6aa417;
}

.facebook_like{
text-align: right;
margin-top: 20px;
.sharing{
text-align: center;
margin: 30px auto;
}

.sharing div{
vertical-align: top;
width: 55px;
display: inline-block;
}

.sharing div:first-child{
margin-right: 5px;
}

.notice{
Expand Down

0 comments on commit a4a96e4

Please sign in to comment.