Commit 32bad9bdbe7aefe2fb67e3e32f89ba7fa08f23d5

Authored by Geoffrey PREUD'HOMME
1 parent 71b34f50

Added navbar toggle on small screens

Not really a navbar toggle, just scrolls up. That would be a mess if
it was a real one, I don't want't to go into it.
Showing 3 changed files with 16 additions and 0 deletions   Show diff stats
css/crep.css
... ... @@ -45,6 +45,11 @@ body
45 45 font-family: linkFont;
46 46 }
47 47  
  48 +.navbar-default .navbar-toggle .icon-bar
  49 +{
  50 + background-color: #fff;
  51 +}
  52 +
48 53 .navbar-default
49 54 {
50 55 background-color: #749BD1;
... ...
js/crep.js
... ... @@ -108,6 +108,11 @@ $(document).ready(function () {
108 108 loc: current
109 109 }, document.title, current)
110 110 window.onpopstate = historyChange
  111 + $('.navbar-fixed-top .navbar-toggle').click(function () {
  112 + $(document.body).animate({
  113 + scrollTop: 0
  114 + })
  115 + })
111 116 })
112 117  
113 118 function initializeMap() {
... ...
topnavbar.php
... ... @@ -6,6 +6,12 @@
6 6 <span class="hidden-xs">Coupe de Robotique des Ecoles Primaires</span>
7 7 <span class="visible-xs"><img src="img/logo.png" height="20" /></span>
8 8 </a>
  9 + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
  10 + <span class="sr-only">Show menu</span>
  11 + <span class="icon-bar"></span>
  12 + <span class="icon-bar"></span>
  13 + <span class="icon-bar"></span>
  14 + </button>
9 15 </div>
10 16 <div class="collapse navbar-collapse" style="margin-right: 10px;">
11 17 <p class="navbar-text navbar-right">
... ...