Updated Admin & Login Page design, also finally disabled mouse & touch controls for bg effect for Mrxikaiba
This commit is contained in:
1 parent
0907f0b66b
commit
f9e0eb32db
11 files changed
+88
-35
No files matched your search
@@ -8,6 +8,7 @@ import {FooterComponent} from './footer/footer.component';
|
||||
import { Title, Meta } from '@angular/platform-browser';
|
||||
import { filter, map, mergeMap } from 'rxjs/operators';
|
||||
import { isPlatformBrowser } from '@angular/common';
|
||||
import {subscribe} from 'node:diagnostics_channel';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
@@ -18,6 +19,9 @@ import { isPlatformBrowser } from '@angular/common';
|
||||
export class AppComponent implements OnInit {
|
||||
isMobile: boolean;
|
||||
|
||||
showNavbar: boolean = true;
|
||||
showFooter: boolean = true;
|
||||
|
||||
constructor(
|
||||
private deviceService: DeviceDetectorService,
|
||||
private router: Router,
|
||||
@@ -60,7 +64,9 @@ export class AppComponent implements OnInit {
|
||||
meta.color = meta.color || '#eb284c';
|
||||
}
|
||||
this.updateMetaTags(meta);
|
||||
this.checkRoute();
|
||||
});
|
||||
this.checkRoute();
|
||||
}
|
||||
|
||||
updateMetaTags(meta: { title?: string; description?: string; image?: string; url?: string; color?: string }) {
|
||||
@@ -83,4 +89,17 @@ export class AppComponent implements OnInit {
|
||||
this.metaService.updateTag({ name: 'theme-color', content: meta.color});
|
||||
}
|
||||
}
|
||||
|
||||
checkRoute() {
|
||||
const currentRoute = this.activatedRoute.snapshot.firstChild?.routeConfig?.path;
|
||||
|
||||
// Hide navbar and footer on admin route
|
||||
if (currentRoute === 'admin'||'login') {
|
||||
this.showNavbar = false;
|
||||
this.showFooter = false;
|
||||
} else {
|
||||
this.showNavbar = true;
|
||||
this.showFooter = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user