diff options
Diffstat (limited to 'lib/views.ml')
-rw-r--r-- | lib/views.ml | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/views.ml b/lib/views.ml index ba87571..1e0a858 100644 --- a/lib/views.ml +++ b/lib/views.ml @@ -76,7 +76,7 @@ let root () = let all_repositories = let repos = Sys.readdir config.git_project_root - |> Array.to_list |> List.sort String.compare + |> Array.to_list (* |> List.sort String.compare *) in let li_of_repo repo = HTML.li [] [ Routes.link_to (Routes.Repo repo) (txt "%s" repo) ] @@ -100,8 +100,7 @@ module Repo = struct let li_of_author author = HTML.(li [] [ txt "%s" author ]) let li_of_branch repo (branch : branch) = - HTML.( - li [] [ Routes.link_to (Tag (repo, branch.name)) (txt "%s" branch.name) ]) + HTML.(li [] [ Routes.link_to (Refs repo) (txt "%s" branch.name) ]) let li_of_commit repo commit = let open HTML in @@ -124,8 +123,8 @@ module Repo = struct if entry.perm = 0o040000 then entry.name ^ "/" else entry.name in let route = - if entry.perm = 0o040000 then Routes.Tree (repo, entry.hash) - else Routes.Blob (repo, entry.hash) + if entry.perm = 0o040000 then Routes.Files repo + else Routes.File (repo, entry.hash) in HTML.(li [] [ Routes.link_to route @@ txt "%s" display_name ]) @@ -135,7 +134,7 @@ module Repo = struct [ h3 [] [ txt "Branches" ]; ul [] (List.map (li_of_branch repo) branches); - h3 [] [ txt "Recent commits" ]; + h3 [] [ txt "Latest commits" ]; ul [] (List.map (li_of_commit repo) commits); h3 [] [ txt "Authors" ]; ul [] (List.map li_of_author authors); @@ -181,12 +180,12 @@ module Repo = struct content; } - let tree repo tree = + let files repo tree = let title = Printf.sprintf "%s" repo in let content = HTML. [ - h3 [] [ txt "Tree %s" tree.short_hash ]; + h3 [] [ txt "Files %s" tree.short_hash ]; ul [] (List.map (li_of_entry repo) tree.entries); ] in @@ -219,7 +218,7 @@ module Repo = struct { title; subtitle = repo_description repo; - topnav = Components.topnav repo; + topnav = Components.Topnav.(v ~active_path:Files repo); content; } |