Make some markdown lazy load image

This commit is contained in:
cuom1999 2022-11-07 16:11:35 -06:00
parent b2950cfcdc
commit fddde73583
7 changed files with 7 additions and 7 deletions

View file

@ -38,7 +38,7 @@
</h2> </h2>
<div class="summary content-description blog-description"> <div class="summary content-description blog-description">
{% cache 86400 'post_summary' post.id %} {% 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 %} {% endcache %}
</div> </div>
</section> </section>

View file

@ -21,7 +21,7 @@
</a> </a>
{% endif %} {% endif %}
<div class="message-text message-text-other"> <div class="message-text message-text-other">
{{message.body|markdown|reference|str|safe }} {{message.body|markdown(lazy_load=True)|reference|str|safe }}
</div> </div>
</div> </div>
</span> </span>

View file

@ -13,6 +13,6 @@
{% endif %} {% endif %}
{% endwith %} {% endwith %}
<div class='blog-description content-description'> <div class='blog-description content-description'>
{{ comment.body |markdown|reference|str|safe }} {{ comment.body|markdown(lazy_load=True)|reference|str|safe }}
</div> </div>
</div> </div>

View file

@ -93,7 +93,7 @@
</div> </div>
<div class="content content-description"> <div class="content content-description">
<div class="comment-body"{% if node.score <= vote_hide_threshold %} style="display:none"{% endif %}> <div class="comment-body"{% if node.score <= vote_hide_threshold %} style="display:none"{% endif %}>
{{ node.body|markdown|reference|str|safe }} {{ node.body|markdown(lazy_load=True)|reference|str|safe }}
</div> </div>
{% if node.score <= vote_hide_threshold %} {% if node.score <= vote_hide_threshold %}
<div class="comment-body bad-comment-body"> <div class="comment-body bad-comment-body">

View file

@ -54,7 +54,7 @@
{% endif %} {% endif %}
<div class='blog-description content-description'> <div class='blog-description content-description'>
{% cache 86400 'problem_html' problem.id MATH_ENGINE LANGUAGE_CODE %} {% 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 %} {% endcache %}
{% if problem.pdf_description %} {% if problem.pdf_description %}
<embed src="{{url('problem_pdf_description', problem.code)}}" width="100%" height="500" type="application/pdf" style="margin-top: 0.5em"> <embed src="{{url('problem_pdf_description', problem.code)}}" width="100%" height="500" type="application/pdf" style="margin-top: 0.5em">

View file

@ -376,7 +376,7 @@
{% endif %} {% endif %}
{% cache 86400 'problem_html' problem.id MATH_ENGINE LANGUAGE_CODE %} {% cache 86400 'problem_html' problem.id MATH_ENGINE LANGUAGE_CODE %}
{{ description|markdown|reference|str|safe }} {{ description|markdown(lazy_load=True)|reference|str|safe }}
{% endcache %} {% endcache %}
{% if problem.pdf_description %} {% if problem.pdf_description %}

View file

@ -20,6 +20,6 @@
{{link_user(ticket.messages.last().user)}} {{_(' replied')}} {{link_user(ticket.messages.last().user)}} {{_(' replied')}}
</div> </div>
<div class='blog-description content-description'> <div class='blog-description content-description'>
{{ ticket.messages.last().body |markdown|reference|str|safe }} {{ ticket.messages.last().body|markdown(lazy_load=True)|reference|str|safe }}
</div> </div>
</div> </div>