From fdb6fac214c2fb5bdc6c27492bc45c6694483fb4 Mon Sep 17 00:00:00 2001 From: pw3t Date: Mon, 13 Jan 2014 22:24:05 +0100 Subject: [PATCH] [ehn] Add possibility to add icon in results (more ugly html / css, need fix) --- searx/static/img/icon_wikipedia.png | Bin 0 -> 14858 bytes searx/templates/result_templates/default.html | 11 ++++++++++- .../result_templates/featured_results.html | 10 ++++++++++ searx/templates/results.html | 11 +---------- searx/webapp.py | 11 ++++++++--- 5 files changed, 29 insertions(+), 14 deletions(-) create mode 100644 searx/static/img/icon_wikipedia.png create mode 100644 searx/templates/result_templates/featured_results.html diff --git a/searx/static/img/icon_wikipedia.png b/searx/static/img/icon_wikipedia.png new file mode 100644 index 0000000000000000000000000000000000000000..911fa76f62f60c73c8ab85f7a3b80040642e61d5 GIT binary patch literal 14858 zcmW+-1z3|`7at9OYIOHRN*Gcjq+38hrIAuvU^LP&x*Mch8l)SfRJuDSE#3XSej^6Y zGuU?DbIKM)9nucRoe3EX@A`@+TqzL(KYbpUthPSQ&6uz{Nw_Qz1* zcTCgQ3bLT5e;+yR#R(t~BS=YB>YaPWLAyt)L0=rtZN!k1+Clq&D8zbTMO$JJUA`5DG>_7j7QNO#&GNZCC3!6zDWQ=+=Ux(+%=&@4wqB)OO`ZD?PQgE} zzKs}l<@n3hyXYeuF^cUO+AeI2H-IbTJ@P_))oxDXkG^zxk@npOe(x%erBRL(n!;@B z+l*n0;UgLenr{b7oQ1s;G*%9{;$F$6CCorDYWr3`Q$=)vu4ft=OFv*!F)u z;Ha+kZwa=gWNj;%+p&H*OMBD}eBtOuDium$$67jdVrYtLN zKU+^vPc`LTCH7^ua0uUP5OX;5I*b4%2NwMcPKzlybgv76g@&f3g@z(w<^yn$A8`7A-EDDO z^=>4T6v!S8nYW!e+TW)^S4UBo&)i|!TdI_&@pAfUCsy^!(r!eWq}A;2Tn!zKpzTl4 z&!^#%Vl|P6#J4f20-iJH>~D)yX!*=lQi$Gq8e`>DRaJero-P&O>AXM1ig|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+_ zNS0JC4_J~bfHPbH7JOPXY$G%uga}WgeE{jhlGJ#O7T}z=xCTmY;T-<-2$qgB_rG-+hR}giaK< z22t985wxkWcG}K=m*6&NIR<;R%qiB+W1|YBbUv4GnEN`|-Ru z0x)Z~umD(uytwi5sn#mH$m8z!o*L%0W91O=9Xl7oF$@w$1CCAYx7ZbLdt@dl_lY7S z`HHx7s@D=d&bEg4fEy-Ai$i09(*nz^*35+B`+%r6)`W>gL^`Q<(VqrVX+;pQ6TaL4 zs#)vZVQcmiz@+aLKtNWDvh*Ftt1;6h;#OTz2Jw~Tt-y8JQPiI(JO9kI1+5CbO%%3& zR22)r#7C(lYA};q;H=hjivNN()VlgC=zl;XB_7Tv-}_$oFsuOFe)|c~#5S%30i|Gd zdYTNMfFKzOTS0%(UmncB7!5Kp^Jm z@Nnd=BYU~dD#4-y2|5O%C^oY3{NAxA4|!6}cjc&@g_IyA_RkJ7&y@1KRvY6gvHkWA z52J&?K82bk@5|nEwgd*x_IkOc%CG#_fU%yu_(F=#a>KLX-{!2Hx0Pq#M3}IFu+7Qq z^;CiMuH(6jQ8+SH@0I^rE&A3%?MrvyXr8cAd@r1qHLusjP)?RZDc;h-VT`b+I#`54 zKYE3u(hhO34&~gy*rQ!-!kHKq8%@aC4uj(Tnv!EOXMG?=v-cc$vH{t3`MXw99zvK2 zdZ0J~U6|khrY&8sh`bAKR&B&=pjeOU$d%s^3b!9W|N7Nk6nbccrbEl$VGsElr6;&T zrl{8@=;K>vqCm9z7cY^rgNpiTCUxgtm(`uqk~QlYKQ!aGM+UiwB1&_ToKE9*LVrk4 z_f@#<OQ>MBsZgprnipGR+%7p(%{_X=o&l91FS=QIH-uD>5VNQ^eoSJN -

{{ result.title|safe }}

+ + {% if result['favicon'] %} +
+ {{result['favicon']}}.png +
+ {% endif %} + +
+

{{ result.title|safe }}


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

{{ result.pretty_url }}

+
diff --git a/searx/templates/result_templates/featured_results.html b/searx/templates/result_templates/featured_results.html new file mode 100644 index 000000000..4aeddfe24 --- /dev/null +++ b/searx/templates/result_templates/featured_results.html @@ -0,0 +1,10 @@ +
+ {% for result in featured_results %} + + {% if result['template'] %} + {% include 'result_templates/'+result['template'] %} + {% else %} + {% include 'result_templates/default.html' %} + {% endif %} + {% endfor %} +
diff --git a/searx/templates/results.html b/searx/templates/results.html index 411f84c64..b35416ffa 100644 --- a/searx/templates/results.html +++ b/searx/templates/results.html @@ -15,16 +15,7 @@ Number of results: {{ number_of_results }} {% if featured_results %} -
- - {% for result in featured_results %} - {% if result['template'] %} - {% include 'result_templates/'+result['template'] %} - {% else %} - {% include 'result_templates/default.html' %} - {% endif %} - {% endfor %} -
+ {% include 'result_templates/featured_results.html' %} {% endif %} {% for result in results %} diff --git a/searx/webapp.py b/searx/webapp.py index 72395709c..5fc981a89 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -140,9 +140,14 @@ def index(): else: result['pretty_url'] = result['url'] - if 'wikipedia' in result['engines'] or 'ddg definitions' in result['engines']: - featured_results.append(result) - results.remove(result) + for engine in result['engines']: + if engine in ['wikipedia']: + result['favicon'] = engine + featured_results.append(result) + results.remove(result) + elif engine in ['ddg definitions']: + featured_results.append(result) + results.remove(result) if request_data.get('format') == 'json': return Response(json.dumps({'query': query, 'results': results}), mimetype='application/json')