Skip to content

Commit 633d283

Browse files
author
Alex FusionAuth
committed
review transition
1 parent a1c45a3 commit 633d283

1 file changed

Lines changed: 72 additions & 52 deletions

File tree

‎apps/codingcatdev/src/routes/(home-partials)/(home-reviews)/HomeReviews.svelte‎

Lines changed: 72 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,81 @@
11
<script>
2+
import { inView } from '$lib/actions/inView';
23
import { ContentType } from '$lib/types';
4+
import { fly } from 'svelte/transition';
35
import ReviewCard from './ReviewCard.svelte';
6+
let visible = false;
47
</script>
58

69
<section class="relative">
7-
<div class="absolute top-0 left-0 w-full -my-32">
8-
<div
9-
class="snap-x scroll-px-4 snap-mandatory scroll-smooth flex gap-4 overflow-x-auto py-10 sm:justify-center"
10-
>
11-
<ReviewCard
12-
position="left"
13-
stars={5}
14-
description="The CSS Animations course is phenomenal. Very beginner-friendly!"
15-
link={{ href: '/course/css-animations', name: 'CSS Animations' }}
16-
icon={ContentType.course}
17-
/>
18-
<ReviewCard
19-
position="right"
20-
stars={5}
21-
description="I LOVED the podcast episode with Rich Harris! Very well-informed discussion about the web!"
22-
link={{
23-
href: '/podcast/2-17-building-the-future-of-svelte-at-vercel',
24-
name: 'Building the Future of Svelte at Vercel'
25-
}}
26-
icon={ContentType.podcast}
27-
/>
28-
<ReviewCard
29-
position="left"
30-
stars={5}
31-
description="The Ultimate Svelte Guide course is one of the best out there!"
32-
link={{
33-
href: '/course/svelte',
34-
name: 'Learn Svelte: The Ultimate Guide'
35-
}}
36-
icon={ContentType.course}
37-
/>
38-
<ReviewCard
39-
position="right"
40-
stars={5}
41-
description="Fireship is the best, congratulations on the interview 🎉🎉"
42-
link={{
43-
href: 'http://localhost:5173/podcast/0-9-jeff-delaney-of-fireship-io',
44-
name: 'Fireship.io'
45-
}}
46-
icon={ContentType.podcast}
47-
/>
48-
<ReviewCard
49-
position="left"
50-
stars={5}
51-
description="Dude! This video series is the cleanest, simplest, best paced, that I've found on Svelte so far."
52-
link={{
53-
href: '/course/sveltekit-firebase/lesson/2_5-inputs-bindings-and-reactivity',
54-
name: 'Svelte Input Bindings'
55-
}}
56-
icon={ContentType.course}
57-
/>
58-
</div>
10+
<div
11+
class="absolute top-0 left-0 w-full -my-32"
12+
use:inView
13+
on:enter={() => (visible = true)}
14+
on:exit={() => (visible = false)}
15+
>
16+
{#if visible}
17+
<div
18+
class="snap-x scroll-px-4 snap-mandatory scroll-smooth flex gap-4 overflow-x-auto py-10 sm:justify-center"
19+
>
20+
<div in:fly={{ x: 200, delay: 300, duration: 300 }} out:fly>
21+
<ReviewCard
22+
position="left"
23+
stars={5}
24+
description="The CSS Animations course is phenomenal. Very beginner-friendly!"
25+
link={{ href: '/course/css-animations', name: 'CSS Animations' }}
26+
icon={ContentType.course}
27+
/>
28+
</div>
29+
<div in:fly={{ x: 200, delay: 400, duration: 300 }} out:fly>
30+
<ReviewCard
31+
position="right"
32+
stars={5}
33+
description="I LOVED the podcast episode with Rich Harris! Very well-informed discussion about the web!"
34+
link={{
35+
href: '/podcast/2-17-building-the-future-of-svelte-at-vercel',
36+
name: 'Building the Future of Svelte at Vercel'
37+
}}
38+
icon={ContentType.podcast}
39+
/>
40+
</div>
41+
<div in:fly={{ x: 200, delay: 500, duration: 300 }} out:fly>
42+
<ReviewCard
43+
position="left"
44+
stars={5}
45+
description="The Ultimate Svelte Guide course is one of the best out there!"
46+
link={{
47+
href: '/course/svelte',
48+
name: 'Learn Svelte: The Ultimate Guide'
49+
}}
50+
icon={ContentType.course}
51+
/>
52+
</div>
53+
<div in:fly={{ x: 200, delay: 600, duration: 300 }} out:fly>
54+
<ReviewCard
55+
position="right"
56+
stars={5}
57+
description="Fireship is the best, congratulations on the interview 🎉🎉"
58+
link={{
59+
href: 'http://localhost:5173/podcast/0-9-jeff-delaney-of-fireship-io',
60+
name: 'Fireship.io'
61+
}}
62+
icon={ContentType.podcast}
63+
/>
64+
</div>
65+
<div in:fly={{ x: 200, delay: 700, duration: 300 }} out:fly>
66+
<ReviewCard
67+
position="left"
68+
stars={5}
69+
description="Dude! This video series is the cleanest, simplest, best paced, that I've found on Svelte so far."
70+
link={{
71+
href: '/course/sveltekit-firebase/lesson/2_5-inputs-bindings-and-reactivity',
72+
name: 'Svelte Input Bindings'
73+
}}
74+
icon={ContentType.course}
75+
/>
76+
</div>
77+
</div>
78+
{/if}
5979
</div>
6080
</section>
6181

0 commit comments

Comments
 (0)