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 %}
|
|
|
|
<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">
|
|
|
|
<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>
|
|
|
|
</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 %}
|
|
|
|
<div class="row no-gutters my-md-3">
|
|
|
|
<div class="col">
|
|
|
|
<div class="card search-results">
|
|
|
|
|
|
|
|
<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>
|
2022-08-16 16:14:10 +00:00
|
|
|
<div class="card-body pb-2">
|
2023-03-03 02:04:09 +00:00
|
|
|
<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);">
|
|
|
|
<div>
|
|
|
|
<div style="display: inline-block; width: 150px; text-align: center;">Before Date:</div>
|
2023-06-24 14:36:57 +00:00
|
|
|
<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>
|
|
|
|
<div style="display: inline-block; width: 150px; text-align: center;">After Date:</div>
|
2023-06-24 14:36:57 +00:00
|
|
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">after:2022-12-30</button>
|
2023-03-03 02:04:09 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{% if not request.path.startswith('/search/users') %}
|
2022-08-24 07:57:33 +00:00
|
|
|
<div>
|
|
|
|
<div style="display: inline-block; width: 150px; text-align: center;">Author:</div>
|
2023-06-24 14:36:57 +00:00
|
|
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">author:quadnarca</button>
|
2022-08-24 07:57:33 +00:00
|
|
|
</div>
|
2023-03-03 02:04:09 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if request.path.startswith('/search/messages') %}
|
2022-08-24 07:57:33 +00:00
|
|
|
<div>
|
2023-03-03 02:04:09 +00:00
|
|
|
<div style="display: inline-block; width: 150px; text-align: center;">Sent To:</div>
|
2023-06-24 14:36:57 +00:00
|
|
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">sentto:carpathianflorist</button>
|
2023-03-03 02:04:09 +00:00
|
|
|
</div>
|
|
|
|
{% elif request.path.startswith('/search/posts') or request.path.startswith('/search/comments') %}
|
|
|
|
<div>
|
|
|
|
<div style="display: inline-block; width: 150px; text-align: center;">{{HOLE_NAME | capitalize }}:</div>
|
2023-06-24 14:36:57 +00:00
|
|
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">{{HOLE_NAME}}:music</button>
|
2022-08-24 07:57:33 +00:00
|
|
|
</div>
|
|
|
|
{% if request.path.startswith('/search/comments') %}
|
|
|
|
<div>
|
|
|
|
<div style="display: inline-block; width: 150px; text-align: center;">Post ID:</div>
|
2023-06-24 14:36:57 +00:00
|
|
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">post:504</button>
|
2022-08-24 07:57:33 +00:00
|
|
|
</div>
|
2023-03-03 02:04:09 +00:00
|
|
|
{% elif request.path.startswith('/search/posts') %}
|
|
|
|
<div>
|
|
|
|
<div style="display: inline-block; width: 150px; text-align: center;">Domain:</div>
|
2023-06-24 14:36:57 +00:00
|
|
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">domain:reddit.com</button>
|
2023-03-03 02:04:09 +00:00
|
|
|
</div>
|
2022-08-24 07:57:33 +00:00
|
|
|
<div>
|
|
|
|
<div style="display: inline-block; width: 150px; text-align: center;">Post Title Only:</div>
|
2023-06-24 14:36:57 +00:00
|
|
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this, 'bool')" class="searchparam mb-1">title:true</button>
|
2022-08-24 07:57:33 +00:00
|
|
|
</div>
|
2023-05-14 22:52:15 +00:00
|
|
|
<div>
|
|
|
|
<div style="display: inline-block; width: 150px; text-align: center;">Exact Match Only:</div>
|
2023-06-24 14:36:57 +00:00
|
|
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this, 'bool')" class="searchparam mb-1">exact:true</button>
|
|
|
|
</div>
|
|
|
|
{% 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">over18:true</button>
|
2023-05-14 22:52:15 +00:00
|
|
|
</div>
|
2022-08-24 07:57:33 +00:00
|
|
|
{% endif %}
|
2023-03-03 02:04:09 +00:00
|
|
|
{% endif %}
|
2022-08-24 07:57:33 +00:00
|
|
|
</div>
|
2023-03-03 02:04:09 +00:00
|
|
|
</div>
|
|
|
|
<br>
|
|
|
|
<script defer src="{{'js/search.js' | asset}}"></script>
|
|
|
|
|
2022-05-04 23:09:46 +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>
|
2022-10-29 00:52:11 +00:00
|
|
|
<h4 class=" mb-0">{{query}}</h4>
|
2022-05-04 23:09:46 +00:00
|
|
|
|
2022-08-16 16:14:10 +00:00
|
|
|
{% if not '/users' in request.path %}
|
2023-02-27 17:29:43 +00:00
|
|
|
<div class="mt-3 d-flex align-items-center fl-r">
|
2023-04-27 14:30:35 +00:00
|
|
|
<div class="dropdown dropdown-actions mr-2">
|
2022-12-25 02:10:56 +00:00
|
|
|
<button type="button" class="btn btn-secondary dropdown-toggle" id="dropdownMenuButton" data-bs-toggle="dropdown">
|
2022-08-16 16:14:10 +00:00
|
|
|
{% if t=="hour" %}<i class="fas fa-clock mr-1"></i>
|
|
|
|
{% elif t=="day" %}<i class="fas fa-calendar-day mr-1"></i>
|
|
|
|
{% elif t=="week" %}<i class="fas fa-calendar-week mr-1"></i>
|
|
|
|
{% elif t=="month" %}<i class="fas fa-calendar-alt mr-1"></i>
|
|
|
|
{% elif t=="year" %}<i class="fas fa-calendar mr-1"></i>
|
|
|
|
{% elif t=="all" %}<i class="fas fa-infinity mr-1"></i>
|
|
|
|
{% endif %}
|
|
|
|
{{t | capitalize}}
|
|
|
|
</button>
|
2022-12-25 02:10:56 +00:00
|
|
|
<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-16 16:14:10 +00:00
|
|
|
{% if t != "hour" %}<a class="dropdown-item" href="?q={{query | urlencode}}&sort={{sort}}&t=hour"><i class="fas fa-clock mr-2"></i>Hour</a>{% endif %}
|
|
|
|
{% if t != "day" %}<a class="dropdown-item" href="?q={{query | urlencode}}&sort={{sort}}&t=day"><i class="fas fa-calendar-day mr-2"></i>Day</a>{% endif %}
|
|
|
|
{% if t != "week" %}<a class="dropdown-item" href="?q={{query | urlencode}}&sort={{sort}}&t=week"><i class="fas fa-calendar-week mr-2"></i>Week</a>{% endif %}
|
|
|
|
{% if t != "month" %}<a class="dropdown-item" href="?q={{query | urlencode}}&sort={{sort}}&t=month"><i class="fas fa-calendar-alt mr-2"></i>Month</a>{% endif %}
|
|
|
|
{% if t != "year" %}<a class="dropdown-item" href="?q={{query | urlencode}}&sort={{sort}}&t=year"><i class="fas fa-calendar mr-2"></i>Year</a>{% endif %}
|
|
|
|
{% if t != "all" %}<a class="dropdown-item" href="?q={{query | urlencode}}&sort={{sort}}&t=all"><i class="fas fa-infinity mr-2"></i>All</a>{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2023-04-27 14:30:35 +00:00
|
|
|
<div class="dropdown dropdown-actions ml-2">
|
2022-12-25 02:10:56 +00:00
|
|
|
<button type="button" class="btn btn-secondary dropdown-toggle" id="dropdownMenuButton2" data-bs-toggle="dropdown">
|
2023-04-27 14:30:35 +00:00
|
|
|
{% if sort=="views" %}<i class="fas fa-eye mr-1"></i>{% endif %}
|
2022-08-16 16:14:10 +00:00
|
|
|
{% if sort=="top" %}<i class="fas fa-arrow-alt-circle-up mr-1"></i>{% endif %}
|
|
|
|
{% if sort=="bottom" %}<i class="fas fa-arrow-alt-circle-down mr-1"></i>{% endif %}
|
|
|
|
{% if sort=="new" %}<i class="fas fa-sparkles mr-1"></i>{% endif %}
|
|
|
|
{% if sort=="old" %}<i class="fas fa-book mr-1"></i>{% endif %}
|
|
|
|
{% if sort=="controversial" %}<i class="fas fa-bullhorn mr-1"></i>{% endif %}
|
|
|
|
{% if sort=="comments" %}<i class="fas fa-comments mr-1"></i>{% endif %}
|
2023-04-29 15:45:05 +00:00
|
|
|
{% if sort=="subscriptions" %}<i class="fas fa-bell mr-1"></i>{% endif %}
|
|
|
|
{% if sort=="saves" %}<i class="fas fa-save mr-1"></i>{% endif %}
|
2022-08-16 16:14:10 +00:00
|
|
|
{{sort | capitalize}}
|
|
|
|
</button>
|
2022-12-25 02:10:56 +00:00
|
|
|
<div class="dropdown-menu" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 31px, 0px);">
|
2023-04-27 14:31:04 +00:00
|
|
|
{% if sort != "views" and "/posts" in request.path %}<a class="dropdown-item" href="?q={{query | urlencode}}&sort=views&t={{t}}"><i class="fas fa-eye mr-2"></i>Views</a>{% endif %}
|
2022-08-16 16:14:10 +00:00
|
|
|
{% if sort != "top" %}<a class="dropdown-item" href="?q={{query | urlencode}}&sort=top&t={{t}}"><i class="fas fa-arrow-alt-circle-up mr-2"></i>Top</a>{% endif %}
|
|
|
|
{% if sort != "bottom" %}<a class="dropdown-item" href="?q={{query | urlencode}}&sort=bottom&t={{t}}"><i class="fas fa-arrow-alt-circle-down mr-2"></i>Bottom</a>{% endif %}
|
|
|
|
{% if sort != "new" %}<a class="dropdown-item" href="?q={{query | urlencode}}&sort=new&t={{t}}"><i class="fas fa-sparkles mr-2"></i>New</a>{% endif %}
|
|
|
|
{% if sort != "old" %}<a class="dropdown-item" href="?q={{query | urlencode}}&sort=old&t={{t}}"><i class="fas fa-book mr-2"></i>Old</a>{% endif %}
|
|
|
|
{% if sort != "controversial" %}<a class="dropdown-item" href="?q={{query | urlencode}}&sort=controversial&t={{t}}"><i class="fas fa-bullhorn mr-2"></i>Controversial</a>{% endif %}
|
|
|
|
{% if sort != "comments" and "/posts" in request.path %}<a class="dropdown-item" href="?q={{query | urlencode}}&sort=comments&t={{t}}"><i class="fas fa-comments mr-2"></i>Comments</a>{% endif %}
|
2023-04-29 15:45:05 +00:00
|
|
|
{% if sort != "subscriptions" and "/posts" in request.path %}<a class="dropdown-item" href="?q={{query | urlencode}}&sort=subscriptions&t={{t}}"><i class="fas fa-bell mr-2"></i>Subscriptions</a>{% endif %}
|
2023-06-08 01:56:12 +00:00
|
|
|
{% if sort != "saves" %}<a class="dropdown-item" href="?q={{query | urlencode}}&sort=saves&t={{t}}"><i class="fas fa-save mr-2"></i>Saves</a>{% endif %}
|
2022-08-16 16:14:10 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2022-05-04 23:09:46 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-07-09 07:43:36 +00:00
|
|
|
{% if not '/users' in request.path %}
|
2022-05-04 23:09:46 +00:00
|
|
|
<div class="flex-row tab-bar sticky d-none">
|
|
|
|
<ul class="nav post-nav mr-auto">
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link{% if sort=='top' %} active{% endif %}" href="?sort=top&q={{query | urlencode}}&t={{t}}"><i class="fas fa-arrow-alt-circle-up"></i>Top</a>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link{% if sort=='bottom' %} active{% endif %}" href="?sort=bottom&q={{query | urlencode}}&t={{t}}"><i class="fas fa-arrow-alt-circle-down"></i>Bottom</a>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
2022-08-07 02:00:40 +00:00
|
|
|
<a class="nav-link{% if sort=='new' %} active{% endif %}" href="?sort=new&q={{query | urlencode}}&t={{t}}"><i class="fas fa-sparkles"></i>New</a>
|
2022-05-04 23:09:46 +00:00
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
2022-08-07 02:00:40 +00:00
|
|
|
<a class="nav-link{% if sort=='old' %} active{% endif %}" href="?sort=old&q={{query | urlencode}}&t={{t}}"><i class="fas fa-book"></i>Old</a>
|
2022-05-04 23:09:46 +00:00
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link{% if sort=='fiery' %} active{% endif %}" href="?sort=fiery&q={{query | urlencode}}&t={{t}}"><i class="fas fa-bullhorn"></i>Controversial</a>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item ">
|
|
|
|
<a class="nav-link {% if sort=='comments' %} active{% endif %}" href="/?sort=comments&q={{query | urlencode}}&t={{t}}"><i class="fas fa-comments"></i>Comments</a>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link{% if sort=='random' %} active{% endif %}" href="?sort=random&q={{query | urlencode}}&t={{t}}"><i class="fas fa-arrow-alt-circle-down"></i>Random</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<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">
|
2022-07-09 07:43:36 +00:00
|
|
|
<a class="nav-link{% if '/posts' in request.path %} active{% endif %}" href="/search/posts/?sort={{sort}}&q={{query | urlencode}}&t={{t}}">Posts</a>
|
2022-05-04 23:09:46 +00:00
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
2022-09-04 23:15:37 +00:00
|
|
|
<a class="nav-link{% if '/comments' in request.path %} active{% endif %}" href="/search/comments/?sort={{sort}}&q={{query | urlencode}}&t={{t}}">Comments</a>
|
2022-05-04 23:09:46 +00:00
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
2022-09-04 23:15:37 +00:00
|
|
|
<a class="nav-link{% if '/users' in request.path %} active{% endif %}" href="/search/users/?sort={{sort}}&q={{query | urlencode}}&t={{t}}">Users</a>
|
2022-05-04 23:09:46 +00:00
|
|
|
</li>
|
2023-02-19 19:56:52 +00:00
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link{% if '/messages' in request.path %} active{% endif %}" href="/search/messages/?sort={{sort}}&q={{query | urlencode}}&t={{t}}">Messages</a>
|
|
|
|
</li>
|
2022-05-04 23:09:46 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row no-gutters">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="posts" id="posts">
|
|
|
|
{% block listing_template %}
|
2023-06-07 23:26:32 +00:00
|
|
|
{% include "post_listing.html" %}
|
2022-05-04 23:09:46 +00:00
|
|
|
{% endblock %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
{% block pagenav %}
|
2023-05-05 21:44:24 +00:00
|
|
|
{% include "pagination.html" %}
|
2022-08-24 08:04:26 +00:00
|
|
|
{% endblock %}
|