diff options
author | Arun Persaud <arun@nubati.net> | 2012-10-06 00:19:12 -0700 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2012-10-06 00:19:12 -0700 |
commit | 293b20963f2bbf0cfca1a146506d65d615b01c2c (patch) | |
tree | 6bc70a842bd4ba68a28645de1b2b85f3d8c68dad /include | |
parent | 494ee831e66d59afbf02d42ba59b7ba21f61c011 (diff) | |
download | e-DoKo-293b20963f2bbf0cfca1a146506d65d615b01c2c.tar.gz e-DoKo-293b20963f2bbf0cfca1a146506d65d615b01c2c.tar.bz2 e-DoKo-293b20963f2bbf0cfca1a146506d65d615b01c2c.zip |
starting to bootstrap the layout: navbar and tricks
- changing the tricks-selector to a paginator and fixing the js for highlighting
- adding a navbar using bootstrap, probably should use .wrap more instead of adding divs to the code
Diffstat (limited to 'include')
-rw-r--r-- | include/cancelgame.php | 3 | ||||
-rw-r--r-- | include/game.php | 14 | ||||
-rw-r--r-- | include/output.php | 38 |
3 files changed, 30 insertions, 25 deletions
diff --git a/include/cancelgame.php b/include/cancelgame.php index da6ffcc..df6e98d 100644 --- a/include/cancelgame.php +++ b/include/cancelgame.php @@ -24,9 +24,6 @@ if(!isset($HOST)) exit; -/* display the menu */ -output_status(); - /* you should only get here from a game page, so $me should be set */ if(!myisset("me")) { diff --git a/include/game.php b/include/game.php index d43699b..d07ff5b 100644 --- a/include/game.php +++ b/include/game.php @@ -367,7 +367,7 @@ switch($mystatus) case 'check': /* output sickness of other playes, in case they already selected and are sitting in front of the current player */ echo "\n<ul class=\"tricks\">\n"; - echo " <li onclick=\"hl('0');\" class=\"current\"><a href=\"#\">Pre</a>\n"; + echo " <li onclick=\"hl('0');\" class=\"active\" id=\"tricks0\"><a href=\"#\">Pre</a>\n"; echo " </li>\n</ul>\n"; /* end div trick, end li trick , end tricks*/ /* end displaying sickness */ @@ -381,7 +381,7 @@ switch($mystatus) $mygametype = DB_get_gametype_by_gameid($gameid); - echo " <li onclick=\"hl('0');\" class=\"current\"><a href=\"#\">Pre</a>\n"; + echo " <li onclick=\"hl('0');\" class=\"active\"><a href=\"#\">Pre</a>\n"; echo " </li>\n</ul>\n\n"; /* end div trick, end li trick , end ul tricks */ } /* end output pre-game trick */ @@ -411,19 +411,19 @@ switch($mystatus) { $trick=$r[0]; if($trick!=$lasttrick) - echo " <li onclick=\"hl('$trickNR');\" class=\"old\"><a href=\"#\">"._('Trick')." $trickNR</a></li>\n"; + echo " <li onclick=\"hl('$trickNR');\" id=\"tricks$trickNR\"><a href=\"#\">"._('Trick')." $trickNR</a></li>\n"; else if($trick==$lasttrick) - echo " <li onclick=\"hl('$trickNR');\" class=\"current\"><a href=\"#\">"._('Trick')." $trickNR</a></li>\n"; + echo " <li onclick=\"hl('$trickNR');\" id=\"tricks$trickNR\" class=\"active\"><a href=\"#\">"._('Trick')." $trickNR</a></li>\n"; $trickNR++; } /* if game is over, also output link to Score tab */ if($mystatus=='gameover' && DB_get_game_status_by_gameid($gameid)=='gameover' ) - echo " <li onclick=\"hl('13');\" class=\"current\"><a href=\"#\">"._('Score')."</a></li>\n"; + echo " <li onclick=\"hl('13');\" id=\"tricks13\" class=\"active\"><a href=\"#\">"._('Score')."</a></li>\n"; /* output previous/next buttons */ - echo ' <li onclick="hl_prev();" ><button>'._('prev')."</button></li>\n"; - echo ' <li onclick="hl_next();" ><button>'._('next')."</button></li>\n"; + echo ' <li onclick="hl_prev();" id=\"prevtr\"><a href="#">'._('prev')."</a></li>\n"; + echo ' <li onclick="hl_next();" id=\"nexttr\"><a href="#">'._('next')."</a></li>\n"; echo "</ul>\n\n"; diff --git a/include/output.php b/include/output.php index 9094171..fa61c87 100644 --- a/include/output.php +++ b/include/output.php @@ -431,11 +431,6 @@ function output_header() <script src="js/less.min.js" type="text/javascript"></script> </head> <body onload="high_last();"> -<header> -<?php - echo '<h1> '._('Welcome to E-Doko').' </h1>'; -?> -</header> <?php echo "<div class=\"main\">"; @@ -464,6 +459,7 @@ function output_footer() echo '<script src="'.autoversion('js/jquery.tablesorter.min.js'). '"></script>'; echo '<script src="'.autoversion('js/jquery.tools.min.js'). '"></script>'; echo '<script src="'.autoversion('js/bootstrap.min.js'). '"></script>'; + echo '<script src="'.autoversion('js/layout.js'). '"></script>'; echo '<script src="'.autoversion('js/game.js'). '"></script>'; echo "</body>\n"; @@ -472,7 +468,7 @@ function output_footer() return; } -function output_status() +function output_navbar() { global $defaulttimezone, $INDEX, $WIKI, $RSS; @@ -493,15 +489,27 @@ function output_status() $token = get_user_token($myid); /* logout info */ - echo "\n<div class=\"status\">\n"; - echo $name,"\n"; - echo " | <a href=\"".$INDEX."\">"._('mypage')."</a>\n"; - echo " | <a href=\"".$INDEX."?action=prefs\">"._('settings')."</a>\n"; - echo " | <a href=\"".$INDEX."?action=new\">"._('new game')."</a>\n"; - echo " | <a href=\"".$INDEX."?action=stats\">"._('statistics')."</a>\n"; - echo " | <a href=\"".$WIKI."\">"._('wiki/bugs')."</a>\n"; - echo " | <a href=\"".$RSS."?uid=".$myid."&token=".$token."\">"._('atom')."</a>\n"; - echo " | <a href=\"".$INDEX."?action=logout\">"._('logout')."</a>\n"; + echo "\n<div class=\"navbar navbar-fixed-top\">\n"; + echo " <div class=\"navbar-inner\">\n"; + echo " <span class=\"brand\" href=\"#\">E-DoKo</span>\n"; + echo " <ul class=\"nav\">"; + echo " <li><a href=\"#\">$name</a> </li>\n"; + echo " <li class=\"divider-vertical\"></li>\n"; + echo " <li> <a href=\"".$INDEX."\">"._('mypage')."</a></li>\n"; + echo " <li class=\"divider-vertical\"></li>\n"; + echo " <li> <a href=\"".$INDEX."?action=prefs\">"._('settings')."</a></li>\n"; + echo " <li class=\"divider-vertical\"></li>\n"; + echo " <li> <a href=\"".$INDEX."?action=new\">"._('new game')."</a></li>\n"; + echo " <li class=\"divider-vertical\"></li>\n"; + echo " <li> <a href=\"".$INDEX."?action=stats\">"._('statistics')."</a></li>\n"; + echo " <li class=\"divider-vertical\"></li>\n"; + echo " <li> <a href=\"".$WIKI."\">"._('wiki/bugs')."</a></li>\n"; + echo " <li class=\"divider-vertical\"></li>\n"; + echo " <li> <a href=\"".$RSS."?uid=".$myid."&token=".$token."\">"._('atom')."</a></li>\n"; + echo " <li class=\"divider-vertical\"></li>\n"; + echo " <li> <a href=\"".$INDEX."?action=logout\">"._('logout')."</a></li>\n"; + echo " </ul>\n"; + echo " </div>\n"; echo "</div>\n\n"; echo "<div class=\"lastlogin\"><span>"._('last login').": ".date("r",$unixtime)."</span></div>\n\n"; |