From 23da208e05a154455e84cf4dbc1044a13ac8bb41 Mon Sep 17 00:00:00 2001 From: Pranav Chatur Date: Sat, 30 Mar 2024 18:23:23 +0530 Subject: [PATCH 01/14] Add faq section (only english translations) --- .gitignore | 3 + package-lock.json | 8 +-- shared/locales/en/website-home2.json | 47 +++++++++++++++- .../[region]/v2/(home)/(sections)/faq.tsx | 55 ++++++++++++++++--- .../app/[lang]/[region]/v2/(home)/page.tsx | 24 ++++---- 5 files changed, 110 insertions(+), 27 deletions(-) diff --git a/.gitignore b/.gitignore index a600850c7..859381364 100644 --- a/.gitignore +++ b/.gitignore @@ -33,5 +33,8 @@ ignored/ # VSCode .vscode/ +# vim IDE (ctags file) +tags + recipients_app/android/app/src/main/google-services.json recipients_app/android/app/google-services.json diff --git a/package-lock.json b/package-lock.json index 57dfd972c..ad4611183 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33303,6 +33303,7 @@ "@radix-ui/react-switch": "^1.0.3", "@radix-ui/react-tabs": "^1.0.4", "@radix-ui/react-tooltip": "^1.0.7", + "@types/react": ">=18.0.0", "class-variance-authority": "^0.7.0", "classnames": "^2.5.1", "clsx": "^2.1.0", @@ -33310,6 +33311,8 @@ "embla-carousel-autoplay": "^8.0.0", "embla-carousel-react": "^8.0.0", "lucide-react": "^0.363.0", + "react": ">=18.0.0", + "react-dom": ">=18.0.0", "react-hook-form": "^7.51.2", "tailwindcss-animate": "^1.0.7", "zod": "^3.22.4" @@ -33328,11 +33331,6 @@ "react-dom": "^18.2.0", "tailwind-merge": "^2.2.2", "tailwindcss": "^3.4.3" - }, - "peerDependencies": { - "@types/react": ">=18.0.0", - "react": ">=18.0.0", - "react-dom": ">=18.0.0" } }, "ui/node_modules/@radix-ui/react-select": { diff --git a/shared/locales/en/website-home2.json b/shared/locales/en/website-home2.json index 184e39667..38ac0e8b8 100644 --- a/shared/locales/en/website-home2.json +++ b/shared/locales/en/website-home2.json @@ -41,7 +41,52 @@ }, "section-6": { "title-1": "This sounds good, but ... ", - "question-1": [{ "question": "Is it working" }, { "answer": "XXX" }], + "questions": [ + { + "prompt": "Are direct cash payments an effective way to fight poverty?", + "answer": "There is a wide consensus around the benefits and long-term success of direct giving programs. We offer an overview of the latest scientific literature in our Evidence section.", + "links": [ + { + "title": "Evidence section", + "href": "/evidence" + }, + { + "title": "Policy Brief: Impacts of Unconditional Cash Transfers", + "href": "https://drive.google.com/file/d/1xn4BvrEHZjSUGpNZLHjIc2YYnwq399jR/view" + }, + { + "title": "GiveDirectly's Cash Evidence Explorer", + "href": "https://www.givedirectly.org/cash-evidence-explorer/" + } + ] + }, + { + "prompt": "Is it helpful to send money to people in need?", + "answer": "It’s definitely more helpful than sending no money at all. Many people today advocate for equal opportunity in employment. This is obviously a goal worth aiming for, but it tends to ignore the fact that for many people born in the world’s poorest countries, employment as it is typically understood isn’t even possible or accessible. Giving money can help break down this barrier and give more people living in poverty access to work, education, and decent living conditions.", + "links": [ + { + "title": "Government of Malawi’s unconditional cash transfer improves youth mental health", + "href": "https://drive.google.com/file/d/1GKBdHjD80Jv7lZJmKvouZv8Z7MgLw_HL/view" + }, + { + "title": "Can unconditional cash transfers raise long-term living standards? Evidence from Zambia", + "href": "https://drive.google.com/file/d/1HwSLDlml0yyHrCrv8Y7pkqxz2orM02Lc/view" + } + ] + }, + { + "prompt": "Can Social Income create equality?", + "answer": "Social Income isn’t a theory of equality. It’s here to help make the world more fair, by taking advantage of the immense gap between rich and poor to carry out a simple, direct redistribution based on solidarity. It also helps contribute to self-driven change and a certain degree of financial independence for people in need. This process only works as long as inequality continues to exist; as soon as the distribution of wealth across the world becomes balanced, Social Income will no longer be useful." + }, + { + "prompt": "How are recipients chosen?", + "answer": "We determine possible new recipients thanks to the groundwork of our local advocates and partnerships with local NGOs: Aurora Foundation, Reachout Salone and Jamyl & Nyanga Jaward Foundation. Our criterias are simple: recipients must be older than 16 and come from a low income community. One other major principle is to keep up a strict gender balance/equality and to support people in need." + }, + { + "prompt": "How are recipients chosen?", + "answer": "We determine possible new recipients thanks to the groundwork of our local advocates and partnerships with local NGOs: Aurora Foundation, Reachout Salone and Jamyl & Nyanga Jaward Foundation. Our criterias are simple: recipients must be older than 16 and come from a low income community. One other major principle is to keep up a strict gender balance/equality and to support people in need." + } + ], "cta": "All FAQ" }, "section-7": { diff --git a/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx b/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx index ee7127dd4..b1de8adc1 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx @@ -1,7 +1,17 @@ import { DefaultParams } from '@/app/[lang]/[region]'; import { Translator } from '@socialincome/shared/src/utils/i18n'; -import { BaseContainer, Typography } from '@socialincome/ui'; +import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, BaseContainer, Typography } from '@socialincome/ui'; import { FontColor } from '@socialincome/ui/src/interfaces/color'; +import Link from 'next/link'; + +type FaqQuestion = { + prompt: string, + answer: string, + links: { + title: string, + href: string + }[] +}; export async function Faq({ lang, region }: DefaultParams) { const translator = await Translator.getInstance({ @@ -9,17 +19,44 @@ export async function Faq({ lang, region }: DefaultParams) { namespaces: ['website-home2'], }); + const questions = translator.t('section-6.questions'); + return ( - {translator.t('section-6.title-1')} -
- {translator.t<{ text: string; color?: FontColor }[]>('section-6.question-1').map((title, index) => ( - - {title.text}{' '} - + {translator.t('section-6.title-1')} +
+ + {questions.map((question, index) => ( + + + + {question.prompt} + + + + + {question.answer} + + {question.links && ( +
    + {question.links?.map((link, index2) => ( +
  • + + + {link.title} + + +
  • + ))} +
+ )} +
+
))} -
- {translator.t('section-6.cta')} + + + {translator.t('section-6.cta')+' ›'} +
); } diff --git a/website/src/app/[lang]/[region]/v2/(home)/page.tsx b/website/src/app/[lang]/[region]/v2/(home)/page.tsx index fea4154f5..c284f5f93 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/page.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/page.tsx @@ -20,18 +20,18 @@ export default async function Page({ params: { lang, region } }: DefaultPageProp }); return ( <> - - - - - - - - - - - - + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} ); } From b3fa58b211a6205928b386bf50d3ebf9b9efa0c9 Mon Sep 17 00:00:00 2001 From: DarkMenacer Date: Sat, 30 Mar 2024 12:57:45 +0000 Subject: [PATCH 02/14] Prettified Code! --- .../[region]/v2/(home)/(sections)/faq.tsx | 32 +++++++++++------ .../app/[lang]/[region]/v2/(home)/page.tsx | 35 +++++++------------ 2 files changed, 33 insertions(+), 34 deletions(-) diff --git a/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx b/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx index b1de8adc1..c69313890 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx @@ -1,16 +1,22 @@ import { DefaultParams } from '@/app/[lang]/[region]'; import { Translator } from '@socialincome/shared/src/utils/i18n'; -import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, BaseContainer, Typography } from '@socialincome/ui'; -import { FontColor } from '@socialincome/ui/src/interfaces/color'; +import { + Accordion, + AccordionContent, + AccordionItem, + AccordionTrigger, + BaseContainer, + Typography, +} from '@socialincome/ui'; import Link from 'next/link'; type FaqQuestion = { - prompt: string, - answer: string, + prompt: string; + answer: string; links: { - title: string, - href: string - }[] + title: string; + href: string; + }[]; }; export async function Faq({ lang, region }: DefaultParams) { @@ -23,9 +29,11 @@ export async function Faq({ lang, region }: DefaultParams) { return ( - {translator.t('section-6.title-1')} -
- + + {translator.t('section-6.title-1')} + +
+ {questions.map((question, index) => ( @@ -55,7 +63,9 @@ export async function Faq({ lang, region }: DefaultParams) { ))} - {translator.t('section-6.cta')+' ›'} + + {translator.t('section-6.cta') + ' ›'} +
); diff --git a/website/src/app/[lang]/[region]/v2/(home)/page.tsx b/website/src/app/[lang]/[region]/v2/(home)/page.tsx index c284f5f93..b4f1fd867 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/page.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/page.tsx @@ -1,16 +1,5 @@ import { DefaultPageProps } from '@/app/[lang]/[region]'; -import { Approach } from '@/app/[lang]/[region]/v2/(home)/(sections)/approach'; -import { ExplainerVideo } from '@/app/[lang]/[region]/v2/(home)/(sections)/explainer-video'; import { Faq } from '@/app/[lang]/[region]/v2/(home)/(sections)/faq'; -import { HeroVideo } from '@/app/[lang]/[region]/v2/(home)/(sections)/hero-video'; -import { Journal } from '@/app/[lang]/[region]/v2/(home)/(sections)/journal'; -import { MobileIllustration } from '@/app/[lang]/[region]/v2/(home)/(sections)/mobile-illustration'; -import { MonthlyIncome } from '@/app/[lang]/[region]/v2/(home)/(sections)/monthly-income'; -import { Overview } from '@/app/[lang]/[region]/v2/(home)/(sections)/overview'; -import { Quotes } from '@/app/[lang]/[region]/v2/(home)/(sections)/quotes'; -import { RecipientSelection } from '@/app/[lang]/[region]/v2/(home)/(sections)/recipient-selection'; -import { Sdgoals } from '@/app/[lang]/[region]/v2/(home)/(sections)/sdgoals'; -import { Testimonials } from '@/app/[lang]/[region]/v2/(home)/(sections)/testimonials'; import { Translator } from '@socialincome/shared/src/utils/i18n'; export default async function Page({ params: { lang, region } }: DefaultPageProps) { @@ -20,18 +9,18 @@ export default async function Page({ params: { lang, region } }: DefaultPageProp }); return ( <> - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} ); } From d20b3e50aad8ef072c650a89bbc7cb87d2d2638e Mon Sep 17 00:00:00 2001 From: Pranav Chatur Date: Sun, 7 Apr 2024 18:57:41 +0530 Subject: [PATCH 03/14] Complete FAQ section --- shared/locales/de/website-home2.json | 122 ++++++++++++++++++ ui/src/components/accordion2.tsx | 56 ++++++++ .../[region]/v2/(home)/(sections)/faq.tsx | 8 +- 3 files changed, 182 insertions(+), 4 deletions(-) create mode 100644 shared/locales/de/website-home2.json create mode 100644 ui/src/components/accordion2.tsx diff --git a/shared/locales/de/website-home2.json b/shared/locales/de/website-home2.json new file mode 100644 index 000000000..c8b7d83c4 --- /dev/null +++ b/shared/locales/de/website-home2.json @@ -0,0 +1,122 @@ +{ + "metadata": { + "title": "Social Income", + "description": "Change from human to human. From mobile to mobile.", + "og-image": "/assets/metadata/og/default.jpg", + "twitter-image": "/assets/metadata/twitter/default.jpg" + }, + "section-1": { + "title-1": [ + { "text": "How many people can you lift out of poverty " }, + { "text": "with only 1%", "color": "accent" }, + { "text": "of your income" } + ] + }, + "section-2": { + "title-1": "Those that live in Sierra Leone’s poorest communities know what it takes to rise out of poverty.", + "title-2": [ + { "text": "They just rarely have the opportunity – or the money – to do so. That’s where " }, + { "text": "you and Social Income", "color": "accent" }, + { "text": "come in." } + ], + "subtitle-1": "Unique Process for Fair Selection", + "text-1.1": "Identifying those in need: Through collaboration with local NGOs in Sierra Leone, we target individuals living in poverty who can benefit from a three-year predictable income, empowering them to invest in their future.", + "text-1.2": "Selecting randomly: Our randomized selection process is transparent and publicly verifiable, eliminating human biases and favoritism. This ensures fairness and equal chances for all individuals in poverty to benefit.", + "subtitle-2": "Direct Giving, Direct Results", + "text-2": "We directly transfer your contribution onto the mobile phones of individuals in need, empowering them to overcome poverty through their own choices and efforts.", + "subtitle-3": "Ongoing Support", + "text-3": "Our recipients receive continuous support from our local partners throughout and even after the program, maximizing the overall impact. Specifically, the third year of the program is focused on facilitating a seamless transition as they move on from the program." + }, + "section-3": {}, + "section-4": { + "title-1": [ + { "text": "What would change if you gave " }, + { "text": "away 1% of your income every month?", "color": "accent" } + ], + "cta": "Watch video and find out" + }, + "section-5": { + "title-1": [{ "text": "Change from human to human. " }, { "text": "From mobile to mobile.", "color": "accent" }], + "subtitle-1": "Social Income is a new way to fight poverty in the Global South. Digital, efficient and mobile." + }, + "section-6": { + "title-1": "Das hört sich gut an, aber...", + "questions": [ + { + "prompt": "Sind direkte Cash-Transfers ein effektiver Weg zur Armutsbekämpfung?", + "answer": "Es besteht ein breiter Konsens über den Nutzen und den langfristigen Erfolg von Cash-Transfer-Programmen. In unserer Rubrik Evidenz bieten wir einen Überblick über die neueste wissenschaftliche Literatur.", + "links": [ + { + "title": "Rubrik Evidenz", + "href": "/evidence" + }, + { + "title": "Policy Brief: Impacts of Unconditional Cash Transfers", + "href": "https://drive.google.com/file/d/1xn4BvrEHZjSUGpNZLHjIc2YYnwq399jR/view" + }, + { + "title": "GiveDirectly's Cash Evidence Explorer", + "href": "https://www.givedirectly.org/cash-evidence-explorer/" + } + ] + }, + { + "prompt": "Ist es hilfreich, Menschen in Not Geld zu schicken?", + "answer": "Es ist definitiv hilfreicher, als gar kein Geld zu senden. Viele Menschen setzen sich heutzutage für Chancengleichheit im Erwerbsleben ein. Dies ist zweifellos ein Ziel, wofür es sich einzusetzen lohnt. Allerdings wird dabei leider allzu oft der Umstand ignoriert, dass vielerorts ein Angestelltenverhältnis, wie wir es typischerweise kennen, weder möglich, noch erreichbar ist. Geldspenden können helfen, diese Barriere schrittweise aufzuheben, indem Menschen in Armut der Zugang zu Aus- und Weiterbildung, Arbeit und akzeptablen Lebensbedingungen verschafft wird.", + "links": [ + { + "title": "Government of Malawi’s unconditional cash transfer improves youth mental health", + "href": "https://drive.google.com/file/d/1GKBdHjD80Jv7lZJmKvouZv8Z7MgLw_HL/view" + }, + { + "title": "Can unconditional cash transfers raise long-term living standards? Evidence from Zambia", + "href": "https://drive.google.com/file/d/1HwSLDlml0yyHrCrv8Y7pkqxz2orM02Lc/view" + } + ] + }, + { + "prompt": "Kann Social Income zu mehr Gerechtigkeit beitragen?", + "answer": "Social Income ist keine Theorie der Gleichheit, sondern ein Akt der Solidarität. Wir sind hier, um die Welt fairer zu machen, indem wir uns dem immensen Unterschied zwischen zwischen arm und reich annehmen und ganz konkret eine einfache und wirksame Umverteilung ermöglichen. Diese Umverteilung hilft Menschen in Not, selbstbestimmt Veränderungen einzuleiten und einen gewissen Grad finanzieller Unabhängigkeit zu erlangen." + }, + { + "prompt": "Wie werden die Empfänger:innen ausgewählt?", + "answer": "Wir bestimmen mögliche neue Empfänger:innen aufgrund der Vorarbeit unserer lokalen Kontaktpersonen und Vorschläge von Partnern und lokalen NGOs: i.e. Aurora Foundation, Reachout Salone, Equal Rights Alliance, United Polio Brothers und Sisters und Jamyl & Nyanga Jaward Foundation. Unsere Kriterien sind einfach: Die Empfänger müssen älter als 16 Jahre sein und aus einer einkommensschwachen Community stammen.Als übergeordnetes Prinzip verpflichten wir uns, Menschen in Not zu unterstützen und halten uns dabei strikt an ein ausgeglichenes Geschlechterverhältnis." + }, + { + "prompt": "Wie werden die Empfänger:innen ausgewählt?", + "answer": "Wir bestimmen mögliche neue Empfänger:innen aufgrund der Vorarbeit unserer lokalen Kontaktpersonen und Vorschläge von Partnern und lokalen NGOs: i.e. Aurora Foundation, Reachout Salone, Equal Rights Alliance, United Polio Brothers und Sisters und Jamyl & Nyanga Jaward Foundation. Unsere Kriterien sind einfach: Die Empfänger müssen älter als 16 Jahre sein und aus einer einkommensschwachen Community stammen.Als übergeordnetes Prinzip verpflichten wir uns, Menschen in Not zu unterstützen und halten uns dabei strikt an ein ausgeglichenes Geschlechterverhältnis." + } + ], + "cta": "Alle FAQ" + }, + "section-7": { + "title-1": "Social Income combines three approaches to change." + }, + "section-8": { + "title-1": [ + { "text": "Unique Recipients Selection Process for " }, + { "text": "Fair Selection.", "color": "accent" } + ], + "text-1.1": "Identifying those in need: Through collaboration with local NGOs in Sierra Leone, we target individuals living in poverty who can benefit from a three-year predictable income, empowering them to invest in their future.", + "text-1.2": "Selecting randomly: Our randomized selection process is transparent and publicly verifiable, eliminating human biases and favoritism. This ensures fairness and equal chances for all individuals in poverty to benefit." + }, + "section-9": { + "testimonial-1": "It’s a great example of redistribution of wealth based on solidarity and enabled by today's technology.", + "author-1": "Vanja, Switzerland", + "testimonial-2": "We are living in a world of opportunities, let's make sure we share this privilege with everyone else.", + "author-2": "Carlos, United States", + "testimonial-3": "I contribute to Social Income not only because it's simple, but because research has shown it's extremely effective.", + "author-3": "Ruben, Switzerland", + "testimonial-4": "The question is not why to get involved, but how to possibly abide not doing so. Social Income is an urgent necessity in contemporary society.", + "author-4": "Han, United States", + "testimonial-5": "Today's global inequality is the consequence of centuries of unequal progress. Social Income is a new way to address this.", + "author-5": "Claudia, Switzerland" + }, + "section-10": { + "title-1": [{ "text": "Contribute to the United Nations’ " }, { "text": "United Nations’", "color": "primary" }], + "sdg-1-title": "End poverty in all its forms, everywhere.", + "sdg-1": "SDG #1", + "sdg-10-title": "Reduce inequality within and \namong countries.", + "sdg-10": "SDG #10" + } +} diff --git a/ui/src/components/accordion2.tsx b/ui/src/components/accordion2.tsx new file mode 100644 index 000000000..181f145c4 --- /dev/null +++ b/ui/src/components/accordion2.tsx @@ -0,0 +1,56 @@ +'use client'; + +import * as AccordionPrimitive from '@radix-ui/react-accordion'; +import { ChevronDown } from 'lucide-react'; +import * as React from 'react'; + +import { cn } from '../lib/utils'; + +const Accordion = AccordionPrimitive.Root; + +const AccordionItem = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +AccordionItem.displayName = 'AccordionItem'; + +const AccordionTrigger = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + + svg]:rotate-180', + className, + )} + {...props} + > + {children} + + + +)); +AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName; + +const AccordionContent = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + +
{children}
+
+)); +AccordionContent.displayName = AccordionPrimitive.Content.displayName; + +export { Accordion, AccordionContent, AccordionItem, AccordionTrigger }; diff --git a/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx b/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx index b1de8adc1..b603106a7 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx @@ -1,7 +1,7 @@ import { DefaultParams } from '@/app/[lang]/[region]'; import { Translator } from '@socialincome/shared/src/utils/i18n'; -import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, BaseContainer, Typography } from '@socialincome/ui'; -import { FontColor } from '@socialincome/ui/src/interfaces/color'; +import { BaseContainer, Typography } from '@socialincome/ui'; +import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@socialincome/ui/src/components/accordion2'; import Link from 'next/link'; type FaqQuestion = { @@ -33,7 +33,7 @@ export async function Faq({ lang, region }: DefaultParams) { {question.prompt} - + {question.answer} @@ -42,7 +42,7 @@ export async function Faq({ lang, region }: DefaultParams) { {question.links?.map((link, index2) => (
  • - + {link.title} From 0303f0dd8dd9cd6250b2cdb8b11b38b4d180a92d Mon Sep 17 00:00:00 2001 From: DarkMenacer Date: Sun, 7 Apr 2024 13:32:12 +0000 Subject: [PATCH 04/14] Prettified Code! --- ui/src/components/accordion2.tsx | 2 +- .../src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ui/src/components/accordion2.tsx b/ui/src/components/accordion2.tsx index 181f145c4..72549bd38 100644 --- a/ui/src/components/accordion2.tsx +++ b/ui/src/components/accordion2.tsx @@ -30,7 +30,7 @@ const AccordionTrigger = React.forwardRef< {...props} > {children} - + )); diff --git a/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx b/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx index 088d3a8f2..9e85e9f2b 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx @@ -1,7 +1,12 @@ import { DefaultParams } from '@/app/[lang]/[region]'; import { Translator } from '@socialincome/shared/src/utils/i18n'; import { BaseContainer, Typography } from '@socialincome/ui'; -import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@socialincome/ui/src/components/accordion2'; +import { + Accordion, + AccordionContent, + AccordionItem, + AccordionTrigger, +} from '@socialincome/ui/src/components/accordion2'; import Link from 'next/link'; type FaqQuestion = { @@ -35,7 +40,7 @@ export async function Faq({ lang, region }: DefaultParams) { {question.prompt} - + {question.answer} From 77be94f6e7221398edc52e41cd10ba3003c40e02 Mon Sep 17 00:00:00 2001 From: Pranav Chatur Date: Tue, 9 Apr 2024 08:23:08 +0530 Subject: [PATCH 05/14] Start quotes section --- shared/locales/en/website-home2.json | 13 ++-- .../v2/(home)/(assets)/avatarImgData.jpg | Bin 0 -> 8878 bytes .../contributors-people-carousel.tsx | 67 ++++++++++++++++++ .../[region]/v2/(home)/(sections)/quotes.tsx | 41 ++++++++++- .../app/[lang]/[region]/v2/(home)/page.tsx | 3 +- 5 files changed, 117 insertions(+), 7 deletions(-) create mode 100644 website/src/app/[lang]/[region]/v2/(home)/(assets)/avatarImgData.jpg create mode 100644 website/src/app/[lang]/[region]/v2/(home)/(components)/contributors-people-carousel.tsx diff --git a/shared/locales/en/website-home2.json b/shared/locales/en/website-home2.json index 38ac0e8b8..a2d3b36e9 100644 --- a/shared/locales/en/website-home2.json +++ b/shared/locales/en/website-home2.json @@ -92,7 +92,7 @@ "section-7": { "title-1": "Social Income combines three approaches to change." }, - "section-8": { + "section-x": { "title-1": [ { "text": "Unique Recipients Selection Process for " }, { "text": "Fair Selection.", "color": "accent" } @@ -100,9 +100,14 @@ "text-1.1": "Identifying those in need: Through collaboration with local NGOs in Sierra Leone, we target individuals living in poverty who can benefit from a three-year predictable income, empowering them to invest in their future.", "text-1.2": "Selecting randomly: Our randomized selection process is transparent and publicly verifiable, eliminating human biases and favoritism. This ensures fairness and equal chances for all individuals in poverty to benefit." }, - "section-9": { - "testimonial-1": "It’s a great example of redistribution of wealth based on solidarity and enabled by today's technology.", - "author-1": "Vanja, Switzerland", + "section-8": { + "portraits": [ + { + "name": "Vanja", + "country": "Switzerland", + "text": "It’s a great example of redistribution of wealth based on solidarity and enabled by today's technology." + } + ], "testimonial-2": "We are living in a world of opportunities, let's make sure we share this privilege with everyone else.", "author-2": "Carlos, United States", "testimonial-3": "I contribute to Social Income not only because it's simple, but because research has shown it's extremely effective.", diff --git a/website/src/app/[lang]/[region]/v2/(home)/(assets)/avatarImgData.jpg b/website/src/app/[lang]/[region]/v2/(home)/(assets)/avatarImgData.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f1fab92f7291bea5f8e431b635ff1f3a6c9b54d5 GIT binary patch literal 8878 zcmb7pbx<5%x9#BW5*!Ad!GddW_rVDc!C?r41qcw_-QC?`a7&Qj5M+ShmO$_T0RjQ? z_`Z98_kQoMS8rEWpR-T*UVTp0u2sF){`>XsHh@r7QAH7egakk~LN)>b{;mPS0GR0L z80cu27#J8>SeV$jq>h_$V5meL`Z*!0sH_Y z01_G!;6Dr<2^kd)1La@aNBO@Vpr9h5p(FoY1>iofBNL(!J_ns||3~EiYl_Ch@T=~Z zv(IVH+M}-F7qGG8XCS8C4{C1X49SHLwCN{RniNlepk9j7|AB<3_>O&P<8q{XMz^$2 z_3j!94um;fKqs-+Oyc^ZC;MLNo|4VJ?e6z3vG|Xua+v@A3zCnMF-O$_Z6WX9cCc+F z;<#L298Ij_pxwM2oLE|K5$gb^LIpQyRj*Bd|8J-cHQ#sRp8K8`?tNq~-61OEd8ZD? zZ**%+8&PgIMz0O~vI4K!u3K*SZC#t{T^h{Zi;)SQ+!@D0{s#gna?FoSbpKuZy-rR* zd2KCQeqBWRp}-DXkYMv&N^kEuyCLzS#cc(*8IGi9SH@P&h34q2BcI}}&i_DwWPocM zFDMZfw$7R}lH5loeM|1A!p>K#bNi3@XbgkuuTFt^JFDif7VCRp<(@lPL3k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cQ%Uo1G>580^lFQI4eoHqFwkWbt2QcvZT+>so?E@!c`b0urDV nx{>(2^s|;b!|uuN=EpD7aYR9{>Gm_GF^rA0{RlQc{$2S$_p|rx literal 0 HcmV?d00001 diff --git a/website/src/app/[lang]/[region]/v2/(home)/(components)/contributors-people-carousel.tsx b/website/src/app/[lang]/[region]/v2/(home)/(components)/contributors-people-carousel.tsx new file mode 100644 index 000000000..cd8550452 --- /dev/null +++ b/website/src/app/[lang]/[region]/v2/(home)/(components)/contributors-people-carousel.tsx @@ -0,0 +1,67 @@ +'use client'; +import { useScreenSize } from '@/hooks/useScreenSize'; +import { Card, CardFooter, CardHeader, Carousel, CarouselContent, Typography } from '@socialincome/ui'; +import { StaticImport } from 'next/dist/shared/lib/get-img-props'; +import Image from 'next/image'; + +type PortraitProps = { + name: string; + text: string; + country: string; + image: string | StaticImport; +}; + +function Portrait({ name, text, country, image }: PortraitProps) { + return ( + + + + {text} + + + + {`${name} + + {name}, {country} + + + + ); +} + +export function ContributorsPeopleCarouselv2({ portraits }: { portraits: PortraitProps[] }) { + const screenSize = useScreenSize(); + + let slidesToScroll; + switch (screenSize) { + case null: + case 'xs': + slidesToScroll = 1; + break; + case 'sm': + case 'md': + slidesToScroll = 2; + break; + default: + slidesToScroll = 3; + break; + } + + return ( + + {portraits.map((portrait, index) => ( + + + + ))} + + ); +} diff --git a/website/src/app/[lang]/[region]/v2/(home)/(sections)/quotes.tsx b/website/src/app/[lang]/[region]/v2/(home)/(sections)/quotes.tsx index d72bcc846..1cc6596b2 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/(sections)/quotes.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/(sections)/quotes.tsx @@ -1,6 +1,16 @@ import { DefaultParams } from '@/app/[lang]/[region]'; import { Translator } from '@socialincome/shared/src/utils/i18n'; import { BaseContainer } from '@socialincome/ui'; +import { StaticImport } from 'next/dist/shared/lib/get-img-props'; +import avatarImgData from '../(assets)/avatarImgData.jpg'; +import { ContributorsPeopleCarouselv2 } from '../(components)/contributors-people-carousel'; + +type PortraitProps = { + name: string; + text: string; + country: string; + image: string | StaticImport; +}; export async function Quotes({ lang, region }: DefaultParams) { const translator = await Translator.getInstance({ @@ -8,9 +18,36 @@ export async function Quotes({ lang, region }: DefaultParams) { namespaces: ['website-home2', 'common'], }); + const portrait: PortraitProps[] = [ + { + name: 'Vanja', + text: "It's a great example of redistribution of wealth based on solidarity and enabled by today's technology.", + country: 'Switzerland', + image: avatarImgData, + }, + { + name: 'Vanja', + text: "It's a great example of redistribution of wealth based on solidarity and enabled by today's technology.", + country: 'Switzerland', + image: avatarImgData, + }, + { + name: 'Vanja', + text: "It's a great example of redistribution of wealth based on solidarity and enabled by today's technology.", + country: 'Switzerland', + image: avatarImgData, + }, + { + name: 'Vanja', + text: "It's a great example of redistribution of wealth based on solidarity and enabled by today's technology.", + country: 'Switzerland', + image: avatarImgData, + }, + ]; + return ( - -
    Quotes carousel section
    + + ); } diff --git a/website/src/app/[lang]/[region]/v2/(home)/page.tsx b/website/src/app/[lang]/[region]/v2/(home)/page.tsx index b4f1fd867..78a82d3d9 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/page.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/page.tsx @@ -1,5 +1,6 @@ import { DefaultPageProps } from '@/app/[lang]/[region]'; import { Faq } from '@/app/[lang]/[region]/v2/(home)/(sections)/faq'; +import { Quotes } from '@/app/[lang]/[region]/v2/(home)/(sections)/quotes'; import { Translator } from '@socialincome/shared/src/utils/i18n'; export default async function Page({ params: { lang, region } }: DefaultPageProps) { @@ -16,7 +17,7 @@ export default async function Page({ params: { lang, region } }: DefaultPageProp {/* */} {/* */} - {/* */} + {/* */} {/* */} {/* */} From d0b3c4004801807e3a376047c492d9e241d0beda Mon Sep 17 00:00:00 2001 From: DarkMenacer Date: Tue, 9 Apr 2024 02:55:56 +0000 Subject: [PATCH 06/14] Prettified Code! --- .../v2/(home)/(components)/contributors-people-carousel.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/src/app/[lang]/[region]/v2/(home)/(components)/contributors-people-carousel.tsx b/website/src/app/[lang]/[region]/v2/(home)/(components)/contributors-people-carousel.tsx index cd8550452..b2d04475d 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/(components)/contributors-people-carousel.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/(components)/contributors-people-carousel.tsx @@ -13,7 +13,7 @@ type PortraitProps = { function Portrait({ name, text, country, image }: PortraitProps) { return ( - + {text} @@ -55,7 +55,7 @@ export function ContributorsPeopleCarouselv2({ portraits }: { portraits: Portrai slidesToScroll: slidesToScroll, }} showControls - showDots={true} + showDots={true} > {portraits.map((portrait, index) => ( From aacf7702e9391c4069642179f1c13b7e9fafa64f Mon Sep 17 00:00:00 2001 From: Pranav Chatur Date: Tue, 9 Apr 2024 08:30:06 +0530 Subject: [PATCH 07/14] Correct margin-top for arrow vertical alignment --- .../v2/(home)/(components)/contributors-people-carousel.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/app/[lang]/[region]/v2/(home)/(components)/contributors-people-carousel.tsx b/website/src/app/[lang]/[region]/v2/(home)/(components)/contributors-people-carousel.tsx index cd8550452..d5b2e27f4 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/(components)/contributors-people-carousel.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/(components)/contributors-people-carousel.tsx @@ -13,7 +13,7 @@ type PortraitProps = { function Portrait({ name, text, country, image }: PortraitProps) { return ( - + {text} From 92f69d6870ee99ee9e28ecfe84f3ecb63da6ebd5 Mon Sep 17 00:00:00 2001 From: DarkMenacer Date: Tue, 9 Apr 2024 03:03:52 +0000 Subject: [PATCH 08/14] Prettified Code! --- .../v2/(home)/(components)/contributors-people-carousel.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/app/[lang]/[region]/v2/(home)/(components)/contributors-people-carousel.tsx b/website/src/app/[lang]/[region]/v2/(home)/(components)/contributors-people-carousel.tsx index ec9e42567..f6a15e928 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/(components)/contributors-people-carousel.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/(components)/contributors-people-carousel.tsx @@ -13,7 +13,7 @@ type PortraitProps = { function Portrait({ name, text, country, image }: PortraitProps) { return ( - + {text} From eda6b04eee0c54659761faca1e4792128df025eb Mon Sep 17 00:00:00 2001 From: Pranav Chatur Date: Wed, 17 Apr 2024 19:57:33 +0530 Subject: [PATCH 09/14] Add code for overview section --- .gitignore | 3 +- shared/locales/en/website-home2.json | 6 ++-- .../v2/(home)/(sections)/overview.tsx | 34 +++++++++++-------- .../app/[lang]/[region]/v2/(home)/page.tsx | 3 +- 4 files changed, 26 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index 859381364..f8ce9d275 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,8 @@ ignored/ # VSCode .vscode/ -# vim IDE (ctags file) +# vim IDE +*.swp tags recipients_app/android/app/src/main/google-services.json diff --git a/shared/locales/en/website-home2.json b/shared/locales/en/website-home2.json index a2d3b36e9..b79aa6285 100644 --- a/shared/locales/en/website-home2.json +++ b/shared/locales/en/website-home2.json @@ -19,12 +19,12 @@ { "text": "you and Social Income", "color": "accent" }, { "text": "come in." } ], - "subtitle-1": "Unique Process for Fair Selection", + "title-3": "Unique Process for Fair Selection", "text-1.1": "Identifying those in need: Through collaboration with local NGOs in Sierra Leone, we target individuals living in poverty who can benefit from a three-year predictable income, empowering them to invest in their future.", "text-1.2": "Selecting randomly: Our randomized selection process is transparent and publicly verifiable, eliminating human biases and favoritism. This ensures fairness and equal chances for all individuals in poverty to benefit.", - "subtitle-2": "Direct Giving, Direct Results", + "title-4": "Direct Giving, Direct Results", "text-2": "We directly transfer your contribution onto the mobile phones of individuals in need, empowering them to overcome poverty through their own choices and efforts.", - "subtitle-3": "Ongoing Support", + "title-5": "Ongoing Support", "text-3": "Our recipients receive continuous support from our local partners throughout and even after the program, maximizing the overall impact. Specifically, the third year of the program is focused on facilitating a seamless transition as they move on from the program." }, "section-3": {}, diff --git a/website/src/app/[lang]/[region]/v2/(home)/(sections)/overview.tsx b/website/src/app/[lang]/[region]/v2/(home)/(sections)/overview.tsx index e163b6c71..5893c9eaa 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/(sections)/overview.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/(sections)/overview.tsx @@ -10,24 +10,28 @@ export async function Overview({ lang, region }: DefaultParams) { }); return ( - - + + {translator.t('section-2.title-1')} -
    - {translator.t<{ text: string; color?: FontColor }[]>('section-2.title-2').map((title, index) => ( - - {title.text}{' '} - - ))} +
    + {translator.t<{ text: string; color?: FontColor }[]>('section-2.title-2').map((title, index) => ( + + {title.text}{' '} + + ))}
    - {translator.t('section-2.subtitle-1')} - {translator.t('section-2.text-1.1')} - {translator.t('section-2.text-1.2')} - {translator.t('section-2.subtitle-2')} - {translator.t('section-2.text-2')} - {translator.t('section-2.subtitle-3')} - {translator.t('section-2.text-3')} + + {translator.t('section-2.title-3')} + +
      +
    1. {translator.t('section-2.text-1.1')}
    2. +
    3. {translator.t('section-2.text-1.2')}
    4. +
    + {translator.t('section-2.title-4')} + {translator.t('section-2.text-2')} + {translator.t('section-2.title-5')} + {translator.t('section-2.text-3')} ); } diff --git a/website/src/app/[lang]/[region]/v2/(home)/page.tsx b/website/src/app/[lang]/[region]/v2/(home)/page.tsx index 78a82d3d9..0342d2af8 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/page.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/page.tsx @@ -2,6 +2,7 @@ import { DefaultPageProps } from '@/app/[lang]/[region]'; import { Faq } from '@/app/[lang]/[region]/v2/(home)/(sections)/faq'; import { Quotes } from '@/app/[lang]/[region]/v2/(home)/(sections)/quotes'; import { Translator } from '@socialincome/shared/src/utils/i18n'; +import {Overview} from './(sections)/overview'; export default async function Page({ params: { lang, region } }: DefaultPageProps) { const translator = await Translator.getInstance({ @@ -11,7 +12,7 @@ export default async function Page({ params: { lang, region } }: DefaultPageProp return ( <> {/* */} - {/* */} + {/* */} {/* */} {/* */} From fa2669071f1ac726541506c488805c9bc1aa8ce1 Mon Sep 17 00:00:00 2001 From: Pranav Chatur Date: Wed, 17 Apr 2024 19:59:25 +0530 Subject: [PATCH 10/14] fix margins --- .../src/app/[lang]/[region]/v2/(home)/(sections)/overview.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/src/app/[lang]/[region]/v2/(home)/(sections)/overview.tsx b/website/src/app/[lang]/[region]/v2/(home)/(sections)/overview.tsx index 5893c9eaa..b4dc4c283 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/(sections)/overview.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/(sections)/overview.tsx @@ -28,9 +28,9 @@ export async function Overview({ lang, region }: DefaultParams) {
  • {translator.t('section-2.text-1.1')}
  • {translator.t('section-2.text-1.2')}
  • - {translator.t('section-2.title-4')} + {translator.t('section-2.title-4')} {translator.t('section-2.text-2')} - {translator.t('section-2.title-5')} + {translator.t('section-2.title-5')} {translator.t('section-2.text-3')} ); From ac55755927f1ae4dafdae770033cb2cdadd3aeff Mon Sep 17 00:00:00 2001 From: Pranav Chatur Date: Wed, 17 Apr 2024 20:04:26 +0530 Subject: [PATCH 11/14] Rename translation keys --- shared/locales/de/website-home2.json | 14 +++++++------- shared/locales/en/website-home2.json | 8 ++++---- .../[region]/v2/(home)/(sections)/overview.tsx | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/shared/locales/de/website-home2.json b/shared/locales/de/website-home2.json index c8b7d83c4..8e1b6dca0 100644 --- a/shared/locales/de/website-home2.json +++ b/shared/locales/de/website-home2.json @@ -19,13 +19,13 @@ { "text": "you and Social Income", "color": "accent" }, { "text": "come in." } ], - "subtitle-1": "Unique Process for Fair Selection", - "text-1.1": "Identifying those in need: Through collaboration with local NGOs in Sierra Leone, we target individuals living in poverty who can benefit from a three-year predictable income, empowering them to invest in their future.", - "text-1.2": "Selecting randomly: Our randomized selection process is transparent and publicly verifiable, eliminating human biases and favoritism. This ensures fairness and equal chances for all individuals in poverty to benefit.", - "subtitle-2": "Direct Giving, Direct Results", - "text-2": "We directly transfer your contribution onto the mobile phones of individuals in need, empowering them to overcome poverty through their own choices and efforts.", - "subtitle-3": "Ongoing Support", - "text-3": "Our recipients receive continuous support from our local partners throughout and even after the program, maximizing the overall impact. Specifically, the third year of the program is focused on facilitating a seamless transition as they move on from the program." + "title-3": "Unique Process for Fair Selection", + "text-3.1": "Identifying those in need: Through collaboration with local NGOs in Sierra Leone, we target individuals living in poverty who can benefit from a three-year predictable income, empowering them to invest in their future.", + "text-3.2": "Selecting randomly: Our randomized selection process is transparent and publicly verifiable, eliminating human biases and favoritism. This ensures fairness and equal chances for all individuals in poverty to benefit.", + "title-4": "Direct Giving, Direct Results", + "text-4": "We directly transfer your contribution onto the mobile phones of individuals in need, empowering them to overcome poverty through their own choices and efforts.", + "title-5": "Ongoing Support", + "text-5": "Our recipients receive continuous support from our local partners throughout and even after the program, maximizing the overall impact. Specifically, the third year of the program is focused on facilitating a seamless transition as they move on from the program." }, "section-3": {}, "section-4": { diff --git a/shared/locales/en/website-home2.json b/shared/locales/en/website-home2.json index b79aa6285..15db3af60 100644 --- a/shared/locales/en/website-home2.json +++ b/shared/locales/en/website-home2.json @@ -20,12 +20,12 @@ { "text": "come in." } ], "title-3": "Unique Process for Fair Selection", - "text-1.1": "Identifying those in need: Through collaboration with local NGOs in Sierra Leone, we target individuals living in poverty who can benefit from a three-year predictable income, empowering them to invest in their future.", - "text-1.2": "Selecting randomly: Our randomized selection process is transparent and publicly verifiable, eliminating human biases and favoritism. This ensures fairness and equal chances for all individuals in poverty to benefit.", + "text-3.1": "Identifying those in need: Through collaboration with local NGOs in Sierra Leone, we target individuals living in poverty who can benefit from a three-year predictable income, empowering them to invest in their future.", + "text-3.2": "Selecting randomly: Our randomized selection process is transparent and publicly verifiable, eliminating human biases and favoritism. This ensures fairness and equal chances for all individuals in poverty to benefit.", "title-4": "Direct Giving, Direct Results", - "text-2": "We directly transfer your contribution onto the mobile phones of individuals in need, empowering them to overcome poverty through their own choices and efforts.", + "text-4": "We directly transfer your contribution onto the mobile phones of individuals in need, empowering them to overcome poverty through their own choices and efforts.", "title-5": "Ongoing Support", - "text-3": "Our recipients receive continuous support from our local partners throughout and even after the program, maximizing the overall impact. Specifically, the third year of the program is focused on facilitating a seamless transition as they move on from the program." + "text-5": "Our recipients receive continuous support from our local partners throughout and even after the program, maximizing the overall impact. Specifically, the third year of the program is focused on facilitating a seamless transition as they move on from the program." }, "section-3": {}, "section-4": { diff --git a/website/src/app/[lang]/[region]/v2/(home)/(sections)/overview.tsx b/website/src/app/[lang]/[region]/v2/(home)/(sections)/overview.tsx index b4dc4c283..1fb47fb84 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/(sections)/overview.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/(sections)/overview.tsx @@ -25,13 +25,13 @@ export async function Overview({ lang, region }: DefaultParams) { {translator.t('section-2.title-3')}
      -
    1. {translator.t('section-2.text-1.1')}
    2. -
    3. {translator.t('section-2.text-1.2')}
    4. +
    5. {translator.t('section-2.text-3.1')}
    6. +
    7. {translator.t('section-2.text-3.2')}
    {translator.t('section-2.title-4')} - {translator.t('section-2.text-2')} + {translator.t('section-2.text-4')} {translator.t('section-2.title-5')} - {translator.t('section-2.text-3')} + {translator.t('section-2.text-5')} ); } From 16e351045ac13a72dd80f14c7fd5b7424ec871db Mon Sep 17 00:00:00 2001 From: Pranav Chatur Date: Wed, 17 Apr 2024 22:39:00 +0530 Subject: [PATCH 12/14] Add Approach section --- shared/locales/en/website-home2.json | 34 +++++++++++++- .../v2/(home)/(components)/approach-cards.tsx | 36 ++++++++++++++ .../v2/(home)/(sections)/approach.tsx | 21 ++++++++- .../[region]/v2/(home)/(sections)/faq.tsx | 2 +- .../v2/(home)/(sections)/overview.tsx | 47 ++++++++++++------- .../app/[lang]/[region]/v2/(home)/page.tsx | 7 +-- 6 files changed, 124 insertions(+), 23 deletions(-) create mode 100644 website/src/app/[lang]/[region]/v2/(home)/(components)/approach-cards.tsx diff --git a/shared/locales/en/website-home2.json b/shared/locales/en/website-home2.json index 15db3af60..d4adf3314 100644 --- a/shared/locales/en/website-home2.json +++ b/shared/locales/en/website-home2.json @@ -90,7 +90,39 @@ "cta": "All FAQ" }, "section-7": { - "title-1": "Social Income combines three approaches to change." + "title-1": "Social Income combines three approaches to change.", + "cards": [ + { + "category": "Concept", + "title": "Universal Basic Income", + "points": [ + { "text": "Reduces discrimination" }, + { "text": "Fights income inequality" }, + { "text": "Empowers marginalized groups" }, + { "text": "Improves working conditions" } + ] + }, + { + "category": "Method", + "title": "Direct Cash Transfers", + "points": [ + { "text": "Reduces discrimination" }, + { "text": "Fights income inequality" }, + { "text": "Empowers marginalized groups" }, + { "text": "Improves working conditions" } + ] + }, + { + "category": "Technology", + "title": "Mobile Banking", + "points": [ + { "text": "Reduces discrimination" }, + { "text": "Fights income inequality" }, + { "text": "Empowers marginalized groups" }, + { "text": "Improves working conditions" } + ] + } + ] }, "section-x": { "title-1": [ diff --git a/website/src/app/[lang]/[region]/v2/(home)/(components)/approach-cards.tsx b/website/src/app/[lang]/[region]/v2/(home)/(components)/approach-cards.tsx new file mode 100644 index 000000000..029f7eb16 --- /dev/null +++ b/website/src/app/[lang]/[region]/v2/(home)/(components)/approach-cards.tsx @@ -0,0 +1,36 @@ +'use client'; +import { Card, CardContent, CardHeader, Typography } from '@socialincome/ui'; + +type ApproachCardProps = { + category: string; + title: string; + points: { + text: string; + }[]; +}; + +export function ApproachCard({ category, title, points }: ApproachCardProps) { + return ( + + + + {category} + + + {title} + + + +
      + {points.map((point, key) => { + return ( +
    • + {point.text} +
    • + ); + })} +
    +
    +
    + ); +} diff --git a/website/src/app/[lang]/[region]/v2/(home)/(sections)/approach.tsx b/website/src/app/[lang]/[region]/v2/(home)/(sections)/approach.tsx index 87d31e2e3..a69d3a3f6 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/(sections)/approach.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/(sections)/approach.tsx @@ -1,16 +1,33 @@ import { DefaultParams } from '@/app/[lang]/[region]'; import { Translator } from '@socialincome/shared/src/utils/i18n'; import { BaseContainer, Typography } from '@socialincome/ui'; +import { ApproachCard } from '../(components)/approach-cards'; + +type ApproachCardProps = { + category: string; + title: string; + points: { + text: string; + }[]; +}; export async function Approach({ lang, region }: DefaultParams) { const translator = await Translator.getInstance({ language: lang, namespaces: ['website-home2'], }); + const cards = translator.t('section-7.cards'); return ( - - {translator.t('section-7.title-1')} + + + {translator.t('section-7.title-1')} + +
    + {cards.map((card, key) => { + return ; + })} +
    ); } diff --git a/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx b/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx index 9e85e9f2b..1759f36d9 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx @@ -28,7 +28,7 @@ export async function Faq({ lang, region }: DefaultParams) { return ( - + {translator.t('section-6.title-1')}
    diff --git a/website/src/app/[lang]/[region]/v2/(home)/(sections)/overview.tsx b/website/src/app/[lang]/[region]/v2/(home)/(sections)/overview.tsx index 1fb47fb84..056fd39e3 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/(sections)/overview.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/(sections)/overview.tsx @@ -10,28 +10,43 @@ export async function Overview({ lang, region }: DefaultParams) { }); return ( - - + + {translator.t('section-2.title-1')} -
    - {translator.t<{ text: string; color?: FontColor }[]>('section-2.title-2').map((title, index) => ( - - {title.text}{' '} - - ))} +
    + {translator.t<{ text: string; color?: FontColor }[]>('section-2.title-2').map((title, index) => ( + + {title.text}{' '} + + ))}
    - + {translator.t('section-2.title-3')} -
      -
    1. {translator.t('section-2.text-3.1')}
    2. -
    3. {translator.t('section-2.text-3.2')}
    4. +
        +
      1. + {translator.t('section-2.text-3.1')} +
      2. +
      3. + {translator.t('section-2.text-3.2')} +
      - {translator.t('section-2.title-4')} - {translator.t('section-2.text-4')} - {translator.t('section-2.title-5')} - {translator.t('section-2.text-5')} + + {translator.t('section-2.title-4')} + + {translator.t('section-2.text-4')} + + {translator.t('section-2.title-5')} + + {translator.t('section-2.text-5')} ); } diff --git a/website/src/app/[lang]/[region]/v2/(home)/page.tsx b/website/src/app/[lang]/[region]/v2/(home)/page.tsx index 0342d2af8..c3085ab24 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/page.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/page.tsx @@ -2,7 +2,8 @@ import { DefaultPageProps } from '@/app/[lang]/[region]'; import { Faq } from '@/app/[lang]/[region]/v2/(home)/(sections)/faq'; import { Quotes } from '@/app/[lang]/[region]/v2/(home)/(sections)/quotes'; import { Translator } from '@socialincome/shared/src/utils/i18n'; -import {Overview} from './(sections)/overview'; +import { Approach } from './(sections)/approach'; +import { Overview } from './(sections)/overview'; export default async function Page({ params: { lang, region } }: DefaultPageProps) { const translator = await Translator.getInstance({ @@ -12,12 +13,12 @@ export default async function Page({ params: { lang, region } }: DefaultPageProp return ( <> {/* */} - + {/* */} {/* */} {/* */} - {/* */} + {/* */} {/* */} From cde089f7a79b4c85c95c4f8346534372816ada51 Mon Sep 17 00:00:00 2001 From: Pranav Chatur Date: Wed, 17 Apr 2024 22:45:55 +0530 Subject: [PATCH 13/14] Remove text-left in faq --- website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx b/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx index 1759f36d9..581680993 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx @@ -36,12 +36,12 @@ export async function Faq({ lang, region }: DefaultParams) { {questions.map((question, index) => ( - + {question.prompt} - + {question.answer} {question.links && ( From b7fdf2a135570b5908282803984eb2d2b9e3bb65 Mon Sep 17 00:00:00 2001 From: DarkMenacer Date: Wed, 17 Apr 2024 17:18:48 +0000 Subject: [PATCH 14/14] Prettified Code! --- .../src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx b/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx index 581680993..c66c65252 100644 --- a/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx +++ b/website/src/app/[lang]/[region]/v2/(home)/(sections)/faq.tsx @@ -36,14 +36,10 @@ export async function Faq({ lang, region }: DefaultParams) { {questions.map((question, index) => ( - - {question.prompt} - + {question.prompt} - - {question.answer} - + {question.answer} {question.links && (
        {question.links?.map((link, index2) => (