diff --git a/AGENTS.md b/AGENTS.md index ffb5fa1..445aacf 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -19,6 +19,16 @@ preserve unrelated work, and follow [CONTRIBUTING.md](CONTRIBUTING.md). from a clean library checkout, use `python3 tools/vendor-library.py /path/to/TendUI` and commit all resulting metadata and vendor changes together. +## Repository identity + +- Present this repository as the source for **tendui.com**, with website-specific + README artwork and contributor instructions distinct from the component library. +- Public product, installation and source links must point to + `https://github.com/Tend-Stack/TendUI`. Reserve links to this repository for + clearly labeled website-maintainer instructions, issues and deployment setup. +- Route component and library API changes to TendUI; keep the README focused on + running, maintaining and contributing to this website. + ## Product rules - Use TendUI components and semantic HTML. Keep the public site usable without diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 32e278b..fcebebd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,10 +1,14 @@ # Contributing to TendUI-web -Thank you for helping improve TendUI. Start with a bug, documentation fix, -accessibility improvement or an issue labeled `good first issue` or `help wanted`. -Discuss new components, public API changes, dependencies and large refactors in an -issue before implementation. A proposal should explain the use case, native HTML -semantics, keyboard behavior, narrow-screen behavior and alternatives considered. +This repository maintains **tendui.com**, the documentation and examples website. +Start with a guide correction, navigation fix, website accessibility improvement +or an issue labeled `good first issue` or `help wanted`. + +For changes to components, semantic CSS, Go APIs or library behavior, contribute +to [TendUI](https://github.com/Tend-Stack/TendUI) instead. This website consumes +that library as a pinned dependency; do not edit its vendored copy here. +Discuss substantial website changes in an issue before implementation, including +keyboard behavior, narrow-screen behavior and the pages affected. ## Contribution terms: MIT + DCO diff --git a/README.md b/README.md index 5d3c553..1ae39f9 100644 --- a/README.md +++ b/README.md @@ -1,128 +1,72 @@ - - - Tend UI — Modern UI for Go - - -# The home of TendUI - -The documentation and examples website for [TendUI](https://github.com/Tend-Stack/TendUI): -beautiful interfaces with no frontend build pipeline. Pure CSS and semantic HTML -work with any stack; first-class Go and templ support embeds the stylesheet -inside your Go binary. - -The documentation composes TendUI’s typed `AppShell` and `Prose` components -with its embedded semantic stylesheet. Guide content uses Go HTML templates; -the landing page keeps its own hero styling. Every page, including the mounted -catalog and demos, renders one shared `SiteHeader` (`site_header.templ`) and -reads the same `tendui_theme` cookie, which defaults to dark. Catalogs and demos -share TendUI’s example handler through `site.HandlerWithOptions`. All assets are embedded. No Node, npm, JavaScript, -external fonts, tracking, database, or runtime downloads are required to build or -serve it. The test-only browser suite is separate from the shipped application. - -Documentation lives under `/docs`, the searchable 37-component reference under -`/catalog`, application examples under `/examples`, and native state/appearance -controls under `/playground`. The public canonical origin is https://tendui.com. - -The library and templ runtime are vendored at the exact revision recorded in -`library-version.json`. Docker builds use `GOPROXY=off` and require no module-registry access. To refresh from a clean library checkout, run -`python3 tools/vendor-library.py /path/to/TendUI`. This uses the local Go module -cache for already-downloaded dependencies, records a tag or exact pseudo-version, -and removes its temporary proxy and cache. Commit the resulting module metadata, -manifest, and vendor directory together. No local `replace` ships in the repo. - -[Visit tendui.com](https://tendui.com) · [Documentation](https://tendui.com/docs) · [Component catalog](https://tendui.com/catalog) · [Library source](https://github.com/Tend-Stack/TendUI) - -## At a glance - -| Surface | Purpose | + + tendui.com — Website source. Documentation, examples and playground. + + +# tendui.com · Website source + +> **Looking for the component library?** Go to **[TendUI →](https://github.com/Tend-Stack/TendUI)** for installation, components, CSS and library contributions. + +This repository builds and serves **[tendui.com](https://tendui.com)**: the public +documentation, component catalog, examples and playground for +[TendUI](https://github.com/Tend-Stack/TendUI). It is the website application; +it consumes a pinned release of the component library. + +[Visit the website](https://tendui.com) · [Read the guides](https://tendui.com/docs) · [Explore the catalog](https://tendui.com/catalog) + +## Work on the website + +Use this repository for guide content, website navigation, site styling, +metadata, accessibility and deployment. Report website issues here. For component +behavior, CSS tokens, Go APIs or new components, use the +[TendUI library repository](https://github.com/Tend-Stack/TendUI). + +| Website area | Where to work | | --- | --- | -| Documentation | Go/templ and HTML quickstarts, theming, accessibility and agent setup. | -| Catalog | Component previews and downloadable recipes. | -| Playground | Native controls for states, appearance and interactions. | -| Deployment | One Go binary with embedded assets and vendored dependencies. | +| Guides and navigation | `content/`, `docs.go`, `docs.templ` | +| Homepage and shared header | `landing.templ`, `site_header.templ` | +| Website styles and artwork | `static/` | +| Routing, assets and metadata | `main.go`, `assets.go` | +| Library version used by the site | `library-version.json`, `go.mod`, `go.sum`, `vendor/` | + +The catalog and runnable demos come from the library's example handler. Make +changes to those components in [TendUI](https://github.com/Tend-Stack/TendUI), +then update the website's pinned dependency. -## Run +## Run this site locally -Requires Go 1.26 or newer. Use a patched compiler for deployment. +Requires Go 1.26 or newer. Dependencies and generated templ output are committed; +normal builds need no Node.js, npm or template generation. ```sh go run . # Open http://localhost:8080 ``` -`PORT` defaults to `8080`. The server binds all interfaces, handles termination -signals gracefully, and exposes `GET /healthz` for health probes. Assets support -GET/HEAD and conditional requests. Unknown paths return 404. +`PORT` defaults to `8080`. Styles, images and guide content are embedded in the +website binary. No database or runtime asset downloads are required. ```sh go test -race ./... go vet ./... -CGO_ENABLED=0 go build -trimpath -o tendui-web . -./tendui-web -version ``` -## Tend deployment - -Connect `https://github.com/Tend-Stack/TendUI-web`, branch `main`, in Tend. -Select the repository-root `Dockerfile`, container port **8080**, and HTTP health -path **/healthz**. No secrets, volumes, or additional services are required. -Enable GitHub push deployments in Tend; this repository does not call a deploy -hook. Tend owns routing, TLS, the public domain, and deployment status. - -The image runs as a non-root user and contains only the static Go executable. -For a local container check: - -```sh -docker build --build-arg VERSION="$(git describe --tags --long --dirty --always)" -t tendui-web . -docker run --rm -p 8080:8080 tendui-web -``` - -Version lines use `YEAR.RELEASE.FIX`, initially `2026.1.0`; Git tags use `v2026.1.0`. -Release/development builds should pass `git describe --tags --long --dirty` as -`VERSION` once tags exist. Before the first tag, `--always` provides the commit ID. - -GitHub Actions tests the HTTP contract, runs vet, and builds the Dockerfile. -Tend may deploy independently of CI; check both statuses after publication. -The documentation and homepage include canonical metadata for tendui.com; -`/sitemap.xml` lists the primary documentation and example routes. - -## Scope - -The site includes the guides, component catalog, live previews, downloads, -examples, and playground. Sample mutations update bounded browser cookies and -do not create real accounts or projects. -Links point to the project repositories; access follows their GitHub visibility. -There is no mailing-list form or unimplemented sign-up action. - -MIT. See [LICENSE](LICENSE). - -The server adds `Cache-Control: no-transform` while preserving each route's cache -policy. This keeps proxies from rewriting versioned Go commands as email links -or injecting email-decoding scripts. Production smoke checks must inspect the -actual HTML through the public domain as well as the origin/container response. +Template authors use the generator version recorded in `go.mod`. Browser test +tooling is development-only; see [CONTRIBUTING.md](CONTRIBUTING.md). -For the fixed public host `tendui.com`, Tend terminates HTTPS before forwarding -HTTP to the container. The website adapts validated presentation URLs for the -shared demo handler and marks its cookies Secure. It preserves Origin-based -request protection and does not trust arbitrary forwarded headers. Localhost -HTTP development keeps its original behavior. +## Maintain and deploy -Documentation shell source is `docs.templ`; generated `docs_templ.go` is committed. -After editing the shell, use templ v0.3.1100 to run `templ generate -f docs.templ`. -Normal builds need only Go. Website styles use content-hashed URLs; the library -stylesheet URL is tied to the vendored revision. This prevents cached landing-page -CSS from being reused after a documentation deployment, even when an edge proxy -sets a longer browser cache lifetime. +[Website maintenance guide](docs/maintaining-website.md) covers the pinned library, +Docker/Tend deployment, health probes, version metadata, proxy behavior and cache +policy. The repository-root `Dockerfile` builds the website application. -## Contributing +## Contribute to the site -See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, review and MIT + DCO sign-off. -Report vulnerabilities privately using [SECURITY.md](SECURITY.md); community -participation follows [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md). +Read [CONTRIBUTING.md](CONTRIBUTING.md), [AGENTS.md](AGENTS.md) and the +[code of conduct](CODE_OF_CONDUCT.md). Website contributions use MIT + DCO; +report vulnerabilities privately through [SECURITY.md](SECURITY.md). -## Coding agents +For a project that **uses the component library**, start with +[TendUI](https://github.com/Tend-Stack/TendUI) and its +[application agent guide](https://github.com/Tend-Stack/TendUI/blob/main/docs/agents.md). -Repository contributors should read [AGENTS.md](AGENTS.md); `CLAUDE.md` imports -the same instructions for Claude Code. For applications using TendUI, see -[the coding-agent guide](https://tendui.com/docs/agents) and merge its suggested -section into your own project instructions. +[MIT license](LICENSE) · [Website artwork provenance](docs/brand/README.md) diff --git a/content/agents.html b/content/agents.html index 66f72d0..2c01b56 100644 --- a/content/agents.html +++ b/content/agents.html @@ -44,8 +44,7 @@

