From 03ccddadedddbe97de757b11606ce2a845d37b99 Mon Sep 17 00:00:00 2001 From: mamichels Date: Thu, 16 May 2019 22:55:54 +0200 Subject: [PATCH 1/4] feat(license): add license component to display full license --- src/app/pages/homepage/homepage.ts | 3 ++- src/app/pages/license/license.html | 21 +++++++++++++++++++++ src/app/pages/license/license.scss | 16 ++++++++++++++++ src/app/pages/license/license.ts | 16 ++++++++++++++++ src/app/routes.ts | 2 ++ src/app/shared/footer/footer.html | 2 +- src/app/shared/footer/footer.scss | 4 ++++ src/app/shared/footer/footer.ts | 3 +++ 8 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 src/app/pages/license/license.html create mode 100644 src/app/pages/license/license.scss create mode 100644 src/app/pages/license/license.ts diff --git a/src/app/pages/homepage/homepage.ts b/src/app/pages/homepage/homepage.ts index a33063974..08ed85d91 100644 --- a/src/app/pages/homepage/homepage.ts +++ b/src/app/pages/homepage/homepage.ts @@ -4,6 +4,7 @@ import {MatButtonModule} from '@angular/material/button'; import {FooterModule} from '../../shared/footer/footer'; import {RouterModule} from '@angular/router'; import {ComponentPageTitle} from '../page-title/page-title'; +import { LicenseModule } from '../license/license'; @Component({ selector: 'app-homepage', @@ -21,7 +22,7 @@ export class Homepage implements OnInit { } @NgModule({ - imports: [SvgViewerModule, MatButtonModule, FooterModule, RouterModule], + imports: [SvgViewerModule, MatButtonModule, FooterModule, RouterModule, LicenseModule], exports: [Homepage], declarations: [Homepage], }) diff --git a/src/app/pages/license/license.html b/src/app/pages/license/license.html new file mode 100644 index 000000000..d76d9e850 --- /dev/null +++ b/src/app/pages/license/license.html @@ -0,0 +1,21 @@ +
+

The MIT License

+

Copyright (c) 2010-2019 Google LLC. http://material.angular.io/license

+

Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions:

+

The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software.

+

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE.

+
+ + \ No newline at end of file diff --git a/src/app/pages/license/license.scss b/src/app/pages/license/license.scss new file mode 100644 index 000000000..0371ba06e --- /dev/null +++ b/src/app/pages/license/license.scss @@ -0,0 +1,16 @@ +@import '../../../styles/constants'; + +:host { + display: flex; + flex-direction: column; + flex-grow: 1; + } + +.license-content { + flex-grow: 1; + margin: $content-padding-side; + + @media (max-width: $small-breakpoint-width) { + margin: 0; + } +} \ No newline at end of file diff --git a/src/app/pages/license/license.ts b/src/app/pages/license/license.ts new file mode 100644 index 000000000..f89cbee8b --- /dev/null +++ b/src/app/pages/license/license.ts @@ -0,0 +1,16 @@ +import { Component, NgModule } from "@angular/core"; +import { FooterModule } from "../../shared/footer/footer"; + +@Component({ + selector: 'app-license', + templateUrl: './license.html', + styleUrls: ['./license.scss'] +}) +export class License {} + +@NgModule({ + imports: [FooterModule], + exports: [License], + declarations: [License], +}) +export class LicenseModule {} \ No newline at end of file diff --git a/src/app/routes.ts b/src/app/routes.ts index 470dba75a..77eeb5dd9 100644 --- a/src/app/routes.ts +++ b/src/app/routes.ts @@ -14,10 +14,12 @@ import { CanActivateComponentSidenav } from './pages/component-sidenav/component-sidenav-can-load-guard'; import {GuideViewer} from './pages/guide-viewer/guide-viewer'; +import {License} from './pages/license/license'; export const MATERIAL_DOCS_ROUTES: Routes = [ {path: '', component: Homepage, pathMatch: 'full', data: {}}, {path: 'categories', redirectTo: '/components/categories'}, + {path: 'license', component: License}, {path: 'guides', component: GuideList, data: {}}, // Since https://github.com/angular/components/pull/9574, the cdk-table guide became the overview // document for the cdk table. To avoid any dead / broken links, we redirect to the new location. diff --git a/src/app/shared/footer/footer.html b/src/app/shared/footer/footer.html index d81bd2169..3ce35457a 100644 --- a/src/app/shared/footer/footer.html +++ b/src/app/shared/footer/footer.html @@ -16,7 +16,7 @@ diff --git a/src/app/shared/footer/footer.scss b/src/app/shared/footer/footer.scss index 0bb6db56c..18abb05db 100644 --- a/src/app/shared/footer/footer.scss +++ b/src/app/shared/footer/footer.scss @@ -31,6 +31,10 @@ flex-direction: column; min-width: 225px; text-align: center; + + a:any-link { + color: inherit; + } } .docs-footer-logo span { diff --git a/src/app/shared/footer/footer.ts b/src/app/shared/footer/footer.ts index 02304d86a..981942db5 100644 --- a/src/app/shared/footer/footer.ts +++ b/src/app/shared/footer/footer.ts @@ -1,5 +1,7 @@ import {Component, NgModule} from '@angular/core'; import {materialVersion} from '../version/version'; +import { RouterModule } from '@angular/router'; +import { MATERIAL_DOCS_ROUTES } from '../../routes'; @Component({ selector: 'app-footer', @@ -14,6 +16,7 @@ export class Footer { @NgModule({ + imports: [RouterModule.forRoot(MATERIAL_DOCS_ROUTES)], exports: [Footer], declarations: [Footer], }) From e2f0b309afb0c75c669fbc7b2a91505040dfca76 Mon Sep 17 00:00:00 2001 From: mamichels <48212402+mamichels@users.noreply.github.com> Date: Thu, 16 May 2019 23:39:22 +0200 Subject: [PATCH 2/4] Update license.ts --- src/app/pages/license/license.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/pages/license/license.ts b/src/app/pages/license/license.ts index f89cbee8b..637c7daa8 100644 --- a/src/app/pages/license/license.ts +++ b/src/app/pages/license/license.ts @@ -13,4 +13,4 @@ export class License {} exports: [License], declarations: [License], }) -export class LicenseModule {} \ No newline at end of file +export class LicenseModule {} From 18bdd55e65b44ccaf366c60629eda6897b7e3374 Mon Sep 17 00:00:00 2001 From: mamichels <48212402+mamichels@users.noreply.github.com> Date: Thu, 16 May 2019 23:39:34 +0200 Subject: [PATCH 3/4] Update license.scss --- src/app/pages/license/license.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/pages/license/license.scss b/src/app/pages/license/license.scss index 0371ba06e..3526bef9d 100644 --- a/src/app/pages/license/license.scss +++ b/src/app/pages/license/license.scss @@ -13,4 +13,4 @@ @media (max-width: $small-breakpoint-width) { margin: 0; } -} \ No newline at end of file +} From b3ee820c12da2213d0712583fad15c5842854097 Mon Sep 17 00:00:00 2001 From: mamichels <48212402+mamichels@users.noreply.github.com> Date: Thu, 16 May 2019 23:39:46 +0200 Subject: [PATCH 4/4] Update license.html --- src/app/pages/license/license.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/pages/license/license.html b/src/app/pages/license/license.html index d76d9e850..37b39f67f 100644 --- a/src/app/pages/license/license.html +++ b/src/app/pages/license/license.html @@ -18,4 +18,4 @@ THE SOFTWARE.

- \ No newline at end of file +