diff --git a/public/favicon.svg b/public/favicon.svg new file mode 100644 index 0000000..03eb98c --- /dev/null +++ b/public/favicon.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/assets/logo.svg b/src/assets/logo.svg new file mode 100644 index 0000000..03eb98c --- /dev/null +++ b/src/assets/logo.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/components/Footer.astro b/src/components/Footer.astro new file mode 100644 index 0000000..ea0ce10 --- /dev/null +++ b/src/components/Footer.astro @@ -0,0 +1,182 @@ +--- +import Icon from './Icon.astro'; + +// A footer of its own, not a breadcrumb back to a parent site. This listing is a separate process +// with its own review loop and its own deploy day, so it closes itself rather than handing the +// reader off mid-sentence. +const linkColumns = [ + { + heading: 'This listing', + links: [ + { label: 'Add your plugin', href: '#contribute', external: false }, + { + label: 'Source', + href: 'https://github.com/Expressive-Tea/green-tea-marketplace', + external: true, + icon: 'github' as const, + }, + ], + }, + { + heading: 'Green Tea', + links: [ + { label: 'Site', href: 'https://green-tea.expressive-tea.io', external: true }, + { label: 'Docs', href: 'https://green-tea.expressive-tea.io/docs', external: true }, + { label: 'npm', href: 'https://www.npmjs.com/package/@green-tea/core', external: true, icon: 'npm' as const }, + { label: 'JSR', href: 'https://jsr.io/@green-tea/core', external: true, icon: 'jsr' as const }, + ], + }, +]; + +const year = new Date().getFullYear(); +--- + + + + diff --git a/src/components/Header.astro b/src/components/Header.astro new file mode 100644 index 0000000..c1c99a3 --- /dev/null +++ b/src/components/Header.astro @@ -0,0 +1,206 @@ +--- +import logoUrl from '../assets/logo.svg?url'; +import Icon from './Icon.astro'; + +// This is its own site, not a page of green-tea's. The wordmark says so: the family name, then +// what this one is. The logo links out to green-tea rather than to `/`, because a reader who +// clicks a brand mark is asking for the project, and the project lives elsewhere. +const navLinks = [ + { label: 'Add your plugin', href: '#contribute', external: false }, + { label: 'Docs', href: 'https://green-tea.expressive-tea.io/docs', external: true }, + { label: 'green-tea', href: 'https://green-tea.expressive-tea.io', external: true }, + { + label: 'GitHub', + href: 'https://github.com/Expressive-Tea/green-tea-marketplace', + external: true, + icon: 'github' as const, + }, +]; +--- + + + + diff --git a/src/components/Icon.astro b/src/components/Icon.astro new file mode 100644 index 0000000..6d4a5fd --- /dev/null +++ b/src/components/Icon.astro @@ -0,0 +1,49 @@ +--- +// Inline marks for the three places a package of ours can be reached. Three icons did not +// justify an icon library: `astro-icon` and friends pull a resolver and a set to ship what +// fits in this file, and every one of them ends up inlining the same paths anyway. +// +// `currentColor` rather than a fixed fill, so a mark takes the colour of the link it sits in +// and needs no separate rule per surface โ€” the header, the hero's ghost buttons and the +// footer all tint it differently today. +// +// The SVG is `aria-hidden`: the accessible name belongs to the anchor, which knows where it +// goes. A `` here would announce "GitHub" twice on a link already labelled GitHub. +interface Props { + name: 'github' | 'npm' | 'jsr'; + size?: number; + class?: string; +} + +const { name, size = 18, class: className } = Astro.props; + +// Optical sizing, not geometric. GitHub and npm fill their 24ร—24 box; JSR's wordmark is wide +// and short and covers about half its height, so at an equal `size` it reads as the small one +// of the three. The multiplier matches apparent weight, which is what a row of marks is judged +// on โ€” nobody measures them, they just notice one looks wrong. +const scale: Record<Props['name'], number> = { github: 1, npm: 1, jsr: 1.4 }; +const box = Math.round(size * scale[name]); + +// The marks are the official ones, taken from simple-icons rather than redrawn. Hand-drawn +// approximations of npm and JSR were tried first and rendered as illegible shapes: a +// third-party mark is either theirs or it is noise. +const paths: Record<Props['name'], string> = { + github: + 'M12 .5C5.37.5 0 5.87 0 12.5c0 5.3 3.44 9.8 8.21 11.39.6.11.82-.26.82-.58 0-.29-.01-1.24-.02-2.25-3.34.73-4.04-1.42-4.04-1.42-.55-1.39-1.34-1.76-1.34-1.76-1.09-.75.08-.73.08-.73 1.2.08 1.84 1.24 1.84 1.24 1.07 1.83 2.81 1.3 3.5.99.11-.78.42-1.3.76-1.6-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.13-.3-.54-1.52.11-3.18 0 0 1.01-.32 3.3 1.23a11.5 11.5 0 0 1 6.01 0c2.29-1.55 3.3-1.23 3.3-1.23.65 1.66.24 2.88.12 3.18.77.84 1.23 1.91 1.23 3.22 0 4.61-2.8 5.62-5.48 5.92.43.37.81 1.1.81 2.22 0 1.6-.01 2.9-.01 3.29 0 .32.21.7.82.58A12 12 0 0 0 24 12.5C24 5.87 18.63.5 12 .5Z', + npm: 'M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z', + // the others rather than carrying its own viewBox. + jsr: 'M3.692 5.538v3.693H0v7.384h7.385v1.847h12.923v-3.693H24V7.385h-7.385V5.538Zm1.846 1.847h1.847v7.384H1.846v-3.692h1.846v1.846h1.846zm3.693 0h5.538V9.23h-3.692v1.846h3.692v5.538H9.231V14.77h3.692v-1.846H9.231Zm7.384 1.846h5.539v3.692h-1.846v-1.846h-1.846v5.538h-1.847z', +}; +--- + +<svg + class={className} + width={box} + height={box} + viewBox="0 0 24 24" + fill="currentColor" + aria-hidden="true" + focusable="false" +> + <path d={paths[name]} /> +</svg> diff --git a/src/pages/index.astro b/src/pages/index.astro index 0762254..a5ef39c 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -3,6 +3,8 @@ import { getCollection } from 'astro:content'; import { readEntry } from '../../scripts/registry.mjs'; // Remove this import together with scripts/preview.mjs once the seed plugins are published. import { PREVIEW } from '../../scripts/preview.mjs'; +import Header from '../components/Header.astro'; +import Footer from '../components/Footer.astro'; import PluginCard from '../components/PluginCard.astro'; import '../styles/global.css'; @@ -35,41 +37,64 @@ plugins.sort((a, b) => a.name.localeCompare(b.name)); <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" /> - <title>green-tea plugins + + Green Tea. plugins -
-
-

