summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorcitrons <citrons>2021-06-19 08:15:41 +0000
committercitrons <citrons>2021-06-19 08:15:41 +0000
commite7f520b6865482cab89b55f70f8c41bec6ca30b3 (patch)
tree416a5f714035725e81828d8f10f1468274c09bfb
parentf66dfff19be67a268fc36975a995e206cf41f91b (diff)
minor touches
-rw-r--r--apioforum/static/style.css4
-rw-r--r--apioforum/templates/user_settings.html4
-rw-r--r--apioforum/user.py2
3 files changed, 7 insertions, 3 deletions
diff --git a/apioforum/static/style.css b/apioforum/static/style.css
index d725165..c4a6d40 100644
--- a/apioforum/static/style.css
+++ b/apioforum/static/style.css
@@ -17,7 +17,9 @@ body { font-family: sans-serif; word-wrap: break-word; }
.post:last-of-type { border-bottom: 1px solid black; }
.post-heading { font-size: smaller; }
-.post-heading,.post-heading .username { color: hsl(0,0%,25%); }
+.post-heading,.post-heading .username,.post-heading a:visited {
+ color: hsl(0,0%,25%);
+}
.post-heading-em { font-weight: bold; }
.post-content * { margin-bottom: 8px; margin-top: 8px; }
.post-content > *:first-child { margin-top: 2px }
diff --git a/apioforum/templates/user_settings.html b/apioforum/templates/user_settings.html
index fdd447f..ad93036 100644
--- a/apioforum/templates/user_settings.html
+++ b/apioforum/templates/user_settings.html
@@ -17,7 +17,9 @@
<p>if you want to change your bio, make sure you check the "change bio?" box.</p>
<label for="do_chbio">change bio?</label>
<input type="checkbox" name="do_chbio" id="do_chbio"><br>
-<textarea class="new-post-box" name="bio">{{user.bio or "hail GEORGE"}}</textarea>
+<textarea class="new-post-box" name="bio" maxlength="4000">
+ {{- user.bio or "hail GEORGE" -}}
+</textarea>
</fieldset>
<p>confirm changes?</p>
<input type="submit" value="confirm">
diff --git a/apioforum/user.py b/apioforum/user.py
index 409cfe1..c4a6998 100644
--- a/apioforum/user.py
+++ b/apioforum/user.py
@@ -49,7 +49,7 @@ def edit_user(username):
if 'do_chbio' in request.form:
if len(request.form['bio'].strip()) == 0:
err.append("please submit nonempty bio")
- elif len(request.form['bio']) > 4000:
+ elif len(request.form['bio']) > 4500:
err.append("bio is too long!!")
else:
db.execute("update users set bio = ? where username = ?", (request.form['bio'], username))