diff --git a/app/page.tsx b/app/page.tsx index 55484b6..4ffd7bf 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,29 +1,35 @@ +"use client" + import Image from "next/image" import Link from "next/link" import PSELogo from "@/public/icons/archstar.webp" import ArrowRightVector from "@/public/icons/arrow-right.svg" -import PSEIcon1 from "@/public/icons/pseicon1.svg" -import PSEIcon2 from "@/public/icons/pseicon2.svg" -import PSEIcon3 from "@/public/icons/pseicon3.svg" +import { motion } from "framer-motion" import { siteConfig } from "@/config/site" +import News from "@/components/sections/News" import WhatWeDo from "@/components/sections/WhatWeDo" import { ArrowRightUp } from "@/components/svgs/arrows" export default function IndexPage() { return (
-
+
-
+
Privacy + Scaling Explorations
-

+ Programmable cryptography for people like you -

+

- Explore The Project Library + Explore Project Library

-
-
-
-
- pseicon1 -

- Learn and Share -

-
-

- Diving into Plonk accumulation via aPlonk by Ralph Toledo -

-
- -

- Watch -

- - -
-
-
-
- pseicon1 -

- Learn and Share -

-
-

- Folding Circom Circuit: A ZKML Case Study - Dr. Cathie So -

-
- -

- Watch -

- - -
-
-
-
- pseicon1 -

- Event -

-
-

PSE @ETH Global Paris

-
- -

- Attend -

- - -
-
-
-
- pseicon1 -

- Blog Post -

-
-

- zkEVM Community Edition Part 3: Logic and Structure -

-
- -

- read -

- - -
-
+
diff --git a/components/sections/News.tsx b/components/sections/News.tsx new file mode 100644 index 0000000..1ec59f3 --- /dev/null +++ b/components/sections/News.tsx @@ -0,0 +1,88 @@ +"use client" + +import Image from "next/image" +import { newsItems } from "@/data/news" +import PSELearnIcon from "@/public/icons/pseicon1.svg" +import PSEEventIcon from "@/public/icons/pseicon2.svg" +import PSEPostIcon from "@/public/icons/pseicon3.svg" +import { motion } from "framer-motion" +import { ArrowUpRight } from "lucide-react" + +import { NewsInterface } from "@/lib/types" + +const newsTypes = { + learn: { + type: "Learn & Share", + icon: PSELearnIcon, + defaultActionLabel: "Watch", + }, + event: { + type: "Event", + icon: PSEEventIcon, + defaultActionLabel: "Attend", + }, + post: { + type: "Blog Post", + icon: PSEPostIcon, + defaultActionLabel: "Read", + }, +} + +type NewsType = typeof newsTypes + +const showMove = { + initial: { opacity: 0, y: 10 }, + hover: { opacity: 1, y: 0, transition: { duration: 0.2 } }, +} + +const News = () => { + return ( +
    +

    + what's happening +

    + {newsItems.map((item: NewsInterface, index) => { + const newsType = newsTypes[item.type as keyof NewsType] + return ( + +
  • +
    +
    + pseicon1 +

    + {newsType["type"]} +

    +
    +

    +

    + {item.title} +

    +
    + + + {item.action.label || newsType["defaultActionLabel"]} + + + +
  • +
    + ) + })} +
+ ) +} + +export default News diff --git a/data/news.ts b/data/news.ts new file mode 100644 index 0000000..3e06f0b --- /dev/null +++ b/data/news.ts @@ -0,0 +1,37 @@ +import { NewsInterface } from "@/lib/types" + +export const newsItems: NewsInterface[] = [ + { + type: "learn", + title: "Diving into Plonk accumulation via aPlonk by Ralph Toledo", + action: { + label: "Watch", + url: "https://www.youtube.com/live/hRXgf6T2yb8", + }, + }, + { + type: "learn", + title: "Folding Circom Circuit: A ZKML Case Study - Dr. Cathie So", + action: { + label: "Watch", + url: "https://www.youtube.com/live/jb6HDEtY4CI", + }, + }, + { + type: "event", + title: "PSE @ ETHGlobal Paris", + action: { + label: "Attend", + url: "https://ethglobal.com/events/paris2023", + }, + }, + { + type: "post", + title: + " zkEVM Community Edition Part 3: Logic and StructureZKProof Community Event", + action: { + label: "Read", + url: "https://mirror.xyz/privacy-scaling-explorations.eth/shl8eMBiObd6_AUBikXZrjKD4fibI6xUZd7d9Yv5ezE", + }, + }, +] diff --git a/lib/types.ts b/lib/types.ts new file mode 100644 index 0000000..2782f4f --- /dev/null +++ b/lib/types.ts @@ -0,0 +1,9 @@ +export interface NewsInterface { + type: string + title: string + expires?: string + action: { + label: string + url: string + } +}