Delete material.scss and import from library. Add placeholder logo in all pages if logo doesn't exist

This commit is contained in:
Konstantinos Triantafyllou 2022-06-24 18:22:55 +03:00
parent 0c3c3b408b
commit 5ff31cf4ff
11 changed files with 12 additions and 34 deletions

View File

@ -48,7 +48,7 @@
"styles": [ "styles": [
"src/styles.less", "src/styles.less",
"src/deprecated.css", "src/deprecated.css",
"src/material.scss" "src/assets/common-assets/library-css/material.scss"
], ],
"scripts": [ "scripts": [
"node_modules/uikit/dist/js/uikit.min.js", "node_modules/uikit/dist/js/uikit.min.js",

View File

@ -338,8 +338,7 @@ export class AppComponent implements OnInit, OnDestroy {
this.adminMenuItems.push(new MenuItem("admin-tools", "Pages & Entities", "", "/admin/" + this.stakeholder.alias + "/admin-tools/pages", false, [], [], {}, {name: 'description'}, null, null, "/admin/" + this.stakeholder.alias + "/admin-tools")); this.adminMenuItems.push(new MenuItem("admin-tools", "Pages & Entities", "", "/admin/" + this.stakeholder.alias + "/admin-tools/pages", false, [], [], {}, {name: 'description'}, null, null, "/admin/" + this.stakeholder.alias + "/admin-tools"));
} }
} }
this.specialSideBarMenuItem = new MenuItem("back", "Manage profiles", "", "/admin", false, [], null, {}); this.specialSideBarMenuItem = new MenuItem("back", "Manage profiles", "", "/admin", false, [], null, {}, {name: 'search', class: 'uk-text-secondary'});
this.specialSideBarMenuItem.icon = {name: 'search', class: 'uk-text-secondary'};
} }
} else { } else {
if (this.isFrontPage || !this.hasAdminMenu) { if (this.isFrontPage || !this.hasAdminMenu) {
@ -378,10 +377,10 @@ export class AppComponent implements OnInit, OnDestroy {
}; };
this.adminMenuItems = []; this.adminMenuItems = [];
this.specialSideBarMenuItem = null; this.specialSideBarMenuItem = null;
this.adminMenuItems.push(new MenuItem("stakeholders", "Manage profiles", "", "/admin", false, [], [], {}, {name: 'settings'}));
if (Session.isPortalAdministrator(this.user)) { if (Session.isPortalAdministrator(this.user)) {
this.adminMenuItems.push(new MenuItem("stakeholders", "Manage profiles", "", "/admin", false, [], [], {}, {name: 'settings'}));
this.adminMenuItems.push(new MenuItem("super_admin", "Super Admin Options", "", "/admin/admin-tools/portals", false, [], [], {}, {name: 'settings'}, null, null, 'admin/admin-tools')); this.adminMenuItems.push(new MenuItem("super_admin", "Super Admin Options", "", "/admin/admin-tools/portals", false, [], [], {}, {name: 'settings'}, null, null, 'admin/admin-tools'));
this.adminMenuItems.push(new MenuItem("stakeholders", "Monitor Options", "", "/admin/monitor/admin-tools/pages", false, [], [], {}, {name: 'settings'}, null, null, 'admin/monitor/admin-tools')); this.adminMenuItems.push(new MenuItem("monitor", "Monitor Options", "", "/admin/monitor/admin-tools/pages", false, [], [], {}, {name: 'settings'}, null, null, 'admin/monitor/admin-tools'));
} }
this.hasAdminMenu = this.hasAdminMenu && this.adminMenuItems.length > 0; this.hasAdminMenu = this.hasAdminMenu && this.adminMenuItems.length > 0;
} }

View File

@ -3,6 +3,7 @@
<div class="uk-flex uk-flex-middle uk-grid" uk-grid> <div class="uk-flex uk-flex-middle uk-grid" uk-grid>
<div class="uk-width-expand uk-flex uk-flex-middle uk-margin-top uk-margin-bottom info" [class.uk-active]="stickyPageHeader"> <div class="uk-width-expand uk-flex uk-flex-middle uk-margin-top uk-margin-bottom info" [class.uk-active]="stickyPageHeader">
<img *ngIf="stakeholder.logoUrl" [src]="stakeholder.logoUrl" class="uk-margin-right"> <img *ngIf="stakeholder.logoUrl" [src]="stakeholder.logoUrl" class="uk-margin-right">
<img *ngIf="!stakeholder.logoUrl" src="assets/common-assets/placeholder.png" class="uk-margin-right">
<div> <div>
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Profile</div> <div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Profile</div>
<h1 class="uk-h4 uk-margin-remove">{{stakeholder.name}}<span *ngIf="editStakeholderComponent && editStakeholderComponent.dirty && !loading" class="uk-text-large"> (unsaved changes)</span></h1> <h1 class="uk-h4 uk-margin-remove">{{stakeholder.name}}<span *ngIf="editStakeholderComponent && editStakeholderComponent.dirty && !loading" class="uk-text-large"> (unsaved changes)</span></h1>

