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-05-09 20:00:22 +12:00
< div class = "form-group required" > < label class = "form-control-label" for = "search_term" aria-label = "Search here" > {{ _('Keyword') }}< / label >
2024-03-01 20:32:29 +13:00
< input autofocus = "" class = "form-control" id = "search_term" name = "q" required = "" type = "search" value = "" >
< / div >
2024-05-09 20:00:22 +12:00
< div class = "form-group" > < label class = "form-control-label" for = "community" aria-label = "Restrict results by language" > {{ _('Community') }}< / label >
< select class = "form-control" id = "community" name = "community" >
< option value = "0" > {{ _('All') }}< / option >
{% for community in communities %}
< option value = "{{ community.id }}" > {{ community.display_name() }}< / option >
{% endfor %}
< / select >
< / div >
< div class = "form-group" > < label class = "form-control-label" for = "language" aria-label = "Restrict results by language" > {{ _('Language') }}< / label >
< select class = "form-control" id = "language" name = "language" >
< option value = "0" > {{ _('All') }}< / option >
{% for language in languages %}
< option value = "{{ language.id }}" > {{ language.name }}< / option >
{% endfor %}
< / 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 >
2024-05-28 22:28:03 +01:00
< 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 %}