From 740594a4b73952ad3f5fa52dd1bb939c73dcc7c2 Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Sun, 2 Nov 2014 13:00:28 +0100 Subject: [enh] oscar_template: initial osm-map support for map results * TODO: remove leaflet.min.css if not required --- searx/templates/courgette/result_templates/map.html | 13 +++++++++++++ searx/templates/default/result_templates/map.html | 13 +++++++++++++ searx/templates/oscar/base.html | 6 ++++-- searx/templates/oscar/result_templates/default.html | 2 ++ searx/templates/oscar/result_templates/images.html | 1 + searx/templates/oscar/result_templates/map.html | 18 ++++++++++++++++++ searx/templates/oscar/result_templates/torrent.html | 2 ++ searx/templates/oscar/result_templates/videos.html | 2 ++ 8 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 searx/templates/courgette/result_templates/map.html create mode 100644 searx/templates/default/result_templates/map.html create mode 100644 searx/templates/oscar/result_templates/map.html (limited to 'searx/templates') diff --git a/searx/templates/courgette/result_templates/map.html b/searx/templates/courgette/result_templates/map.html new file mode 100644 index 000000000..734f9066c --- /dev/null +++ b/searx/templates/courgette/result_templates/map.html @@ -0,0 +1,13 @@ +
+ + {% if result['favicon'] %} + + {% endif %} + +
+

{{ result.title|safe }}

+ {% if result.publishedDate %}

{{ result.publishedDate }}

{% endif %} +

{% if result.content %}{{ result.content|safe }}
{% endif %}

+

{{ result.pretty_url }}

+
+
diff --git a/searx/templates/default/result_templates/map.html b/searx/templates/default/result_templates/map.html new file mode 100644 index 000000000..78221aa01 --- /dev/null +++ b/searx/templates/default/result_templates/map.html @@ -0,0 +1,13 @@ +
+ + {% if result['favicon'] %} + + {% endif %} + +
+

{{ result.title|safe }}

+

{{ result.pretty_url }} cached

+ {% if result.publishedDate %}

{{ result.publishedDate }}

{% endif %} +

{% if result.img_src %}{% endif %}{% if result.content %}{{ result.content|safe }}
{% endif %}

+
+
diff --git a/searx/templates/oscar/base.html b/searx/templates/oscar/base.html index 544820060..8c4dd3edc 100644 --- a/searx/templates/oscar/base.html +++ b/searx/templates/oscar/base.html @@ -10,7 +10,8 @@ - + + diff --git a/searx/templates/oscar/result_templates/default.html b/searx/templates/oscar/result_templates/default.html index 3b0963816..018a29e0e 100644 --- a/searx/templates/oscar/result_templates/default.html +++ b/searx/templates/oscar/result_templates/default.html @@ -4,5 +4,7 @@ {% if result.content %}

{{ result.content|safe }}

{% endif %} +
+ {{ result.engine }}

{{ result.pretty_url }}

diff --git a/searx/templates/oscar/result_templates/images.html b/searx/templates/oscar/result_templates/images.html index 5570a3143..578df4595 100644 --- a/searx/templates/oscar/result_templates/images.html +++ b/searx/templates/oscar/result_templates/images.html @@ -14,6 +14,7 @@ {% if result.content %}

{{ result.content|safe }}

{% endif %} +
+ {{ result.engine }}

{{ result.pretty_url }}

-- cgit v1.2.3 From 2e7723a6c1ce51c6b3830470164ac818126760ae Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Mon, 3 Nov 2014 10:39:47 +0100 Subject: [enh] oscar_template: improve result visualisation * highlight parts of result * add link to archiv.to * fix little bugs * add little icons * change style of "show map" button --- searx/templates/oscar/base.html | 2 +- searx/templates/oscar/result_templates/default.html | 7 +++++-- searx/templates/oscar/result_templates/images.html | 2 +- searx/templates/oscar/result_templates/map.html | 16 ++++++++++------ searx/templates/oscar/result_templates/torrent.html | 5 +++-- searx/templates/oscar/result_templates/videos.html | 9 ++++++--- 6 files changed, 26 insertions(+), 15 deletions(-) (limited to 'searx/templates') diff --git a/searx/templates/oscar/base.html b/searx/templates/oscar/base.html index 8c4dd3edc..0acece9d2 100644 --- a/searx/templates/oscar/base.html +++ b/searx/templates/oscar/base.html @@ -66,6 +66,6 @@ {% if autocomplete %}{% endif %} - --> + diff --git a/searx/templates/oscar/result_templates/default.html b/searx/templates/oscar/result_templates/default.html index 018a29e0e..3fe9b913c 100644 --- a/searx/templates/oscar/result_templates/default.html +++ b/searx/templates/oscar/result_templates/default.html @@ -1,8 +1,11 @@ -

{% if result['favicon'] %} {% endif %}{{ result.title|safe }}

+{% from 'oscar/macros.html' import icon %} + +

{% if result['favicon'] %} {% endif %}{{ result.title|safe }}

{% if result.publishedDate %}{% endif %} +{{ icon('link') }} {{ _('cached') }} -{% if result.content %}

{{ result.content|safe }}

{% endif %} +{% if result.content %}

{{ result.content|safe }}

{% endif %}
diff --git a/searx/templates/oscar/result_templates/images.html b/searx/templates/oscar/result_templates/images.html index 578df4595..c1b9e9b01 100644 --- a/searx/templates/oscar/result_templates/images.html +++ b/searx/templates/oscar/result_templates/images.html @@ -11,7 +11,7 @@