From efeff94b550651ab8f134e705b07b80c1c8faeba Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sat, 27 Jul 2024 19:03:49 -0700 Subject: feat: initial development build --- client/src/client.gleam | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 client/src/client.gleam (limited to 'client/src') diff --git a/client/src/client.gleam b/client/src/client.gleam new file mode 100644 index 0000000..f685665 --- /dev/null +++ b/client/src/client.gleam @@ -0,0 +1,56 @@ +import gleam/list +import lustre +import lustre/attribute +import lustre/element/html +import lustre/ui + +pub fn main() { + let categories = ["All", "Anime", "Manga", "Light Novels"] + let app = + lustre.element( + ui.cluster([], [ + html.a([attribute.href("/")], [html.text("yuna.news")]), + html.div([], [ + html.a([attribute.href("/?search=")], [html.text("Search")]), + html.a([attribute.href("/followings")], [html.text("Following")]), + html.a([attribute.href("/settings")], [html.text("Settings")]), + ]), + html.div([], [ + html.div([], [ + html.div([], [ + html.a([attribute.href("/?period=today&before=")], [ + html.text("Today"), + ]), + html.a([attribute.href("/?period=yesterday&before=&after=")], [ + html.text("Yesterday"), + ]), + ]), + html.div([], [ + html.a([attribute.href("/?view=GroupView")], [ + html.text("GroupView"), + ]), + html.a([attribute.href("/?view=ListCompactView")], [ + html.text("ListCompactView"), + ]), + html.a([attribute.href("/?view=ListExpandedView")], [ + html.text("ListExpandedView"), + ]), + ]), + ]), + html.div( + [], + categories + |> list.map(fn(category) { + html.a([attribute.href("/?folder=" <> category)], [ + html.text(category), + ]) + }), + ), + ]), + ]), + ) + + let assert Ok(_) = lustre.start(app, "#app", Nil) + + Nil +} -- cgit v1.2.3