diff --git a/digimarks.py b/digimarks.py index 2a3e442..3c07c47 100644 --- a/digimarks.py +++ b/digimarks.py @@ -566,7 +566,10 @@ def get_bookmarks(userkey, filtermethod=None, sortmethod=None): @app.route('/', methods=['GET', 'POST']) @app.route('//filter/', methods=['GET', 'POST']) @app.route('//sort/', methods=['GET', 'POST']) -def bookmarks_page(userkey, filtermethod=None, sortmethod=None): +@app.route('//', methods=['GET', 'POST']) +@app.route('///filter/', methods=['GET', 'POST']) +@app.route('///sort/', methods=['GET', 'POST']) +def bookmarks_page(userkey, filtermethod=None, sortmethod=None, show_as='cards'): bookmarks, bookmarktags, filter_text, message = get_bookmarks(userkey, filtermethod, sortmethod) theme = get_theme(userkey) return render_template( @@ -579,6 +582,9 @@ def bookmarks_page(userkey, filtermethod=None, sortmethod=None): theme=theme, editable=True, # bookmarks can be edited showtags=True, # tags should be shown with the bookmarks + filtermethod=filtermethod, + sortmethod=sortmethod, + show_as=show_as, # show list of bookmarks instead of cards ) diff --git a/templates/bookmarks.html b/templates/bookmarks.html index 485cbd5..76b9773 100644 --- a/templates/bookmarks.html +++ b/templates/bookmarks.html @@ -71,7 +71,16 @@ {% endif %} -{% include 'cards.html' %} +
+
list +
+
+ +{% if show_as and show_as == 'list' %} + {% include 'list.html' %} +{% else %} + {% include 'cards.html' %} +{% endif %}