View File

@ -42,8 +42,7 @@
</div> </div>
<div *ngIf="tab != 'templates' && isManager()" class="uk-section"> <div *ngIf="tab != 'templates' && isManager()" class="uk-section">
<h4>Profiles</h4> <h4>Profiles</h4>
<div class="uk-grid uk-grid-match uk-child-width-1-4@xl uk-child-width-1-3@l uk-child-width-1-2@m" uk-grid <div class="uk-grid uk-grid-match uk-child-width-1-4@xl uk-child-width-1-3@l uk-child-width-1-2@m" uk-grid>
uk-height-match="target: .name;">
<ng-template ngFor [ngForOf]="displayStakeholders" let-stakeholder> <ng-template ngFor [ngForOf]="displayStakeholders" let-stakeholder>
<ng-container *ngTemplateOutlet="stakeholderBox; context: {stakeholder:stakeholder}"></ng-container> <ng-container *ngTemplateOutlet="stakeholderBox; context: {stakeholder:stakeholder}"></ng-container>
</ng-template> </ng-template>

@ -1 +1 @@
Subproject commit 0c4df8a34dd4f518353c5924238eca9d2cf0a91e Subproject commit 950f50030fa8256f90b577dc5866526ff98fcda1

View File

@ -115,6 +115,7 @@
<div *ngIf="stakeholder.topics.length > 0 && stakeholder.topics[topicIndex]"> <div *ngIf="stakeholder.topics.length > 0 && stakeholder.topics[topicIndex]">
<div class="uk-width-expand uk-flex uk-margin-top uk-flex-middle info" [class.uk-active]="stickyPageHeader"> <div class="uk-width-expand uk-flex uk-margin-top uk-flex-middle info" [class.uk-active]="stickyPageHeader">
<img *ngIf="stakeholder.logoUrl" [src]="stakeholder.logoUrl" class="uk-margin-right"> <img *ngIf="stakeholder.logoUrl" [src]="stakeholder.logoUrl" class="uk-margin-right">
<img *ngIf="!stakeholder.logoUrl" src="assets/common-assets/placeholder.png" class="uk-margin-right">
<div> <div>
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Indicators</div> <div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Indicators</div>
<h1 class="uk-h4 uk-margin-remove">{{stakeholder.name}}</h1> <h1 class="uk-h4 uk-margin-remove">{{stakeholder.name}}</h1>

View File

@ -15,6 +15,7 @@
[emailComposer]="emailComposer" [notificationFn]="notificationFn" (stickyEmitter)="stickyPageHeader = $event"> [emailComposer]="emailComposer" [notificationFn]="notificationFn" (stickyEmitter)="stickyPageHeader = $event">
<div class="uk-flex uk-flex-middle uk-margin-top info" [class.uk-active]="stickyPageHeader"> <div class="uk-flex uk-flex-middle uk-margin-top info" [class.uk-active]="stickyPageHeader">
<img *ngIf="logo" [src]="logo" class="uk-margin-right"> <img *ngIf="logo" [src]="logo" class="uk-margin-right">
<img *ngIf="!logo" src="assets/common-assets/placeholder.png" class="uk-margin-right">
<div> <div>
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Users</div> <div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Users</div>
<h1 class="uk-h4 uk-margin-remove">{{name}}</h1> <h1 class="uk-h4 uk-margin-remove">{{name}}</h1>

@ -1 +1 @@
Subproject commit 787970f735d48efc65e4408fe4eb5803e57021aa Subproject commit 752859b10d3e110fdc9a4360bb7cb005ef6225ed

@ -1 +1 @@
Subproject commit d35ae7067f39fafeb3d4298ad4d6996e456ae531 Subproject commit 635d56f198026c2d24a923ad58b813254591fa33

@ -1 +1 @@
Subproject commit 4fca369b2e4f4f2c2689e0efc501d2c548dfeb68 Subproject commit ec73c67c591eca9fe68f7a6c6f65ce4332852b2f

View File

@ -1,23 +0,0 @@
@import '~@angular/material/theming';
@include mat-core();
$primary-color: (
0: var(--primary-color),
contrast: (
50: var(--contrast-color)
)
);
$secondary-color: (
0: var(--secondary-color),
contrast: (
50: var(--contrast-color)
)
);
$my-app-primary: mat-palette($primary-color, 0);
$my-app-accent: mat-palette($secondary-color, 0);
$my-app-theme: mat-light-theme($my-app-primary, $my-app-accent);
@include angular-material-theme($my-app-theme);
.cdk-global-overlay-wrapper, .cdk-overlay-container {
z-index: 9999!important;
}