fix
This commit is contained in:
parent
8020887a3a
commit
33ecb67272
2 changed files with 5 additions and 2 deletions
|
@ -9,12 +9,13 @@ function collapse_comment(comment_id) {
|
|||
const actions = document.getElementById(`comment-${comment_id}-actions`)
|
||||
const repliesOf = document.getElementById(`replies-of-${comment_id}`)
|
||||
|
||||
const toggler = document.getElementById(`comment-collapse-lg-${comment_id}`)
|
||||
|
||||
const isClosed = comment.classList.contains("collapsed");
|
||||
|
||||
const top = comment.getBoundingClientRect().y;
|
||||
|
||||
const arr = [text, actions, repliesOf];
|
||||
const arr = [text, actions, repliesOf, toggler];
|
||||
|
||||
arr.map(x => x.classList.toggle('hidden')); // hide comment elements
|
||||
['items-center', 'opacity-50'].map(y=> comment.classList.toggle(y)); // apply flex alignment and opacity to comment parent wrapping div
|
||||
|
|
|
@ -253,7 +253,9 @@
|
|||
|
||||
<div id="comment-{{c.id}}" class="anchor {% if c.unread %}unread{% endif %} relative flex mt-4 md:mt-6 {% if standalone and level==1 %} mt-0{% endif %}{% if c.collapse_for_user(v) or (standalone and c.over_18 and not (v and v.over_18)) %} collapsed{% endif %}">
|
||||
|
||||
<span class="comment-collapse-desktop hidden d-md-block" {% if not c.unread %}style="border-left: 2px solid #{{c.author.namecolor}};"{% endif %} onclick="collapse_comment('{{c.id}}')"></span>
|
||||
<div id="comment-collapse-lg-{{c.id}}" class="hidden w-full h-full bottom-0 left-0 right-0 top-0 cursor-pointer" onclick="collapse_comment('{{c.id}}')"></div>
|
||||
|
||||
<span class="comment-collapse-desktop hidden" {% if not c.unread %}style="border-left: 2px solid #{{c.author.namecolor}};"{% endif %} onclick="collapse_comment('{{c.id}}')"></span>
|
||||
|
||||
<div class="flex flex-col flex-shrink-0 items-center mr-2.5 {{ 'md:mr-4' if not c.parent_comment_id or standalone else 'md:mr-3' }}">
|
||||
<div class="relative {{ 'santa' if c.author.patron else 'cap' }}">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue