From 1e86e075385fe5a09d7b51c6ec0af262ba87f7a9 Mon Sep 17 00:00:00 2001 From: Daniel Bulant Date: Sat, 10 Dec 2022 19:36:28 +0100 Subject: [PATCH] fancy animations --- src/lib/components/anilistItems.svelte | 26 +++++++++++--------- src/lib/components/item.svelte | 32 ++++++++++++++++++------- src/lib/components/mangadexItems.svelte | 4 +++- src/routes/[manga]/relatedManga.svelte | 4 +++- 4 files changed, 44 insertions(+), 22 deletions(-) diff --git a/src/lib/components/anilistItems.svelte b/src/lib/components/anilistItems.svelte index 103fbab..fcc4937 100644 --- a/src/lib/components/anilistItems.svelte +++ b/src/lib/components/anilistItems.svelte @@ -1,5 +1,7 @@
@@ -23,9 +29,11 @@ {#if cover}
{title} -
- {title} -
+ {#if $showType == "grid"} +
+ {title} +
+ {/if}
{:else} Broken art @@ -46,8 +54,12 @@ {/if}
-
- {title} +
+ {#if $showType == "comfortable"} + + {title} + + {/if}
@@ -125,11 +137,13 @@ text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical; - transition: max-height .3s; + transition: max-height .3s ease; } - .hidden { - opacity: 0; - user-select: none; + .comfortable-div span { + display: block; + width: 100%; + } + .comfortable-div.hiding { max-height: 0; } .item img { diff --git a/src/lib/components/mangadexItems.svelte b/src/lib/components/mangadexItems.svelte index 8bc0236..6e82a0f 100644 --- a/src/lib/components/mangadexItems.svelte +++ b/src/lib/components/mangadexItems.svelte @@ -1,5 +1,7 @@