From 7b2b440825798f0cbdad7cedd5534f2c369c6dbc Mon Sep 17 00:00:00 2001 From: Luke <39926192+LukeWasTakenn@users.noreply.github.com> Date: Sun, 19 Mar 2023 10:58:43 +0100 Subject: [PATCH] refactor(web): use dark colours instead of slate --- web/src/App.svelte | 3 ++- web/src/components/Input.svelte | 4 ++-- web/src/main.ts | 11 +++++++++++ web/src/pages/resource/Resource.svelte | 1 - web/src/pages/root/Root.svelte | 8 ++++---- web/tailwind.config.cjs | 15 +++++++++++++++ 6 files changed, 34 insertions(+), 8 deletions(-) diff --git a/web/src/App.svelte b/web/src/App.svelte index af0f283..5a1f6f9 100644 --- a/web/src/App.svelte +++ b/web/src/App.svelte @@ -4,10 +4,11 @@ import Root from './pages/root/Root.svelte'; router.mode.hash(); + router.goto('/');
-
+
diff --git a/web/src/components/Input.svelte b/web/src/components/Input.svelte index 40d24cc..0df789d 100644 --- a/web/src/components/Input.svelte +++ b/web/src/components/Input.svelte @@ -3,10 +3,10 @@
- +
diff --git a/web/src/main.ts b/web/src/main.ts index 426cfd1..38ad1bd 100644 --- a/web/src/main.ts +++ b/web/src/main.ts @@ -1,8 +1,19 @@ import './index.css'; import App from './App.svelte'; +import { isEnvBrowser } from './utils/misc'; const app = new App({ target: document.getElementById('app'), }); +if (isEnvBrowser()) { + const root = document.getElementById('app'); + + // https://i.imgur.com/iPTAdYV.png - Night time img + root!.style.backgroundImage = 'url("https://i.imgur.com/3pzRj9n.png")'; + root!.style.backgroundSize = 'cover'; + root!.style.backgroundRepeat = 'no-repeat'; + root!.style.backgroundPosition = 'center'; +} + export default app; diff --git a/web/src/pages/resource/Resource.svelte b/web/src/pages/resource/Resource.svelte index d820878..42ff80e 100644 --- a/web/src/pages/resource/Resource.svelte +++ b/web/src/pages/resource/Resource.svelte @@ -1,5 +1,4 @@
-
+

Resources

{#each resources as resource} {/each}
-
+

General data

-
+

Queries: 360

Time querying: 332 ms

Slow queries: 6

diff --git a/web/tailwind.config.cjs b/web/tailwind.config.cjs index 4e69c6f..6c39b52 100644 --- a/web/tailwind.config.cjs +++ b/web/tailwind.config.cjs @@ -6,6 +6,21 @@ module.exports = { fontFamily: { main: 'Roboto', }, + colors: { + // Mantine dark colours + dark: { + 50: '#C1C2C5', + 100: '#A6A7AB', + 200: '#909296', + 300: '#5C5F66', + 400: '#373A40', + 500: '#2C2E33', + 600: '#25262B', + 700: '#1A1B1E', + 800: '#141517', + 900: '#101113', + }, + }, }, }, plugins: [],