Started with about page and my cv

This commit is contained in:
2025-11-09 12:21:34 +01:00
parent b80d70d4df
commit 5969e66872
36 changed files with 637 additions and 169 deletions

View File

@@ -1,6 +1,6 @@
import { Injectable, inject, signal } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import {Constants} from '../constants/Constants';
import {LocalStoreConstants} from '../constants/LocalStoreConstants';
type Lang = 'de' | 'en';
@@ -19,12 +19,12 @@ export class LanguageService {
use(l: Lang) {
this.lang.set(l);
this.translate.use(l);
try { localStorage.setItem(Constants.LANGUAGE_KEY, l); } catch {}
try { localStorage.setItem(LocalStoreConstants.LANGUAGE_KEY, l); } catch {}
}
private getInitial(): Lang {
try {
const stored = localStorage.getItem(Constants.LANGUAGE_KEY) as Lang | null;
const stored = localStorage.getItem(LocalStoreConstants.LANGUAGE_KEY) as Lang | null;
if (stored === 'de' || stored === 'en') return stored;
} catch {}
const browser = (navigator.language || 'en').toLowerCase();