No description
Find a file
Snider 6e254de9ba
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Fix locale forwarding for translators
2026-04-15 03:17:19 +01:00
.forgejo/workflows fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
.github/workflows fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
cmd fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
codegen fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
docs fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
specs fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
.editorconfig fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
.gitignore fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
.golangci.yml fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
bench_test.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
CLAUDE.md fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
context.go Fix locale forwarding for translators 2026-04-15 03:17:19 +01:00
context_test.go Fix locale forwarding for translators 2026-04-15 03:17:19 +01:00
CONTRIBUTING.md fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
doc.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
edge_test.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
go.mod fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
go.sum fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
go.work fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
integration_test.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
layout.go fix(html): stabilize nested layout block ids 2026-04-15 03:11:19 +01:00
layout_test.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
Makefile fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
node.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
node_test.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
path.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
path_test.go fix(html): stabilize nested layout block ids 2026-04-15 03:11:19 +01:00
pipeline.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
pipeline_test.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
README.md fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
render.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
render_test.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
responsive.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
responsive_test.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
SESSION-BRIEF.md fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
test_helpers_test.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
text_builder_default.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
text_builder_js.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
text_translate.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
text_translate_args.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
text_translate_default.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00
text_translate_js.go fix(html): restore full tree and stabilize nested layout block ids 2026-04-15 03:11:36 +01:00

Go Reference License: EUPL-1.2 Go Version

go-html

HLCRF DOM compositor with grammar pipeline integration for server-side HTML generation and optional WASM client rendering. Provides a type-safe node tree (El, Text, Raw, If, Each, Switch, Entitled, AriaLabel, AltText, TabIndex, AutoFocus, Role), a five-slot Header/Left/Content/Right/Footer layout compositor with deterministic data-block path IDs and ARIA roles, a responsive multi-variant wrapper, a server-side grammar pipeline (StripTags, GrammarImprint via go-i18n reversal, CompareVariants), a build-time Web Component codegen CLI with optional TypeScript declarations, and a WASM module (2.90 MB raw, 842 KB gzip) exposing renderToString().

Module: dappco.re/go/core/html Licence: EUPL-1.2 Language: Go 1.26

Quick Start

import html "dappco.re/go/core/html"

page := html.NewLayout("HCF").
    H(html.El("nav", html.Text("i18n.label.navigation"))).
    C(html.El("main",
        html.El("h1", html.Text("i18n.label.welcome")),
        html.Each(items, func(item Item) html.Node {
            return html.El("li", html.Text(item.Name))
        }),
    )).
    F(html.El("footer", html.Text("i18n.label.copyright")))

rendered := page.Render(html.NewContext("en-GB"))

Documentation

  • Architecture — node interface, HLCRF layout, responsive compositor, grammar pipeline, WASM module, codegen CLI
  • Development Guide — building, testing, WASM build, server/client split rules
  • Project History — completed phases and known limitations

Build & Test

go test ./...
go test -bench . ./...
GOOS=js GOARCH=wasm go build -ldflags="-s -w" -o gohtml.wasm ./cmd/wasm/
go build ./...

Licence

European Union Public Licence 1.2 — see LICENCE for details.