diff --git a/frontend/src/app/app.component.html b/frontend/src/app/app.component.html
index ee34adf..b7df367 100644
--- a/frontend/src/app/app.component.html
+++ b/frontend/src/app/app.component.html
@@ -1,6 +1,6 @@
-@if (siteIntroState() !== 'hidden') {
+@if (siteIntroState() !== "hidden") {
param.startsWith('q='));
- const quality = qualityParam ? Number.parseFloat(qualityParam.slice(2)) : 1;
+ const quality = qualityParam
+ ? Number.parseFloat(qualityParam.slice(2))
+ : 1;
return {
tag: rawTag,
quality: Number.isFinite(quality) ? quality : 0,
@@ -70,7 +72,9 @@ export function parseAcceptLanguage(
index: number;
} => entry !== null && entry.quality > 0,
)
- .sort((left, right) => right.quality - left.quality || left.index - right.index)
+ .sort(
+ (left, right) => right.quality - left.quality || left.index - right.index,
+ )
.map((entry) => entry.tag);
}
@@ -102,9 +106,7 @@ function resolveExplicitLanguageFromUrl(
const normalizedUrl = String(url ?? '/');
const [pathAndQuery] = normalizedUrl.split('#', 1);
const [rawPath, rawQuery] = pathAndQuery.split('?', 2);
- const firstSegment = rawPath
- .split('/')
- .filter(Boolean)[0];
+ const firstSegment = rawPath.split('/').filter(Boolean)[0];
const pathLanguage = normalizeSupportedLanguage(firstSegment);
if (pathLanguage) {
return pathLanguage;
diff --git a/frontend/src/app/core/i18n/static-translate.loader.ts b/frontend/src/app/core/i18n/static-translate.loader.ts
index 9ec2939..7e25c66 100644
--- a/frontend/src/app/core/i18n/static-translate.loader.ts
+++ b/frontend/src/app/core/i18n/static-translate.loader.ts
@@ -14,7 +14,10 @@ type SupportedLang = 'it' | 'en' | 'de' | 'fr';
const FALLBACK_LANG: SupportedLang = 'it';
const translationCache = new Map>();
-const translationLoaders: Record Promise> = {
+const translationLoaders: Record<
+ SupportedLang,
+ () => Promise
+> = {
it: () =>
import('../../../assets/i18n/it.json').then(
(module) => module.default as TranslationObject,
@@ -51,8 +54,9 @@ export class StaticTranslateLoader implements TranslateLoader {
}
private loadTranslation(lang: SupportedLang): Promise {
- const transferStateKey =
- makeStateKey(`i18n:${lang.toLowerCase()}`);
+ const transferStateKey = makeStateKey(
+ `i18n:${lang.toLowerCase()}`,
+ );
if (
isPlatformBrowser(this.platformId) &&
this.transferState.hasKey(transferStateKey)
diff --git a/frontend/src/app/core/layout/layout.component.ts b/frontend/src/app/core/layout/layout.component.ts
index 0e67b30..873f795 100644
--- a/frontend/src/app/core/layout/layout.component.ts
+++ b/frontend/src/app/core/layout/layout.component.ts
@@ -10,5 +10,4 @@ import { FooterComponent } from './footer.component';
templateUrl: './layout.component.html',
styleUrl: './layout.component.scss',
})
-export class LayoutComponent {
-}
+export class LayoutComponent {}
diff --git a/frontend/src/app/core/layout/navbar.component.ts b/frontend/src/app/core/layout/navbar.component.ts
index a883107..bc6d0e3 100644
--- a/frontend/src/app/core/layout/navbar.component.ts
+++ b/frontend/src/app/core/layout/navbar.component.ts
@@ -1,4 +1,4 @@
-import {CommonModule, NgOptimizedImage} from '@angular/common';
+import { CommonModule, NgOptimizedImage } from '@angular/common';
import {
afterNextRender,
Component,
@@ -30,7 +30,13 @@ import {
@Component({
selector: 'app-navbar',
standalone: true,
- imports: [CommonModule, RouterLink, RouterLinkActive, TranslateModule, NgOptimizedImage],
+ imports: [
+ CommonModule,
+ RouterLink,
+ RouterLinkActive,
+ TranslateModule,
+ NgOptimizedImage,
+ ],
templateUrl: './navbar.component.html',
styleUrls: ['./navbar.component.scss'],
})
diff --git a/frontend/src/app/core/services/language.service.ts b/frontend/src/app/core/services/language.service.ts
index 1669c59..2d6ab50 100644
--- a/frontend/src/app/core/services/language.service.ts
+++ b/frontend/src/app/core/services/language.service.ts
@@ -67,7 +67,10 @@ export class LanguageService {
}
const currentTree = this.router.parseUrl(this.router.url);
- const localizedRoute = this.resolveLocalizedRouteOverride(currentTree, lang);
+ const localizedRoute = this.resolveLocalizedRouteOverride(
+ currentTree,
+ lang,
+ );
if (localizedRoute) {
this.navigateToLocalizedRoute(currentTree, localizedRoute);
return;
@@ -220,7 +223,9 @@ export class LanguageService {
return null;
}
- const currentPath = this.getCleanPath(this.router.serializeUrl(currentTree));
+ const currentPath = this.getCleanPath(
+ this.router.serializeUrl(currentTree),
+ );
const paths = Object.values(overrides)
.map((path) => this.normalizeLocalizedRoutePath(path))
.filter((path): path is string => !!path);
diff --git a/frontend/src/app/core/services/seo.service.ts b/frontend/src/app/core/services/seo.service.ts
index 4e2974c..f1b0b05 100644
--- a/frontend/src/app/core/services/seo.service.ts
+++ b/frontend/src/app/core/services/seo.service.ts
@@ -360,18 +360,23 @@ export class SeoService {
}, {});
}
- private normalizeAlternatePaths(paths: SeoMap | null | undefined): SeoMap | null {
+ private normalizeAlternatePaths(
+ paths: SeoMap | null | undefined,
+ ): SeoMap | null {
if (!paths) {
return null;
}
- const normalized = this.supportedLangs.reduce((accumulator, lang) => {
- const path = this.normalizeSeoPath(paths[lang]);
- if (path) {
- accumulator[lang] = path;
- }
- return accumulator;
- }, {});
+ const normalized = this.supportedLangs.reduce(
+ (accumulator, lang) => {
+ const path = this.normalizeSeoPath(paths[lang]);
+ if (path) {
+ accumulator[lang] = path;
+ }
+ return accumulator;
+ },
+ {},
+ );
return Object.keys(normalized).length > 0 ? normalized : null;
}
@@ -445,7 +450,10 @@ export class SeoService {
if (!path) {
continue;
}
- this.appendAlternateLink(this.seoLocaleByLang[alt], this.toAbsoluteUrl(path));
+ this.appendAlternateLink(
+ this.seoLocaleByLang[alt],
+ this.toAbsoluteUrl(path),
+ );
}
if (xDefaultPath) {
this.appendAlternateLink('x-default', this.toAbsoluteUrl(xDefaultPath));
diff --git a/frontend/src/app/features/calculator/calculator-animation-test.component.html b/frontend/src/app/features/calculator/calculator-animation-test.component.html
index 9b040e2..2cd7f01 100644
--- a/frontend/src/app/features/calculator/calculator-animation-test.component.html
+++ b/frontend/src/app/features/calculator/calculator-animation-test.component.html
@@ -18,10 +18,7 @@
-
+
{
});
catalogRequest.flush(buildCatalog());
- httpMock.expectNone('http://localhost:8000/api/shop/products/desk-cable-clip');
+ httpMock.expectNone(
+ 'http://localhost:8000/api/shop/products/desk-cable-clip',
+ );
expect(errorResponse?.status).toBe(404);
});
@@ -291,7 +293,9 @@ describe('ShopService', () => {
});
catalogRequest.flush(buildCatalog());
- httpMock.expectNone('http://localhost:8000/api/shop/products/desk-cable-clip');
+ httpMock.expectNone(
+ 'http://localhost:8000/api/shop/products/desk-cable-clip',
+ );
expect(errorResponse?.status).toBe(404);
});
});
diff --git a/frontend/src/app/features/shop/services/shop.service.ts b/frontend/src/app/features/shop/services/shop.service.ts
index 58fc6f5..131d25b 100644
--- a/frontend/src/app/features/shop/services/shop.service.ts
+++ b/frontend/src/app/features/shop/services/shop.service.ts
@@ -292,8 +292,9 @@ export class ShopService {
return this.getProductCatalog().pipe(
map((catalog) =>
- catalog.products.find((product) =>
- this.normalizePublicPath(product.publicPath) === normalizedPath,
+ catalog.products.find(
+ (product) =>
+ this.normalizePublicPath(product.publicPath) === normalizedPath,
),
),
switchMap((product) => {
diff --git a/frontend/src/app/shared/components/brand-animation-logo/brand-animation-logo.component.scss b/frontend/src/app/shared/components/brand-animation-logo/brand-animation-logo.component.scss
index cc839ff..0102ab6 100644
--- a/frontend/src/app/shared/components/brand-animation-logo/brand-animation-logo.component.scss
+++ b/frontend/src/app/shared/components/brand-animation-logo/brand-animation-logo.component.scss
@@ -29,14 +29,14 @@
will-change: transform;
}
-.brand-animation[data-variant='site-intro'] .brand-animation__letter {
- animation: site-intro-preview var(--brand-animation-site-intro-duration, 1s) linear 1 forwards;
+.brand-animation[data-variant="site-intro"] .brand-animation__letter {
+ animation: site-intro-preview var(--brand-animation-site-intro-duration, 1s)
+ linear 1 forwards;
}
-.brand-animation[data-variant='calculator-loader'] .brand-animation__letter {
+.brand-animation[data-variant="calculator-loader"] .brand-animation__letter {
animation: calculator-loader-loop
- var(--brand-animation-loader-loop-duration, 2.65s)
- infinite;
+ var(--brand-animation-loader-loop-duration, 2.65s) infinite;
}
@keyframes site-intro-preview {
@@ -75,8 +75,7 @@
var(--three-anchor-x) * var(--word-scale) * var(--word-spacing-factor)
)
)
- scaleX(var(--loader-group-scale-x))
- scaleY(var(--loader-group-scale-y));
+ scaleX(var(--loader-group-scale-x)) scaleY(var(--loader-group-scale-y));
}
12% {
@@ -87,8 +86,7 @@
var(--three-anchor-x) * var(--word-scale) * var(--word-spacing-factor)
)
)
- scaleX(var(--loader-group-scale-x))
- scaleY(var(--loader-group-scale-y));
+ scaleX(var(--loader-group-scale-x)) scaleY(var(--loader-group-scale-y));
}
12% {
@@ -118,8 +116,7 @@
var(--bee-anchor-x) * var(--word-scale) * var(--word-spacing-factor)
)
)
- scaleX(var(--loader-group-scale-x))
- scaleY(var(--loader-group-scale-y));
+ scaleX(var(--loader-group-scale-x)) scaleY(var(--loader-group-scale-y));
}
88% {
@@ -131,12 +128,11 @@
transform: translate(-50%, -50%)
translateX(
calc(
- (var(--bee-anchor-x) + var(--loader-exit-shift)) *
- var(--word-scale) * var(--word-spacing-factor)
+ (var(--bee-anchor-x) + var(--loader-exit-shift)) * var(--word-scale) *
+ var(--word-spacing-factor)
)
)
- scaleX(0.98)
- scaleY(1.02);
+ scaleX(0.98) scaleY(1.02);
}
94.01%,
@@ -148,8 +144,7 @@
var(--three-anchor-x) * var(--word-scale) * var(--word-spacing-factor)
)
)
- scaleX(var(--loader-group-scale-x))
- scaleY(var(--loader-group-scale-y));
+ scaleX(var(--loader-group-scale-x)) scaleY(var(--loader-group-scale-y));
}
}
diff --git a/frontend/src/app/shared/components/brand-animation-logo/brand-animation-logo.component.ts b/frontend/src/app/shared/components/brand-animation-logo/brand-animation-logo.component.ts
index 94112c9..259e8e6 100644
--- a/frontend/src/app/shared/components/brand-animation-logo/brand-animation-logo.component.ts
+++ b/frontend/src/app/shared/components/brand-animation-logo/brand-animation-logo.component.ts
@@ -62,8 +62,7 @@ export class BrandAnimationLogoComponent {
readonly resolvedLetters = computed(() =>
LETTERS.map((letter) => ({
key: letter.key,
- src:
- this.variant() === 'site-intro' ? letter.yellowSrc : letter.darkSrc,
+ src: this.variant() === 'site-intro' ? letter.yellowSrc : letter.darkSrc,
wordX: letter.wordX,
})),
);
diff --git a/frontend/src/server-routing.spec.ts b/frontend/src/server-routing.spec.ts
index 1baffb1..8359abe 100644
--- a/frontend/src/server-routing.spec.ts
+++ b/frontend/src/server-routing.spec.ts
@@ -20,9 +20,9 @@ describe('server routing redirects', () => {
});
it('redirects legacy shop product aliases to the canonical product route', () => {
- expect(resolvePublicRedirectTarget('/shop/accessories/desk-cable-clip')).toBe(
- '/it/shop/p/desk-cable-clip',
- );
+ expect(
+ resolvePublicRedirectTarget('/shop/accessories/desk-cable-clip'),
+ ).toBe('/it/shop/p/desk-cable-clip');
expect(
resolvePublicRedirectTarget('/de/shop/zubehor/schreibtisch-kabelhalter'),
).toBe('/de/shop/p/schreibtisch-kabelhalter');
diff --git a/frontend/src/server-routing.ts b/frontend/src/server-routing.ts
index 59c6601..c66c3e7 100644
--- a/frontend/src/server-routing.ts
+++ b/frontend/src/server-routing.ts
@@ -99,5 +99,7 @@ function splitSegments(pathname: string): string[] {
}
function looksLikeLangToken(segment: string | null | undefined): boolean {
- return typeof segment === 'string' && /^[a-z]{2}(?:-[a-z]{2})?$/i.test(segment);
+ return (
+ typeof segment === 'string' && /^[a-z]{2}(?:-[a-z]{2})?$/i.test(segment)
+ );
}