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>
@@ -99,7 +99,7 @@
in:fly={{ opacity: 0, y: -4 }}
class={isParent
? 'divide-y dark:divide-zinc-800 divide-slate-200'
: 'pl-3.5 border-l-2 border-slate-200 dark:border-zinc-800 my-1'}
: 'pl-3.5 border-l border-slate-200 dark:border-zinc-800 my-1'}
>
{#each nodes as node (node.comment_view.comment.id)}
<Comment
@@ -123,15 +123,15 @@
loading={node.loading}
disabled={node.loading}
size="sm"
color="tertiary"
color="none"
alignment="left"
loaderWidth={18}
class="text-xs"
on:click={() => {
node.loading = true
fetchChildren(node).then(() => (node.loading = false))
}}
>
<Icon src={Plus} width={18} mini slot="prefix" />
<Icon src={PlusCircle} width={16} slot="prefix" />
{node.comment_view.counts.child_count} more
</Button>
</button>