Pārlūkot izejas kodu

Added buttons to main menu, linked map button to map

Kris Blassingame 6 gadus atpakaļ
vecāks
revīzija
bd441c7f49

+ 1
- 1
frontEnd/src/app/app.component.ts Parādīt failu

@@ -11,7 +11,7 @@ import { MainMenuPage } from '../pages/main-menu/main-menu';
11 11
   templateUrl: 'app.html'
12 12
 })
13 13
 export class MyApp {
14
-  rootPage:any = HomePage;
14
+  rootPage:any = MainMenuPage;
15 15
 
16 16
   constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
17 17
     platform.ready().then(() => {

+ 1
- 1
frontEnd/src/pages/home/home.html Parādīt failu

@@ -17,7 +17,7 @@
17 17
     </button>
18 18
 
19 19
     <p>Forgot Username/Password?
20
-      <b>Tap here!</b>
20
+      <b>Too bad!</b>
21 21
     </p>
22 22
 
23 23
   </div>

+ 61
- 10
frontEnd/src/pages/main-menu/main-menu.html Parādīt failu

@@ -1,18 +1,69 @@
1
-<!--
2
-  Generated template for the MainMenuPage page.
3
-
4
-  See http://ionicframework.com/docs/components/#navigation for more info on
5
-  Ionic pages and navigation.
6
--->
7 1
 <ion-header>
8 2
 
9 3
   <ion-navbar>
10
-    <ion-title>mainMenu</ion-title>
4
+    <ion-title>Main Menu</ion-title>
11 5
   </ion-navbar>
12 6
 
13 7
 </ion-header>
14 8
 
15 9
 
16
-<ion-content padding>
17
-
18
-</ion-content>
10
+<ion-content>
11
+  <ion-grid class="mainMenuButtons">
12
+    <ion-row>
13
+      <ion-col col-6 text-center>
14
+        <button ion-button>
15
+          <ion-icon name="bicycle">
16
+            <br>Trails</ion-icon>
17
+        </button>
18
+      </ion-col>
19
+      <ion-col col-6 text-center>
20
+        <button ion-button>
21
+          <ion-icon name="paper">
22
+            <br>News</ion-icon>
23
+        </button>
24
+      </ion-col>
25
+    </ion-row>
26
+    <ion-row>
27
+      <ion-col col-6 text-center>
28
+        <button ion-button>
29
+          <ion-icon name="build">
30
+            <br>Repairs</ion-icon>
31
+        </button>
32
+      </ion-col>
33
+      <ion-col col-6 text-center>
34
+        <button ion-button (click)="goToMap()">
35
+          <ion-icon name="map">
36
+            <br>Map</ion-icon>
37
+        </button>
38
+      </ion-col>
39
+    </ion-row>
40
+    <ion-row>
41
+      <ion-col col-6 text-center>
42
+        <button ion-button>
43
+          <ion-icon name="sunny">
44
+            <br>Weather</ion-icon>
45
+        </button>
46
+      </ion-col>
47
+      <ion-col col-6 text-center>
48
+        <button ion-button>
49
+          <ion-icon name="book">
50
+            <br>Laws</ion-icon>
51
+        </button>
52
+      </ion-col>
53
+    </ion-row>
54
+    <ion-row>
55
+      <ion-col col-6 text-center>
56
+        <button ion-button>
57
+          <ion-icon name="settings">
58
+            <br>Settings</ion-icon>
59
+        </button>
60
+      </ion-col>
61
+      <ion-col col-6 text-center>
62
+        <button ion-button>
63
+          <ion-icon name="information-circle">
64
+            <br>About</ion-icon>
65
+        </button>
66
+      </ion-col>
67
+    </ion-row>
68
+  </ion-grid>
69
+</ion-content>

+ 5
- 0
frontEnd/src/pages/main-menu/main-menu.ts Parādīt failu

@@ -1,5 +1,6 @@
1 1
 import { Component } from '@angular/core';
2 2
 import { IonicPage, NavController, NavParams } from 'ionic-angular';
3
+import { GoogleMapComponent } from '../../components/google-map/google-map';
3 4
 
4 5
 /**
5 6
  * Generated class for the MainMenuPage page.
@@ -22,4 +23,8 @@ export class MainMenuPage {
22 23
     console.log('ionViewDidLoad MainMenuPage');
23 24
   }
24 25
 
26
+  goToMap() {
27
+    this.navCtrl.push(GoogleMapComponent);
28
+  }
29
+
25 30
 }