2021-07-23 17:30:15 -04:00
|
|
|
<!doctype html>
|
2021-07-28 22:50:30 -04:00
|
|
|
<html lang="en">
|
2021-07-23 17:30:15 -04:00
|
|
|
<head>
|
2021-07-24 01:08:18 -04:00
|
|
|
<link rel="stylesheet" type="text/css" href="
|
2021-07-28 22:50:30 -04:00
|
|
|
{{ url_for('static', filename='styles_min.css') }}">
|
2021-07-24 14:51:13 -04:00
|
|
|
<meta name="viewport" content="user-scalable=no">
|
|
|
|
<script type="text/javascript">
|
|
|
|
function getCookie(cname) {
|
|
|
|
let name = cname + "=";
|
|
|
|
let decodedCookie = decodeURIComponent(document.cookie);
|
|
|
|
let ca = decodedCookie.split(';');
|
|
|
|
for(let i = 0; i <ca.length; i++) {
|
|
|
|
let c = ca[i];
|
|
|
|
while (c.charAt(0) == ' ') {
|
|
|
|
c = c.substring(1);
|
|
|
|
}
|
|
|
|
if (c.indexOf(name) == 0) {
|
|
|
|
return c.substring(name.length, c.length);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return "";
|
|
|
|
}
|
2021-07-28 18:43:19 -04:00
|
|
|
function init() {
|
|
|
|
{% if errors %}
|
|
|
|
window.scrollTo(0, document.body.scrollHeight);
|
|
|
|
{% endif %}
|
|
|
|
|
2021-07-31 19:18:54 -04:00
|
|
|
if (window.location.search.includes("reset=true")) {
|
|
|
|
window.history.pushState({},document.title,window.location.pathname);
|
|
|
|
return;
|
2021-07-25 14:59:01 -04:00
|
|
|
}
|
2021-07-28 19:21:02 -04:00
|
|
|
|
2021-07-24 14:51:13 -04:00
|
|
|
cookies = [
|
|
|
|
'username',
|
|
|
|
'company',
|
|
|
|
'jobandpronoun',
|
|
|
|
'skilltypes',
|
|
|
|
'myskills',
|
|
|
|
'closingtext',
|
|
|
|
'body',
|
|
|
|
]
|
|
|
|
for(let i = 0; i < cookies.length; i++) {
|
|
|
|
c = getCookie(cookies[i]);
|
|
|
|
if (c) {
|
|
|
|
document.getElementById(cookies[i]).value=c
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-07-28 18:43:19 -04:00
|
|
|
window.onload = init;
|
2021-07-24 14:51:13 -04:00
|
|
|
</script>
|
2021-07-23 17:30:15 -04:00
|
|
|
</head>
|
|
|
|
<body>
|
2021-07-24 01:08:18 -04:00
|
|
|
<h1>UnderCover</h1>
|
|
|
|
<h2>The secret cover letter generator</h2>
|
2021-07-23 17:30:15 -04:00
|
|
|
|
|
|
|
{% from "_formhelpers.html" import render_field %}
|
|
|
|
<form method=post>
|
|
|
|
<dl>
|
|
|
|
{{ render_field(form.username) }}
|
|
|
|
{{ render_field(form.company) }}
|
|
|
|
{{ render_field(form.jobandpronoun) }}
|
|
|
|
{{ render_field(form.skilltypes) }}
|
|
|
|
{{ render_field(form.myskills) }}
|
2021-07-24 01:08:18 -04:00
|
|
|
{{ render_field(form.body, 'class=bigtext') }}
|
2021-07-23 17:30:15 -04:00
|
|
|
{{ render_field(form.closingtext) }}
|
|
|
|
</dl>
|
2021-07-28 19:21:02 -04:00
|
|
|
|
2021-07-28 18:43:19 -04:00
|
|
|
{% if errors %}
|
2021-07-28 19:21:02 -04:00
|
|
|
<div id=errors>
|
2021-07-28 18:43:19 -04:00
|
|
|
<h3>Your letter has errors.</h3>
|
|
|
|
|
|
|
|
<p>There is likely a typo in one of your variables (the {\blabla} bits).
|
|
|
|
<br>Make sure each is spelled correctly, and has the correct brackets on either
|
|
|
|
side</p>
|
|
|
|
|
|
|
|
<p class=errors>
|
2021-07-28 19:21:02 -04:00
|
|
|
{% for error in errors %}
|
|
|
|
{{ error }}<br>
|
|
|
|
{% endfor %}
|
2021-07-27 23:39:30 -04:00
|
|
|
</p>
|
2021-07-28 19:21:02 -04:00
|
|
|
</div>
|
2021-07-28 18:43:19 -04:00
|
|
|
{% endif %}
|
2021-07-28 19:21:02 -04:00
|
|
|
|
2021-07-28 22:04:24 -04:00
|
|
|
<input class=submit type=submit value="Submit"
|
2021-07-28 18:43:19 -04:00
|
|
|
{% if errors %}
|
2021-07-28 19:21:02 -04:00
|
|
|
onclick="var e = document.getElementById('errors'); e.parentNode.removeChild(e);"
|
2021-07-27 23:39:30 -04:00
|
|
|
{% endif %}
|
2021-07-28 22:04:24 -04:00
|
|
|
>
|
2021-07-23 17:30:15 -04:00
|
|
|
</form>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|