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

@@ -9,15 +9,6 @@
}
}
#vanta-article-bg {
animation: fadeIn 1s ease-out;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -100;
}
.height-container {
display: flex;
min-height: 100vh;
@@ -68,7 +59,7 @@ h1 {
}
.content-container button {
background-color: #713252;
background-color: #444893FF;
color: #fff;
border: none;
padding: 10px 20px;
@@ -81,7 +72,7 @@ h1 {
}
.content-container button:hover {
background-color: #bf9bae;
background-color: #707ec5;
}
.error-message h1 {
@@ -99,7 +90,7 @@ h1 {
}
.error-message button {
background-color: #713252;
background-color: #444893FF;
color: #fff;
border: none;
padding: 10px 20px;
@@ -1,4 +1,10 @@
<div id="vanta-article-bg"></div>
<app-parallax
[baseColor]="'#101522'"
[bgGradient]="
'radial-gradient(circle 120vw at center, rgba(90,78,130,0.32), transparent 40%), ' +
'linear-gradient(180deg,#1b172c 0%, #0b0b0f 100%);'
">
</app-parallax>
<div class="height-container">
@if (!loading && article) {
<div class="article-container">
@@ -1,11 +1,10 @@
import {AfterViewInit, Component, ElementRef, Inject, OnDestroy, OnInit, PLATFORM_ID, ViewChild} from '@angular/core';
import {DeviceDetectorService} from '../../shared/services/device-detector.service'
import { DatePipe, isPlatformBrowser, NgStyle } from '@angular/common';
import {VantaBackgroundService} from '../../shared/services/vanta-background.service';
import {AfterViewInit, Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import { DatePipe, NgStyle } from '@angular/common';
import {ArticleService} from '../../shared/services/article.service';
import {ActivatedRoute} from '@angular/router';
import {Title} from '@angular/platform-browser';
import {TranslatePipe} from '@ngx-translate/core';
import {ParallaxComponent} from '../../shared/parallax/parallax.component';
interface Article {
id: number;
@@ -24,17 +23,16 @@ interface Article {
imports: [
DatePipe,
NgStyle,
TranslatePipe
],
TranslatePipe,
ParallaxComponent
],
templateUrl: './article-page.component.html',
styleUrl: './article-page.component.css'
})
export class ArticlePageComponent implements OnInit, OnDestroy, AfterViewInit {
export class ArticlePageComponent implements OnInit, AfterViewInit {
@ViewChild('articleContent') articleContent!: ElementRef<HTMLDivElement>;
selectedImage: string | null = null;
private imagesProcessed = false;
private readonly elementId = 'vanta-article-bg';
isMobile: boolean = false;
article: Article | undefined;
currentArticle: any;
error: boolean = false;
@@ -42,18 +40,13 @@ export class ArticlePageComponent implements OnInit, OnDestroy, AfterViewInit {
loading: boolean = true;
constructor(
private deviceService: DeviceDetectorService,
private vantaService: VantaBackgroundService,
private articleService: ArticleService,
private titleService: Title,
private route: ActivatedRoute,
@Inject(PLATFORM_ID) private platformId: Object
private route: ActivatedRoute
) {
}
ngOnInit() {
this.isMobile = this.deviceService.isMobile;
this.route.params.subscribe((params) => {
const slug = params['slug'];
if (slug) {
@@ -63,9 +56,6 @@ export class ArticlePageComponent implements OnInit, OnDestroy, AfterViewInit {
}
});
if (isPlatformBrowser(this.platformId)) {
window.addEventListener('resize', this.onResize.bind(this));
}
const slug = this.route.snapshot.paramMap.get('slug') || '';
this.articleService.getArticleBySlug(slug).subscribe(
(article) => {
@@ -96,10 +86,6 @@ export class ArticlePageComponent implements OnInit, OnDestroy, AfterViewInit {
}
ngAfterViewInit() {
this.vantaService.initVanta(this.elementId, {
color: 0xac1f4e,
backgroundColor: 0x191522
});
this.makeImagesClickable();
this.imagesProcessed = true;
}
@@ -123,17 +109,6 @@ export class ArticlePageComponent implements OnInit, OnDestroy, AfterViewInit {
this.selectedImage = null;
}
ngOnDestroy() {
this.vantaService.destroyVanta(this.elementId);
if (isPlatformBrowser(this.platformId)) {
window.removeEventListener('resize', this.onResize);
}
}
onResize() {
this.vantaService.resizeVanta(this.elementId);
}
loadTitleBySlug(slug: string) {
this.articleService.getArticleBySlug(slug).subscribe(
(article) => {