Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Divider to separate videos and articles #551

Merged
merged 2 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added apps/subgraph/tests/.bin/semaphore.wasm
Binary file not shown.
111 changes: 53 additions & 58 deletions apps/website/src/app/learn/page.tsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
import {
Box,
Divider,
Flex,
Heading,
Image,
Link,
Text,
VStack,
Tabs,
TabList,
TabPanels,
Tab,
TabList,
TabPanel,
Divider,
Box,
Image
TabPanels,
Tabs,
Text,
VStack
} from "@chakra-ui/react"
import ArticleCard from "../../components/ArticleCard"
import Carousel from "../../components/Carousel"
import InfoCard, { InfoBlock } from "../../components/InfoCard"
import SectionBlock, { SectionBlockProps } from "../../components/SectionBlock"
import IconEyelash from "@/icons/IconEyelash"
import IconEye from "@/icons/IconEye"
import IconUser from "@/icons/IconUser"
import IconTree from "@/icons/IconTree"
import IconManageUsers from "@/icons/IconManageUsers"
import IconGroup from "@/icons/IconGroup"
import IconBadge from "@/icons/IconBadge"
import IconCheck from "@/icons/IconCheck"
import IconFlag from "@/icons/IconFlag"
import Carousel from "@/components/Carousel"
import videos from "../../data/videos.json"
import VideoCard from "../../components/VideoCard"
import articles from "../../data/articles.json"
import ArticleCard from "../../components/ArticleCard"
import { sortByDate } from "@/utils/sortByDate"
import videos from "../../data/videos.json"
import IconBadge from "../../icons/IconBadge"
import IconCheck from "../../icons/IconCheck"
import IconEye from "../../icons/IconEye"
import IconEyelash from "../../icons/IconEyelash"
import IconFlag from "../../icons/IconFlag"
import IconGroup from "../../icons/IconGroup"
import IconManageUsers from "../../icons/IconManageUsers"
import IconTree from "../../icons/IconTree"
import IconUser from "../../icons/IconUser"
import { sortByDate } from "../../utils/sortByDate"

export default function Learn() {
const infoCardTexts: InfoBlock[][] = [
Expand Down Expand Up @@ -343,6 +344,8 @@ await verifyProof(verificationKey, fullProof)`,
type="videos"
/>

<Divider />

<Carousel
title="Articles"
sizes={{
Expand All @@ -353,44 +356,36 @@ await verifyProof(verificationKey, fullProof)`,
/>
</VStack>

<VStack spacing="16" w="full">
<Text
display={{ base: "flex", xl: "none" }}
flex="1"
alignSelf="start"
fontSize={{ base: "40px", md: "44px" }}
fontWeight="500"
mt="100px"
>
Videos
</Text>
<Flex display={{ base: "flex", xl: "none" }} w="100%" overflowX="auto" align="stretch">
{sortByDate(videos).map((video) => (
<Box px="3" key={video.url}>
<VideoCard title={video.title} thumbnail={video.thumbnail} url={video.url} />
</Box>
))}
</Flex>
</VStack>
<VStack display={{ base: "flex", xl: "none" }} p="100px 40px" w="full" spacing="20">
<VStack spacing="16" w="full">
<Heading fontSize={{ base: "30px", md: "44px" }} alignSelf="start">
Videos
</Heading>

<VStack spacing="16" w="full">
<Text
display={{ base: "flex", xl: "none" }}
flex="1"
alignSelf="start"
fontSize="44px"
fontWeight="500"
mt="96px"
>
Articles
</Text>
<Flex display={{ base: "flex", xl: "none" }} w="100%" overflowX="auto" mb="66px" align="stretch">
{sortByDate(articles).map((article) => (
<Box px="3" key={article.url}>
<ArticleCard title={article.title} minRead={article.minRead} url={article.url} />
</Box>
))}
</Flex>
<Flex w="100%" overflowX="auto" align="stretch">
{sortByDate(videos).map((video) => (
<Box px="3" key={video.url}>
<VideoCard title={video.title} thumbnail={video.thumbnail} url={video.url} />
</Box>
))}
</Flex>
</VStack>

<Divider />

<VStack spacing="16" w="full">
<Heading fontSize={{ base: "30px", md: "44px" }} alignSelf="start">
Articles
</Heading>

<Flex w="100%" overflowX="auto" mb="66px" align="stretch">
{sortByDate(articles).map((article) => (
<Box px="3" key={article.url}>
<ArticleCard title={article.title} minRead={article.minRead} url={article.url} />
</Box>
))}
</Flex>
</VStack>
</VStack>
</VStack>
</VStack>
Expand Down
Loading