From: Chris Fulljames Date: Fri, 17 Jan 2025 02:10:35 +0000 (-0500) Subject: More design updates X-Git-Url: https://littlesong.place/gitweb/?a=commitdiff_plain;h=8a41e6d9160de736a883712b10a8efb61c84a317;p=littlesongplace.git More design updates --- diff --git a/main.py b/main.py index aa2497f..f9d6375 100644 --- a/main.py +++ b/main.py @@ -110,7 +110,7 @@ def login_post(): session["userid"] = user_data["userid"] session.permanent = True app.logger.info(f"{username} logged in") - return redirect("/") + return redirect(f"/users/{username}") flash("Invalid username/password", "error") app.logger.info(f"Failed login for {username}") @@ -230,6 +230,7 @@ def upload_song(): return redirect(f"/users/{username}") else: + username = session["username"] app.logger.info(f"Failed song update - {username} - {get_flashed_messages()}") return redirect(request.referrer) @@ -249,10 +250,7 @@ def validate_song_form(): error = True # Check if description is valid - if not description.isprintable(): - flash(f"Description contains invalid characters", "error") - error = True - elif len(description) > 10_000: + if len(description) > 10_000: flash(f"Description cannot be more than 10k characters", "error") error = True diff --git a/static/styles.css b/static/styles.css index a38b719..f58e465 100644 --- a/static/styles.css +++ b/static/styles.css @@ -26,23 +26,38 @@ h2 { textarea { font-family: sans-serif; color: var(--purple); - border: 2px solid var(--blue); + border: 3px solid var(--purple); border-radius: 10px; padding: 10px; background: var(--yellow); height: 100px; width: 100%; + margin: 5px; box-sizing: border-box; resize: vertical; } -.button { +input[type=text], input[type=password] { + background: var(--yellow); font-family: sans-serif; + font-weight: bold; + color: var(--purple); + border: 3px solid var(--purple); + border-radius: 10px; + padding: 5px; + width: 200px; + margin: 5px; +} + +.button, input[type=submit] { + font-family: sans-serif; + font-weight: bold; color: var(--yellow); background: var(--pink); border: 0px; border-radius: 5px; padding: 8px; + margin: 5px; } div.main { @@ -79,6 +94,17 @@ div.navbar { padding: 10px; } +/* Upload/Edit Form */ + +div.upload-form input[type=text] { + width: 100%; + box-sizing: border-box; +} + +input[type=file] { + margin: 5px; +} + /* Profile */ .profile-name { text-align: center; diff --git a/templates/edit-song.html b/templates/edit-song.html index e935e62..7dfecec 100644 --- a/templates/edit-song.html +++ b/templates/edit-song.html @@ -11,23 +11,23 @@ {% endif %}

Upload a new song

- +
- +
- +
- +
- +
diff --git a/templates/login.html b/templates/login.html index 9f65f99..40d095e 100644 --- a/templates/login.html +++ b/templates/login.html @@ -12,12 +12,12 @@
diff --git a/templates/signup.html b/templates/signup.html index 62bb675..3f6b324 100644 --- a/templates/signup.html +++ b/templates/signup.html @@ -13,17 +13,17 @@ diff --git a/todo.txt b/todo.txt index fcbdd26..62633a7 100644 --- a/todo.txt +++ b/todo.txt @@ -1,5 +1,5 @@ TODO (BEFORE RELEASE) -- CSS/Design +- Multiline descriptions - Automated Tests - Homepage - Tips and Tricks