design: tweak theming and remove questionable text in sign up page

This commit is contained in:
Xylight committed 2024-04-29 17:47:55 -07:00
1 parent 4c8bbe4e64
commit 32c4a060a1
10 files changed
+101 -91

No files matched your search

+22 -22
View File
@@ -39,6 +39,28 @@
<div class="shell {$$props.class}" style={colorsToVars($colors)}> <div class="shell {$$props.class}" style={colorsToVars($colors)}>
<slot /> <slot />
<div
class="
{$userSettings.dock.noGap ? '' : 'p-4 max-w-3xl left-1/2 -translate-x-1/2'}
{$userSettings.dock.top ? 'top-0' : 'bottom-0'}
w-full fixed z-50 pointer-events-none"
style="grid-area: navbar;"
>
<slot
name="navbar"
class="
{$userSettings.dock.noGap
? $userSettings.dock.top
? 'border-b shadow-none'
: 'border-t'
: 'border rounded-full'}
border-slate-200 dark:border-zinc-800 shadow-2xl
backdrop-blur-xl dark:backdrop-brightness-[25%] bg-[#ffffff]/75 dark:bg-transparent transition-colors duration-500
pointer-events-auto"
style="grid-area: navbar"
{title}
/>
</div>
<div <div
class="content md:divide-x divide-slate-200 dark:divide-zinc-900 min-h-screen {$userSettings.newWidth class="content md:divide-x divide-slate-200 dark:divide-zinc-900 min-h-screen {$userSettings.newWidth
? 'limit-width' ? 'limit-width'
@@ -63,28 +85,6 @@
style="grid-area: suffix;" style="grid-area: suffix;"
/> />
</div> </div>
<div
class="
{$userSettings.dock.noGap ? '' : 'p-4 max-w-3xl left-1/2 -translate-x-1/2'}
{$userSettings.dock.top ? 'top-0' : 'bottom-0'}
w-full fixed z-50 pointer-events-none"
style="grid-area: navbar;"
>
<slot
name="navbar"
class="
{$userSettings.dock.noGap
? $userSettings.dock.top
? 'border-b shadow-none'
: 'border-t'
: 'border rounded-full'}
border-slate-200 dark:border-zinc-800 shadow-2xl
backdrop-blur-xl dark:backdrop-brightness-[25%] bg-[#ffffff]/75 dark:bg-transparent transition-colors duration-500
pointer-events-auto"
style="grid-area: navbar"
{title}
/>
</div>
</div> </div>
<style> <style>
+6 -6
View File
@@ -24,6 +24,7 @@
InformationCircle, InformationCircle,
Moon, Moon,
Sun, Sun,
Swatch,
UserCircle, UserCircle,
UserGroup, UserGroup,
} from 'svelte-hero-icons' } from 'svelte-hero-icons'
@@ -100,12 +101,7 @@
<Icon src={Cog6Tooth} mini width={16} slot="prefix" /> <Icon src={Cog6Tooth} mini width={16} slot="prefix" />
Settings Settings
</MenuButton> </MenuButton>
<MenuButton <MenuButton class="!py-0">
class="!py-0"
on:click={() => {
goto('/theme')
}}
>
<Icon <Icon
src={$legacyTheme == 'system' src={$legacyTheme == 'system'
? ComputerDesktop ? ComputerDesktop
@@ -129,6 +125,10 @@
</Select> </Select>
</div> </div>
</MenuButton> </MenuButton>
<MenuButton href="/theme">
<Icon src={Swatch} size="16" mini slot="prefix" />
Theme
</MenuButton>
{#if $userSettings.debugInfo} {#if $userSettings.debugInfo}
<MenuButton link href="/util"> <MenuButton link href="/util">
<Icon src={BugAnt} mini width={16} slot="prefix" /> <Icon src={BugAnt} mini width={16} slot="prefix" />
+10 -28
View File
@@ -26,15 +26,11 @@ interface Settings {
expandableImages: boolean expandableImages: boolean
// should have been named "fade" read posts // should have been named "fade" read posts
markReadPosts: boolean markReadPosts: boolean
// ???
instance?: string
showInstances: { showInstances: {
user: boolean user: boolean
community: boolean community: boolean
comments: boolean comments: boolean
} }
// deprecated
showCompactPosts: boolean
view: View view: View
@@ -49,18 +45,11 @@ interface Settings {
} }
expandSidebar: boolean expandSidebar: boolean
expandCommunities: boolean expandCommunities: boolean
notifications: {
enabled: boolean
pollRate: number
// how often to check in the background
notifRate: number
}
displayNames: boolean displayNames: boolean
nsfwBlur: boolean nsfwBlur: boolean
moderation: { moderation: {
presets: Preset[] presets: Preset[]
} }
newVote: boolean
randomPlaceholders: boolean randomPlaceholders: boolean
modlogCardView: boolean | undefined modlogCardView: boolean | undefined
debugInfo: boolean debugInfo: boolean
@@ -72,7 +61,6 @@ interface Settings {
newWidth: boolean newWidth: boolean
markPostsAsRead: boolean markPostsAsRead: boolean
separateVotes: boolean
openLinksInNewTab: boolean openLinksInNewTab: boolean
crosspostOriginalLink: boolean crosspostOriginalLink: boolean
@@ -98,7 +86,6 @@ export const defaultSettings: Settings = {
community: toBool(env.PUBLIC_SHOW_INSTANCES_COMMUNITY) ?? true, community: toBool(env.PUBLIC_SHOW_INSTANCES_COMMUNITY) ?? true,
comments: toBool(env.PUBLIC_SHOW_INSTANCES_COMMENTS) ?? true, comments: toBool(env.PUBLIC_SHOW_INSTANCES_COMMENTS) ?? true,
}, },
showCompactPosts: toBool(env.PUBLIC_SHOW_COMPACT_POSTS) ?? true,
defaultSort: { defaultSort: {
sort: env.PUBLIC_DEFAULT_FEED_SORT ?? ('Active' as any), sort: env.PUBLIC_DEFAULT_FEED_SORT ?? ('Active' as any),
feed: env.PUBLIC_DEFAULT_FEED ?? ('Local' as any), feed: env.PUBLIC_DEFAULT_FEED ?? ('Local' as any),
@@ -109,12 +96,7 @@ export const defaultSettings: Settings = {
removed: toBool(env.PUBLIC_HIDE_REMOVED) ?? false, removed: toBool(env.PUBLIC_HIDE_REMOVED) ?? false,
}, },
expandSidebar: toBool(env.PUBLIC_EXPAND_SIDEBAR) ?? true, expandSidebar: toBool(env.PUBLIC_EXPAND_SIDEBAR) ?? true,
expandCommunities: true, expandCommunities: toBool(env.PUBLIC_EXPAND_COMMUNITIES) ?? true,
notifications: {
enabled: false,
pollRate: 60 * 1000,
notifRate: 10 * 60 * 1000,
},
displayNames: toBool(env.PUBLIC_DISPLAY_NAMES) ?? true, displayNames: toBool(env.PUBLIC_DISPLAY_NAMES) ?? true,
nsfwBlur: toBool(env.PUBLIC_NSFW_BLUR) ?? true, nsfwBlur: toBool(env.PUBLIC_NSFW_BLUR) ?? true,
moderation: { moderation: {
@@ -125,18 +107,18 @@ export const defaultSettings: Settings = {
}, },
], ],
}, },
newVote: toBool(env.PUBLIC_NEW_VOTE_BUTTONS) ?? false,
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: toBool(env.PUBLIC_DEBUG_INFO) ?? false,
expandImages: true, expandImages: toBool(env.PUBLIC_EXPAND_IMAGES) ?? true,
view: 'cozy', // @ts-ignore
font: 'inter', view: env.PUBLIC_VIEW ?? 'cozy',
leftAlign: false, // @ts-ignore
font: env.PUBLIC_FONT ?? 'inter',
leftAlign: toBool(env.PUBLIC_LEFT_ALIGN) ?? false,
hidePhoton: toBool(env.PUBLIC_REMOVE_CREDIT) ?? false, hidePhoton: toBool(env.PUBLIC_REMOVE_CREDIT) ?? false,
newWidth: true, newWidth: toBool(env.PUBLIC_LIMIT_LAYOUT_WIDTH) ?? true,
markPostsAsRead: true, markPostsAsRead: toBool(env.PUBLIC_MARK_POSTS_AS_READ) ?? true,
separateVotes: false,
openLinksInNewTab: false, openLinksInNewTab: false,
crosspostOriginalLink: true, crosspostOriginalLink: true,
embeds: { embeds: {
+1 -1
View File
@@ -68,7 +68,7 @@ export interface Colors {
export const defaultColors = { export const defaultColors = {
slate: { slate: {
25: 'var(--c-s-25,#fcfdfe)', 25: `var(--c-s-25,#fcfdfe)`,
50: `var(--c-s-50,#f8fafc)`, 50: `var(--c-s-50,#f8fafc)`,
100: `var(--c-s-100,#f1f5f9)`, 100: `var(--c-s-100,#f1f5f9)`,
200: `var(--c-s-200,#e2e8f0)`, 200: `var(--c-s-200,#e2e8f0)`,
+9 -7
View File
@@ -3,13 +3,14 @@
import { setUser } from '$lib/auth.js' import { setUser } from '$lib/auth.js'
import { Note, toast } from 'mono-svelte' import { Note, toast } from 'mono-svelte'
import { DEFAULT_INSTANCE_URL, LINKED_INSTANCE_URL } from '$lib/instance.js' import { DEFAULT_INSTANCE_URL, LINKED_INSTANCE_URL } from '$lib/instance.js'
import { getClient, mayBeIncompatible, site, validateInstance } from '$lib/lemmy.js'
import { Button, TextInput } from 'mono-svelte'
import { import {
Icon, getClient,
Identification, mayBeIncompatible,
QuestionMarkCircle, site,
} from 'svelte-hero-icons' validateInstance,
} from '$lib/lemmy.js'
import { Button, TextInput } from 'mono-svelte'
import { Icon, Identification, QuestionMarkCircle } from 'svelte-hero-icons'
import { DOMAIN_REGEX_FORMS } from '$lib/util.js' import { DOMAIN_REGEX_FORMS } from '$lib/util.js'
import { MINIMUM_VERSION } from '$lib/version.js' import { MINIMUM_VERSION } from '$lib/version.js'
@@ -64,7 +65,7 @@
<form on:submit|preventDefault={logIn} class="flex flex-col gap-5"> <form on:submit|preventDefault={logIn} class="flex flex-col gap-5">
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
<h1 class="font-bold text-3xl">Log In</h1> <h1 class="font-bold text-3xl">Log In</h1>
{#if $site && mayBeIncompatible(MINIMUM_VERSION, $site.version.replace("v", ""))} {#if $site && mayBeIncompatible(MINIMUM_VERSION, $site.version.replace('v', ''))}
<Note> <Note>
This version of Photon supports instances running This version of Photon supports instances running
<span style="font-family: monospace;"> <span style="font-family: monospace;">
@@ -101,6 +102,7 @@
bind:value={data.password} bind:value={data.password}
label="Password" label="Password"
type="password" type="password"
minlength={10}
required required
class="w-full" class="w-full"
/> />
@@ -94,18 +94,21 @@
bind:value={oldPassword} bind:value={oldPassword}
label="Current Password" label="Current Password"
type="password" type="password"
minlength={10}
required required
/> />
<TextInput <TextInput
bind:value={newPassword} bind:value={newPassword}
label="New Password" label="New Password"
type="password" type="password"
minlength={10}
required required
/> />
<TextInput <TextInput
bind:value={newPasswordVerify} bind:value={newPasswordVerify}
label="New Password (Verify)" label="New Password (Verify)"
type="password" type="password"
minlength={10}
required required
/> />
<Button size="lg" color="primary" submit {loading} disabled={loading}> <Button size="lg" color="primary" submit {loading} disabled={loading}>
+1 -1
View File
@@ -1 +1 @@
You're not supposed to be here. how did you get here? something in my code must have broke
+5 -15
View File
@@ -131,14 +131,8 @@
label="Email" label="Email"
required={data.site_view.local_site.require_email_verification} required={data.site_view.local_site.require_email_verification}
type="email" type="email"
placeholder="nigerianprince@notascam.com"
/>
<TextInput
bind:value={username}
label="Username"
required
placeholder="BobTheDestroyer"
/> />
<TextInput bind:value={username} label="Username" required />
<TextInput <TextInput
bind:value={password} bind:value={password}
label="Password" label="Password"
@@ -154,8 +148,8 @@
{#if data.site_view.local_site.registration_mode == 'RequireApplication'} {#if data.site_view.local_site.registration_mode == 'RequireApplication'}
<Material class="dark:text-yellow-200 text-yellow-800 bg-yellow-500/20"> <Material class="dark:text-yellow-200 text-yellow-800 bg-yellow-500/20">
<Icon src={ExclamationTriangle} mini size="20" /> <Icon src={ExclamationTriangle} mini size="20" />
To join this instance, you need to fill out this application, and wait to To join this instance, you must fill out this application, and wait to be
be accepted. accepted. You will receive an email if your application is accepted.
</Material> </Material>
{#if data.site_view.local_site.application_question} {#if data.site_view.local_site.application_question}
<Markdown source={data.site_view.local_site.application_question} /> <Markdown source={data.site_view.local_site.application_question} />
@@ -163,7 +157,7 @@
<MarkdownEditor <MarkdownEditor
label="Application" label="Application"
required required
placeholder="i like this instance's icon " placeholder="An explanation of why you think this instance is awesome"
bind:value={application} bind:value={application}
/> />
{/if} {/if}
@@ -201,11 +195,7 @@
<Button on:click={() => getCaptcha()} size="square-md"> <Button on:click={() => getCaptcha()} size="square-md">
<Icon src={ArrowPath} size="16" mini /> <Icon src={ArrowPath} size="16" mini />
</Button> </Button>
<TextInput <TextInput required bind:value={verifyCaptcha} />
required
bind:value={verifyCaptcha}
placeholder="i guess i'm a robot"
/>
</div> </div>
</div> </div>
{/if} {/if}
+28 -11
View File
@@ -16,11 +16,12 @@
Bookmark, Bookmark,
Icon, Icon,
} from 'svelte-hero-icons' } from 'svelte-hero-icons'
import ColorSwatch from './ColorSwatch.svelte'
const c = defaultColors const c = defaultColors
const svelteIntellisenseSucks = (): (keyof Colors)[] => const svelteIntellisenseSucks = (): (keyof Colors)[] =>
Object.keys(c) as (keyof Colors)[] ['slate', 'zinc', 'other'] as (keyof Colors)[]
let importing = false let importing = false
let importText = '' let importText = ''
@@ -98,24 +99,33 @@
Reset Reset
</Button> </Button>
</div> </div>
<Material color="transparent" class="items-center gap-x-4 color-grid gap-y-2">
<h1 class="text-2xl font-bold col-span-2">Accent</h1>
<ColorSwatch
backgroundColor={defaultColors.primary[900]}
bind:value={$colors.primary[900]}
class="!w-12 !h-12 col-span-1"
/>
<ColorSwatch
backgroundColor={defaultColors.primary[100]}
bind:value={$colors.primary[100]}
class="!w-12 !h-12 col-span-1"
/>
<span class="font-semibold text-base">Light</span>
<span class="font-semibold text-base">Dark</span>
</Material>
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-2"> <div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-2">
{#each svelteIntellisenseSucks() as category} {#each svelteIntellisenseSucks() as category}
<Material class="flex flex-col gap-2"> <Material color="transparent" class="flex flex-col gap-2">
<h1 class="capitalize font-semibold text-lg">{category}</h1> <h1 class="capitalize font-semibold text-lg">{category}</h1>
<div class="flex flex-row gap-1 flex-wrap items-center space-evenly"> <div class="flex flex-row gap-1 flex-wrap items-center space-evenly">
{#each Object.keys(c[category]) as shade} {#each Object.keys(c[category]) as shade}
<div class="flex flex-col gap-0.5 w-10 group"> <div class="flex flex-col gap-0.5 w-10 group">
<div <!--@ts-ignore-->
class="w-full h-8 relative rounded-md border dark:border-zinc-600 hover:dark:border-zinc-400 <ColorSwatch
transition-colors"
style="background-color: {defaultColors[category][shade]}"
>
<input
class="rounded-md border cursor-pointer absolute top-0 left-0 w-full h-full opacity-0"
type="color"
bind:value={$colors[category][shade]} bind:value={$colors[category][shade]}
backgroundColor={defaultColors[category][shade]}
/> />
</div>
<span class="font-medium capitalize">{shade}</span> <span class="font-medium capitalize">{shade}</span>
</div> </div>
{/each} {/each}
@@ -137,3 +147,10 @@
</span> </span>
</div> </div>
</div> </div>
<style>
:global(.color-grid) {
display: grid;
grid-template-columns: min-content min-content;
}
</style>
+16
View File
@@ -0,0 +1,16 @@
<script lang="ts">
export let backgroundColor: string = ''
export let value: string
</script>
<div
class="w-full h-8 relative rounded-md border dark:border-zinc-600 hover:dark:border-zinc-400
transition-colors {$$props.class}"
style="background-color: {backgroundColor}"
>
<input
class="rounded-md border cursor-pointer absolute top-0 left-0 w-full h-full opacity-0"
type="color"
bind:value
/>
</div>