summaryrefslogtreecommitdiff
path: root/searx/templates
diff options
context:
space:
mode:
Diffstat (limited to 'searx/templates')
-rw-r--r--searx/templates/default/infobox.html14
-rw-r--r--searx/templates/oscar/about.html2
-rw-r--r--searx/templates/oscar/advanced.html9
-rw-r--r--searx/templates/oscar/base.html3
-rw-r--r--searx/templates/oscar/categories.html48
-rw-r--r--searx/templates/oscar/infobox.html12
-rw-r--r--searx/templates/oscar/macros.html10
-rw-r--r--searx/templates/oscar/preferences.html12
-rw-r--r--searx/templates/oscar/results.html9
-rw-r--r--searx/templates/oscar/search.html6
-rw-r--r--searx/templates/oscar/search_full.html9
-rw-r--r--searx/templates/oscar/time-range.html14
12 files changed, 75 insertions, 73 deletions
diff --git a/searx/templates/default/infobox.html b/searx/templates/default/infobox.html
index 178a27e6d..ce26ac578 100644
--- a/searx/templates/default/infobox.html
+++ b/searx/templates/default/infobox.html
@@ -1,18 +1,18 @@
<div class="infobox">
- <h2>{{ infobox.infobox }}</h2>
+<h2><bdi>{{ infobox.infobox }}</bdi></h2>
{% if infobox.img_src %}<img src="{{ image_proxify(infobox.img_src) }}" title="{{ infobox.infobox|striptags }}" alt="{{ infobox.infobox|striptags }}" />{% endif %}
- <p>{{ infobox.entity }}</p>
- <p>{{ infobox.content | safe }}</p>
+ <p><bdi>{{ infobox.entity }}</bdi></p>
+ <p><bdi>{{ infobox.content | safe }}</bdi></p>
{% if infobox.attributes %}
<div class="attributes">
<table>
{% for attribute in infobox.attributes %}
<tr>
- <td>{{ attribute.label }}</td>
+ <td><bdi>{{ attribute.label }}</bdi></td>
{% if attribute.image %}
<td><img src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}" /></td>
{% else %}
- <td>{{ attribute.value }}</td>
+ <td><bdi>{{ attribute.value }}</bdi></td>
{% endif %}
</tr>
{% endfor %}
@@ -24,7 +24,7 @@
<div class="urls">
<ul>
{% for url in infobox.urls %}
- <li class="url"><a href="{{ url.url }}" rel="noreferrer">{{ url.title }}</a></li>
+ <li class="url"><bdi><a href="{{ url.url }}" rel="noreferrer">{{ url.title }}</a></bdi></li>
{% endfor %}
</ul>
</div>
@@ -34,7 +34,7 @@
<div class="relatedTopics">
{% for topic in infobox.relatedTopics %}
<div>
- <h3>{{ topic.name }}</h3>
+ <h3><bdi>{{ topic.name }}</bdi></h3>
{% for suggestion in topic.suggestions %}
<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
<input type="hidden" name="q" value="{{ suggestion }}">
diff --git a/searx/templates/oscar/about.html b/searx/templates/oscar/about.html
index e1f378294..39ef3663e 100644
--- a/searx/templates/oscar/about.html
+++ b/searx/templates/oscar/about.html
@@ -27,7 +27,7 @@ Searx can be added to your browser's search bar; moreover, it can be set as the
<h2>How can I make it my own?</h2>
<p>Searx appreciates your concern regarding logs, so take the <a href="https://github.com/asciimoo/searx">code</a> and run it yourself! <br />Add your Searx to this <a href="https://github.com/asciimoo/searx/wiki/Searx-instances">list</a> to help other people reclaim their privacy and make the Internet freer!
-<br />The more decentralized the Internet, is the more freedom we have!</p>
+<br />The more decentralized the Internet is, the more freedom we have!</p>
<h2>More about searx</h2>
diff --git a/searx/templates/oscar/advanced.html b/searx/templates/oscar/advanced.html
new file mode 100644
index 000000000..2c694cf5f
--- /dev/null
+++ b/searx/templates/oscar/advanced.html
@@ -0,0 +1,9 @@
+<input type="checkbox" name="advanced_search" id="check-advanced" {% if advanced_search %} checked="checked"{% endif %}>
+<label for="check-advanced">
+ <span class="glyphicon glyphicon-cog"></span>
+ {{ _('Advanced settings') }}
+</label>
+<div id="advanced-search-container">
+ {% include 'oscar/categories.html' %}
+ {% include 'oscar/time-range.html' %}
+</div>
diff --git a/searx/templates/oscar/base.html b/searx/templates/oscar/base.html
index 649d91f4d..a1f1c1a90 100644
--- a/searx/templates/oscar/base.html
+++ b/searx/templates/oscar/base.html
@@ -90,8 +90,5 @@
{% for script in scripts %}
<script src="{{ url_for('static', filename=script) }}"></script>
{% endfor %}
- <script type="text/javascript">
- $(function() { $('a[data-toggle="modal"]').attr('href', '#'); });
- </script>
</body>
</html>
diff --git a/searx/templates/oscar/categories.html b/searx/templates/oscar/categories.html
index 834cffcce..241d262ea 100644
--- a/searx/templates/oscar/categories.html
+++ b/searx/templates/oscar/categories.html
@@ -1,42 +1,14 @@
-<!-- used if scripts are disabled -->
-<noscript>
-<div id="categories" class="btn-group btn-toggle">
+<div id="categories">
{% if rtl %}
-{% for category in categories | reverse %}
- <!--<div class="checkbox">-->
- <input class="hidden" type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}_nojs" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} />
- <label class="btn btn-sm btn-primary active label_hide_if_not_checked" for="checkbox_{{ category|replace(' ', '_') }}_nojs">{{ _(category) }}</label>
- <label class="btn btn-sm btn-default label_hide_if_checked" for="checkbox_{{ category|replace(' ', '_') }}_nojs">{{ _(category) }}</label>
- <!--</div>-->
- {% if category in selected_categories %}<input class="hidden" type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}_dis_activation" name="category_{{ category }}" value="off" checked="checked"/>{% endif %}
-{% endfor %}
+ {% for category in categories | reverse %}
+ <input class="hidden" type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} />
+ <label for="checkbox_{{ category|replace(' ', '_') }}">{{ _(category) }}</label>
+ </label>
+ {% endfor %}
{% else %}
-{% for category in categories %}
- <!--<div class="checkbox">-->
- <input class="hidden" type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}_nojs" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} />
- <label class="btn btn-sm btn-primary active label_hide_if_not_checked" for="checkbox_{{ category|replace(' ', '_') }}_nojs">{{ _(category) }}</label>
- <label class="btn btn-sm btn-default label_hide_if_checked" for="checkbox_{{ category|replace(' ', '_') }}_nojs">{{ _(category) }}</label>
- <!--</div>-->
- {% if category in selected_categories %}<input class="hidden" type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}_dis_activation" name="category_{{ category }}" value="off" checked="checked"/>{% endif %}
-{% endfor %}
+ {% for category in categories %}
+ <input class="hidden" type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} />
+ <label for="checkbox_{{ category|replace(' ', '_') }}">{{ _(category) }}</label>
+ {% endfor %}
{% endif %}
</div>
-</noscript>
-
-<div id="categories" class="btn-group btn-toggle hide_if_nojs" data-toggle="buttons">
-{% if rtl %}
-{% for category in categories | reverse %}
- <label class="btn btn-sm {% if category in selected_categories %}btn-primary active{% else %}btn-default{% endif %}" data-btn-class="primary">
- <input class="hidden" type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} />{{ _(category) }}
- </label>
-{% endfor %}
-{% else %}
-{% for category in categories %}
- <label class="btn btn-sm {% if category in selected_categories %}btn-primary active{% else %}btn-default{% endif %}" data-btn-class="primary">
- <input class="hidden" type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} />{{ _(category) }}
- </label>
-{% endfor %}
-{% endif %}
-</div>
-
-
diff --git a/searx/templates/oscar/infobox.html b/searx/templates/oscar/infobox.html
index c72cfb638..70d12f2fb 100644
--- a/searx/templates/oscar/infobox.html
+++ b/searx/templates/oscar/infobox.html
@@ -1,21 +1,20 @@
<div class="panel panel-default infobox">
<div class="panel-heading">
- <bdi><h4 class="panel-title infobox_part">{{ infobox.infobox }}</h4></bdi>
+ <h4 class="panel-title infobox_part"><bdi>{{ infobox.infobox }}</bdi></h4>
</div>
<div class="panel-body">
- <bdi>
{% if infobox.img_src %}<img class="img-responsive center-block infobox_part" src="{{ image_proxify(infobox.img_src) }}" alt="{{ infobox.infobox }}" />{% endif %}
- {% if infobox.content %}<p class="infobox_part">{{ infobox.content }}</p>{% endif %}
+ {% if infobox.content %}<bdi><p class="infobox_part">{{ infobox.content }}</bdi></p>{% endif %}
{% if infobox.attributes %}
<table class="table table-striped infobox_part">
{% for attribute in infobox.attributes %}
<tr>
- <td>{{ attribute.label }}</td>
+ <td><bdi>{{ attribute.label }}</bdi></td>
{% if attribute.image %}
<td><img class="img-responsive" src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}" /></td>
{% else %}
- <td>{{ attribute.value }}</td>
+ <td><bdi>{{ attribute.value }}</bdi></td>
{% endif %}
</tr>
{% endfor %}
@@ -24,11 +23,12 @@
{% if infobox.urls %}
<div class="infobox_part">
+ <bdi>
{% for url in infobox.urls %}
<p class="btn btn-default btn-xs"><a href="{{ url.url }}" rel="noreferrer">{{ url.title }}</a></p>
{% endfor %}
+ </bdi>
</div>
{% endif %}
- </bdi>
</div>
</div>
diff --git a/searx/templates/oscar/macros.html b/searx/templates/oscar/macros.html
index a826b0e1e..bf51d5940 100644
--- a/searx/templates/oscar/macros.html
+++ b/searx/templates/oscar/macros.html
@@ -68,9 +68,11 @@
{%- endmacro %}
{% macro checkbox_toggle(id, blocked) -%}
- <div class="checkbox">
- <input class="hidden" type="checkbox" id="{{ id }}" name="{{ id }}"{% if blocked %} checked="checked"{% endif %} />
- <label class="btn btn-success label_hide_if_checked" for="{{ id }}">{{ _('Block') }}</label>
- <label class="btn btn-danger label_hide_if_not_checked" for="{{ id }}">{{ _('Allow') }}</label>
+ <div class="onoffswitch">
+ <input type="checkbox" id="{{ id }}" name="{{ id }}"{% if blocked %} checked="checked"{% endif %} class="onoffswitch-checkbox">
+ <label class="onoffswitch-label" for="{{ id }}">
+ <span class="onoffswitch-inner"></span>
+ <span class="onoffswitch-switch"></span>
+ </label>
</div>
{%- endmacro %}
diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html
index 18308bd23..0e3848b7c 100644
--- a/searx/templates/oscar/preferences.html
+++ b/searx/templates/oscar/preferences.html
@@ -36,7 +36,7 @@
<label class="col-sm-3 col-md-2">{{ _('Default categories') }}</label>
{% else %}
<label class="col-sm-3 col-md-2">{{ _('Default categories') }}</label>
- <div class="col-sm-11 col-md-10">
+ <div class="col-sm-11 col-md-10 search-categories">
{% include 'oscar/categories.html' %}
</div>
{% endif %}
@@ -164,7 +164,9 @@
{% if not search_engine.private %}
<tr>
{% if not rtl %}
- <td>{{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}</td>
+ <td class="onoff-checkbox">
+ {{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}
+ </td>
<th>{{ search_engine.name }}</th>
<td>{{ shortcuts[search_engine.name] }}</td>
<td><input type="checkbox" {{ "checked" if search_engine.safesearch==True else ""}} readonly="readonly" disabled="disabled"></td>
@@ -176,7 +178,9 @@
<td><input type="checkbox" {{ "checked" if search_engine.safesearch==True else ""}} readonly="readonly" disabled="disabled"></td>
<td>{{ shortcuts[search_engine.name] }}</td>
<th>{{ search_engine.name }}</th>
- <td>{{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}</td>
+ <td class="onoff-checkbox">
+ {{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}
+ </td>
{% endif %}
</tr>
{% endif %}
@@ -203,7 +207,9 @@
<div class="panel-body">
<div class="col-xs-6 col-sm-4 col-md-6">{{ _(plugin.description) }}</div>
<div class="col-xs-6 col-sm-4 col-md-6">
+ <div class="onoff-checkbox">
{{ checkbox_toggle('plugin_' + plugin.id, plugin.id not in allowed_plugins) }}
+ </div>
</div>
</div>
</div>
diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html
index 39cdff494..e71be325a 100644
--- a/searx/templates/oscar/results.html
+++ b/searx/templates/oscar/results.html
@@ -1,6 +1,6 @@
{% extends "oscar/base.html" %}
{% block title %}{{ q }} - {% endblock %}
-{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q }}" href="{{ url_for('index') }}?q={{ q|urlencode }}&amp;format=rss&amp;{% for category in selected_categories %}category_{{ category }}=1&amp;{% endfor %}pageno={{ pageno }}">{% endblock %}
+{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q }}" href="{{ url_for('index') }}?q={{ q|urlencode }}&amp;format=rss&amp;{% for category in selected_categories %}category_{{ category }}=1&amp;{% endfor %}pageno={{ pageno }}&amp;time_range={{ time_range }}">{% endblock %}
{% block content %}
<div class="row">
<div class="col-sm-8" id="main_results">
@@ -41,6 +41,7 @@
{% for category in selected_categories %}<input type="hidden" name="category_{{ category }}" value="1"/>{% endfor %}
<input type="hidden" name="q" value="{{ q }}" />
<input type="hidden" name="pageno" value="{{ pageno+1 }}" />
+ <input type="hidden" name="time_range" value="{{ time_range }}" />
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-backward"></span> {{ _('next page') }}</button>
</form>
</div>
@@ -48,6 +49,7 @@
<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" class="pull-left">
{% for category in selected_categories %}<input type="hidden" name="category_{{ category }}" value="1"/>{% endfor %}
<input type="hidden" name="pageno" value="{{ pageno-1 }}" />
+ <input type="hidden" name="time_range" value="{{ time_range }}" />
<button type="submit" class="btn btn-default" {% if pageno == 1 %}disabled{% endif %}><span class="glyphicon glyphicon-forward"></span> {{ _('previous page') }}</button>
</form>
</div>
@@ -60,6 +62,7 @@
<input type="hidden" name="q" value="{{ q }}" />
{% for category in selected_categories %}<input type="hidden" name="category_{{ category }}" value="1"/>{% endfor %}
<input type="hidden" name="pageno" value="{{ pageno-1 }}" />
+ <input type="hidden" name="time_range" value="{{ time_range }}" />
<button type="submit" class="btn btn-default" {% if pageno == 1 %}disabled{% endif %}><span class="glyphicon glyphicon-backward"></span> {{ _('previous page') }}</button>
</form>
</div>
@@ -68,6 +71,7 @@
{% for category in selected_categories %}<input type="hidden" name="category_{{ category }}" value="1"/>{% endfor %}
<input type="hidden" name="q" value="{{ q }}" />
<input type="hidden" name="pageno" value="{{ pageno+1 }}" />
+ <input type="hidden" name="time_range" value="{{ time_range }}" />
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-forward"></span> {{ _('next page') }}</button>
</form>
</div>
@@ -118,7 +122,7 @@
<form role="form">
<div class="form-group">
<label for="search_url">{{ _('Search URL') }}</label>
- <input id="search_url" type="url" class="form-control select-all-on-click cursor-text" name="search_url" value="{{ base_url }}?q={{ q|urlencode }}{% if selected_categories %}&amp;categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}{% if pageno > 1 %}&amp;pageno={{ pageno }}{% endif %}" readonly>
+ <input id="search_url" type="url" class="form-control select-all-on-click cursor-text" name="search_url" value="{{ base_url }}?q={{ q|urlencode }}{% if selected_categories %}&amp;categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}{% if pageno > 1 %}&amp;pageno={{ pageno }}{% endif %}{% if time_range %}&amp;time_range={{ time_range }}{% endif %}" readonly>
</div>
</form>
@@ -130,6 +134,7 @@
<input type="hidden" name="format" value="{{ output_type }}">
{% for category in selected_categories %}<input type="hidden" name="category_{{ category }}" value="1">{% endfor %}
<input type="hidden" name="pageno" value="{{ pageno }}">
+ <input type="hidden" name="time_range" value="{{ time_range }}" />
<button type="submit" class="btn btn-default">{{ output_type }}</button>
</form>
{% endfor %}
diff --git a/searx/templates/oscar/search.html b/searx/templates/oscar/search.html
index e48c80fd5..6a3b2d294 100644
--- a/searx/templates/oscar/search.html
+++ b/searx/templates/oscar/search.html
@@ -6,7 +6,7 @@
<button type="submit" class="btn btn-default"><span class="hide_if_nojs">{{ icon('search') }}</span><span class="hidden active_if_nojs">{{ _('Start search') }}</span></button>
</span>
</div>
- <div class="search_categories">
- {% include 'oscar/categories.html' %}
- </div><!-- / #search_categories -->
+ <div class="input-group col-sm-12 advanced">
+ {% include 'oscar/advanced.html' %}
+ </div>
</form><!-- / #search_form_full -->
diff --git a/searx/templates/oscar/search_full.html b/searx/templates/oscar/search_full.html
index 26dae418c..6fdae4028 100644
--- a/searx/templates/oscar/search_full.html
+++ b/searx/templates/oscar/search_full.html
@@ -11,11 +11,8 @@
<button type="submit" class="btn btn-default input-lg"><span class="hide_if_nojs">{{ icon('search') }}</span><span class="hidden active_if_nojs">{{ _('Start search') }}</span></button>
</span>
</div>
+ <div class="col-md-8 col-md-offset-2 advanced">
+ {% include 'oscar/advanced.html' %}
+ </div>
- <button type="button" class="btn btn-link btn-collapse center-block collapsed hide_if_nojs" data-toggle="collapse" data-target="#search_categories" data-btn-text-collapsed="{{ _('Show search filters') }}" data-btn-text-not-collapsed="{{ _('Hide search filters') }}">{{ _('Show search filters') }}</button>
- <div class="row collapse active_if_nojs margin_top_if_nojs" id="search_categories">
- <div class="col-md-12 text-center">
- {% include 'oscar/categories.html' %}
- </div>
- </div><!-- / #search_categories -->
</form><!-- / #search_form_full -->
diff --git a/searx/templates/oscar/time-range.html b/searx/templates/oscar/time-range.html
new file mode 100644
index 000000000..4a13c4fdb
--- /dev/null
+++ b/searx/templates/oscar/time-range.html
@@ -0,0 +1,14 @@
+<select name="time_range" id="time-range">
+ <option id="time-range-anytime" value="" {{ "selected" if time_range=="" or not time_range else ""}}>
+ {{ _('Anytime') }}
+ </option>
+ <option id="time-range-day" value="day" {{ "selected" if time_range=="day" else ""}}>
+ {{ _('Last day') }}
+ </option>
+ <option id="time-range-week" value="week" {{ "selected" if time_range=="week" else ""}}>
+ {{ _('Last week') }}
+ </option>
+ <option id="time-range-month" value="month" {{ "selected" if time_range=="month" else ""}}>
+ {{ _('Last month') }}
+ </option>
+</select>