From 7d5af7fcf9c2a2b8082707c3d4aaa610dbea29b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87etin?= <69278826+cetincakiroglu@users.noreply.github.com> Date: Thu, 20 Jan 2022 12:03:45 +0300 Subject: [PATCH 1/4] pages updated - dynamic theme --- .../components/access/access.component.html | 6 ++-- src/app/components/access/access.component.ts | 27 +++++++++++++++-- src/app/components/error/error.component.html | 6 ++-- src/app/components/error/error.component.ts | 26 +++++++++++++++-- .../components/landing/landing.component.ts | 17 +++++++++-- src/app/components/login/login.component.html | 10 +++---- src/app/components/login/login.component.ts | 29 ++++++++++++------- .../notfound/notfound.component.html | 22 +++++++------- .../components/notfound/notfound.component.ts | 26 +++++++++++++++-- 9 files changed, 127 insertions(+), 42 deletions(-) diff --git a/src/app/components/access/access.component.html b/src/app/components/access/access.component.html index e6e868c..99122f3 100644 --- a/src/app/components/access/access.component.html +++ b/src/app/components/access/access.component.html @@ -7,10 +7,10 @@
- +
-

Access Denied

- You do not have the necesary permisions. Please contact admins. +

Access Denied

+ You do not have the necesary permisions. Please contact admins. Access denied
Go to Dashboard diff --git a/src/app/components/access/access.component.ts b/src/app/components/access/access.component.ts index fb55ed1..1867c97 100644 --- a/src/app/components/access/access.component.ts +++ b/src/app/components/access/access.component.ts @@ -1,7 +1,28 @@ -import { Component } from '@angular/core'; - +import { Component, OnInit, OnDestroy } from '@angular/core'; +import { ConfigService } from '../../service/app.config.service'; +import { AppConfig } from '../../api/appconfig'; +import { Subscription } from 'rxjs'; @Component({ selector: 'app-access', templateUrl: './access.component.html', }) -export class AccessComponent { } +export class AccessComponent implements OnInit, OnDestroy { + + config: AppConfig; + subscription: Subscription; + + constructor(public configService: ConfigService){ } + + ngOnInit(): void { + this.config = this.configService.config; + this.subscription = this.configService.configUpdate$.subscribe(config => { + this.config = config; + }); + } + + ngOnDestroy(): void { + if(this.subscription){ + this.subscription.unsubscribe(); + } + } +} diff --git a/src/app/components/error/error.component.html b/src/app/components/error/error.component.html index 1a061cf..9a19020 100644 --- a/src/app/components/error/error.component.html +++ b/src/app/components/error/error.component.html @@ -7,10 +7,10 @@
- +
-

Error Occured

- Requested resource is not available. +

Error Occured

