{% 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()) %} {% 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" %} {% call utils::options(sort.1, ["hour", "day", "week", "month", "year", "all"], "day") %} → {% endif %} {% if sub.name.contains("+") %} Subscribe to Multireddit {% endif %} {% if all_posts_hidden_nsfw %} All posts are hidden because they are NSFW. Enable "Show NSFW posts" in settings to view. {% endif %} {% if no_posts %} No posts were found. {% 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 %} {% endif %} {% if is_filtered || (!sub.name.is_empty() && sub.name != "all" && sub.name != "popular" && !sub.name.contains("+")) %} {% endif %} {% endblock %}