From 49430fa55872431bb7eadf801ad9e38fccf0e169 Mon Sep 17 00:00:00 2001 From: Daniel Honus Date: Fri, 12 May 2023 10:28:07 +0200 Subject: [PATCH] [build] added animations --- src/lib/Home.svelte | 114 +++++++++++++++++++++++--------------------- src/style.sass | 26 ++++++++++ 2 files changed, 86 insertions(+), 54 deletions(-) diff --git a/src/lib/Home.svelte b/src/lib/Home.svelte index 4fd0606..76ef4c2 100644 --- a/src/lib/Home.svelte +++ b/src/lib/Home.svelte @@ -185,8 +185,8 @@ postDate = value.pub_date; postLink = value.link; postAuthor = value.author; - if (postAuthor == undefined) postAuthor = value.dublin_core_ext.creators[0]; - if (postAuthor == undefined) postAuthor = value.dublin_core.publisher; + if (postAuthor == undefined && value.dublin_core_ext != null) postAuthor = value.dublin_core_ext.creators[0]; + if (postAuthor == undefined && value.dublin_core != null) postAuthor = value.dublin_core.publisher; if (postAuthor == undefined) postAuthor = ""; //readBuffer.push(value.guid.value); @@ -317,39 +317,42 @@ id="center" > {#if currentFeed.title !== ""} -
- {currentFeed.title} - {currentFeed.description} -
-
- - + {#key currentFeed} +
+ {currentFeed.title} + {currentFeed.description} +
+
+ + + + - - -
+
+ {/key} {/if} {#each Object.entries(feedBody) as [key, value]} -
renderPost(event, value)} class={value.guid.value === __guid__ ? "entry active" : "entry"} > @@ -361,35 +364,38 @@
{value.title} + {/key} {/each}
All caught up!
- diff --git a/src/style.sass b/src/style.sass index 3bd4086..8532bc9 100644 --- a/src/style.sass +++ b/src/style.sass @@ -196,6 +196,11 @@ div.layout border: 1px solid transparent //border-bottom: 1px solid $border-color //border-left: 2px solid transparent + // add fade in animation + -webkit-animation: fadein .2s + animation: fadein .2s + animation-iteration-count: 1 + animation-duration: .2s &.active background: #2f2f2f border: 1px solid $border-color @@ -234,6 +239,9 @@ div.layout border-radius: 7px 7px 0 0 border: 1px solid $border-color word-wrap: break-word + animation-duration: .2s + animation: fadein .2s + -webkit-animation: fadein .2s div.meta-control display: flex flex-direction: row @@ -245,6 +253,9 @@ div.layout border-radius: 0 0 7px 7px border: 1px solid $border-color border-top: 0px + animation-duration: .2s + animation: fadein .2s + -webkit-animation: fadein .2s span display: flex flex-direction: row @@ -287,6 +298,8 @@ div.layout width: 92% margin: auto display: block + animation: fadein .1s + -webkit-animation: fadein .1s p line-height: 1.4rem font-size: 1rem @@ -375,3 +388,16 @@ main.container div.right::-webkit-scrollbar @media screen and (min-width: 2000px) div.layout div.right padding: 0 10% + + +@keyframes fadein + from + border-radius: 0 + to + border-radius: 1 + +@-webkit-keyframes fadein + from + opacity: 0 + to + opacity: 1 \ No newline at end of file