Skip to content

Commit 13d173e

Browse files
author
Alex FusionAuth
committed
more
1 parent b8262b1 commit 13d173e

2 files changed

Lines changed: 70 additions & 45 deletions

File tree

‎apps/codingcatdev/src/routes/(home-partials)/(home-latest-course)/HomeLatestCourse.svelte‎

Lines changed: 65 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
import CheckOutArrow from './CheckOutArrow.svelte';
88
import CoursesSvg from './CoursesSvg.svelte';
99
import { inView } from '$lib/actions/inView';
10-
import { fade } from 'svelte/transition';
10+
import { fade, fly } from 'svelte/transition';
1111
1212
let videoVisible = false;
13+
let courseLessons = false;
1314
</script>
1415

16+
<!-- TODO: Pull Latest from Repo -->
1517
<div class=" bg-surface-800-100-token h-[800px]" />
1618

1719
<div>
@@ -49,61 +51,84 @@
4951
on:enter={() => (videoVisible = true)}
5052
on:exit={() => (videoVisible = false)}
5153
>
52-
<Video class="rounded-2xl" src="https://youtu.be/sp7qvtvCFv8" title="Svelte" />
54+
<div class="relative aspect-video">
55+
{#if videoVisible}
56+
<div in:fade={{ delay: 500, duration: 300 }}>
57+
<Video class="rounded-2xl" src="https://youtu.be/sp7qvtvCFv8" title="Svelte" />
58+
</div>
59+
{/if}
60+
</div>
5361
</div>
5462

5563
<!-- Lessons -->
5664
<div class="flex flex-col gap-8">
5765
<div
5866
class="grid grid-cols-1 sm:grid-rows-2 sm:grid-cols-2 gap-4 sm:gap-8 relative py-8 sm:py-0"
67+
use:inView={{ bottom: 100 }}
68+
on:enter={() => (courseLessons = true)}
69+
on:exit={() => (courseLessons = false)}
5970
>
6071
<div class="hidden absolute w-full h-full sm:flex justify-center items-center -z-10">
6172
<div class="bg-surface-800-100-token rounded-full h-24 w-24" />
6273
</div>
63-
<div class="bcu-card !text-surface-800-100-token !bg-surface-100-800-token">
64-
<div class="p-4 space-y-4">
65-
<div class="text-4xl font-bold text-primary-400-500-token">01</div>
66-
<h2>What is Svelte?</h2>
67-
<article>
68-
<p>
69-
Svelte is a modern JavaScript framework that is designed to be fast, simple,
70-
and scalable.
71-
</p>
72-
</article>
74+
{#if courseLessons}
75+
<div
76+
class="bcu-card !text-surface-800-100-token !bg-surface-100-800-token"
77+
in:fly={{ x: -200, y: -200, delay: 500, duration: 400 }}
78+
>
79+
<div class="p-4 space-y-4">
80+
<div class="text-4xl font-bold text-primary-400-500-token">01</div>
81+
<h2>What is Svelte?</h2>
82+
<article>
83+
<p>
84+
Svelte is a modern JavaScript framework that is designed to be fast, simple,
85+
and scalable.
86+
</p>
87+
</article>
88+
</div>
7389
</div>
74-
</div>
75-
<div class="bcu-card !text-surface-800-100-token !bg-surface-100-800-token">
76-
<div class="p-4 space-y-4">
77-
<div class="text-4xl font-bold text-primary-400-500-token">02</div>
78-
<h2>Getting Started</h2>
79-
<article>
80-
<p>Explanation of Svelte vs. SvelteKit and other metaframeworks</p>
81-
</article>
90+
<div
91+
class="bcu-card !text-surface-800-100-token !bg-surface-100-800-token"
92+
in:fly={{ x: 200, y: -200, delay: 500, duration: 400 }}
93+
>
94+
<div class="p-4 space-y-4">
95+
<div class="text-4xl font-bold text-primary-400-500-token">02</div>
96+
<h2>Getting Started</h2>
97+
<article>
98+
<p>Explanation of Svelte vs. SvelteKit and other metaframeworks</p>
99+
</article>
100+
</div>
82101
</div>
83-
</div>
84-
<div class="bcu-card !text-surface-800-100-token !bg-surface-100-800-token">
85-
<div class="p-4 space-y-4">
86-
<div class="text-4xl font-bold text-primary-400-500-token">03</div>
102+
<div
103+
class="bcu-card !text-surface-800-100-token !bg-surface-100-800-token"
104+
in:fly={{ x: -200, y: 200, delay: 500, duration: 400 }}
105+
>
106+
<div class="p-4 space-y-4">
107+
<div class="text-4xl font-bold text-primary-400-500-token">03</div>
87108

88-
<h2>Starting To Code</h2>
89-
<article>
90-
<p>Setup VSCode and Get Started writing Svelte</p>
91-
</article>
109+
<h2>Starting To Code</h2>
110+
<article>
111+
<p>Setup VSCode and Get Started writing Svelte</p>
112+
</article>
113+
</div>
92114
</div>
93-
</div>
94-
<div class="bcu-card !text-surface-800-100-token !bg-surface-100-800-token">
95-
<div class="p-4 space-y-4">
96-
<div class="text-4xl font-bold text-primary-400-500-token">04</div>
115+
<div
116+
class="bcu-card !text-surface-800-100-token !bg-surface-100-800-token"
117+
in:fly={{ x: 200, y: 200, delay: 500, duration: 400 }}
118+
>
119+
<div class="p-4 space-y-4">
120+
<div class="text-4xl font-bold text-primary-400-500-token">04</div>
97121

98-
<h2>Components and Props</h2>
99-
<article>
100-
<p>
101-
Components are reusable pieces of code that can be used to build complex user
102-
interfaces, props pass data within those components.
103-
</p>
104-
</article>
122+
<h2>Components and Props</h2>
123+
<article>
124+
<p>
125+
Components are reusable pieces of code that can be used to build complex
126+
user interfaces, props pass data within those components.
127+
</p>
128+
</article>
129+
</div>
105130
</div>
106-
</div>
131+
{/if}
107132
</div>
108133
<div class="grid grid-cols-1 sm:grid-rows-2 sm:grid-cols-2 gap-4 sm:gap-8 relative">
109134
<div class="flex sm:justify-end">

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<div
1818
class="snap-x scroll-px-4 snap-mandatory scroll-smooth flex gap-4 overflow-x-auto py-10 sm:justify-center"
1919
>
20-
<div in:fly={{ x: 200, delay: 300, duration: 300 }} out:fly>
20+
<div class="flex-none" in:fly={{ x: 200, delay: 300, duration: 300 }}>
2121
<ReviewCard
2222
position="left"
2323
stars={5}
@@ -26,7 +26,7 @@
2626
icon={ContentType.course}
2727
/>
2828
</div>
29-
<div in:fly={{ x: 200, delay: 400, duration: 300 }} out:fly>
29+
<div class="flex-none" in:fly={{ x: 200, delay: 400, duration: 300 }}>
3030
<ReviewCard
3131
position="right"
3232
stars={5}
@@ -38,7 +38,7 @@
3838
icon={ContentType.podcast}
3939
/>
4040
</div>
41-
<div in:fly={{ x: 200, delay: 500, duration: 300 }} out:fly>
41+
<div class="flex-none" in:fly={{ x: 200, delay: 500, duration: 300 }}>
4242
<ReviewCard
4343
position="left"
4444
stars={5}
@@ -50,7 +50,7 @@
5050
icon={ContentType.course}
5151
/>
5252
</div>
53-
<div in:fly={{ x: 200, delay: 600, duration: 300 }} out:fly>
53+
<div class="flex-none" in:fly={{ x: 200, delay: 600, duration: 300 }}>
5454
<ReviewCard
5555
position="right"
5656
stars={5}
@@ -62,7 +62,7 @@
6262
icon={ContentType.podcast}
6363
/>
6464
</div>
65-
<div in:fly={{ x: 200, delay: 700, duration: 300 }} out:fly>
65+
<div class="flex-none" in:fly={{ x: 200, delay: 700, duration: 300 }}>
6666
<ReviewCard
6767
position="left"
6868
stars={5}

0 commit comments

Comments
 (0)