Skip to content

Commit

Permalink
Fb sharing added
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddharth Bhagwan committed Mar 10, 2015
1 parent d97a4f2 commit d0177fa
Show file tree
Hide file tree
Showing 15 changed files with 61 additions and 35 deletions.
15 changes: 10 additions & 5 deletions css/blogpagecss.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
display: none;
}

/*.share-fb {
.share-fb {
position: fixed;
right: 82px;
bottom: 205px;
color: #3B5998;
}*/
}

.share-tw {
position: fixed;
Expand All @@ -41,8 +41,7 @@
.share-gplus {
position: fixed;
right: 72px;
bottom: 205px;
/*bottom: 150px;*/
bottom: 150px;
color: #d34836;
}

Expand Down Expand Up @@ -584,10 +583,16 @@ pre {
bottom: 155px;
}

.share-fb {
display: none;
right: 35px;
bottom: 205px;
}

.share-tw {
display: none;
right: 28px;
bottom: 210px;
bottom: 255px;
}

#nav-mobile {
Expand Down
12 changes: 9 additions & 3 deletions js/application.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/application.min.js

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,18 @@ $(document).ready(function (){
$(".share-tw").attr("href", $(".share-tw").attr("href") + default_share);
})();

(function () {
current_page = window.location.pathname;
fb_link = "http://docs.tah.io" + current_page;
title_link = "&p[title]=" + $(".page_heading").text();
$(".share-fb").attr("href", $(".share-fb").attr("href") + fb_link + title_link);
})();

$(".share-btn").click(function(){
if ($(".share-tw, .share-gplus").is(":visible")) {
$(".share-tw, .share-gplus").fadeOut(500);
if ($(".share-tw, .share-gplus, .share-fb").is(":visible")) {
$(".share-tw, .share-gplus, .share-fb").fadeOut(500);
} else {
$(".share-tw, .share-gplus").fadeIn(500);
$(".share-tw, .share-gplus, .share-fb").fadeIn(500);
}
});

Expand Down
4 changes: 3 additions & 1 deletion showcase/gaming-controller/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ <h2 class="docshead2">Step 3</h2>

<div class="shareable">
<a href="https://twitter.com/intent/tweet?text=" class="share-tw"><i class="fa fa-twitter fa-3x"></i></a>
<!-- <a href="" target="_blank" class="share-fb"><i class="fa fa-facebook fa-3x"></i></a> -->
<a href="http://www.facebook.com/sharer/sharer.php?s=100&amp;p[url]=" target="_blank" class="share-fb">
<i class="fa fa-facebook fa-3x"></i>
</a>
<a href="https://plus.google.com/share?url=https://docs.tah.io" target="_blank" class="share-gplus">
<i class="fa fa-google-plus fa-3x"></i>
</a>
Expand Down
4 changes: 3 additions & 1 deletion showcase/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ <h1 class="page_heading">Showcase</h1>

<div class="shareable">
<a href="https://twitter.com/intent/tweet?text=" class="share-tw"><i class="fa fa-twitter fa-3x"></i></a>
<!-- <a href="" target="_blank" class="share-fb"><i class="fa fa-facebook fa-3x"></i></a> -->
<a href="http://www.facebook.com/sharer/sharer.php?s=100&amp;p[url]=" target="_blank" class="share-fb">
<i class="fa fa-facebook fa-3x"></i>
</a>
<a href="https://plus.google.com/share?url=https://docs.tah.io" target="_blank" class="share-gplus">
<i class="fa fa-google-plus fa-3x"></i>
</a>
Expand Down
4 changes: 3 additions & 1 deletion showcase/mood-lamp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ <h2 class="docshead2">Step 7</h2>

<div class="shareable">
<a href="https://twitter.com/intent/tweet?text=" class="share-tw"><i class="fa fa-twitter fa-3x"></i></a>
<!-- <a href="" target="_blank" class="share-fb"><i class="fa fa-facebook fa-3x"></i></a> -->
<a href="http://www.facebook.com/sharer/sharer.php?s=100&amp;p[url]=" target="_blank" class="share-fb">
<i class="fa fa-facebook fa-3x"></i>
</a>
<a href="https://plus.google.com/share?url=https://docs.tah.io" target="_blank" class="share-gplus">
<i class="fa fa-google-plus fa-3x"></i>
</a>
Expand Down
4 changes: 3 additions & 1 deletion showcase/motion-control/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ <h2 class="docshead2">Step 6</h2>

<div class="shareable">
<a href="https://twitter.com/intent/tweet?text=" class="share-tw"><i class="fa fa-twitter fa-3x"></i></a>
<!-- <a href="" target="_blank" class="share-fb"><i class="fa fa-facebook fa-3x"></i></a> -->
<a href="http://www.facebook.com/sharer/sharer.php?s=100&amp;p[url]=" target="_blank" class="share-fb">
<i class="fa fa-facebook fa-3x"></i>
</a>
<a href="https://plus.google.com/share?url=https://docs.tah.io" target="_blank" class="share-gplus">
<i class="fa fa-google-plus fa-3x"></i>
</a>
Expand Down
4 changes: 3 additions & 1 deletion showcase/sensors-and-relays/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ <h2 class="docshead2">Step 4</h2>

<div class="shareable">
<a href="https://twitter.com/intent/tweet?text=" class="share-tw"><i class="fa fa-twitter fa-3x"></i></a>
<!-- <a href="" target="_blank" class="share-fb"><i class="fa fa-facebook fa-3x"></i></a> -->
<a href="http://www.facebook.com/sharer/sharer.php?s=100&amp;p[url]=" target="_blank" class="share-fb">
<i class="fa fa-facebook fa-3x"></i>
</a>
<a href="https://plus.google.com/share?url=https://docs.tah.io" target="_blank" class="share-gplus">
<i class="fa fa-google-plus fa-3x"></i>
</a>
Expand Down
4 changes: 3 additions & 1 deletion showcase/smart-dice/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ <h2 class="docshead2">Step 4</h2>

<div class="shareable">
<a href="https://twitter.com/intent/tweet?text=" class="share-tw"><i class="fa fa-twitter fa-3x"></i></a>
<!-- <a href="" target="_blank" class="share-fb"><i class="fa fa-facebook fa-3x"></i></a> -->
<a href="http://www.facebook.com/sharer/sharer.php?s=100&amp;p[url]=" target="_blank" class="share-fb">
<i class="fa fa-facebook fa-3x"></i>
</a>
<a href="https://plus.google.com/share?url=https://docs.tah.io" target="_blank" class="share-gplus">
<i class="fa fa-google-plus fa-3x"></i>
</a>
Expand Down
4 changes: 3 additions & 1 deletion showcase/smartphone-xbee-bridge/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ <h2 class="docshead2">Step 5</h2>

<div class="shareable">
<a href="https://twitter.com/intent/tweet?text=" class="share-tw"><i class="fa fa-twitter fa-3x"></i></a>
<!-- <a href="" target="_blank" class="share-fb"><i class="fa fa-facebook fa-3x"></i></a> -->
<a href="http://www.facebook.com/sharer/sharer.php?s=100&amp;p[url]=" target="_blank" class="share-fb">
<i class="fa fa-facebook fa-3x"></i>
</a>
<a href="https://plus.google.com/share?url=https://docs.tah.io" target="_blank" class="share-gplus">
<i class="fa fa-google-plus fa-3x"></i>
</a>
Expand Down
4 changes: 3 additions & 1 deletion showcase/universal-remote/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ <h2 class="docshead2">Step 3</h2>

<div class="shareable">
<a href="https://twitter.com/intent/tweet?text=" class="share-tw"><i class="fa fa-twitter fa-3x"></i></a>
<!-- <a href="" target="_blank" class="share-fb"><i class="fa fa-facebook fa-3x"></i></a> -->
<a href="http://www.facebook.com/sharer/sharer.php?s=100&amp;p[url]=" target="_blank" class="share-fb">
<i class="fa fa-facebook fa-3x"></i>
</a>
<a href="https://plus.google.com/share?url=https://docs.tah.io" target="_blank" class="share-gplus">
<i class="fa fa-google-plus fa-3x"></i>
</a>
Expand Down
2 changes: 1 addition & 1 deletion tutorials/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<div class="container containerdocs" style="height:75%;">
<div class="text-docs">

<h1 class="page_heading">Showcase</h1>
<h1 class="page_heading">Tutorials</h1>

<p>Once you have controlled a simple LED on the Tah, you can follow the tutorials below to build more amazing things or more complex stuff</p>

Expand Down
17 changes: 4 additions & 13 deletions tutorials/tah-to-tah/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<!--[if IE]><meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'><![endif]-->

<title>Tah Library</title>
<title>Tah Docs</title>

<!-- css -->
<link type="text/css" rel="stylesheet" href="http://fast.fonts.net/cssapi/a6555b0e-9541-40d2-ab30-147c200fd4db.css"/>
Expand Down Expand Up @@ -178,24 +178,15 @@ <h2 class="docshead2">Step 7</h2>

<div class="shareable">
<a href="https://twitter.com/intent/tweet?text=" class="share-tw"><i class="fa fa-twitter fa-3x"></i></a>
<!-- <a href="" target="_blank" class="share-fb"><i class="fa fa-facebook fa-3x"></i></a> -->
<a href="http://www.facebook.com/sharer/sharer.php?s=100&amp;p[url]=" target="_blank" class="share-fb">
<i class="fa fa-facebook fa-3x"></i>
</a>
<a href="https://plus.google.com/share?url=https://docs.tah.io" target="_blank" class="share-gplus">
<i class="fa fa-google-plus fa-3x"></i>
</a>
</div>
<i class="fa fa-share-alt fa-3x share-btn"></i>

<!-- <div id="fb-root"></div>
<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/sdk.js#xfbml=1&appId=530380563690095&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div cl ass="fb-share-button" data-href="http://docs.tah.io/tutorials/tah-to-tah/" data-layout="icon"></div> -->

<footer>
<div class="bottombar">
<div class="bottombar-innerdiv">
Expand Down
4 changes: 3 additions & 1 deletion tutorials/tah-with-linux/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ <h4>Receive</h4>

<div class="shareable">
<a href="https://twitter.com/intent/tweet?text=" class="share-tw"><i class="fa fa-twitter fa-3x"></i></a>
<!-- <a href="" target="_blank" class="share-fb"><i class="fa fa-facebook fa-3x"></i></a> -->
<a href="http://www.facebook.com/sharer/sharer.php?s=100&amp;p[url]=" target="_blank" class="share-fb">
<i class="fa fa-facebook fa-3x"></i>
</a>
<a href="https://plus.google.com/share?url=https://docs.tah.io" target="_blank" class="share-gplus">
<i class="fa fa-google-plus fa-3x"></i>
</a>
Expand Down

0 comments on commit d0177fa

Please sign in to comment.