new: dev: favicon for entry
This commit is contained in:
parent
8e0c02751d
commit
b659a8bd02
@ -530,6 +530,8 @@ def create_app(config_filename=None):
|
||||
"""Shell context definition."""
|
||||
return {'app': app, 'bukudb': bukudb}
|
||||
|
||||
app.jinja_env.filters['netloc'] = lambda x: urlparse(x).netloc # pylint: disable=no-member
|
||||
|
||||
Bootstrap(app)
|
||||
# routing
|
||||
app.add_url_rule('/api/tags', 'get_tags', get_tags, methods=['GET'])
|
||||
|
@ -60,6 +60,9 @@
|
||||
{% for item in bookmarks %}
|
||||
<tr> <td style="overflow-wrap: break-word;">
|
||||
<h3>
|
||||
{% if item.url|netloc %}
|
||||
<img src='http://www.google.com/s2/favicons?domain={{item.url|netloc}}'/>
|
||||
{% endif %}
|
||||
<a href="{{item.url}}">{{item.title}}</a>
|
||||
<a href="{{url_for('bookmark_api-html', id=item.id)}}">
|
||||
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
|
||||
|
Loading…
Reference in New Issue
Block a user