From 0322b329e826fe567e8a28073e707b87c1b8868d Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 12 Jan 2024 08:24:05 +0200 Subject: [PATCH] dedup + tabs --- files/templates/comments.html | 40 +++++++++++++++++++++++++------- files/templates/util/macros.html | 12 +++++----- 2 files changed, 38 insertions(+), 14 deletions(-) diff --git a/files/templates/comments.html b/files/templates/comments.html index 5b6a0451d..ed05028f6 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -137,17 +137,41 @@ {% endif %} - {% if c.active_reports(v) %}{% endif %} - {% if c.nsfw %}NSFW{% endif %} - {% if v and v.can_see_shadowbanned and c.author.shadowbanned %}{% endif %} + {% if c.active_reports(v) %} + + {% endif %} + + {% if c.nsfw %} + NSFW + {% endif %} + + {% with user = c.author %} + {%- include 'admin/shadowbanned_tooltip.html' -%} + {% endwith %} + {% if c.stickied %} {% endif %} - {% if c.distinguish_level and not c.ghost %}{% endif %} - {% if c.is_op %}{% endif %} - {% if c.is_bot %}{% endif %} - {% if c.is_blocking and not c.ghost %}{% endif %} - {% if c.is_blocked and not c.ghost %}{% endif %} + + {% if c.distinguish_level and not c.ghost %} + + {% endif %} + + {% if c.is_op %} + + {% endif %} + + {% if c.is_bot %} + + {% endif %} + + {% if c.is_blocking and not c.ghost %} + + {% endif %} + + {% if c.is_blocked and not c.ghost %} + + {% endif %} {% if c.ghost %} 👻 diff --git a/files/templates/util/macros.html b/files/templates/util/macros.html index eb3bcc179..ed379a736 100644 --- a/files/templates/util/macros.html +++ b/files/templates/util/macros.html @@ -39,9 +39,9 @@ {% endfor %} - {% if v and v.can_see_shadowbanned and p.author.shadowbanned %} - - {% endif %} + {% with user = p.author %} + {%- include 'admin/shadowbanned_tooltip.html' -%} + {% endwith %} {% if p.stickied %} @@ -219,9 +219,9 @@