oscar template: improve result icons

This commit is contained in:
Thomas Pointhuber 2014-10-03 13:16:30 +02:00
parent c25aab73b7
commit 517e57b996
29 changed files with 13 additions and 11 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,2 @@
Source: http://www.iconspedia.com/pack/flat-gradient-social-icons-4384/
License: Free for non commercial use.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -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.publishedDate %}<time class="text-muted" datetime="{{ result.publishedDate }}" pubdate>{{ result.publishedDate }}</time>{% endif %}
{% if result.content %}<p>{{ result.content|safe }}</p>{% endif %} {% if result.content %}<p>{{ result.content|safe }}</p>{% endif %}
<span class="label label-default pull-right">{{ result.engine }}</span> <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>

View File

@ -7,7 +7,7 @@
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</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>
<div class="modal-body"> <div class="modal-body">
<img class="img-responsive center-block" src="{{ result.img_src }}" alt="{{ result.title }}"> <img class="img-responsive center-block" src="{{ result.img_src }}" alt="{{ result.title }}">
@ -15,7 +15,7 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<span class="label label-default pull-right">{{ result.engine }}</span> <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> <div class="clearfix"></div>
<a href="{{ result.img_src }}" class="btn btn-default">{{ _('Get image') }}</a> <a href="{{ result.img_src }}" class="btn btn-default">{{ _('Get image') }}</a>
<a href="{{ result.url }}" class="btn btn-default">{{ _('View source') }}</a> <a href="{{ result.url }}" class="btn btn-default">{{ _('View source') }}</a>

View File

@ -1,6 +1,6 @@
{% from 'oscar/macros.html' import icon %} {% 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 %} {% 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 %} {% if result.content %}<p>{{ result.content|safe }}</p>{% endif %}
<span class="label label-default pull-right">{{ result.engine }}</span> <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>

View File

@ -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 %} {% 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 %} {% if result.content %}<p class="col-xs-12 col-sm-8 col-md-8">{{ result.content|safe }}</p>{% endif %}
</div> </div>
</div> </div>
<span class="label label-default pull-right">{{ result.engine }}</span> <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>

View File

@ -69,8 +69,8 @@ app.secret_key = settings['server']['secret_key']
babel = Babel(app) babel = Babel(app)
#TODO configurable via settings.yml #TODO configurable via settings.yml
favicons = ['wikipedia', 'youtube', 'vimeo', 'soundcloud', favicons = ['wikipedia', 'youtube', 'vimeo', 'dailymotion', 'soundcloud',
'twitter', 'stackoverflow', 'github'] 'twitter', 'stackoverflow', 'github', 'deviantart']
cookie_max_age = 60 * 60 * 24 * 365 * 23 # 23 years cookie_max_age = 60 * 60 * 24 * 365 * 23 # 23 years