@@ -0,0 +1,113 @@
3+A minimalist layout language inspired by [elm-ui](https://package.elm-lang.org/packages/mdgriffith/elm-ui/latest/) that compiles to static HTML.
5+`@` means structure. Bare lines mean content. No CSS required.
14+ @el [padding 20, background white, rounded 8, border 1 #e5e7eb, hover:border 1 $primary, transition all 0.15s ease]
18+@column [max-width 800, center-x, padding 40, spacing 20]
19+ @text [bold, size 32] Hello
22+ Built with {@text [bold, color $primary] htmlang}.
24+ @row [wrap, spacing 10]
26+ Write layouts without CSS
28+ Compiles to a single HTML file
31+Compiles to a self-contained `.html` file with flexbox layout and generated CSS classes. No JavaScript, no external dependencies.
36+cargo install --path .
42+htmlang page.hl # writes page.html
50+|--------------|------------------------------|
51+| `@row` | Horizontal flex layout |
52+| `@column` | Vertical flex layout |
53+| `@el` | Generic container |
54+| `@text` | Styled inline text |
55+| `@paragraph` | Flowing text with inline elements |
58+| `@raw` | Verbatim HTML escape hatch |
63+@row [spacing 20] -- gap between children
64+@el [padding 20] -- uniform padding (also padding-x, padding-y)
65+@el [width fill] -- take remaining space (also width 200, width shrink)
66+@el [center-x] -- center horizontally (also align-left, align-right)
72+@el [background #3b82f6, color white, rounded 8, border 1 #e5e7eb]
73+@text [bold, italic, underline, size 18, font Inter]
74+@el [opacity 0.5, cursor pointer, transition all 0.15s ease]
79+Prefix any style attribute with `hover:`, `active:`, or `focus:`:
82+@el [background #3b82f6, hover:background #2563eb, active:background #1d4ed8]
85+### Variables and defines
88+@let primary #3b82f6 -- simple variable, used as $primary
89+@define card [padding 20, rounded 8] -- attribute bundle, used as [$card]
96+ @el [padding 12, background $primary, rounded 8]
97+ @text [color white, bold] $label
98+ @children -- slot for caller's children
100+@button [label Click me]
106+- `{@text [bold] inline}` elements in text
107+- `@el [attrs] > @link url` single-child chaining
108+- `[padding 20]` bare attributes as implicit `@el`
109+- `@raw """..."""` for embedding arbitrary HTML/CSS/JS
113+See [DESIGN.md](DESIGN.md) for the full language specification.