summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorraven <raven>2021-06-18 21:10:57 +0000
committerraven <raven>2021-06-18 21:10:57 +0000
commit4bd4bcbccb9e7772da337f30d9b62147877bc3d9 (patch)
treeac3d7e7e6c4986afb627ec98c458a25e33f374bb
parentc6491d055447cba9efc6a45df172e932ca6e9e80 (diff)
view user profile at /user/<username>
-rw-r--r--apioforum/__init__.py3
-rw-r--r--apioforum/db.py4
-rw-r--r--apioforum/static/style.css11
3 files changed, 18 insertions, 0 deletions
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%) }