Adding lazy-load version of feed component to load data using AJAX after page content has been rendered.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
<div id="feedarea">Loading...</div>
|
||||
{% put scripts %}
|
||||
<script type="text/javascript">const renderPartial = '{{ renderPartial }}'</script>
|
||||
{% endput %}
|
||||
@@ -0,0 +1,9 @@
|
||||
<ul>
|
||||
{% for post in posts %}
|
||||
{% if post.title %}
|
||||
<li>{{ post.title | raw }}</li>
|
||||
{% else %}
|
||||
<li>Post</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
Reference in New Issue
Block a user