Browse Source

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.
Frank de Lange 5 years ago
parent
commit
e4e8e6da4c

File diff suppressed because it is too large
+ 0 - 0
searx/static/css/bootstrap.min.css


+ 1 - 1
searx/static/themes/courgette/css/style-rtl.css

@@ -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 it is too large
+ 0 - 0
searx/static/themes/courgette/css/style.css


File diff suppressed because it is too large
+ 0 - 0
searx/static/themes/legacy/css/style.css


File diff suppressed because it is too large
+ 0 - 0
searx/static/themes/oscar/css/logicodev-dark.min.css


File diff suppressed because it is too large
+ 0 - 0
searx/static/themes/oscar/css/logicodev.min.css


File diff suppressed because it is too large
+ 0 - 1
searx/static/themes/oscar/js/searx.min.js


+ 1 - 1
searx/static/themes/oscar/less/logicodev-dark/oscar.less

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

+ 11 - 1
searx/static/themes/oscar/less/logicodev/results.less

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

+ 4 - 5
searx/static/themes/oscar/package.json

@@ -2,12 +2,11 @@
     "devDependencies": {
     "devDependencies": {
         "grunt": "~0.4.5",
         "grunt": "~0.4.5",
         "grunt-contrib-uglify": "~0.6.0",
         "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": {
     "scripts": {
         "build": "npm install && grunt",
         "build": "npm install && grunt",
         "start": "grunt watch",
         "start": "grunt watch",

File diff suppressed because it is too large
+ 0 - 0
searx/static/themes/pix-art/css/style.css


+ 1 - 1
searx/static/themes/simple/css/searx-rtl.css

@@ -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
 * searx, A privacy-respecting, hackable metasearch engine
 *
 *

File diff suppressed because it is too large
+ 0 - 0
searx/static/themes/simple/css/searx-rtl.min.css


+ 1 - 1
searx/static/themes/simple/css/searx.css

@@ -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
 * searx, A privacy-respecting, hackable metasearch engine
 *
 *

File diff suppressed because it is too large
+ 0 - 0
searx/static/themes/simple/css/searx.min.css


File diff suppressed because it is too large
+ 1 - 1
searx/static/themes/simple/js/searx.min.js


File diff suppressed because it is too large
+ 0 - 0
searx/static/themes/simple/js/searx.min.js.map


+ 11 - 1
searx/templates/oscar/result_templates/images.html

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

Some files were not shown because too many files changed in this diff