Skip to content

Commit aa61390

Browse files
committed
feat(solana): replace community image with video and add favicon
- Replace timeline-1-community.jpg with community.mp4/webm video for "Tradução e Educação" card - Add video prop support to TimelineItem component with autoplay/loop/muted - Download community.mp4 (921K) and community.webm (793K) from w3d.community CDN - Add favicon.png and apple-touch-icon.png to public/ from w3d.community - Add favicon and apple-touch-icon link tags to index.html
1 parent 3ffc7d6 commit aa61390

File tree

6 files changed

+25
-5
lines changed

6 files changed

+25
-5
lines changed

index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
<meta property="og:description" content="Comunidade de educação técnica gratuita em Web3. Bootcamps, grupos de estudo e conteúdo prático.">
2222
<meta name="twitter:description" content="Comunidade de educação técnica gratuita em Web3. Bootcamps, grupos de estudo e conteúdo prático.">
2323

24+
<link rel="icon" type="image/png" href="/favicon.png">
25+
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
2426
<link rel="preconnect" href="https://fonts.googleapis.com">
2527
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
2628
<link href="https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">

public/apple-touch-icon.png

9.85 KB
Loading

public/favicon.png

1013 Bytes
Loading

src/assets/video/community.mp4

921 KB
Binary file not shown.

src/assets/video/community.webm

793 KB
Binary file not shown.

src/components/SolanaCaseSection.tsx

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { motion, useScroll, useTransform, useInView } from "framer-motion";
22
import ShimmerButton from "@/components/ShimmerButton";
33
import { useRef } from "react";
4-
import timelineCommunity from "@/assets/timeline-1-community.jpg";
4+
import communityMp4 from "@/assets/video/community.mp4";
5+
import communityWebm from "@/assets/video/community.webm";
56
import timelineHackathon from "@/assets/timeline-2-hackathon.webp";
67
import timelineBootcamp from "@/assets/timeline-3-bootcamp.webp";
78
import timelineTalents from "@/assets/timeline-4-talents.webp";
@@ -17,6 +18,7 @@ const TimelineItem = ({
1718
title,
1819
description,
1920
image,
21+
video,
2022
link,
2123
index,
2224
viewMoreLabel,
@@ -26,6 +28,7 @@ const TimelineItem = ({
2628
title: string;
2729
description: string;
2830
image?: string;
31+
video?: { mp4: string; webm: string };
2932
link?: string;
3033
index: number;
3134
viewMoreLabel: string;
@@ -64,7 +67,22 @@ const TimelineItem = ({
6467
</>
6568
);
6669

67-
const imageContent = image ? (
70+
const mediaContent = video ? (
71+
<div className="overflow-hidden rounded-lg border border-border/50">
72+
<video
73+
autoPlay
74+
loop
75+
muted
76+
playsInline
77+
preload="auto"
78+
ref={(el) => { if (el) { el.muted = true; el.play().catch(() => {}); } }}
79+
className="w-full h-40 md:h-48 object-cover"
80+
>
81+
<source src={video.webm} type="video/webm" />
82+
<source src={video.mp4} type="video/mp4" />
83+
</video>
84+
</div>
85+
) : image ? (
6886
<div className="overflow-hidden rounded-lg border border-border/50">
6987
<img src={image} alt={title} className="w-full h-40 md:h-48 object-cover" loading="lazy" />
7088
</div>
@@ -98,7 +116,7 @@ const TimelineItem = ({
98116
transition={{ duration: 0.5, delay: 0.15 }}
99117
className="pl-8"
100118
>
101-
{imageContent ?? <div />}
119+
{mediaContent ?? <div />}
102120
</motion.div>
103121
</div>
104122

@@ -120,7 +138,7 @@ const TimelineItem = ({
120138
className="pl-3 flex flex-col gap-3"
121139
>
122140
{textContent}
123-
{imageContent && <div>{imageContent}</div>}
141+
{mediaContent && <div>{mediaContent}</div>}
124142
</motion.div>
125143
</div>
126144
</div>
@@ -156,7 +174,7 @@ const SolanaCaseSection = () => {
156174
title: t("solana.card1.title"),
157175
description: t("solana.card1.desc"),
158176
link: "https://pt.w3d.community/search?q=solana",
159-
image: timelineCommunity,
177+
video: { mp4: communityMp4, webm: communityWebm },
160178
},
161179
{
162180
title: t("solana.card2.title"),

0 commit comments

Comments
 (0)