From fddde7358395c9bf823685b28b3268ef45e2662f Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Mon, 7 Nov 2022 16:11:35 -0600 Subject: [PATCH] Make some markdown lazy load image --- templates/blog/content.html | 2 +- templates/chat/message.html | 2 +- templates/comments/feed.html | 2 +- templates/comments/list.html | 2 +- templates/problem/feed.html | 2 +- templates/problem/problem.html | 2 +- templates/ticket/feed.html | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/blog/content.html b/templates/blog/content.html index ec82a28..bbb4c7b 100644 --- a/templates/blog/content.html +++ b/templates/blog/content.html @@ -38,7 +38,7 @@
{% cache 86400 'post_summary' post.id %} - {{ post.summary|default(post.content, true)|markdown|reference|str|safe }} + {{ post.summary|default(post.content, true)|markdown(lazy_load=True)|reference|str|safe }} {% endcache %}
\ No newline at end of file diff --git a/templates/chat/message.html b/templates/chat/message.html index e5fc100..831c4f9 100644 --- a/templates/chat/message.html +++ b/templates/chat/message.html @@ -21,7 +21,7 @@ {% endif %}
- {{message.body|markdown|reference|str|safe }} + {{message.body|markdown(lazy_load=True)|reference|str|safe }}
diff --git a/templates/comments/feed.html b/templates/comments/feed.html index db4d079..dcb813a 100644 --- a/templates/comments/feed.html +++ b/templates/comments/feed.html @@ -13,6 +13,6 @@ {% endif %} {% endwith %}
- {{ comment.body |markdown|reference|str|safe }} + {{ comment.body|markdown(lazy_load=True)|reference|str|safe }}
\ No newline at end of file diff --git a/templates/comments/list.html b/templates/comments/list.html index eaf1f6b..dcffd48 100644 --- a/templates/comments/list.html +++ b/templates/comments/list.html @@ -93,7 +93,7 @@
{% if node.score <= vote_hide_threshold %}
diff --git a/templates/problem/feed.html b/templates/problem/feed.html index 73c2edf..4429794 100644 --- a/templates/problem/feed.html +++ b/templates/problem/feed.html @@ -54,7 +54,7 @@ {% endif %}
{% cache 86400 'problem_html' problem.id MATH_ENGINE LANGUAGE_CODE %} - {{ problem.description|markdown|reference|str|safe }} + {{ problem.description|markdown(lazy_load=True)|reference|str|safe }} {% endcache %} {% if problem.pdf_description %} diff --git a/templates/problem/problem.html b/templates/problem/problem.html index ef56884..8a2543d 100644 --- a/templates/problem/problem.html +++ b/templates/problem/problem.html @@ -376,7 +376,7 @@ {% endif %} {% cache 86400 'problem_html' problem.id MATH_ENGINE LANGUAGE_CODE %} - {{ description|markdown|reference|str|safe }} + {{ description|markdown(lazy_load=True)|reference|str|safe }} {% endcache %} {% if problem.pdf_description %} diff --git a/templates/ticket/feed.html b/templates/ticket/feed.html index e8ca4d0..60b14e6 100644 --- a/templates/ticket/feed.html +++ b/templates/ticket/feed.html @@ -20,6 +20,6 @@ {{link_user(ticket.messages.last().user)}} {{_(' replied')}}
- {{ ticket.messages.last().body |markdown|reference|str|safe }} + {{ ticket.messages.last().body|markdown(lazy_load=True)|reference|str|safe }}
\ No newline at end of file