Created
April 17, 2015 10:23
-
-
Save stnvh/8d801d782013003a8804 to your computer and use it in GitHub Desktop.
Simple social buttons wrapper for SilverStripe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% require javascript('https://connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.0') %> | |
<div class="{$ClassName}"> | |
<div id="fb-root"></div> | |
<div class="fb-share-button" data-href="{$URL}" data-layout="<% if Type %>{$Type}<% else %>button<% end_if %>"></div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% require javascript('https://apis.google.com/js/platform.js') %> | |
<div class="{$ClassName}"> | |
<div class="g-plus" data-href="{$URL}" data-action="share" data-annotation="<% if Type %>{$Type}<% else %>none<% end_if %>"></div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% require javascript('http://platform.linkedin.com/in.js') %> | |
<div class="{$ClassName}"> | |
<script type="IN/Share" data-url="{$URL}" <% if Type %>data-counter="{$Type}"<% end_if %>></script> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="{$ClassName}"> | |
<a href="https://twitter.com/share" class="twitter-share-button" data-url="{$URL}" <% if Size == 'large' %>data-size="large"<% end_if %> <% if Content %>data-text="{$Content}"<% end_if %> <% if not Type %>data-count="none"<% end_if %> data-dnt="true">Tweet</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment