From 4666d7871a9e064a3b3033c7c1daa9c3c4972d98 Mon Sep 17 00:00:00 2001 From: Logan Hunt Date: Thu, 19 Jan 2023 14:04:10 -0700 Subject: Web Client (#11) * Github Oauth * A simple frontend * Add middleware proxy on dev * Forward proxy and rewrite path, add oauth to frontend, increase jwt expiry time to 12 hours * Some simple style changes * Add keys as user * Checkpoint - auth is broken * Fix auth and use player model, unrelated to this pr: flip board if dark * Close player session when password or key deleted or put * Add build script - this branch is quickly becoming cringe * Docker v2 - add migration and scripts, fix local storage and index that caused build issues * Ignore keys, proxy api correctly nginx * Finally nginx is resolved jesus christ * Remove max screen dimension limits cuz cringe * Cursor highlight * Add password form, some minor frontend changes as well * Remove cringe on home page * Move to 127.0.0.1 loopback in env * Add github id in player structs for tests --- front/src/index.css | 225 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 225 insertions(+) create mode 100644 front/src/index.css (limited to 'front/src/index.css') diff --git a/front/src/index.css b/front/src/index.css new file mode 100644 index 0000000..40d45cb --- /dev/null +++ b/front/src/index.css @@ -0,0 +1,225 @@ +*, +*::before, +*::after { + box-sizing: border-box; +} + +:root { + --main-bg-color: #282828; + --primary-text-color: #ebdbb2; + --success-color: #689d6a; + --success-color-hover: #8ec07c; + --gold-color: #d79921; + --gold-color-hover: #fabd2f; + --blue-color: #458488; + --blue-color-hover: #83a598; + --purple-color: #b16286; + --purple-color-hover: #d3869b; + --red-color: #cc241d; + --red-color-hover: #fb4934; +} + +@font-face { + font-family: "DM Mono"; + src: url("./assets/DMMono-Light.ttf"); +} + +body { + margin: 0; + padding: 0; + background-color: var(--main-bg-color); + font-family: "DM Mono"; + color: var(--primary-text-color); +} + +.button { + cursor: pointer; + flex-shrink: 0; + color: var(--main-bg-color); + text-decoration: none; + border-radius: 8px; + border: var(--primary-text-color) solid 1px; + background-color: var(--success-color); + padding: 0.5rem; + + font-family: "DM Mono"; +} +.button:hover { + background-color: var(--success-color-hover); +} +.gold { + background-color: var(--gold-color); +} +.gold:hover { + background-color: var(--gold-color-hover); +} +.red { + color: var(--primary-text-color); + background-color: var(--red-color); +} +.red:hover { + background-color: var(--red-color-hover); +} + +.logo { + width: 6rem; + height: 6rem; +} + +.navbar { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + + margin-bottom: 1rem; + border-radius: 12px; + padding: 0.5rem; + padding-left: 2rem; + padding-right: 2rem; + border: var(--purple-color) solid 1px; +} + +a { + text-decoration: underline; + color: var(--success-color); +} + +a:hover { + background-color: var(--success-color-hover); + text-decoration: none; +} + +.link { + font-size: 1.25rem; +} + +.nav { + display: flex; + flex-direction: row; + justify-content: space-around; + align-items: center; + gap: 2rem; +} + +.flex-row-around { + display: flex; + flex-direction: row; + justify-content: space-around; + align-items: center; + gap: 2rem; +} + +.flex-end-row { + display: flex; + flex-direction: row; + justify-content: flex-end; + gap: 1rem; +} + +.container { + padding-top: 1rem; + max-width: 1200px; + width: 80%; + + margin-left: auto; + margin-right: auto; +} + +.demo-container { + max-width: 900px; + width: 80%; + + border: 1px solid #b16286; + border-radius: 8px; + margin: 0; + padding: 24px; + + background-color: var(--main-bg-color); + + box-shadow: rgb(0, 0, 0, 0.6) 6px 45px 45px -12px; + + position: absolute; + top: 50%; + left: 50%; + -moz-transform: translateX(-50%) translateY(-50%); + -webkit-transform: translateX(-50%) translateY(-50%); + transform: translateX(-50%) translateY(-50%); +} + +.key-card { + display: flex; + justify-content: space-around; + flex-direction: row; + align-items: center; + padding-left: 1rem; + padding-right: 1rem; + border-radius: 12px; + border: solid 1px var(--gold-color); + margin-top: 12px; + gap: 0.5rem; +} + +.key-card-collection { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 0.5rem; +} + +input, +textarea { + font-family: "DM Mono"; + color: var(--primary-text-color); + background-color: rgba(0, 0, 0, 0.2); + border-radius: 4px; + border: 1px solid var(--primary-text-color); +} +input:focus, +textarea:focus { + border: 1px solid var(--gold-color); +} + +.modal { + display: flex; + flex-direction: column; + gap: 1rem; + + padding: 3rem; + top: 50%; + left: 50%; + -moz-transform: translateX(-50%) translateY(-50%); + -webkit-transform: translateX(-50%) translateY(-50%); + transform: translateX(-50%) translateY(-50%); + position: absolute; + + border-radius: 12px; + border: solid 1px var(--purple-color); + background-color: var(--main-bg-color); +} + +@media screen and (max-width: 680px) { + .container { + width: 95%; + } + .navbar { + flex-direction: column; + } + .key-card { + flex-direction: column; + justify-content: start; + gap: 0; + align-items: start; + padding-bottom: 1rem; + } + .flex-row-around { + flex-direction: column; + gap: 0; + } +} + +@media screen and (max-width: 1200px) { + .key-card-collection { + display: flex; + flex-direction: column; + } +} -- cgit v1.3