diff --git a/searx/engines/youtube.py b/searx/engines/youtube.py
index a3c3980af..e217fb079 100644
--- a/searx/engines/youtube.py
+++ b/searx/engines/youtube.py
@@ -69,12 +69,8 @@ def response(resp):
if result['media$group']['media$thumbnail']:
thumbnail = result['media$group']['media$thumbnail'][0]['url']
- content += ''.format(url, thumbnail) # noqa
- if content:
- content += '
' + result['content']['$t']
- else:
- content = result['content']['$t']
+ content = result['content']['$t']
# append result
results.append({'url': url,
diff --git a/searx/static/oscar/css/oscar.css b/searx/static/oscar/css/oscar.css
index 4ff475e89..b3e42f607 100644
--- a/searx/static/oscar/css/oscar.css
+++ b/searx/static/oscar/css/oscar.css
@@ -25,3 +25,29 @@ input[type=checkbox]:checked ~ .label_hide_if_checked {
input[type=checkbox]:not(:checked) ~ .label_hide_if_not_checked {
display:none;
}
+
+.search_categories {
+ margin:10px 0;
+}
+
+.result-default {
+ clear: both;
+}
+
+.result-images {
+ float: left !important;
+}
+
+.result-videos {
+ clear: both;
+}
+
+.result-torrents {
+ clear: both;
+}
+
+.img-thumbnail {
+ margin: 5px;
+ max-height: 128px;
+ min-height: 128px;
+}
diff --git a/searx/templates/oscar/index.html b/searx/templates/oscar/index.html
index adb535d9b..e58aa073a 100644
--- a/searx/templates/oscar/index.html
+++ b/searx/templates/oscar/index.html
@@ -8,7 +8,7 @@
{{ result.content|safe }}
{% endif %} + +{{ result.engine }} +{% if result['favicon'] %}{% endif %} {{ result.pretty_url }}
diff --git a/searx/templates/oscar/result_templates/images.html b/searx/templates/oscar/result_templates/images.html new file mode 100644 index 000000000..07b427d78 --- /dev/null +++ b/searx/templates/oscar/result_templates/images.html @@ -0,0 +1,21 @@ + + + + + diff --git a/searx/templates/oscar/result_templates/torrent.html b/searx/templates/oscar/result_templates/torrent.html new file mode 100644 index 000000000..14ac63232 --- /dev/null +++ b/searx/templates/oscar/result_templates/torrent.html @@ -0,0 +1,14 @@ +{% from 'oscar/macros.html' import icon %} + +{{ icon('transfer') }} {{ _('Seeder') }} {{ result.seed }}, {{ _('Leecher') }} {{ result.leech }}
+ +{{ icon('magnet') }} magnet link
+ +{% if result.content %}{{ result.content|safe }}
{% endif %} + +{{ result.engine }} +{% if result['favicon'] %}{% endif %} {{ result.pretty_url }}
diff --git a/searx/templates/oscar/result_templates/videos.html b/searx/templates/oscar/result_templates/videos.html new file mode 100644 index 000000000..32112472e --- /dev/null +++ b/searx/templates/oscar/result_templates/videos.html @@ -0,0 +1,13 @@ +{{ result.content|safe }}
{% endif %} +{% if result['favicon'] %}{% endif %} {{ result.pretty_url }}
diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html new file mode 100644 index 000000000..fde65c883 --- /dev/null +++ b/searx/templates/oscar/results.html @@ -0,0 +1,22 @@ +{% extends "oscar/base.html" %} +{% block title %}{{ q }} - {% endblock %} +{% block content %} +