feat: design tweaks

This commit is contained in:
Xyphyn committed 2023-09-10 13:05:58 -07:00
1 parent 6660c53878
commit 6afb03ea2b
11 files changed
+238 -298

No files matched your search

@@ -80,66 +80,26 @@
`
</script>
{#if $userSettings.newVote}
<div
class="flex flex-row items-center rounded-md transition-colors
cursor-pointer h-[26px] gap-0.5 !text-slate-600 dark:!text-zinc-300"
>
<Button
on:click={upvote}
class={vote == 1
? voteColor(vote)
: '!text-slate-600 dark:!text-zinc-300'}
aria-label="Upvote"
size="square-sm"
color="tertiary"
>
<Icon src={ArrowUpCircle} width={19} mini={vote == 1} />
</Button>
<span class="text-sm font-medium {voteColor(vote)}">
<FormattedNumber number={score} />
</span>
<Button
on:click={downvote}
class={vote == -1
? voteColor(vote)
: '!text-slate-600 dark:!text-zinc-300'}
aria-label="Downvote"
size="square-sm"
color="tertiary"
>
<Icon src={ArrowDownCircle} width={19} mini={vote == -1} />
</Button>
</div>
{:else}<div
class="flex flex-row items-center rounded-md transition-colors
<div
class="flex flex-row items-center rounded-md transition-all
cursor-pointer h-[26px] border border-slate-200
dark:border-zinc-800"
>
<button
on:click={upvote}
class="px-1.5 {vote == 1 ? 'dark:text-blue-500 text-blue-600' : ''}"
aria-label="Upvote"
>
<button
on:click={upvote}
class="px-1.5 {vote == 1
? $userSettings.revertColors
? 'text-orange-500'
: 'dark:text-blue-500 text-blue-600'
: ''}"
aria-label="Upvote"
>
<Icon src={ChevronUp} width={19} mini />
</button>
<span class="text-sm font-medium {voteColor(vote)}">
<FormattedNumber number={score} />
</span>
<button
on:click={downvote}
class="px-1.5 {vote == -1
? $userSettings.revertColors
? 'dark:text-blue-500 text-blue-600'
: 'text-red-400'
: ''}"
aria-label="Downvote"
>
<Icon src={ChevronDown} width={19} mini />
</button>
</div>
{/if}
<Icon src={ChevronUp} width={19} mini />
</button>
<span class="text-sm font-medium {voteColor(vote)}">
<FormattedNumber number={score} />
</span>
<button
on:click={downvote}
class="px-1.5 {vote == -1 ? 'text-red-400' : ''}"
aria-label="Downvote"
>
<Icon src={ChevronDown} width={19} mini />
</button>
</div>