green-tea plugins

-

- A plugin is a named object that adds steps and providers to your graph. It imports green-tea - as types only, so installing one never pulls a second copy of core. -

-

- - Add your plugin → - +

+ +
+
+

Plugins

+

+ A plugin is a named object that adds steps and providers to your graph. It imports + green-tea as types only, so installing one never pulls a second copy of core.

Everything here needs @green-tea/core@26.9.0-beta.2 or newer. That is the - release where a plugin became { name, mount } and app.boot() - went public; on anything older these will not mount. + release where a plugin became { name, mount } and + app.boot() went public; on anything older these will not mount.

-
+ -
- {plugins.map((plugin) => )} -
+
+
+ {plugins.map((plugin) => )} +
+
- -
+ +
npm: green-tea-foo            # at least one of npm / jsr
+jsr: "@acme/green-tea-foo"
+repo: https://github.com/acme/green-tea-foo
+description: "One sentence, 20โ€“200 characters."
+ +

+ A check runs against npm and JSR: the package has to exist, depend on + @green-tea/core, and declare at least one runtime. Then a person reads it โ€” + that it really is a factory returning { name, mount }, and that its + README lists all four runtimes with a reason beside each one it does not support. +

+

+ Merged entries go live on the next Friday cut. +

+

+ + Open the listing on GitHub → + +

+ + + +