diff --git a/app.py b/app.py index 5dc7691..21790e7 100644 --- a/app.py +++ b/app.py @@ -131,7 +131,9 @@ def read_article(article_id): conn = sqlite3.connect('pocket/readitlater.db') c = conn.cursor() - c.execute("SELECT * FROM articles where id=?", (article_id,)) + # c.execute("SELECT * FROM articles where id=?", (article_id,)) + c.execute("SELECT articles.id, url, content, title, byline, read FROM articles INNER JOIN saved_articles on saved_articles.article_id = articles.id WHERE articles.id=?", (article_id, )) + rows = c.fetchall() conn.commit() conn.close() @@ -217,6 +219,20 @@ def archive_article(article_id): return redirect(url_for('index')) +@ldap.login_required +@app.route('/unarchive/') +def unarchive_article(article_id): + conn = sqlite3.connect('pocket/readitlater.db') + c = conn.cursor() + + c.execute("UPDATE saved_articles SET read=0 WHERE user=? AND article_id=?", (session['user_id'], article_id)) + + conn.commit() + conn.close() + + return redirect(url_for('archived')) + + @app.route('/logout') def logout(): session.pop('user_id', None) diff --git a/pocket/readitlater.db b/pocket/readitlater.db index 8715a75..750d368 100644 Binary files a/pocket/readitlater.db and b/pocket/readitlater.db differ diff --git a/static/style.css b/static/style.css index 335c3ed..9e19615 100644 --- a/static/style.css +++ b/static/style.css @@ -5,12 +5,21 @@ html { position: fixed; } +.tooltip .arrow { + display: none; +} + + .navbar { position: absolute; top: 0; width: 100%; } +#sidebar a:hover { + text-decoration: none; +} + .wrapper { height: calc(100% - 56px); overflow: auto; @@ -20,6 +29,18 @@ html { align-items: stretch; } +.cell { + color: black; +} + +.cell-button { + color: gray; +} + +.cell-button:hover { + color: darkgray; +} + .toolbar-button { padding-left: 2rem; padding-top: .375rem; @@ -27,6 +48,11 @@ html { color: white; } +.toolbar-button:hover { + color: #ddd; + text-decoration: none; +} + .back-chevron { line-height: 1.5 !important; vertical-align: middle !important; @@ -83,6 +109,10 @@ html { padding: 5px; } + .cell { + color: white; + } + #sidebar { padding-left: 20px; background-color: #1a1d20; diff --git a/templates/article.j2 b/templates/article.j2 index 814b4eb..94a7c20 100644 --- a/templates/article.j2 +++ b/templates/article.j2 @@ -17,7 +17,11 @@ {% block navbar %}