diff --git a/README.md b/README.md index 211e763..71a2ff5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # ![UnderCover.Cafe](https://git.sagev.space/sage/undercover/raw/branch/main/logo.png) -undercover.cafe is a site designed to act as a simple interface for generating -templated cover letters. +https://undercover.sagev.space/ is a site designed to act as a simple interface for +generating templated cover letters. The site is built on Flask, with a very simple VanillaJS frontend, and leverages LaTeX for document generation. User data, including logins and stored diff --git a/app/static/styles.css b/app/static/styles.css index fc62c87..6ea96f1 100644 --- a/app/static/styles.css +++ b/app/static/styles.css @@ -2,6 +2,48 @@ html { height: 100%; } +body { + background-color: #f0f0f0; + line-height: 180%; + font-size: 110%; + margin-left: auto; + margin-right: auto; + display: flex; + flex-direction: column; + font-family: 'Barlow', sans-serif; +} + +.transition, .transition * { + transition-duration: 0.5s; + transition-property: color, border-color, background-color; +} + +.theme-toggler { + cursor: pointer; +} + +body.dark-mode { + color: #e7e7e7; + background: linear-gradient(to bottom right, #2e2e62, #1a1226); + background-repeat: no-repeat; + background-attachment: fixed; +} + +h1, h2 { + font-family: 'BarlowMedium', sans-serif; + text-align: center; + color: #111; +} + + +body.dark-mode h1 { + color: #e7e7e7; +} + +body.dark-mode h2 { + color: #e7e7e7; +} + ::placeholder { color: #999; } @@ -37,26 +79,10 @@ h1:hover span.logo.right { background-color: white; } -body { - background-color: #f0f0f0; - line-height: 180%; - font-size: 110%; - margin-left: auto; - margin-right: auto; - display: flex; - flex-direction: column; - font-family: 'Barlow', sans-serif; -} - strong { font-family: 'BarlowMedium', sans-serif; } -h1, h2 { - font-family: 'BarlowMedium', sans-serif; - text-align: center; -} - h1 { user-select: none; } @@ -84,6 +110,10 @@ label { transition-timing-function: ease-out; } +body.dark-mode label { + color: #eee; +} + label:hover { color: white; background-color: #222; @@ -93,12 +123,38 @@ input, textarea { font-family: 'Barlow', sans-serif; } +body.dark-mode input[type="text"] { + color: #eee; + background-color: #000; + border: none; + padding: 8px; +} + +body.dark-mode textarea { + color: #eee; + background-color: #000; + border: none; + padding: 12px; +} + select { - background-color: white; border-radius: 0; border-style: solid; border-width: 1px; - border-color: #ccc; + padding: 10px; + font-size: 0.9em; +} + +select, body.dark-mode select:hover { + background-color: white; + border-color: #8f8f9d; + color: black; +} + +body.dark-mode select, select:hover { + background-color: black; + border-color: black; + color: #eee; } .letter-form { @@ -130,18 +186,19 @@ div.user form input, label { div.user form input { font-size: 120%; - border-style: solid; - border-width: 1px; - border-color: #ddd; - padding: 0.3em; } .btn { + cursor: pointer; font-weight: bold; border-radius: 0; border-style: none; } +input.btn { + padding: 0.8em 2em; +} + .color-fade { transition-property: color, background-color; transition-duration: 135ms; @@ -158,14 +215,20 @@ div.user form input { background-color: white; } -.secondary { +.secondary, body.dark-mode .secondary:hover { color: black; background-color: white; + border: 1px solid #8f8f9d; } -.secondary:hover { +.secondary a { + color: inherit; +} + +.secondary:hover, body.dark-mode .secondary { color: white; background-color: black; + border: 1px solid black; } .logged-in { @@ -269,6 +332,10 @@ textarea { transition-timing-function: ease-out; } +body.dark-mode div.modal-content { + background-color: #111; +} + .modal-background { background: none; } @@ -306,6 +373,10 @@ textarea { color: #000; } +body.dark-mode .text-button:hover { + color: #fff; +} + /* Small screens */ @media only screen and (max-width: 720px) { body { @@ -356,6 +427,7 @@ textarea { input, textarea { margin-bottom: 0.5em; font-size: 105%; + padding: 4px; } dd { margin-left: 0.5em; @@ -370,8 +442,6 @@ textarea { width: 50%; } div.user form input { - font-size: 110%; - padding: 0.5em; height: min-content; } .user { diff --git a/app/templates/_formhelpers.jinja2 b/app/templates/_formhelpers.jinja2 index 7445118..15b0b0f 100644 --- a/app/templates/_formhelpers.jinja2 +++ b/app/templates/_formhelpers.jinja2 @@ -51,7 +51,7 @@
{{ username }}