Per m's Q11 divergence in the design (no 2-week dual-ship), this slice flips /tools/fristenrechner and /tools/verfahrensablauf to permanent 301 redirects to /tools/procedures and deletes the legacy frontend pages. Bookmarks resolve via Location preservation of query params; no ?legacy=1 escape, no in-product affordance pointed back at the retired URLs after the merge. Server: - handleFristenrechnerPage + handleVerfahrensablaufPage now 301 to /tools/procedures, carrying any query string through unchanged. - pillDrillURL in deadline_search_service.go retargets to /tools/procedures so freshly indexed search pills land on the new page directly (cached snapshots still work via the 301). Frontend: - Deleted src/fristenrechner.tsx, src/verfahrensablauf.tsx, src/client/fristenrechner.ts. - src/client/verfahrensablauf.ts loses its DOMContentLoaded auto-boot and the now-unused initI18n / initSidebar imports; procedures.ts is the sole caller of initVerfahrensablauf(). - frontend/build.ts drops the legacy entrypoints and renderXxx HTML outputs. - Sidebar.tsx, Header.tsx, index.tsx, paliadin-context.ts repointed to /tools/procedures. - Unused nav.fristenrechner / nav.verfahrensablauf / tools.verfahrensablauf.* i18n keys removed. Tests: - verfahrensablauf_test.go rewritten to assert both legacy URLs return 301 with the correct Location (query string preserved).
35 lines
1.2 KiB
TypeScript
35 lines
1.2 KiB
TypeScript
import { h, Fragment } from "../jsx";
|
|
|
|
interface HeaderProps {
|
|
showLogout?: boolean;
|
|
}
|
|
|
|
export function Header({ showLogout }: HeaderProps): string {
|
|
return (
|
|
<header className="header">
|
|
<div className="container">
|
|
<nav className="nav">
|
|
<a href="/" className="logo">
|
|
<span className="logo-mark">p</span>
|
|
<span className="logo-text">Paliad</span>
|
|
</a>
|
|
<div className="nav-right">
|
|
{showLogout && (
|
|
<Fragment>
|
|
<a href="/tools/kostenrechner" className="nav-link" data-i18n="nav.kostenrechner">Kostenrechner</a>
|
|
<a href="/tools/procedures" className="nav-link" data-i18n="nav.procedures">Verfahren & Fristen</a>
|
|
<a href="/logout" className="nav-logout" data-i18n="nav.logout">Abmelden</a>
|
|
</Fragment>
|
|
)}
|
|
<div className="nav-lang">
|
|
<button className="lang-btn lang-active" data-lang-toggle="de" type="button">DE</button>
|
|
<span className="lang-sep">/</span>
|
|
<button className="lang-btn" data-lang-toggle="en" type="button">EN</button>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
</div>
|
|
</header>
|
|
);
|
|
}
|