diff --git a/changelog.d/added-595-footer-cncf-sandbox-notice.md b/changelog.d/added-595-footer-cncf-sandbox-notice.md new file mode 100644 index 0000000..9096e14 --- /dev/null +++ b/changelog.d/added-595-footer-cncf-sandbox-notice.md @@ -0,0 +1,2 @@ +- Site footer now carries the LF/CNCF Sandbox notice, with the Apache 2.0 licence statement and security contact + (hivecommons/docs#595). diff --git a/src/__tests__/DocsFooter.behavior.test.tsx b/src/__tests__/DocsFooter.behavior.test.tsx index 2b83839..f989901 100644 --- a/src/__tests__/DocsFooter.behavior.test.tsx +++ b/src/__tests__/DocsFooter.behavior.test.tsx @@ -83,7 +83,27 @@ describe("DocsFooter content", () => { expect(screen.getByRole("heading", { name: heading })).toBeTruthy(); } expect( - screen.getByText(new RegExp(`© ${new Date().getFullYear()} Hive Commons`)) + screen.getByText( + new RegExp( + `© ${new Date().getFullYear()} The Linux Foundation / The Hive Commons authors` + ) + ) + ).toBeTruthy(); + expect( + screen.getByText(/Cloud Native Computing Foundation sandbox project/) + ).toBeTruthy(); + expect( + screen + .getByRole("link", { name: "Trademark Usage page" }) + .getAttribute("href") + ).toBe("https://www.linuxfoundation.org/trademark-usage"); + expect( + screen.getByText( + /Code is licensed under Apache 2\.0\. Security contact: security@hivecommons\.dev\./ + ) + ).toBeTruthy(); + expect( + screen.getByRole("img", { name: "Cloud Native Computing Foundation" }) ).toBeTruthy(); }); @@ -249,14 +269,14 @@ describe("DocsFooter back-to-top button", () => { describe("DocsFooter theming", () => { it("uses the dark text classes when resolvedTheme is dark", () => { render(); - const copyright = screen.getByText(/© \d{4} Hive Commons/); + const copyright = screen.getByText(/© \d{4} The Linux Foundation/); expect(copyright.className).toContain("text-ink-3"); }); it("uses the light text classes when resolvedTheme is light", () => { resolvedTheme = "light"; render(); - const copyright = screen.getByText(/© \d{4} Hive Commons/); + const copyright = screen.getByText(/© \d{4} The Linux Foundation/); expect(copyright.className).toContain("text-ink-2"); }); }); diff --git a/src/components/docs/DocsFooter.tsx b/src/components/docs/DocsFooter.tsx index dc08a2d..f1a5ddd 100644 --- a/src/components/docs/DocsFooter.tsx +++ b/src/components/docs/DocsFooter.tsx @@ -614,17 +614,53 @@ export default function Footer() {
-
- {/* Left side - copyright */} -

- © {new Date().getFullYear()} Hive Commons. All rights reserved. Apache 2.0 Licence -

+
+ {/* Left side - copyright and CNCF info */} +
+
+

+ © {new Date().getFullYear()} The Linux Foundation / The Hive Commons authors. Code is licensed under Apache 2.0. Security contact: security@hivecommons.dev. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our{" "} + + Trademark Usage page + + . +

+

+ We are a Cloud Native Computing Foundation sandbox project. +

+
+
+ + Hosted by: + + Cloud Native Computing Foundation +
+
{/* Right side - policy links. These pages are not published on the docs site, so point at the canonical files on GitHub. */} -
+
{POLICY_LINKS.map(link => (