2021-07-23 17:30:15 -04:00
|
|
|
<!doctype html>
|
2021-07-28 22:50:30 -04:00
|
|
|
<html lang="en">
|
2022-09-22 11:05:17 -04:00
|
|
|
|
2021-07-23 17:30:15 -04:00
|
|
|
<head>
|
2022-09-22 16:11:26 -04:00
|
|
|
<title>UnderCover</title>
|
2022-09-22 16:30:14 -04:00
|
|
|
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='styles_min.css') }}">
|
2022-09-23 12:00:59 -04:00
|
|
|
<link rel="icon" href="{{ url_for('static', filename='favicon.png') }}" />
|
2022-09-22 16:23:01 -04:00
|
|
|
<meta name="viewport" content="user-scalable=no; width=device-width">
|
|
|
|
|
2021-07-24 14:51:13 -04:00
|
|
|
<script type="text/javascript">
|
2022-09-22 16:23:01 -04:00
|
|
|
window.onload = () => {
|
2021-07-28 18:43:19 -04:00
|
|
|
{% if errors %}
|
|
|
|
window.scrollTo(0, document.body.scrollHeight);
|
|
|
|
{% endif %}
|
2022-09-22 16:23:01 -04:00
|
|
|
|
2021-07-31 19:18:54 -04:00
|
|
|
if (window.location.search.includes("reset=true")) {
|
2022-09-22 16:27:47 -04:00
|
|
|
window.history.pushState({}, document.title, window.location.pathname);
|
|
|
|
return;
|
2021-07-25 14:59:01 -04:00
|
|
|
}
|
2022-09-22 16:23:01 -04:00
|
|
|
decodeURIComponent(document.cookie).split(';').forEach(cookie => {
|
|
|
|
[id, value] = cookie.trim().split('=')
|
2022-09-23 09:22:27 -04:00
|
|
|
if (!id || !value) {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
const e = document.getElementById(id)
|
|
|
|
if (e) {
|
|
|
|
e.value = value
|
|
|
|
}
|
2021-07-31 22:27:51 -04:00
|
|
|
})
|
2021-07-24 14:51:13 -04:00
|
|
|
}
|
2022-09-22 16:23:01 -04:00
|
|
|
|
|
|
|
const clearErrors = () => {
|
2022-09-22 16:27:47 -04:00
|
|
|
const e = document.getElementById('errors')
|
|
|
|
e.parentNode.removeChild(e)
|
2022-09-22 16:23:01 -04:00
|
|
|
}
|
2021-07-24 14:51:13 -04:00
|
|
|
</script>
|
2021-07-23 17:30:15 -04:00
|
|
|
</head>
|
2022-09-22 11:05:17 -04:00
|
|
|
|
2021-07-23 17:30:15 -04:00
|
|
|
<body>
|
2022-09-22 11:57:30 -04:00
|
|
|
<a href="/" style="text-decoration: none;">
|
2022-09-22 15:12:54 -04:00
|
|
|
<h1><span class="logo left">Under</span><span class="logo right">Cover</span></h1>
|
2022-09-22 16:23:01 -04:00
|
|
|
</a>
|
2022-09-22 11:05:17 -04:00
|
|
|
<h2>The secret cover letter generator</h2>
|
2022-09-23 14:14:06 -04:00
|
|
|
{% if username %}
|
2022-09-23 15:02:15 -04:00
|
|
|
<div class="user logged-in">
|
|
|
|
<p>You are logged in as {{ username }}</p>
|
|
|
|
<form action="/logout">
|
|
|
|
<input type="submit" value="Logout">
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<div class="user logged-out">
|
|
|
|
<p>You are here as a guest.</p>
|
|
|
|
<form action="/login">
|
|
|
|
<label for="username">Username: </label>
|
|
|
|
<input id="username" maxlength="32" minlength="4" name="username" type="text" placeholder="sagev9000">
|
|
|
|
|
|
|
|
<label for="password">Password: </label>
|
|
|
|
<input id="password" maxlength="32" minlength="4" name="password" type="password">
|
|
|
|
|
|
|
|
<input type="submit" value="Logout">
|
|
|
|
</form>
|
|
|
|
</div>
|
2022-09-23 14:14:06 -04:00
|
|
|
{% endif %}
|
2022-09-22 16:23:01 -04:00
|
|
|
|
2022-09-22 16:11:26 -04:00
|
|
|
{% from "_formhelpers.jinja2" import render_field %}
|
2022-09-23 09:22:27 -04:00
|
|
|
<form method=post id="letter-form">
|
2022-09-22 11:05:17 -04:00
|
|
|
<dl>
|
|
|
|
{{ render_field(form.username) }}
|
|
|
|
{{ render_field(form.company) }}
|
2022-09-22 16:55:49 -04:00
|
|
|
{{ render_field(form.jobAndPronoun) }}
|
|
|
|
{{ render_field(form.skillTypes) }}
|
|
|
|
{{ render_field(form.mySkills) }}
|
2022-09-22 11:05:17 -04:00
|
|
|
{{ render_field(form.body, 'class=bigtext') }}
|
2022-09-22 16:55:49 -04:00
|
|
|
{{ render_field(form.closingText) }}
|
2022-09-22 11:05:17 -04:00
|
|
|
</dl>
|
2022-09-22 16:23:01 -04:00
|
|
|
|
2022-09-22 11:05:17 -04:00
|
|
|
{% if errors %}
|
2022-09-22 16:23:01 -04:00
|
|
|
<div id=errors>
|
|
|
|
<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>
|
|
|
|
{% for error in errors %}
|
|
|
|
{{ error }}<br>
|
|
|
|
{% endfor %}
|
|
|
|
</p>
|
|
|
|
</div>
|
2022-09-22 11:05:17 -04:00
|
|
|
{% endif %}
|
2022-09-22 16:23:01 -04:00
|
|
|
|
2022-09-23 09:22:27 -04:00
|
|
|
<a href="javascript:void(0)"
|
|
|
|
class="wipe up-wipe"
|
2022-09-22 16:23:01 -04:00
|
|
|
{% if errors %}
|
2022-09-23 09:22:27 -04:00
|
|
|
onclick="clearErrors();document.getElementById('letter-form').submit()"
|
|
|
|
{% else %}
|
|
|
|
onclick="document.getElementById('letter-form').submit()"
|
2022-09-22 16:23:01 -04:00
|
|
|
{% endif %}
|
2022-09-23 09:22:27 -04:00
|
|
|
>Generate PDF</a>
|
2022-09-22 11:05:17 -04:00
|
|
|
</form>
|
2021-07-23 17:30:15 -04:00
|
|
|
</body>
|
2022-09-22 16:27:47 -04:00
|
|
|
|
2021-07-23 17:30:15 -04:00
|
|
|
</html>
|