From 926cf9e5ddb4a4d2478a98540dd6a90f3d796e56 Mon Sep 17 00:00:00 2001 From: Kalidou Diagne Date: Wed, 9 Apr 2025 07:35:30 +0200 Subject: [PATCH] feat: research page (#316) * feat: research page --- .prettierrc | 2 +- .vscode/settings.json | 3 +- app/[lang]/about/page.tsx | 44 +-- app/[lang]/devcon-7/page.tsx | 18 +- .../devcon-7/sections/Devcon7Header.tsx | 2 +- .../devcon-7/sections/Devcon7Section.tsx | 66 ++-- .../devcon-7/sections/Devcon7Slider.tsx | 30 +- app/[lang]/layout.tsx | 34 +- app/[lang]/page.tsx | 97 +++--- app/[lang]/programs/index.tsx | 108 +++---- app/[lang]/projects/page.tsx | 28 +- .../projects/sections/ProjectContent.tsx | 118 +++---- app/[lang]/research/page.tsx | 42 +++ app/[lang]/resources/page.tsx | 96 +++--- app/api/news/route.ts | 20 +- app/i18n/client.ts | 24 +- app/i18n/index.ts | 8 +- app/i18n/locales/en/common.json | 6 + app/i18n/locales/en/homepage.json | 2 +- app/i18n/locales/en/research-page.json | 6 + app/layout.tsx | 22 +- components/banner.tsx | 8 +- components/breadcrumbs.tsx | 6 +- components/divider.tsx | 8 +- components/icons.tsx | 30 +- .../{project => mappings}/project-link.tsx | 0 .../{project => mappings}/project-links.tsx | 2 +- components/project/project-card.tsx | 46 +-- components/project/project-detail-tags.tsx | 20 +- components/project/project-extra-links.tsx | 24 +- components/project/project-filters-bar.tsx | 117 +++---- components/project/project-list.tsx | 62 ++-- components/project/project-result-bar.tsx | 28 +- components/research/research-card.tsx | 183 +++++++++++ components/research/research-list.tsx | 140 +++++++++ components/sections/NewsSection.tsx | 44 +-- components/sections/WhatWeDo.tsx | 30 +- components/site-footer.tsx | 42 +-- components/svgs/social-medias.tsx | 2 +- components/ui/label.tsx | 12 +- components/ui/markdown.tsx | 52 ++-- components/wiki-side-navigation.tsx | 54 ++-- config/site.ts | 36 +-- data/events/devcon-7.ts | 294 +++++++++--------- data/projects.ts | 106 +++---- data/projects/anon-aadhaar.ts | 34 +- data/projects/anon-klub.ts | 36 +-- data/projects/channel-4.ts | 26 +- data/projects/chiquito.ts | 36 +-- data/projects/circom-mpc.ts | 50 +-- data/projects/coco.ts | 28 +- data/projects/cryptkeeper.ts | 24 +- data/projects/discreetly.ts | 26 +- data/projects/dsl-working-group.ts | 20 +- data/projects/ecip-halo2.ts | 20 +- data/projects/eigen-trust.ts | 24 +- data/projects/excubiae.ts | 26 +- data/projects/interep.ts | 26 +- data/projects/machina-iO.ts | 36 +-- data/projects/mpc-framework.ts | 34 +- data/projects/openpassport.ts | 34 +- data/projects/p256.ts | 36 +-- data/projects/plasma_fold.ts | 30 +- data/projects/post-quantum-cryptography.ts | 24 +- data/projects/private-proof-delegation.ts | 53 ++-- data/projects/pse-halo2.ts | 2 +- data/projects/pse-security.ts | 30 +- .../publicly-verifiable-garbled-circuit.ts | 48 +-- data/projects/rln.ts | 24 +- data/projects/sonobe.ts | 65 ++-- data/projects/summa.ts | 28 +- data/projects/tlsn.ts | 2 +- data/projects/vOPRF.ts | 22 +- data/projects/voice-deck.ts | 26 +- data/projects/zk-email.ts | 25 +- data/projects/zk-id.ts | 20 +- data/projects/zkevm-community.ts | 22 +- data/projects/zkml.ts | 24 +- data/projects/zkopru.ts | 28 +- data/projects/zkp2p.ts | 28 +- hooks/useAppSettings.ts | 42 +-- lib/types.ts | 74 ++--- lib/utils.ts | 14 +- prettier.config.js | 38 +-- state/useProjectFiltersState.ts | 137 +++++--- tailwind.config.js | 166 +++++----- 86 files changed, 2026 insertions(+), 1584 deletions(-) create mode 100644 app/[lang]/research/page.tsx create mode 100644 app/i18n/locales/en/research-page.json rename components/{project => mappings}/project-link.tsx (100%) rename components/{project => mappings}/project-links.tsx (94%) create mode 100644 components/research/research-card.tsx create mode 100644 components/research/research-list.tsx diff --git a/.prettierrc b/.prettierrc index 0b49510..e340feb 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,5 +1,5 @@ { - "singleQuote": true, + "singleQuote": false, "semi": false, "trailingComma": "es5" } diff --git a/.vscode/settings.json b/.vscode/settings.json index 99438eb..7e1dd05 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,5 @@ { "typescript.tsdk": "../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib", - "typescript.enablePromptUseWorkspaceTsdk": true + "typescript.enablePromptUseWorkspaceTsdk": true, + "cSpell.words": ["researchs"] } diff --git a/app/[lang]/about/page.tsx b/app/[lang]/about/page.tsx index 178f56c..2899b3b 100644 --- a/app/[lang]/about/page.tsx +++ b/app/[lang]/about/page.tsx @@ -1,31 +1,31 @@ -import Image from 'next/image' -import Link from 'next/link' +import Image from "next/image" +import Link from "next/link" -import { siteConfig } from '@/config/site' -import { Accordion } from '@/components/ui/accordion' -import { AppContent } from '@/components/ui/app-content' -import { Button } from '@/components/ui/button' -import { Label } from '@/components/ui/label' -import { Banner } from '@/components/banner' -import { Divider } from '@/components/divider' -import { Icons } from '@/components/icons' -import { PageHeader } from '@/components/page-header' -import { useTranslation } from '@/app/i18n' +import { siteConfig } from "@/config/site" +import { Accordion } from "@/components/ui/accordion" +import { AppContent } from "@/components/ui/app-content" +import { Button } from "@/components/ui/button" +import { Label } from "@/components/ui/label" +import { Banner } from "@/components/banner" +import { Divider } from "@/components/divider" +import { Icons } from "@/components/icons" +import { PageHeader } from "@/components/page-header" +import { useTranslation } from "@/app/i18n" export default async function AboutPage({ params: { lang } }: any) { - const { t } = await useTranslation(lang, 'about-page') - const { t: common } = await useTranslation(lang, 'common') + const { t } = await useTranslation(lang, "about-page") + const { t: common } = await useTranslation(lang, "common") const principles: any[] = - (t('principles', { + (t("principles", { returnObjects: true, }) as any[]) ?? [] return (
- {common('connectWithUsOnPlatform', { - platform: 'Discord', + {common("connectWithUsOnPlatform", { + platform: "Discord", })} @@ -60,7 +60,7 @@ export default async function AboutPage({ params: { lang } }: any) {
- + - {common('joinOurDiscord')} + {common("joinOurDiscord")} diff --git a/app/[lang]/devcon-7/page.tsx b/app/[lang]/devcon-7/page.tsx index e26ed66..9d3af20 100644 --- a/app/[lang]/devcon-7/page.tsx +++ b/app/[lang]/devcon-7/page.tsx @@ -1,19 +1,19 @@ -import React from 'react' -import { Metadata } from 'next' +import React from "react" +import { Metadata } from "next" -import { Devcon7Booths } from './sections/Devcon7Booths' -import { Devcon7Header } from './sections/Devcon7Header' -import { Devcon7Section } from './sections/Devcon7Section' +import { Devcon7Booths } from "./sections/Devcon7Booths" +import { Devcon7Header } from "./sections/Devcon7Header" +import { Devcon7Section } from "./sections/Devcon7Section" -import { Devcon7Slider } from './sections/Devcon7Slider' +import { Devcon7Slider } from "./sections/Devcon7Slider" export const metadata: Metadata = { - title: 'Devcon 7', - description: 'PSE x Devcon 7 Southeast Asia', + title: "Devcon 7", + description: "PSE x Devcon 7 Southeast Asia", openGraph: { images: [ { - url: '/devcon-7-cover.png', + url: "/devcon-7-cover.png", width: 1200, height: 630, }, diff --git a/app/[lang]/devcon-7/sections/Devcon7Header.tsx b/app/[lang]/devcon-7/sections/Devcon7Header.tsx index 23f0a2d..46b9636 100644 --- a/app/[lang]/devcon-7/sections/Devcon7Header.tsx +++ b/app/[lang]/devcon-7/sections/Devcon7Header.tsx @@ -1,4 +1,4 @@ -import Image from 'next/image' +import Image from "next/image" export const Devcon7Header = () => { return ( diff --git a/app/[lang]/devcon-7/sections/Devcon7Section.tsx b/app/[lang]/devcon-7/sections/Devcon7Section.tsx index dd4a042..c091ba5 100644 --- a/app/[lang]/devcon-7/sections/Devcon7Section.tsx +++ b/app/[lang]/devcon-7/sections/Devcon7Section.tsx @@ -1,21 +1,21 @@ -'use client' +"use client" -import { useEffect, useState } from 'react' -import Link from 'next/link' -import { events } from '@/data/events/devcon-7' -import { cva } from 'class-variance-authority' -import { Button } from '@/components/ui/button' -import { useTranslation } from '@/app/i18n/client' +import { useEffect, useState } from "react" +import Link from "next/link" +import { events } from "@/data/events/devcon-7" +import { cva } from "class-variance-authority" +import { Button } from "@/components/ui/button" +import { useTranslation } from "@/app/i18n/client" -import { cn } from '@/lib/utils' -import { Icons } from '@/components/icons' +import { cn } from "@/lib/utils" +import { Icons } from "@/components/icons" -const tableSection = cva('lg:grid lg:grid-cols-[200px_1fr_160px_20px] lg:gap-8') +const tableSection = cva("lg:grid lg:grid-cols-[200px_1fr_160px_20px] lg:gap-8") const tableSectionTitle = cva( - 'text-anakiwa-500 text-base lg:text-xs font-sans leading-5 tracking-[2.5px] uppercase font-bold lg:pb-3' + "text-anakiwa-500 text-base lg:text-xs font-sans leading-5 tracking-[2.5px] uppercase font-bold lg:pb-3" ) -const EventCard = ({ event = {}, speakers = [], location = '' }: any) => { +const EventCard = ({ event = {}, speakers = [], location = "" }: any) => { const [isOpen, setIsOpen] = useState(false) const getYouTubeEmbedURL = (url: string) => { @@ -28,9 +28,9 @@ const EventCard = ({ event = {}, speakers = [], location = '' }: any) => { return (
@@ -57,7 +57,7 @@ const EventCard = ({ event = {}, speakers = [], location = '' }: any) => { {speaker.label} @@ -70,7 +70,7 @@ const EventCard = ({ event = {}, speakers = [], location = '' }: any) => {
@@ -85,15 +85,15 @@ const EventCard = ({ event = {}, speakers = [], location = '' }: any) => { {isOpen ? ( ) : ( )} @@ -101,10 +101,10 @@ const EventCard = ({ event = {}, speakers = [], location = '' }: any) => {
@@ -115,9 +115,9 @@ const EventCard = ({ event = {}, speakers = [], location = '' }: any) => {