mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 08:16:53 +00:00
Added sharing buttons
This commit is contained in:
parent
ec7b02ec34
commit
47c5e665e5
@ -55,7 +55,7 @@ titlecase: true # Converts page and post titles to titlecase
|
||||
|
||||
# list each of the sidebar modules you want to include, in the order you want them to appear.
|
||||
# To add custom asides, create files in /source/_includes/custom/asides/ and add them to the list like 'custom/asides/custom_aside_name.html'
|
||||
default_asides: [asides/recent_posts.html, asides/github.html, asides/delicious.html, asides/pinboard.html, asides/googleplus.html]
|
||||
default_asides: [post/sharing.html, asides/recent_posts.html, asides/github.html, asides/delicious.html, asides/pinboard.html, asides/googleplus.html]
|
||||
|
||||
# Each layout uses the default asides, but they can have their own asides instead. Simply uncomment the lines below
|
||||
# and add an array with the asides you want to use.
|
||||
@ -78,8 +78,8 @@ twitter_user: balloob
|
||||
twitter_tweet_button: true
|
||||
|
||||
# Google +1
|
||||
google_plus_one: false
|
||||
google_plus_one_size: medium
|
||||
google_plus_one: true
|
||||
google_plus_one_size: standard
|
||||
|
||||
# Google Plus Profile
|
||||
# Hidden: No visible button, just add author information to search results
|
||||
@ -102,7 +102,7 @@ disqus_show_comment_count: true
|
||||
google_analytics_tracking_id: UA-57927901-1
|
||||
|
||||
# Facebook Like
|
||||
facebook_like: false
|
||||
facebook_like: true
|
||||
|
||||
social:
|
||||
visible: false
|
||||
|
@ -1,11 +1,40 @@
|
||||
<div class="sharing">
|
||||
<section class="sharing aside-module grid__item one-whole lap-one-half">
|
||||
<h1 class="title delta">Share this post</h1>
|
||||
{% if site.twitter_tweet_button %}
|
||||
<a href="//twitter.com/share" class="twitter-share-button" data-url="{{ site.url }}{{ page.url }}" data-via="{{ site.twitter_user }}" data-counturl="{{ site.url }}{{ page.url }}" >Tweet</a>
|
||||
<a href="//twitter.com/share"
|
||||
class="twitter-share-button"
|
||||
data-url="{{ site.url }}{{ page.url }}"
|
||||
data-counturl="{{ site.url }}{{ page.url }}" >Tweet</a>
|
||||
{% endif %}
|
||||
{% if site.google_plus_one %}
|
||||
<div class="g-plusone" data-size="{{ site.google_plus_one_size }}"></div>
|
||||
{% endif %}
|
||||
{% if site.facebook_like %}
|
||||
<div class="fb-like" data-send="true" data-width="450" data-show-faces="false"></div>
|
||||
<div class="fb-share-button" style='top: -6px;'
|
||||
data-href="{{ site.url }}{{ page.url }}"
|
||||
data-layout="button_count">
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<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>
|
||||
|
||||
<script src="https://apis.google.com/js/platform.js" async defer></script>
|
||||
|
||||
<script>
|
||||
window.fbAsyncInit = function() {
|
||||
FB.init({
|
||||
appId : '338291289691179',
|
||||
xfbml : true,
|
||||
version : 'v2.2'
|
||||
});
|
||||
};
|
||||
|
||||
(function(d, s, id){
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) {return;}
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.src = "//connect.facebook.net/en_US/sdk.js";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user