From 454f12003a6d9a6e483c89f13187ba93ae0f0b53 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Sat, 20 Aug 2022 19:14:20 -0400 Subject: [PATCH] Some appearance cleanup. A bit of refactoring, prepping for increased flexibility, and less hard-coding. --- src/app.css | 44 ++++++++++- src/lib/constants.js | 6 +- src/lib/header/NavBar.svelte | 2 +- src/lib/state.js | 76 ++++++++++--------- src/routes/+page.svelte | 55 +++++++------- src/routes/settings/+page.svelte | 126 +++++++++++++++++++++++++------ 6 files changed, 221 insertions(+), 88 deletions(-) diff --git a/src/app.css b/src/app.css index 548ba84..e0c17f0 100644 --- a/src/app.css +++ b/src/app.css @@ -1,7 +1,8 @@ @import '@fontsource/fira-mono'; +@import url('https://fonts.googleapis.com/css2?family=Fira+Sans&family=Montserrat:wght@500&display=swap'); :root { - font-family: Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, + font-family: 'Fira Sans', Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; --font-mono: 'Fira Mono', monospace; --pure-white: #ffffff; @@ -9,13 +10,31 @@ --secondary-color: #d0dde9; --tertiary-color: #edf0f8; --accent-color: #ff0df8; - --heading-color: rgba(0, 0, 0, 0.7); + --heading-color: rgba(0, 0, 0, 0.8); --text-color: #444444; --background-without-opacity: rgba(255, 255, 255, 0.7); --column-width: 42rem; --column-margin-top: 4rem; } +select, button { + font-family: 'Fira Sans', Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; + font-size: 90%; + border-style: solid; + border-radius: 0; + border-width: 1px; + border-color: #888888; + padding: 0.2em; +} + +button { + padding: 0.2em 0.8em; +} + +nav { + font-family: 'Liberation Sans', sans-serif; +} + body { min-height: 100vh; margin: 0; @@ -54,14 +73,21 @@ body::before { flex-direction: column; } +h1 { + font-weight: bold; + color: #111111; +} + h1, h2, p { + font-family: 'Montserrat', sans-serif; font-weight: 400; color: var(--heading-color); } h3 { + font-family: 'Montserrat', sans-serif; margin-top: 0; } @@ -108,6 +134,20 @@ button { font-family: inherit; } +.data-view { + display: flex; + flex-direction: column; + border-style: solid; + border-width: 1px; + border-color: #95c1d3; + flex-grow: 2; + padding: 1em; + background-color: #e2eaff; + height: 86vh; + max-width: 70vw; + overflow-y: scroll; +} + .settings-option { padding: 1em; margin-bottom: 1em; diff --git a/src/lib/constants.js b/src/lib/constants.js index d65dea2..55854c7 100644 --- a/src/lib/constants.js +++ b/src/lib/constants.js @@ -1,4 +1,8 @@ export const queryMode = { REAL_TIME: 'realTime', ONE_SHOT: 'oneShot' -} \ No newline at end of file +} + +export const backendAddressAndPort = 'localhost:3000' + +export const backendUrl = `http://${backendAddressAndPort}` \ No newline at end of file diff --git a/src/lib/header/NavBar.svelte b/src/lib/header/NavBar.svelte index ee2c982..6f9f4d1 100644 --- a/src/lib/header/NavBar.svelte +++ b/src/lib/header/NavBar.svelte @@ -8,7 +8,7 @@