From 628337f3afcd5125299cbf620832779ab209022b Mon Sep 17 00:00:00 2001 From: Kit La Touche Date: Mon, 30 Dec 2024 15:43:01 -0500 Subject: Add in some hand-rolled styles --- ui/styles/variables.css | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 ui/styles/variables.css (limited to 'ui/styles/variables.css') diff --git a/ui/styles/variables.css b/ui/styles/variables.css new file mode 100644 index 0000000..e948c71 --- /dev/null +++ b/ui/styles/variables.css @@ -0,0 +1,18 @@ +:root { + /* + * Not great that these are in px, but not sure what else to do. + */ + --app-bar-height: 48px; + --input-row-height: 2rem; + --interface-padding: 16px; + --nav-width: 21rem; + + /* coloUrs */ + --colour-background: rgba(0, 0, 0, 0.25); + --colour-background-alt: rgba(0, 0, 0, 0.35); + --colour-border: rgba(0, 0, 0, 0.45); + --colour-text: rgb(240, 240, 240); + --colour-okay: #2a9d8f; + --colour-warn: #e9c46a; + --colour-error: #e76f51; +} -- cgit v1.2.3 From c9b3394e9fc2cf6eb505ab03a6479eae996ed6e9 Mon Sep 17 00:00:00 2001 From: Kit La Touche Date: Wed, 1 Jan 2025 18:09:46 -0500 Subject: Just oh so many styles --- ui/app.css | 6 +++ ui/lib/components/Message.svelte | 40 +-------------- ui/lib/components/MessageRun.svelte | 15 +----- ui/routes/(app)/+layout.svelte | 54 ++------------------ ui/routes/(app)/ch/[channel]/+page.svelte | 20 +------- ui/styles/active-channel.css | 3 ++ ui/styles/app-bar.css | 1 + ui/styles/app-layout.css | 56 +++++++++++++++++++++ ui/styles/messages.css | 83 +++++++++++++++++++++++++++++++ ui/styles/sidebar.css | 11 ++++ ui/styles/textarea.css | 38 ++++++++++++++ ui/styles/variables.css | 28 ++++++++--- 12 files changed, 228 insertions(+), 127 deletions(-) create mode 100644 ui/styles/active-channel.css create mode 100644 ui/styles/app-layout.css create mode 100644 ui/styles/messages.css create mode 100644 ui/styles/textarea.css (limited to 'ui/styles/variables.css') diff --git a/ui/app.css b/ui/app.css index c4b464b..a945c6a 100644 --- a/ui/app.css +++ b/ui/app.css @@ -2,11 +2,17 @@ @import url("styles/variables.css"); @import url("styles/overscroll.css"); @import url("styles/app-bar.css"); +@import url("styles/app-layout.css"); @import url("styles/sidebar.css"); +@import url("styles/active-channel.css"); +@import url("styles/messages.css"); +@import url("styles/textarea.css"); /* Debugging */ +/* * / div { outline: 1px dashed grey; background-color: var(--colour-background); box-shadow: 5px 5px 5px var(--colour-border); } +/* */ diff --git a/ui/lib/components/Message.svelte b/ui/lib/components/Message.svelte index cfadbba..6918b5d 100644 --- a/ui/lib/components/Message.svelte +++ b/ui/lib/components/Message.svelte @@ -26,8 +26,8 @@
- - diff --git a/ui/lib/components/MessageRun.svelte b/ui/lib/components/MessageRun.svelte index 6cad381..09388ac 100644 --- a/ui/lib/components/MessageRun.svelte +++ b/ui/lib/components/MessageRun.svelte @@ -9,6 +9,7 @@
@@ -19,17 +20,3 @@ {/each}
- - diff --git a/ui/routes/(app)/+layout.svelte b/ui/routes/(app)/+layout.svelte index 8a70c4b..cacfc2d 100644 --- a/ui/routes/(app)/+layout.svelte +++ b/ui/routes/(app)/+layout.svelte @@ -126,63 +126,19 @@ {#if loading}

Loading…

{:else} -
+
-
+
{@render children?.()}
{/if} - - diff --git a/ui/routes/(app)/ch/[channel]/+page.svelte b/ui/routes/(app)/ch/[channel]/+page.svelte index d4e04fe..8eba709 100644 --- a/ui/routes/(app)/ch/[channel]/+page.svelte +++ b/ui/routes/(app)/ch/[channel]/+page.svelte @@ -67,24 +67,6 @@
-
+
- - diff --git a/ui/styles/active-channel.css b/ui/styles/active-channel.css new file mode 100644 index 0000000..6efc3e3 --- /dev/null +++ b/ui/styles/active-channel.css @@ -0,0 +1,3 @@ +.active-channel { + padding: 1rem; +} diff --git a/ui/styles/app-bar.css b/ui/styles/app-bar.css index 401a278..caa50ed 100644 --- a/ui/styles/app-bar.css +++ b/ui/styles/app-bar.css @@ -5,6 +5,7 @@ flex-direction: row; justify-content: space-between; align-items: stretch; + background-color: var(--colour-background); } .app-bar > * { diff --git a/ui/styles/app-layout.css b/ui/styles/app-layout.css new file mode 100644 index 0000000..ef1eb10 --- /dev/null +++ b/ui/styles/app-layout.css @@ -0,0 +1,56 @@ +/* TODO: generally remove literals from this file. */ + +#interface { + margin: unset; + display: grid; + grid-template: + 'side main' 1fr + / auto 1fr; + height: calc(100vh - var(--app-bar-height)); + + @media (width > 640px) { + --overlay: static; + --translate: 0; + } +} + +nav#sidebar { + grid-area: side; + inset: auto auto 0 0; + padding-right: 0.5rem; + position: var(--overlay, absolute); + transition: translate 300ms ease-out; + width: var(--nav-width); + height: 100vh; + z-index: 10; + + border-radius: 0 1.4rem 1.4rem 0; + + background-color: var(--colour-background-alt); + + @media (width > 640px) { + height: calc(100vh - var(--app-bar-height)); + } +} + +nav.list-nav { + height: calc(100vh - var(--input-row-height) - var(--interface-padding)); + overflow: auto; + + @media (width > 640px) { + height: calc(100vh - var(--app-bar-height) - var(--input-row-height) - var(--interface-padding)); + } +} + +main { + grid-area: main; + height: calc(100vh - var(--app-bar-height)); +} + +main textarea { + resize: none; +} + +nav[data-expanded='false'] { + translate: var(--translate, -100% 0); +} diff --git a/ui/styles/messages.css b/ui/styles/messages.css new file mode 100644 index 0000000..bd46baf --- /dev/null +++ b/ui/styles/messages.css @@ -0,0 +1,83 @@ +.message-run { + position: relative; + border-radius: 0.25rem; + border: 1px solid var(--colour-border); + padding: 0 0 0.5rem 0; + margin-bottom: 1rem; + box-shadow: 0 0.25rem 0.25rem rgba(0, 0, 0, 0.5); +} + +/* TODO: replace these with colour variables. */ +.own-message { + background-color: rgb(32, 42, 74); +} + +.own-message * { + color: rgb(198, 198, 198); +} + +.message-run > span { + /* Username */ + color: var(--colour-text); + background-color: rgb(67, 88, 156); +} + +.message { + padding: 0.5rem 0 0 0.5rem; +} + +.message:hover { + background-color: rgb(21, 28, 49); +} + +.message .handle { + --text-size: 0.5rem; + float: right; + line-height: var(--text-size); + font-size: var(--text-size); + top: -0.5rem; + position: relative; + padding: 0.25rem; + border-radius: 0.25rem; + display: none; + background-color: rgb(67, 88, 156); +} + +.message:hover .handle { + display: flex; +} + +.message .handle button { + line-height: 0.35rem; + background: none; + border: none; + cursor: pointer; +} + +.message-body { + overflow: auto; + max-width: 80vw; + + @media (width > 640px) { + /* 21rem is width of the nav bar in full-screen mode. */ + max-width: calc(90vw - 21rem); + } +} + +.message-body:empty:after { + content: '.'; + visibility: hidden; +} + +/* For rendered message bodies: */ +.message-body blockquote { + border-left: 0.25rem solid lightgrey; + margin-left: 0.5rem; + padding-left: 0.5rem; +} +.message-body pre { + border: 1px solid #312e81; + border-radius: 0.25rem; + background-color: #282555;; + padding: 0.25rem; +} diff --git a/ui/styles/sidebar.css b/ui/styles/sidebar.css index e512847..e9098f2 100644 --- a/ui/styles/sidebar.css +++ b/ui/styles/sidebar.css @@ -3,6 +3,10 @@ background-color: var(--colour-background-alt); } +.list-nav ul { + padding: 0.5rem; +} + .list-nav li { padding: 0.5rem; border-radius: 0.5rem; @@ -32,8 +36,15 @@ border: 1px solid var(--colour-border); z-index: 1; /* Just to make the focus-active border go over the following button. */ flex-grow: 1; + background-color: var(--colour-text); + color: var(--colour-background); } .create-channel button { border-radius: 0 0.5rem 0.5rem 0; + border: 1px solid var(--colour-border); + background-color: var(--colour-text); + color: var(--colour-background); } + +/* TODO: media-query stuff. Margin-left at a constant zero? */ diff --git a/ui/styles/textarea.css b/ui/styles/textarea.css new file mode 100644 index 0000000..72d727f --- /dev/null +++ b/ui/styles/textarea.css @@ -0,0 +1,38 @@ +/* Message input */ +.create-message form { + display: flex; + flex-direction: row; + justify-content: flex-start; + align-items: stretch; +} + +.create-message textarea { + padding: 0.5rem; + border-radius: 0.5rem 0 0 0.5rem; + border: 1px solid var(--colour-border); + z-index: 1; /* Just to make the focus-active border go over the following button. */ + flex-grow: 1; + background-color: var(--colour-text); + color: var(--colour-background); +} + +.create-message button { + border-radius: 0 0.5rem 0.5rem 0; + border: 1px solid var(--colour-border); + background-color: var(--colour-text); + color: var(--colour-background); +} + +.active-channel { + overflow: auto; + flex-grow: 1; + /* TODO: make this all-app background */ + background-color: var(--colour-background); +} + +main { + display: flex; + flex-direction: column; + justify-content: flex-start; + align-items: stretch; +} diff --git a/ui/styles/variables.css b/ui/styles/variables.css index e948c71..5ea4d74 100644 --- a/ui/styles/variables.css +++ b/ui/styles/variables.css @@ -8,11 +8,25 @@ --nav-width: 21rem; /* coloUrs */ - --colour-background: rgba(0, 0, 0, 0.25); - --colour-background-alt: rgba(0, 0, 0, 0.35); - --colour-border: rgba(0, 0, 0, 0.45); - --colour-text: rgb(240, 240, 240); - --colour-okay: #2a9d8f; - --colour-warn: #e9c46a; - --colour-error: #e76f51; + /* Really, we need: + * - Dark header background + * - Medium sidebar background + * - Light channel background + * - okay/warn/error + * - Border colours? + * - Text colour + * - Hover colour + * - Active colour + */ + --colour-background: #253031; + --colour-border: #192122; + + --colour-background-alt: #426A5A; + --colour-border-alt: #2E4A3E; + + --colour-text: #FFFFEA; + + --colour-okay: #6A994E; + --colour-warn: #EBC3BE; + --colour-error: #DE5F55; } -- cgit v1.2.3 From 58a349af98d2b0ea9744e1c5372334f0c826eb47 Mon Sep 17 00:00:00 2001 From: Kit La Touche Date: Sat, 4 Jan 2025 12:14:20 -0500 Subject: Update colour variables --- ui/styles/app-bar.css | 2 +- ui/styles/app-layout.css | 2 +- ui/styles/messages.css | 18 +++++++++++++----- ui/styles/sidebar.css | 20 ++++++++++---------- ui/styles/textarea.css | 14 +++++++------- ui/styles/variables.css | 49 ++++++++++++++++++++++++++++++------------------ 6 files changed, 63 insertions(+), 42 deletions(-) (limited to 'ui/styles/variables.css') diff --git a/ui/styles/app-bar.css b/ui/styles/app-bar.css index caa50ed..d34eb87 100644 --- a/ui/styles/app-bar.css +++ b/ui/styles/app-bar.css @@ -5,7 +5,7 @@ flex-direction: row; justify-content: space-between; align-items: stretch; - background-color: var(--colour-background); + background-color: var(--colour-header-bg); } .app-bar > * { diff --git a/ui/styles/app-layout.css b/ui/styles/app-layout.css index ef1eb10..53f003c 100644 --- a/ui/styles/app-layout.css +++ b/ui/styles/app-layout.css @@ -26,7 +26,7 @@ nav#sidebar { border-radius: 0 1.4rem 1.4rem 0; - background-color: var(--colour-background-alt); + background-color: var(--colour-navbar-bg); @media (width > 640px) { height: calc(100vh - var(--app-bar-height)); diff --git a/ui/styles/messages.css b/ui/styles/messages.css index bd46baf..ebb01c9 100644 --- a/ui/styles/messages.css +++ b/ui/styles/messages.css @@ -1,24 +1,32 @@ .message-run { position: relative; border-radius: 0.25rem; - border: 1px solid var(--colour-border); padding: 0 0 0.5rem 0; margin-bottom: 1rem; box-shadow: 0 0.25rem 0.25rem rgba(0, 0, 0, 0.5); } -/* TODO: replace these with colour variables. */ .own-message { - background-color: rgb(32, 42, 74); + background-color: var(--colour-message-run-self-bg); + border: 1px solid var(--colour-message-run-self-bg); } .own-message * { - color: rgb(198, 198, 198); + color: var(--colour-message-run-text); +} + +.other-message { + background-color: var(--colour-message-run-other-bg); + border: 1px solid var(--colour-message-run-other-bg); +} + +.other-message * { + color: var(--colour-message-run-text); } .message-run > span { /* Username */ - color: var(--colour-text); + color: var(--colour-message-run-text); background-color: rgb(67, 88, 156); } diff --git a/ui/styles/sidebar.css b/ui/styles/sidebar.css index e9098f2..7fe5ca0 100644 --- a/ui/styles/sidebar.css +++ b/ui/styles/sidebar.css @@ -1,6 +1,6 @@ /* Sidebar and channel selector */ #sidebar { - background-color: var(--colour-background-alt); + background-color: var(--colour-navbar-bg); } .list-nav ul { @@ -10,16 +10,16 @@ .list-nav li { padding: 0.5rem; border-radius: 0.5rem; - border: 1px solid var(--colour-border); + border: 1px solid var(--colour-navbar-bg); margin: 0.25rem; } .list-nav li.active { - background-color: var(--colour-okay); + background-color: var(--colour-navbar-bg); } .list-nav li:hover { - background-color: var(--colour-warn); + background-color: var(--colour-navbar-bg); } /* create channel form */ @@ -33,18 +33,18 @@ .create-channel input { padding: 0.5rem; border-radius: 0.5rem 0 0 0.5rem; - border: 1px solid var(--colour-border); + border: 1px solid var(--colour-input-bg); z-index: 1; /* Just to make the focus-active border go over the following button. */ flex-grow: 1; - background-color: var(--colour-text); - color: var(--colour-background); + background-color: var(--colour-input-bg); + color: var(--colour-input-text); } .create-channel button { border-radius: 0 0.5rem 0.5rem 0; - border: 1px solid var(--colour-border); - background-color: var(--colour-text); - color: var(--colour-background); + border: 1px solid var(--colour-input-bg); + background-color: var(--colour-input-bg); + color: var(--colour-input-text); } /* TODO: media-query stuff. Margin-left at a constant zero? */ diff --git a/ui/styles/textarea.css b/ui/styles/textarea.css index 72d727f..3a28d1b 100644 --- a/ui/styles/textarea.css +++ b/ui/styles/textarea.css @@ -9,25 +9,25 @@ .create-message textarea { padding: 0.5rem; border-radius: 0.5rem 0 0 0.5rem; - border: 1px solid var(--colour-border); + border: 1px solid var(--colour-input-bg); z-index: 1; /* Just to make the focus-active border go over the following button. */ flex-grow: 1; - background-color: var(--colour-text); - color: var(--colour-background); + background-color: var(--colour-input-bg); + color: var(--colour-input-text); } .create-message button { border-radius: 0 0.5rem 0.5rem 0; - border: 1px solid var(--colour-border); - background-color: var(--colour-text); - color: var(--colour-background); + border: 1px solid var(--colour-input-bg); + background-color: var(--colour-input-bg); + color: var(--colour-input-text); } .active-channel { overflow: auto; flex-grow: 1; /* TODO: make this all-app background */ - background-color: var(--colour-background); + background-color: var(--colour-active-channel-bg); } main { diff --git a/ui/styles/variables.css b/ui/styles/variables.css index 5ea4d74..0f5cd0e 100644 --- a/ui/styles/variables.css +++ b/ui/styles/variables.css @@ -8,25 +8,38 @@ --nav-width: 21rem; /* coloUrs */ - /* Really, we need: - * - Dark header background - * - Medium sidebar background - * - Light channel background - * - okay/warn/error - * - Border colours? - * - Text colour - * - Hover colour - * - Active colour - */ - --colour-background: #253031; - --colour-border: #192122; - - --colour-background-alt: #426A5A; - --colour-border-alt: #2E4A3E; - - --colour-text: #FFFFEA; - --colour-okay: #6A994E; --colour-warn: #EBC3BE; --colour-error: #DE5F55; + + /* Header BG (dark) */ + --colour-header-bg: rgb(66, 66, 66); + /* Header text (light) */ + --colour-header-text: rgb(245, 245, 245); + /* Navbar BG (medium) */ + --colour-navbar-bg: rgb(117, 117, 117); + /* Navbar text (light) */ + --colour-navbar-text: rgb(224, 224, 224); + /* Input BG (light) */ + --colour-input-bg: rgb(224, 224, 224); + /* Input text (dark) */ + --colour-input-text: rgb(66, 66, 66); + /* Active channel BG (light) */ + --colour-active-channel-bg: rgb(224, 224, 224); + /* MessageRun self BG (medium) */ + --colour-message-run-self-bg: rgb(117, 117, 117); + /* MessageRun other BG (medium) */ + --colour-message-run-other-bg: rgb(117, 117, 117); + /* Message hover BG (medium-dark) */ + --colour-message-hover-bg: rgb(170, 170, 170); + /* Message handle BG (medium-light) */ + --colour-message-handle-bg: rgb(224, 224, 224); + /* Message handle text */ + --colour-message-handle-text: rgb(170, 170, 170); + /* Navbar active BG */ + --colour-navbar-active-bg: rgb(117, 117, 117); + /* Navbar hover BG */ + --colour-navbar-hover-bg: rgb(170, 170, 170); + /* MessageRun text */ + --colour-message-run-text: rgb(170, 170, 170); } -- cgit v1.2.3 From 7cb7c339a2ba0b3a0cf39b09194e7882f74c6e1f Mon Sep 17 00:00:00 2001 From: Kit La Touche Date: Sat, 4 Jan 2025 18:46:43 -0500 Subject: Do a lot of styling --- ui/app.css | 16 ++++++++++++++ ui/styles/active-channel.css | 2 ++ ui/styles/messages.css | 10 +++++++-- ui/styles/sidebar.css | 10 ++++----- ui/styles/textarea.css | 11 ++-------- ui/styles/variables.css | 52 +++++++++++++++++++++++++------------------- 6 files changed, 63 insertions(+), 38 deletions(-) (limited to 'ui/styles/variables.css') diff --git a/ui/app.css b/ui/app.css index a945c6a..1f1fc20 100644 --- a/ui/app.css +++ b/ui/app.css @@ -8,6 +8,22 @@ @import url("styles/messages.css"); @import url("styles/textarea.css"); +body { + background-color: var(--colour-active-channel-bg); +} + +/* TODO: + * put this somewhere appropriate, + * use a correct variable, + * be sensitive to background colour context. + */ +a, +a:hover, +a:visited, +a:active { + color: var(--light-text); +} + /* Debugging */ /* * / div { diff --git a/ui/styles/active-channel.css b/ui/styles/active-channel.css index 6efc3e3..96e8354 100644 --- a/ui/styles/active-channel.css +++ b/ui/styles/active-channel.css @@ -1,3 +1,5 @@ .active-channel { padding: 1rem; + overflow: auto; + flex-grow: 1; } diff --git a/ui/styles/messages.css b/ui/styles/messages.css index 81afe47..a0005d1 100644 --- a/ui/styles/messages.css +++ b/ui/styles/messages.css @@ -4,11 +4,14 @@ padding: 0 0 0.5rem 0; margin-bottom: 1rem; box-shadow: 0 0.25rem 0.25rem rgba(0, 0, 0, 0.5); + width: 95%; + clear: both; } .own-message { background-color: var(--colour-message-run-self-bg); - border: 1px solid var(--colour-message-run-self-bg); + border: 1px solid var(--colour-message-run-self-border); + float: right; } .own-message * { @@ -17,7 +20,7 @@ .other-message { background-color: var(--colour-message-run-other-bg); - border: 1px solid var(--colour-message-run-other-bg); + border: 1px solid var(--colour-message-run-other-border); } .other-message * { @@ -36,6 +39,9 @@ .message:hover { background-color: var(--colour-message-hover-bg); } +.message:hover * { + color: var(--colour-message-hover-text); +} .message .handle { --text-size: 0.5rem; diff --git a/ui/styles/sidebar.css b/ui/styles/sidebar.css index 7fe5ca0..8808a3b 100644 --- a/ui/styles/sidebar.css +++ b/ui/styles/sidebar.css @@ -10,16 +10,16 @@ .list-nav li { padding: 0.5rem; border-radius: 0.5rem; - border: 1px solid var(--colour-navbar-bg); + border: 1px solid var(--colour-navbar-border); margin: 0.25rem; } .list-nav li.active { - background-color: var(--colour-navbar-bg); + background-color: var(--colour-navbar-active-bg); } .list-nav li:hover { - background-color: var(--colour-navbar-bg); + background-color: var(--colour-navbar-hover-bg); } /* create channel form */ @@ -33,7 +33,7 @@ .create-channel input { padding: 0.5rem; border-radius: 0.5rem 0 0 0.5rem; - border: 1px solid var(--colour-input-bg); + border: 1px solid var(--colour-input-border); z-index: 1; /* Just to make the focus-active border go over the following button. */ flex-grow: 1; background-color: var(--colour-input-bg); @@ -42,7 +42,7 @@ .create-channel button { border-radius: 0 0.5rem 0.5rem 0; - border: 1px solid var(--colour-input-bg); + border: 1px solid var(--colour-input-border); background-color: var(--colour-input-bg); color: var(--colour-input-text); } diff --git a/ui/styles/textarea.css b/ui/styles/textarea.css index 3a28d1b..b45a66d 100644 --- a/ui/styles/textarea.css +++ b/ui/styles/textarea.css @@ -9,7 +9,7 @@ .create-message textarea { padding: 0.5rem; border-radius: 0.5rem 0 0 0.5rem; - border: 1px solid var(--colour-input-bg); + border: 1px solid var(--colour-input-border); z-index: 1; /* Just to make the focus-active border go over the following button. */ flex-grow: 1; background-color: var(--colour-input-bg); @@ -18,18 +18,11 @@ .create-message button { border-radius: 0 0.5rem 0.5rem 0; - border: 1px solid var(--colour-input-bg); + border: 1px solid var(--colour-input-border); background-color: var(--colour-input-bg); color: var(--colour-input-text); } -.active-channel { - overflow: auto; - flex-grow: 1; - /* TODO: make this all-app background */ - background-color: var(--colour-active-channel-bg); -} - main { display: flex; flex-direction: column; diff --git a/ui/styles/variables.css b/ui/styles/variables.css index 0f5cd0e..947cf68 100644 --- a/ui/styles/variables.css +++ b/ui/styles/variables.css @@ -12,34 +12,42 @@ --colour-warn: #EBC3BE; --colour-error: #DE5F55; - /* Header BG (dark) */ + --light-text: rgb(228, 228, 255); + --dark-text: rgb(28, 28, 35); + + /* Header */ --colour-header-bg: rgb(66, 66, 66); - /* Header text (light) */ - --colour-header-text: rgb(245, 245, 245); - /* Navbar BG (medium) */ + --colour-header-border: color-mix(in srgb, var(--colour-header-bg) 50%, black); + --colour-header-text: var(--light-text); + + /* Navbar */ --colour-navbar-bg: rgb(117, 117, 117); - /* Navbar text (light) */ - --colour-navbar-text: rgb(224, 224, 224); - /* Input BG (light) */ + --colour-navbar-border: color-mix(in srgb, var(--colour-navbar-bg) 50%, black); + --colour-navbar-text: var(--light-text); + --colour-navbar-active-bg: color-mix(in srgb, var(--colour-navbar-bg) 40%, white); + --colour-navbar-hover-bg: color-mix(in srgb, var(--colour-navbar-bg) 20%, white); + + /* Input */ --colour-input-bg: rgb(224, 224, 224); - /* Input text (dark) */ - --colour-input-text: rgb(66, 66, 66); - /* Active channel BG (light) */ + --colour-input-border: color-mix(in srgb, var(--colour-input-bg) 50%, black); + --colour-input-text: var(--dark-text); + + /* Active channel */ --colour-active-channel-bg: rgb(224, 224, 224); - /* MessageRun self BG (medium) */ + + /* MessageRun */ --colour-message-run-self-bg: rgb(117, 117, 117); - /* MessageRun other BG (medium) */ + --colour-message-run-self-border: color-mix(in srgb, var(--colour-message-run-self-bg) 50%, black); --colour-message-run-other-bg: rgb(117, 117, 117); - /* Message hover BG (medium-dark) */ + --colour-message-run-other-border: color-mix(in srgb, var(--colour-message-run-other-bg) 50%, black); + --colour-message-run-text: var(--light-text); + + /* Message */ --colour-message-hover-bg: rgb(170, 170, 170); - /* Message handle BG (medium-light) */ + --colour-message-hover-text: var(--dark-text); + + /* Message handle */ --colour-message-handle-bg: rgb(224, 224, 224); - /* Message handle text */ - --colour-message-handle-text: rgb(170, 170, 170); - /* Navbar active BG */ - --colour-navbar-active-bg: rgb(117, 117, 117); - /* Navbar hover BG */ - --colour-navbar-hover-bg: rgb(170, 170, 170); - /* MessageRun text */ - --colour-message-run-text: rgb(170, 170, 170); + --colour-message-handle-border: color-mix(in srgb, var(--colour-message-handle-bg) 50%, black); + --colour-message-handle-text: var(--dark-text); } -- cgit v1.2.3 From 436e3cd7d2cab5779f3e33de140fc37038beaf6c Mon Sep 17 00:00:00 2001 From: Kit La Touche Date: Sat, 4 Jan 2025 22:03:41 -0500 Subject: Set a sample colour --- ui/styles/messages.css | 8 ++++---- ui/styles/variables.css | 30 +++++++++++++++++++----------- 2 files changed, 23 insertions(+), 15 deletions(-) (limited to 'ui/styles/variables.css') diff --git a/ui/styles/messages.css b/ui/styles/messages.css index a0005d1..ba659ed 100644 --- a/ui/styles/messages.css +++ b/ui/styles/messages.css @@ -15,7 +15,7 @@ } .own-message * { - color: var(--colour-message-run-text); + color: var(--colour-message-run-self-text); } .other-message { @@ -24,12 +24,12 @@ } .other-message * { - color: var(--colour-message-run-text); + color: var(--colour-message-run-other-text); } .message-run > .username { - color: var(--colour-message-run-text); - background-color: var(--colour-message-run-other-bg); + background-color: var(--colour-message-run-username-bg); + color: var(--colour-message-run-username-text); } .message { diff --git a/ui/styles/variables.css b/ui/styles/variables.css index 947cf68..9a1c689 100644 --- a/ui/styles/variables.css +++ b/ui/styles/variables.css @@ -12,42 +12,50 @@ --colour-warn: #EBC3BE; --colour-error: #DE5F55; - --light-text: rgb(228, 228, 255); - --dark-text: rgb(28, 28, 35); + /* I dunno, I liked this colour: */ + --colour-base: rgb(121, 96, 159); + + /* Light text is a bit hard to read; I may need to adjust it. */ + --light-text: color-mix(in srgb, var(--colour-base) 10%, white); + --dark-text: color-mix(in srgb, var(--colour-base) 10%, black); /* Header */ - --colour-header-bg: rgb(66, 66, 66); + --colour-header-bg: color-mix(in srgb, var(--colour-base) 30%, black); --colour-header-border: color-mix(in srgb, var(--colour-header-bg) 50%, black); --colour-header-text: var(--light-text); /* Navbar */ - --colour-navbar-bg: rgb(117, 117, 117); + --colour-navbar-bg: color-mix(in srgb, var(--colour-base) 50%, black); --colour-navbar-border: color-mix(in srgb, var(--colour-navbar-bg) 50%, black); --colour-navbar-text: var(--light-text); --colour-navbar-active-bg: color-mix(in srgb, var(--colour-navbar-bg) 40%, white); --colour-navbar-hover-bg: color-mix(in srgb, var(--colour-navbar-bg) 20%, white); /* Input */ - --colour-input-bg: rgb(224, 224, 224); + --colour-input-bg: color-mix(in srgb, var(--colour-base) 10%, white); --colour-input-border: color-mix(in srgb, var(--colour-input-bg) 50%, black); --colour-input-text: var(--dark-text); /* Active channel */ - --colour-active-channel-bg: rgb(224, 224, 224); + --colour-active-channel-bg: color-mix(in srgb, var(--colour-base) 25%, white); /* MessageRun */ - --colour-message-run-self-bg: rgb(117, 117, 117); + --colour-message-run-self-bg: color-mix(in srgb, var(--colour-base) 30%, white); --colour-message-run-self-border: color-mix(in srgb, var(--colour-message-run-self-bg) 50%, black); - --colour-message-run-other-bg: rgb(117, 117, 117); + --colour-message-run-other-bg: color-mix(in srgb, var(--colour-base) 50%, white); --colour-message-run-other-border: color-mix(in srgb, var(--colour-message-run-other-bg) 50%, black); - --colour-message-run-text: var(--light-text); + --colour-message-run-self-text: var(--dark-text); + --colour-message-run-other-text: var(--light-text); + + --colour-message-run-username-bg: color-mix(in srgb, var(--colour-base) 70%, white); + --colour-message-run-username-text: color-mix(in srgb, var(--colour-base) 50%, black); /* Message */ - --colour-message-hover-bg: rgb(170, 170, 170); + --colour-message-hover-bg: color-mix(in srgb, var(--colour-base) 70%, white); --colour-message-hover-text: var(--dark-text); /* Message handle */ - --colour-message-handle-bg: rgb(224, 224, 224); + --colour-message-handle-bg: color-mix(in srgb, var(--colour-base) 90%, black); --colour-message-handle-border: color-mix(in srgb, var(--colour-message-handle-bg) 50%, black); --colour-message-handle-text: var(--dark-text); } -- cgit v1.2.3 From 16ec9ef2e1e53b5cc2a3fd86c123e39371d00c2b Mon Sep 17 00:00:00 2001 From: Kit La Touche Date: Sun, 5 Jan 2025 14:44:31 -0500 Subject: Stylize more better --- ui/app.css | 6 ++++++ ui/app.html | 2 +- ui/lib/components/Invite.svelte | 2 +- ui/lib/components/Invites.svelte | 2 +- ui/routes/(app)/+layout.svelte | 4 ---- ui/routes/(app)/me/+page.svelte | 2 ++ ui/routes/(login)/invite/[invite]/+page.svelte | 4 ++-- ui/styles/forms.css | 2 ++ ui/styles/invites.css | 11 +++++++++++ ui/styles/messages.css | 6 ++++++ ui/styles/sidebar.css | 4 ++++ ui/styles/variables.css | 1 + 12 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 ui/styles/invites.css (limited to 'ui/styles/variables.css') diff --git a/ui/app.css b/ui/app.css index 7ac9237..27086e7 100644 --- a/ui/app.css +++ b/ui/app.css @@ -8,9 +8,15 @@ @import url("styles/messages.css"); @import url("styles/textarea.css"); @import url("styles/forms.css"); +@import url("styles/invites.css"); body { background-color: var(--colour-active-channel-bg); + color: var(--dark-text); +} + +hr { + width: 90%; } /* TODO: diff --git a/ui/app.html b/ui/app.html index 942e328..e6be518 100644 --- a/ui/app.html +++ b/ui/app.html @@ -8,6 +8,6 @@ %sveltekit.head% -
%sveltekit.body%
+
%sveltekit.body%
diff --git a/ui/lib/components/Invite.svelte b/ui/lib/components/Invite.svelte index 9e6e469..29631f4 100644 --- a/ui/lib/components/Invite.svelte +++ b/ui/lib/components/Invite.svelte @@ -10,4 +10,4 @@ -{inviteUrl} +{inviteUrl} diff --git a/ui/lib/components/Invites.svelte b/ui/lib/components/Invites.svelte index 5c5d601..7861448 100644 --- a/ui/lib/components/Invites.svelte +++ b/ui/lib/components/Invites.svelte @@ -17,7 +17,7 @@ -