diff options
author | Hayleigh Thompson <me@hayleigh.dev> | 2023-08-20 14:16:16 +0100 |
---|---|---|
committer | Hayleigh Thompson <me@hayleigh.dev> | 2023-08-20 14:16:16 +0100 |
commit | cb8a44d128f6205ba7811db4698ebcadd989205c (patch) | |
tree | b6621a332f8e859e0bf5c4ae4696fa20292ded37 /docs/src | |
parent | 443711d2f6c3d93ac796c625f9071f7c89b67f36 (diff) | |
download | lustre-cb8a44d128f6205ba7811db4698ebcadd989205c.tar.gz lustre-cb8a44d128f6205ba7811db4698ebcadd989205c.zip |
:sparkles: Scaffold docs site project.
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/app.gleam | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/docs/src/app.gleam b/docs/src/app.gleam new file mode 100644 index 0000000..8d72ed9 --- /dev/null +++ b/docs/src/app.gleam @@ -0,0 +1,41 @@ +// IMPORTS --------------------------------------------------------------------- + +import lustre +import lustre/attribute +import lustre/element.{Element} +import lustre/element/html + +// MAIN ------------------------------------------------------------------------ + +pub fn main() -> fn(Msg) -> Nil { + let app = lustre.simple(init, update, view) + let assert Ok(dispatch) = lustre.start(app, "body", Nil) + + dispatch +} + +// MODEL ----------------------------------------------------------------------- + +type Model { + Model +} + +fn init(_) -> Model { + Model +} + +// UPDATE ---------------------------------------------------------------------- + +pub type Msg { + None +} + +fn update(model: Model, msg: Msg) -> Model { + model +} + +// VIEW ------------------------------------------------------------------------ + +fn view(model: Model) -> Element(Msg) { + html.body([], [html.h1([], [element.text("Hello, world!")])]) +} |