misc: tweak animation curves
This commit is contained in:
1 parent
aef676c8b5
commit
1771aa056e
6 files changed
+20
-12
No files matched your search
@@ -16,6 +16,7 @@
|
|||||||
import { vote as voteItem } from '$lib/lemmy/contentview'
|
import { vote as voteItem } from '$lib/lemmy/contentview'
|
||||||
import { shouldShowVoteColor } from '../post/PostVote.svelte'
|
import { shouldShowVoteColor } from '../post/PostVote.svelte'
|
||||||
import { fly } from 'svelte/transition'
|
import { fly } from 'svelte/transition'
|
||||||
|
import { backOut } from 'svelte/easing'
|
||||||
|
|
||||||
export let vote: number = 0
|
export let vote: number = 0
|
||||||
export let upvotes: number
|
export let upvotes: number
|
||||||
@@ -48,8 +49,8 @@
|
|||||||
{#key upvotes}
|
{#key upvotes}
|
||||||
<span
|
<span
|
||||||
style="grid-column: 1; grid-row: 1;"
|
style="grid-column: 1; grid-row: 1;"
|
||||||
in:fly={{ duration: 200, y: -6 }}
|
in:fly={{ duration: 400, y: -10, easing: backOut }}
|
||||||
out:fly={{ duration: 200, y: 6 }}
|
out:fly={{ duration: 400, y: 10, easing: backOut }}
|
||||||
>
|
>
|
||||||
<FormattedNumber number={upvotes} />
|
<FormattedNumber number={upvotes} />
|
||||||
</span>
|
</span>
|
||||||
@@ -69,8 +70,8 @@
|
|||||||
{#key downvotes}
|
{#key downvotes}
|
||||||
<span
|
<span
|
||||||
style="grid-column: 1; grid-row: 1;"
|
style="grid-column: 1; grid-row: 1;"
|
||||||
in:fly={{ duration: 200, y: -6 }}
|
in:fly={{ duration: 400, y: -10, easing: backOut }}
|
||||||
out:fly={{ duration: 200, y: 6 }}
|
out:fly={{ duration: 400, y: 10, easing: backOut }}
|
||||||
>
|
>
|
||||||
<FormattedNumber number={downvotes} />
|
<FormattedNumber number={downvotes} />
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
import { profile } from '$lib/auth.js'
|
import { profile } from '$lib/auth.js'
|
||||||
import { Button } from 'mono-svelte'
|
import { Button } from 'mono-svelte'
|
||||||
import { afterNavigate } from '$app/navigation'
|
import { afterNavigate } from '$app/navigation'
|
||||||
|
import { backOut } from 'svelte/easing'
|
||||||
|
|
||||||
export let nodes: CommentNodeI[]
|
export let nodes: CommentNodeI[]
|
||||||
export let isParent: boolean
|
export let isParent: boolean
|
||||||
@@ -106,7 +107,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ul
|
<ul
|
||||||
in:fly={{ opacity: 0, y: -4 }}
|
in:fly={{ opacity: 0, y: -4, duration: 400, easing: backOut }}
|
||||||
class={isParent
|
class={isParent
|
||||||
? 'divide-y dark:divide-zinc-800 divide-slate-100'
|
? 'divide-y dark:divide-zinc-800 divide-slate-100'
|
||||||
: 'pl-3.5 border-l border-slate-200 dark:border-zinc-800 my-1'}
|
: 'pl-3.5 border-l border-slate-200 dark:border-zinc-800 my-1'}
|
||||||
|
|||||||
@@ -148,7 +148,7 @@
|
|||||||
{#if title && id}
|
{#if title && id}
|
||||||
<a
|
<a
|
||||||
href="/post/{getInstance()}/{id}"
|
href="/post/{getInstance()}/{id}"
|
||||||
class="font-medium text-base"
|
class="font-medium text-base w-max"
|
||||||
class:text-slate-600={$userSettings.markReadPosts && read}
|
class:text-slate-600={$userSettings.markReadPosts && read}
|
||||||
class:dark:text-zinc-400={$userSettings.markReadPosts && read}
|
class:dark:text-zinc-400={$userSettings.markReadPosts && read}
|
||||||
style="grid-area: title;"
|
style="grid-area: title;"
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
import { Button, Popover, buttonColor, toast } from 'mono-svelte'
|
import { Button, Popover, buttonColor, toast } from 'mono-svelte'
|
||||||
import { site } from '$lib/lemmy.js'
|
import { site } from '$lib/lemmy.js'
|
||||||
import { fly } from 'svelte/transition'
|
import { fly } from 'svelte/transition'
|
||||||
|
import { backOut } from 'svelte/easing'
|
||||||
|
|
||||||
export let post: Post
|
export let post: Post
|
||||||
export let vote: number = 0
|
export let vote: number = 0
|
||||||
@@ -69,8 +70,8 @@
|
|||||||
{#key upvotes}
|
{#key upvotes}
|
||||||
<span
|
<span
|
||||||
style="grid-column: 1; grid-row: 1;"
|
style="grid-column: 1; grid-row: 1;"
|
||||||
in:fly={{ duration: 200, y: -6 }}
|
in:fly={{ duration: 400, y: -10, easing: backOut }}
|
||||||
out:fly={{ duration: 200, y: 6 }}
|
out:fly={{ duration: 400, y: 10, easing: backOut }}
|
||||||
>
|
>
|
||||||
<FormattedNumber number={upvotes} />
|
<FormattedNumber number={upvotes} />
|
||||||
</span>
|
</span>
|
||||||
@@ -91,8 +92,8 @@
|
|||||||
{#key downvotes}
|
{#key downvotes}
|
||||||
<span
|
<span
|
||||||
style="grid-column: 1; grid-row: 1;"
|
style="grid-column: 1; grid-row: 1;"
|
||||||
in:fly={{ duration: 200, y: -6 }}
|
in:fly={{ duration: 400, y: -10, easing: backOut }}
|
||||||
out:fly={{ duration: 200, y: 6 }}
|
out:fly={{ duration: 400, y: 10, easing: backOut }}
|
||||||
>
|
>
|
||||||
<FormattedNumber number={downvotes} />
|
<FormattedNumber number={downvotes} />
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -112,10 +112,14 @@
|
|||||||
@apply m-0 leading-[1.5] !important;
|
@apply m-0 leading-[1.5] !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown :global(li > *) {
|
.markdown :global(li > p) {
|
||||||
@apply m-0 leading-[1.5] !important;
|
@apply m-0 leading-[1.5] !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.markdown :global(li > p) {
|
||||||
|
@apply contents !important;
|
||||||
|
}
|
||||||
|
|
||||||
.markdown :global(blockquote) {
|
.markdown :global(blockquote) {
|
||||||
@apply leading-[1px] border-l-2 border-slate-400 dark:border-zinc-600 pl-2 my-1 h-max;
|
@apply leading-[1px] border-l-2 border-slate-400 dark:border-zinc-600 pl-2 my-1 h-max;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,8 @@
|
|||||||
>
|
>
|
||||||
{#if searching}
|
{#if searching}
|
||||||
<div
|
<div
|
||||||
class="w-full h-full absolute z-20 p-2 flex items-center gap-2 backdrop-brightness-0 rounded-full"
|
class="w-full h-full absolute z-20 p-2 flex items-center gap-2 bg-white dark:bg-zinc-950
|
||||||
|
rounded-full"
|
||||||
transition:scale={{
|
transition:scale={{
|
||||||
start: 0.96,
|
start: 0.96,
|
||||||
duration: 250,
|
duration: 250,
|
||||||
|
|||||||
Reference in new issue
Block a user