fix
This commit is contained in:
parent
fbdb0319c9
commit
f492012494
2 changed files with 3 additions and 2 deletions
|
@ -5,7 +5,6 @@ function timestamp(str, ti) {
|
||||||
|
|
||||||
function collapse_comment(comment_id) {
|
function collapse_comment(comment_id) {
|
||||||
const comment = document.getElementById(`comment-${comment_id}`)
|
const comment = document.getElementById(`comment-${comment_id}`)
|
||||||
const isClosed = comment.classList.contains("collapsed");
|
|
||||||
const top = comment.getBoundingClientRect().y;
|
const top = comment.getBoundingClientRect().y;
|
||||||
|
|
||||||
const toggler = document.getElementById(`comment-collapse-${comment_id}`);
|
const toggler = document.getElementById(`comment-collapse-${comment_id}`);
|
||||||
|
@ -14,6 +13,8 @@ function collapse_comment(comment_id) {
|
||||||
|
|
||||||
['items-center', 'opacity-50', 'hover:opacity-100', 'collapsed'].map(y=> comment.classList.toggle(y)); // apply flex alignment and opacity to comment parent wrapping div
|
['items-center', 'opacity-50', 'hover:opacity-100', 'collapsed'].map(y=> comment.classList.toggle(y)); // apply flex alignment and opacity to comment parent wrapping div
|
||||||
|
|
||||||
|
const isClosed = comment.classList.contains("collapsed");
|
||||||
|
|
||||||
document.getElementById(`comment-toggle-icon-${comment_id}`).innerText = isClosed ? '[+]' : '[-]';
|
document.getElementById(`comment-toggle-icon-${comment_id}`).innerText = isClosed ? '[+]' : '[-]';
|
||||||
|
|
||||||
if (isClosed && top < 0) {
|
if (isClosed && top < 0) {
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script defer src="/assets/js/popover.js?v=16"></script>
|
<script defer src="/assets/js/popover.js?v=16"></script>
|
||||||
<script defer src="/assets/js/comments.js?v=25"></script>
|
<script defer src="/assets/js/comments.js?v=26"></script>
|
||||||
|
|
||||||
{% include "expanded_image_modal.html" %}
|
{% include "expanded_image_modal.html" %}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue