Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aslilac/nakai
An HTML generation library for building web apps with Gleam ✨
https://github.com/aslilac/nakai
Last synced: about 2 months ago
JSON representation
An HTML generation library for building web apps with Gleam ✨
- Host: GitHub
- URL: https://github.com/aslilac/nakai
- Owner: aslilac
- License: mit
- Created: 2022-02-08T02:28:04.000Z (almost 3 years ago)
- Default Branch: trunk
- Last Pushed: 2024-11-24T02:30:19.000Z (about 2 months ago)
- Last Synced: 2024-11-24T03:20:41.866Z (about 2 months ago)
- Language: Gleam
- Homepage: https://mckay.la/nakai
- Size: 145 KB
- Stars: 116
- Watchers: 3
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/funding.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
![Nakai](https://cdn.mckayla.cloud/-/2d8051c1ce2f4fbd91eaf07df5661e25/Nakai-Banner.svg)
## Getting started
```sh
gleam add nakai
``````gleam
import nakai
import nakai/html.{type Node}
import nakai/attr.{type Attr}pub fn header(attrs: List(Attr), text: String) -> Node {
let attrs = [attr.class("text-xl weight-400"), ..attrs]
html.h1_text(attrs, text)
}pub fn app() -> String {
header([], "Hello, from Nakai!")
|> nakai.to_string()
}
```