diff --git a/src/static/style.css b/src/static/style.css
index cf2539f..a7bae43 100644
--- a/src/static/style.css
+++ b/src/static/style.css
@@ -58,8 +58,7 @@ article {
text-overflow: ellipsis;
}
-.title,
-.title_full {
+.inline {
display: inline;
}
diff --git a/src/templates/account.html b/src/templates/account.html
index 14040ce..a1dfb08 100644
--- a/src/templates/account.html
+++ b/src/templates/account.html
@@ -26,8 +26,8 @@ Licensed under the AGPL-3.0-or-later. See LICENSE for details.
diff --git a/src/templates/index.html b/src/templates/index.html
index 99bae2c..bc0fe6d 100644
--- a/src/templates/index.html
+++ b/src/templates/index.html
@@ -27,7 +27,8 @@ Licensed under the AGPL-3.0-or-later. See LICENSE for details.
{% for post_id, title, user_id, description in posts %}
-
{{ title }}
+
{{ title }}
+
by {{ user_id }}
{{ description }}
diff --git a/src/templates/view.html b/src/templates/view.html
index b62aef3..1500cc2 100644
--- a/src/templates/view.html
+++ b/src/templates/view.html
@@ -25,8 +25,8 @@ Licensed under the AGPL-3.0-or-later. See LICENSE for details.
-
{{ title }}
-
by {{ user }}
+
{{ title }}
+
by {{ user }}
{{ description }}
diff --git a/src/wsgi.py b/src/wsgi.py
index 25d2f4b..bba5037 100644
--- a/src/wsgi.py
+++ b/src/wsgi.py
@@ -40,6 +40,21 @@ def index():
status = "Log In"
else:
status = "Log Out"
+ for i in range(len(posts)):
+ cursor.execute(
+ """
+ SELECT users.username
+ FROM posts
+ JOIN users ON posts.user_id = users.id
+ WHERE posts.id = ?
+ """,
+ (posts[i][2],),
+ )
+
+ username = cursor.fetchone()
+ if not username:
+ username = ("Unknown",)
+ posts[i] = (posts[i][0], posts[i][1], username[0], posts[i][3])
return render_template("index.html", posts=posts, status=status)