-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Clément Prod'homme <[email protected]>
- Loading branch information
1 parent
beacdf8
commit 72ca99d
Showing
88 changed files
with
8,877 additions
and
3,620 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
"extends": ["plugin:prettier/recommended", "next/core-web-vitals"], | ||
"rules": { | ||
"@next/next/no-img-element": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
/node_modules | ||
/.pnp | ||
.pnp.js | ||
.yarn | ||
|
||
# testing | ||
/coverage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v20.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const config = { | ||
semi: true, | ||
tabWidth: 2, | ||
trailingComma: 'all', | ||
printWidth: 100, | ||
singleQuote: true, | ||
plugins: ['prettier-plugin-tailwindcss'], | ||
}; | ||
|
||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,33 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
output: "export", | ||
webpack(config) { | ||
config.module.rules.push({ | ||
test: /\.svg$/, | ||
use: [ | ||
{ | ||
loader: "svg-sprite-loader", | ||
}, | ||
{ | ||
loader: "svgo-loader", | ||
options: { | ||
plugins: [ | ||
{ | ||
name: "preset-default", | ||
params: { | ||
overrides: { | ||
convertColors: { shorthex: false }, | ||
convertPathData: false, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
}); | ||
return config; | ||
}, | ||
}; | ||
|
||
module.exports = nextConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lab.mongabay.com |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,25 @@ | ||
import Intro from "@/containers/intro"; | ||
import Blog from '@/containers/blog'; | ||
import Footer from '@/containers/footer'; | ||
import Header from '@/containers/header'; | ||
import Intro from '@/containers/intro'; | ||
import Partners from '@/containers/partners'; | ||
import Tools from '@/containers/tools'; | ||
|
||
export default function Home() { | ||
export const metadata = { | ||
title: 'Data Journalism Tools', | ||
description: | ||
'A suite of no-code vizualization tools designed for journalists to create stories backed by reliable data sources.', | ||
}; | ||
|
||
export default async function Home() { | ||
return ( | ||
<main className="min-h-screen bg-white"> | ||
<main className="max-w-[100vw] overflow-x-hidden bg-white"> | ||
<Header /> | ||
<Intro /> | ||
|
||
<div className="h-[500vh]"></div> | ||
<Tools /> | ||
<Blog /> | ||
<Partners /> | ||
<Footer /> | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react'; | ||
import cx from 'classnames'; | ||
|
||
const BUTTON_TYPE = { | ||
PRIMARY: 'bg-primary', | ||
SECONDARY: 'bg-secondary', | ||
}; | ||
|
||
type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {}; | ||
type AnchorProps = AnchorHTMLAttributes<HTMLAnchorElement> & {}; | ||
|
||
const Button = ({ children, className, ...props }: ButtonProps | AnchorProps) => { | ||
const buttonProps = props as ButtonProps; | ||
const aProps = props as AnchorProps; | ||
|
||
const c = cx( | ||
'inline-block rounded-3xl px-5 py-2.5 focus-visible:outline-primary-green focus-visible:outline-offset-4', | ||
className, | ||
buttonProps.disabled ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer', | ||
); | ||
|
||
if (aProps.href) { | ||
return ( | ||
<a href={aProps.href} className={c} target="_blank" rel="noopener noreferrer" {...aProps}> | ||
{children} | ||
</a> | ||
); | ||
} | ||
|
||
return ( | ||
<button type="button" className={c} {...buttonProps}> | ||
{children} | ||
</button> | ||
); | ||
}; | ||
|
||
export default Button; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import cx from 'classnames'; | ||
import { CSSProperties } from 'react'; | ||
|
||
interface BrowserSpriteSymbol { | ||
id: string; | ||
viewBox: string; | ||
content: string; | ||
node: SVGSymbolElement; | ||
} | ||
|
||
export interface IconProps { | ||
icon?: | ||
| { | ||
id: string; | ||
viewBox: string; | ||
} | ||
| BrowserSpriteSymbol; | ||
className?: string; | ||
style?: CSSProperties; | ||
} | ||
|
||
const Icon = ({ icon, className, style }: IconProps) => ( | ||
<svg | ||
className={cx({ | ||
'fill-current': true, | ||
[className as string]: !!className, | ||
})} | ||
viewBox={icon?.viewBox || '0 0 32 32'} | ||
style={style} | ||
> | ||
<use xlinkHref={`#${icon?.id}`} /> | ||
</svg> | ||
); | ||
|
||
export default Icon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import * as Dialog from '@radix-ui/react-dialog'; | ||
import Icon from '../icon'; | ||
import XIcon from '@/styles/icons/x.svg?sprite'; | ||
import cx from 'classnames'; | ||
|
||
type ModalProps = { | ||
title?: string; | ||
children?: React.ReactNode; | ||
open?: boolean; | ||
onOpenChange?: (open: boolean) => void; | ||
size?: 'sm' | 'md' | 'lg' | 'full'; | ||
className?: string; | ||
}; | ||
|
||
const Modal = ({ | ||
title = '', | ||
children, | ||
open = false, | ||
onOpenChange, | ||
className, | ||
size = 'md', | ||
}: ModalProps) => ( | ||
<Dialog.Root open={open} onOpenChange={onOpenChange}> | ||
<Dialog.Portal> | ||
<Dialog.Overlay className="DialogOverlay" /> | ||
<Dialog.Content | ||
className={cx('transition-opacity duration-300', className, { | ||
'fixed left-0 top-0 flex h-screen w-screen flex-col': size === 'full', | ||
})} | ||
> | ||
<Dialog.Title className="DialogTitle sr-only">{title}</Dialog.Title> | ||
<Dialog.Content className="container !pointer-events-auto relative h-full overflow-y-auto py-14 focus-visible:outline-none"> | ||
<Dialog.Close asChild> | ||
<button | ||
className="absolute right-9 top-9 flex h-8 w-8 items-center justify-center rounded-full bg-white hover:opacity-70" | ||
aria-label="Close" | ||
> | ||
<Icon className="h-5 w-5 fill-dark-gray" icon={XIcon} /> | ||
</button> | ||
</Dialog.Close> | ||
{children} | ||
</Dialog.Content> | ||
</Dialog.Content> | ||
</Dialog.Portal> | ||
</Dialog.Root> | ||
); | ||
|
||
export default Modal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import SatelliteIcon from '@/styles/icons/satellite.svg?sprite'; | ||
import FireIcon from '@/styles/icons/fire.svg?sprite'; | ||
import ReforestationIcon from '@/styles/icons/reforestation.svg?sprite'; | ||
import SupplyIcon from '@/styles/icons/supply.svg?sprite'; | ||
|
||
export const COLORS = ['#03755E', '#184B95', '#A01200', '#7E56D8']; | ||
|
||
export const TOOLS = [ | ||
{ | ||
id: 'satellite', | ||
title: 'Satellite', | ||
description: | ||
'Seeing patterns of planetary change is profound. Combine environmental, social, and satellite data aggregated from various reputable sources to create maps that add evidence and context to articles quickly.', | ||
color: COLORS[1], | ||
image: '/images/tools/satellite.png', | ||
imageWidth: 596, | ||
imageHeight: 522, | ||
name: 'Satellite Tool', | ||
url: 'https://maps.mongabay.com', | ||
icon: SatelliteIcon, | ||
}, | ||
{ | ||
id: 'fire', | ||
title: 'Fire Drought', | ||
description: | ||
'Find shared stories of climate impact. Reveal and compare the annual cycles of fire on land and water in the atmosphere at national and sub-national scales.', | ||
color: COLORS[2], | ||
image: '/images/tools/fire-drought-data.png', | ||
imageWidth: 596, | ||
imageHeight: 482, | ||
name: 'Fire Drought', | ||
url: 'https://charts.mongabay.com', | ||
icon: FireIcon, | ||
}, | ||
{ | ||
id: 'reforestation', | ||
title: 'Reforestation App', | ||
description: | ||
'Mongabay’s global directory of reforestation and tree-planting projects is a starting point for people wanting to learn how to support reforestation.', | ||
color: COLORS[0], | ||
image: '/images/tools/reforestation-app.png', | ||
imageWidth: 662, | ||
imageHeight: 454, | ||
name: 'Reforestation App', | ||
url: 'https://reforestation.app', | ||
icon: ReforestationIcon, | ||
}, | ||
{ | ||
id: 'supply', | ||
title: 'Supply Chain', | ||
description: | ||
'Agricultural commodities move globally and cause deforestation. Find, follow, and create maps of their trail with data from Trase.earth.', | ||
color: COLORS[3], | ||
image: '/images/tools/supply-chain.png', | ||
imageWidth: 596, | ||
imageHeight: 476, | ||
name: 'Supply Chain', | ||
url: 'https://chains.mongabay.com', | ||
icon: SupplyIcon, | ||
}, | ||
]; |
Oops, something went wrong.