diff options
-rw-r--r-- | apioforum/static/style.css | 4 | ||||
-rw-r--r-- | apioforum/templates/user_settings.html | 4 | ||||
-rw-r--r-- | apioforum/user.py | 2 |
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)) |