File tree Expand file tree Collapse file tree 10 files changed +139
-0
lines changed Expand file tree Collapse file tree 10 files changed +139
-0
lines changed Original file line number Diff line number Diff line change 1+ @use " @angular/material" as mat ;
2+
3+ @mixin color ($theme ) {
4+ $color-config : map-get ($theme , " color" );
5+ $primary : map-get ($color-config , " primary" );
6+
7+ .footer {
8+ // Invert colors: background gets contrast color, text gets main color
9+ background-color : mat .get-color-from-palette ($primary , " default-contrast" );
10+ color : mat .get-color-from-palette ($primary );
11+
12+ a ,
13+ .toplink ,
14+ .footer-copy ,
15+ mat-icon {
16+ color : mat .get-color-from-palette ($primary );
17+ }
18+ }
19+ }
20+
21+ @mixin theme ($theme ) {
22+ $color-config : mat .get-color-config ($theme );
23+ @if $color-config != null {
24+ @include color ($theme );
25+ }
26+ }
Original file line number Diff line number Diff line change 1+ < div class ="footer ">
2+ < mat-toolbar class ="mat-elevation-z1 ">
3+ < span class ="spacer "> </ span >
4+
5+ < span >
6+ < h6 >
7+ < a
8+ class ="toplink "
9+ href ="{{ imprintUrl }} "
10+ target ="_blank "
11+ rel ="noopener "
12+ >
13+ < mat-icon > description</ mat-icon >
14+ < span class ="large-screen-text "> Imprint</ span >
15+ </ a >
16+ </ h6 >
17+ </ span >
18+
19+ < span >
20+ < h6 >
21+ < a
22+ class ="toplink "
23+ href ="{{ privacyUrl }} "
24+ target ="_blank "
25+ rel ="noopener "
26+ >
27+ < mat-icon > lock</ mat-icon >
28+ < span class ="large-screen-text "> Privacy</ span >
29+ </ a >
30+ </ h6 >
31+ </ span >
32+ </ mat-toolbar >
33+ </ div >
Original file line number Diff line number Diff line change 1+ .footer {
2+ // background: white;
3+ // width: 100%;
4+ // padding: 1rem;
5+ // text-align: center;
6+
7+ background-color : white ;
8+
9+ mat-toolbar {
10+ background : white !important ;
11+ height : 3.5rem ;
12+
13+ .spacer {
14+ flex : 1 1 auto ;
15+ }
16+
17+ .toplink {
18+ padding : 0.5rem 1rem ;
19+ font : bold ;
20+ font-size : 11pt ;
21+
22+ mat-icon {
23+ vertical-align : middle ;
24+ }
25+ }
26+ }
27+ }
Original file line number Diff line number Diff line change 1+ import { ComponentFixture , TestBed } from '@angular/core/testing' ;
2+
3+ import { AppFooterComponent } from './app-footer.component' ;
4+
5+ describe ( 'AppFooterComponent' , ( ) => {
6+ let component : AppFooterComponent ;
7+ let fixture : ComponentFixture < AppFooterComponent > ;
8+
9+ beforeEach ( ( ) => {
10+ TestBed . configureTestingModule ( {
11+ declarations : [ AppFooterComponent ]
12+ } ) ;
13+ fixture = TestBed . createComponent ( AppFooterComponent ) ;
14+ component = fixture . componentInstance ;
15+ fixture . detectChanges ( ) ;
16+ } ) ;
17+
18+ it ( 'should create' , ( ) => {
19+ expect ( component ) . toBeTruthy ( ) ;
20+ } ) ;
21+ } ) ;
Original file line number Diff line number Diff line change 1+ import { Component , OnInit } from "@angular/core" ;
2+ import { AppConfigService } from "app-config.service" ;
3+
4+ @Component ( {
5+ selector : "app-app-footer" ,
6+ templateUrl : "./app-footer.component.html" ,
7+ styleUrls : [ "./app-footer.component.scss" ] ,
8+ } )
9+ export class AppFooterComponent implements OnInit {
10+ appConfig = this . appConfigService . getConfig ( ) ;
11+
12+ imprintUrl = "" ;
13+ privacyUrl = "" ;
14+
15+ constructor ( public appConfigService : AppConfigService ) { }
16+
17+ ngOnInit ( ) {
18+ this . imprintUrl =
19+ this . appConfig . imprintUrl || "https://example.com/imprint" ;
20+ this . privacyUrl =
21+ this . appConfig . privacyUrl || "https://example.com/privacy" ;
22+ }
23+ }
Original file line number Diff line number Diff line change 33 < div class ="main ">
44 < router-outlet > </ router-outlet >
55 </ div >
6+ < app-app-footer > </ app-app-footer >
67</ div >
Original file line number Diff line number Diff line change @@ -12,12 +12,14 @@ import { AppMainLayoutComponent } from "./app-main-layout/app-main-layout.compon
1212import { BatchCardModule } from "datasets/batch-card/batch-card.module" ;
1313import { BreadcrumbModule } from "shared/modules/breadcrumb/breadcrumb.module" ;
1414import { UsersModule } from "../users/users.module" ;
15+ import { AppFooterComponent } from './app-footer/app-footer.component' ;
1516
1617@NgModule ( {
1718 declarations : [
1819 AppLayoutComponent ,
1920 AppHeaderComponent ,
2021 AppMainLayoutComponent ,
22+ AppFooterComponent ,
2123 ] ,
2224 imports : [
2325 CommonModule ,
Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ const appConfig: AppConfigInterface = {
5555 multipleDownloadAction : "http://localhost:3012/zip" ,
5656 multipleDownloadEnabled : true ,
5757 multipleDownloadUseAuthToken : false ,
58+ imprintUrl = "https ://example.com/imprint",
59+ privacyUrl = "https://example.com/privacy" ,
5860 oAuth2Endpoints : [ ] ,
5961 policiesEnabled : true ,
6062 retrieveDestinations : [ ] ,
Original file line number Diff line number Diff line change @@ -143,6 +143,8 @@ export interface AppConfigInterface {
143143 mainMenu ?: MainMenuConfiguration ;
144144 supportEmail ?: string ;
145145 checkBoxFilterClickTrigger ?: boolean ;
146+ imprintUrl ?: string ;
147+ privacyUrl ?: string ;
146148}
147149
148150function isMainPageConfiguration ( obj : any ) : obj is MainPageConfiguration {
Original file line number Diff line number Diff line change 44@use " @angular/material" as mat ;
55@use " ./app/app-theme" as app ;
66@use " ./app/_layout/app-header/app-header-theme" as app-header ;
7+ @use " ./app/_layout/app-footer/app-footer-theme" as app-footer ;
78@use " ./app/datasets/batch-view/batch-view-theme" as batch-view ;
89@use " ./app/datasets/dashboard/dashboard-theme" as dashboard ;
910@use " ./app/datasets/datafiles/datafiles-theme" as datafiles ;
@@ -229,6 +230,7 @@ $theme: map.merge(
229230@include mat .all-component-themes ($theme );
230231@include app .theme ($theme );
231232@include app-header .theme ($theme );
233+ @include app-footer .theme ($theme );
232234@include batch-view .theme ($theme );
233235@include dashboard .theme ($theme );
234236@include datafiles .theme ($theme );
You can’t perform that action at this time.
0 commit comments