Skip to content

Commit 2d10e06

Browse files
Angular Rest install and dashboard layout
1 parent 01125b8 commit 2d10e06

7 files changed

+45
-4
lines changed

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@maxxton:registry=https://npm.maxxton.com

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"@angular/platform-browser": "^2.3.1",
2323
"@angular/platform-browser-dynamic": "^2.3.1",
2424
"@angular/router": "^3.3.1",
25+
"@maxxton/angular-rest": "^1.0.0",
2526
"angular-rest": "^0.1.2",
2627
"core-js": "^2.4.1",
2728
"hammerjs": "^2.0.8",

src/app/app.component.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="root-page">
22

33
<!-- Toolbar -->
4-
<md-toolbar>
4+
<md-toolbar id="splash-nav">
55
<a routerLink="/" class="logo-section"><span>{{title}}</span></a>
66
<span class="spacer"></span>
77
<div class="title-buttons">
@@ -17,7 +17,7 @@
1717
</div>
1818

1919
<!--Footer-->
20-
<div class="footer">
20+
<div class="footer" id="splash-footer">
2121
<div class="footer-top">
2222
<div class="wrapper">
2323
<a name="contact"></a>

src/app/app.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ import { Component } from '@angular/core';
66
styleUrls: ['./app.component.scss']
77
})
88

9-
export class AppComponent {
9+
export class AppComponent{
1010
title = 'OpenChirp';
1111
}
+9-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
<div class="dashboard">
2-
2+
<md-toolbar>
3+
{{title}} Dashboard
4+
<div class="toolbar-content">
5+
{{username}}
6+
</div>
7+
</md-toolbar>
8+
<div class="sidenav">
9+
10+
</div>
311
</div>
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
$dashboard-toolbar-color: #424242;
2+
$background-color: #efefef;
3+
$side-nav-color: #2c3e50;
4+
.dashboard {
5+
md-toolbar {
6+
background-color: $dashboard-toolbar-color;
7+
color: $background-color;
8+
position: fixed;
9+
top:0;
10+
left: 0;
11+
z-index: 999;
12+
.toolbar-content {
13+
text-align: right;
14+
width: 100%;
15+
}
16+
}
17+
.sidenav {
18+
position: fixed;
19+
width: 240px;
20+
height: 100vh;
21+
background-color: $side-nav-color;
22+
top:0;
23+
left: 0;
24+
z-index: 998;
25+
}
26+
}

src/app/dashboard/dashboard.component.ts

+5
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@ import { Http, Request, Response } from '@angular/http';
1010

1111
export class DashboardComponent {
1212
title = 'OpenChirp';
13+
username = "John Doe";
14+
constructor() {
15+
document.getElementById("splash-nav").style.display = "none";
16+
document.getElementById("splash-footer").style.display = "none";
17+
}
1318
}

0 commit comments

Comments
 (0)