From 8ee8a44256df2cd173c9afc6015138a8a6a100f1 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 26 Aug 2022 17:20:20 +0200 Subject: [PATCH] add approved image hosts to /formatting --- files/helpers/jinja2.py | 2 +- files/templates/formatting.html | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/files/helpers/jinja2.py b/files/helpers/jinja2.py index d146c4e64..d1b5e0aab 100644 --- a/files/helpers/jinja2.py +++ b/files/helpers/jinja2.py @@ -58,4 +58,4 @@ def inject_constants(): "LOTTERY_ENABLED": LOTTERY_ENABLED, "GUMROAD_LINK": GUMROAD_LINK, "DEFAULT_THEME": DEFAULT_THEME, "DESCRIPTION": DESCRIPTION, "has_sidebar": has_sidebar, "has_logo": has_logo, "has_app": has_app, - "FP": FP, "NOTIF_MODACTION_JL_MIN": NOTIF_MODACTION_JL_MIN, "cache": cache, "ONLINE_STR": ONLINE_STR, "patron": patron} + "FP": FP, "NOTIF_MODACTION_JL_MIN": NOTIF_MODACTION_JL_MIN, "cache": cache, "ONLINE_STR": ONLINE_STR, "patron": patron, "approved_embed_hosts": approved_embed_hosts} diff --git a/files/templates/formatting.html b/files/templates/formatting.html index df0ba7ae9..bfbf99e92 100644 --- a/files/templates/formatting.html +++ b/files/templates/formatting.html @@ -67,7 +67,7 @@ Text 2 {{SITE_NAME}} - Images + Images (will embed automatically if from approved hosts) https://i.imgur.com/SwVuagI_d.webp example image @@ -637,6 +637,24 @@ line breaks + +
Approved Image Hosts
+ +
+ + + + + + + {% for host in approved_embed_hosts %} + + + + {% endfor %} + +
Host
{{host}}
+ {% include "expanded_image_modal.html" %} {% endblock %} \ No newline at end of file