From 4bd4bcbccb9e7772da337f30d9b62147877bc3d9 Mon Sep 17 00:00:00 2001 From: raven Date: Fri, 18 Jun 2021 21:10:57 +0000 Subject: view user profile at /user/ --- apioforum/__init__.py | 3 +++ apioforum/db.py | 4 ++++ apioforum/static/style.css | 11 +++++++++++ 3 files changed, 18 insertions(+) diff --git a/apioforum/__init__.py b/apioforum/__init__.py index 4283796..54d18c3 100644 --- a/apioforum/__init__.py +++ b/apioforum/__init__.py @@ -34,6 +34,9 @@ def create_app(): from . import admin app.register_blueprint(admin.bp) + from . import user + app.register_blueprint(user.bp) + from .fuzzy import fuzzy app.jinja_env.filters['fuzzy']=fuzzy diff --git a/apioforum/db.py b/apioforum/db.py index e1e8fa3..910118d 100644 --- a/apioforum/db.py +++ b/apioforum/db.py @@ -80,6 +80,10 @@ CREATE TABLE thread_tags ( """, """CREATE INDEX thread_tags_thread ON thread_tags (thread);""", """ALTER TABLE users ADD COLUMN admin INT NOT NULL DEFAULT 0""", +""" +ALTER TABLE users ADD COLUMN bio TEXT; +ALTER TABLE users ADD COLUMN joined TIMESTAMP; +""", ] def init_db(): diff --git a/apioforum/static/style.css b/apioforum/static/style.css index 935bde1..401fedb 100644 --- a/apioforum/static/style.css +++ b/apioforum/static/style.css @@ -43,6 +43,17 @@ body { font-family: sans-serif } font-size: .9rem; } +.user_info { + border: 1px solid black; + background-color: var(--alternating-colour-even); + width: 100%; + padding: 4px; +} +.user_bio_quote { width: max-content; } +.user_bio_attribution { text-align: right; } + +dt { font-weight: bold } + .un-col-1 { color: hsl(0, 100%, 30%) } .un-col-2 { color: hsl(22.5, 100%, 30%) } -- cgit v1.2.3