commit: 517e57b996aaeceda08afd0e80bfd30ad6192971
parent c25aab73b72087a9a56d86c155a166bfcf018822
Author: Thomas Pointhuber <thomas.pointhuber@gmx.at>
Date: Fri, 3 Oct 2014 13:16:30 +0200
oscar template: improve result icons
Diffstat:
29 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/searx/static/courgette/img/icon_dailymotion.ico b/searx/static/courgette/img/icon_dailymotion.ico
Binary files differ.
diff --git a/searx/static/courgette/img/icon_deviantart.ico b/searx/static/courgette/img/icon_deviantart.ico
Binary files differ.
diff --git a/searx/static/default/img/icon_dailymotion.ico b/searx/static/default/img/icon_dailymotion.ico
Binary files differ.
diff --git a/searx/static/default/img/icon_deviantart.ico b/searx/static/default/img/icon_deviantart.ico
Binary files differ.
diff --git a/searx/static/oscar/img/icon_github.ico b/searx/static/oscar/img/icon_github.ico
Binary files differ.
diff --git a/searx/static/oscar/img/icon_soundcloud.ico b/searx/static/oscar/img/icon_soundcloud.ico
Binary files differ.
diff --git a/searx/static/oscar/img/icon_stackoverflow.ico b/searx/static/oscar/img/icon_stackoverflow.ico
Binary files differ.
diff --git a/searx/static/oscar/img/icon_twitter.ico b/searx/static/oscar/img/icon_twitter.ico
Binary files differ.
diff --git a/searx/static/oscar/img/icon_vimeo.ico b/searx/static/oscar/img/icon_vimeo.ico
Binary files differ.
diff --git a/searx/static/oscar/img/icon_wikipedia.ico b/searx/static/oscar/img/icon_wikipedia.ico
Binary files differ.
diff --git a/searx/static/oscar/img/icon_youtube.ico b/searx/static/oscar/img/icon_youtube.ico
Binary files differ.
diff --git a/searx/static/oscar/img/icons/README.md b/searx/static/oscar/img/icons/README.md
@@ -0,0 +1,2 @@
+Source: http://www.iconspedia.com/pack/flat-gradient-social-icons-4384/
+License: Free for non commercial use.
diff --git a/searx/static/oscar/img/icons/amazon.png b/searx/static/oscar/img/icons/amazon.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/dailymotion.png b/searx/static/oscar/img/icons/dailymotion.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/deviantart.png b/searx/static/oscar/img/icons/deviantart.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/facebook.png b/searx/static/oscar/img/icons/facebook.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/flickr.png b/searx/static/oscar/img/icons/flickr.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/github.png b/searx/static/oscar/img/icons/github.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/soundcloud.png b/searx/static/oscar/img/icons/soundcloud.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/stackoverflow.png b/searx/static/oscar/img/icons/stackoverflow.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/twitter.png b/searx/static/oscar/img/icons/twitter.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/vimeo.png b/searx/static/oscar/img/icons/vimeo.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/wikipedia.png b/searx/static/oscar/img/icons/wikipedia.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/youtube.png b/searx/static/oscar/img/icons/youtube.png
Binary files differ.
diff --git a/searx/templates/oscar/result_templates/default.html b/searx/templates/oscar/result_templates/default.html
@@ -1,8 +1,8 @@
-<h3><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
+<h3>{% if result['favicon'] %}<img width="32" height="32" class="favicon" src="static/{{ theme }}/img/icons/{{ result['favicon'] }}.png" /> {% endif %}<a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
{% if result.publishedDate %}<time class="text-muted" datetime="{{ result.publishedDate }}" pubdate>{{ result.publishedDate }}</time>{% endif %}
{% if result.content %}<p>{{ result.content|safe }}</p>{% endif %}
<span class="label label-default pull-right">{{ result.engine }}</span>
-<p class="text-muted">{% if result['favicon'] %}<img width="14" height="14" class="favicon" src="static/{{ theme }}/img/icon_{{ result['favicon'] }}.ico" />{% endif %} {{ result.pretty_url }}</p>
+<p class="text-muted">{{ result.pretty_url }}</p>
diff --git a/searx/templates/oscar/result_templates/images.html b/searx/templates/oscar/result_templates/images.html
@@ -7,7 +7,7 @@
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
- <h4 class="modal-title">{{ result.title|striptags }}</h4>
+ <h4 class="modal-title">{% if result['favicon'] %}<img width="32" height="32" class="favicon" src="static/{{ theme }}/img/icons/{{ result['favicon'] }}.png" /> {% endif %}{{ result.title|striptags }}</h4>
</div>
<div class="modal-body">
<img class="img-responsive center-block" src="{{ result.img_src }}" alt="{{ result.title }}">
@@ -15,7 +15,7 @@
</div>
<div class="modal-footer">
<span class="label label-default pull-right">{{ result.engine }}</span>
- <p class="text-muted pull-left">{% if result['favicon'] %}<img width="14" height="14" class="favicon" src="static/{{theme}}/img/icon_{{result['favicon']}}.ico" />{% endif %} {{ result.pretty_url }}</p>
+ <p class="text-muted pull-left">{{ result.pretty_url }}</p>
<div class="clearfix"></div>
<a href="{{ result.img_src }}" class="btn btn-default">{{ _('Get image') }}</a>
<a href="{{ result.url }}" class="btn btn-default">{{ _('View source') }}</a>
diff --git a/searx/templates/oscar/result_templates/torrent.html b/searx/templates/oscar/result_templates/torrent.html
@@ -1,6 +1,6 @@
{% from 'oscar/macros.html' import icon %}
-<h3><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
+<h3>{% if result['favicon'] %}<img width="32" height="32" class="favicon" src="static/{{ theme }}/img/icons/{{ result['favicon'] }}.png" /> {% endif %}<a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
{% if result.publishedDate %}<time class="text-muted" datetime="{{ result.publishedDate }}" pubdate>{{ result.publishedDate }}</time>{% endif %}
@@ -11,4 +11,4 @@
{% if result.content %}<p>{{ result.content|safe }}</p>{% endif %}
<span class="label label-default pull-right">{{ result.engine }}</span>
-<p class="text-muted">{% if result['favicon'] %}<img width="14" height="14" class="favicon" src="static/{{ theme }}/img/icon_{{ result['favicon'] }}.ico" />{% endif %} {{ result.pretty_url }}</p>
+<p class="text-muted">{{ result.pretty_url }}</p>
diff --git a/searx/templates/oscar/result_templates/videos.html b/searx/templates/oscar/result_templates/videos.html
@@ -1,4 +1,4 @@
-<h3><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
+<h3>{% if result['favicon'] %}<img width="32" height="32" class="favicon" src="static/{{ theme }}/img/icons/{{ result['favicon'] }}.png" /> {% endif %}<a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
{% if result.publishedDate %}<time class="text-muted" datetime="{{ result.publishedDate }}" pubdate>{{ result.publishedDate }}</time>{% endif %}
@@ -8,6 +8,6 @@
{% if result.content %}<p class="col-xs-12 col-sm-8 col-md-8">{{ result.content|safe }}</p>{% endif %}
</div>
</div>
-
+
<span class="label label-default pull-right">{{ result.engine }}</span>
-<p class="text-muted">{% if result['favicon'] %}<img width="14" height="14" class="favicon" src="static/{{theme}}/img/icon_{{result['favicon']}}.ico" />{% endif %} {{ result.pretty_url }}</p>
+<p class="text-muted">{{ result.pretty_url }}</p>
diff --git a/searx/webapp.py b/searx/webapp.py
@@ -69,8 +69,8 @@ app.secret_key = settings['server']['secret_key']
babel = Babel(app)
#TODO configurable via settings.yml
-favicons = ['wikipedia', 'youtube', 'vimeo', 'soundcloud',
- 'twitter', 'stackoverflow', 'github']
+favicons = ['wikipedia', 'youtube', 'vimeo', 'dailymotion', 'soundcloud',
+ 'twitter', 'stackoverflow', 'github', 'deviantart']
cookie_max_age = 60 * 60 * 24 * 365 * 23 # 23 years