Added User Management to Admin Panel, reorganized some stuff

This commit is contained in:
itzMiney committed 2025-01-03 23:59:17 +01:00
1 parent d83992d3ce
commit 83260af2e6
22 files changed
+439 -36

No files matched your search

@@ -0,0 +1,41 @@
.navbar {
position: fixed;
top: 20px; /* Add top margin */
left: 50%;
transform: translateX(-50%); /* Center the navbar horizontally */
width: auto;
background-color: #1e1e1e;
padding: 10px 13px; /* Adjusted padding for a wider 'bean' shape */
border-radius: 50px; /* Create the 'bean' shape */
z-index: 1000;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
display: flex;
justify-content: center;
align-items: center;
}
.navbar-links {
display: flex;
gap: 20px;
}
.navbar a {
color: white;
text-decoration: none;
font-size: 16px;
padding: 10px 20px;
border-radius: 25px;
transition: all 0.3s ease;
}
.navbar a:hover {
background-color: #9c27b0;
color: #fff;
transform: scale(1.1);
}
.navbar a.active {
background-color: #9c27b0;
color: #fff;
transform: scale(1.1);
}
@@ -0,0 +1,8 @@
<nav class="navbar">
<div class="navbar-links">
<a [routerLink]="'/'" [class.active]="activeLink === '/'">About</a>
<a [routerLink]="'/portfolio'" [class.active]="activeLink === '/portfolio'">Portfolio</a>
<a href="https://linktr.ee/itzminey">Socials</a>
<a [routerLink]="'/blog'" [class.active]="activeLink === '/blog'">Blog</a>
</div>
</nav>
+35
View File
@@ -0,0 +1,35 @@
import {Component, OnInit} from '@angular/core';
import {NavigationEnd, Router, RouterLink} from '@angular/router';
import {DeviceDetectorService} from 'ngx-device-detector';
import {filter} from 'rxjs/operators';
@Component({
selector: 'app-navbar',
templateUrl: './navbar.component.html',
styleUrls: ['./navbar.component.css'],
imports: [
RouterLink
]
})
export class NavbarComponent implements OnInit {
activeLink: string = '';
isMobile: boolean;
constructor(private router: Router, private deviceService: DeviceDetectorService) {
this.isMobile = this.deviceService.isMobile();
}
ngOnInit(): void {
this.router.events.pipe(
filter(event => event instanceof NavigationEnd)
).subscribe(() => {
// Update activeLink based on current route
const currentRoute = this.router.url;
if (currentRoute.startsWith('/blog')) {
this.activeLink = '/blog';
} else {
this.activeLink = currentRoute;
}
});
}
}