From 92b91104986b28919e4a3603ce1bc7fbde0b8fbb Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Thu, 6 Oct 2011 19:30:21 -0700 Subject: [PATCH] started on better mobile support some changes in order of HTML, but mostly CSS --- css/narrow.css | 52 ++++++++++++++++++++++++++++++++++++++++++++++ include/game.php | 20 +++++++++--------- include/output.php | 1 + 3 files changed, 63 insertions(+), 10 deletions(-) create mode 100644 css/narrow.css diff --git a/css/narrow.css b/css/narrow.css new file mode 100644 index 0000000..9367a31 --- /dev/null +++ b/css/narrow.css @@ -0,0 +1,52 @@ +.main { + background-color: #fff; + margin-left: 0em; + margin-right: 0em; + min-height: 0em; +} + +header, footer { + margin-left: 0em; + margin-right: 0em; +} + + +.lastlogin { + left: 0.2em; + top: 1.2em; +} + +.session div.sessionscore div, .status { + right:0em; +} + +.usermenu { + left: 0em; +} + +.notes { + position:relative; + top:0em; + left:0; + margin:0.1em; + margin-top:0em; + margin-left:0em; + + width: 100%; + + border: 2px solid gray; + + padding:0.3em; + + background-color: #efefef; + + height:100%; + overflow: auto; + z-index:0; +} + +.user { margin-left:5%;margin-right:5%; } + +div.table img.table { + width:50%; +} \ No newline at end of file diff --git a/include/game.php b/include/game.php index 0ef5a3e..dcabc67 100644 --- a/include/game.php +++ b/include/game.php @@ -121,7 +121,7 @@ set_gametype('normal'); echo "
\n"; /* handle user notes (only possible while game is running)*/ -if( $mystatus!='gameover' ) +if( $mystatus!='gameover' ) if(myisset('note')) { $note = $_REQUEST['note']; @@ -130,15 +130,6 @@ if( $mystatus!='gameover' ) DB_insert_note($note,$gameid,$myid); }; -/* make sure that we don't show the notes to the wrong person - * (e.g. other people looking at an old game) - */ -if( $mystatus != 'gameover' || - ( $mystatus == 'gameover' && - isset($_SESSION['id']) && - $myid == $_SESSION['id'])) - output_user_notes($myid,$gameid,$mystatus); - /* handle calls, output a comment to show when the call was made */ /* initialize comments */ $comment = ''; @@ -2177,6 +2168,15 @@ if(sizeof($other_game_ids)>0 && $mystatus=='gameover') echo "\n"; /* end gameinfo */ +/* make sure that we don't show the notes to the wrong person + * (e.g. other people looking at an old game) + */ +if( $mystatus != 'gameover' || + ( $mystatus == 'gameover' && + isset($_SESSION['id']) && + $myid == $_SESSION['id'])) + output_user_notes($myid,$gameid,$mystatus); + echo "
\n"; $gamestatus = DB_get_game_status_by_gameid($gameid); diff --git a/include/output.php b/include/output.php index 29a6d7d..e79fecf 100644 --- a/include/output.php +++ b/include/output.php @@ -378,6 +378,7 @@ function output_header() + -- 2.17.1