3. Give it a concrete task

Contributing to TendUI itself

-

Both repositories include a CLAUDE.md import of their own AGENTS.md. AI-assisted contributions follow MIT + DCO contribution rules: a human reviews, tests and authorizes their own sign-off.

+

The library repository includes a CLAUDE.md import of its AGENTS.md. AI-assisted contributions follow MIT + DCO contribution rules: a human reviews, tests and authorizes their own sign-off.

{{end}} diff --git a/docs/brand/README.md b/docs/brand/README.md index bba48a3..bee981a 100644 --- a/docs/brand/README.md +++ b/docs/brand/README.md @@ -1,9 +1,14 @@ -# TendUI website documentation artwork +# Website repository artwork -## README banners +[website-banner.svg](website-banner.svg) is an original vector composition for +this repository's README. Its browser-window layout and **WEBSITE SOURCE** label +identify **tendui.com**, distinct from the illustrated product banner in the +[TendUI component library](https://github.com/Tend-Stack/TendUI). -The light and dark README banners are copied unchanged from the owner-supplied -Tend UI Gopher Brand Kit. Source names, byte sizes and SHA-256 hashes are recorded -in [readme-banners.json](readme-banners.json). They are documentation assets and -are not embedded into the runtime stylesheet or website executable. The README -uses a `picture` element to follow the reader's preferred color scheme. +The banner uses the site's midnight and violet palette. It contains no external +images, fonts, scripts or remote resources. It scales without a raster download +and is documentation-only; it is not embedded in the website executable. + +[website-banner.json](website-banner.json) records its purpose, size and SHA-256. +The supplied product artwork used by the live site retains its separate +[asset provenance](../brand-assets.md). diff --git a/docs/brand/readme-banner-dark.png b/docs/brand/readme-banner-dark.png deleted file mode 100644 index ef92e1c..0000000 Binary files a/docs/brand/readme-banner-dark.png and /dev/null differ diff --git a/docs/brand/readme-banner-light.png b/docs/brand/readme-banner-light.png deleted file mode 100644 index 86ca331..0000000 Binary files a/docs/brand/readme-banner-light.png and /dev/null differ diff --git a/docs/brand/readme-banners.json b/docs/brand/readme-banners.json deleted file mode 100644 index ebee64d..0000000 --- a/docs/brand/readme-banners.json +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "file": "readme-banner-dark.png", - "source": "03_web_and_social/illustrated-header-dark-1800x420.png", - "processing": "Copied unchanged from the owner-supplied Tend UI Gopher Brand Kit", - "sha256": "abfccb9cfa2169c767a213eb8fd57c07fe18984d95f917ec1731941c89293eea", - "bytes": 129454 - }, - { - "file": "readme-banner-light.png", - "source": "03_web_and_social/illustrated-header-light-1600x400.png", - "processing": "Copied unchanged from the owner-supplied Tend UI Gopher Brand Kit", - "sha256": "7a3e7ecc43532cb70d2127efefe2ddb4d9174c0af377d9d94f7d5a9d7f70ecd3", - "bytes": 123912 - } -] diff --git a/docs/brand/website-banner.json b/docs/brand/website-banner.json new file mode 100644 index 0000000..7c685c8 --- /dev/null +++ b/docs/brand/website-banner.json @@ -0,0 +1,9 @@ +{ + "file": "website-banner.svg", + "type": "original vector composition", + "purpose": "Identify the tendui.com website repository separately from the component library", + "design": "Browser-window illustration and website-specific labels, using the established midnight and violet palette", + "external_assets": [], + "sha256": "7017b25b23b1a5653aabcc1e53d832035008640bf2935c2ad0665b58a10408c5", + "bytes": 3347 +} diff --git a/docs/brand/website-banner.svg b/docs/brand/website-banner.svg new file mode 100644 index 0000000..90478f7 --- /dev/null +++ b/docs/brand/website-banner.svg @@ -0,0 +1,46 @@ + + tendui.com — Website source + The documentation, examples and playground website. A browser window illustration distinguishes this repository from the TendUI component library. + + + + + + + + + + WEBSITE SOURCE + tendui.com + The place to explore TendUI. + + Documentation + Examples + Playground + Built with the TendUI component library. + + + + + + + tendui.com / docs + + ON THIS SITE + + Guides + Catalog + Examples + Playground + READ · TRY · BUILD + A guide to getting started. + + + + Documentation + Find your starting point + + Live examples + See the pieces together + + diff --git a/docs/maintaining-website.md b/docs/maintaining-website.md new file mode 100644 index 0000000..ed06eca --- /dev/null +++ b/docs/maintaining-website.md @@ -0,0 +1,103 @@ +# Maintaining tendui.com + +These instructions are for contributors to the **TendUI website**. For the +component library, use [TendUI](https://github.com/Tend-Stack/TendUI). + +[Back to the website README](../README.md) + +## How the site is assembled + +The documentation composes the library's `AppShell` and `Prose` components. +Guide content uses Go HTML templates. The homepage, guides, catalog and demos +share `site_header.templ` and the `tendui_theme` cookie, which defaults to dark. +The catalog and demos use the library's `site.HandlerWithOptions` handler. +All site assets are embedded; browser test tooling is development-only. + +## Updating the library dependency + +`library-version.json`, `go.mod`, `go.sum` and `vendor/` identify one exact +library release. From a clean library checkout, run: + +```sh +python3 tools/vendor-library.py /path/to/TendUI +``` + +The helper uses already-downloaded dependencies, records the version and commit, +and removes its temporary proxy and cache. Commit the resulting manifest, +module metadata and vendor directory together. Never edit vendored library code +or ship a local `replace` directive. Component changes belong in +[TendUI](https://github.com/Tend-Stack/TendUI). + +## Run + +Requires Go 1.26 or newer. Use a patched compiler for deployment. + +```sh +go run . +# Open http://localhost:8080 +``` + +`PORT` defaults to `8080`. The server binds all interfaces, handles termination +signals gracefully, and exposes `GET /healthz` for health probes. Assets support +GET/HEAD and conditional requests. Unknown paths return 404. + +```sh +go test -race ./... +go vet ./... +CGO_ENABLED=0 go build -trimpath -o tendui-web . +./tendui-web -version +``` + +## Tend deployment + +Connect `https://github.com/Tend-Stack/TendUI-web`, branch `main`, in Tend. +Select the repository-root `Dockerfile`, container port **8080**, and HTTP health +path **/healthz**. No secrets, volumes, or additional services are required. +Enable GitHub push deployments in Tend; this repository does not call a deploy +hook. Tend owns routing, TLS, the public domain, and deployment status. + +The image runs as a non-root user and contains only the static Go executable. +For a local container check: + +```sh +docker build --build-arg VERSION="$(git describe --tags --long --dirty --always)" -t tendui-web . +docker run --rm -p 8080:8080 tendui-web +``` + +Version lines use `YEAR.RELEASE.FIX`, initially `2026.1.0`; Git tags use `v2026.1.0`. +Release/development builds should pass `git describe --tags --long --dirty` as +`VERSION` once tags exist. Before the first tag, `--always` provides the commit ID. + +GitHub Actions tests the HTTP contract, runs vet, and builds the Dockerfile. +Tend may deploy independently of CI; check both statuses after publication. +The documentation and homepage include canonical metadata for tendui.com; +`/sitemap.xml` lists the primary documentation and example routes. + +## Scope + +The site includes the guides, component catalog, live previews, downloads, +examples, and playground. Sample mutations update bounded browser cookies and +do not create real accounts or projects. +Public product and source links point to the [TendUI library](https://github.com/Tend-Stack/TendUI). +There is no mailing-list form or unimplemented sign-up action. + +MIT. See [LICENSE](../LICENSE). + +The server adds `Cache-Control: no-transform` while preserving each route's cache +policy. This keeps proxies from rewriting versioned Go commands as email links +or injecting email-decoding scripts. Production smoke checks must inspect the +actual HTML through the public domain as well as the origin/container response. + +For the fixed public host `tendui.com`, Tend terminates HTTPS before forwarding +HTTP to the container. The website adapts validated presentation URLs for the +shared demo handler and marks its cookies Secure. It preserves Origin-based +request protection and does not trust arbitrary forwarded headers. Localhost +HTTP development keeps its original behavior. + +Documentation shell source is `docs.templ`; generated `docs_templ.go` is committed. +After editing the shell, use templ v0.3.1100 to run `templ generate -f docs.templ`. +Normal builds need only Go. Website styles use content-hashed URLs; the library +stylesheet URL is tied to the vendored revision. This prevents cached landing-page +CSS from being reused after a documentation deployment, even when an edge proxy +sets a longer browser cache lifetime. + diff --git a/landing.templ b/landing.templ index 2a15bf6..5c0ff8c 100644 --- a/landing.templ +++ b/landing.templ @@ -72,7 +72,7 @@ templ landingPage(theme string) {
03

