From 42c67985a6b7206bf894d03ee7ba290286e5290f Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Sat, 24 Jul 2021 01:08:18 -0400 Subject: [PATCH] Add some desktop styling --- flaskr/static/styles.css | 47 ++++++++++++++++++++++++++++++ flaskr/templates/_formhelpers.html | 6 ++-- flaskr/templates/writing.html | 7 +++-- latty.py | 18 ++++++------ writing.py | 4 +-- writing_templates/base.tex | 19 ------------ 6 files changed, 66 insertions(+), 35 deletions(-) create mode 100644 flaskr/static/styles.css diff --git a/flaskr/static/styles.css b/flaskr/static/styles.css new file mode 100644 index 0000000..1a8da65 --- /dev/null +++ b/flaskr/static/styles.css @@ -0,0 +1,47 @@ +html { + height: 100%; +} + +body { + min-height: 90%; + text-size: 150%; + line-height: 200%; + width: 40vw; + margin-left: auto; + margin-right: auto; + display: flex; + flex-direction: column; +} + +form { + display: flex; + flex-grow: 1; + flex-direction: column; +} + +dl { + display: flex; + flex-grow: 1; + flex-direction: column; +} + +dd { + display: flex; +} + +textarea { + width: 90%; + flex-grow: 1; +} + +.bigtext { + flex-grow: 1; +} + +#body { + flex-grow: 1; +} + +#closingtext { + width: 50%; +} diff --git a/flaskr/templates/_formhelpers.html b/flaskr/templates/_formhelpers.html index 0b6bfda..e5056e1 100644 --- a/flaskr/templates/_formhelpers.html +++ b/flaskr/templates/_formhelpers.html @@ -1,6 +1,6 @@ -{% macro render_field(field) %} -
{{ field.label }} -
{{ field(**kwargs)|safe }} +{% macro render_field(field, extra="") %} +
{{ field.label }}: +
{{ field(**kwargs)|safe }} {% if field.errors %}