diff --git a/src/babillard.ml b/src/babillard.ml index 9636c49..2209b38 100644 --- a/src/babillard.ml +++ b/src/babillard.ml @@ -391,10 +391,11 @@ let view_post ?is_thread_preview post_id = in let pp_print_reply fmt reply = - Format.fprintf fmt {|>>%s|} reply reply + Format.fprintf fmt {|>>%s|} reply + reply in let pp_print_replies = - Format.asprintf {| |} + Format.asprintf {|
%a
|} (Format.pp_print_list ~pp_sep:Format.pp_print_space pp_print_reply) in @@ -405,22 +406,38 @@ let view_post ?is_thread_preview post_id = let res_nb = Db.find Q.count_thread_posts post_id in match res_nb with | Error _ -> "" - | Ok ((0 | 1) as nb) -> Format.sprintf "%d reply" (nb - 1) - | Ok nb -> Format.sprintf "%d replies" (nb - 1) ) + | Ok ((1 | 2) as nb) -> + Format.sprintf {|
%d reply
|} (nb - 1) + | Ok nb -> + Format.sprintf {|
%d replies
|} (nb - 1) ) in - let post_info_view = - Format.sprintf - {| -
- %s - + + let post_links_view = + match is_thread_preview with + | None -> + Format.sprintf + {| No. %s %s + |} + post_id post_id post_id replies_view + | Some () -> Format.sprintf {| + %s + |} replies_view + in + + let post_info_view = + Format.sprintf + {| +
+ %s + + %s
|} - nick date post_id post_id post_id replies_view + nick date post_links_view in let post_view = Format.sprintf diff --git a/src/content/assets/css/style.css b/src/content/assets/css/style.css index deb1e1e..164ba9c 100644 --- a/src/content/assets/css/style.css +++ b/src/content/assets/css/style.css @@ -40,8 +40,13 @@ blockquote.blockquote { width: 100%; } +.nick { + color: #FFB300; +} + .postComment { display: block; + padding-top: 10px; } .postImageContainer {