MarseyWorld/files/templates/search.html

84 lines
3.2 KiB
HTML
Raw Normal View History

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">
2021-12-03 01:43:35 +00:00
<div class="truncate">
2021-12-03 01:44:37 +00:00
<h1 class="font-bold text-xl font-heading leading-normal mb-0 truncate ellipsis">
2021-12-03 01:43:35 +00:00
<span class="hidden md:inline-block">Search Results:</span> "{{query}}"
2021-12-01 20:23:26 +00:00
</h1>
2021-12-03 03:46:48 +00:00
<div class="flex space-x-3 divide-x divide-gray-300 text-xs">
2021-12-01 23:22:16 +00:00
<ul class="flex items-center space-x-3 leading-normal mb-0">
2021-12-01 20:29:14 +00:00
<li>
2021-12-01 23:22:16 +00:00
<a class="{{ 'font-bold text-red-600' if '/posts/' in request.path else 'text-gray-700' }}" href="/search/posts/?sort={{sort}}&q={{query | urlencode}}&t={{t}}">
2021-12-01 20:29:14 +00:00
Posts
</a>
</li>
<li>
2021-12-01 23:22:16 +00:00
<a class="{{ 'font-bold text-red-600' if '/comments/' in request.path else 'text-gray-700' }}" href="/search/comments/?sort={{sort}}&q={{query | urlencode}}&t={{t}}">
2021-12-01 20:29:14 +00:00
Comments
</a>
</li>
<li>
2021-12-01 23:22:16 +00:00
<a class="{{ 'font-bold text-red-600' if '/users/' in request.path else 'text-gray-700' }}" href="/search/users/?sort={{sort}}&q={{query | urlencode}}&t={{t}}">
2021-12-01 20:29:14 +00:00
Users
</a>
</li>
</ul>
2021-12-03 03:46:48 +00:00
<div class="hidden md:block pl-3 text-gray-500 leading-normal">
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 %}
2021-12-03 01:44:37 +00:00
<div class="ml-auto pl-3 md:pl-0">
2021-12-01 20:23:26 +00:00
{% include "/dropdowns/SearchSorts.html" %}
</div>
{% endif %}
2021-12-01 20:14:13 +00:00
</div>
2021-12-03 01:31:53 +00:00
</div>
2021-10-15 14:08:27 +00:00
{% endblock %}
{% block content %}
2021-12-03 01:46:23 +00:00
<div class="col-span-full px-4 md:px-0 py-4">
2021-12-01 20:37:23 +00:00
<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-03 01:46:23 +00:00
<div class="col-span-full px-4 md:px-0">
2021-12-01 20:36:53 +00:00
<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 %}
2021-12-03 01:46:39 +00:00
<nav aria-label="Page navigation">
2021-12-01 20:23:26 +00:00
<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 %}