fix last commit

pull/210/head
Aevann 2023-09-26 18:59:27 +03:00
parent 75e65836c5
commit bdfa1c115e
1 changed files with 64 additions and 64 deletions

View File

@ -92,79 +92,79 @@
</h1>
{% if not v_forbid_deleted %}
<div id="post-body" class="post-body mt-3 {% if p.award_count('tilt', v) %}tilt-post{% endif %}">
{% if p.realurl(v) and not p.is_image and not p.is_video and not p.is_audio %}
<a rel="nofollow noopener" href="{{p.realurl(v)}}" {% if not v or v.newtabexternal %}target="_blank"{% endif %}>
<div class="d-flex justify-content-between align-items-center border rounded p-2 mb-3">
<span>{{p.realurl(v)}}</span>
<i class="fas fa-external-link-alt text-small"></i>
</div>
</a>
{% endif %}
{% if p.embed %}
{% if p.domain == "twitter.com" %}
{{p.embed | safe}}
{% if v and v.theme in LIGHT_THEMES %}
<script defer src="{{'js/vendor/twitterlight.js' | asset}}"></script>
{% else %}
<script defer src="{{'js/vendor/twitter.js' | asset}}"></script>
{% endif %}
{% elif p.domain in ['youtu.be','youtube.com'] and p.embed and p.embed.startswith('<lite-youtube') %}
<p class="resizable yt" style="width:100%">
<div id="post-body" class="post-body mt-3 {% if p.award_count('tilt', v) %}tilt-post{% endif %}">
{% if p.realurl(v) and not p.is_image and not p.is_video and not p.is_audio %}
<a rel="nofollow noopener" href="{{p.realurl(v)}}" {% if not v or v.newtabexternal %}target="_blank"{% endif %}>
<div class="d-flex justify-content-between align-items-center border rounded p-2 mb-3">
<span>{{p.realurl(v)}}</span>
<i class="fas fa-external-link-alt text-small"></i>
</div>
</a>
{% endif %}
{% if p.embed %}
{% if p.domain == "twitter.com" %}
{{p.embed | safe}}
</p>
{elif p.embed and "http" not in p.embed and "<" not in p.embed %}
<div id="crosspost-embed" class="mb-3">
<div class="row no-gutters">
<div id="frontpage" class="col-12 pt-0">
<div class="posts">
{{p.embed | post_embed(v) | safe}}
{% if v and v.theme in LIGHT_THEMES %}
<script defer src="{{'js/vendor/twitterlight.js' | asset}}"></script>
{% else %}
<script defer src="{{'js/vendor/twitter.js' | asset}}"></script>
{% endif %}
{% elif p.domain in ['youtu.be','youtube.com'] and p.embed and p.embed.startswith('<lite-youtube') %}
<p class="resizable yt" style="width:100%">
{{p.embed | safe}}
</p>
{% else %}
<div id="crosspost-embed" class="mb-3">
<div class="row no-gutters">
<div id="frontpage" class="col-12 pt-0">
<div class="posts">
{{p.embed | post_embed(v) | safe}}
</div>
</div>
</div>
</div>
</div>
{% endif %}
{% endif %}
<div id="post-text" class="{% if p.chudded %}text-uppercase chud-img chud-{{p.id_last_num}}{% endif %} {% if p.rainbowed %}rainbow-text{% endif %} {% if p.queened %}queen{% endif %} {% if p.sharpened %}sharpen chud-img sharpen-{{p.id_last_num}}{% endif %}">
{% if p.is_image %}
<div class="row no-gutters mb-4">
<div class="col">
<a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener" href="{{p.realurl(v)}}">
<img loading="lazy" data-nonce="{{g.nonce}}" data-onclick="expandImage()" src="{{p.realurl(v)}}" class="post-linked-img" alt="Unable to load image">
</a>
</div>
</div>
{% elif p.is_video %}
<div class="row no-gutters mb-4">
<div class="col">
<p class="resizable">
<video {% if p.poster_url %}poster="{{p.poster_url}}"{% endif %} controls preload="none" src="{{p.realurl(v)}}"></video>
</p>
</div>
</div>
{% elif p.is_audio %}
<div class="row no-gutters mb-4">
<div class="col">
<audio controls preload="none" src="{{p.realurl(v)}}"></audio>
</div>
</div>
{% endif %}
{% endif %}
{{p.realbody(v) | safe}}
{% if p.is_banned %}
<div class="text-removed mb-0">Removed by @{{p.ban_reason}} (Site Admin)</div>
<div id="post-text" class="{% if p.chudded %}text-uppercase chud-img chud-{{p.id_last_num}}{% endif %} {% if p.rainbowed %}rainbow-text{% endif %} {% if p.queened %}queen{% endif %} {% if p.sharpened %}sharpen chud-img sharpen-{{p.id_last_num}}{% endif %}">
{% if p.is_image %}
<div class="row no-gutters mb-4">
<div class="col">
<a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener" href="{{p.realurl(v)}}">
<img loading="lazy" data-nonce="{{g.nonce}}" data-onclick="expandImage()" src="{{p.realurl(v)}}" class="post-linked-img" alt="Unable to load image">
</a>
</div>
</div>
{% elif p.is_video %}
<div class="row no-gutters mb-4">
<div class="col">
<p class="resizable">
<video {% if p.poster_url %}poster="{{p.poster_url}}"{% endif %} controls preload="none" src="{{p.realurl(v)}}"></video>
</p>
</div>
</div>
{% elif p.is_audio %}
<div class="row no-gutters mb-4">
<div class="col">
<audio controls preload="none" src="{{p.realurl(v)}}"></audio>
</div>
</div>
{% endif %}
{{p.realbody(v) | safe}}
{% if p.is_banned %}
<div class="text-removed mb-0">Removed by @{{p.ban_reason}} (Site Admin)</div>
{% endif %}
</div>
{% if not p.ghost %}
{{p.author.rendered_sig(v) | safe}}
{% endif %}
</div>
{% if not p.ghost %}
{{p.author.rendered_sig(v) | safe}}
{% endif %}
</div>
{% else %}
<div id="post-body" class="post-body mt-3">
<div id="post-text"><code>[Deleted by author.]</code></div>
</div>
<div id="post-body" class="post-body mt-3">
<div id="post-text"><code>[Deleted by author.]</code></div>
</div>
{% endif %}
{% if v and v.can_edit(p) and not v.is_suspended %}