misc: design fixes

This commit is contained in:
James Xylight committed 2025-08-17 15:56:36 -07:00
1 parent 52f3b9da2a
commit bf0d4cf238
12 files changed
+86 -64

No files matched your search

+2 -2
View File
@@ -31,10 +31,10 @@
{@const slctd = selected == option} {@const slctd = selected == option}
<button <button
class={[ class={[
'px-3 py-1.5 rounded-xl text-sm font-medium transition-colors duration-75 relative cursor-pointer', 'px-2.5 py-1 rounded-xl text-sm font-medium transition-colors duration-75 relative cursor-pointer',
slctd slctd
? 'bg-primary-900 dark:bg-primary-100 text-slate-50 dark:text-zinc-900 hover:brightness-90 active:brightness-75' ? 'bg-primary-900 dark:bg-primary-100 text-slate-50 dark:text-zinc-900 hover:brightness-90 active:brightness-75'
: ' border dark:bg-zinc-900/50 bg-white border-slate-300 dark:border-zinc-800 hover:bg-slate-200 hover:dark:bg-zinc-800 active:bg-slate-300 active:dark:bg-zinc-900', : ' border dark:bg-zinc-900/50 bg-white border-slate-200 dark:border-zinc-800 hover:bg-slate-100 hover:dark:bg-zinc-800 active:bg-slate-200 active:dark:bg-zinc-900',
]} ]}
onclick={e => { onclick={e => {
e.preventDefault() e.preventDefault()
-9
View File
@@ -64,9 +64,6 @@
{#snippet title()} {#snippet title()}
<span class="flex items-center gap-1 py-1 px-2 w-full"> <span class="flex items-center gap-1 py-1 px-2 w-full">
{$t('cards.site.about')} {$t('cards.site.about')}
<hr
class="w-full flex-1 ml-1 border-slate-200 dark:border-zinc-800"
/>
</span> </span>
{/snippet} {/snippet}
<Markdown source={site.site.description} /> <Markdown source={site.site.description} />
@@ -88,9 +85,6 @@
{#snippet title()} {#snippet title()}
<span class="flex items-center gap-1 py-1 px-2 w-full"> <span class="flex items-center gap-1 py-1 px-2 w-full">
{$t('cards.site.stats')} {$t('cards.site.stats')}
<hr
class="w-full flex-1 ml-1 border-slate-200 dark:border-zinc-800"
/>
</span> </span>
{/snippet} {/snippet}
<div class="flex flex-row gap-4 flex-wrap"> <div class="flex flex-row gap-4 flex-wrap">
@@ -118,9 +112,6 @@
{#snippet title()} {#snippet title()}
<span class="flex items-center gap-1 py-1 px-2 w-full"> <span class="flex items-center gap-1 py-1 px-2 w-full">
{$t('cards.site.admins')} {$t('cards.site.admins')}
<hr
class="w-full flex-1 ml-1 border-slate-200 dark:border-zinc-800"
/>
</span> </span>
{/snippet} {/snippet}
<ItemList <ItemList
@@ -108,11 +108,11 @@
<Button <Button
size="custom" size="custom"
rounding="xl" rounding="xl"
class="w-8.5 h-8.5" class="w-7.5 h-7.5"
color={language != undefined ? 'primary' : 'ghost'} color={language != undefined ? 'primary' : 'ghost'}
title={$t('form.profile.languages.title')} title={$t('form.profile.languages.title')}
> >
<Icon src={Language} size="16" micro /> <Icon src={Language} size="14" micro />
</Button> </Button>
{/snippet} {/snippet}
@@ -88,7 +88,9 @@
<div <div
class="flex flex-col overflow-hidden whitespace-nowrap flex-1 min-w-0 shrink" class="flex flex-col overflow-hidden whitespace-nowrap flex-1 min-w-0 shrink"
> >
<div class="font-medium text-base overflow-hidden text-ellipsis"> <div
class="font-medium text-base overflow-hidden text-ellipsis leading-5"
>
<span>{community.community.title}</span> <span>{community.community.title}</span>
{#if community.community.deleted} {#if community.community.deleted}
<Icon <Icon
@@ -128,7 +130,7 @@
{/if} {/if}
</div> </div>
<div <div
class="text-sm text-slate-600 dark:text-zinc-400 flex gap-0.5" class="text-sm text-slate-500 dark:text-zinc-500 flex gap-0.5"
class:justify-center={view == 'cozy'} class:justify-center={view == 'cozy'}
> >
<span class="overflow-hidden text-ellipsis"> <span class="overflow-hidden text-ellipsis">
@@ -144,11 +144,14 @@
</Label> </Label>
{/if} {/if}
<div <div
class="flex flex-col border border-slate-200 border-b-slate-300 dark:border-zinc-800 class={[
focus-within:border-primary-900 dark:focus-within:border-primary-100 focus-within:ring-3 ring-slate-300 'flex flex-col border border-slate-200 border-b-slate-300 dark:border-zinc-800',
dark:ring-zinc-700 rounded-2xl 'focus-within:border-primary-900 dark:focus-within:border-primary-100 focus-within:ring-3 ring-slate-300 dark:ring-zinc-700',
overflow-hidden transition-colors {clazz}" 'bg-white dark:bg-zinc-950',
class:mt-1={label} 'rounded-2xl overflow-hidden transition-colors',
label && 'mt-1',
clazz,
]}
> >
{#if previewing} {#if previewing}
<div <div
@@ -160,79 +163,99 @@ overflow-hidden transition-colors {clazz}"
{#if tools} {#if tools}
<!--Toolbar--> <!--Toolbar-->
<div <div
class="*:shrink-0 flex flex-row overflow-auto p-1.5 gap-1.5 border-b class={[
border-slate-200 dark:border-zinc-900 {disabled '*:shrink-0 flex flex-row overflow-auto p-1.5 gap-1.5',
? 'opacity-60 pointer-events-none' disabled && 'opacity-60 pointer-events-none',
: ''}" ]}
> >
<Button <Button
onclick={() => wrapSelection('**', '**')} onclick={() => wrapSelection('**', '**')}
title="Bold" title="Bold"
size="square-md" size="custom"
class="w-8 h-8"
rounding="lg"
> >
<Icon src={Bold} size="16" mini /> <Icon src={Bold} size="15" micro />
</Button> </Button>
<Button <Button
onclick={() => wrapSelection('*', '*')} onclick={() => wrapSelection('*', '*')}
title="Italic" title="Italic"
size="square-md" size="custom"
class="w-8 h-8"
rounding="lg"
> >
<Icon src={Italic} size="16" micro /> <Icon src={Italic} size="15" micro />
</Button> </Button>
<Button <Button
onclick={() => wrapSelection('[', '](https://example.com)')} onclick={() => wrapSelection('[', '](https://example.com)')}
title="Link" title="Link"
size="square-md" size="custom"
class="w-8 h-8"
rounding="lg"
> >
<Icon src={Link} size="16" micro /> <Icon src={Link} size="15" micro />
</Button> </Button>
<Button <Button
onclick={() => wrapSelection('\n# ', '')} onclick={() => wrapSelection('\n# ', '')}
title="Header" title="Header"
size="square-md" size="custom"
class="w-8 h-8"
rounding="lg"
> >
<Icon src={H1} size="16" micro /> <Icon src={H1} size="15" micro />
</Button> </Button>
<Button <Button
onclick={() => wrapSelection('~~', '~~')} onclick={() => wrapSelection('~~', '~~')}
title="Strikethrough" title="Strikethrough"
size="square-md" size="custom"
class="w-8 h-8"
rounding="lg"
> >
<Icon src={Strikethrough} size="16" micro /> <Icon src={Strikethrough} size="15" micro />
</Button> </Button>
<Button <Button
onclick={() => wrapSelection('\n> ', '')} onclick={() => wrapSelection('\n> ', '')}
title="Quote" title="Quote"
size="square-md" size="custom"
class="w-8 h-8"
rounding="lg"
> >
<span class="font-bold font-serif text-lg">"</span> <span class="font-bold font-serif text-lg">"</span>
</Button> </Button>
<Button <Button
onclick={() => wrapSelection('\n- ', '')} onclick={() => wrapSelection('\n- ', '')}
title="List" title="List"
size="square-md" size="custom"
class="w-8 h-8"
rounding="lg"
> >
<Icon src={ListBullet} micro size="16" /> <Icon src={ListBullet} micro size="15" />
</Button> </Button>
<Button <Button
onclick={() => wrapSelection('`', '`')} onclick={() => wrapSelection('`', '`')}
title="Code" title="Code"
size="square-md" size="custom"
class="w-8 h-8"
rounding="lg"
> >
<Icon src={CodeBracket} micro size="16" /> <Icon src={CodeBracket} micro size="15" />
</Button> </Button>
<Button <Button
onclick={() => onclick={() =>
wrapSelection('::: spoiler <spoiler title>\n', '\n:::')} wrapSelection('::: spoiler <spoiler title>\n', '\n:::')}
title="Spoiler" title="Spoiler"
size="square-md" size="custom"
class="w-8 h-8"
rounding="lg"
> >
<Icon src={ExclamationTriangle} micro size="16" /> <Icon src={ExclamationTriangle} micro size="15" />
</Button> </Button>
<Button <Button
onclick={() => wrapSelection('~', '~')} onclick={() => wrapSelection('~', '~')}
title="Subscript" title="Subscript"
size="square-md" size="custom"
class="w-8 h-8"
rounding="lg"
> >
<span class="font-bold"> <span class="font-bold">
X X
@@ -242,7 +265,9 @@ overflow-hidden transition-colors {clazz}"
<Button <Button
onclick={() => wrapSelection('^', '^')} onclick={() => wrapSelection('^', '^')}
title="Superscript" title="Superscript"
size="square-md" size="custom"
class="w-8 h-8"
rounding="lg"
> >
<span class="font-bold"> <span class="font-bold">
X X
@@ -253,9 +278,11 @@ overflow-hidden transition-colors {clazz}"
<Button <Button
onclick={() => (uploadingImage = !uploadingImage)} onclick={() => (uploadingImage = !uploadingImage)}
title="Image" title="Image"
size="square-md" size="custom"
class="w-8 h-8"
rounding="lg"
> >
<Icon src={Photo} size="16" micro /> <Icon src={Photo} size="15" micro />
</Button> </Button>
{/if} {/if}
</div> </div>
@@ -293,7 +320,7 @@ overflow-hidden transition-colors {clazz}"
{#if previewButton} {#if previewButton}
<div <div
class="p-2 flex flex-row items-center w-full bg-white dark:bg-zinc-950 gap-1" class="p-2 flex flex-row items-center w-full bg-slate-50 border-t border-slate-200 dark:border-zinc-900 dark:bg-zinc-925 gap-1"
> >
{#if previewButton} {#if previewButton}
<MultiSelect <MultiSelect
+1 -1
View File
@@ -15,6 +15,6 @@
<span class="font-medium text-left"> <span class="font-medium text-left">
{@render children?.()} {@render children?.()}
</span> </span>
<hr class="border-slate-200 flex-1 w-full dark:border-zinc-800" /> <div class="flex-1"></div>
{@render action?.()} {@render action?.()}
</div> </div>
+11 -7
View File
@@ -24,7 +24,7 @@
}: Props = $props() }: Props = $props()
</script> </script>
<ul class="divide-y-3 divide-slate-50 dark:divide-zinc-925"> <ul class="space-y-1">
{#if items} {#if items}
{#each items as item, index (item)} {#each items as item, index (item)}
<li <li
@@ -70,14 +70,18 @@
} }
:global(.dark) ul > :global(li) { :global(.dark) ul > :global(li) {
background-color: var(--color-zinc-950); background-color: color-mix(
in oklab,
var(--color-zinc-925),
var(--color-zinc-900)
);
&:hover { &:hover {
background-color: color-mix( background-color: var(--color-zinc-900);
in oklab, }
var(--color-zinc-925),
var(--color-zinc-900) &:active {
); background-color: var(--color-zinc-950);
} }
} }
+1 -1
View File
@@ -56,7 +56,7 @@
{...rest} {...rest}
class="{allowIconOnly class="{allowIconOnly
? 'max-md:px-1.5 max-md:py-1.5' ? 'max-md:px-1.5 max-md:py-1.5'
: ''} px-2.5 py-1 {badgeRoundness[ : ''} px-2 py-1 {badgeRoundness[
rounding rounding
]} text-xs font-medium flex items-center gap-1 ring-1 ring-inset {badgeColor[ ]} text-xs font-medium flex items-center gap-1 ring-1 ring-inset {badgeColor[
color color
+1 -1
View File
@@ -46,7 +46,7 @@
export const buttonSize = { export const buttonSize = {
xs: 'px-2 py-1 text-xs', xs: 'px-2 py-1 text-xs',
sm: 'px-3 py-1.5 text-xs', sm: 'px-3 py-1.5 text-[12px]',
md: 'px-3 py-1.5', md: 'px-3 py-1.5',
lg: 'px-4 py-2', lg: 'px-4 py-2',
xl: 'px-6 py-3', xl: 'px-6 py-3',
+2 -4
View File
@@ -39,9 +39,7 @@
import Label from '../forms/Label.svelte' import Label from '../forms/Label.svelte'
import { generateID } from '../forms/helper.js' import { generateID } from '../forms/helper.js'
const borderClass = ` const borderClass = `border border-slate-200 border-b-slate-300 dark:border-zinc-800`
border border-slate-200 border-b-slate-300 dark:border-zinc-900 dark:border-t-zinc-800
`
let { let {
label = undefined, label = undefined,
@@ -52,7 +50,7 @@
size = 'md', size = 'md',
id = generateID(), id = generateID(),
inlineAffixes = false, inlineAffixes = false,
shadow = 'none', shadow = 'sm',
element = $bindable(), element = $bindable(),
class: clazz = '', class: clazz = '',
customLabel: passedCustomLabel, customLabel: passedCustomLabel,
+2 -2
View File
@@ -174,9 +174,9 @@
</Menu> </Menu>
<Icon <Icon
src={ChevronUpDown} src={ChevronUpDown}
mini micro
size="16" size="16"
class="absolute right-0 top-1/4 mx-2 box-border pointer-events-none" class="absolute right-0 top-1/4 mx-1.5 box-border pointer-events-none"
/> />
</div> </div>
</div> </div>
+2 -2
View File
@@ -17,9 +17,9 @@
}: Props = $props() }: Props = $props()
</script> </script>
<Expandable bind:open> <Expandable bind:open class="border-y-0">
{#snippet title()} {#snippet title()}
<h2 class="text-xl font-semibold text-inherit" {id}> <h2 class="text-lg font-medium text-inherit" {id}>
<span>{passedTitle}</span> <span>{passedTitle}</span>
</h2> </h2>
{/snippet} {/snippet}