remove ghost-town-box when making a comment

master
Aevann 2023-07-25 21:41:24 +03:00
parent 638aa9420e
commit 3b94812973
2 changed files with 5 additions and 2 deletions

View File

@ -283,6 +283,9 @@ function post_comment(fullname, hide){
input.previousElementSibling.innerHTML = '';
input.value = null;
oldfiles[ta.id] = []
const ghost_town_box = document.getElementById('ghost-town-box')
if (ghost_town_box) ghost_town_box.remove()
}
else {
showToast(false, getMessageFromJsonData(false, data));

View File

@ -167,7 +167,7 @@
{% macro ghost_box(text1, text2, mode, extra_css) %}
{# TODO: use in saved (search for "fa-ghost" in source) #}
{% if mode == 1 %}
<div class="text-center py-6 ghost-town-box ghost-town-box-1"{% if extra_css %} style="{{extra_css}}"{% endif %}>
<div id="ghost-town-box" class="text-center py-6"{% if extra_css %} style="{{extra_css}}"{% endif %}>
<span class="fa-stack fa-2x text-muted mb-4">
<i class="fas fa-square text-gray-500 opacity-25 fa-stack-2x"></i>
<i class="fas text-gray-500 fa-ghost fa-stack-1x text-lg"></i>
@ -181,7 +181,7 @@
{% endif %}
</div>
{% elif mode == 2 %}
<div class="text-center border-md rounded py-6 ghost-town-box ghost-town-box-2"{% if extra_css %} style="{{extra_css}}"{% endif %}>
<div id="ghost-town-box" class="text-center border-md rounded py-6"{% if extra_css %} style="{{extra_css}}"{% endif %}>
<i class="fas fa-ghost text-gray-500 mb-3" style="font-size: 3.5rem;"></i>
<p class="font-weight-bold text-gray-500 mb-0">{{text1|safe}}</p>
</div>