design: re-add hover effect for comment summaries
This commit is contained in:
2 files changed
+26
-5
No files matched your search
@@ -9,7 +9,15 @@
|
|||||||
import { getClient } from '$lib/lemmy.svelte.js'
|
import { getClient } from '$lib/lemmy.svelte.js'
|
||||||
import { errorMessage } from '$lib/lemmy/error'
|
import { errorMessage } from '$lib/lemmy/error'
|
||||||
import { Button, Modal, toast } from 'mono-svelte'
|
import { Button, Modal, toast } from 'mono-svelte'
|
||||||
import { Bookmark, Icon, Microphone, Pencil, Trash } from 'svelte-hero-icons'
|
import {
|
||||||
|
Bookmark,
|
||||||
|
Icon,
|
||||||
|
Microphone,
|
||||||
|
Minus,
|
||||||
|
Pencil,
|
||||||
|
Plus,
|
||||||
|
Trash,
|
||||||
|
} from 'svelte-hero-icons'
|
||||||
import { expoOut } from 'svelte/easing'
|
import { expoOut } from 'svelte/easing'
|
||||||
import type { ClassValue } from 'svelte/elements'
|
import type { ClassValue } from 'svelte/elements'
|
||||||
import { slide } from 'svelte/transition'
|
import { slide } from 'svelte/transition'
|
||||||
@@ -116,8 +124,23 @@
|
|||||||
{#if meta}
|
{#if meta}
|
||||||
<button
|
<button
|
||||||
onclick={() => (open = !open)}
|
onclick={() => (open = !open)}
|
||||||
class="flex flex-row cursor-pointer gap-2 items-center group text-[13px] flex-wrap w-full z-0 group"
|
class="flex flex-row cursor-pointer gap-2 items-center group text-sm flex-wrap w-full z-0 group relative"
|
||||||
>
|
>
|
||||||
|
<div
|
||||||
|
class={[
|
||||||
|
'absolute -inset-0.5 group-hover:-inset-1.5 opacity-0 group-hover:opacity-100 transition-all',
|
||||||
|
'bg-slate-100 dark:bg-zinc-900 -z-10 rounded-full',
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class={[
|
||||||
|
!open && 'rotate-90',
|
||||||
|
'transition-all duration-500 ease-out ml-auto my-auto h-full w-8 grid place-items-center',
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<Icon src={open ? Minus : Plus} size="16" micro />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{@render metaSuffix?.()}
|
{@render metaSuffix?.()}
|
||||||
<span class:font-bold={op} class="flex flex-row gap-1 items-center">
|
<span class:font-bold={op} class="flex flex-row gap-1 items-center">
|
||||||
<UserLink
|
<UserLink
|
||||||
|
|||||||
@@ -98,9 +98,7 @@
|
|||||||
node.comment_view.counts.child_count > 0) &&
|
node.comment_view.counts.child_count > 0) &&
|
||||||
'border-l',
|
'border-l',
|
||||||
'ml-2.5 pl-3 sm:pl-4 lg:pl-5',
|
'ml-2.5 pl-3 sm:pl-4 lg:pl-5',
|
||||||
node.depth % 2 == 0
|
'border-slate-200 dark:border-zinc-800',
|
||||||
? 'border-slate-200 dark:border-zinc-800'
|
|
||||||
: 'border-slate-300/80 dark:border-zinc-700',
|
|
||||||
]}
|
]}
|
||||||
bind:open={nodes[index].expanded}
|
bind:open={nodes[index].expanded}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in new issue
Block a user