started on better mobile support
authorArun Persaud <arun@nubati.net>
Fri, 7 Oct 2011 02:30:21 +0000 (19:30 -0700)
committerArun Persaud <apersaud@lbl.gov>
Fri, 7 Oct 2011 04:26:44 +0000 (21:26 -0700)
some changes in order of HTML, but mostly CSS

css/narrow.css [new file with mode: 0644]
include/game.php
include/output.php

diff --git a/css/narrow.css b/css/narrow.css
new file mode 100644 (file)
index 0000000..9367a31
--- /dev/null
@@ -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
index 0ef5a3ef85a24cc1c955f818625831c863ccc97c..dcabc678220d2f65f0924ed29bce0ce0dea2381d 100644 (file)
@@ -121,7 +121,7 @@ set_gametype('normal');
 echo "<form action=\"index.php?action=game&amp;me=$me\" method=\"post\">\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 "</div>\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 "</form>\n";
 
 $gamestatus = DB_get_game_status_by_gameid($gameid);
index 29a6d7d38c556b7113bb3c03923b1ab62dc630f2..e79fecf03839f4d6811b9f22cf1508e06a5ce5e4 100644 (file)
@@ -378,6 +378,7 @@ function output_header()
      <meta charset="utf-8" />
      <link rel="shortcut icon" href="pics/edoko-favicon.png" />
      <link rel="stylesheet" href="css/standard.css?v=30" />
+     <link rel="stylesheet" media="screen and (max-width: 600px)" href="css/narrow.css?v=1" />
      <link rel="stylesheet" href="css/dateinput.css?v=1"/>
      <script type="text/javascript" src="include/jquery.js"> </script>
      <script type="text/javascript" src="include/jquery.tablesorter.js"></script>