feat: freelance page, a story on the homepage, and design fixes
The homepage was too long and read as a list of sections. The technical ones (project fit, tools, how a change is secured) move to a page of their own, /freelance and /en/freelance, linked from the header, the footer and a pointer on the homepage. The rest is reordered into one story (who, what you need, examples, how working together goes, results, questions, contact) and each section opens with a sentence that leads over from the one before. routes.ts: a page may now have the same name in both languages. Before, /en/<german name> was always moved to the English name, which for such a page would have redirected the address onto itself. Design: list titles such as "Passt gut" are real headings instead of small grey labels. The automation examples, their description and the run are one box, so it is clear they belong together. Digits on light backgrounds are the blue of the panels instead of black. The square corner marks on the rounded service cards are gone. The years in the career line are readable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -296,3 +296,65 @@ describe("sitemapEntries", () => {
|
||||
expect(sitemapEntries("https://example.com", [])).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("the freelance page, which has the same name in both languages", () => {
|
||||
it("lives at /freelance in German and /en/freelance in English", () => {
|
||||
expect(pathFor("freelance", "de")).toBe("/freelance");
|
||||
expect(pathFor("freelance", "en")).toBe("/en/freelance");
|
||||
expect(languageAlternates("freelance")).toEqual({
|
||||
de: "/freelance",
|
||||
en: "/en/freelance",
|
||||
"x-default": "/freelance",
|
||||
});
|
||||
});
|
||||
|
||||
it("switches between the languages", () => {
|
||||
expect(switchPath("/freelance", "en")).toBe("/en/freelance");
|
||||
expect(switchPath("/en/freelance", "de")).toBe("/freelance");
|
||||
});
|
||||
|
||||
it("shows /freelance in German to a German browser", () => {
|
||||
expect(routeRequest({ pathname: "/freelance", ...german })).toEqual({
|
||||
kind: "rewrite",
|
||||
to: "/de/freelance",
|
||||
negotiated: true,
|
||||
});
|
||||
});
|
||||
|
||||
it("sends an English browser from /freelance to /en/freelance, not permanently", () => {
|
||||
expect(routeRequest({ pathname: "/freelance", ...english })).toEqual({
|
||||
kind: "redirect",
|
||||
to: "/en/freelance",
|
||||
permanent: false,
|
||||
negotiated: true,
|
||||
});
|
||||
});
|
||||
|
||||
it("shows /en/freelance to everyone instead of redirecting it onto itself", () => {
|
||||
expect(routeRequest({ pathname: "/en/freelance", ...german })).toEqual({
|
||||
kind: "rewrite",
|
||||
to: "/en/freelance",
|
||||
negotiated: false,
|
||||
});
|
||||
});
|
||||
|
||||
it("moves the internal address /de/freelance to /freelance", () => {
|
||||
expect(routeRequest({ pathname: "/de/freelance", ...german })).toEqual({
|
||||
kind: "redirect",
|
||||
to: "/freelance",
|
||||
permanent: true,
|
||||
negotiated: false,
|
||||
});
|
||||
});
|
||||
|
||||
it("is listed in the sitemap in both languages", () => {
|
||||
expect(
|
||||
sitemapEntries("https://example.com", ["freelance"]).map(
|
||||
(entry) => entry.url,
|
||||
),
|
||||
).toEqual([
|
||||
"https://example.com/freelance",
|
||||
"https://example.com/en/freelance",
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user