{% extends "base.html" %} {% import "utils.html" as utils %} {% block title %} {% if sub.title != "" %}{{ sub.title }} {% else if sub.name != "" %}{{ sub.name }} {% else %}Libreddit{% endif %} {% endblock %} {% block search %} {% call utils::search(["/r/", sub.name.as_str()].concat(), "") %} {% endblock %} {% block subscriptions %} {% call utils::sub_list(sub.name.as_str(), "wide") %} {% endblock %} {% block body %}
{% if !is_filtered %}
{% if sub.name.is_empty() %} {% call utils::sort("", ["hot", "new", "top", "rising", "controversial"], sort.0) %} {% else %} {% call utils::sort(["/r/", sub.name.as_str()].concat(), ["hot", "new", "top", "rising", "controversial"], sort.0) %} {% endif %}
{% if sort.0 == "top" || sort.0 == "controversial" %} {% endif %}
{% if sub.name.contains("+") %}
{% endif %} {% if all_posts_filtered %}
(All content on this page has been filtered)
{% else %}
{% for post in posts %} {% if !(post.flags.nsfw && prefs.show_nsfw != "on") %}
{% call utils::post_in_list(post) %} {% endif %} {% endfor %} {% if prefs.use_hls == "on" %} {% endif %}
{% endif %}
{% if !ends.0.is_empty() %} PREV {% endif %} {% if !ends.1.is_empty() %} NEXT {% endif %}
{% endif %} {% if is_filtered || (!sub.name.is_empty() && sub.name != "all" && sub.name != "popular" && !sub.name.contains("+")) %} {% endif %}
{% endblock %}