complete visual overhaul

This commit is contained in:
itzMiney committed 2026-03-16 00:20:57 +01:00
1 parent 02bc2faca0
commit 25d06ec49a
51 files changed
+694 -664

No files matched your search

+8 -30
View File
@@ -1,12 +1,12 @@
import {AfterViewInit, Component, Inject, OnDestroy, OnInit, PLATFORM_ID} from '@angular/core';
import {Component, OnInit} from '@angular/core';
import {DeviceDetectorService} from '../shared/services/device-detector.service'
import { DatePipe, isPlatformBrowser, AsyncPipe, SlicePipe, NgStyle } from '@angular/common';
import {VantaBackgroundService} from '../shared/services/vanta-background.service';
import { DatePipe, AsyncPipe, SlicePipe, NgStyle } from '@angular/common';
import { ArticleService } from '../shared/services/article.service';
import { Router } from '@angular/router';
import {Observable} from 'rxjs';
import {Title} from '@angular/platform-browser';
import {TranslatePipe} from '@ngx-translate/core';
import {ParallaxComponent} from '../shared/parallax/parallax.component';
@Component({
selector: 'app-blog',
@@ -15,30 +15,25 @@ import {TranslatePipe} from '@ngx-translate/core';
AsyncPipe,
SlicePipe,
NgStyle,
TranslatePipe
],
TranslatePipe,
ParallaxComponent
],
templateUrl: './blog.component.html',
styleUrl: './blog.component.css'
})
export class BlogComponent implements OnInit, OnDestroy, AfterViewInit {
export class BlogComponent implements OnInit {
articles$: Observable<any[]> | undefined;
private readonly elementId = 'vanta-blog-bg';
isMobile: boolean = false;
constructor(
private deviceService: DeviceDetectorService,
private vantaService: VantaBackgroundService,
private articleService: ArticleService,
private router: Router,
private titleService: Title,
@Inject(PLATFORM_ID) private platformId: Object
private titleService: Title
) {}
ngOnInit() {
this.titleService.setTitle('Blog | itzMiney')
this.isMobile = this.deviceService.isMobile;
if (isPlatformBrowser(this.platformId)) {
window.addEventListener('resize', this.onResize.bind(this));
}
this.articles$ = this.articleService.getAllArticles();
}
@@ -57,23 +52,6 @@ export class BlogComponent implements OnInit, OnDestroy, AfterViewInit {
);
}
ngAfterViewInit() {
this.vantaService.initVanta(this.elementId, {
color: 0xac1f4e,
backgroundColor: 0x191522
});
}
ngOnDestroy() {
this.vantaService.destroyVanta(this.elementId);
if (isPlatformBrowser(this.platformId)) {
window.removeEventListener('resize', this.onResize);
}
}
onResize() {
this.vantaService.resizeVanta(this.elementId);
}
sanitizeContent(content: string): string {
if (!content) return '';
return content.replace(/<[^>]*>/g, ' ').replace(/\s+/g, ' ').trim();