Skip to content

Commit

Permalink
Social Media Enhancements, iteration 4
Browse files Browse the repository at this point in the history
v1.0.013

Reverted to built-in FB like button, no send
  • Loading branch information
sathyamvellal committed Jul 11, 2013
1 parent 0ee52f7 commit 18dba35
Show file tree
Hide file tree
Showing 14 changed files with 72 additions and 133 deletions.
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ JB :
# Set 'provider' to false to turn sharing off globally.
#
sharing :
provider : false
provider : all
facebook :
appid : 369691426474908
layout : button_count
layout : standard
font :
faces : false
width : 90
Expand Down
42 changes: 1 addition & 41 deletions _includes/JB/sharing-providers/global
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
<div id="fb-root"></div>

<ul style="list-style-type: none;">

<!-- Google+
<li class="gp"><div class="g-plusone" data-size="{{ site.JB.sharing.googleplus.size }}" data-annotation="{{ site.JB.sharing.googleplus.annotation }}" data-width="{{ site.JB.sharing.googleplus.width }}"></div>-->
<li><div class="g-plusone"></div></li>

<!-- Hacker News -->
<li class="hn"><span id="hnews"></span>

<!-- Facebook -->
<li class="fb"><div class="fb-like" data-send="false" data-layout="{{ site.JB.sharing.facebook.layout }}" data-width="{{ site.JB.sharing.facebook.width }}" data-show-faces="{{ site.JB.sharing.facebook.faces }}" data-font="{{ site.JB.sharing.facebook.font }}"></div>

<!-- Twitter
<li class="tw"><a href="https://twitter.com/share" class="twitter-share-button" data-text="{{ page.title }}" data-via="{{ site.JB.sharing.twitter.via }}" data-related="{{ site.author.twitter }}" data-count="{{ site.JB.sharing.twitter.count }}" data-size="{{ site.JB.sharing.twitter.size }}">Tweet</a>-->

<!-- Reddit
<li><script type="text/javascript" src="http://www.reddit.com/buttonlite.js?i=4"></script>
</ul>-->
<div class="fb-like" data-send="false" data-layout="{{ site.JB.sharing.facebook.layout }}" data-width="{{ site.JB.sharing.facebook.width }}" data-show-faces="{{ site.JB.sharing.facebook.faces }}" data-font="{{ site.JB.sharing.facebook.font }}"></div>

<script>

Expand All @@ -33,33 +17,9 @@
id && (js.id = id);
fjs.parentNode.insertBefore(js, fjs);
};

// Twitter SDK
//add('//platform.twitter.com/widgets.js', 'twitter-wjs');

// Google+ button
add('https://apis.google.com/js/plusone.js');

// Facebook SDK
add('//connect.facebook.net/en_GB/all.js#xfbml=1&appId={{ site.JB.sharing.facebook.appid }}', 'facebook-jssdk');

// Hacker News Button
// var hn_like = document.createElement('iframe');
// hn_like.frameborder="no";
// hn_like.scrolling="no";
// hn_like.height="50px";
// hn_like.width="80px";
// hn_like.src = "http://hnlike.com/upvote.php?link="
// + encodeURIComponent(document.location)
// + "&title="
// + encodeURIComponent("{{ page.title }}");
// hn_like.innerHTML="iframes not supported by your browser";
//
// var where = document.getElementById("hnews");
// where.parentNode.insertBefore(
// hn_like,
// where
// );
}(document, 'script'));

</script>
9 changes: 0 additions & 9 deletions _includes/themes/twitter/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@
}(document, 'script'));
</script>

<!-- Facebook -->
<script>(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/all.js#xfbml=1&appId=369691426474908";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions _includes/themes/twitter/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ <h1>{{ page.title }} {% if page.tagline %}<small>{{page.tagline}}</small>{% endi
</div>
<hr>
<div class="post-sharing">
<!-- {% include JB/sharing %} -->
<div style="display: inline; width: 3px;" class="g-plusone"></div>
<a href="http://news.ycombinator.com/submit" class="hn-share-button">Vote on HN</a>
<div class="fb-like" data-href="http://developers.facebook.com/docs/reference/plugins/like" data-send="true" data-layout="button_count" data-show-faces="false" data-font="lucida grande"></div>
{% include JB/sharing %}
<!-- <div class="fb-like" data-href="http://developers.facebook.com/docs/reference/plugins/like" data-send="true" data-layout="button_count" data-show-faces="false" data-font="lucida grande"></div> -->
</div>
<hr>
{% include JB/comments %}
Expand Down
9 changes: 0 additions & 9 deletions _site/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@
}(document, 'script'));
</script>

<!-- Facebook -->
<script>(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/all.js#xfbml=1&appId=369691426474908";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

</head>

<body>
Expand Down
9 changes: 0 additions & 9 deletions _site/archive.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@
}(document, 'script'));
</script>

