aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/templates/staff
diff options
context:
space:
mode:
authorGravatar Sebastiaan Zeeff <[email protected]>2019-10-31 21:46:17 +0100
committerGravatar Sebastiaan Zeeff <[email protected]>2019-10-31 21:46:17 +0100
commita54d978011436975c151fbd6c729a840ce191dcc (patch)
treed646faee5b3982e9f728e1f12e7e6600b0bd5eeb /pydis_site/templates/staff
parentMerge pull request #293 from python-discord/update-dependency-pinning (diff)
Make newlines visible in deleted messages
https://github.com/python-discord/site/issues/302 This commit makes newlines in deleted messages visible in the deleted messages front-end and makes sure they are not stripped during the conversion to HTML. To represent newlines, I've chosen a commonly used symbol: `↵`. In addition, I've kaizened the colour filter that translates integer representations of colours to their RGB hex-value. The Discord dark theme shows black colours (int: 0; hex: #000000) as white instead, to make reading them against the dark background easier. This commit makes sure our front-end displays the same behavior. This closes #302
Diffstat (limited to 'pydis_site/templates/staff')
-rw-r--r--pydis_site/templates/staff/logs.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/pydis_site/templates/staff/logs.html b/pydis_site/templates/staff/logs.html
index 9c8ed7d3..907c3327 100644
--- a/pydis_site/templates/staff/logs.html
+++ b/pydis_site/templates/staff/logs.html
@@ -19,10 +19,10 @@
<div class="discord-message-header">
<span class="discord-username"
style="color: {{ message.author.top_role.colour | hex_colour }}">{{ message.author }}</span><span
- class="discord-message-metadata">{{ message.timestamp }} | User ID: {{ message.author.id }}</span>
+ class="discord-message-metadata has-text-grey">{{ message.timestamp }} | User ID: {{ message.author.id }}</span>
</div>
<div class="discord-message-content">
- {{ message.content|linebreaks }}
+ {{ message.content | escape | visible_newlines | safe }}
</div>
{% for embed in message.embeds %}
<div class="discord-embed is-size-7">