diff options
Diffstat (limited to 'lib/views.ml')
-rw-r--r-- | lib/views.ml | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/views.ml b/lib/views.ml index 33654ea..283d8d9 100644 --- a/lib/views.ml +++ b/lib/views.ml @@ -98,7 +98,7 @@ let root () = module Repo = struct let page_title repo = Printf.sprintf "%s — %s" repo (repo_description repo) - let li_of_branch repo branch = + let li_of_branch repo (branch : branch) = HTML.(li [] [ Routes.link_to branch.name (Tag (repo, branch.name)) ]) let li_of_commit repo commit = @@ -163,11 +163,19 @@ module Repo = struct content; } - let tree repo = - let content = HTML.[ null [] ] in + let tree repo tree = + let title = Printf.sprintf "%s : %s" repo tree.short_hash in + let li_of_entry entry = HTML.(li [] [ txt "%s" entry.name ]) in + let content = + HTML. + [ + h3 [] [ txt "Tree %s" tree.short_hash ]; + ul [] (List.map li_of_entry tree.entries); + ] + in Page.render ~page_title:(page_title repo) { - title = repo; + title; subtitle = repo_description repo; topnav = Components.topnav repo; content; |