<!-- Facebook -->
<script>(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/all.js#xfbml=1&appId=369691426474908";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion _site/atom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>A Wandering</title>
<link href="http://sathyamvellal.in/" rel="self"/>
<link href="http://sathyamvellal.in"/>
<updated>2013-07-11T15:29:23+05:30</updated>
<updated>2013-07-11T15:39:57+05:30</updated>
<id>http://sathyamvellal.in</id>
<author>
<name>Sathyam M Vellal</name>
Expand Down
9 changes: 0 additions & 9 deletions _site/categories.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@
}(document, 'script'));
</script>

<!-- Facebook -->
<script>(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/all.js#xfbml=1&appId=369691426474908";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

</head>

<body>
Expand Down
43 changes: 32 additions & 11 deletions _site/games/0-ad-game/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@
}(document, 'script'));
</script>

<!-- Facebook -->
<script>(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/all.js#xfbml=1&appId=369691426474908";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

</head>

<body>
Expand Down Expand Up @@ -214,10 +205,40 @@ <h1>0 A.D. Game </h1>
</div>
<hr>
<div class="post-sharing">
<!-- -->
<div style="display: inline; width: 3px;" class="g-plusone"></div>
<a href="http://news.ycombinator.com/submit" class="hn-share-button">Vote on HN</a>
<div class="fb-like" data-href="http://developers.facebook.com/docs/reference/plugins/like" data-send="true" data-layout="button_count" data-show-faces="false" data-font="lucida grande"></div>



<div id="fb-root"></div>

<!-- Facebook -->
<div class="fb-like" data-send="false" data-layout="" data-width="" data-show-faces="" data-font=""></div>

<script>

(function(doc, script) {

// Async Social Buttons
var js,
fjs = doc.getElementsByTagName(script)[0],
add = function(url, id) {
if (doc.getElementById(id)) {return;}
js = doc.createElement(script);
js.src = url;
id && (js.id = id);
fjs.parentNode.insertBefore(js, fjs);
};

// Facebook SDK
add('//connect.facebook.net/en_GB/all.js#xfbml=1&appId=', 'facebook-jssdk');
}(document, 'script'));

</script>



<!-- <div class="fb-like" data-href="http://developers.facebook.com/docs/reference/plugins/like" data-send="true" data-layout="button_count" data-show-faces="false" data-font="lucida grande"></div> -->
</div>
<hr>

Expand Down
43 changes: 32 additions & 11 deletions _site/general/hello-world/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@
}(document, 'script'));
</script>

<!-- Facebook -->
<script>(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/all.js#xfbml=1&appId=369691426474908";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

</head>

<body>
Expand Down Expand Up @@ -210,10 +201,40 @@ <h1>Hello World </h1>
</div>
<hr>
<div class="post-sharing">
<!-- -->
<div style="display: inline; width: 3px;" class="g-plusone"></div>
<a href="http://news.ycombinator.com/submit" class="hn-share-button">Vote on HN</a>
<div class="fb-like" data-href="http://developers.facebook.com/docs/reference/plugins/like" data-send="true" data-layout="button_count" data-show-faces="false" data-font="lucida grande"></div>



<div id="fb-root"></div>

<!-- Facebook -->
<div class="fb-like" data-send="false" data-layout="" data-width="" data-show-faces="" data-font=""></div>

<script>

(function(doc, script) {

// Async Social Buttons
var js,
fjs = doc.getElementsByTagName(script)[0],
add = function(url, id) {
if (doc.getElementById(id)) {return;}
js = doc.createElement(script);
js.src = url;
id && (js.id = id);
fjs.parentNode.insertBefore(js, fjs);
};

// Facebook SDK
add('//connect.facebook.net/en_GB/all.js#xfbml=1&appId=', 'facebook-jssdk');
}(document, 'script'));

</script>



<!-- <div class="fb-like" data-href="http://developers.facebook.com/docs/reference/plugins/like" data-send="true" data-layout="button_count" data-show-faces="false" data-font="lucida grande"></div> -->
</div>
<hr>

Expand Down
9 changes: 0 additions & 9 deletions _site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@
}(document, 'script'));
</script>

<!-- Facebook -->
<script>(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/all.js#xfbml=1&appId=369691426474908";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

</head>

<body>
Expand Down
9 changes: 0 additions & 9 deletions _site/pages.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@
}(document, 'script'));
</script>

<!-- Facebook -->
<script>(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/all.js#xfbml=1&appId=369691426474908";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions _site/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<description>A Wandering - Sathyam M Vellal</description>
<link>http://sathyamvellal.in</link>
<link>http://sathyamvellal.in</link>
<lastBuildDate>2013-07-11T15:29:23+05:30</lastBuildDate>
<pubDate>2013-07-11T15:29:23+05:30</pubDate>
<lastBuildDate>2013-07-11T15:39:57+05:30</lastBuildDate>
<pubDate>2013-07-11T15:39:57+05:30</pubDate>
<ttl>1800</ttl>


Expand Down
9 changes: 0 additions & 9 deletions _site/tags.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@
}(document, 'script'));
</script>

<!-- Facebook -->
<script>(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/all.js#xfbml=1&appId=369691426474908";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

</head>

<body>
Expand Down

0 comments on commit 18dba35

Please sign in to comment.