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

feature(website): sections for new landing page #791

Merged
merged 19 commits into from
Apr 23, 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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,9 @@ ignored/
# VSCode
.vscode/

# vim IDE
*.swp
tags

recipients_app/android/app/src/main/google-services.json
recipients_app/android/app/google-services.json
122 changes: 122 additions & 0 deletions shared/locales/de/website-home2.json
Original file line number Diff line number Diff line change
@@ -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." }
],
"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": {
"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"
}
}
108 changes: 95 additions & 13 deletions shared/locales/en/website-home2.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -41,23 +41,105 @@
},
"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": {
"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-8": {
"section-x": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this intended?

"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",
"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.",
Expand Down
56 changes: 56 additions & 0 deletions ui/src/components/accordion2.tsx
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like that this is just called accordion2. That is not a semantically useful name and I smell that there is probably already an accordion that could have been extended instead of adding another component with a not so descriptive name.

Copy link
Member

@ssandino ssandino Apr 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@renestalder yes, renaming to the standard name accordion is planned following the migration of the new design.

Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
'use client';

import * as AccordionPrimitive from '@radix-ui/react-accordion';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using the native <details> element with additional group closing handlers instead of adding a dependency on top that is probably already obsolete.

We benefit from using what is already there in HTML.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DarkMenacer thank you for considering this for a future PR.

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<typeof AccordionPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
>(({ className, ...props }, ref) => (
<AccordionPrimitive.Item ref={ref} className={cn('border-b', className)} {...props} />
));
AccordionItem.displayName = 'AccordionItem';

const AccordionTrigger = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Trigger>,
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
>(({ className, children, ...props }, ref) => (
<AccordionPrimitive.Header className="flex">
<AccordionPrimitive.Trigger
ref={ref}
className={cn(
'flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180',
className,
)}
{...props}
>
{children}
<ChevronDown className="bg-foreground h-5 w-5 shrink-0 rounded-full p-0.5 text-white transition-transform duration-200" />
</AccordionPrimitive.Trigger>
</AccordionPrimitive.Header>
));
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;

const AccordionContent = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
>(({ className, children, ...props }, ref) => (
<AccordionPrimitive.Content
ref={ref}
className={cn(
'data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm transition-all',
className,
)}
{...props}
>
<div className="pb-4 pt-0">{children}</div>
</AccordionPrimitive.Content>
));
AccordionContent.displayName = AccordionPrimitive.Content.displayName;

export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the export directly to the corresponding functions/const declarations. There is no benefit of collecting them at the end of the file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DarkMenacer thank you for considering this for a future PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is definitely fine as the code directly comes from https://ui.shadcn.com/docs/components/accordion and does not need to be changed apart from the tailwind styling...

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -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 (
<Card className="bg-primary w-96">
<CardHeader className="mb-1">
<Typography size="md" color="card" className="opacity-40">
{category}
</Typography>
<Typography size="md" weight="medium" color="card">
{title}
</Typography>
</CardHeader>
<CardContent className="mb-5 ml-4">
<ul className="list-disc text-white">
{points.map((point, key) => {
return (
<li key={key}>
<Typography color="card">{point.text}</Typography>
</li>
);
})}
</ul>
</CardContent>
</Card>
);
}
Loading
Loading