Skip to content

Instantly share code, notes, and snippets.

@kwatch
Created April 3, 2011 00:12
Show Gist options
  • Select an option

  • Save kwatch/900037 to your computer and use it in GitHub Desktop.

Select an option

Save kwatch/900037 to your computer and use it in GitHub Desktop.
social buttons for Hiki template (hiki/template/view.html)
<% unless @conf.base_url =~ /\.RubiMa/ %>
<!-- social-buttons -->
<div class="social-buttons" style="text-align:right">
<!-- hatena bookmark button -->
<a href="http://b.hatena.ne.jp/entry/<%= @conf.base_url.sub(/^https?:\/\//, '') %>?<%= @conf.options['page'] %>" class="hatena-bookmark-button" title="Add this entry to Hatena Bookmark"><img src="http://b.st-hatena.com/images/entry-button/button-only.gif" alt="Add this entry to Hatena Bookmark" width="20" height="20" style="border: none;" /></a>
<script type="text/javascript" src="http://b.st-hatena.com/js/bookmark_button.js" charset="utf-8"></script>
<!-- delicious bookmark button -->
<a href="http://delicious.com/save" onclick="window.open('http://www.delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550'); return false;"><img src="http://static.delicious.com/img/delicious.gif" alt="Delicious" style="border:none" /></a>
<!-- tweet button -->
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="">Tweet</a>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
<!-- like button -->
<iframe src="http://www.facebook.com/plugins/like.php?href=<%= CGI.escape("#{@conf.base_url}?#{@conf.options['page']}") %>&amp;layout=button_count&amp;show_faces=true&amp;width=100&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>
</div>
<!-- /social-buttons -->
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment