diff --git a/src/app/about/about.component.ts b/src/app/about/about.component.ts
index be22296..f930097 100644
--- a/src/app/about/about.component.ts
+++ b/src/app/about/about.component.ts
@@ -69,9 +69,9 @@ export class AboutComponent implements OnInit, OnDestroy, AfterViewInit {
// Initialize the Vanta effect on the element with ID 'vanta-bg'
this.vantaEffect = window.VANTA.NET({
el: '#vanta-about-bg',
- mouseControls: true,
- touchControls: true,
- gyroControls: false,
+ mouseControls: false,
+ touchControls: false,
+ gyroControls: false,
scale: 1.00,
scaleMobile: 1.00,
points: 20.00,
diff --git a/src/app/admin/admin.component.css b/src/app/admin/admin.component.css
index 370a072..52a9552 100644
--- a/src/app/admin/admin.component.css
+++ b/src/app/admin/admin.component.css
@@ -11,7 +11,7 @@
.admin-container {
background: #fff;
- border-radius: 8px;
+ border-radius: 25px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
padding: 40px;
width: 350px;
@@ -25,17 +25,31 @@
}
.admin-actions button {
- background-color: #4CAF50;
+ background-color: #bd3948;
color: white;
padding: 12px 20px;
margin: 10px;
border: none;
- border-radius: 5px;
+ border-radius: 25px;
cursor: pointer;
}
.admin-actions button:hover {
- background-color: #45a049;
+ background-color: #e3485a;
+}
+
+.logout button {
+ background-color: #713252;
+ color: white;
+ padding: 12px 20px;
+ margin: 10px;
+ border: none;
+ border-radius: 25px;
+ cursor: pointer;
+}
+
+.logout button:hover {
+ background-color: #592840;
}
.articles-list {
diff --git a/src/app/admin/admin.component.html b/src/app/admin/admin.component.html
index 6f83c59..1c0b31d 100644
--- a/src/app/admin/admin.component.html
+++ b/src/app/admin/admin.component.html
@@ -5,17 +5,25 @@
-
+
+
- 0">
-
Articles
-
-
-
{{ article.title }}
-
{{ article.content }}
-
-
+
+
No articles available.
+
+
+
+
+ -
+
+ {{ article.title }}
+
+
+
+
+
+
diff --git a/src/app/admin/admin.component.ts b/src/app/admin/admin.component.ts
index a32498c..77f1969 100644
--- a/src/app/admin/admin.component.ts
+++ b/src/app/admin/admin.component.ts
@@ -16,6 +16,7 @@ import { HttpClientModule } from '@angular/common/http';
})
export class AdminComponent implements OnInit {
articles: any[] = [];
+ noArticles: boolean = false;
constructor(private articleService: ArticleService, private router: Router) {}
@@ -34,6 +35,7 @@ export class AdminComponent implements OnInit {
this.articleService.getArticles(token).subscribe(
(data) => {
this.articles = data;
+ this.noArticles = this.articles.length === 0;
},
(error) => {
console.error('Failed to load articles', error);
@@ -45,6 +47,14 @@ export class AdminComponent implements OnInit {
alert('Create article functionality goes here');
}
+ editArticle() {
+ alert('Delete article functionality goes here');
+ }
+
+ deleteArticle() {
+ alert('Delete article functionality goes here');
+ }
+
viewArticles() {
this.fetchArticles();
}
diff --git a/src/app/app.component.html b/src/app/app.component.html
index a59b7c4..bc53456 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -1,8 +1,8 @@
-
+
-
+
-
+
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index a5a2c50..ed605ea 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -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;
+ }
+ }
}
diff --git a/src/app/blog/blog.component.ts b/src/app/blog/blog.component.ts
index 1c62124..57bb070 100644
--- a/src/app/blog/blog.component.ts
+++ b/src/app/blog/blog.component.ts
@@ -70,8 +70,8 @@ export class BlogComponent implements OnInit, OnDestroy, AfterViewInit {
// Initialize the Vanta effect on the element with ID 'vanta-bg'
this.vantaEffect = window.VANTA.NET({
el: '#vanta-blog-bg',
- mouseControls: true,
- touchControls: true,
+ mouseControls: false,
+ touchControls: false,
gyroControls: false,
scale: 1.00,
scaleMobile: 1.00,
diff --git a/src/app/login/login.component.css b/src/app/login/login.component.css
index f7fad06..9cdfbed 100644
--- a/src/app/login/login.component.css
+++ b/src/app/login/login.component.css
@@ -16,7 +16,7 @@
/* Login Form Styles */
.login-container {
background: #fff;
- border-radius: 8px;
+ border-radius: 25px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
padding: 40px;
width: 300px;
@@ -31,29 +31,31 @@ h2 {
}
input {
- width: 100%;
+ width: 92%;
padding: 10px;
margin: 10px 0;
border: 1px solid #ccc;
- border-radius: 4px;
+ border-radius: 25px;
}
button {
- width: 100%;
+ width: 50%;
padding: 10px;
- background-color: #4CAF50;
+ margin-top: 20px;
+ background-color: #5a39bd;
color: white;
border: none;
- border-radius: 4px;
+ border-radius: 25px;
cursor: pointer;
}
button:disabled {
background-color: #ccc;
+ cursor: not-allowed;
}
-button:hover {
- background-color: #45a049;
+button:hover:enabled {
+ background-color: #4e17ef;
}
.error-message {
diff --git a/src/app/login/login.component.ts b/src/app/login/login.component.ts
index 6453366..1e9223c 100644
--- a/src/app/login/login.component.ts
+++ b/src/app/login/login.component.ts
@@ -72,8 +72,8 @@ export class LoginComponent implements OnInit, OnDestroy, AfterViewInit {
// Initialize the Vanta effect on the element with ID 'vanta-bg'
this.vantaEffect = window.VANTA.NET({
el: '#vanta-login-bg',
- mouseControls: true,
- touchControls: true,
+ mouseControls: false,
+ touchControls: false,
gyroControls: false,
scale: 1.00,
scaleMobile: 1.00,
diff --git a/src/app/not-found/not-found.component.ts b/src/app/not-found/not-found.component.ts
index a96729e..948fe3e 100644
--- a/src/app/not-found/not-found.component.ts
+++ b/src/app/not-found/not-found.component.ts
@@ -68,8 +68,8 @@ export class NotFoundComponent implements OnInit, OnDestroy, AfterViewInit {
// Initialize the Vanta effect on the element with ID 'vanta-bg'
this.vantaEffect = window.VANTA.NET({
el: '#vanta-not-found-bg',
- mouseControls: true,
- touchControls: true,
+ mouseControls: false,
+ touchControls: false,
gyroControls: false,
scale: 1.00,
scaleMobile: 1.00,
diff --git a/src/app/portfolio/portfolio.component.ts b/src/app/portfolio/portfolio.component.ts
index 4b142bb..34bc91c 100644
--- a/src/app/portfolio/portfolio.component.ts
+++ b/src/app/portfolio/portfolio.component.ts
@@ -70,8 +70,8 @@ export class PortfolioComponent implements OnInit, OnDestroy, AfterViewInit {
// Initialize the Vanta effect on the element with ID 'vanta-bg'
this.vantaEffect = window.VANTA.NET({
el: '#vanta-portfolio-bg',
- mouseControls: true,
- touchControls: true,
+ mouseControls: false,
+ touchControls: false,
gyroControls: false,
scale: 1.00,
scaleMobile: 1.00,