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
+87 -65

No files matched your search

+2 -2
View File
@@ -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()
-9
View File
@@ -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
+1 -1
View File
@@ -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>
+11 -7
View File
@@ -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);
}
}
+1 -1
View File
@@ -56,7 +56,7 @@
{...rest}
class="{allowIconOnly
? 'max-md:px-1.5 max-md:py-1.5'
: ''} px-2.5 py-1 {badgeRoundness[
: ''} px-2 py-1 {badgeRoundness[
rounding
]} text-xs font-medium flex items-center gap-1 ring-1 ring-inset {badgeColor[
color
+2 -2
View File
@@ -46,7 +46,7 @@
export const buttonSize = {
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',
lg: 'px-4 py-2',
xl: 'px-6 py-3',
@@ -160,7 +160,7 @@
<!--
@component
@slot `prefix` -- Will be replaced if `loading` is `true`.
@slot `suffix`
-->
+2 -4
View File
@@ -39,9 +39,7 @@
import Label from '../forms/Label.svelte'
import { generateID } from '../forms/helper.js'
const borderClass = `
border border-slate-200 border-b-slate-300 dark:border-zinc-900 dark:border-t-zinc-800
`
const borderClass = `border border-slate-200 border-b-slate-300 dark:border-zinc-800`
let {
label = undefined,
@@ -52,7 +50,7 @@
size = 'md',
id = generateID(),
inlineAffixes = false,
shadow = 'none',
shadow = 'sm',
element = $bindable(),
class: clazz = '',
customLabel: passedCustomLabel,
+2 -2
View File
@@ -174,9 +174,9 @@
</Menu>
<Icon
src={ChevronUpDown}
mini
micro
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>