website refactor

This commit is contained in:
2026-01-14 02:02:24 +01:00
parent 8d7c709e0c
commit 4522d41aef
291 changed files with 12763 additions and 9309 deletions

View File

@@ -0,0 +1,21 @@
export class CountryFlagDisplay {
private constructor(private readonly value: string) {}
static fromCountryCode(countryCode: string | null | undefined): CountryFlagDisplay {
if (!countryCode) {
return new CountryFlagDisplay('🏁');
}
const code = countryCode.toUpperCase();
if (code.length !== 2) {
return new CountryFlagDisplay('🏁');
}
const codePoints = [...code].map((char) => 127397 + char.charCodeAt(0));
return new CountryFlagDisplay(String.fromCodePoint(...codePoints));
}
toString(): string {
return this.value;
}
}