From 78121f4ef2a2f8e0783a22554a01cf2efc409e6a Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Sun, 22 Jun 2025 17:20:41 +0200 Subject: Added bullma css template --- bin/main.ml | 50 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 12 deletions(-) (limited to 'bin/main.ml') diff --git a/bin/main.ml b/bin/main.ml index f1f0cfd..79593c9 100644 --- a/bin/main.ml +++ b/bin/main.ml @@ -22,19 +22,38 @@ let hello : Dream.handler = fun _ -> Dream.html {| + + + -

Hello!

-
- - - -
-
+
+
+
+
+
+

+ Dashboard +

+
+ +
+
+
+

Hello!

+
+ + + +
+
+
|} @@ -44,11 +63,18 @@ let js_assets _root path _request = | None -> Dream.empty `Not_Found | Some asset -> Dream.respond asset +let css_assets _root path _request = + (* This module is automatically generated — see the dune file to see the rule *) + match CssAssets.read path with + | None -> Dream.empty `Not_Found + | Some asset -> Dream.respond asset + let () = Dream.run @@ Dream.logger @@ Dream.router [ Dream.get "/js/**" (Dream.static ~loader:js_assets ""); + Dream.get "/css/**" (Dream.static ~loader:css_assets ""); Dream.get "/" hello; route; ] -- cgit v1.2.3