1
0
mirror of https://github.com/aquatix/digimarks.git synced 2025-12-06 23:05:10 +01:00

Bookmark cards! Colours need to be fixed yet. Edit button works

This commit is contained in:
2016-07-18 21:40:53 +02:00
parent 017212045a
commit 104b2d8a63
3 changed files with 23 additions and 6 deletions

View File

@@ -127,7 +127,7 @@ def bookmarks(userkey):
# return render_template('bookmarks.html', bookmarks) # return render_template('bookmarks.html', bookmarks)
#else: #else:
# abort(404) # abort(404)
bookmarks = Bookmark.select(Bookmark.userkey == userkey) bookmarks = Bookmark.select().where(Bookmark.userkey == userkey)
return render_template('bookmarks.html', bookmarks=bookmarks, userkey=userkey) return render_template('bookmarks.html', bookmarks=bookmarks, userkey=userkey)

View File

@@ -26,3 +26,10 @@
.input-field .prefix.active { .input-field .prefix.active {
color: #000; color: #000;
} }
/* Card title anchor colour */
.white-text .card-title a
{
color: #FFF;
}

View File

@@ -3,7 +3,7 @@
{% block pageheader %}Bookmarks{% endblock %} {% block pageheader %}Bookmarks{% endblock %}
{% block pagecontent %} {% block pagecontent %}
<div class="row"> <div class="row">
{% for bookmark in object_list %} {% for bookmark in bookmarks %}
<div class="col s4"> <div class="col s4">
{# {#
<div class="thumbnail"> <div class="thumbnail">
@@ -14,10 +14,20 @@
<p>{{ bookmark.created_date.strftime("%m/%d/%Y %H:%M") }}</p> <p>{{ bookmark.created_date.strftime("%m/%d/%Y %H:%M") }}</p>
</div> </div>
#} #}
<div class="card blue-grey darken-1">
<a href="{{ bookmark.url }}" title="{{ bookmark.url }}"> <div class="card-content white-text">
{{ bookmark.title }} <span class="card-title activator">
</a> <a href="{{ bookmark.url }}" title="{{ bookmark.url }}">
{{ bookmark.title }}
</a>
<i class="material-icons right">more_vert</i>
</span>
</div>
<div class="card-reveal teal darken-4">
<span class="card-title">{{ bookmark.title }}<i class="material-icons right">close</i></span>
<div><a href="{{ url_for('editbookmark', userkey=userkey, urlhash=bookmark.url_hash) }}">edit</a></div>
</div>
</div>
</div> </div>
{% endfor %} {% endfor %}