diff options
Diffstat (limited to 'client/src/client.gleam')
| -rw-r--r-- | client/src/client.gleam | 56 |
1 files changed, 56 insertions, 0 deletions
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 +} |