Skip to content

Commit

Permalink
feat: change navbar, toolbar and landing page coloring to denote when…
Browse files Browse the repository at this point in the history
… looking at docs on next (#540)
  • Loading branch information
josephperrott authored Oct 18, 2018
1 parent e592ba1 commit d0a84cf
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 8 deletions.
10 changes: 5 additions & 5 deletions material.angular.io/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions material.angular.io/src/_app-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
$warn: map-get($theme, warn);
$background: map-get($theme, background);
$foreground: map-get($theme, foreground);
$next-theme: mat-palette($mat-red);

.docs-app-background {
background: mat-color($background, background);
Expand All @@ -41,6 +42,10 @@
color: mat-color($primary, default-contrast);
}

.is-next-version {
background: mat-color($next-theme, 900) !important;
}

@include component-category-list-theme($theme);
@include component-list-theme($theme);
@include component-viewer-sidenav-theme($theme);
Expand Down
3 changes: 2 additions & 1 deletion material.angular.io/src/app/pages/homepage/homepage.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<header class="docs-header-background">
<header class="docs-header-background"
[class.is-next-version]="isNextVersion">
<div class="docs-header-section">
<div class="docs-header-headline">
<h1 class="mat-h1">Angular Material</h1>
Expand Down
2 changes: 2 additions & 0 deletions material.angular.io/src/app/pages/homepage/homepage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import {ComponentPageTitle} from '../page-title/page-title';
styleUrls: ['./homepage.scss']
})
export class Homepage implements OnInit {
isNextVersion = location.hostname.startsWith('next.material.angular.io');

constructor(public _componentPageTitle: ComponentPageTitle) {}

ngOnInit(): void {
Expand Down
3 changes: 2 additions & 1 deletion material.angular.io/src/app/shared/footer/footer.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<footer class="docs-footer">
<footer class="docs-footer"
[class.is-next-version]="isNextVersion">
<div class="docs-footer-list">
<div class="docs-footer-logo">
<div class="footer-logo">
Expand Down
2 changes: 2 additions & 0 deletions material.angular.io/src/app/shared/footer/footer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {materialVersion} from '../version/version';
styleUrls: ['./footer.scss']
})
export class Footer {
isNextVersion = location.hostname.startsWith('next.material.angular.io');

version = materialVersion;
}

Expand Down
3 changes: 2 additions & 1 deletion material.angular.io/src/app/shared/navbar/navbar.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!-- TODO: figure out if the <nav> should go inside of a <header> element. -->
<nav class="docs-navbar-header">
<nav class="docs-navbar-header"
[class.is-next-version]="isNextVersion">
<a mat-button class="docs-button" routerLink="/" aria-label="Angular Material">
<img class="docs-angular-logo"
src="../../../assets/img/homepage/angular-white-transparent.svg"
Expand Down
2 changes: 2 additions & 0 deletions material.angular.io/src/app/shared/navbar/navbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const SECTIONS_KEYS = Object.keys(SECTIONS);
styleUrls: ['./navbar.scss']
})
export class NavBar {
isNextVersion = location.hostname.startsWith('next.material.angular.io');

get sections() {
return SECTIONS;
}
Expand Down

0 comments on commit d0a84cf

Please sign in to comment.