From 6e76b8d1994ee124e8f0728dbc1453c9ad75218a Mon Sep 17 00:00:00 2001 From: Julian Lechner Date: Thu, 15 Oct 2026 16:20:42 +0200 Subject: [PATCH] feat(footer): move noscript hint to index.html and link home from imprint Co-Authored-By: Claude Opus 5.5 --- src/app/footer/footer.component.html | 14 +++++--------- src/app/footer/footer.component.spec.ts | 7 +++++++ src/app/footer/footer.component.ts | 5 ++++- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/app/footer/footer.component.html b/src/app/footer/footer.component.html index 8d473e3..0c73598 100644 --- a/src/app/footer/footer.component.html +++ b/src/app/footer/footer.component.html @@ -1,14 +1,10 @@ - - diff --git a/src/app/footer/footer.component.spec.ts b/src/app/footer/footer.component.spec.ts index e12cdb6..306013f 100644 --- a/src/app/footer/footer.component.spec.ts +++ b/src/app/footer/footer.component.spec.ts @@ -80,6 +80,13 @@ describe('FooterComponent', (): void => { expect(imprintLink).toBeTruthy(); }); + it('should link back to the portfolio instead of the imprint on the imprint page', (): void => { + fixture.componentRef.setInput('showImprintLink', false); + fixture.detectChanges(); + const links = Array.from((fixture.nativeElement as HTMLElement).querySelectorAll('a')); + expect(links.map((a): string => a.textContent?.trim() ?? '')).toEqual(['Portfolio']); + }); + it('should contain a footer element', (): void => { const el = fixture.nativeElement as HTMLElement; expect(el.querySelector('footer')).not.toBeNull(); diff --git a/src/app/footer/footer.component.ts b/src/app/footer/footer.component.ts index f3e4ec3..c6680b4 100644 --- a/src/app/footer/footer.component.ts +++ b/src/app/footer/footer.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; +import { ChangeDetectionStrategy, Component, inject, input } from '@angular/core'; import { RouterLink } from '@angular/router'; import { global } from '../../global'; import { ShellLanguageService } from '../services/shell-language.service'; @@ -16,4 +16,7 @@ export class FooterComponent { protected readonly content = this.shellLanguageService.content; protected readonly global = global; protected readonly currentYear = new Date().getFullYear(); + + /** The imprint page links back to the portfolio instead of to itself. */ + readonly showImprintLink = input(true); }