feat: add privacy, terms, and cookies pages

Footer and login legal links were stubs. Point them at real marketing
pages that follow the Figma content-page template.
This commit is contained in:
adilallo
2026-08-17 11:15:04 -06:00
parent 99419915d7
commit 0167b03231
16 changed files with 634 additions and 9 deletions
+31
View File
@@ -0,0 +1,31 @@
import { describe, expect, it } from "vitest";
import {
buildLegalSyntheticPost,
legalPathForSlug,
} from "../../lib/legalSyntheticPost";
describe("legalSyntheticPost", () => {
it("maps slugs to public paths", () => {
expect(legalPathForSlug("privacy")).toBe("/privacy");
expect(legalPathForSlug("terms")).toBe("/terms");
expect(legalPathForSlug("cookies")).toBe("/cookies");
});
it("builds a guide-shaped post from page messages", () => {
const post = buildLegalSyntheticPost("privacy", {
banner: {
title: "Privacy Policy",
description: "How we handle information.",
author: "Media Economies Design Lab",
date: "2026-08-15",
},
updated: "Last updated August 15, 2026.",
intro: ["Hello."],
sections: [{ heading: "What we collect", paragraphs: ["Email."] }],
});
expect(post.slug).toBe("__legal__:privacy");
expect(post.frontmatter.title).toBe("Privacy Policy");
expect(post.filePath).toBe("messages/en/pages/privacy.json");
});
});