fix link on preview not working but now we cant clcik the image, css is a nightmare

This commit is contained in:
Swrup 2022-02-22 10:23:34 +01:00
parent ec498caf8e
commit dec7d3f7fe
2 changed files with 13 additions and 27 deletions

View file

@ -111,9 +111,6 @@ blockquote.blockquote {
}
a.preview-link {
display: block;
height: 100;
width: 100;
text-decoration: none;
color: unset;
}

View file

@ -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 () =
(* 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
|}
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