fix link on preview not working but now we cant clcik the image, css is a nightmare
This commit is contained in:
parent
ec498caf8e
commit
dec7d3f7fe
2 changed files with 13 additions and 27 deletions
|
|
@ -111,38 +111,27 @@ let pp_post fmt t =
|
|||
~some:(fun thread_data -> thread_data.subject)
|
||||
thread_data_opt
|
||||
in
|
||||
(* put inside a link if its a preview *)
|
||||
let pp_inner_post fmt () =
|
||||
Format.fprintf fmt
|
||||
{|
|
||||
(* put a link in if its a preview *)
|
||||
let link fmt () =
|
||||
if Option.is_some thread_data_opt then
|
||||
Format.fprintf fmt
|
||||
{|<a class="stretched-link preview-link" href="/thread/%s"></a>|} id
|
||||
else Format.fprintf fmt ""
|
||||
in
|
||||
Format.fprintf fmt
|
||||
{|
|
||||
<div class="position-relative post" id="%s">
|
||||
<div class="thread-subject">
|
||||
%s
|
||||
</div>
|
||||
%a
|
||||
%a
|
||||
%a
|
||||
<blockquote class="post-comment">%s</blockquote>
|
||||
%a
|
||||
</div>
|
||||
|}
|
||||
subject post_info_view () image_view () comment tags_view ()
|
||||
in
|
||||
if Option.is_some thread_data_opt then
|
||||
Format.fprintf fmt
|
||||
{|
|
||||
<div class="post" id="%s">
|
||||
<a class="preview-link" href="/thread/%s">
|
||||
%a
|
||||
</a>
|
||||
</div>
|
||||
|}
|
||||
id id pp_inner_post ()
|
||||
else
|
||||
Format.fprintf fmt
|
||||
{|
|
||||
<div class="post" id="%s">
|
||||
%a
|
||||
</div>
|
||||
|}
|
||||
id pp_inner_post ()
|
||||
id subject link () post_info_view () image_view () comment tags_view ()
|
||||
|
||||
let view_post id =
|
||||
let* post = get_post id in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue