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

@@ -0,0 +1,95 @@
@keyframes fadeIn {
0% {
opacity: 0;
visibility: hidden;
}
100% {
opacity: 1;
visibility: visible;
}
}
#bg-base {
animation: fadeIn 1s ease-out;
position: fixed;
inset: 0;
z-index: -105;
overflow: hidden;
pointer-events: none;
}
.bg {
position: absolute;
inset: 0;
}
#parallax-scene {
animation: fadeIn 1s ease-out;
position: fixed;
inset: 0;
z-index: -100;
overflow: hidden;
pointer-events: none;
}
.parallax-layer {
position: absolute;
inset: 0;
will-change: transform;
}
.layer {
position: absolute;
}
.triangles {
top: 0;
left: -10vw;
width: 120vw;
height: 100vh;
background-image: url('/assets/triangle_tile.svg');
background-repeat: repeat;
background-size: 320px 320px;
background-position: center top;
opacity: 0.18;
animation: arrowsScroll 15s linear infinite;
}
@keyframes arrowsScroll {
from {
background-position: 0 0;
}
to {
background-position: 320px 0;
}
}
.mist {
top: -20vh;
left: -20vw;
width: 140vw;
height: 140vh;
opacity: 0.18;
filter: blur(28px);
background:
radial-gradient(circle at 35% 35%, rgba(255,255,255,0.08), transparent 16%),
radial-gradient(circle at 60% 50%, rgba(180,180,220,0.06), transparent 18%),
radial-gradient(circle at 45% 75%, rgba(255,255,255,0.04), transparent 14%);
}
.flare {
position: absolute;
top: -40vh;
left: -40vw;
width: 180vw;
height: 180vw;
pointer-events: none;
background:
radial-gradient(circle at -10% 30%, rgba(187, 107, 209, 0.35) 0%, transparent 40%),
radial-gradient(circle at 110% 40%, rgba(120, 255, 183, 0.28) 0%, transparent 45%),
radial-gradient(circle at 50% 120%, rgba(99, 155, 255, 0.18) 0%, transparent 50%);
filter: blur(60px);
opacity: 0.6;
}
@@ -0,0 +1,15 @@
<div id="bg-base" [style.background]="baseColor">
<div class="bg"></div>
</div>
<div #parallax id="parallax-scene">
<div data-depth="0.01" class="parallax-layer">
<div class="layer flare"></div>
</div>
<div data-depth="0.06" class="parallax-layer">
<div class="layer triangles"></div>
</div>
<div data-depth="0.10" class="parallax-layer">
<div class="layer mist"></div>
</div>
</div>
@@ -0,0 +1,52 @@
import {AfterViewInit, Component, ElementRef, Inject, OnDestroy, OnInit, PLATFORM_ID, ViewChild, Input} from '@angular/core';
import {DeviceDetectorService} from '../services/device-detector.service';
import {isPlatformBrowser} from '@angular/common';
import Parallax from 'parallax-js';
@Component({
selector: 'app-parallax',
imports: [],
templateUrl: './parallax.component.html',
styleUrl: './parallax.component.css',
})
export class ParallaxComponent implements OnInit, OnDestroy, AfterViewInit {
@ViewChild('parallax') sceneRef!: ElementRef<HTMLDivElement>;
@Input() baseColor: string = '#0b0b0f';
@Input() bgGradient: string =
'radial-gradient(circle 120vw at center, rgba(90,78,130,0.32), transparent 40%), linear-gradient(180deg,#1b172c 0%, #0b0b0f 100%)';
isMobile: boolean = false;
private parallaxInstance: Parallax | null = null;
constructor(
private deviceService: DeviceDetectorService,
@Inject(PLATFORM_ID) private platformId: Object
) {
}
ngOnInit() {
this.isMobile = this.deviceService.isMobile;
}
ngAfterViewInit() {
if (!isPlatformBrowser(this.platformId)) return;
if (!this.sceneRef?.nativeElement) return;
this.parallaxInstance = new Parallax(this.sceneRef.nativeElement, {
relativeInput: true,
hoverOnly: false,
clipRelativeInput: true,
calibrateX: true,
calibrateY: true,
scalarX: this.isMobile ? 6 : 12,
scalarY: this.isMobile ? 6 : 12,
frictionX: 0.1,
frictionY: 0.1,
});
}
ngOnDestroy() {
this.parallaxInstance?.destroy();
this.parallaxInstance = null;
}
}