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
Sage Vaillancourt
6f456fc5ce
Some login/logout fixes
2022-09-23 19:12:07 +00:00
Sage Vaillancourt
396376669c
Add basic login/logout forms.
...
The new forms need better styling.
Remove index_cache.
2022-09-23 15:02:15 -04:00
Sage Vaillancourt
00472d39a3
Merge branch 'main' of https://gitlab.com/sagev9000/undercover into main
2022-09-23 14:14:15 -04:00
Sage Vaillancourt
45eb4adff0
Display username when logged in.
2022-09-23 14:14:06 -04:00
Sage Vaillancourt
6ea74adc90
Redirect to tiny login form on /login GET
2022-09-23 18:13:43 +00:00
Sage Vaillancourt
d5be15a827
Handle possibly-missing users.
2022-09-23 14:08:44 -04:00
Sage Vaillancourt
6c56b17dfc
Start toying with logins.
...
Use SECRET_KEY from environment.
Remove (I believe) unnecessary config information.
2022-09-23 13:59:43 -04:00
Sage Vaillancourt
a9c256e74f
Rename latty.py to pdf_builder.py
...
Other small cleanup.
2022-09-23 13:37:37 -04:00
Sage Vaillancourt
d7efb0d6ad
Add favicon.
2022-09-23 12:00:59 -04:00
Sage Vaillancourt
178656c929
Merge remote-tracking branch 'origin/main' into main
2022-09-23 11:36:24 -04:00
Sage Vaillancourt
ff659db77f
Some project re-org, and add pytest.
...
Rename flaskr/ to undercover/
Rename writing_templates/ to letter_templates/
Put db testing code into __main__ check
Break css optimization into its own file and add simple testing.
Rename writing.py to routes.py.
Move cached index directly into routes.py
2022-09-23 11:35:56 -04:00
Sage Vaillancourt
80350b370a
Merge branch 'main' of https://gitlab.com/sagev9000/undercover
2022-09-23 13:23:04 +00:00
Sage Vaillancourt
28c84a05cb
Animated generate button
2022-09-23 13:22:27 +00:00
Sage Vaillancourt
0eee7d0ef7
Fix optimization call.
2022-09-23 09:21:58 -04:00
Sage Vaillancourt
f8d1dac945
Break up css optimization functions.
...
sans -> sans-serif
2022-09-23 09:19:30 -04:00
Sage Vaillancourt
76a61f69e0
More precise CSS optimization.
2022-09-23 08:27:38 -04:00
Sage Vaillancourt
784ba35f36
Remove hover test code.
2022-09-22 22:50:45 -04:00
Sage Vaillancourt
85075bd5c7
Tweak default letter body.
2022-09-22 16:58:12 -04:00
Sage Vaillancourt
ebb2e4b045
Use camel case instead.
...
Underscores managed to be worse.
2022-09-22 16:55:49 -04:00
Sage Vaillancourt
8d269c8ed3
Try using underscores in variable names.
...
Makes for pretty ugly latex, but looks better on the frontend.
2022-09-22 16:51:53 -04:00
Sage Vaillancourt
2acac101f1
More spacing fixes. This time in _formhelpers
2022-09-22 16:30:14 -04:00
Sage Vaillancourt
941e83282f
Fix some indentation/spacing
2022-09-22 16:27:47 -04:00
Sage Vaillancourt
ddba4b103b
Significant writing.jinja2 cleanup.
2022-09-22 16:23:01 -04:00
Sage Vaillancourt
17ab611e9c
Rename .html files to .jinja2.
...
Add <title> to main page.
Small style tweaks.
2022-09-22 16:11:26 -04:00
Sage Vaillancourt
a032d0577f
Inline default body string.
2022-09-22 15:47:51 -04:00
Sage Vaillancourt
beda044294
Add hacky update system
2022-09-22 19:43:36 +00:00
Sage Vaillancourt
609d876465
A bit better desktop styling.
...
Extract logo styles to css.
Submit -> Generate PDF
Also fix some funky example text.
2022-09-22 19:12:54 +00:00
Sage Vaillancourt
189270c9c2
More stylish input labels.
...
Smaller subtitle
2022-09-22 17:55:08 +00:00
Sage Vaillancourt
93ea97eaf8
Disable text-selection on main h1.
...
Have logo link back to /
2022-09-22 15:57:30 +00:00
Sage Vaillancourt
56d9a2a30e
Small default-letter improvements
2022-09-22 15:48:12 +00:00
Sage Vaillancourt
552ea20a43
Add simple text-based logo
2022-09-22 15:43:46 +00:00
Sage Vaillancourt
0c07b5b0f2
Several fixes and improvements.
...
"Better" CSS minifying.
Adjust psycopg imports and some usages.
Fix viewport scaling for mobile.
Switch gunicorn to default https port when running in prod.
Correct /dbtest route and add simple /update skeleton
2022-09-22 15:05:17 +00:00
Sage Vaillancourt
b5e892f57e
Start toying with some simple db functionality.
2022-09-21 23:14:50 -04:00
Sage Vaillancourt
924bdbd8ce
Don't schedule cleanup until after compression
...
Returns uncompressed file if compression somehow fails
2021-08-01 00:12:22 -04:00
Sage Vaillancourt
38fdfc1e90
Marginally more flexible input constraints
2021-07-31 23:57:10 -04:00
Sage Vaillancourt
7398773714
Cache the default rendered home page
...
A bit hacky, since CLForm can't seem to initialize properly without
being part of a request. To avoid a reference-before-assignment error,
the INDEX variable is first initialized as a global in __init__.py. But
it is definitely faster. Repeated renders take around 2ms each. Reading
the cached value takes about 0.002ms.
Also split index() into index_get() and index_post(), since GET calls
always use the cached version, and POST calls never do.
2021-07-31 23:21:59 -04:00
Sage Vaillancourt
e52a0e9d28
Less naive cookie processing
...
Remove some unnecessary whitespace
2021-07-31 22:27:51 -04:00
Sage Vaillancourt
7cb9591acf
Give .bigtext a minimum size and smaller font
2021-07-31 22:26:56 -04:00
Sage Vaillancourt
1890095df9
Fix bug with loading data from cookies
...
Bit of groundwork for an actual reset button
2021-07-31 19:18:54 -04:00
Sage Vaillancourt
8bae3ebacf
Don't print compression command
2021-07-31 18:47:51 -04:00
Sage Vaillancourt
161b20f39d
Less annoying port number for prod
2021-07-31 18:38:01 -04:00
Sage Vaillancourt
e37cc3db9b
Compress pdf files before sending to end-user
2021-07-31 17:38:32 -04:00