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,38 @@
footer {
text-align: center;
padding: 20px;
background-color: darkslateblue;
color: white;
font-family: 'Roboto', sans-serif;
font-size: 1rem;
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}
footer p {
margin: 5px 0;
}
footer a {
color: #ffcc00;
text-decoration: none;
font-weight: bold;
}
footer a:hover {
text-decoration: underline;
}
footer .social-icons {
margin-top: 10px;
}
footer .social-icons a {
margin: 0 10px;
color: white;
font-size: 1.5rem;
transition: color 0.3s;
}
footer .social-icons a:hover {
color: #ffcc00;
}
@@ -0,0 +1,14 @@
<footer>
<p>&#169; 2024 itzMiney</p>
<p><a href="mailto:itzminey@proton.ne">itzminey&#64;proton.me</a></p>
<!-- Optional: Add social media icons -->
<div class="social-icons">
<a href="https://linktr.ee/itzminey" target="_blank" aria-label="Twitter">
<i class="material-icons">public</i>
</a>
<a href="https://github.com/itzminey" target="_blank" aria-label="GitHub">
<i class="material-icons">code</i>
</a>
</div>
</footer>
+11
View File
@@ -0,0 +1,11 @@
import {Component} from '@angular/core';
@Component({
selector: 'app-footer',
imports: [],
templateUrl: './footer.component.html',
styleUrl: './footer.component.css'
})
export class FooterComponent {
}
@@ -0,0 +1,84 @@
.mobile-navbar {
position: fixed;
top: 0;
left: 0;
width: 100%;
background: linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgb(0, 0, 0) 100%);
padding: 10px;
color: #fff;
z-index: 1000;
display: flex;
align-items: center;
justify-content: space-between;
}
.menu-icon {
font-size: 32px;
background: none;
border: none;
color: white;
cursor: pointer;
transform: translate( +10%, -5% );
z-index: 10;
}
.navbar-title {
flex-grow: 1;
text-align: center;
font-size: 20px;
font-weight: bold;
transform: translateX(-10%);
z-index: 1;
}
.navbar-title a {
text-decoration: none;
color: inherit;
}
.full-screen-menu {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.9);
color: white;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 2000;
}
.full-screen-menu ul {
list-style: none;
padding: 0;
position: fixed;
top: 72px;
left: 72px;
font-weight: 700;
font-style: italic;
}
.full-screen-menu li {
margin: 20px 0;
padding-bottom: 50px;
}
.full-screen-menu a {
color: white;
text-decoration: none;
font-size: 32px;
}
.close-icon {
position: absolute;
top: 8px;
right: 13px;
font-size: 32px;
background: none;
border: none;
color: white;
cursor: pointer;
}
@@ -0,0 +1,18 @@
<div class="mobile-navbar">
<!-- Hamburger Icon -->
<button class="menu-icon" (click)="toggleMenu()">☰</button>
<!-- Logo Text (Centered) -->
<div class="navbar-title"><a [routerLink]="'/'" [class.active]="activeLink === '/'">itzMiney.dev</a></div>
<!-- Full-Screen Menu -->
<div class="full-screen-menu" *ngIf="menuOpen">
<button class="close-icon" (click)="toggleMenu()">✖</button>
<ul>
<li><a [routerLink]="'/'" [class.active]="activeLink === '/'">About</a></li>
<li><a [routerLink]="'/portfolio'" [class.active]="activeLink === '/portfolio'">Portfolio</a></li>
<li><a href="https://linktr.ee/itzminey">Socials</a></li>
<li><a [routerLink]="'/blog'" [class.active]="activeLink === '/blog'">Blog</a></li>
</ul>
</div>
</div>
@@ -0,0 +1,38 @@
import {Component, OnInit} from '@angular/core';
import {DeviceDetectorService} from 'ngx-device-detector';
import {NgIf} from '@angular/common';
import {NavigationEnd, Router, RouterLink} from '@angular/router';
@Component({
selector: 'app-mobile-navbar',
imports: [
RouterLink,
NgIf
],
templateUrl: './mobile-navbar.component.html',
styleUrl: './mobile-navbar.component.css'
})
export class MobileNavbarComponent implements OnInit{
menuOpen = false;
isMobile: boolean;
activeLink: string = '';
constructor(private router: Router, private deviceService: DeviceDetectorService) {
this.isMobile = this.deviceService.isMobile();
}
toggleMenu() {
this.menuOpen = !this.menuOpen;
}
ngOnInit() {
// Listen to route changes
this.router.events.subscribe((event) => {
if (event instanceof NavigationEnd) {
this.menuOpen = false;
this.activeLink = event.urlAfterRedirects; // Capture the active route
}
});
}
}
+31
View File
@@ -0,0 +1,31 @@
.modal-backdrop {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
}
.modal {
background: #fff;
padding: 20px;
border-radius: 25px;
min-width: 300px;
max-width: 300px;
position: relative;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.close-btn {
position: absolute;
top: 10px;
right: 10px;
background: none;
border: none;
font-size: 20px;
cursor: pointer;
}
@@ -0,0 +1,7 @@
<div class="modal-backdrop" *ngIf="isOpen">
<div class="modal">
<button class="close-btn" (click)="closeModal()">✖</button>
<h2>{{ title }}</h2>
<ng-content></ng-content>
</div>
</div>
+21
View File
@@ -0,0 +1,21 @@
import { Component, Input, Output, EventEmitter } from '@angular/core';
import {NgIf} from '@angular/common';
@Component({
selector: 'app-modal',
templateUrl: './modal.component.html',
styleUrls: ['./modal.component.css'],
imports: [
NgIf
]
})
export class ModalComponent {
@Input() isOpen: boolean = false;
@Input() title: string = '';
@Output() onClose = new EventEmitter<void>();
closeModal() {
this.isOpen = false;
this.onClose.emit();
}
}
@@ -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;
}
});
}
}