Skip to content

Commit a1c45a3

Browse files
author
Alex FusionAuth
committed
add arrow
1 parent f0c2d2d commit a1c45a3

1 file changed

Lines changed: 37 additions & 2 deletions

File tree

apps/codingcatdev/src/routes/(home-partials)/(home-pro-benefits)/HomeProBenefits.svelte

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
import CheckBadgeSvg from './CheckBadgeSvg.svelte';
66
import ProSelect from './ProSelect.svelte';
77
import CheckOutArrow from '../(home-latest-course)/CheckOutArrow.svelte';
8+
import { inView } from '$lib/actions/inView';
9+
import { fade } from 'svelte/transition';
10+
let priceVisible = false;
811
</script>
912

1013
<section class="bg-primary-200-700-token">
@@ -19,7 +22,14 @@
1922
<div class="flex flex-col lg:flex-row gap-8 items-center">
2023
<div class="sm:basis-2/3 flex flex-col justify-center gap-8">
2124
<div class="flex flex-col gap-4">
22-
<div class="check-out-arrow"><CheckOutArrow /></div>
25+
{#if priceVisible}
26+
<div class="check-out-text" in:fade={{ delay: 300, duration: 300 }} out:fade>
27+
Subscribe today!
28+
</div>
29+
<div class="check-out-arrow" in:fade={{ delay: 300, duration: 300 }} out:fade>
30+
<CheckOutArrow />
31+
</div>
32+
{/if}
2333
<h2>Subscribe for Premium Benefits</h2>
2434
<p class="max-w-lg">
2535
Are you ready to take your experience to the next level? Our premium plan unlocks
@@ -64,7 +74,12 @@
6474
</div>
6575
</div>
6676
</div>
67-
<div class="sm:basis-1/3 flex">
77+
<div
78+
class="sm:basis-1/3 flex"
79+
use:inView
80+
on:enter={() => (priceVisible = true)}
81+
on:exit={() => (priceVisible = false)}
82+
>
6883
<ProSelect />
6984
</div>
7085
</div>
@@ -78,8 +93,28 @@
7893
.check-out-arrow {
7994
display: none;
8095
}
96+
.check-out-text {
97+
display: none;
98+
}
8199
}
82100
@media (min-width: 1024px) {
101+
.check-out-text {
102+
position: absolute;
103+
104+
width: 144px;
105+
height: 166px;
106+
right: 650px;
107+
top: 66px;
108+
109+
font-family: 'Shadows Into Light';
110+
font-style: normal;
111+
font-weight: 400;
112+
font-size: 64px;
113+
line-height: 130.14%;
114+
text-align: center;
115+
116+
transform: rotate(-20deg);
117+
}
83118
.check-out-arrow {
84119
position: absolute;
85120
transform: rotate(65deg) scale(1, -1);

0 commit comments

Comments
 (0)