style(navigation): implement new navigation-bar

This commit is contained in:
2025-08-22 00:46:19 +02:00
parent aebd3d643e
commit 244ad1aabe
8 changed files with 679 additions and 84 deletions
@@ -1,4 +1,5 @@
import { Component, ElementRef, HostListener, ViewChild } from '@angular/core';
import { ThemeSwitchService } from '../../service/theme-switch.service';
@Component({
selector: 'app-background',
@@ -8,6 +9,10 @@ import { Component, ElementRef, HostListener, ViewChild } from '@angular/core';
})
export class Background {
constructor(
private themeSwitchService: ThemeSwitchService,
) {}
@ViewChild('canvas', { static: true }) canvasRef!: ElementRef<HTMLCanvasElement>;
// Config
@@ -90,7 +95,9 @@ export class Background {
// Stern zeichnen mit Scroll-Parallax
ctx.beginPath();
ctx.arc(star.x, star.y - this.scrollY * this.parallaxFactor, star.radius, 0, Math.PI * 2);
ctx.fillStyle = `rgba(255, 215, 0, ${star.alpha})`; // gold
ctx.fillStyle = this.themeSwitchService.darkMode()
? `rgba(255, 215, 0, ${star.alpha})`
: `rgba(184, 134, 11, ${star.alpha})`;
ctx.fill();
}