templates/search.html
{% extends "base.html" %} {% import "utils.html" as utils %} {% block title %}Libreddit: search results - {{ params.q }}{% endblock %} {% block subscriptions %} {% call utils::sub_list("") %} {% endblock %} {% block content %}
{% if sub != "" %} in r/{{ sub }} {% endif %} {% if params.typed == "sr_user" %}{% endif %} {% call utils::options(params.sort, ["relevance", "hot", "top", "new", "comments"], "") %} {% if params.sort != "new" %} {% call utils::options(params.t, ["hour", "day", "week", "month", "year", "all"], "all") %} {% endif %} → {% if !is_filtered %} {% if subreddits.len() > 0 || params.typed == "sr_user" %} {% if params.typed == "sr_user" %} ← Back to post/comment results {% endif %} {% for subreddit in subreddits %} [ {% if subreddit.icon != "" %} {% endif %}
r/{{ subreddit.name }}•{{ subreddit.subscribers.0 }} Members
{{ subreddit.description }}
]({{%20subreddit.url%20}}) {% endfor %} {% if params.typed != "sr_user" %} More subreddit results → {% endif %} {% endif %} {% 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 if is_filtered %} (Content from r/{{ sub }} has been filtered) {% else if params.typed != "sr_user" %} {% for post in posts %} {% if post.flags.nsfw && prefs.show_nsfw != "on" %} {% else if !post.title.is_empty() %} {% call utils::post_in_list(post) %} {% else %}
{{ post.score.0 }}
#COMMENT{{ post.rel_time }}
{{ post.body }}
{% endif %} {% endfor %} {% endif %} {% if prefs.use_hls == "on" %} {% endif %} {% if params.typed != "sr_user" %} {% endif %} {% endblock %}