diff --git a/package-lock.json b/package-lock.json index 89dbd84..54b8957 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@addiscorp/kit", - "version": "0.2.3", + "version": "0.2.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@addiscorp/kit", - "version": "0.2.3", + "version": "0.2.4", "license": "Apache-2.0", "devDependencies": { "@types/react": "19.2.7", diff --git a/package.json b/package.json index 14ce12e..15d3d11 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@addiscorp/kit", - "version": "0.2.3", + "version": "0.2.4", "description": "The header, footer, theme and tool-site layout every Addis site shares, in each project's own brand colours.", "license": "Apache-2.0", "type": "module", diff --git a/src/footer/index.tsx b/src/footer/index.tsx index cc6c5d7..1fd9821 100644 --- a/src/footer/index.tsx +++ b/src/footer/index.tsx @@ -20,9 +20,11 @@ export type FooterProps = { year?: number; /** Anything else for the end of the footer, before the theme switch. */ children?: ReactNode; + /** A small line under the footer row, e.g. trademark notices. */ + note?: ReactNode; }; -export function Footer({ site, owner = ADDIS, year = new Date().getFullYear(), children }: FooterProps) { +export function Footer({ site, owner = ADDIS, year = new Date().getFullYear(), children, note }: FooterProps) { return ( ); } diff --git a/src/kit.css b/src/kit.css index 35d7e3d..b1a2deb 100644 --- a/src/kit.css +++ b/src/kit.css @@ -108,6 +108,7 @@ .ak-credit { display: inline-flex; align-items: center; gap: 8px; color: var(--ak-ink); text-decoration: none; } .ak-credit img, .ak-owner-mark { width: 32px; height: 32px; border-radius: 50%; } .ak-foot-end { display: inline-flex; align-items: center; gap: 12px; } +.ak-foot-note { flex-basis: 100%; margin: 0; font-size: 11px; line-height: 1.6; color: var(--ak-soft); opacity: .8; } /* The theme switch */ .ak-theme-toggle { box-sizing: border-box; border: 0; background: transparent; border-radius: 4px; color: inherit; cursor: pointer; display: inline-flex; height: 32px; width: 32px; align-items: center; justify-content: center; padding: 8px; } diff --git a/src/tool/index.tsx b/src/tool/index.tsx index 8d3087e..c096ca0 100644 --- a/src/tool/index.tsx +++ b/src/tool/index.tsx @@ -7,9 +7,9 @@ import type { LinkComponent } from '../header/index.js'; import { Footer } from '../footer/index.js'; import { CopyButton } from './copy.js'; import { MARKS } from './marks.js'; -import { TOOLS, toolInfo, type ToolId } from './tools.js'; +import { TOOLS, toolInfo, toolName, type ToolId } from './tools.js'; -export { TOOLS, toolInfo, type ToolId, type ToolInfo } from './tools.js'; +export { TOOLS, toolInfo, toolName, type ToolId, type ToolInfo } from './tools.js'; export { MARKS } from './marks.js'; export { CopyButton } from './copy.js'; @@ -30,12 +30,14 @@ export function Mark({ tool, size = 26 }: { tool: ToolId; size?: number }) { export type HeaderLink = { label: string; href: string }; /** Everything a tool site shows sits inside this: it sets the tool's colours, the header and the footer. */ -export function ToolSite({ tool, home = '/', docs = '/docs/', links = [], Link = PlainLink, children }: { +export function ToolSite({ tool, home = '/', docs = '/docs/', links = [], footnote, Link = PlainLink, children }: { tool: ToolId; home?: string; docs?: string; /** More header links, after docs, for what only this tool has. */ links?: HeaderLink[]; + /** A small line under the footer, e.g. trademark notices. */ + footnote?: ReactNode; Link?: LinkComponent; children: ReactNode; }) { @@ -43,7 +45,7 @@ export function ToolSite({ tool, home = '/', docs = '/docs/', links = [], Link =