forked from rDrama/rDrama
accomodate last commit
parent
2647019dc9
commit
2d41ee8a76
|
@ -1,4 +1,17 @@
|
||||||
function changeIcon(id) {
|
function expandText(id) {
|
||||||
|
const toggling = document.getElementById('post-text-'+id)
|
||||||
|
const attr = "d-none";
|
||||||
|
|
||||||
|
if (toggling.classList.contains(attr)) {
|
||||||
|
document.querySelectorAll(".toggled-visible").forEach(i => {
|
||||||
|
i.classList.add(attr)
|
||||||
|
i.classList.remove("toggled-visible")
|
||||||
|
});
|
||||||
|
toggling.classList.add("toggled-visible")
|
||||||
|
}
|
||||||
|
|
||||||
|
toggling.classList.toggle(attr);
|
||||||
|
|
||||||
for (const e of document.getElementsByClassName('text-expand-icon-p_'+id))
|
for (const e of document.getElementsByClassName('text-expand-icon-p_'+id))
|
||||||
{
|
{
|
||||||
e.classList.toggle('fa-expand-alt');
|
e.classList.toggle('fa-expand-alt');
|
||||||
|
|
|
@ -116,7 +116,7 @@
|
||||||
<div class="d-flex" style="flex-basis:146px"></div>
|
<div class="d-flex" style="flex-basis:146px"></div>
|
||||||
<ul class="list-inline text-right d-flex">
|
<ul class="list-inline text-right d-flex">
|
||||||
{% if p.realbody(v, listing=True) %}
|
{% if p.realbody(v, listing=True) %}
|
||||||
<button type="button" class="list-inline-item ml-2" data-nonce="{{g.nonce}}" data-onclick="changeIcon('{{p.id}}')" data-toggleelement="#post-text-{{p.id}}" data-toggleattr="d-none"><i class="fas fa-expand-alt mx-0 text-expand-icon-{{p.fullname}}"></i></button>
|
<button type="button" class="list-inline-item ml-2" data-nonce="{{g.nonce}}" data-onclick="expandText('{{p.id}}')"><i class="fas fa-expand-alt mx-0 text-expand-icon-{{p.fullname}}"></i></button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a class="list-inline-item" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %} href="{{p.permalink}}">
|
<a class="list-inline-item" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %} href="{{p.permalink}}">
|
||||||
<i class="fas fa-comment-dots mr-2"></i>{{p.comment_count}}
|
<i class="fas fa-comment-dots mr-2"></i>{{p.comment_count}}
|
||||||
|
@ -144,7 +144,7 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{% if p.realbody(v, listing=True) %}
|
{% if p.realbody(v, listing=True) %}
|
||||||
<button type="button" class="list-inline-item ml-2" data-nonce="{{g.nonce}}" data-onclick="changeIcon('{{p.id}}')" data-toggleelement="#post-text-{{p.id}}" data-toggleattr="d-none"><i class="fas fa-expand-alt mx-0 text-expand-icon-{{p.fullname}}"></i></button>
|
<button type="button" class="list-inline-item ml-2" data-nonce="{{g.nonce}}" data-onclick="expandText('{{p.id}}')"><i class="fas fa-expand-alt mx-0 text-expand-icon-{{p.fullname}}"></i></button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
|
|
Loading…
Reference in New Issue