--- a/web/partage-du-film-aleatoire-the-end-etc.html Mon Jan 21 21:04:36 2013 +0100
+++ b/web/partage-du-film-aleatoire-the-end-etc.html Mon Jan 21 21:05:32 2013 +0100
@@ -4,18 +4,10 @@
xmlns:fb="https://www.facebook.com/2008/fbml" >
<head>
<meta charset="utf-8">
- <title>The End - @todo</title>
-
- <meta name="description" content="@todo">
- <link rel="icon" href="static/res/img/favicon.ico" />
+ <title>The End, etc.</title>
- <!-- Site Optimization for Facebook -->
- <meta property="og:title" content="the end- @todo" />
- <meta property="og:type" content="website" />
- <meta property="og:url" content="http://www.clients.incandescence.com/theend/" />
- <meta property="og:image" content="https://www.clients.incandescence.com/theend/theend_fb.jpg" />
- <meta property="og:site_name" content="the end @todo" />
- <meta property="og:description" content="@todo"/>
+ <meta name="description" content="The End, etc.">
+ <link rel="icon" href="static/res/img/favicon.ico" />
<!-- Mobile Specific Metas -->
<meta name="viewport" content="user-scalable=no">
@@ -38,8 +30,8 @@
<!-- div content - site takes the full height of browser
class="hugeMargin" avant avec id="btnChoice" plus possible -->
<div id="content" class="smallMargin">
- <div class="btnReturn">
- <button id="btnChoice" class="btn" onClick="location.href='transition.html';">Choice</button>
+ <div class="boxReturn">
+ <button id="btnChoice" class="btn" onClick="location.href='transition-the-end-etc.html';">Choice</button>
</div>
<!-- change with js: height and line-height (the same size) of "container_vcentering" -->
<header id="top" class="container_vcentering">
@@ -61,9 +53,9 @@
<ul id="socialMedia" >
<!--https://developers.facebook.com/docs/reference/dialogs/feed/ -->
<li>
- <a a href="http://www.facebook.com/share.php?u=http://www.clients.incandescence.com/theend/" target="_blank"><img alt="Partager The End sur Facebook" src="static/res/img/footer/facebook.png" /></a></li>
+ <a id="sharefb" target="_blank"><img alt="Partager The End, etc. sur Facebook" src="static/res/img/footer/facebook.png" /></a></li>
<!-- https://dev.twitter.com/docs/tweet-button -->
- <li><a href="https://twitter.com/share?url=https%3A%2F%2Fwww.clients.incandescence.com%2Ftheend%2F" target="_blank"><img alt="Partager The End sur Twitter" src="static/res/img/footer/twitter.png"/></a></li>
+ <li><a id="sharetw" target="_blank"><img alt="Partager The End, etc. sur Twitter" src="static/res/img/footer/twitter.png"/></a></li>
</ul>
</div>
</section>
@@ -74,14 +66,24 @@
<script src="static/res/js/incresize.js"></script>
<script src="static/res/js/incchoice.js"></script>
<script src="static/res/js/jquery.cookie.js"></script>
- <script>
+ <script>
$(function() {
// Init the resize object
incResize.init("content", "top", "imgMiddle", "bottom", null, 130, 1075/604);
incResize.resizeElements();
- // Debug
- console.log(incChoice.createShareUrl());
+ var replaceAll = function(txt, replace, with_this) {
+ return txt.replace(new RegExp(replace, 'g'),with_this);
+ }
+
+ var urlToShare = incChoice.createShareUrl();
+ var urlToShareTw = replaceAll(urlToShare, ":", "%3A");
+ urlToShareTw = replaceAll(urlToShareTw, "/", "%2F");
+
+ // Set the facebook share url
+ $("#sharefb").attr('href', "http://www.facebook.com/share.php?u=" + urlToShare);
+
+ $("#sharetw").attr('href', "https://twitter.com/share?url=" + urlToShareTw);
});
</script>
</body>