From 1a3664b33435977559a4242334c0847c85cab28d Mon Sep 17 00:00:00 2001 From: Eamonn de Leastar Date: Mon, 2 Dec 2024 09:13:43 +0000 Subject: [PATCH 1/7] home page animation - remove redundant --- src/routes/(home)/CourseList.svelte | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/routes/(home)/CourseList.svelte b/src/routes/(home)/CourseList.svelte index 830e3a59..1ee58be3 100644 --- a/src/routes/(home)/CourseList.svelte +++ b/src/routes/(home)/CourseList.svelte @@ -27,22 +27,18 @@ } -
+

Favourites

{#each courseVisits.filter((cv) => cv.favourite) as courseVisit (courseVisit.id)} -
- -
+ {/each}

Recently accessed

{#each courseVisits.filter((cv) => !cv.favourite) as courseVisit (courseVisit.id)} -
- -
+ {/each}
From 2b56c40e4240d09bc149787b84d661c394043a25 Mon Sep 17 00:00:00 2001 From: Eamonn de Leastar Date: Mon, 2 Dec 2024 09:14:05 +0000 Subject: [PATCH 2/7] correct sign in animation --- .../(auth)/auth/SigninWithGithub.svelte | 61 ++++++++++++++----- 1 file changed, 46 insertions(+), 15 deletions(-) diff --git a/src/routes/(auth)/auth/SigninWithGithub.svelte b/src/routes/(auth)/auth/SigninWithGithub.svelte index 7e024774..35d8634c 100644 --- a/src/routes/(auth)/auth/SigninWithGithub.svelte +++ b/src/routes/(auth)/auth/SigninWithGithub.svelte @@ -20,30 +20,32 @@
-
+
Tutors Sign In
-
-
- + +
-
+ {/if}
-
+
@@ -52,3 +54,32 @@
+ + From 09e74f5f61b552ebc9daf151381ab7daa61faf84 Mon Sep 17 00:00:00 2001 From: Eamonn de Leastar Date: Mon, 2 Dec 2024 09:14:54 +0000 Subject: [PATCH 3/7] define animation styles --- src/lib/runes.ts | 2 ++ src/lib/ui/animations.ts | 56 ++++++++++++++++++++++++---------------- 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/src/lib/runes.ts b/src/lib/runes.ts index e8f47b61..716d7289 100644 --- a/src/lib/runes.ts +++ b/src/lib/runes.ts @@ -18,3 +18,5 @@ export const iconHeight = rune("140"); export const imageHeight = rune("h-32"); export const textSize = rune("text-base"); export const avatarWidth = rune("w-12"); + +export const animationDelay = rune(200); diff --git a/src/lib/ui/animations.ts b/src/lib/ui/animations.ts index 1ab7064b..f9738eb5 100644 --- a/src/lib/ui/animations.ts +++ b/src/lib/ui/animations.ts @@ -1,27 +1,39 @@ -import { cubicInOut, cubicOut } from "svelte/easing"; +import { animationDelay } from "$lib/runes"; +import { cubicOut, elasticOut, backOut, linear } from "svelte/easing"; -export const cardTransition = () => { - return { - css: (t: string) => { - return `transform: scale(${t}); `; - }, - easing: cubicInOut, - baseScale: 0.5, - duration: 250, - delay: 250 - }; +export const scaleTransition = { + duration: animationDelay.value, + start: 0.4, + easing: cubicOut }; -export const talkTransition = () => { - return { - css: (t: string) => { - return `transform: scale(${t}); `; - }, - easing: cubicOut, - baseScale: 0.5, - duration: 200, - delay: 200 - }; +export const slideFromLeft = { + in: { x: -200, duration: animationDelay.value, delay: animationDelay.value }, + out: { x: -200, duration: animationDelay.value } }; -export const viewDelay = 500; +export const slideFromRight = { + in: { x: 200, duration: animationDelay.value, delay: animationDelay.value }, + out: { x: 200, duration: animationDelay.value } +}; + +// export const popTransition = { +// duration: 100, +// start: 0.2, +// easing: elasticOut, +// opacity: 0 +// }; + +// export const slideTransition = { +// duration: 250, +// y: 20, +// easing: cubicOut, +// opacity: 0 +// }; + +// export const bounceTransition = { +// duration: 100, +// y: 20, +// easing: backOut, +// opacity: 0 +// }; From 02627d47887991246223ab288be1721110eb1d36 Mon Sep 17 00:00:00 2001 From: Eamonn de Leastar Date: Mon, 2 Dec 2024 09:15:28 +0000 Subject: [PATCH 4/7] formatting adjusements --- src/lib/ui/navigators/SecondaryNavigator.svelte | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/lib/ui/navigators/SecondaryNavigator.svelte b/src/lib/ui/navigators/SecondaryNavigator.svelte index 6b8da43a..9c33db55 100644 --- a/src/lib/ui/navigators/SecondaryNavigator.svelte +++ b/src/lib/ui/navigators/SecondaryNavigator.svelte @@ -4,6 +4,7 @@ import Breadcrumbs from "../themes/icons/Breadcrumbs.svelte"; import EditCoursButton from "./buttons/EditCoursButton.svelte"; import IconBar from "../themes/icons/IconBar.svelte"; + import { slideFromLeft } from "../animations"; let firstDivClass = $state(""); let otherDivClass = $state(""); @@ -20,17 +21,13 @@ {#if !currentCourse?.value?.isPortfolio} -
-
+
+
{#if currentCourse?.value}
{#if currentCourse?.value?.properties.github} -