2021-12-01 20:14:13 +00:00
|
|
|
{% extends "default.html" %}
|
2021-10-15 14:08:27 +00:00
|
|
|
|
|
|
|
{% block pagetype %}search{% endblock %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
<title>Search for "{{query}}" - {{'SITE_NAME' | app_config}}"</title> <meta name="description" content="{{total}} result{{'s' if total != 1 else ''}}">
|
|
|
|
{% endblock %}
|
|
|
|
|
2021-12-01 20:14:13 +00:00
|
|
|
{% block subHeader %}
|
2021-12-01 20:23:26 +00:00
|
|
|
<div class="relative max-w-screen-2xl mx-auto px-4 py-4 grid grid-cols-12 rounded-t">
|
|
|
|
<div class="absolute top-0 left-0 w-full h-full bg-gradient-to-t from-gray-300 to-gray-200 rounded-t sub-header-shadow"></div>
|
|
|
|
<div class="relative col-span-full flex items-center">
|
|
|
|
<div>
|
|
|
|
<h1 class="font-bold text-xl font-heading leading-normal">
|
|
|
|
Search Results: "{{query}}"
|
|
|
|
</h1>
|
2021-12-01 20:35:20 +00:00
|
|
|
<div class="flex space-x-3 divide-x divide-gray-400 text-xs">
|
2021-12-01 23:21:10 +00:00
|
|
|
<ul class="text-gray-700 flex items-center space-x-3 leading-normal mb-0">
|
2021-12-01 20:29:14 +00:00
|
|
|
<li>
|
|
|
|
<a class="{% if '/posts/' in request.path %}font-bold text-red-600{% endif %}" href="/search/posts/?sort={{sort}}&q={{query | urlencode}}&t={{t}}">
|
|
|
|
Posts
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a class="{% if '/comments/' in request.path %}font-bold text-red-600{% endif %}" href="/search/comments/?sort={{sort}}&q={{query | urlencode}}&t={{t}}">
|
|
|
|
Comments
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a class="{% if '/users/' in request.path %}font-bold text-red-600{% endif %}" href="/search/users/?sort={{sort}}&q={{query | urlencode}}&t={{t}}">
|
|
|
|
Users
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
2021-12-01 20:34:40 +00:00
|
|
|
<div class="pl-3 block text-gray-500">
|
2021-12-01 20:29:14 +00:00
|
|
|
<strong>{{ total }}</strong>
|
2021-12-01 20:33:23 +00:00
|
|
|
{{ sort }} result{{ '' if total == 1 else 's' }} matching
|
2021-12-01 20:33:08 +00:00
|
|
|
<strong>"{{query}}"</strong> {{ 'from all time' if t=='all' else 'in the last' }}
|
2021-12-01 20:29:14 +00:00
|
|
|
{% if t != 'all' %}<span class="font-bold">{{ t }}</span>{% endif %}
|
2021-12-01 20:34:40 +00:00
|
|
|
</div>
|
2021-12-01 20:29:14 +00:00
|
|
|
</div>
|
2021-10-15 14:08:27 +00:00
|
|
|
</div>
|
2021-12-01 20:23:26 +00:00
|
|
|
{% if not '/users/' in request.path %}
|
|
|
|
<div class="ml-auto">
|
|
|
|
{% include "/dropdowns/SearchSorts.html" %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2021-12-01 20:14:13 +00:00
|
|
|
</div>
|
2021-12-01 20:23:26 +00:00
|
|
|
</div>
|
2021-10-15 14:08:27 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
2021-12-01 20:37:23 +00:00
|
|
|
<div class="col-span-full py-4">
|
|
|
|
<p class="text-gray-500 text-sm">
|
2021-12-01 20:23:55 +00:00
|
|
|
Advanced search parameters (with examples): "author:quadnarca", "domain:reddit.com", "over18:true"
|
|
|
|
</p>
|
|
|
|
<!-- <div class="text-muted text-small mb-1">Showing {% block listinglength %}{{listing | length}}{% endblock %} of {{total}} result{{'s' if total != 1 else ''}} for</div> -->
|
2021-10-15 14:08:27 +00:00
|
|
|
</div>
|
|
|
|
|
2021-12-01 20:36:53 +00:00
|
|
|
<div class="col-span-full">
|
|
|
|
<div class="posts" id="posts">
|
|
|
|
{% block listing_template %}
|
|
|
|
{% include "submission_listing.html" %}
|
|
|
|
{% endblock %}
|
2021-10-15 14:08:27 +00:00
|
|
|
</div>
|
2021-12-01 20:23:26 +00:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|
2021-10-15 14:08:27 +00:00
|
|
|
|
2021-12-01 20:23:26 +00:00
|
|
|
{% block pagenav %}
|
|
|
|
<nav aria-label="Page navigation">
|
|
|
|
<ul class="pagination pagination-sm mb-0">
|
|
|
|
<li class="page-item{% if page==1 %} disabled{% endif %}">
|
2021-10-15 14:08:27 +00:00
|
|
|
|
2021-12-01 20:23:26 +00:00
|
|
|
<small><a class="page-link" href="?sort={{sort}}&q={{query | urlencode}}&t={{t}}&page={{page-1}}" tabindex="-1"{% if page==1 %} aria-disabled="true"{% endif %}>Back</a></small>
|
|
|
|
</li>
|
|
|
|
<li class="page-item{% if not next_exists %} disabled{% endif %}">
|
|
|
|
<small><a class="page-link" href="?sort={{sort}}&q={{query | urlencode}}&t={{t}}&page={{page+1}}">Next</a></small>
|
2021-10-15 14:08:27 +00:00
|
|
|
|
2021-12-01 20:23:26 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
2021-10-15 14:08:27 +00:00
|
|
|
|
2021-12-01 20:23:26 +00:00
|
|
|
{% endblock %}
|