misc: design fixes
This commit is contained in:
12 files changed
+87
-65
No files matched your search
@@ -31,10 +31,10 @@
|
||||
{@const slctd = selected == option}
|
||||
<button
|
||||
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
|
||||
? '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 => {
|
||||
e.preventDefault()
|
||||
|
||||
@@ -64,9 +64,6 @@
|
||||
{#snippet title()}
|
||||
<span class="flex items-center gap-1 py-1 px-2 w-full">
|
||||
{$t('cards.site.about')}
|
||||
<hr
|
||||
class="w-full flex-1 ml-1 border-slate-200 dark:border-zinc-800"
|
||||
/>
|
||||
</span>
|
||||
{/snippet}
|
||||
<Markdown source={site.site.description} />
|
||||
@@ -88,9 +85,6 @@
|
||||
{#snippet title()}
|
||||
<span class="flex items-center gap-1 py-1 px-2 w-full">
|
||||
{$t('cards.site.stats')}
|
||||
<hr
|
||||
class="w-full flex-1 ml-1 border-slate-200 dark:border-zinc-800"
|
||||
/>
|
||||
</span>
|
||||
{/snippet}
|
||||
<div class="flex flex-row gap-4 flex-wrap">
|
||||
@@ -118,9 +112,6 @@
|
||||
{#snippet title()}
|
||||
<span class="flex items-center gap-1 py-1 px-2 w-full">
|
||||
{$t('cards.site.admins')}
|
||||
<hr
|
||||
class="w-full flex-1 ml-1 border-slate-200 dark:border-zinc-800"
|
||||
/>
|
||||
</span>
|
||||
{/snippet}
|
||||
<ItemList
|
||||
|
||||
@@ -108,11 +108,11 @@
|
||||
<Button
|
||||
size="custom"
|
||||
rounding="xl"
|
||||
class="w-8.5 h-8.5"
|
||||
class="w-7.5 h-7.5"
|
||||
color={language != undefined ? 'primary' : 'ghost'}
|
||||
title={$t('form.profile.languages.title')}
|
||||
>
|
||||
<Icon src={Language} size="16" micro />
|
||||
<Icon src={Language} size="14" micro />
|
||||
</Button>
|
||||
{/snippet}
|
||||
|
||||
|
||||
@@ -88,7 +88,9 @@
|
||||
<div
|
||||
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>
|
||||
{#if community.community.deleted}
|
||||
<Icon
|
||||
@@ -128,7 +130,7 @@
|
||||
{/if}
|
||||
</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'}
|
||||
>
|
||||
<span class="overflow-hidden text-ellipsis">
|
||||
|
||||
@@ -144,11 +144,14 @@
|
||||
</Label>
|
||||
{/if}
|
||||
<div
|
||||
class="flex flex-col border border-slate-200 border-b-slate-300 dark:border-zinc-800
|
||||
focus-within:border-primary-900 dark:focus-within:border-primary-100 focus-within:ring-3 ring-slate-300
|
||||
dark:ring-zinc-700 rounded-2xl
|
||||
overflow-hidden transition-colors {clazz}"
|
||||
class:mt-1={label}
|
||||
class={[
|
||||
'flex flex-col border border-slate-200 border-b-slate-300 dark:border-zinc-800',
|
||||
'focus-within:border-primary-900 dark:focus-within:border-primary-100 focus-within:ring-3 ring-slate-300 dark:ring-zinc-700',
|
||||
'bg-white dark:bg-zinc-950',
|
||||
'rounded-2xl overflow-hidden transition-colors',
|
||||
label && 'mt-1',
|
||||
clazz,
|
||||
]}
|
||||
>
|
||||
{#if previewing}
|
||||
<div
|
||||
@@ -160,79 +163,99 @@ overflow-hidden transition-colors {clazz}"
|
||||
{#if tools}
|
||||
<!--Toolbar-->
|
||||
<div
|
||||
class="*:shrink-0 flex flex-row overflow-auto p-1.5 gap-1.5 border-b
|
||||
border-slate-200 dark:border-zinc-900 {disabled
|
||||
? 'opacity-60 pointer-events-none'
|
||||
: ''}"
|
||||
class={[
|
||||
'*:shrink-0 flex flex-row overflow-auto p-1.5 gap-1.5',
|
||||
disabled && 'opacity-60 pointer-events-none',
|
||||
]}
|
||||
>
|
||||
<Button
|
||||
onclick={() => wrapSelection('**', '**')}
|
||||
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
|
||||
onclick={() => wrapSelection('*', '*')}
|
||||
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
|
||||
onclick={() => wrapSelection('[', '](https://example.com)')}
|
||||
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
|
||||
onclick={() => wrapSelection('\n# ', '')}
|
||||
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
|
||||
onclick={() => wrapSelection('~~', '~~')}
|
||||
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
|
||||
onclick={() => wrapSelection('\n> ', '')}
|
||||
title="Quote"
|
||||
size="square-md"
|
||||
size="custom"
|
||||
class="w-8 h-8"
|
||||
rounding="lg"
|
||||
>
|
||||
<span class="font-bold font-serif text-lg">"</span>
|
||||
</Button>
|
||||
<Button
|
||||
onclick={() => wrapSelection('\n- ', '')}
|
||||
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
|
||||
onclick={() => wrapSelection('`', '`')}
|
||||
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
|
||||
onclick={() =>
|
||||
wrapSelection('::: spoiler <spoiler title>\n', '\n:::')}
|
||||
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
|
||||
onclick={() => wrapSelection('~', '~')}
|
||||
title="Subscript"
|
||||
size="square-md"
|
||||
size="custom"
|
||||
class="w-8 h-8"
|
||||
rounding="lg"
|
||||
>
|
||||
<span class="font-bold">
|
||||
X
|
||||
@@ -242,7 +265,9 @@ overflow-hidden transition-colors {clazz}"
|
||||
<Button
|
||||
onclick={() => wrapSelection('^', '^')}
|
||||
title="Superscript"
|
||||
size="square-md"
|
||||
size="custom"
|
||||
class="w-8 h-8"
|
||||
rounding="lg"
|
||||
>
|
||||
<span class="font-bold">
|
||||
X
|
||||
@@ -253,9 +278,11 @@ overflow-hidden transition-colors {clazz}"
|
||||
<Button
|
||||
onclick={() => (uploadingImage = !uploadingImage)}
|
||||
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>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -293,7 +320,7 @@ overflow-hidden transition-colors {clazz}"
|
||||
|
||||
{#if previewButton}
|
||||
<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}
|
||||
<MultiSelect
|
||||
|
||||
@@ -15,6 +15,6 @@
|
||||
<span class="font-medium text-left">
|
||||
{@render children?.()}
|
||||
</span>
|
||||
<hr class="border-slate-200 flex-1 w-full dark:border-zinc-800" />
|
||||
<div class="flex-1"></div>
|
||||
{@render action?.()}
|
||||
</div>
|
||||
@@ -24,7 +24,7 @@
|
||||
}: Props = $props()
|
||||
</script>
|
||||
|
||||
<ul class="divide-y-3 divide-slate-50 dark:divide-zinc-925">
|
||||
<ul class="space-y-1">
|
||||
{#if items}
|
||||
{#each items as item, index (item)}
|
||||
<li
|
||||
@@ -70,14 +70,18 @@
|
||||
}
|
||||
|
||||
: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 {
|
||||
background-color: color-mix(
|
||||
in oklab,
|
||||
var(--color-zinc-925),
|
||||
var(--color-zinc-900)
|
||||
);
|
||||
background-color: var(--color-zinc-900);
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-color: var(--color-zinc-950);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user