Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use addthis, move social buttons around

  • Loading branch information...
commit 481d8a8dd71d24e7d0927cdd24df912c03c8ff3f 1 parent aefed10
Rob Lourens authored
Showing with 33 additions and 37 deletions.
  1. +15 −37 index.php
  2. +18 −0 sc.css
52 index.php
View
@@ -7,16 +7,10 @@
<meta property="og:image" content="http://iastate.semestercountdown.com/fbimg.png" />
<meta property="og:site_name" content="ISU Semester Countdown" />
<meta property="fb:admins" content="500029869" />
+<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
+<script type="text/javascript">stLight.options({publisher: "92b1d824-e709-4b9a-a588-3fec47e291d8"}); </script>
</head>
<body>
-<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/all.js#xfbml=1&appId=298537000208033";
- fjs.parentNode.insertBefore(js, fjs);
-}(document, 'script', 'facebook-jssdk'));</script>
<script type="text/javascript" src="moment.min.js"></script>
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="jcanvas.min.js"></script>
@@ -69,15 +63,23 @@ function weekdaysTil($data)
function doUpdate()
{
U.update();
+ setSocialH();
+
setTimeout(doUpdate, 1000);
}
+// set social container height
+function setSocialH()
+{
+ var socialH = Math.max(0, $(window).height()-$('.detailsButton').height()-$('#wrapper').height()-$('#timeline').height());
+ $('#socialContainer').height(socialH);
+}
+
doUpdate();
$(document).ready(function() {
$('#moreDetailsButton').attr('href', 'javascript: U.moreDetails();');
$('#fewerDetailsButton').attr('href', 'javascript: U.fewerDetails();');
-
});
</script>
@@ -91,36 +93,12 @@ function doUpdate()
<div id="timeline"><canvas id="timelineCanvas" width="800" height="75"></canvas></div>
-<div class="tableDiv">
-<div class="group">
-<div class="otherRow">
-<div class="l"></div>
-<div class="r">
-<div class="fb-like" data-href="http://iastate.semestercountdown.com" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false"></div>
-</div>
-</div>
-
-<div class="otherRow">
-<div class="l"></div>
-<div class="r">
-<a href="https://twitter.com/share" class="twitter-share-button" data-text="How many days left in the semester?">Tweet</a>
-</div>
-</div>
+<div id="socialContainer">
+<div id="socialSet">
+<span class='st_fblike_vcount' displayText='Facebook Like'></span>
+<span class='st_twitter_vcount' displayText='Tweet'></span>
</div>
</div>
</div>
-<script type="text/javascript">
-!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
-
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-28941284-1']);
- _gaq.push(['_setDomainName', 'semestercountdown.com']);
- _gaq.push(['_trackPageview']);
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-</script>
</html>
18 sc.css
View
@@ -112,3 +112,21 @@ body { background: rgb(206,17,38); /* Old browsers */
margin-left: 15%;
height: 75px;
}
+
+#socialContainer {
+ position: relative;
+ height: 100px;
+ width: 100%;
+}
+
+#socialSet {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ padding-left: 10px;
+ padding-bottom: 10px;
+}
+
+.socialItem {
+ float: left;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.