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

Commit 8783cfd

Browse files
Add @angular/material version to the navbar. (#246)
1 parent 871ead0 commit 8783cfd

File tree

6 files changed

+42
-17
lines changed

6 files changed

+42
-17
lines changed

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/footer/footer.html

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
<footer class="docs-footer">
22
<div class="docs-footer-list">
3-
<div class="footer-logo">
4-
<img class="docs-footer-angular-logo"
5-
src="../../../assets/img/homepage/angular-white-transparent.svg"
6-
alt="angular">
3+
<div class="docs-footer-logo">
4+
<div class="footer-logo">
5+
<img class="docs-footer-angular-logo"
6+
src="../../../assets/img/homepage/angular-white-transparent.svg"
7+
alt="angular">
8+
<span><a href="https://angular.io">Learn Angular</a></span>
9+
</div>
710
</div>
811

9-
<div class="docs-footer-links">
10-
<ul>
11-
<li> <a href="https://angular.io">Learn Angular</a> </li>
12-
</ul>
12+
<div class="docs-footer-version">
13+
<span class="version">Current Version: {{version}}</span>
1314
</div>
1415

1516
<div class="docs-footer-copyright">
16-
<p>Powered by Google ©2010-2018. Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.</p>
17+
<span>Powered by Google ©2010-2018.</span>
18+
<span>Code licensed under an MIT-style License.</span>
19+
<span>Documentation licensed under CC BY 4.0.</span>
1720
</div>
1821
</div>
1922
</footer>

src/app/shared/footer/footer.scss

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,39 @@
1111
padding: 8px;
1212
}
1313

14+
.docs-footer-logo {
15+
flex: 1;
16+
}
17+
1418
.docs-footer-angular-logo {
1519
height: 50px;
1620
}
1721

22+
.docs-footer-version {
23+
flex: 1;
24+
text-align: center;
25+
}
26+
1827
.docs-footer-copyright {
1928
display: flex;
2029
flex: 1;
2130
justify-content: flex-end;
31+
flex-direction: column;
32+
min-width: 225px;
33+
text-align: center;
2234
}
2335

24-
.docs-footer-links ul {
25-
list-style: none;
36+
.docs-footer-logo span {
37+
display: inline-block;
38+
line-height: 50px;
2639
margin: 0 40px;
27-
padding: 0;
40+
vertical-align: bottom;
2841

2942
a {
3043
font-size: 16px;
3144
padding: 0;
3245
text-decoration: none;
46+
color: inherit;
3347

3448
&:hover {
3549
text-decoration: underline;

src/app/shared/footer/footer.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
import {Component, NgModule} from '@angular/core';
2+
import {VERSION} from '@angular/material';
23

34
@Component({
45
selector: 'app-footer',
56
templateUrl: './footer.html',
67
styleUrls: ['./footer.scss']
78
})
8-
export class Footer { }
9+
export class Footer {
10+
get version() {
11+
const version = VERSION.full.match(/\d+\.\d+\.\d+/);
12+
if (version) {
13+
return version[0];
14+
}
15+
return '';
16+
}
17+
}
918

1019

1120
@NgModule({

src/app/shared/navbar/navbar.ts

Lines changed: 1 addition & 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} 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';

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)