From cb8a44d128f6205ba7811db4698ebcadd989205c Mon Sep 17 00:00:00 2001 From: Hayleigh Thompson Date: Sun, 20 Aug 2023 14:16:16 +0100 Subject: :sparkles: Scaffold docs site project. --- docs/src/app.gleam | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 docs/src/app.gleam (limited to 'docs/src/app.gleam') 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!")])]) +} -- cgit v1.2.3