2022-09-06 07:17:30 +00:00
|
|
|
{% extends "default.html" %}
|
2022-05-04 23:09:46 +00:00
|
|
|
{% block pagetype %}search{% endblock %}
|
2022-11-21 08:52:22 +00:00
|
|
|
{% block pagetitle %}Search for "{{query}}"{% endblock %}
|
|
|
|
{% block head_final %}
|
2023-10-29 12:51:00 +00:00
|
|
|
<meta name="description" content="{{total}} result{{'s' if total != 1 else ''}}">
|
2022-05-04 23:09:46 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
2022-08-16 16:14:10 +00:00
|
|
|
{% block PseudoSubmitForm %}
|
2023-02-19 19:59:59 +00:00
|
|
|
<form id="large_searchbar" class="form-inline search flex-nowrap mx-0 mx-lg-auto mb-0 mt-3" action="{{request.path}}" method="get">
|
2022-12-25 02:10:56 +00:00
|
|
|
<input autocomplete="off" class="form-control w-100" type="search" placeholder="Search" name="q" value="{{query}}">
|
2022-08-07 02:00:40 +00:00
|
|
|
<span class="input-group-append">
|
2023-09-15 11:01:04 +00:00
|
|
|
<span class="input-group-text border-0 bg-transparent" style="margin-left: -2.5rem">
|
2022-12-25 02:10:56 +00:00
|
|
|
<i class="fa fa-search"></i>
|
2022-08-07 02:00:40 +00:00
|
|
|
</span>
|
|
|
|
</span>
|
2023-06-30 15:24:07 +00:00
|
|
|
<input hidden type="submit">
|
2022-08-07 02:00:40 +00:00
|
|
|
</form>
|
2022-08-16 16:14:10 +00:00
|
|
|
{% endblock %}
|
2022-11-21 08:52:22 +00:00
|
|
|
{% block navbar %}{% endblock %}
|
2022-05-04 23:09:46 +00:00
|
|
|
{% block content %}
|
2023-10-29 12:51:00 +00:00
|
|
|
<div class="row no-gutters my-md-3">
|
|
|
|
<div class="col">
|
|
|
|
<div class="card search-results">
|
2022-05-04 23:09:46 +00:00
|
|
|
|
2023-10-29 12:51:00 +00:00
|
|
|
<div class="card-header bg-white d-none">
|
|
|
|
<ul class="list-inline no-bullets mb-0">
|
|
|
|
<li class="list-inline-item active mr-4"><i class="fas fa-align-left text-gray-400"></i></li>
|
|
|
|
<li class="list-inline-item"><i class="fas fa-link text-gray-400"></i></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="card-body pb-2">
|
|
|
|
<div>
|
|
|
|
<div id="searchparams-dropdown" class="dropdown dropdown-actions">
|
|
|
|
<button type="button" class="btn btn-secondary dropdown-toggle" id="dropdownMenuButton2" data-bs-toggle="dropdown" data-bs-display="static"><strong>Advanced search parameters (with examples)</strong></button>
|
|
|
|
<div class="dropdown-menu" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 31px, 0px)">
|
2022-08-24 07:57:33 +00:00
|
|
|
<div>
|
2023-10-29 12:51:00 +00:00
|
|
|
<div style="display: inline-block; width: 150px; text-align: center">Before Date:</div>
|
|
|
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">before:2022-12-30</button>
|
2023-03-03 02:04:09 +00:00
|
|
|
</div>
|
|
|
|
<div>
|
2023-10-29 12:51:00 +00:00
|
|
|
<div style="display: inline-block; width: 150px; text-align: center">After Date:</div>
|
|
|
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">after:2022-12-30</button>
|
2022-08-24 07:57:33 +00:00
|
|
|
</div>
|
2023-10-29 12:51:00 +00:00
|
|
|
|
|
|
|
{% if not request.path.startswith('/search/users') %}
|
2023-03-03 02:04:09 +00:00
|
|
|
<div>
|
2023-10-29 12:51:00 +00:00
|
|
|
<div style="display: inline-block; width: 150px; text-align: center">Author:</div>
|
|
|
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">author:quadnarca</button>
|
2023-03-03 02:04:09 +00:00
|
|
|
</div>
|
2023-10-29 12:51:00 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if request.path.startswith('/search/messages') %}
|
2022-08-24 07:57:33 +00:00
|
|
|
<div>
|
2023-10-29 12:51:00 +00:00
|
|
|
<div style="display: inline-block; width: 150px; text-align: center">Sent To:</div>
|
|
|
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">sentto:carpathianflorist</button>
|
2022-08-24 07:57:33 +00:00
|
|
|
</div>
|
2023-10-29 12:51:00 +00:00
|
|
|
{% elif request.path.startswith('/search/posts') or request.path.startswith('/search/comments') %}
|
2023-05-14 22:52:15 +00:00
|
|
|
<div>
|
2023-10-29 12:51:00 +00:00
|
|
|
<div style="display: inline-block; width: 150px; text-align: center">Hole:</div>
|
|
|
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">hole:music</button>
|
2023-06-24 14:36:57 +00:00
|
|
|
</div>
|
2023-10-29 12:51:00 +00:00
|
|
|
{% if request.path.startswith('/search/comments') %}
|
|
|
|
<div>
|
|
|
|
<div style="display: inline-block; width: 150px; text-align: center">Post ID:</div>
|
|
|
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">post:504</button>
|
|
|
|
</div>
|
|
|
|
{% elif request.path.startswith('/search/posts') %}
|
|
|
|
<div>
|
|
|
|
<div style="display: inline-block; width: 150px; text-align: center">Domain:</div>
|
|
|
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">domain:reddit.com</button>
|
|
|
|
</div>
|
2023-10-13 19:37:40 +00:00
|
|
|
<div>
|
2023-10-29 12:51:00 +00:00
|
|
|
<div style="display: inline-block; width: 150px; text-align: center">Post Title Only:</div>
|
|
|
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this, 'bool')" class="searchparam mb-1">title:true</button>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div style="display: inline-block; width: 150px; text-align: center">Exact Match Only:</div>
|
|
|
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this, 'bool')" class="searchparam mb-1">exact:true</button>
|
|
|
|
</div>
|
|
|
|
{% if SITE_NAME != 'WPD' %}
|
|
|
|
<div>
|
|
|
|
<div style="display: inline-block; width: 150px; text-align: center">Subreddit:</div>
|
|
|
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">subreddit:menslib</button>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{% if FEATURES['NSFW_MARKING'] %}
|
|
|
|
<div>
|
|
|
|
<div style="display: inline-block; width: 150px; text-align: center">NSFW Only:</div>
|
|
|
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this, 'bool')" class="searchparam mb-1">nsfw:true</button>
|
2023-10-13 19:37:40 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2024-02-07 00:13:00 +00:00
|
|
|
{% if request.path.startswith('/search/posts') %}
|
|
|
|
<div>
|
2024-02-07 00:18:41 +00:00
|
|
|
<div style="display: inline-block; width: 150px; text-align: center">Effortposts Only:</div>
|
2024-02-07 00:13:00 +00:00
|
|
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this, 'bool')" class="searchparam mb-1">effortpost:true</button>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2023-06-24 14:36:57 +00:00
|
|
|
{% endif %}
|
2023-10-29 12:51:00 +00:00
|
|
|
</div>
|
2022-08-24 07:57:33 +00:00
|
|
|
</div>
|
2023-10-29 12:51:00 +00:00
|
|
|
<br>
|
|
|
|
<script defer src="{{'js/search.js' | asset}}"></script>
|
2023-03-03 02:04:09 +00:00
|
|
|
|
2023-10-29 12:51:00 +00:00
|
|
|
<div class="text-muted text-small mb-1">Showing {% block listinglength %}{{listing | length}}{% endblock %} of {{total}} result{{'s' if total != 1 else ''}} for</div>
|
|
|
|
<h4 class=" mb-0">{{query}}</h4>
|
2022-05-04 23:09:46 +00:00
|
|
|
|
2023-10-29 12:51:00 +00:00
|
|
|
{% if not '/users' in request.path %}
|
|
|
|
<div class="mt-3 d-flex align-items-center fl-r">
|
|
|
|
{%- import 'util/macros.html' as macros with context -%}
|
|
|
|
{{- macros.time_filter_buttons() -}}
|
|
|
|
{% if "/posts" in request.path %}
|
|
|
|
{{- macros.sorting_buttons(POST_SORTS) -}}
|
|
|
|
{% else %}
|
|
|
|
{{- macros.sorting_buttons(COMMENT_SORTS) -}}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2022-05-04 23:09:46 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-10-29 12:51:00 +00:00
|
|
|
<div class="row no-gutters">
|
|
|
|
<div class="col">
|
|
|
|
<div class="flex-row box-shadow-bottom d-flex justify-content-center justify-content-md-between align-items-center">
|
|
|
|
<ul class="nav settings-nav">
|
|
|
|
<li class="nav-item">
|
2024-02-06 04:20:52 +00:00
|
|
|
<a class="nav-link{% if '/posts' in request.path %} active{% endif %}" href="/search/posts/?q={{query | urlencode}}">Posts</a>
|
2023-10-29 12:51:00 +00:00
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
2024-02-06 04:20:52 +00:00
|
|
|
<a class="nav-link{% if '/comments' in request.path %} active{% endif %}" href="/search/comments/?q={{query | urlencode}}">Comments</a>
|
2023-10-29 12:51:00 +00:00
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
2024-02-06 04:20:52 +00:00
|
|
|
<a class="nav-link{% if '/users' in request.path %} active{% endif %}" href="/search/users/?q={{query | urlencode}}">Users</a>
|
2023-10-29 12:51:00 +00:00
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
2024-02-06 04:20:52 +00:00
|
|
|
<a class="nav-link{% if '/messages' in request.path %} active{% endif %}" href="/search/messages/?q={{query | urlencode}}">Messages</a>
|
2023-10-29 12:51:00 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2022-05-04 23:09:46 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-10-29 12:51:00 +00:00
|
|
|
<div class="row no-gutters">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="posts">
|
|
|
|
{% block listing_template %}
|
|
|
|
{% include "post_listing.html" %}
|
|
|
|
{% endblock %}
|
|
|
|
</div>
|
2022-05-04 23:09:46 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-07-25 22:37:54 +00:00
|
|
|
{% endblock %}
|
|
|
|
{% block pagenav %}
|
2023-10-29 12:51:00 +00:00
|
|
|
{% include "pagination.html" %}
|
2023-07-25 22:37:54 +00:00
|
|
|
{% endblock %}
|