diff --git a/code/html5/frontpage.html b/code/html5/frontpage.html index c0e11bd..90bc731 100644 --- a/code/html5/frontpage.html +++ b/code/html5/frontpage.html @@ -11,6 +11,10 @@ body { #screen { background-color : #FFFFE0; } + +.button { + text-align: center; +} @@ -30,14 +34,26 @@ body {
PtiClic - - Jouer - - Configuration - - Connexion - - A Propos +
+ +
+ Jouer +
+
+ +
+ Configuration +
+
+ +
+ Connexion +
+
+ +
+ A Propos +
diff --git a/code/html5/frontpage.js b/code/html5/frontpage.js index 6c3ebc8..3806622 100644 --- a/code/html5/frontpage.js +++ b/code/html5/frontpage.js @@ -21,59 +21,27 @@ function jss() { $("#title-block") .wh(w*0.5, h*0.2) .north($("#screen").north()); - - $("#game-icon-block") - .wh(w*0.25, h*0.2) - .northWest($("#title-block").southWest()); - $("#game-text-block") - .wh(w*0.25, h*0.2) - .north($('#game-icon-block').south()); - $("#connection-icon-block") - .wh(w*0.25, h*0.2) - .north($('#game-text-block').south()); - $("#connection-text-block") - .wh(w*0.25, h*0.2) - .north($('#connection-icon-block').south()); - - $("#about-icon-block") - .wh(w*0.25, h*0.2) - .northEast($("#title-block").southEast()); - $("#about-text-block") - .wh(w*0.25, h*0.2) - .north($('#about-icon-block').south()); - $("#prefs-icon-block") - .wh(w*0.25, h*0.2) - .north($('#about-text-block').south()); - $("#prefs-text-block") - .wh(w*0.25, h*0.2) - .north($('#prefs-icon-block').south()); - $("#title") - .fitIn("#title-block", 0.1); - $(".icon") - .wh(72,72); - $(".game.icon") - .center($("#game-icon-block").center()); - $(".about.icon") - .center($("#about-icon-block").center()); - $(".prefs.icon") - .center($("#prefs-icon-block").center()); - $(".connection.icon") - .center($("#connection-icon-block").center()); - + .fitIn("#title-block", 0.2); + $(".text") - .fitIn("#game-text-block", 0.2); - $(".game.text") - .center($("#game-text-block").center()); - $(".about.text") - .center($("#about-text-block").center()); - $(".connection.text") - .center($("#connection-text-block").center()); - $(".prefs.text") - .center($("#prefs-text-block").center()); + .fitFont(w*0.25,(h-(72*4))*0.8*0.5,10); + $(".button") + .width(w*0.4); + + $(".button.game") + .northEast({left:w*0.45,top:h*0.3}); + $(".button.about") + .northWest({left:w*0.55,top:h*0.3}); + $(".button.connection") + .southEast({left:w*0.45,top:h*0.9}); + $(".button.prefs") + .southWest({left:w*0.55,top:h*0.9}); + } $(function() { $(window).resize(jss); jss(); + $(".button.game").click(function(){alert("Pour jouer, il faut payer !");}); }); \ No newline at end of file diff --git a/code/html5/my-extensions.js b/code/html5/my-extensions.js index 5802412..7a7a380 100644 --- a/code/html5/my-extensions.js +++ b/code/html5/my-extensions.js @@ -58,7 +58,6 @@ $.fn.fitIn = function(e, t, r, b, l) { b *= h; l *= w; this.fitFont(w - r - l, h - t - b, 20).center(e.center()); - console.log(this); return this; }