summaryrefslogtreecommitdiff
path: root/searx/templates
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2020-06-09 08:29:48 +0000
committerGitHub <noreply@github.com>2020-06-09 08:29:48 +0000
commit2b1f73ad49b6f228830fd07c5cde8be0dcb29cd5 (patch)
tree8ade565942e41583473189cd1a674156f33be045 /searx/templates
parentb85d845636ec36bdd98d4d5cea21dd0d82fcdec9 (diff)
parent785f0938fdc6c0b587d5f416f005ab5046260ba6 (diff)
downloadsearxng-2b1f73ad49b6f228830fd07c5cde8be0dcb29cd5.tar.gz
searxng-2b1f73ad49b6f228830fd07c5cde8be0dcb29cd5.zip
Merge branch 'master' into about-opensearch
Diffstat (limited to 'searx/templates')
-rw-r--r--searx/templates/courgette/base.html2
-rw-r--r--searx/templates/courgette/preferences.html4
-rw-r--r--searx/templates/courgette/result_templates/code.html2
-rw-r--r--searx/templates/courgette/result_templates/default.html2
-rw-r--r--searx/templates/courgette/result_templates/images.html2
-rw-r--r--searx/templates/courgette/result_templates/key-value.html2
-rw-r--r--searx/templates/courgette/result_templates/map.html2
-rw-r--r--searx/templates/courgette/result_templates/torrent.html2
-rw-r--r--searx/templates/courgette/result_templates/videos.html2
-rw-r--r--searx/templates/legacy/base.html2
-rw-r--r--searx/templates/legacy/preferences.html4
-rw-r--r--searx/templates/legacy/result_templates/code.html2
-rw-r--r--searx/templates/legacy/result_templates/default.html2
-rw-r--r--searx/templates/legacy/result_templates/images.html2
-rw-r--r--searx/templates/legacy/result_templates/key-value.html2
-rw-r--r--searx/templates/legacy/result_templates/map.html2
-rw-r--r--searx/templates/legacy/result_templates/torrent.html2
-rw-r--r--searx/templates/legacy/result_templates/videos.html2
-rw-r--r--searx/templates/oscar/base.html2
-rw-r--r--searx/templates/oscar/infobox.html6
-rw-r--r--searx/templates/oscar/results.html4
-rw-r--r--searx/templates/simple/base.html2
-rw-r--r--searx/templates/simple/macros.html2
23 files changed, 33 insertions, 23 deletions
diff --git a/searx/templates/courgette/base.html b/searx/templates/courgette/base.html
index 8e272585c..f4c61dac2 100644
--- a/searx/templates/courgette/base.html
+++ b/searx/templates/courgette/base.html
@@ -29,7 +29,7 @@
searx.autocompleter = {% if autocomplete %}true{% else %}false{% endif %};
</script>
</head>
- <body>
+ <body class="{{ endpoint }}_endpoint" >
<div id="container">
{% block content %}
{% endblock %}
diff --git a/searx/templates/courgette/preferences.html b/searx/templates/courgette/preferences.html
index 56a6e0202..c67f7662b 100644
--- a/searx/templates/courgette/preferences.html
+++ b/searx/templates/courgette/preferences.html
@@ -98,6 +98,7 @@
<table class="engine-table">
<tr>
<th>{{ _('Engine name') }}</th>
+ <th>{{ _('Shortcut') }}</th>
<th>{{ _('Category') }}</th>
<th>{{ _('Allow') }} / {{ _('Block') }}</th>
</tr>
@@ -106,7 +107,8 @@
{% if not search_engine.private %}
<tr>
- <td>{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})&lrm;</td>
+ <td>{{ search_engine.name }}</td>
+ <td>{{ shortcuts[search_engine.name] }}</td>
<td>{{ _(categ) }}</td>
<td class="engine_checkbox">
<input type="checkbox" id="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}" name="engine_{{ search_engine.name }}__{{ categ }}"{% if (search_engine.name, categ) in disabled_engines %} checked="checked"{% endif %} />
diff --git a/searx/templates/courgette/result_templates/code.html b/searx/templates/courgette/result_templates/code.html
index d6dbd5ed7..b83116ec2 100644
--- a/searx/templates/courgette/result_templates/code.html
+++ b/searx/templates/courgette/result_templates/code.html
@@ -1,4 +1,4 @@
-<div class="result {{ result.class }}">
+<div class="result {{ result.class }}{% for e in result.engines %} {{ e }}{% endfor %}">
<h3 class="result_title"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3>
{% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span>{% endif %}
<p class="content">{% if result.img_src %}<img src="{{ image_proxify(result.img_src) }}" class="image" />{% endif %}{% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p>
diff --git a/searx/templates/courgette/result_templates/default.html b/searx/templates/courgette/result_templates/default.html
index 5f2ead63f..1cbedc32b 100644
--- a/searx/templates/courgette/result_templates/default.html
+++ b/searx/templates/courgette/result_templates/default.html
@@ -1,4 +1,4 @@
-<div class="result {{ result.class }}">
+<div class="result {{ result.class }}{% for e in result.engines %} {{ e }}{% endfor %}">
{% if "icon_"~result.engine~".ico" in favicons %}
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
diff --git a/searx/templates/courgette/result_templates/images.html b/searx/templates/courgette/result_templates/images.html
index 49acb3b61..e8ac5072b 100644
--- a/searx/templates/courgette/result_templates/images.html
+++ b/searx/templates/courgette/result_templates/images.html
@@ -1,4 +1,4 @@
-<div class="image_result">
+<div class="image_result{% for e in result.engines %} {{ e }}{% endfor %}">
<p>
<a href="{{ result.img_src }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img src="{% if result.thumbnail_src %}{{ image_proxify(result.thumbnail_src) }}{% else %}{{ image_proxify(result.img_src) }}{% endif %}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a>
<span class="url"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} class="small_font">{{ _('original context') }}</a></span>
diff --git a/searx/templates/courgette/result_templates/key-value.html b/searx/templates/courgette/result_templates/key-value.html
index 789e8de92..e9382b8d8 100644
--- a/searx/templates/courgette/result_templates/key-value.html
+++ b/searx/templates/courgette/result_templates/key-value.html
@@ -1,4 +1,4 @@
-<div class="result">
+<div class="result{% for e in result.engines %} {{ e }}{% endfor %}">
<table>
{% for key, value in result.items() %}
{% if key in ['engine', 'engines', 'template', 'score', 'category', 'positions'] %}
diff --git a/searx/templates/courgette/result_templates/map.html b/searx/templates/courgette/result_templates/map.html
index 5f2ead63f..1cbedc32b 100644
--- a/searx/templates/courgette/result_templates/map.html
+++ b/searx/templates/courgette/result_templates/map.html
@@ -1,4 +1,4 @@
-<div class="result {{ result.class }}">
+<div class="result {{ result.class }}{% for e in result.engines %} {{ e }}{% endfor %}">
{% if "icon_"~result.engine~".ico" in favicons %}
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
diff --git a/searx/templates/courgette/result_templates/torrent.html b/searx/templates/courgette/result_templates/torrent.html
index 7f94a221e..8b9a68fa9 100644
--- a/searx/templates/courgette/result_templates/torrent.html
+++ b/searx/templates/courgette/result_templates/torrent.html
@@ -1,4 +1,4 @@
-<div class="result torrent_result">
+<div class="result torrent_result{% for e in result.engines %} {{ e }}{% endfor %}">
{% if "icon_"~result.engine~".ico" in favicons %}
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
{% endif %}
diff --git a/searx/templates/courgette/result_templates/videos.html b/searx/templates/courgette/result_templates/videos.html
index b3e19e024..576c483eb 100644
--- a/searx/templates/courgette/result_templates/videos.html
+++ b/searx/templates/courgette/result_templates/videos.html
@@ -1,4 +1,4 @@
-<div class="result">
+<div class="result{% for e in result.engines %} {{ e }}{% endfor %}">
{% if "icon_"~result.engine~".ico" in favicons %}
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
{% endif %}
diff --git a/searx/templates/legacy/base.html b/searx/templates/legacy/base.html
index da19741cb..21fe42e16 100644
--- a/searx/templates/legacy/base.html
+++ b/searx/templates/legacy/base.html
@@ -20,7 +20,7 @@
<link title="{{ instance_name }}" type="application/opensearchdescription+xml" rel="search" href="{{ url_for('opensearch') }}"/>
{% endblock %}
</head>
- <body>
+ <body class="{{ endpoint }}_endpoint" >
<div id="container">
{% block content %}
{% endblock %}
diff --git a/searx/templates/legacy/preferences.html b/searx/templates/legacy/preferences.html
index f418dcd5b..414b3f6c0 100644
--- a/searx/templates/legacy/preferences.html
+++ b/searx/templates/legacy/preferences.html
@@ -95,6 +95,7 @@
<table>
<tr>
<th>{{ _('Engine name') }}</th>
+ <th>{{ _('Shortcut') }}</th>
<th>{{ _('Category') }}</th>
<th>{{ _('Allow') }} / {{ _('Block') }}</th>
</tr>
@@ -103,7 +104,8 @@
{% if not search_engine.private %}
<tr>
- <td>{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})&lrm;</td>
+ <td>{{ search_engine.name }}</td>
+ <td>{{ shortcuts[search_engine.name] }}</td>
<td>{{ _(categ) }}</td>
<td class="engine_checkbox">
<input type="checkbox" id="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}" name="engine_{{ search_engine.name }}__{{ categ }}"{% if (search_engine.name, categ) in disabled_engines %} checked="checked"{% endif %} />
diff --git a/searx/templates/legacy/result_templates/code.html b/searx/templates/legacy/result_templates/code.html
index fee6c8221..ea89563ef 100644
--- a/searx/templates/legacy/result_templates/code.html
+++ b/searx/templates/legacy/result_templates/code.html
@@ -1,4 +1,4 @@
-<div class="result {{ result.class }}">
+<div class="result {{ result.class }}{% for e in result.engines %} {{ e }}{% endfor %}">
<h3 class="result_title"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3>
<p class="url">{{ result.pretty_url }}&lrm; <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ _('cached') }}</a></p>
{% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
diff --git a/searx/templates/legacy/result_templates/default.html b/searx/templates/legacy/result_templates/default.html
index da091174d..13e2d2913 100644
--- a/searx/templates/legacy/result_templates/default.html
+++ b/searx/templates/legacy/result_templates/default.html
@@ -1,4 +1,4 @@
-<div class="result {{ result.class }}">
+<div class="result {{ result.class }}{% for e in result.engines %} {{ e }}{% endfor %}">
<h3 class="result_title">{% if "icon_"~result.engine~".ico" in favicons %}<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />{% endif %}<a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3>
<p class="url">{{ result.pretty_url }}&lrm; <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ _('cached') }}</a>
{% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span>{% endif %}</p>
diff --git a/searx/templates/legacy/result_templates/images.html b/searx/templates/legacy/result_templates/images.html
index 00f62abcc..514cdf8bc 100644
--- a/searx/templates/legacy/result_templates/images.html
+++ b/searx/templates/legacy/result_templates/images.html
@@ -1,4 +1,4 @@
-<div class="image_result">
+<div class="image_result{% for e in result.engines %} {{ e }}{% endfor %}">
<p>
<a href="{{ result.img_src }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img src="{% if result.thumbnail_src %}{{ image_proxify(result.thumbnail_src) }}{% else %}{{ image_proxify(result.img_src) }}{% endif %}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}" /></a>
<span class="url"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} class="small_font">{{ _('original context') }}</a></span>
diff --git a/searx/templates/legacy/result_templates/key-value.html b/searx/templates/legacy/result_templates/key-value.html
index a5bb509d9..15717a1a8 100644
--- a/searx/templates/legacy/result_templates/key-value.html
+++ b/searx/templates/legacy/result_templates/key-value.html
@@ -1,4 +1,4 @@
-<table class="result-table">
+<table class="result-table{% for e in result.engines %} {{ e }}{% endfor %}">
{% for key, value in result.items() %}
{% if key in ['engine', 'engines', 'template', 'score', 'category', 'positions'] %}
{% continue %}
diff --git a/searx/templates/legacy/result_templates/map.html b/searx/templates/legacy/result_templates/map.html
index 0200e0f6b..6937ba459 100644
--- a/searx/templates/legacy/result_templates/map.html
+++ b/searx/templates/legacy/result_templates/map.html
@@ -1,4 +1,4 @@
-<div class="result {{ result.class }}">
+<div class="result {{ result.class }}{% for e in result.engines %} {{ e }}{% endfor %}">
{% if "icon_"~result.engine~".ico" in favicons %}
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
diff --git a/searx/templates/legacy/result_templates/torrent.html b/searx/templates/legacy/result_templates/torrent.html
index 068e05373..f251496bf 100644
--- a/searx/templates/legacy/result_templates/torrent.html
+++ b/searx/templates/legacy/result_templates/torrent.html
@@ -1,4 +1,4 @@
-<div class="result torrent_result">
+<div class="result torrent_result{% for e in result.engines %} {{ e }}{% endfor %}">
{% if "icon_"~result.engine~".ico" in favicons %}
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
{% endif %}
diff --git a/searx/templates/legacy/result_templates/videos.html b/searx/templates/legacy/result_templates/videos.html
index 727f44c71..50f4d1e98 100644
--- a/searx/templates/legacy/result_templates/videos.html
+++ b/searx/templates/legacy/result_templates/videos.html
@@ -1,4 +1,4 @@
-<div class="result">
+<div class="result{% for e in result.engines %} {{ e }}{% endfor %}">
<h3 class="result_title">{% if "icon_"~result.engine~".ico" in favicons %}<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />{% endif %}<a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3>
{% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span><br />{% endif %}
<a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img class="thumbnail" src="{{ image_proxify(result.thumbnail) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a>
diff --git a/searx/templates/oscar/base.html b/searx/templates/oscar/base.html
index 5eb4462e4..cd3d23df5 100644
--- a/searx/templates/oscar/base.html
+++ b/searx/templates/oscar/base.html
@@ -47,7 +47,7 @@
</style>
</noscript>
</head>
-<body>
+<body class="{{ endpoint }}_endpoint" >
{% include 'oscar/navbar.html' %}
<div class="container">
diff --git a/searx/templates/oscar/infobox.html b/searx/templates/oscar/infobox.html
index 9802f11e2..de595b922 100644
--- a/searx/templates/oscar/infobox.html
+++ b/searx/templates/oscar/infobox.html
@@ -16,7 +16,11 @@
{%- if attribute.image -%}
<td><img class="img-responsive" src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}" /></td>
{%- else -%}
- <td><bdi>{{ attribute.value }}</bdi></td>
+ {% if attribute.label == 'Instance of' %}
+ <td><bdi><a href="https://wikidata.org/wiki/{{ attribute.value.id }}">{{ attribute.value.id }}</a></bdi></td>
+ {% else %}
+ <td><bdi>{{ attribute.value }}</bdi></td>
+ {%- endif -%}
{%- endif -%}
</tr>
{% endfor -%}
diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html
index 43e3e26d9..fc4efadfa 100644
--- a/searx/templates/oscar/results.html
+++ b/searx/templates/oscar/results.html
@@ -72,6 +72,8 @@
</form>
{% endfor %}
<div class="clearfix"></div>
+ <br /><label><a href="{{ search_url() }}&amp;format=rss">{{ _('RSS subscription') }}</a></label>
+ <div class="clearfix"></div>
</div>
</div>
</div><!-- /#sidebar_results -->
@@ -100,7 +102,7 @@
{%- endif %}
{% for result in results -%}
- <div class="result {% if result['template'] %}result-{{ result.template|replace('.html', '') }}{% else %}result-default{% endif %}">
+ <div class="result {% if result['template'] %}result-{{ result.template|replace('.html', '') }}{% else %}result-default{% endif %}{% for e in result.engines %} {{ e }}{% endfor %}">
{%- set index = loop.index -%}
{%- if result.template -%}
{% include get_result_template('oscar', result['template']) %}
diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html
index 71df123ea..650ef771c 100644
--- a/searx/templates/simple/base.html
+++ b/searx/templates/simple/base.html
@@ -32,7 +32,7 @@
{% endblock %}
<link rel="shortcut icon" href="{{ url_for('static', filename='img/favicon.png') }}" />
</head>
-<body>
+<body class="{{ endpoint }}_endpoint" >
<main id="main_{{ self._TemplateReference__context.name|replace("simple/", "")|replace(".html", "") }}">
{% if errors %}
<div class="dialog-error" role="alert">
diff --git a/searx/templates/simple/macros.html b/searx/templates/simple/macros.html
index f0b36276c..cacbbec9f 100644
--- a/searx/templates/simple/macros.html
+++ b/searx/templates/simple/macros.html
@@ -26,7 +26,7 @@
<!-- Draw result header -->
{% macro result_header(result, favicons, image_proxify) -%}
-<article class="result {% if result['template'] %}result-{{ result.template|replace('.html', '') }}{% else %}result-default{% endif %} {% if result['category'] %}category-{{ result['category'] }}{% endif %}">
+<article class="result {% if result['template'] %}result-{{ result.template|replace('.html', '') }}{% else %}result-default{% endif %} {% if result['category'] %}category-{{ result['category'] }}{% endif %}{% for e in result.engines %} {{ e }}{% endfor %}">
{%- if result.img_src %}{{ result_open_link(result.url) }}<img class="image" src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}" title="{{ result.title|striptags }}" class="image" />{{ result_close_link() }}{% endif -%}
{%- if result.thumbnail %}{{ result_open_link(result.url) }}<img class="thumbnail" src="{{ image_proxify(result.thumbnail) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/>{{ result_close_link() }}{% endif -%}
<h3>{{ result_link(result.url, result.title|safe) }}</h3>