www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 6a4d68922614f14f848d693835c6a6bdf5dbf88d
parent 3a8080b8e66417b2b20430ee0876d32674a9e5dd
Author: Georges Dupéron <jahvascriptmaniac+github@free.fr>
Date:   Fri, 20 May 2011 10:59:22 +0200

Correction de la taille des boutons sur la frontpage.

Diffstat:
Mcode/serveur/php/jeu.php | 9++++-----
Mcode/serveur/php/ressources/my-extensions.js | 2+-
Mcode/serveur/php/ressources/pticlic.js | 17+++++++++--------
3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/code/serveur/php/jeu.php b/code/serveur/php/jeu.php @@ -17,10 +17,9 @@ .screen { width:100%; height:100%; position:absolute; } .highlight { display:none; width:100%; height:100%; border-width:medium; border-style:solid; border-radius:2em; position:absolute; } a:hover .highlight { display:block; } - #frontpage .icon-container { width:100%; bottom: 40%; height:50%; position:absolute; vertical-align:bottom; } - #frontpage .icon-container img { display:block; margin: 0 auto; } - #frontpage .icon-label { width:100%; height:30%; bottom:5%; position:absolute; } - #frontpage a { color: black; text-decoration: none; display:inline-block; width: 30%; height: 32%; top: 32%; position:absolute; } + #frontpage a { color: black; text-decoration: none; display:inline-block; width: 30%; top: 32%; position:absolute; } + #frontpage .icon-container img { display:block; position:relative; margin: 0 auto; } + #frontpage .icon-label { width:100%; height:30%; position:relative; } a.button { color: black; text-decoration: none; padding: 0.4em; margin: 0.4em; display: inline-block; @@ -88,7 +87,7 @@ </div> <a href="#game" style="right:55%; top:33%;"> <div class="highlight"></div> - <div class="icon-container"><img class="iconFitParent" alt="" src="ressources/img/72/default.png" /></div> + <div class="icon-container"><img alt="" src="ressources/img/72/default.png" /></div> <div class="icon-label subFitFont"><span class="text center">Jouer</span></div> </a> <a href="#prefs" style="left:55%; top:33%;"> diff --git a/code/serveur/php/ressources/my-extensions.js b/code/serveur/php/ressources/my-extensions.js @@ -7,7 +7,7 @@ Number.prototype.clip = function(min, max, floor) { Number.prototype.mapInterval = function(a,b,x,y) { return x + ((this-a) / (b-a) * (y-x)); } - + dichotomyStop = false; function dichotomy(start, isBigger, debug) { try { diff --git a/code/serveur/php/ressources/pticlic.js b/code/serveur/php/ressources/pticlic.js @@ -51,14 +51,15 @@ function jss() { rb.css({ marginTop: (rel.height() - rb.sumOuterHeight()) / (rb.size() + 1) }); rb.find('.icon').css({paddingRight: 10/72*iconSize}); } - $('.iconFitParent').wh(0,0).each(function(i,e) { - e=$(e); - var p = e.parent(); - var size = Math.min(p.width(), p.height()); - if (size >= 72) { e.wh(72); } - else if (size >= 48) e.wh(48); - else if (size >= 36) e.wh(36); - else e.wh(0); + $('#frontpage a').$each(function(i,e) { + var img = e.find('img'); + var size = Math.min($('#frontpage').width() * 0.3, $('#frontpage').height() * 0.32 * 0.5); + if (size >= 72) { img.wh(72); } + else if (size >= 48) img.wh(48); + else if (size >= 36) img.wh(36); + else img.wh(0); + e.find('.icon-label').height($('#frontpage').height() * 0.32 * 0.3); + img.css('padding-top', $('#frontpage').height() * 0.32 * 0.06); }); $('.fitFont:visible').$each(function(i,e) { e.fitFont(); }); $('.fitFontGroup:visible').each(function(i,e) { $(e).find('.subFitFont').fitFont(); });