diff --git a/src/app/admin/admin.component.css b/src/app/admin/admin.component.css
index a62cec6..400ac4f 100644
--- a/src/app/admin/admin.component.css
+++ b/src/app/admin/admin.component.css
@@ -1,5 +1,16 @@
+@keyframes fadeIn {
+ 0% {
+ opacity: 0;
+ visibility: hidden;
+ }
+ 100% {
+ opacity: 1;
+ visibility: visible;
+ }
+}
+
#admin-bg {
- transition: opacity 0.3s ease-in-out;
+ animation: fadeIn 1s ease-out;
background: #39354a;
position: fixed;
top: 0;
@@ -7,14 +18,16 @@
width: 100vw;
height: 100vh;
z-index: -100;
+ overflow-y: auto;
}
.height-container {
display: flex;
justify-content: space-between;
align-items: center;
- height: 100vh;
+ min-height: 100vh;
width: 100vw;
+ overflow-y: auto;
}
.center-section,
diff --git a/src/app/admin/admin.component.html b/src/app/admin/admin.component.html
index 65beed8..0914366 100644
--- a/src/app/admin/admin.component.html
+++ b/src/app/admin/admin.component.html
@@ -1,12 +1,13 @@
+
-
+
-
+
Admin Dashboard
@@ -16,6 +17,7 @@
+
Create New Article
+
+
+
Articles
+
+
No articles available.
+
+
+
+ -
+ ID {{ article.id }} - {{ article.title }}
+
+
+
+
+
+
Articles
@@ -48,5 +66,6 @@
+
diff --git a/src/app/admin/admin.component.ts b/src/app/admin/admin.component.ts
index cb5dc6f..bd80399 100644
--- a/src/app/admin/admin.component.ts
+++ b/src/app/admin/admin.component.ts
@@ -1,9 +1,10 @@
import {Component, OnInit} from '@angular/core';
import {Router} from '@angular/router';
import {ArticleService} from '../services/article.service';
-import {NgFor, NgIf} from '@angular/common';
+import {NgFor, NgIf, NgStyle} from '@angular/common';
import {Observer} from 'rxjs';
import {FormsModule} from '@angular/forms';
+import {DeviceDetectorService} from '../services/device-detector.service';
@Component({
selector: 'app-admin',
@@ -13,23 +14,26 @@ import {FormsModule} from '@angular/forms';
NgIf,
NgFor,
FormsModule,
+ NgStyle
]
})
export class AdminComponent implements OnInit {
articles: any[] = [];
noArticles: boolean = false;
-
+ isMobile: boolean = false;
title: string = '';
content: string = '';
token: string | null = localStorage.getItem('token');
constructor(
private articleService: ArticleService,
- private router: Router
+ private router: Router,
+ private deviceService: DeviceDetectorService
) {}
// Fetch articles from backend
ngOnInit() {
+ this.isMobile = this.deviceService.isMobile;
if (!this.token) {
this.navigateToLogin();
return;