diff options
author | Marius Peter <marius.peter@tutanota.com> | 2025-02-01 19:24:32 +0100 |
---|---|---|
committer | Marius Peter <marius.peter@tutanota.com> | 2025-02-01 19:24:32 +0100 |
commit | 6e8e49ba49beeeb63e1e027fc23e8883a1185109 (patch) | |
tree | 6a816fc986c6650959087f88e7fd63997efe003c /lib/views/layouts.ml | |
parent | 19875b1503f6e890975e50bdd88853b6e4d0caf4 (diff) |
Reorganized everything.
Thank you DeepSeek!
Diffstat (limited to 'lib/views/layouts.ml')
-rw-r--r-- | lib/views/layouts.ml | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/lib/views/layouts.ml b/lib/views/layouts.ml deleted file mode 100644 index d9def3c..0000000 --- a/lib/views/layouts.ml +++ /dev/null @@ -1,45 +0,0 @@ -open Dream_html -open HTML - -let header = - div [] - [ - h1 [] [ txt "ogit" ]; - h2 [] [ txt "A mobile-friendly Git repository viewer" ]; - ] - -let topnav = - nav - [ id "top" ] - [ - ul [] - [ - li [] [ a [ href "/" ] [ txt "Home" ] ]; - li [] [ a [ href "/" ] [ txt "Refs" ] ]; - li [] [ a [ href "/" ] [ txt "Log" ] ]; - li [] [ a [ href "/" ] [ txt "Tree" ] ]; - li [] [ a [ href "/" ] [ txt "Commit" ] ]; - li [] [ a [ href "/" ] [ txt "Diff" ] ]; - ]; - ] - -let footer name = - let today = Unix.localtime (Unix.time ()) in - let year = string_of_int (today.Unix.tm_year + 1900) in - let space = " " in - let footer_text = String.concat space [ "©"; year; name ] in - footer [] [ txt "%s" footer_text ] - -let application ?(page_title = "ogit") ?(head_content = null []) ~main_content - () = - html [] - [ - head [] [ title [] "%s" page_title; head_content ]; - body [] - [ - header; - topnav; - div [ id "main" ] [ main_content ]; - footer "Marius PETER"; - ]; - ] |