pyfedi/app/templates/search/start.html

81 lines
5.8 KiB
HTML
Raw Normal View History

2024-03-01 20:32:29 +13:00
{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
{% extends 'themes/' + theme() + '/base.html' %}
{% else %}
{% extends "base.html" %}
{% endif %} %}
{% from 'bootstrap/form.html' import render_form %}
{% block app_content %}
<div class="row">
<div class="col mx-auto">
2024-03-01 21:57:36 +13:00
<div class="card mt-5" style="width: 500px; max-width: 100%;">
2024-03-01 20:32:29 +13:00
<div class="card-body p-6">
<div class="card-title">{{ _('Search for posts') }}</div>
<form action="" method="get" class="form" role="form">
2024-09-03 18:50:11 +12:00
<div class="form-group"><label class="form-control-label" for="search_term" aria-label="Search here">{{ _('Keyword') }} ({{ _('optional') }})</label>
<input autofocus="" class="form-control" id="search_term" name="q" type="search" value="">
2024-03-01 20:32:29 +13:00
</div>
2024-09-03 18:50:11 +12:00
<div class="form-group"><label class="form-control-label" for="community" aria-label="Restrict results by community">{{ _('Community') }}</label>
<select class="form-control form-select" id="community" name="community">
2024-05-09 20:00:22 +12:00
<option value="0">{{ _('All') }}</option>
{% for community in communities %}
<option value="{{ community.id }}">{{ community.display_name() }}</option>
{% endfor %}
</select>
</div>
2024-09-03 18:50:11 +12:00
<div class="form-group"><label class="form-control-label" for="type" aria-label="Restrict results by type">{{ _('Type') }}</label>
<select class="form-control form-select" id="type" name="type">
<option value="0">{{ _('All') }}</option>
<option value="{{ POST_TYPE_ARTICLE }}">{{ _('Discussion') }}</option>
<option value="{{ POST_TYPE_LINK }}">{{ _('Link') }}</option>
<option value="{{ POST_TYPE_IMAGE }}">{{ _('Image') }}</option>
<option value="{{ POST_TYPE_VIDEO }}">{{ _('Video') }}</option>
<option value="{{ POST_TYPE_POLL }}">{{ _('Poll') }}</option>
</select>
</div>
2024-05-09 20:00:22 +12:00
<div class="form-group"><label class="form-control-label" for="language" aria-label="Restrict results by language">{{ _('Language') }}</label>
2024-09-03 18:50:11 +12:00
<select class="form-control form-select" id="language" name="language">
2024-05-09 20:00:22 +12:00
<option value="0">{{ _('All') }}</option>
{% for language in languages %}
<option value="{{ language.id }}">{{ language.name }}</option>
{% endfor %}
</select>
</div>
2024-09-03 18:50:11 +12:00
<div class="form-group"><label class="form-control-label" for="type" aria-label="Sort results">{{ _('Sort by') }}</label>
<select class="form-control form-select" id="sort_by" name="sort_by">
<option value="">{{ _('Relevance') }}</option>
<option value="date">{{ _('Recent first') }}</option>
<option value="top">{{ _('Top') }}</option>
</select>
</div>
2024-03-01 20:32:29 +13:00
<input class="btn btn-primary btn-md" id="submit" name="submit" type="submit" value="Search">
</form>
2024-03-01 21:57:36 +13:00
<h6 class="mt-5">{{ _('Example searches:') }} </h6>
<table class="table">
<tr>
<td nowrap="nowrap"><p>{{ _('star wars') }}</p></td>
<td><p>{{ _('There is an implied "and" here. Results will have both words somewhere in them.') }}</p></td>
</tr>
<tr>
<td nowrap="nowrap"><p>{{ _('star or wars') }}</p></td>
<td><p>{{ _('This will broaden the search to include results that contain any of the words.') }}</p></td>
</tr>
<tr>
<td nowrap="nowrap"><p>{{ _('star -wars') }}</p></td>
<td><p>{{ _('To search for things containing "star" but not "wars" you can put a - before the word you want to exclude.') }}</p></td>
</tr>
<tr>
<td nowrap="nowrap"><p>{{ _('"star wars"') }}</p></td>
<td><p>{{ _('Results will have exactly that phrase in them.') }}</p></td>
</tr>
</table>
2024-05-28 15:40:09 +12:00
<h6 class="mt-5">{{ _('Trying to add a communitiy or post from another instance?') }} </h6>
<p>{{ _('In many types of federated platforms you can put a URL of a post or community into the search in order to add it to your local instance. In PieFed the search is just for searching.') }}</p>
<p><a href="{{ url_for('community.add_remote') }}" class="btn btn-primary">{{ _('Add remote community') }}</a></p>
<p><a href="{{ url_for('search.retrieve_remote_post') }}" class="btn btn-primary">{{ _('Retrieve remote post') }}</a></p>
2024-03-01 20:32:29 +13:00
</div>
</div>
</div>
</div>
{% endblock %}