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

Add page about accessing Zarr #8

Merged
merged 4 commits into from
Oct 23, 2023
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
44 changes: 44 additions & 0 deletions components/section.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { Column, Button, Layout, Row } from '@carbonplan/components'
import { Left } from '@carbonplan/icons'

const Section = ({ children }) => {
return (
<Layout
title={'Datasets – CarbonPlan'}
description={'A catalog of datasets produced throughout our work.'}
links={'local'}
nav={'data'}
>
<Row>
<Column
start={[1, 1]}
width={[2]}
dr={1}
sx={{ mb: [-2, -4, 0, 0], mt: [3, 4, '109px', '154px'] }}
>
<Button
onClick={() => {
if (window.history.state?.idx) {
window.history.back()
} else {
window.location.href = '/data'
}
}}
inverted
size='xs'
prefix={<Left />}
sx={{ ml: ['-2px', '-2px', '-2px', '-2px'] }}
>
Back
</Button>
</Column>

<Column start={[1, 1, 3, 3]} width={6} sx={{ mt: '2px' }}>
{children}
</Column>
</Row>
</Layout>
)
}

export default Section
12 changes: 10 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
const isDev =
process.env.VERCEL_ENV === 'preview' || process.env.NODE_ENV === 'development'

module.exports = {
const withMDX = require('@next/mdx')({
extension: /\.mdx?$/,
options: {
format: 'mdx',
},
})

module.exports = withMDX({
pageExtensions: ['js', 'jsx', 'mdx', 'md'],
assetPrefix: isDev ? '' : 'https://data.carbonplan.org',
}
})
Loading
Loading