Commits

Cédric Bonhomme  committed e4c04c2

Improved search box.

  • Participants
  • Parent commits 208bf03

Comments (0)

Files changed (1)

File pyaggr3g470r/templates/layout.html

 
   <body>
 
-
     <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
       <div class="container">
         <div class="navbar-header">
           </button>
           <a class="navbar-brand" href="/">pyAggr3g470r</a>
         </div>
-        {% if g.user.is_authenticated() %}
+
+        <!-- Collect the nav links, forms, and other content for toggling -->
         <div class="collapse navbar-collapse navbar-ex1-collapse">
-            <form class="navbar-form pull-right col-lg-4 col-4 col-sm-4" method="get" action="/search/" role="search">
-                <div class="input-group">
-                    <input type="search" class="form-control" name="query" placeholder="Search"/>
-                    <span class="input-group-btn">
-                        <button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>
-                    </span> 
-                </div>
-            </form>
-            <ul class="nav navbar-nav navbar-right">
+          <ul class="nav navbar-nav navbar-right">
+            {% if g.user.is_authenticated() %}
                 <li class="dropdown">
                     <a href="#" class="dropdown-toggle" data-toggle="dropdown">Articles <b class="caret"></b></a>
                     <ul class="dropdown-menu">
                 <li><a href="/management/">Management</a></li>
                 <li><a href="/about/">About</a></li>
                 <li><a href="{{ url_for('logout') }}">Logout</a></li>
-            </ul>
-        </div>
-        {% endif %}
-      </div>
+                <li class="dropdown">
+                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
+                        <button class="btn btn-default btn-xs" type="submit"><span class="glyphicon glyphicon-search"></span></button> <b class="caret"></b>
+                    </a>
+                    <ul class="dropdown-menu">
+                        <li>
+                            <form class="navbar-form" method=get action="/search/" role="search">
+                                <div class="input-group">
+                                    <input type="text" class="form-control" name="query" placeholder="Search">
+                                </div>
+                            </form>
+                        </li>
+                    </ul>
+                </li>
+            {% endif %}
+          </ul>
+        </div><!-- /.navbar-collapse -->
+      </div><!-- /.container -->
     </nav>
 
 
-
     {% block content %}{% endblock %}
 
     <!-- Bootstrap core JavaScript -->