Make it yours.

Themes, spacing, typography, and a little CSS motion. Your choices.

- + diff --git a/landing_templ.go b/landing_templ.go index 5e9914a..aab42c6 100644 --- a/landing_templ.go +++ b/landing_templ.go @@ -118,7 +118,7 @@ func landingPage(theme string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "\" alt=\"TendUI’s cloaked gopher holding a UI card\" width=\"144\" height=\"144\">
A LITTLE CHARACTER.

A lot less setup.

Made for curious Go developers.
✳Made with care

LESS SETUP. MORE MAKING.

A little structure.
A lot of possibility.

Room to build something that feels like you.

Simple by nature +

This disclosure is native HTML. Just a browser doing what it does best.

↳ One binary. All together.
HTML + CSS + GOAn interface study
01

Go all the way.

Styles embedded in your binary. No asset pipeline to maintain.

02

Let HTML be HTML.

Semantic elements, typed templ components, and native interactions.

03

Make it yours.

Themes, spacing, typography, and a little CSS motion. Your choices.

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "\" alt=\"TendUI’s cloaked gopher holding a UI card\" width=\"144\" height=\"144\">
A LITTLE CHARACTER.

A lot less setup.

Made for curious Go developers.
✳Made with care

LESS SETUP. MORE MAKING.

A little structure.
A lot of possibility.

Room to build something that feels like you.

Simple by nature +

This disclosure is native HTML. Just a browser doing what it does best.

↳ One binary. All together.
HTML + CSS + GOAn interface study
01

Go all the way.

Styles embedded in your binary. No asset pipeline to maintain.

02

Let HTML be HTML.

Semantic elements, typed templ components, and native interactions.

03

Make it yours.

Themes, spacing, typography, and a little CSS motion. Your choices.

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }