diff --git a/searx/static/oscar/css/oscar.min.css b/searx/static/oscar/css/oscar.min.css index 60396e0cc..5d2c24e63 100644 --- a/searx/static/oscar/css/oscar.min.css +++ b/searx/static/oscar/css/oscar.min.css @@ -11,5 +11,7 @@ input[type=checkbox]:not(:checked)~.label_hide_if_not_checked{display:none} .suggestion_item{margin:2px 5px} .result_download{margin-right:5px} #pagination{margin-top:30px;padding-bottom:50px} +.infobox .infobox_part{margin-bottom:20px} +.infobox .infobox_part:last-child{margin-bottom:0} .search_categories{margin:10px 0;text-transform:capitalize} .cursor-text{cursor:text !important} diff --git a/searx/static/oscar/less/oscar/infobox.less b/searx/static/oscar/less/oscar/infobox.less new file mode 100644 index 000000000..c6a6d4248 --- /dev/null +++ b/searx/static/oscar/less/oscar/infobox.less @@ -0,0 +1,9 @@ +.infobox { + .infobox_part { + margin-bottom: 20px; + } + + .infobox_part:last-child { + margin-bottom: 0; + } +} diff --git a/searx/static/oscar/less/oscar/oscar.less b/searx/static/oscar/less/oscar/oscar.less index 4c80dcd79..22f7558ad 100644 --- a/searx/static/oscar/less/oscar/oscar.less +++ b/searx/static/oscar/less/oscar/oscar.less @@ -4,6 +4,8 @@ @import "results.less"; +@import "infobox.less"; + @import "search.less"; @import "cursor.less"; diff --git a/searx/templates/oscar/infobox.html b/searx/templates/oscar/infobox.html new file mode 100644 index 000000000..541da8ba7 --- /dev/null +++ b/searx/templates/oscar/infobox.html @@ -0,0 +1,28 @@ +
+
+

{{ infobox.infobox }}

+
+
+ {% if infobox.img_src %}{% endif %} + {% if infobox.content %}

{{ infobox.content }}

{% endif %} + + {% if infobox.attributes %} + + {% for attribute in infobox.attributes %} + + + + + {% endfor %} +
{{ attribute.label }}{{ attribute.value }}
+ {% endif %} + + {% if infobox.urls %} +
+ {% for url in infobox.urls %} +

{{ url.title }}

+ {% endfor %} +
+ {% endif %} +
+
diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html index 6b02dc7bd..0bf4914b4 100644 --- a/searx/templates/oscar/results.html +++ b/searx/templates/oscar/results.html @@ -47,9 +47,7 @@ {% if suggestions %}
-

- {{ _('Suggestions') }} -

+

{{ _('Suggestions') }}

{% for suggestion in suggestions %} @@ -64,9 +62,7 @@
-

- {{ _('Links') }} -

+

{{ _('Links') }}

@@ -91,6 +87,12 @@
+ {% if infoboxes %} + {% for infobox in infoboxes %} + {% include 'oscar/infobox.html' %} + {% endfor %} + {% endif %} +
{% endblock %}