From dcfe064949abb252a532b661dc8b18997ffbfc98 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 1 Jan 2024 16:39:02 -0800 Subject: [PATCH 01/32] =?UTF-8?q?Add=20Ros=C3=A9=20Pine=20Dawn=20theme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/components/chat/SettingsModal.svelte | 3 +- src/routes/+layout.svelte | 1 + static/themes/rosepine-dawn.css | 126 +++++++++++++++++++ static/themes/rosepine.css | 32 +++++ 4 files changed, 161 insertions(+), 1 deletion(-) create mode 100644 static/themes/rosepine-dawn.css diff --git a/src/lib/components/chat/SettingsModal.svelte b/src/lib/components/chat/SettingsModal.svelte index dc4a5989..06a95870 100644 --- a/src/lib/components/chat/SettingsModal.svelte +++ b/src/lib/components/chat/SettingsModal.svelte @@ -34,7 +34,7 @@ // General let API_BASE_URL = OLLAMA_API_BASE_URL; - let themes = ['dark', 'light', 'rose-pine']; + let themes = ['dark', 'light', 'rose-pine', 'rose-pine-dawn']; let theme = 'dark'; let notificationEnabled = false; let system = ''; @@ -1009,6 +1009,7 @@ + diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 92f09f64..63687c18 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -57,6 +57,7 @@ Ollama + {#if loaded} diff --git a/static/themes/rosepine-dawn.css b/static/themes/rosepine-dawn.css new file mode 100644 index 00000000..ed44db3e --- /dev/null +++ b/static/themes/rosepine-dawn.css @@ -0,0 +1,126 @@ +.rose-pine-dawn * { + color: #575279 !important; + stroke: #d7827e !important; +} + +.rose-pine-dawn .app>* { + background-color: #faf4ed !important; +} + +.rose-pine-dawn #nav { + background-color: #fffaf3; +} + +.rose-pine-dawn .py-2\.5.my-auto.flex.flex-col.justify-between.h-screen { + background: #f2e9e1; +} + +.rose-pine-dawn .bg-white.dark\:bg-gray-800 { + background: #f2e9e1; +} + +.rose-pine-dawn .w-4.h-4 { + fill: #ebbcba; +} + +.rose-pine-dawn #chat-textarea { + background: #cecacd; + margin: 0.3rem; + padding: 0.5rem; +} + +.rose-pine-dawn .bg-gradient-to-t.from-white.dark\:from-gray-800.from-40\%.pb-2 { + background: #f2e9e1 !important; + padding-top: 0.6rem; +} + +.rose-pine-dawn .text-white.bg-gray-100.dark\:text-gray-800.dark\:bg-gray-600.disabled.transition.rounded-lg.p-1.mr-0\.5.w-7.h-7.self-center { + background-color: #6e6a86; + transition: background 0.2s ease-out linear; +} + +.rose-pine-dawn .bg-black.text-white.hover\:bg-gray-900.dark\:bg-white.dark\:text-black.dark\:hover\:bg-gray-100.transition.rounded-lg.p-1.mr-0\.5.w-7.h-7.self-center { + background-color: #286983; + transition: background 0.2s ease-out linear; +} + +.rose-pine-dawn .bg-black.text-white.hover\:bg-gray-900.dark\:bg-white.dark\:text-black.dark\:hover\:bg-gray-100.transition.rounded-lg.p-1.mr-0\.5.w-7.h-7.self-center>* { + fill: #56949f !important; + transition: fill 0.2s ease-out linear; +} + +.rose-pine-dawn .w-full.flex.justify-between.rounded-md.px-3.py-2.hover\:bg-gray-900.bg-gray-900.transition.whitespace-nowrap.text-ellipsis { + background-color: #56526e; + font-weight: bold; +} + +.rose-pine-dawn .hover\:bg-gray-900:hover { + --tw-bg-opacity: 1; + background-color: rgb(152 147 165 / var(--tw-bg-opacity)); +} + +.rose-pine-dawn .text-xs.text-gray-700.uppercase.bg-gray-50.dark\:bg-gray-700.dark\:text-gray-400 { + background-color: #403d52; +} + +.rose-pine-dawn .scrollbar-hidden.relative.overflow-x-auto.whitespace-nowrap.svelte-3g4avz { + border-radius: 16px 16px 0 0; +} + +.rose-pine-dawn .base.enter.svelte-ug60r4 { + background-color: #286983; +} + +.rose-pine-dawn .message.svelte-1nauejd { + color: #e0def4 !important; +} + +#dropdownDots { + background-color: #dfdad9; +} + +.flex.py-2\.5.px-3\.5.w-full.hover\:bg-gray-800.transition:hover { + background: #cecacd; +} + +.rose-pine-dawn #dropdownDots { + background-color: #dfdad9; +} + +.rose-pine-dawn .flex.py-2\.5.px-3\.5.w-full.hover\:bg-gray-800.transition:hover { + background: #cecacd; +} + +.rose-pine-dawn .m-auto.rounded-xl.max-w-full.w-\[40rem\].mx-2.bg-gray-50.dark\:bg-gray-900.shadow-3xl { + background-color: #f2e9e1; +} + +.rose-pine-dawn .w-full.rounded.p-4.text-sm.dark\:text-gray-300.dark\:bg-gray-800.outline-none.resize-none { + background-color: #cecacd; +} + +.rose-pine-dawn .w-full.rounded.py-2.px-4.text-sm.dark\:text-gray-300.dark\:bg-gray-800.outline-none.svelte-1vx7r9s { + background-color: #cecacd; +} + +.rose-pine-dawn .px-2\.5.py-2\.5.min-w-fit.rounded-lg.flex-1.md\:flex-none.flex.text-right.transition.bg-gray-200.dark\:bg-gray-700 { + background-color: #dfdad9; +} + +.rose-pine-dawn .px-2\.5.py-2\.5.min-w-fit.rounded-lg.flex-1.md\:flex-none.flex.text-right.transition.hover\:bg-gray-300.dark\:hover\:bg-gray-800:hover { + background-color: #cecacd; +} + +.rose-pine-dawn .px-4.py-2.bg-emerald-600.hover\:bg-emerald-700.text-gray-100.transition.rounded { + background-color: #56949f; +} + +.rose-pine-dawn .svelte-1ee93ns { + --primary: #b4637a !important; + --secondary: #fffaf3 !important; +} + +.rose-pine-dawn .svelte-11kvm4p { + --primary: #56949f !important; + --secondary: #fffaf3 !important; +} \ No newline at end of file diff --git a/static/themes/rosepine.css b/static/themes/rosepine.css index 352f06c3..2f4acd03 100644 --- a/static/themes/rosepine.css +++ b/static/themes/rosepine.css @@ -80,6 +80,38 @@ color: #e0def4 !important; } +.rose-pine #dropdownDots { + background-color: #403d52; +} + +.rose-pine .flex.py-2\.5.px-3\.5.w-full.hover\:bg-gray-800.transition:hover { + background: #524f67; +} + +.rose-pine .m-auto.rounded-xl.max-w-full.w-\[40rem\].mx-2.bg-gray-50.dark\:bg-gray-900.shadow-3xl { + background-color: #26233a; +} + +.rose-pine .w-full.rounded.p-4.text-sm.dark\:text-gray-300.dark\:bg-gray-800.outline-none.resize-none { + background-color: #524f67; +} + +.rose-pine .w-full.rounded.py-2.px-4.text-sm.dark\:text-gray-300.dark\:bg-gray-800.outline-none.svelte-1vx7r9s { + background-color: #524f67; +} + +.rose-pine .px-2\.5.py-2\.5.min-w-fit.rounded-lg.flex-1.md\:flex-none.flex.text-right.transition.bg-gray-200.dark\:bg-gray-700 { + background-color: #403d52; +} + +.rose-pine .px-2\.5.py-2\.5.min-w-fit.rounded-lg.flex-1.md\:flex-none.flex.text-right.transition.hover\:bg-gray-300.dark\:hover\:bg-gray-800:hover { + background-color: #524f67; +} + +.rose-pine .px-4.py-2.bg-emerald-600.hover\:bg-emerald-700.text-gray-100.transition.rounded { + background-color: #31748f; +} + .rose-pine .svelte-1ee93ns { --primary: #eb6f92 !important; --secondary: #e0def4 !important; From 3cac26aa037648da2f859789760fa908801baaf9 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 1 Jan 2024 19:22:25 -0800 Subject: [PATCH 02/32] fix: dark theme as base for custom themes --- src/lib/components/chat/SettingsModal.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/chat/SettingsModal.svelte b/src/lib/components/chat/SettingsModal.svelte index 06a95870..963e616f 100644 --- a/src/lib/components/chat/SettingsModal.svelte +++ b/src/lib/components/chat/SettingsModal.svelte @@ -999,7 +999,7 @@ document.documentElement.classList.add(theme); - if (theme === 'rose-pine') { + if (!['light', 'dark'].includes(theme)) { document.documentElement.classList.add('dark'); } From 78f120566f62bed600fe2742523b95fbff5a40c3 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 1 Jan 2024 19:25:26 -0800 Subject: [PATCH 03/32] feat: id added to chat search --- src/lib/components/layout/Sidebar.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index 18b4f5fb..352ead75 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -149,6 +149,7 @@ Date: Mon, 1 Jan 2024 19:36:09 -0800 Subject: [PATCH 04/32] fix: custom theme light/dark support --- src/app.html | 5 +++-- src/lib/components/chat/SettingsModal.svelte | 18 +++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/app.html b/src/app.html index c2268851..642a570e 100644 --- a/src/app.html +++ b/src/app.html @@ -15,8 +15,9 @@ } else if (localStorage.theme === 'dark') { document.documentElement.classList.add('dark'); } else { - document.documentElement.classList.add('dark'); - document.documentElement.classList.add(localStorage.theme); + localStorage.theme.split(' ').forEach((e) => { + document.documentElement.classList.add(e); + }); } diff --git a/src/lib/components/chat/SettingsModal.svelte b/src/lib/components/chat/SettingsModal.svelte index 963e616f..a220bd4e 100644 --- a/src/lib/components/chat/SettingsModal.svelte +++ b/src/lib/components/chat/SettingsModal.svelte @@ -34,7 +34,7 @@ // General let API_BASE_URL = OLLAMA_API_BASE_URL; - let themes = ['dark', 'light', 'rose-pine', 'rose-pine-dawn']; + let themes = ['dark', 'light', 'rose-pine dark', 'rose-pine-dawn light']; let theme = 'dark'; let notificationEnabled = false; let system = ''; @@ -994,22 +994,22 @@ themes .filter((e) => e !== theme) .forEach((e) => { - document.documentElement.classList.remove(e); + e.split(' ').forEach((e) => { + document.documentElement.classList.remove(e); + }); }); - document.documentElement.classList.add(theme); - - if (!['light', 'dark'].includes(theme)) { - document.documentElement.classList.add('dark'); - } + theme.split(' ').forEach((e) => { + document.documentElement.classList.add(e); + }); console.log(theme); }} > - - + + From 2113c8bed00bcdd5a29c40ec48a8db75d4dd778a Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 1 Jan 2024 19:50:56 -0800 Subject: [PATCH 05/32] fix searchbox --- src/lib/components/layout/Sidebar.svelte | 3 +-- static/themes/rosepine-dawn.css | 10 +++++++--- static/themes/rosepine.css | 8 ++++++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index 352ead75..76bdf7e5 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -132,7 +132,7 @@ {/if}
-
+