diff --git a/undercover/static/styles.css b/undercover/static/styles.css index e1a498d..6f42ce7 100644 --- a/undercover/static/styles.css +++ b/undercover/static/styles.css @@ -142,7 +142,7 @@ textarea { color: #a40f0f; } -.submit { +.wipe { margin-left: auto; padding: 0.5em 1em 0.5em 1em; } @@ -150,3 +150,44 @@ textarea { #body { flex-grow: 1; } + +.wipe { + padding: 10px 25px; + font-family: "Roboto", sans-serif; + font-weight: 500; + background: black; + outline: none !important; + cursor: pointer; + transition: all 0.3s ease; + position: relative; + display: inline-block; + text-decoration: none; +} + +.up-wipe { + border: 2px solid rgb(255, 255, 255); + z-index: 1; + color: white; +} + +.up-wipe:after { + position: absolute; + content: ""; + width: 100%; + height: 0; + top: 0; + left: 0; + z-index: -1; + background: rgb(255, 255, 255); + transition: all 0.3s ease; +} + +.up-wipe:hover { + color: rgb(0, 0, 0); +} + +.up-wipe:hover:after { + top: auto; + bottom: 0; + height: 100%; +} diff --git a/undercover/templates/writing.jinja2 b/undercover/templates/writing.jinja2 index 4a62838..7371c03 100644 --- a/undercover/templates/writing.jinja2 +++ b/undercover/templates/writing.jinja2 @@ -18,7 +18,13 @@ } decodeURIComponent(document.cookie).split(';').forEach(cookie => { [id, value] = cookie.trim().split('=') - document.getElementById(id).value = value + if (!id || !value) { + return + } + const e = document.getElementById(id) + if (e) { + e.value = value + } }) } @@ -36,7 +42,7 @@

The secret cover letter generator

{% from "_formhelpers.jinja2" import render_field %} -
+
{{ render_field(form.username) }} {{ render_field(form.company) }} @@ -62,14 +68,14 @@ {% endif %} - + >Generate PDF