Files
classroomio/apps/website/src/lib/components/more-features.svelte
T

105 lines
3.3 KiB
Svelte
Raw Normal View History

2023-11-25 21:56:02 +00:00
<script lang="ts">
import { onMount } from 'svelte';
import { fly } from 'svelte/transition';
import { folder, globe, team, transcription } from '$lib/emojis';
2024-09-30 01:36:12 +01:00
import { tools } from '$lib/utils/constants/tools';
2023-11-25 21:56:02 +00:00
2025-12-25 05:37:21 +00:00
let selected = $state(0);
let interval: NodeJS.Timer = $state();
2023-11-25 21:56:02 +00:00
const moreFeatures = [
{
icon: globe,
title: 'Customizable Landing Page',
2025-12-25 09:01:51 +00:00
description: 'A minimalistic landing page template out of the box to share your courses with the world',
2024-03-01 14:22:45 +01:00
image: '/landing-page-builder.webp'
2023-11-25 21:56:02 +00:00
},
{
icon: team,
title: 'Team management',
2025-12-25 09:01:51 +00:00
description: 'Extend invitations and manage your teaching institution seamlessly through ClassroomIO.',
2024-02-02 08:18:26 +01:00
image: '/team-management.png'
2023-11-25 21:56:02 +00:00
},
2025-12-25 05:37:21 +00:00
// {
// icon: transcription,
// title: 'Auto Video Transcription',
// description:
// 'AI automatically transcribes videos, making content searchable for seamless student access.',
// image: '/video-transcription.png'
// },
2023-11-25 21:56:02 +00:00
{
icon: folder,
title: 'Downloadable Lesson PDF',
2024-02-02 08:18:26 +01:00
description: 'Students can download lessons automatically for offline access.',
image: '/download-pdf.png'
}
2023-11-25 21:56:02 +00:00
];
2024-09-30 01:36:12 +01:00
const freeTools = tools.filter((item) => item.showFeature);
2023-11-25 21:56:02 +00:00
onMount(() => {
if (window.innerWidth > 768) {
interval = setInterval(() => {
selected = moreFeatures[selected + 1] ? selected + 1 : 0;
}, 3000);
}
});
</script>
<!-- More Features -->
2025-12-25 09:01:51 +00:00
<section id="morefeatures" class="bg-gray-50 px-3 py-[10%] lg:px-0">
2023-11-25 21:56:02 +00:00
<div class="mx-0 lg:mx-[12%]">
2025-12-25 09:01:51 +00:00
<div class="mx-4 mb-14 w-full lg:mx-0 lg:w-4/5">
<h2 class="mt-2 text-3xl tracking-tight">There is More...</h2>
<p class="mt-4 w-[94%] text-lg text-gray-500 lg:w-4/5">
2024-02-02 08:18:26 +01:00
ClassroomIO is packed with useful features while we try to make it easy to use.
2023-11-25 21:56:02 +00:00
</p>
</div>
2025-12-25 09:01:51 +00:00
<div class="flex flex-col-reverse gap-3 md:gap-10 lg:flex-row" id="image-container">
<div class="mt-5 flex w-[95%] overflow-auto p-3 lg:mt-0 lg:block lg:w-[45%] lg:overflow-hidden">
2023-11-25 21:56:02 +00:00
{#each moreFeatures as moreFeature, i}
<button
2025-12-25 09:01:51 +00:00
class="rounded-md p-4 {i === selected &&
'selected'} mb-3 min-w-[75vw] cursor-pointer text-start lg:min-w-[unset]"
2025-12-25 05:37:21 +00:00
onclick={() => {
2023-11-25 21:56:02 +00:00
selected = i;
clearInterval(interval);
}}
>
2025-12-25 09:01:51 +00:00
<div class="flex items-center gap-1">
<img loading="lazy" width="32" height="32" src={moreFeature.icon} alt="" class="w-8" />
2025-12-25 05:37:21 +00:00
<p class="text-lg">
2023-11-25 21:56:02 +00:00
{moreFeature.title}
2024-03-01 14:22:45 +01:00
</p>
2023-11-25 21:56:02 +00:00
</div>
2025-12-25 05:37:21 +00:00
<p class="text-sm">{moreFeature.description}</p>
2023-11-25 21:56:02 +00:00
</button>
{/each}
</div>
<!-- Video -->
<div class="h-full w-full p-3 lg:w-2/3 lg:p-0">
{#key selected}
<img
2024-03-01 14:22:45 +01:00
width="100%"
height="100%"
loading="lazy"
2023-11-25 21:56:02 +00:00
id="image"
2025-12-25 05:37:21 +00:00
in:fly={{ x: 100, duration: 800 }}
2025-12-25 09:01:51 +00:00
class="flex w-full flex-col items-center"
2023-11-25 21:56:02 +00:00
src={moreFeatures[selected].image}
alt={moreFeatures[selected].title}
/>
{/key}
</div>
</div>
</div>
</section>
<style>
#morefeatures .selected {
2025-12-25 09:01:51 +00:00
background-image: linear-gradient(45deg, rgb(253, 239, 132), rgb(247, 198, 169), rgb(21, 186, 196));
2023-11-25 21:56:02 +00:00
}
</style>