feat(footer): move noscript hint to index.html and link home from imprint

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
fraujulianandClaude Opus 5.5 committed 2026-10-15 16:20:42 +02:00
1 parent afc9b875d2
commit 6e76b8d199
3 files changed
+16 -10

No files matched your search

+5 -9
View File
@@ -1,14 +1,10 @@
<noscript>
<div class="page-shell footer-shell">
<div class="panel noscript-panel">
<h2 id="loading-text" class="warning-text">{{ content().footer.noscriptMessage }}</h2>
</div>
</div>
</noscript>
<footer class="site-footer"> <footer class="site-footer">
<div class="footer-inner"> <div class="footer-inner">
<p>&copy; 2023 - {{ currentYear }} {{ global.firstname }} {{ global.lastname }}</p> <p>&copy; 2023 - {{ currentYear }} {{ global.firstname }} {{ global.lastname }}</p>
<a routerLink="/imprint">{{ content().footer.imprintLink }}</a> @if (showImprintLink()) {
<a routerLink="/imprint">{{ content().footer.imprintLink }}</a>
} @else {
<a routerLink="/">{{ content().footer.homeLink }}</a>
}
</div> </div>
</footer> </footer>
+7
View File
@@ -80,6 +80,13 @@ describe('FooterComponent', (): void => {
expect(imprintLink).toBeTruthy(); 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 => { it('should contain a footer element', (): void => {
const el = fixture.nativeElement as HTMLElement; const el = fixture.nativeElement as HTMLElement;
expect(el.querySelector('footer')).not.toBeNull(); expect(el.querySelector('footer')).not.toBeNull();
+4 -1
View File
@@ -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 { RouterLink } from '@angular/router';
import { global } from '../../global'; import { global } from '../../global';
import { ShellLanguageService } from '../services/shell-language.service'; import { ShellLanguageService } from '../services/shell-language.service';
@@ -16,4 +16,7 @@ export class FooterComponent {
protected readonly content = this.shellLanguageService.content; protected readonly content = this.shellLanguageService.content;
protected readonly global = global; protected readonly global = global;
protected readonly currentYear = new Date().getFullYear(); protected readonly currentYear = new Date().getFullYear();
/** The imprint page links back to the portfolio instead of to itself. */
readonly showImprintLink = input(true);
} }