Commit Graph

171 Commits

Author SHA1 Message Date
Sage Vaillancourt bf9ea51021 Bold text on 'Generate PDF' button. 2022-09-30 00:39:58 -04:00
Sage Vaillancourt fb2ca4722b Add Barlow as main site font. 2022-09-30 00:37:52 -04:00
Sage Vaillancourt f31d8a7c21 Reduce field margins on mobile. 2022-09-30 01:45:30 +00:00
Sage Vaillancourt f9810ce2b9 Tweak label style for better visual hierarchy.
Username -> Your Name
2022-09-29 16:22:31 -04:00
Sage Vaillancourt c7229d5db1 Simplify front-end error-clearing logic. 2022-09-29 13:31:58 -04:00
Sage Vaillancourt 5024a79842 Right-align 'Generate PDF' button 2022-09-29 13:28:25 -04:00
Sage Vaillancourt 20a0c7b2e7 Tweak default letter names (no space). 2022-09-29 13:23:38 -04:00
Sage Vaillancourt 05ab019901 Fix default letter names. 2022-09-29 13:22:36 -04:00
Sage Vaillancourt 6bb6821d39 Don't use cookie when logged in. 2022-09-29 13:02:09 -04:00
Sage Vaillancourt 31f6737f92 Correct letter_choices behavior 2022-09-29 12:54:59 -04:00
Sage Vaillancourt ef0b6503cb Try to init CLForm choices sooner. 2022-09-29 12:53:22 -04:00
Sage Vaillancourt 04c16b50fe Flesh out letter-adding.
Add new-letter button.
Refactor _formhelpers for increased modularity.
Re-style <select> tags
Invert logo colors on hover.
2022-09-29 16:35:26 +00:00
Sage Vaillancourt a5704c8c12 Start sketching out add-letter button. 2022-09-29 07:57:13 -04:00
Sage Vaillancourt b86db5c479 A good bit of refactoring.
Also start adding framework for user "tiers".
This refactoring is mostly type-hints and f-strings.
Some functions were also re-organized.
2022-09-28 17:53:32 -04:00
Sage Vaillancourt f1090abbc4 Merge branch 'main' of https://gitlab.com/sagev9000/undercover 2022-09-27 22:50:24 -04:00
Sage Vaillancourt 58bebc2109 Refactor index_get() with early returns. 2022-09-27 22:50:12 -04:00
Sage Vaillancourt 82faabd34a Remove previous css minification 2022-09-28 02:00:34 +00:00
Sage Vaillancourt 4915afa750 Fix requirements syntax 2022-09-28 01:56:52 +00:00
Sage Vaillancourt 777575619c Add and use Flask-Minify. 2022-09-28 01:55:10 +00:00
Sage Vaillancourt 1b32206a23 Implement template-switching.
Point testing subdomain to port 1111.
Fix busted <div>
2022-09-28 00:45:51 +00:00
Sage Vaillancourt 4ce13cad00 Fix arg list 2022-09-27 16:29:51 +00:00
Sage Vaillancourt cfcd318011 Call gs directly when compressing PDFs.
I.e. avoid unnecessary bash invocation.
2022-09-27 08:32:32 -04:00
Sage Vaillancourt 13781ba7d9 Move https responsibilities to caddy 2022-09-27 06:17:27 +00:00
Sage Vaillancourt 3857674244 Put fallbacks in their own file. 2022-09-27 02:47:38 +00:00
Sage Vaillancourt d358c55017 Add basic fallbacks for missing db/email creds.
Fallbacks may eventually warrant their own file.
Use f-strings to format password-reset emails.
Automatically delete email-reset rows after 15 minutes.
 - Cute, but a proper vacuum would likely be more robust.
Remove deprecated FLASK_ENV use.
Use exceptions in generate_pdf()
2022-09-26 17:00:21 -04:00
Sage Vaillancourt 7800c24f99 Forbid password resets after 15 minutes. 2022-09-26 09:40:48 -04:00
Sage Vaillancourt ae1a743855 Inform user if password-reset failed to send.
Remove unused db code.
2022-09-26 08:52:42 -04:00
Sage Vaillancourt c262762bdc Add __main__ to email for testing. 2022-09-26 08:40:10 -04:00
Sage Vaillancourt 9df78a9d6f Add email file!
Oops.
2022-09-26 12:24:59 +00:00
Sage Vaillancourt 7d44e7ed16 Show letter selector when anyone is signed in. 2022-09-26 03:39:58 +00:00
Sage Vaillancourt 611f4f10f6 Centralize index rendering.
Start building more flexibility about missing environment variables.
2022-09-25 21:57:55 -04:00
Sage Vaillancourt 0f73db5e45 Add functionality for password-reset emails.
Start building up multi-template feature.
Redirect to homepage and display error instead of returning plaintext.
Make usernames case-insensitive.
2022-09-26 01:38:17 +00:00
Sage Vaillancourt 98e385376c Don't create a new letter every time. 2022-09-25 03:02:52 +00:00
Sage Vaillancourt 2807c72740 Also host on :80 in prod
Somewhat forcefully puts users on https.
2022-09-25 01:12:32 +00:00
Sage Vaillancourt d8a4fa9bba Fix a few form-data bugs. 2022-09-24 21:59:38 +00:00
Sage Vaillancourt 8fbaf6e369 Try to pull form filling from database, where possible. 2022-09-24 17:39:10 -04:00
Sage Vaillancourt 88bfdb7530 Fix session variable name 2022-09-24 21:38:00 +00:00
Sage Vaillancourt b3f56872d7 Add email validation
Add a simple error display to base.jinja2
Build a bit of skeleton for saving letters to the DB.
2022-09-24 17:20:38 -04:00
Sage Vaillancourt 86563761f2 Add Create Account button to login section 2022-09-24 11:38:15 -04:00
Sage Vaillancourt aa212e2f1f Add secret key fallback with warning. 2022-09-24 10:25:04 -04:00
Sage Vaillancourt 3c02ce279e Tweak login form styling 2022-09-24 12:47:33 +00:00
Sage Vaillancourt 5975f5ddf1 Fix create_account id bug. 2022-09-23 19:42:08 -04:00
Sage Vaillancourt 1c41a1d27c Fix create_account page to point at appropriate route. 2022-09-23 19:41:04 -04:00
Sage Vaillancourt 32b2455070 Add actual create-account action. 2022-09-23 19:40:07 -04:00
Sage Vaillancourt a421e25344 Several style improvements.
Fix create_account() bug.
Lighter placeholder text.
Fancy black-white-button.
Username -> Email on login/create account forms.
2022-09-23 23:33:20 +00:00
Sage Vaillancourt c27d4e9189 Added create account page 2022-09-23 18:59:42 -04:00
Sage Vaillancourt 17494ca4df Add base jinja template. 2022-09-23 18:55:45 -04:00
Sage Vaillancourt fb54a9c2e0 Another form precision tweak. 2022-09-23 15:27:12 -04:00
Sage Vaillancourt 8147c3140e More precise form styling. 2022-09-23 15:25:51 -04:00
Sage Vaillancourt 1eab1e9f10 Use unique login username id. 2022-09-23 15:14:24 -04:00