Change header_height css variable in layout service

This commit is contained in:
Konstantinos Triantafyllou 2022-07-02 21:32:10 +03:00
parent a738d3bb49
commit d7f343f317
1 changed files with 4 additions and 0 deletions

View File

@ -7,6 +7,8 @@ import {ActivationStart, Router} from "@angular/router";
})
export class LayoutService {
public static HEADER_HEIGHT = '65px';
/**
* Set this to true when sidebar items are ready.
*/
@ -64,8 +66,10 @@ export class LayoutService {
if (data['hasHeader'] !== undefined &&
data['hasHeader'] === false) {
this.setHasHeader(false);
document.documentElement.style.setProperty('--header-height', '0');
} else {
this.setHasHeader(true);
document.documentElement.style.setProperty('--header-height', LayoutService.HEADER_HEIGHT);
}
if (data['hasAdminMenu'] !== undefined &&
data['hasAdminMenu'] === true) {