feat: use grid based layout instead
This commit is contained in:
1 parent
8733b9da6d
commit
c5d1a992f2
6 files changed
+29
-6
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "photon-lemmy",
|
"name": "photon-lemmy",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite dev",
|
"dev": "vite dev",
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ interface Settings {
|
|||||||
randomPlaceholders: boolean
|
randomPlaceholders: boolean
|
||||||
modlogCardView: boolean | undefined
|
modlogCardView: boolean | undefined
|
||||||
debugInfo: boolean
|
debugInfo: boolean
|
||||||
|
systemUI: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export const defaultSettings: Settings = {
|
export const defaultSettings: Settings = {
|
||||||
@@ -89,6 +90,7 @@ export const defaultSettings: Settings = {
|
|||||||
randomPlaceholders: toBool(env.PUBLIC_RANDOM_PLACEHOLDERS) ?? true,
|
randomPlaceholders: toBool(env.PUBLIC_RANDOM_PLACEHOLDERS) ?? true,
|
||||||
modlogCardView: toBool(env.PUBLIC_MODLOG_CARD_VIEW) ?? undefined,
|
modlogCardView: toBool(env.PUBLIC_MODLOG_CARD_VIEW) ?? undefined,
|
||||||
debugInfo: false,
|
debugInfo: false,
|
||||||
|
systemUI: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const userSettings = writable(defaultSettings)
|
export const userSettings = writable(defaultSettings)
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
import { pwaInfo } from 'virtual:pwa-info'
|
import { pwaInfo } from 'virtual:pwa-info'
|
||||||
import PwaReload from '$lib/PwaReload.svelte'
|
import PwaReload from '$lib/PwaReload.svelte'
|
||||||
import { inDarkTheme } from '$lib/ui/colors.js'
|
import { inDarkTheme } from '$lib/ui/colors.js'
|
||||||
|
import { userSettings } from '$lib/settings.js'
|
||||||
|
|
||||||
nProgress.configure({
|
nProgress.configure({
|
||||||
minimum: 0.4,
|
minimum: 0.4,
|
||||||
@@ -42,11 +43,19 @@
|
|||||||
{@html webManifest}
|
{@html webManifest}
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<div class="flex flex-col min-h-screen">
|
<div
|
||||||
<Navbar />
|
class="grid grid-cols-12 grid-rows-6 min-h-screen {$userSettings.systemUI
|
||||||
|
? 'font-system'
|
||||||
|
: 'font-sans'}"
|
||||||
|
>
|
||||||
|
<div class="w-full col-span-12 row-span-full">
|
||||||
|
<Navbar />
|
||||||
|
</div>
|
||||||
<ToastContainer />
|
<ToastContainer />
|
||||||
<Moderation />
|
<Moderation />
|
||||||
<div class="flex flex-row h-full w-full max-w-full flex-1">
|
<div
|
||||||
|
class="flex flex-row h-full w-full max-w-full flex-1 row-span-5 col-span-full"
|
||||||
|
>
|
||||||
<Sidebar />
|
<Sidebar />
|
||||||
<main
|
<main
|
||||||
class="p-3 sm:p-6 min-w-0 w-full flex-[3] sm:rounded-tl-lg
|
class="p-3 sm:p-6 min-w-0 w-full flex-[3] sm:rounded-tl-lg
|
||||||
|
|||||||
@@ -201,6 +201,15 @@
|
|||||||
</Setting>
|
</Setting>
|
||||||
|
|
||||||
<SectionTitle class="mt-4">Other</SectionTitle>
|
<SectionTitle class="mt-4">Other</SectionTitle>
|
||||||
|
<Setting>
|
||||||
|
<span slot="title">Font</span>
|
||||||
|
<span slot="description">What font Photon should use.</span>
|
||||||
|
<MultiSelect
|
||||||
|
options={[true, false]}
|
||||||
|
optionNames={['System UI', 'Browser Font']}
|
||||||
|
bind:selected={$userSettings.systemUI}
|
||||||
|
/>
|
||||||
|
</Setting>
|
||||||
<Setting>
|
<Setting>
|
||||||
<Checkbox bind:checked={$userSettings.debugInfo} slot="title">
|
<Checkbox bind:checked={$userSettings.debugInfo} slot="title">
|
||||||
Debug Info
|
Debug Info
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ body {
|
|||||||
@apply bg-slate-50 text-slate-900 dark:bg-zinc-950 dark:text-zinc-100 accent-slate-950 dark:accent-zinc-50;
|
@apply bg-slate-50 text-slate-900 dark:bg-zinc-950 dark:text-zinc-100 accent-slate-950 dark:accent-zinc-50;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark > body {
|
.dark {
|
||||||
color-scheme: dark;
|
color-scheme: dark;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-1
@@ -4,6 +4,8 @@ export default {
|
|||||||
darkMode: 'class',
|
darkMode: 'class',
|
||||||
theme: {
|
theme: {
|
||||||
fontFamily: {
|
fontFamily: {
|
||||||
|
'sans': ['sans-serif'],
|
||||||
|
'system': ['system-ui'],
|
||||||
'serif': ['serif']
|
'serif': ['serif']
|
||||||
},
|
},
|
||||||
extend: {
|
extend: {
|
||||||
@@ -17,7 +19,8 @@ export default {
|
|||||||
},
|
},
|
||||||
colors: {
|
colors: {
|
||||||
'zinc': {
|
'zinc': {
|
||||||
800: '#1f1f25',
|
700: '#313139',
|
||||||
|
800: '#1f1f24',
|
||||||
900: '#121215'
|
900: '#121215'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user