refactor some code
This commit is contained in:
parent
0632a713c7
commit
3796a96997
7 changed files with 330 additions and 403 deletions
|
|
@ -31,7 +31,7 @@ let pp_post fmt t =
|
|||
<a href="/img/%s">
|
||||
<img class="post-image" src="/img/s/%s" alt="%s" title="%s" data-id="%s" loading="lazy">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|}
|
||||
id id image_alt image_alt id
|
||||
| None -> Format.fprintf fmt ""
|
||||
|
|
@ -108,10 +108,11 @@ let pp_post fmt t =
|
|||
in
|
||||
let categories = List.sort String.compare categories in
|
||||
let tags = List.sort String.compare tags in
|
||||
let pp_sep = Format.pp_print_space in
|
||||
Format.fprintf fmt {|<div class="tags">%a%a</div>|}
|
||||
(Format.pp_print_list ~pp_sep:Format.pp_print_space pp_print_category)
|
||||
(Format.pp_print_list ~pp_sep pp_print_category)
|
||||
categories
|
||||
(Format.pp_print_list ~pp_sep:Format.pp_print_space pp_print_tag)
|
||||
(Format.pp_print_list ~pp_sep pp_print_tag)
|
||||
tags
|
||||
in
|
||||
let tags = List.sort String.compare tags in
|
||||
|
|
@ -138,9 +139,9 @@ let pp_post fmt t =
|
|||
%a
|
||||
%a
|
||||
%a
|
||||
<blockquote class="post-comment">%s</blockquote>
|
||||
<blockquote class="post-comment">%s</blockquote>
|
||||
%a
|
||||
</div>
|
||||
</div>
|
||||
|}
|
||||
id subject link () post_info_view () image_view () comment tags_view ()
|
||||
|
||||
|
|
@ -295,7 +296,7 @@ let pp_checkboxes fmt () =
|
|||
category category category category
|
||||
in
|
||||
Format.fprintf fmt
|
||||
{|
|
||||
{|
|
||||
<div class="row">
|
||||
%a
|
||||
</div>|}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue