Skip to content

Commit 24b842e

Browse files
committed
add: tech carousel section
1 parent a8451a6 commit 24b842e

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
import Container from '@/components/ui/Container.astro';
3+
import { Icon } from 'astro-icon/components';
4+
5+
const technologies = [
6+
'simple-icons:apacheant',
7+
'simple-icons:asciidoctor',
8+
'simple-icons:apacheflink',
9+
'simple-icons:gradle',
10+
'simple-icons:apachegroovy',
11+
'simple-icons:apachehadoop',
12+
'simple-icons:eclipsejetty',
13+
'simple-icons:apachejmeter',
14+
'simple-icons:kotlin',
15+
'simple-icons:liquibase',
16+
'simple-icons:apachemaven',
17+
'simple-icons:quarkus',
18+
'simple-icons:scala',
19+
'simple-icons:apachespark',
20+
'simple-icons:springboot',
21+
'simple-icons:apachetomcat',
22+
'simple-icons:eclipsevertdotx',
23+
];
24+
---
25+
26+
<section class="py-20">
27+
<Container>
28+
<div id="technologies" class="overflow-hidden">
29+
<div class="-ml-4 flex">
30+
{
31+
technologies.map((technology) => (
32+
<div class="min-w-0 shrink-0 grow-0 basis-1/3 pl-4 md:basis-1/5 lg:basis-1/6 xl:basis-1/8">
33+
<Icon class="h-14 w-14" name={technology} />
34+
</div>
35+
))
36+
}
37+
</div>
38+
</div>
39+
</Container>
40+
</section>
41+
42+
<script>
43+
import EmblaCarousel from 'embla-carousel';
44+
import AutoScroll from 'embla-carousel-auto-scroll';
45+
46+
const technologiesNode = document.getElementById('technologies');
47+
48+
const technologiesOptions = { loop: true };
49+
const technologiesPlugins = [AutoScroll({ speed: 0.8 })];
50+
51+
if (!!technologiesNode) {
52+
EmblaCarousel(
53+
technologiesNode as HTMLElement,
54+
technologiesOptions,
55+
technologiesPlugins
56+
);
57+
}
58+
</script>

src/pages/index.astro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ import Description from '@/components/sections/welcome/Description.astro';
44
import Features from '@/components/sections/welcome/Features.astro';
55
import Hero from '@/components/sections/welcome/Hero.astro';
66
import OpenCollectiveCarousel from '@/components/sections/welcome/OpenCollectiveCarousel.astro';
7+
import Technologies from '@/components/sections/welcome/Technologies.astro';
78
import Layout from '@/layouts/Layout.astro';
89
---
910

1011
<Layout title="Welcome">
1112
<CarbonAds />
1213
<Hero />
1314
<Description />
15+
<Technologies />
1416
<Features />
1517
<OpenCollectiveCarousel />
1618
</Layout>

0 commit comments

Comments
 (0)