File tree Expand file tree Collapse file tree 6 files changed +110
-8
lines changed
Expand file tree Collapse file tree 6 files changed +110
-8
lines changed Original file line number Diff line number Diff line change 1515
1616< mat-spinner *ngIf ="loading; else loadedConfig "> </ mat-spinner >
1717< ng-template #loadedConfig >
18- < mat-toolbar color ="primary ">
19- < mat-icon > library_books</ mat-icon >
18+ < mat-toolbar color ="primary " id ="pa_header ">
19+ < a *ngIf ="planqkUi " href ="https://platform.planqk.de/my-content ">
20+ < img src ="https://platform.planqk.de/img/PlanQK_Logo_Weiss_Beta_Version.5b689144.svg " alt ="PlanQK Logo " width ="250 "
21+ style ="max-width: 7rem; margin-top: 1rem " />
22+ </ a >
23+ < mat-icon *ngIf ="planqkUi === false "> library_books</ mat-icon >
2024 < span style ="margin-left: 1rem "> Pattern Atlas</ span >
2125 < span class ="spacer "> </ span >
2226 {{welcomeText}}
27+ < a *ngIf ="planqkUi " mat-stroked-button href ="https://platform.planqk.de/my-content "> Back to the PlanQK platform</ a >
2328 < button mat-icon-button [matMenuTriggerFor] ="menu " aria-label ="Button with a menu ">
2429 < mat-icon > more_vert</ mat-icon >
2530 </ button >
3540
3641 </ div >
3742 </ mat-toolbar >
43+
3844 < nav mat-tab-nav-bar >
3945 < a mat-tab-link [routerLink] ="'/' + pathConstants.patternLanguages "
4046 routerLinkActive #rla1 ="routerLinkActive " [active] ="rla1.isActive ">
Original file line number Diff line number Diff line change 3737 width : 100% ;
3838 height : 100% ;
3939}
40+
41+ #pa_header {
42+ background : linear-gradient (45deg , #3d78b5 , #e12d32 );
43+ }
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ export class AppComponent implements OnInit {
3838 user : PAUser ;
3939 readonly pathConstants = globals . pathConstants ;
4040 loading = true ;
41+ planqkUi = false ;
4142
4243 constructor ( public auth : AuthenticationService ,
4344 private toasterService : ToasterService ,
@@ -57,6 +58,8 @@ export class AppComponent implements OnInit {
5758 this . welcomeText = '' ;
5859 }
5960 } ) ;
61+
62+
6063 }
6164
6265 loginOAuth ( ) {
@@ -65,9 +68,13 @@ export class AppComponent implements OnInit {
6568
6669 ngOnInit ( ) : void {
6770 this . configService . getConfigurationFromBackend ( ) . subscribe (
68- ( ) => ( this . loading = false ) ,
71+ ( ) => {
72+ this . loading = false ;
73+ this . planqkUi = this . configService . configuration . features [ UiFeatures . PLANQK_UI ] ;
74+ } ,
6975 ( error : HttpErrorResponse ) => {
7076 this . loading = false ;
77+ this . planqkUi = true ;
7178 if ( error . status === globals . statusCodeNotFound ) {
7279 this . configService . getDefaultConfiguration ( ) ;
7380 console . log ( 'default values applied' )
Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ export enum UiFeatures {
1010 PATTERNVIEWS = 'patternViews' ,
1111 ISSUE = 'issue' ,
1212 SHOW_SETTINGS = 'showSettings' ,
13- EDITING = 'editing'
13+ EDITING = 'editing' ,
14+ PLANQK_UI = 'planqkUi'
1415}
1516
1617export interface PatternAtlasUiConfiguration {
@@ -20,7 +21,8 @@ export interface PatternAtlasUiConfiguration {
2021 patternViews : boolean ,
2122 issue : boolean ,
2223 showSettings : boolean ,
23- editing : boolean
24+ editing : boolean ,
25+ planqkUi : boolean
2426 } ;
2527}
2628
@@ -45,7 +47,8 @@ const initialValues: PatternAtlasUiConfiguration = {
4547 patternViews : false ,
4648 issue : false ,
4749 showSettings : false ,
48- editing : false
50+ editing : false ,
51+ planqkUi : false
4952 } ,
5053} ;
5154
Original file line number Diff line number Diff line change 55 "patternViews" : true ,
66 "issue" : false ,
77 "editing" : true ,
8- "showSettings" : false
8+ "showSettings" : false ,
9+ "planqkUi" : true
910 }
10- }
11+ }
Original file line number Diff line number Diff line change 1414/* You can add global styles to this file, and also import other style files */
1515@import ' ~@angular/material/prebuilt-themes/indigo-pink.css' ;
1616@import ' ~angular2-toaster/toaster' ;
17+ @import ' ~@angular/material/theming' ;
18+
19+ @include mat-core ();
20+
21+ /* PlanQK Red based on #E12D32 */
22+
23+ $planqkred : (
24+ 50 : #fbe6e6 ,
25+ 100 : #f6c0c2 ,
26+ 200 : #f09699 ,
27+ 300 : #ea6c70 ,
28+ 400 : #e64d51 ,
29+ 500 : #e12d32 ,
30+ 600 : #dd282d ,
31+ 700 : #d92226 ,
32+ 800 : #d51c1f ,
33+ 900 : #cd1113 ,
34+ A100 : #fffbfb ,
35+ A200 : #ffc8c8 ,
36+ A400 : #ff9596 ,
37+ A700 : #ff7b7d ,
38+ contrast : (
39+ 50 : #000 ,
40+ 100 : #000 ,
41+ 200 : #000 ,
42+ 300 : #000 ,
43+ 400 : #fff ,
44+ 500 : #fff ,
45+ 600 : #fff ,
46+ 700 : #fff ,
47+ 800 : #fff ,
48+ 900 : #fff ,
49+ A100 : #000 ,
50+ A200 : #000 ,
51+ A400 : #000 ,
52+ A700 : #000 ,
53+ )
54+ );
55+
56+ /* PlanQK blue based on #3D78B5 */
57+
58+ $planqkblue : (
59+ 50 : #e8eff6 ,
60+ 100 : #c5d7e9 ,
61+ 200 : #9ebcda ,
62+ 300 : #77a1cb ,
63+ 400 : #5a8cc0 ,
64+ 500 : #3d78b5 ,
65+ 600 : #3770ae ,
66+ 700 : #2f65a5 ,
67+ 800 : #275b9d ,
68+ 900 : #1a488d ,
69+ A100 : #c5daff ,
70+ A200 : #92baff ,
71+ A400 : #5f9aff ,
72+ A700 : #468aff ,
73+ contrast : (
74+ 50 : #000 ,
75+ 100 : #000 ,
76+ 200 : #000 ,
77+ 300 : #000 ,
78+ 400 : #000 ,
79+ 500 : #fff ,
80+ 600 : #fff ,
81+ 700 : #fff ,
82+ 800 : #fff ,
83+ 900 : #fff ,
84+ A100 : #000 ,
85+ A200 : #000 ,
86+ A400 : #000 ,
87+ A700 : #000 ,
88+ )
89+ );
90+
91+ $planqk-palette-primary : mat-palette ($planqkblue );
92+ $planqk-palette-accent : mat-palette ($planqkred );
93+
94+ $planqk-theme : mat-light-theme ($planqk-palette-primary , $planqk-palette-accent );
95+
96+ @include angular-material-theme ($planqk-theme );
97+
1798
1899body {
19100 font-family : sans-serif ;
You can’t perform that action at this time.
0 commit comments