Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

feat: replace hero images with video

AykutSaraccad35e6ad499
diff --git a/public/assets/videos/p1.mp4 b/public/assets/videos/p1.mp4
new file mode 100644
index 00000000..127e69bf
Binary files /dev/null and b/public/assets/videos/p1.mp4 differ
diff --git a/public/assets/videos/p2.mp4 b/public/assets/videos/p2.mp4
new file mode 100644
index 00000000..2d95c636
Binary files /dev/null and b/public/assets/videos/p2.mp4 differ
diff --git a/public/assets/videos/p3.mp4 b/public/assets/videos/p3.mp4
new file mode 100644
index 00000000..5658ee6f
Binary files /dev/null and b/public/assets/videos/p3.mp4 differ
diff --git a/public/assets/videos/p5.mp4 b/public/assets/videos/p5.mp4
new file mode 100644
index 00000000..6178a81b
Binary files /dev/null and b/public/assets/videos/p5.mp4 differ
diff --git a/public/assets/videos/p6.mp4 b/public/assets/videos/p6.mp4
new file mode 100644
index 00000000..52a45e4b
Binary files /dev/null and b/public/assets/videos/p6.mp4 differ
diff --git a/public/assets/videos/p7.mp4 b/public/assets/videos/p7.mp4
new file mode 100644
index 00000000..4db5dea1
Binary files /dev/null and b/public/assets/videos/p7.mp4 differ
diff --git a/src/containers/Landing/HeroPreview.tsx b/src/containers/Landing/HeroPreview.tsx
index 70ee300b..0643aab6 100644
--- a/src/containers/Landing/HeroPreview.tsx
+++ b/src/containers/Landing/HeroPreview.tsx
@@ -1,15 +1,10 @@
import React from "react";
-import { Flex, Image, Paper, SegmentedControl, Stack } from "@mantine/core";
+import { AspectRatio, Flex, Paper, SegmentedControl, Stack } from "@mantine/core";
import styled from "styled-components";
-import { images } from "src/constants/landing";
const StyledPreviewWrapper = styled.div`
margin: 0 auto;
position: relative;
-
- @media only screen and (max-width: 996px) {
- display: none;
- }
`;
export const HeroPreview = () => {
@@ -17,7 +12,15 @@ export const HeroPreview = () => {
return (
<StyledPreviewWrapper id="preview">
- <Flex gap="lg" mx="auto" w="85%">
+ <Flex
+ gap="lg"
+ direction={{
+ base: "column",
+ xs: "row",
+ }}
+ mx="auto"
+ w="85%"
+ >
<Stack>
<SegmentedControl
data={[
@@ -53,6 +56,7 @@ export const HeroPreview = () => {
color="grape"
bg="transparent"
size="lg"
+ visibleFrom="sm"
styles={{
control: {
background: "#8f8f8f52",
@@ -64,26 +68,35 @@ export const HeroPreview = () => {
}}
/>
</Stack>
+
<Paper
- bg="transparent"
- w="100%"
p={0}
+ w="100%"
+ h="fit-content"
radius="md"
+ shadow="xl"
+ bg="transparent"
style={{
overflow: "hidden",
border: "1px solid #c1c1c1",
outline: "1px solid #c1c1c1",
outlineOffset: "4px",
}}
- shadow="xl"
>
- <Image
- fit="cover"
- src={`./assets/preview/${selectedFeature}.webp`}
- loading={selectedFeature === "1" ? "eager" : "lazy"}
- alt={images[+selectedFeature - 1].alt}
- h="100%"
- />
+ <AspectRatio ratio={1440 / 760} maw={1440} h="100%">
+ <video
+ autoPlay
+ muted
+ loop
+ preload="auto"
+ style={{
+ display: "block",
+ }}
+ key={selectedFeature}
+ >
+ <source src={`./assets/videos/p${selectedFeature}.mp4`} type="video/mp4" />
+ </video>
+ </AspectRatio>
</Paper>
</Flex>
</StyledPreviewWrapper>