Skip to content

Commit

Permalink
refactoring layout
Browse files Browse the repository at this point in the history
  • Loading branch information
mckenziearts committed Oct 12, 2022
1 parent 49ce259 commit 5444661
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions src/app/shared/themes/components/header/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ export class HeaderComponent implements OnInit {

public loading$: Observable<boolean> = this.store.select(selectLoading);

public logout() {
this.store.dispatch(logoutAction());
}

get openCloseTrigger() {
return this.mobileMenuOpen ? 'open' : 'closed';
}

logout(): void {
this.store.dispatch(logoutAction());
}

toggleMobileMenu(): void {
this.showDialog = false;
this.mobileMenuOpen = !this.mobileMenuOpen;
Expand Down Expand Up @@ -104,9 +104,11 @@ export class HeaderComponent implements OnInit {
this.currentTheme = window.localStorage.getItem('theme')!;
}

updateTheme(theme: string) {
updateTheme(theme: string): void {
document.documentElement.setAttribute('data-theme', theme);
window.localStorage.setItem('theme', theme);

this.currentTheme = theme;
this.showDialog = false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="relative flex items-center px-6 py-8 shrink-0 md:hidden">
<logo-svg class="h-auto w-36 text-slate-900 dark:text-white"></logo-svg>
</div>
<nav class="flex flex-col h-full pt-4 pb-8 space-y-8" aria-label="Sidebar">
<nav class="flex flex-col h-full pt-4 pb-8 space-y-8 lg:pt-10" aria-label="Sidebar">
<div *ngFor="let menu of menus">
<h5 class="px-6 font-mono text-xs font-semibold leading-5 tracking-widest uppercase text-slate-400 sm:px-8 dark:text-slate-300">{{ menu.group }}</h5>
<div class="mt-3 space-y-1">
Expand Down

0 comments on commit 5444661

Please sign in to comment.