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