From: Arun Date: Tue, 9 Oct 2007 10:50:22 +0000 (+0200) Subject: LAYOUT: 1st round of changes to get rid of overlapping areas X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=commitdiff_plain;h=dfbea65d8ae9c21190a9fe5b69ea2ee098dcede7;hp=c0e030bb5068085ef52cc8bd0c91f025fb78045e LAYOUT: 1st round of changes to get rid of overlapping areas centered table, moved menus to correct place (this also fixed a bug that still showed that it was your turn in a game after you moved) and some other small changes. --- diff --git a/css/standard.css b/css/standard.css index 71ae568..7d44f0a 100644 --- a/css/standard.css +++ b/css/standard.css @@ -7,8 +7,6 @@ .main { min-height: 40em; -// margin-left: 12.5em; -// margin-right: 12.5em; } .footer { @@ -58,49 +56,55 @@ margin-top:20em; /* display the table and the names */ div.table { position:absolute; + left:25%; + right:25%; margin:0; padding:0; /* border: 5px solid blue;*/ - top: 14em; - left: 20em; + top: 16em; + text-align:center; } div.table img { - height:20em; - width:20em; + top:25%; + bottom:25%; + height:50%; + width:50%; z-index:9; + display: block; + margin-left: auto; + margin-right: auto } -div.table span { +div.table div { /*background-color:green;*/ position:absolute; - width:13em; + width:25%; + height:25%; } -div.table span span{ +div.table div img{ /*background-color:green;*/ - position:relative; + width:25%; + height:25%; } -div.table span.table0 { - top:9em; - left:-15em; +div.table div.table0 { + top:37.5%; + left:0%; text-align:right; } -div.table span.table1 { - top:-3.5em; - left: 0em; - width:20em; +div.table div.table1 { + top:-25%; + left:37.5%; text-align:center; } -div.table span.table2 { - top:9em; - left:22em; +div.table div.table2 { + top:37.5%; + left:75%; text-align:left; - vertical-align:center; } -div.table span.table3 { - top:21.5em; - left: 0em; - width:20em; +div.table div.table3 { + bottom:-25%; + left: 37.5%; text-align:center; } @@ -126,13 +130,12 @@ ul.tricks li.nohighlight:hover { background-color: #fff;} ul.tricks li div.trick { position:absolute; + left:37.5%; + right:37.5%; + top:9em; margin:0; padding:0; /* border: 5px solid green;*/ - top: 8em; - left: 20em; - height:20em; - width:20em; z-index:9; display:none; } @@ -297,9 +300,11 @@ ul.tricks li div div span.comment span{ } .gameinfo, .useroptions { - float:right; + position:absolute; + top:10em; + right:0em; margin:1em; - margin-top:3em; + margin-top:0em; margin-right:0em; width:12em; @@ -314,9 +319,11 @@ ul.tricks li div div span.comment span{ } .usermenu { - float: left; + position:absolute; + top:10em; + left:0; margin:1em; - margin-top:3em; + margin-top:0em; margin-left:0em; width: 12em; @@ -330,6 +337,8 @@ ul.tricks li div div span.comment span{ background-color: #eee; } +.user { margin-left:25%;margin-right:25%; } + .over { text-align:center; margin-bottom:0.1em; diff --git a/functions.php b/functions.php index 5c98274..73d04f6 100644 --- a/functions.php +++ b/functions.php @@ -692,7 +692,7 @@ function display_table () $zone = return_timezone($offset); date_default_timezone_set($zone); - echo " \n"; + echo "
\n"; if(!$debug) echo " $name \n"; else @@ -792,7 +792,7 @@ function display_table () echo "
\n"; echo " local time"; echo " last login"; - echo " \n"; + echo "
\n"; } echo "\n"; /* end output table */ diff --git a/index.php b/index.php index f2fa3d6..7d2d4ab 100644 --- a/index.php +++ b/index.php @@ -337,69 +337,6 @@ else if(myisset("me")) /* put everyting in a form */ echo "
\n"; - /* output left menu */ - - display_user_menu(); - - /* output right menu */ - - /* display rule set for this game */ - echo "
\n"; - - if($gamestatus != 'pre') - echo " Gametype: $GT
\n"; - - echo "Rules:
\n"; - echo "10ofhearts : ".$RULES["dullen"] ."
\n"; - echo "schweinchen: ".$RULES["schweinchen"] ."
\n"; - echo "call: ".$RULES["call"] ."
\n"; - - echo "
\n"; - if($gamestatus == 'play' ) - output_form_calls($me); - - /* get time from the last action of the game */ - $result = mysql_query("SELECT mod_date from Game WHERE id='$gameid' " ); - $r = mysql_fetch_array($result,MYSQL_NUM); - $gameend = time() - strtotime($r[0]); - - if($gamestatus == 'play' || $gameend < 60*60*24*7) - { - echo "
\nA short comment:\n"; - echo "
"; - } - - echo "\n"; - - - if($mystatus=='gameover' && DB_get_game_status_by_gameid($gameid)=='gameover' ) - { - echo "
\n"; - - $session = DB_get_session_by_gameid($gameid); - $result = mysql_query("SELECT id,create_date FROM Game". - " WHERE session=$session". - " ORDER BY create_date DESC". - " LIMIT 1"); - $r = -1; - if($result) - $r = mysql_fetch_array($result,MYSQL_NUM); - - if(!$session || $gameid==$r[0]) - { - /* suggest a new game with the same people in it, just rotated once (unless last game was solo) */ - $names = DB_get_all_names_by_gameid($gameid); - $type = DB_get_gametype_by_gameid($gameid); - - if($type=="solo") - output_ask_for_new_game($names[0],$names[1],$names[2],$names[3],$gameid); - else - output_ask_for_new_game($names[1],$names[2],$names[3],$names[0],$gameid); - } - } - - echo "
\n"; - /* output game */ /* output extra division in case this game is part of a session */ @@ -1595,6 +1532,69 @@ else if(myisset("me")) default: myerror("error in testing the status"); } + /* output left menu */ + display_user_menu(); + + /* output right menu */ + + /* display rule set for this game */ + echo "
\n"; + + if($gamestatus != 'pre') + echo " Gametype: $GT
\n"; + + echo "Rules:
\n"; + echo "10ofhearts : ".$RULES["dullen"] ."
\n"; + echo "schweinchen: ".$RULES["schweinchen"] ."
\n"; + echo "call: ".$RULES["call"] ."
\n"; + + echo "
\n"; + if($gamestatus == 'play' ) + output_form_calls($me); + + /* get time from the last action of the game */ + $result = mysql_query("SELECT mod_date from Game WHERE id='$gameid' " ); + $r = mysql_fetch_array($result,MYSQL_NUM); + $gameend = time() - strtotime($r[0]); + + if($gamestatus == 'play' || $gameend < 60*60*24*7) + { + echo "
\nA short comment:\n"; + echo "
"; + } + + echo "\n"; + + + if($mystatus=='gameover' && DB_get_game_status_by_gameid($gameid)=='gameover' ) + { + echo "
\n"; + + $session = DB_get_session_by_gameid($gameid); + $result = mysql_query("SELECT id,create_date FROM Game". + " WHERE session=$session". + " ORDER BY create_date DESC". + " LIMIT 1"); + $r = -1; + if($result) + $r = mysql_fetch_array($result,MYSQL_NUM); + + if(!$session || $gameid==$r[0]) + { + /* suggest a new game with the same people in it, just rotated once (unless last game was solo) */ + $names = DB_get_all_names_by_gameid($gameid); + $type = DB_get_gametype_by_gameid($gameid); + + if($type=="solo") + output_ask_for_new_game($names[0],$names[1],$names[2],$names[3],$gameid); + else + output_ask_for_new_game($names[1],$names[2],$names[3],$names[0],$gameid); + } + } + + echo "
\n"; + + echo "
\n"; output_footer(); DB_close(); @@ -1766,6 +1766,7 @@ else if( myisset("email","password") || isset($_SESSION["name"]) ) display_user_menu(); + echo "
"; echo "

These are all your games:

\n"; echo "

Session:
\n"; echo " p = pre-game phase "; @@ -1832,7 +1833,7 @@ else if( myisset("email","password") || isset($_SESSION["name"]) ) $names = DB_get_all_names(); echo "

Registered players:

\n

\n"; echo implode(", ",$names)."\n"; - echo "

\n"; + echo "

\n
"; } } else