{% load static %}
{% load infinite_scroll %}
{% if has_older_posts and more_posts_url %}
<link rel="stylesheet" href="{% static 'css/scroll.min.css' %}?v{{ infscroll_version }}">
<script src="{% static 'js/scroll.min.js' %}?v{{ infscroll_version }}"></script>
<script async type="text/javascript">
    scroller.setUp("{{ more_posts_url }}", // more_url
                    "{{ newer_posts }}", // prev_page
                    "{{ older_posts }}", // next_page
                    "{{ should_load_more }}", // has_more
                    "{{ more_posts_url_args|default:'' }}" // extra_args
                );
    window.addEventListener('load', function () {
        scroller.load_more();
    });
</script>
{% endif %}
