Add image format and source information to display (#1567)

Add image format and source information to display - needs changes to engines to actually display something. 

Displays result.source (website from which the image was taken) and result.img_format (image type and size).

Result is styled with result-format and result-source classes. See PR #1566 for an example of an engine which has the necessary changes.

Strip <span class="highlight">...</span> in the oscar image template.
This commit is contained in:
Frank de Lange 2019-08-06 09:31:24 +02:00 committed by Alexandre Flament
parent 88261e111c
commit e4e8e6da4c
18 changed files with 33 additions and 14 deletions

Binary file not shown.

View File

@ -1 +1 @@
.q{padding:.5em 1em .5em 3em}#search_submit{left:0;right:auto}.result .favicon{float:right;margin-left:.5em;margin-right:0}#sidebar{right:auto;left:0}#results{padding:0 32px 0 272px}.search.center{padding-right:0;padding-left:17em}.right{right:auto;left:0}#pagination form+form{float:left;margin-top:-2em}.engine-table{text-align:right}
#search_submit,#sidebar,.right{right:auto;left:0}.q{padding:.5em 1em .5em 3em}.result .favicon{float:right;margin-left:.5em;margin-right:0}#results{padding:0 32px 0 272px}.search.center{padding-right:0;padding-left:17em}#pagination form+form{float:left;margin-top:-2em}.engine-table{text-align:right}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

View File

@ -59,7 +59,7 @@ ul.nav li a {
border-bottom: 4px solid #3d9f94 !important;
}
.result-content {
.result-content, .result-source, .result-format {
color:#B5B8B7 !important;
}

View File

@ -27,7 +27,7 @@
}
}
.result-content {
.result-content, .result-format, .result-source {
margin-top: 2px;
margin-bottom: 0;
word-wrap: break-word;
@ -41,6 +41,16 @@
}
.result-source {
font-size: 10px;
float: left;
}
.result-format {
font-size: 10px;
float: right;
}
.external-link {
color: @dark-green;
font-size: 12px;

View File

@ -2,12 +2,11 @@
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-uglify": "~0.6.0",
"grunt-contrib-watch" : "~0.6.1",
"grunt-contrib-concat" : "~0.5.0",
"grunt-contrib-jshint" : "~0.10.0",
"grunt-contrib-less" : "~0.11.0"
"grunt-contrib-watch": "~0.6.1",
"grunt-contrib-concat": "~0.5.0",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-less": "~0.11.0"
},
"scripts": {
"build": "npm install && grunt",
"start": "grunt watch",

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! searx | 14-08-2018 | https://github.com/asciimoo/searx */
/*! searx | 28-05-2019 | https://github.com/asciimoo/searx */
/*
* searx, A privacy-respecting, hackable metasearch engine
*

Binary file not shown.

View File

@ -1,4 +1,4 @@
/*! searx | 14-08-2018 | https://github.com/asciimoo/searx */
/*! searx | 28-05-2019 | https://github.com/asciimoo/searx */
/*
* searx, A privacy-respecting, hackable metasearch engine
*

Binary file not shown.

Binary file not shown.

View File

@ -16,7 +16,17 @@
{% if result.author %}<span class="photo-author">{{ result.author }}</span><br />{% endif %}
{% if result.content %}
<p class="result-content">
{{ result.content }}
{{ result.content|striptags }}
</p>
{% endif %}
{% if result.img_format %}
<p class="result-format">
{{ result.img_format }}
</p>
{% endif %}
{% if result.source %}
<p class="result-source">
{{ result.source }}
</p>
{% endif %}
</div>