Change output date format & use <ul> for latest
git-svn-id: file:///srv/svn/repo/kosuzu/trunk@5 eb64cd80-c68d-6f47-b6a3-0ada418499da
This commit is contained in:
10
cli/html.ml
10
cli/html.ml
@@ -83,9 +83,9 @@ let to_dated_links ?(limit) meta_list =
|
||||
List.rev @@ reduced [] 0 meta_list
|
||||
in
|
||||
List.fold_left
|
||||
(fun a m ->
|
||||
a ^ Logarion.(Date.(pretty_date (listing m.Text.date)) ^ " ")
|
||||
^ {|<a href="|} ^ Logarion.Text.short_id m ^ {|.htm">|} ^ m.Logarion.Text.title ^ "</a><br>")
|
||||
(fun a m -> Printf.sprintf "%s<li> %s <a href=\"%s.htm\">%s</a>" a
|
||||
Logarion.(Date.(pretty_date (listing m.Text.date)))
|
||||
(Logarion.Text.short_id m) m.Logarion.Text.title)
|
||||
"" meta_list
|
||||
|
||||
let date_index ?(limit) conv htm meta_list =
|
||||
@@ -146,8 +146,8 @@ let listing_index topic_map topic_roots path metas =
|
||||
let topic_main_index conv htm topic_roots metas =
|
||||
wrap conv htm "Topics"
|
||||
(fold_topic_roots topic_roots
|
||||
^ "<nav><h1>Latest</h1>" ^ to_dated_links ~limit:10 metas
|
||||
^ {|<a href="index.date.htm">More by date</a></nav>|} )
|
||||
^ "<nav><h1>Latest</h1><ul>" ^ to_dated_links ~limit:8 metas
|
||||
^ {|</ul><a href="index.date.htm">More by date</a></nav>|} )
|
||||
|
||||
let topic_sub_index conv htm topic_map topic_root metas =
|
||||
wrap conv htm topic_root
|
||||
|
||||
Reference in New Issue
Block a user