diff --git a/eslint.config.js b/eslint.config.js index 62dbd03..b38d7a5 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -25,6 +25,16 @@ export default [ parserOptions: { parser: ts.parser } + }, + rules: { + '@typescript-eslint/no-unused-vars': [ + 'error', + { varsIgnorePattern: '^(\\$\\$(Props|Events|Slots)$|_)' } + ], + '@typescript-eslint/no-empty-object-type': [ + 'error', + { allowInterfaces: 'with-single-extends' } + ] } }, { diff --git a/package.json b/package.json index a2b93f5..152df06 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "scripts": { - "dev": "vite dev", + "dev": "vite dev --host", "build": "vite build", "preview": "vite preview", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", diff --git a/src/app.css b/src/app.css index a31e444..cb71f47 100644 --- a/src/app.css +++ b/src/app.css @@ -1,3 +1,45 @@ @import 'tailwindcss/base'; @import 'tailwindcss/components'; @import 'tailwindcss/utilities'; + +@layer base { + .weblah-light-theme { + --weblah-color-sb-primary: theme(colors.slate.50); + --weblah-color-sb-secondary: theme(colors.slate.100); + --weblah-color-sb-tertiary: theme(colors.slate.200); + + --weblah-color-sf-primary: theme(colors.slate.900); + --weblah-color-sf-secondary: theme(colors.slate.500); + --weblah-color-sf-tertiary: theme(colors.slate.400); + + --weblah-color-ss-primary: theme(colors.slate.300); + --weblah-color-ss-secondary: theme(colors.slate.300 / 60%); + } + + .weblah-dark-theme { + --weblah-color-sb-primary: theme(colors.slate.950); + --weblah-color-sb-secondary: theme(colors.slate.900); + --weblah-color-sb-tertiary: theme(colors.slate.800); + + --weblah-color-sf-primary: theme(colors.slate.100); + --weblah-color-sf-secondary: theme(colors.slate.400); + --weblah-color-sf-tertiary: theme(colors.slate.500); + + --weblah-color-ss-primary: theme(colors.slate.700); + --weblah-color-ss-secondary: theme(colors.slate.700 / 60%); + } + + :root { + @apply weblah-light-theme; + } + + :is([data-weblah-color-scheme='dark'] *) { + @apply weblah-dark-theme; + } + + @media (prefers-color-scheme: dark) { + :not([data-weblah-color-scheme='light'] *) { + @apply weblah-dark-theme; + } + } +} diff --git a/src/app.html b/src/app.html index bd4b01d..1800846 100644 --- a/src/app.html +++ b/src/app.html @@ -1,14 +1,17 @@ - +
- + %sveltekit.head%+ {#if chat.id !== chat.lastMessage.sender.id} + {chat.lastMessage.sender.name}: + {/if} + {chat.lastMessage.content} +
+ {#if chat.unreadCount} + + {unreadCountFormatter.format(chat.unreadCount)} + + {/if} +Secondary FG
+Tertiary FG
+Secondary FG
+Tertiary FG
+Secondary FG
+Tertiary FG
+{chat.lastMessage.content}
-Chat History Page for {$page.params.chatId}
diff --git a/tailwind.config.ts b/tailwind.config.ts index d316e6d..c0423d6 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -1,13 +1,36 @@ import type { Config } from 'tailwindcss'; -import colors from 'tailwindcss/colors'; export default { content: ['./src/**/*.{html,js,svelte,ts}'], + darkMode: [ + 'variant', + [ + '@media (prefers-color-scheme: dark) { &:not([data-weblah-color-scheme="light"] *) }', + '&:is([data-weblah-color-scheme="dark"] *)' + ] + ], + theme: { extend: { colors: { - accent: colors.blue + // Semantic Background + sb: { + primary: 'var(--weblah-color-sb-primary)', + secondary: 'var(--weblah-color-sb-secondary)', + tertiary: 'var(--weblah-color-sb-tertiary)' + }, + // Semantic Foreground + sf: { + primary: 'var(--weblah-color-sf-primary)', + secondary: 'var(--weblah-color-sf-secondary)', + tertiary: 'var(--weblah-color-sf-tertiary)' + }, + // Semantic Stroke + ss: { + primary: 'var(--weblah-color-ss-primary)', + secondary: 'var(--weblah-color-ss-secondary)' + } } } },