Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 4702556

Browse files
committed
Add @angular/material version to the navbar.
1 parent 5d7429d commit 4702556

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

src/app/shared/navbar/navbar.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
<img class="docs-angular-logo"
55
src="../../../assets/img/homepage/angular-white-transparent.svg"
66
alt="angular">
7-
<span>Material</span>
7+
<span class="title">
8+
<div class="label">Material</div>
9+
<div class="version">{{version.full}}</div>
10+
</span>
811
</a>
912
<a md-button class="docs-button" routerLink="components">Components</a>
1013
<a md-button class="docs-button" routerLink="guides">Guides</a>

src/app/shared/navbar/navbar.scss

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,22 @@
1111
}
1212
}
1313

14-
.flex-spacer {
15-
flex-grow: 1;
14+
.title {
15+
display: inline-block;
16+
line-height: 1;
17+
18+
.label {
19+
margin-top: 8px;
20+
}
21+
22+
.version {
23+
font-size: 9px;
24+
}
1625
}
26+
27+
.flex-spacer {
28+
flex-grow: 1;
29+
}
1730

1831
.docs-angular-logo {
1932
height: 26px;

src/app/shared/navbar/navbar.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {Component, NgModule} from '@angular/core';
2-
import {MdButtonModule} from '@angular/material';
2+
import {MdButtonModule, VERSION} from '@angular/material';
33
import {RouterModule} from '@angular/router';
44
import {ThemePickerModule} from '../theme-picker/theme-picker';
55

@@ -8,7 +8,11 @@ import {ThemePickerModule} from '../theme-picker/theme-picker';
88
templateUrl: './navbar.html',
99
styleUrls: ['./navbar.scss']
1010
})
11-
export class NavBar {}
11+
export class NavBar {
12+
get version() {
13+
return VERSION;
14+
}
15+
}
1216

1317
@NgModule({
1418
imports: [MdButtonModule, RouterModule, ThemePickerModule],

0 commit comments

Comments
 (0)