{% 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 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 %}
{% for post in posts %} {% if !(post.flags.nsfw && prefs.show_nsfw != "on") %}
{% call utils::post_in_list(post) %} {% endif %} {% endfor %}
{% if ends.0 != "" %} PREV {% endif %} {% if ends.1 != "" %} NEXT {% endif %}
{% if sub.name != "" && !sub.name.contains("+") %} {% endif %}
{% endblock %}