[search] Moved styles to separate css file
authorErik Haider Forsén <erik@forsen.not>
Sun, 15 Nov 2015 13:25:04 +0000 (14:25 +0100)
committerErik Haider Forsén <erik@forsen.not>
Sun, 15 Nov 2015 13:25:04 +0000 (14:25 +0100)
src/components/search/search.css [new file with mode: 0644]
src/components/search/search.html
src/components/search/search.ts

diff --git a/src/components/search/search.css b/src/components/search/search.css
new file mode 100644 (file)
index 0000000..6f88808
--- /dev/null
@@ -0,0 +1,9 @@
+.search img{
+    width: 20px;
+    position: absolute;
+}
+
+.search li{
+    padding: 0.5em 0.5em 0.5em 0;
+}
+
index 095c123..c1b36d5 100644 (file)
@@ -1,20 +1,21 @@
-<section class="form-group">
-    <label class="sr-only" for="livesearch">Search</label>
-    <input
-            mou-live-search
-            (results)="orgunits = $event"
-            (loading)="loading = $event"
-            type="text"
-            autofocus
-            id="livesearch">
-    <img style="width: 20px; position: absolute;"
-         [hidden]="!loading"
-         src="https://www.brown.edu/sites/default/themes/pawtuxet/img/loader-larger.gif">
-</section>
-<section>
-    <ul>
-        <li *ng-for="#orgunit of orgunits" (click)="getMoreInfo(orgunit)" style="padding: 0.5em 0.5em 0.5em 0;">
-            {{orgunit.name}}
-        </li>
-    </ul>
-</section>
+<div class="search">
+    <section class="form-group">
+        <label class="sr-only" for="livesearch">Search</label>
+        <input
+                mou-live-search
+                (results)="orgunits = $event"
+                (loading)="loading = $event"
+                type="text"
+                autofocus
+                id="livesearch">
+        <img [hidden]="!loading"
+             src="https://www.brown.edu/sites/default/themes/pawtuxet/img/loader-larger.gif">
+    </section>
+    <section>
+        <ul>
+            <li *ng-for="#orgunit of orgunits" (click)="getMoreInfo(orgunit)">
+                {{orgunit.name}}
+            </li>
+        </ul>
+    </section>
+</div>
index 7d9501e..d9d90ae 100644 (file)
@@ -4,7 +4,8 @@ import {LiveSearch} from "./livesearch";
 @Component({
     selector: 'mou-search',
     directives: [CORE_DIRECTIVES, LiveSearch],
-    templateUrl: './components/search/search.html'
+    templateUrl: './components/search/search.html',
+    styleUrls: ['./components/search/search.css']
 })
 export class Search {
     orgunits: Array<any> = [];