[navbar] Created navbar, moved search component from app to navbar.
authorErik Haider Forsén <erik@forsen.not>
Sun, 15 Nov 2015 15:52:07 +0000 (16:52 +0100)
committerErik Haider Forsén <erik@forsen.not>
Sun, 15 Nov 2015 15:52:07 +0000 (16:52 +0100)
src/components/app.html
src/components/app.ts
src/components/navbar/navbar.html [new file with mode: 0644]
src/components/navbar/navbar.ts [new file with mode: 0644]

index 265e722..bf57127 100644 (file)
@@ -1,12 +1,6 @@
 <div class="container">
-    <div class="nav">
-        Navbar
-        <mou-search></mou-search>
-        <mou-filter></mou-filter>
-    </div>
-
+    <mou-navbar></mou-navbar>
     <mou-map></mou-map>
-
 </div>
 
 
index 7feefc3..ea83e3f 100644 (file)
@@ -1,21 +1,16 @@
 import {HTTP_PROVIDERS} from 'angular2/http';
 import {Component, View, bootstrap, provide, ELEMENT_PROBE_PROVIDERS} from 'angular2/angular2';
 import {Map} from './map/map';
-import {Search} from "./search/search";
 import {Filter} from "./filter/filter";
+import {Navbar} from "./navbar/navbar";
 
 declare var System:any;
 
-@Component(
-    {
-        selector: 'mou-app',
-        templateUrl: './components/app.html',
-        directives:[Filter, Map, Search]
-    })
+@Component({
+    selector: 'mou-app',
+    templateUrl: './components/app.html',
+    directives: [Filter, Map, Navbar]
+})
+class App {}
 
-
-class App {
-
-}
-
-bootstrap(App,[HTTP_PROVIDERS, ELEMENT_PROBE_PROVIDERS]);
+bootstrap(App, [HTTP_PROVIDERS, ELEMENT_PROBE_PROVIDERS]);
diff --git a/src/components/navbar/navbar.html b/src/components/navbar/navbar.html
new file mode 100644 (file)
index 0000000..94c6a37
--- /dev/null
@@ -0,0 +1,34 @@
+<nav class="navbar navbar-default">
+    <div class="container-fluid">
+        <!-- Brand and toggle get grouped for better mobile display -->
+        <div class="navbar-header">
+            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
+                <span class="sr-only">Toggle navigation</span>
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+            </button>
+            <a class="navbar-brand" href="#">Brand</a>
+        </div>
+
+        <!-- Collect the nav links, forms, and other content for toggling -->
+        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
+            <div class="navbar-form navbar-left">
+                <mou-search></mou-search>
+            </div>
+            <ul class="nav navbar-nav navbar-right">
+                <li><a href="#">Link</a></li>
+                <li class="dropdown">
+                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
+                    <ul class="dropdown-menu">
+                        <li><a href="#">Action</a></li>
+                        <li><a href="#">Another action</a></li>
+                        <li><a href="#">Something else here</a></li>
+                        <li role="separator" class="divider"></li>
+                        <li><a href="#">Separated link</a></li>
+                    </ul>
+                </li>
+            </ul>
+        </div><!-- /.navbar-collapse -->
+    </div><!-- /.container-fluid -->
+</nav>
\ No newline at end of file
diff --git a/src/components/navbar/navbar.ts b/src/components/navbar/navbar.ts
new file mode 100644 (file)
index 0000000..ab50504
--- /dev/null
@@ -0,0 +1,13 @@
+import {Component} from 'angular2/angular2';
+import {Search} from "../search/search";
+
+@Component({
+    selector: 'mou-navbar',
+    directives: [Search],
+    templateUrl: './components/navbar/navbar.html'
+})
+export class Navbar {
+
+}
+
+