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

Commit e93f856

Browse files
committed
Add @angular/material version to the navbar.
1 parent fd7d5d4 commit e93f856

File tree

8 files changed

+31
-13
lines changed

8 files changed

+31
-13
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
"private": true,
2020
"dependencies": {
2121
"@angular/animations": "^4.4.3",
22-
"@angular/cdk": "2.0.0-beta.12",
22+
"@angular/cdk": "2.0.0-beta.11",
2323
"@angular/common": "^4.4.3",
2424
"@angular/compiler": "^4.4.3",
2525
"@angular/core": "^4.4.3",
2626
"@angular/forms": "^4.4.3",
2727
"@angular/http": "^4.4.3",
28-
"@angular/material": "2.0.0-beta.12",
28+
"@angular/material": "2.0.0-beta.11",
2929
"@angular/platform-browser": "^4.4.3",
3030
"@angular/platform-browser-dynamic": "^4.4.3",
3131
"@angular/router": "^4.4.3",

src/app/pages/component-category-list/component-category-list.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import {async, ComponentFixture, TestBed, inject} from '@angular/core/testing';
2-
import {Router} from '@angular/router';
3-
import {Observable} from 'rxjs/Observable'
1+
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
2+
import {Observable} from 'rxjs/Observable';
43
import {ComponentCategoryList, ComponentCategoryListModule} from './component-category-list';
54
import {DocsAppTestingModule} from '../../testing/testing-module';
65

src/app/pages/component-category-list/component-category-list.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {Component, NgModule, OnInit} from '@angular/core';
22
import {MatCardModule} from '@angular/material';
33
import {CommonModule} from '@angular/common';
44
import {ActivatedRoute, Params, RouterModule} from '@angular/router';
5-
import {DocumentationItems, SECTIONS} from '../../shared/documentation-items/documentation-items';
5+
import {DocumentationItems} from '../../shared/documentation-items/documentation-items';
66
import {ComponentPageTitle} from '../page-title/page-title';
77
import {SvgViewerModule} from '../../shared/svg-viewer/svg-viewer';
88
import {Observable} from 'rxjs/Observable';

src/app/pages/component-sidenav/component-sidenav.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('ComponentSidenav', () => {
2929
expect(component.sidenav instanceof MatSidenav).toBeTruthy();
3030
expect(component.isScreenSmall()).toBeTruthy();
3131
expect(component.sidenav.opened).toBe(false);
32-
})
32+
});
3333
});
3434

3535
it('should show a link for each item in doc items categories', () => {

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 mat-button class="docs-navbar-hide-small docs-button"
1013
*ngFor="let key of sectionKeys"

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: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {Component, NgModule} from '@angular/core';
2-
import {MatButtonModule, MatMenuModule} from '@angular/material';
32
import {CommonModule} from '@angular/common';
3+
import {MatButtonModule, MatMenuModule, VERSION} from '@angular/material';
44
import {RouterModule} from '@angular/router';
55
import {ThemePickerModule} from '../theme-picker/theme-picker';
66
import {SECTIONS} from '../documentation-items/documentation-items';
@@ -20,6 +20,10 @@ export class NavBar {
2020
get sectionKeys() {
2121
return SECTIONS_KEYS;
2222
}
23+
24+
get version() {
25+
return VERSION;
26+
}
2327
}
2428

2529
@NgModule({

src/app/shared/navigation-focus/navigation-focus.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import {NgModule, Injectable, OnInit, Directive, Input, ElementRef, Renderer2} from '@angular/core';
2-
import {Subscription} from 'rxjs/Subscription';
1+
import {NgModule, OnInit, Directive, ElementRef} from '@angular/core';
32

43
/** The timeout id of the previous focus change. */
54
let lastTimeoutId = -1;

0 commit comments

Comments
 (0)