Make the notes page work, add missing dependencies, set the font of the textarea

This commit is contained in:
Raoul Snyman 2021-01-27 21:17:06 -07:00
parent 9fb69bbf64
commit 29c38c55d9
Signed by: raoul
GPG Key ID: F55BCED79626AE9C
3 changed files with 6 additions and 4 deletions

View File

@ -17,7 +17,9 @@ setup(
'Flask-SQLAlchemy', 'Flask-SQLAlchemy',
'Pygments', 'Pygments',
'requests', 'requests',
'short_url' 'short_url',
'psycopg2_binary',
'nord-pygments'
], ],
extras_require={ extras_require={
'dev': [ 'dev': [

View File

@ -27,7 +27,7 @@ body > .container {
padding-left: 15px; padding-left: 15px;
} }
code, kbd, pre, samp { code, kbd, pre, samp, textarea#source {
font-family: 'PT Mono', 'Hack', SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; font-family: 'PT Mono', 'Hack', SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
} }

View File

@ -61,12 +61,12 @@ def notes():
""" """
Show a list of recent notes Show a list of recent notes
""" """
recent_notes = StickyNote.query\ notes = StickyNote.query\
.filter(or_(StickyNote.expiry == None, StickyNote.expiry < datetime.utcnow()))\ .filter(or_(StickyNote.expiry == None, StickyNote.expiry < datetime.utcnow()))\
.filter(~StickyNote.private)\ .filter(~StickyNote.private)\
.order_by(StickyNote.created.desc())\ .order_by(StickyNote.created.desc())\
.limit(10) # noqa .limit(10) # noqa
return render_template('notes.html', recent=recent_notes) return render_template('notes.html', notes=notes)
@views.route('/about', methods=['GET']) @views.route('/about', methods=['GET'])