+ Requested resource is not available. Error
Go to Dashboard diff --git a/src/app/components/error/error.component.ts b/src/app/components/error/error.component.ts index 8828f32..8f8fd3b 100644 --- a/src/app/components/error/error.component.ts +++ b/src/app/components/error/error.component.ts @@ -1,7 +1,29 @@ -import { Component } from '@angular/core'; +import { Component, OnInit, OnDestroy } from '@angular/core'; +import { ConfigService } from '../../service/app.config.service'; +import { AppConfig } from '../../api/appconfig'; +import { Subscription } from 'rxjs'; @Component({ selector: 'app-error', templateUrl: './error.component.html', }) -export class ErrorComponent { } +export class ErrorComponent implements OnInit, OnDestroy { + + config: AppConfig; + subscription: Subscription; + + constructor(public configService: ConfigService){ } + + ngOnInit(): void { + this.config = this.configService.config; + this.subscription = this.configService.configUpdate$.subscribe(config => { + this.config = config; + }); + } + + ngOnDestroy(): void { + if(this.subscription){ + this.subscription.unsubscribe(); + } + } +} diff --git a/src/app/components/landing/landing.component.ts b/src/app/components/landing/landing.component.ts index 5b75fa2..4fe1ea8 100644 --- a/src/app/components/landing/landing.component.ts +++ b/src/app/components/landing/landing.component.ts @@ -1,4 +1,7 @@ import { Component, OnInit, OnDestroy } from '@angular/core'; +import { ConfigService } from '../../service/app.config.service'; +import { AppConfig } from '../../api/appconfig'; +import { Subscription } from 'rxjs'; @Component({ selector: 'app-landing', templateUrl: './landing.component.html', @@ -49,19 +52,27 @@ import { Component, OnInit, OnDestroy } from '@angular/core'; } `] }) -export class LandingComponent implements OnInit { +export class LandingComponent implements OnInit, OnDestroy { themeElement: any; - constructor() { } + config: AppConfig; + + subscription: Subscription; + + constructor(public configService: ConfigService) { } ngOnInit(): void { + this.config = this.configService.config; + this.subscription = this.configService.configUpdate$.subscribe(config => { + this.config = config; + }); this.themeElement = document.getElementById('theme-css'); this.themeElement.setAttribute('href','assets/theme/saga-blue/theme.css'); } ngOnDestroy(): void { - this.themeElement.setAttribute('href', 'assets/theme/lara-light-indigo/theme.css'); + this.themeElement.setAttribute('href',`assets/theme/${this.config.theme}/theme.css`); } } diff --git a/src/app/components/login/login.component.html b/src/app/components/login/login.component.html index 24c5559..f38c712 100644 --- a/src/app/components/login/login.component.html +++ b/src/app/components/login/login.component.html @@ -7,15 +7,15 @@
Image -
Welcome, Isabel!
- Sign in to continue +
Welcome, Isabel!
+ Sign in to continue
- + - +
@@ -25,7 +25,7 @@
Forgot password?
- +
diff --git a/src/app/components/login/login.component.ts b/src/app/components/login/login.component.ts index 81f11f3..edf5b6b 100644 --- a/src/app/components/login/login.component.ts +++ b/src/app/components/login/login.component.ts @@ -1,5 +1,7 @@ -import { Component, OnInit } from '@angular/core'; - +import { Component, OnInit, OnDestroy } from '@angular/core'; +import { ConfigService } from '../../service/app.config.service'; +import { AppConfig } from '../../api/appconfig'; +import { Subscription } from 'rxjs'; @Component({ selector: 'app-login', templateUrl: './login.component.html', @@ -20,21 +22,28 @@ import { Component, OnInit } from '@angular/core'; } `] }) -export class LoginComponent implements OnInit { +export class LoginComponent implements OnInit, OnDestroy { valCheck: string[] = ['remember']; - password: string; - themeElement: any; - constructor() { } + password: string; + + config: AppConfig; + + subscription: Subscription; + + constructor(public configService: ConfigService){ } ngOnInit(): void { - this.themeElement = document.getElementById('theme-css'); - this.themeElement.setAttribute('href','assets/theme/saga-blue/theme.css'); + this.config = this.configService.config; + this.subscription = this.configService.configUpdate$.subscribe(config => { + this.config = config; + }); } ngOnDestroy(): void { - this.themeElement.setAttribute('href', 'assets/theme/lara-light-indigo/theme.css'); + if(this.subscription){ + this.subscription.unsubscribe(); + } } - } diff --git a/src/app/components/notfound/notfound.component.html b/src/app/components/notfound/notfound.component.html index a5d359d..44375d1 100644 --- a/src/app/components/notfound/notfound.component.html +++ b/src/app/components/notfound/notfound.component.html @@ -7,33 +7,33 @@
404 -

Looks like you are lost

- Requested resource is not available. +

Looks like you are lost

+ Requested resource is not available.
- +
-

Frequently Asked Questions

- Ultricies mi quis hendrerit dolor. +

Frequently Asked Questions

+ Ultricies mi quis hendrerit dolor.
- +
-

Solution Center

- Phasellus faucibus scelerisque eleifend. +

Solution Center

+ Phasellus faucibus scelerisque eleifend.
- +
-

Permission Manager

- Accumsan in nisl nisi scelerisque +

Permission Manager

+ Accumsan in nisl nisi scelerisque
diff --git a/src/app/components/notfound/notfound.component.ts b/src/app/components/notfound/notfound.component.ts index 1d57db4..d607612 100644 --- a/src/app/components/notfound/notfound.component.ts +++ b/src/app/components/notfound/notfound.component.ts @@ -1,7 +1,29 @@ -import { Component } from '@angular/core'; +import { Component, OnInit, OnDestroy } from '@angular/core'; +import { ConfigService } from '../../service/app.config.service'; +import { AppConfig } from '../../api/appconfig'; +import { Subscription } from 'rxjs'; @Component({ selector: 'app-notfound', templateUrl: './notfound.component.html', }) -export class NotfoundComponent { } +export class NotfoundComponent implements OnInit, OnDestroy { + + config: AppConfig; + subscription: Subscription; + + constructor(public configService: ConfigService){ } + + ngOnInit(): void { + this.config = this.configService.config; + this.subscription = this.configService.configUpdate$.subscribe(config => { + this.config = config; + }); + } + + ngOnDestroy(): void { + if(this.subscription){ + this.subscription.unsubscribe(); + } + } +} From 9ab4702fb66b3472f0fcc9a6cb57c25fa43d8c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87etin?= <69278826+cetincakiroglu@users.noreply.github.com> Date: Thu, 20 Jan 2022 13:54:11 +0300 Subject: [PATCH 2/4] update pages --- .../components/access/access.component.html | 6 ++--- src/app/components/access/access.component.ts | 27 +++---------------- src/app/components/error/error.component.html | 6 ++--- src/app/components/error/error.component.ts | 26 ++---------------- src/app/components/login/login.component.html | 16 +++++------ src/app/components/login/login.component.ts | 2 ++ .../notfound/notfound.component.html | 22 +++++++-------- .../components/notfound/notfound.component.ts | 26 ++---------------- 8 files changed, 34 insertions(+), 97 deletions(-) diff --git a/src/app/components/access/access.component.html b/src/app/components/access/access.component.html index 99122f3..c03f388 100644 --- a/src/app/components/access/access.component.html +++ b/src/app/components/access/access.component.html @@ -7,10 +7,10 @@
- +
-

Access Denied

- You do not have the necesary permisions. Please contact admins. +

Access Denied

+ You do not have the necesary permisions. Please contact admins. Access denied
Go to Dashboard diff --git a/src/app/components/access/access.component.ts b/src/app/components/access/access.component.ts index 1867c97..401b3be 100644 --- a/src/app/components/access/access.component.ts +++ b/src/app/components/access/access.component.ts @@ -1,28 +1,7 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { ConfigService } from '../../service/app.config.service'; -import { AppConfig } from '../../api/appconfig'; -import { Subscription } from 'rxjs'; +import { Component } from '@angular/core'; + @Component({ selector: 'app-access', templateUrl: './access.component.html', }) -export class AccessComponent implements OnInit, OnDestroy { - - config: AppConfig; - subscription: Subscription; - - constructor(public configService: ConfigService){ } - - ngOnInit(): void { - this.config = this.configService.config; - this.subscription = this.configService.configUpdate$.subscribe(config => { - this.config = config; - }); - } - - ngOnDestroy(): void { - if(this.subscription){ - this.subscription.unsubscribe(); - } - } -} +export class AccessComponent {} \ No newline at end of file diff --git a/src/app/components/error/error.component.html b/src/app/components/error/error.component.html index 9a19020..f65429a 100644 --- a/src/app/components/error/error.component.html +++ b/src/app/components/error/error.component.html @@ -7,10 +7,10 @@
- +
-

Error Occured

- Requested resource is not available. +

Error Occured

+ Requested resource is not available. Error
Go to Dashboard diff --git a/src/app/components/error/error.component.ts b/src/app/components/error/error.component.ts index 8f8fd3b..fff1795 100644 --- a/src/app/components/error/error.component.ts +++ b/src/app/components/error/error.component.ts @@ -1,29 +1,7 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { ConfigService } from '../../service/app.config.service'; -import { AppConfig } from '../../api/appconfig'; -import { Subscription } from 'rxjs'; +import { Component } from '@angular/core'; @Component({ selector: 'app-error', templateUrl: './error.component.html', }) -export class ErrorComponent implements OnInit, OnDestroy { - - config: AppConfig; - subscription: Subscription; - - constructor(public configService: ConfigService){ } - - ngOnInit(): void { - this.config = this.configService.config; - this.subscription = this.configService.configUpdate$.subscribe(config => { - this.config = config; - }); - } - - ngOnDestroy(): void { - if(this.subscription){ - this.subscription.unsubscribe(); - } - } -} +export class ErrorComponent {} \ No newline at end of file diff --git a/src/app/components/login/login.component.html b/src/app/components/login/login.component.html index f38c712..3b6922f 100644 --- a/src/app/components/login/login.component.html +++ b/src/app/components/login/login.component.html @@ -1,21 +1,21 @@
- Sakai logo + Sakai logo
-
+
Image -
Welcome, Isabel!
- Sign in to continue +
Welcome, Isabel!
+ Sign in to continue
- + - +
@@ -23,9 +23,9 @@
- Forgot password? + Forgot password?
- +
diff --git a/src/app/components/login/login.component.ts b/src/app/components/login/login.component.ts index edf5b6b..0bca5d9 100644 --- a/src/app/components/login/login.component.ts +++ b/src/app/components/login/login.component.ts @@ -14,11 +14,13 @@ import { Subscription } from 'rxjs'; :host ::ng-deep .pi-eye{ transform:scale(1.6); margin-right: 1rem; + color: var(--primary-color) !important; } :host ::ng-deep .pi-eye-slash{ transform:scale(1.6); margin-right: 1rem; + color: var(--primary-color) !important; } `] }) diff --git a/src/app/components/notfound/notfound.component.html b/src/app/components/notfound/notfound.component.html index 44375d1..242095f 100644 --- a/src/app/components/notfound/notfound.component.html +++ b/src/app/components/notfound/notfound.component.html @@ -7,33 +7,33 @@
404 -

Looks like you are lost

- Requested resource is not available. +

Looks like you are lost

+ Requested resource is not available.
- +
-

Frequently Asked Questions

- Ultricies mi quis hendrerit dolor. +

Frequently Asked Questions

+ Ultricies mi quis hendrerit dolor.
- +
-

Solution Center

- Phasellus faucibus scelerisque eleifend. +

Solution Center

+ Phasellus faucibus scelerisque eleifend.
- +
-

Permission Manager

- Accumsan in nisl nisi scelerisque +

Permission Manager

+ Accumsan in nisl nisi scelerisque
diff --git a/src/app/components/notfound/notfound.component.ts b/src/app/components/notfound/notfound.component.ts index d607612..567c8c3 100644 --- a/src/app/components/notfound/notfound.component.ts +++ b/src/app/components/notfound/notfound.component.ts @@ -1,29 +1,7 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { ConfigService } from '../../service/app.config.service'; -import { AppConfig } from '../../api/appconfig'; -import { Subscription } from 'rxjs'; +import { Component } from '@angular/core'; @Component({ selector: 'app-notfound', templateUrl: './notfound.component.html', }) -export class NotfoundComponent implements OnInit, OnDestroy { - - config: AppConfig; - subscription: Subscription; - - constructor(public configService: ConfigService){ } - - ngOnInit(): void { - this.config = this.configService.config; - this.subscription = this.configService.configUpdate$.subscribe(config => { - this.config = config; - }); - } - - ngOnDestroy(): void { - if(this.subscription){ - this.subscription.unsubscribe(); - } - } -} +export class NotfoundComponent {} \ No newline at end of file From f93aa058c9d80659998ec3217858a9df6fcb2759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87etin?= <69278826+cetincakiroglu@users.noreply.github.com> Date: Thu, 20 Jan 2022 13:55:19 +0300 Subject: [PATCH 3/4] Merge branch 'landing' of https://github.com/primefaces/sakai-ng into landing --- src/app/app.menu.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/app.menu.component.ts b/src/app/app.menu.component.ts index 9ac5d8f..6c203a8 100644 --- a/src/app/app.menu.component.ts +++ b/src/app/app.menu.component.ts @@ -55,15 +55,16 @@ export class AppMenuComponent implements OnInit { ] }, { - label:'UI Blocks', + label:'Prime Blocks', items:[ {label: 'Free Blocks', icon: 'pi pi-fw pi-eye', routerLink: ['/blocks'], badge: 'NEW'}, {label: 'All Blocks', icon: 'pi pi-fw pi-globe', url: ['https://www.primefaces.org/primeblocks-ng'], target: '_blank'}, ] }, - {label:'Icons', + {label:'Utilities', items:[ {label: 'PrimeIcons', icon: 'pi pi-fw pi-prime', routerLink: ['/icons']}, + {label: 'PrimeFlex', icon: 'pi pi-fw pi-desktop', url: ['https://www.primefaces.org/primeflex/'], target: '_blank'}, ] }, { From b90be59e9044796f057d36c0c8db65d2e48fc226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87etin?= <69278826+cetincakiroglu@users.noreply.github.com> Date: Thu, 20 Jan 2022 14:26:39 +0300 Subject: [PATCH 4/4] update landing --- .../components/landing/landing.component.html | 146 +++++++++--------- .../components/landing/landing.component.ts | 8 +- 2 files changed, 76 insertions(+), 78 deletions(-) diff --git a/src/app/components/landing/landing.component.html b/src/app/components/landing/landing.component.html index f96ae3d..1cf4b67 100644 --- a/src/app/components/landing/landing.component.html +++ b/src/app/components/landing/landing.component.html @@ -1,37 +1,37 @@
- Sakai LogoSAKAI + Sakai LogoSAKAI - @@ -40,7 +40,7 @@

Eu sem integereget magna fermentum

Sed blandit libero volutpat sed cras. Fames ac turpis egestas integer. Placerat in egestas erat...

- +
@@ -48,8 +48,8 @@
-

Marvelous Features

- Placerat in egestas erat... +

Marvelous Features

+ Placerat in egestas erat...
@@ -58,8 +58,8 @@
-
Easy to Use
- Posuere morbi leo urna molestie. +
Easy to Use
+ Posuere morbi leo urna molestie.
@@ -70,8 +70,8 @@
-
Fresh Design
- Semper risus in hendrerit. +
Fresh Design
+ Semper risus in hendrerit.
@@ -82,8 +82,8 @@
-
Well Documented
- Non arcu risus quis varius quam quisque. +
Well Documented
+ Non arcu risus quis varius quam quisque.
@@ -94,8 +94,8 @@
-
Responsive Layout
- Nulla malesuada pellentesque elit. +
Responsive Layout
+ Nulla malesuada pellentesque elit.
@@ -106,8 +106,8 @@
-
Clean Code
- Condimentum lacinia quis vel eros. +
Clean Code
+ Condimentum lacinia quis vel eros.
@@ -118,8 +118,8 @@
-
Dark Mode
- Convallis tellus id interdum velit laoreet. +
Dark Mode
+ Convallis tellus id interdum velit laoreet.
@@ -130,8 +130,8 @@
-
Ready to Use
- Mauris sit amet massa vitae. +
Ready to Use
+ Mauris sit amet massa vitae.
@@ -142,8 +142,8 @@
-
Modern Practices
- Elementum nibh tellus molestie nunc non. +
Modern Practices
+ Elementum nibh tellus molestie nunc non.
@@ -154,8 +154,8 @@
-
Privacy
- Neque egestas congue quisque. +
Privacy
+ Neque egestas congue quisque. @@ -165,7 +165,7 @@

Joséphine Miller

Peak Interactive

“Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”

- + Company logo @@ -174,8 +174,8 @@
-

Powerful Everywhere

- Amet consectetur adipiscing elit... +

Powerful Everywhere

+ Amet consectetur adipiscing elit...
@@ -187,8 +187,8 @@
-

Congue Quisque Egestas

- Lectus arcu bibendum at varius vel pharetra vel turpis nunc. Eget aliquet nibh praesent tristique magna sit amet purus gravida. Sit amet mattis vulputate enim nulla aliquet. +

Congue Quisque Egestas

+ Lectus arcu bibendum at varius vel pharetra vel turpis nunc. Eget aliquet nibh praesent tristique magna sit amet purus gravida. Sit amet mattis vulputate enim nulla aliquet.
@@ -197,8 +197,8 @@
-

Celerisque Eu Ultrices

- Adipiscing commodo elit at imperdiet dui. Viverra nibh cras pulvinar mattis nunc sed blandit libero. Suspendisse in est ante in. Mauris pharetra et ultrices neque ornare aenean euismod elementum nisi. +

Celerisque Eu Ultrices

+ Adipiscing commodo elit at imperdiet dui. Viverra nibh cras pulvinar mattis nunc sed blandit libero. Suspendisse in est ante in. Mauris pharetra et ultrices neque ornare aenean euismod elementum nisi.
@@ -209,22 +209,22 @@
-

Matchless Pricing

- Amet consectetur adipiscing elit... +

Matchless Pricing

+ Amet consectetur adipiscing elit...
-

Free

+

Free

- $0 - per month - + $0 + per month +
-
    +
    • Responsive Layout @@ -247,15 +247,15 @@
      -

      Startup

      +

      Startup

      - $1 - per month - + $1 + per month +
      -
        +
        • Responsive Layout @@ -278,15 +278,15 @@
          -

          Free

          +

          Free

          - $999 - per month - + $999 + per month +
          -
            +
            • Responsive Layout @@ -313,42 +313,42 @@
              - footer sections -

              SAKAI

              + footer sections +

              SAKAI

              diff --git a/src/app/components/landing/landing.component.ts b/src/app/components/landing/landing.component.ts index 4fe1ea8..a178afa 100644 --- a/src/app/components/landing/landing.component.ts +++ b/src/app/components/landing/landing.component.ts @@ -54,8 +54,6 @@ import { Subscription } from 'rxjs'; }) export class LandingComponent implements OnInit, OnDestroy { - themeElement: any; - config: AppConfig; subscription: Subscription; @@ -67,12 +65,12 @@ export class LandingComponent implements OnInit, OnDestroy { this.subscription = this.configService.configUpdate$.subscribe(config => { this.config = config; }); - this.themeElement = document.getElementById('theme-css'); - this.themeElement.setAttribute('href','assets/theme/saga-blue/theme.css'); } ngOnDestroy(): void { - this.themeElement.setAttribute('href',`assets/theme/${this.config.theme}/theme.css`); + if(this.subscription){ + this.subscription.unsubscribe(); + } } }