Add some desktop styling
This commit is contained in:
parent
5be8d759c3
commit
42c67985a6
|
@ -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%;
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{% macro render_field(field) %}
|
{% macro render_field(field, extra="") %}
|
||||||
<dt>{{ field.label }}
|
<dt>{{ field.label }}:
|
||||||
<dd>{{ field(**kwargs)|safe }}
|
<dd {{extra}}>{{ field(**kwargs)|safe }}
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
<ul class=errors>
|
<ul class=errors>
|
||||||
{% for error in field.errors %}
|
{% for error in field.errors %}
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="
|
||||||
|
{{ url_for('static', filename='styles.css') }}">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>UnderCover: The secret cover letter generator</h1>
|
<h1>UnderCover</h1>
|
||||||
|
<h2>The secret cover letter generator</h2>
|
||||||
|
|
||||||
{% from "_formhelpers.html" import render_field %}
|
{% from "_formhelpers.html" import render_field %}
|
||||||
<form method=post>
|
<form method=post>
|
||||||
|
@ -13,7 +16,7 @@
|
||||||
{{ render_field(form.jobandpronoun) }}
|
{{ render_field(form.jobandpronoun) }}
|
||||||
{{ render_field(form.skilltypes) }}
|
{{ render_field(form.skilltypes) }}
|
||||||
{{ render_field(form.myskills) }}
|
{{ render_field(form.myskills) }}
|
||||||
{{ render_field(form.body) }}
|
{{ render_field(form.body, 'class=bigtext') }}
|
||||||
{{ render_field(form.closingtext) }}
|
{{ render_field(form.closingtext) }}
|
||||||
</dl>
|
</dl>
|
||||||
<p><input type=submit value="Submit"></p>
|
<p><input type=submit value="Submit"></p>
|
||||||
|
|
18
latty.py
18
latty.py
|
@ -21,15 +21,15 @@ class CLData():
|
||||||
closingtext: str
|
closingtext: str
|
||||||
body: str
|
body: str
|
||||||
|
|
||||||
def get_pairs():
|
def get_pairs(self):
|
||||||
return [
|
return [
|
||||||
("username", username),
|
("username", self.username),
|
||||||
("company", company),
|
("company", self.company),
|
||||||
("jobandpronoun", jobandpronoun),
|
("jobandpronoun", self.jobandpronoun),
|
||||||
("skilltypes", skilltypes),
|
("skilltypes", self.skilltypes),
|
||||||
("myskills", myskills),
|
("myskills", self.myskills),
|
||||||
("closingtext", closingtext),
|
("closingtext", self.closingtext),
|
||||||
("body", body),
|
("body", self.body),
|
||||||
]
|
]
|
||||||
|
|
||||||
def define(file, name, data, whitespace=""): file.write("\\def \\" + name + "{" + data + whitespace + "}\n")
|
def define(file, name, data, whitespace=""): file.write("\\def \\" + name + "{" + data + whitespace + "}\n")
|
||||||
|
@ -42,7 +42,7 @@ def generate(data: CLData, unique):
|
||||||
define(f, "username", data.username)
|
define(f, "username", data.username)
|
||||||
define(f, "thecompany", data.company)
|
define(f, "thecompany", data.company)
|
||||||
define(f, "jobandpronoun", data.jobandpronoun, " ")
|
define(f, "jobandpronoun", data.jobandpronoun, " ")
|
||||||
define(f, "skilltypes", data.skilltypes)
|
define(f, "skilltypes", data.skilltypes, " ")
|
||||||
define(f, "myskills", data.myskills, " ")
|
define(f, "myskills", data.myskills, " ")
|
||||||
define(f, "closingtext", data.closingtext)
|
define(f, "closingtext", data.closingtext)
|
||||||
define(f, "body", data.body)
|
define(f, "body", data.body)
|
||||||
|
|
|
@ -19,7 +19,7 @@ class CLForm(Form):
|
||||||
)
|
)
|
||||||
jobandpronoun = StringField('Job and Pronoun',
|
jobandpronoun = StringField('Job and Pronoun',
|
||||||
[validators.Length(min=4, max=99)],
|
[validators.Length(min=4, max=99)],
|
||||||
default="Banana Stocker"
|
default="a banana stocker"
|
||||||
)
|
)
|
||||||
skilltypes = StringField('Skill Type',
|
skilltypes = StringField('Skill Type',
|
||||||
[validators.Length(min=4, max=99)],
|
[validators.Length(min=4, max=99)],
|
||||||
|
@ -27,7 +27,7 @@ class CLForm(Form):
|
||||||
)
|
)
|
||||||
myskills = StringField('My Skills',
|
myskills = StringField('My Skills',
|
||||||
[validators.Length(min=4, max=99)],
|
[validators.Length(min=4, max=99)],
|
||||||
default="stocking"
|
default="stocking bananas"
|
||||||
)
|
)
|
||||||
closingtext = StringField('Closing Text',
|
closingtext = StringField('Closing Text',
|
||||||
[validators.Length(min=4, max=99)],
|
[validators.Length(min=4, max=99)],
|
||||||
|
|
|
@ -1,22 +1,3 @@
|
||||||
|
|
||||||
%\def \username {Sage Vaillancourt}
|
|
||||||
%\def \thecompany {BananCorp}
|
|
||||||
%\def \jobandpronoun {PusherBoy }
|
|
||||||
%\def \skilltypes {broad, practical }
|
|
||||||
%\def \myskills {software design principles }
|
|
||||||
%\def \closingtext {I am looking forward to hearing from you}
|
|
||||||
|
|
||||||
%\def \body {
|
|
||||||
% My name is \username. I would like to work as \jobandpronoun with your
|
|
||||||
% company. I think my knowledge of \myskills will contribute well to your
|
|
||||||
% team.
|
|
||||||
%
|
|
||||||
% I am passionate about my work, and think we would work well together.
|
|
||||||
%
|
|
||||||
% Thank you for your consideration.
|
|
||||||
%
|
|
||||||
%}
|
|
||||||
|
|
||||||
\documentclass[12pt]{letter}
|
\documentclass[12pt]{letter}
|
||||||
\signature{\username}
|
\signature{\username}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue