-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathdesktop.js
67 lines (60 loc) · 2.25 KB
/
desktop.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// @flow
import * as React from "react";
import { Hero } from "@components/hero";
import { Type } from "@components/typography";
import { ContentSection, ContentSections } from "@components/content-section";
import { Button, Buttons } from "@components/button";
import { Video } from "@components/video";
import { detectPlatform, getDownloadUrl } from "@lib";
import { DownloadFeaturette } from "@components/download-buttons";
import { CutoffImage } from "@components/cutoff-image";
import Layout from "@components/layout";
import type { Context } from "next";
class Atom extends React.Component<OSProps> {
static async getInitialProps(ctx: Context): Promise<OSProps> {
const platform = detectPlatform(ctx);
const assetUrl = await getDownloadUrl(platform);
return { platform, assetUrl };
}
render() {
return (
<Layout>
<Hero color="rgb(36, 77, 100)">
<Hero.Pane padding="0 20px 0 0">
<Hero.Title>Notebooks on your desktop</Hero.Title>
<Type.p>
Write code, prose, and embed interactive plots to tell powerful
narratives. Explore computing creatively. All the power of Jupyter
notebooks, wrapped in native desktop goodness.
</Type.p>
{/* Call to Action */}
<DownloadFeaturette
platform={this.props.platform}
assetUrl={this.props.assetUrl}
/>
</Hero.Pane>
<Hero.Pane visual padding="40px 0 0 0">
<CutoffImage
src="https://cloud.githubusercontent.com/assets/836375/18421299/d95ad398-783b-11e6-8b23-d54cf7caad1e.png"
alt="Desktop Notebooks hero image"
/>
</Hero.Pane>
</Hero>
<ContentSections>
<ContentSection>
<ContentSection.Pane>
<ContentSection.Title>Double Click</ContentSection.Title>
<Type.p>
Open notebooks natively on Mac, Windows, and Linux
</Type.p>
</ContentSection.Pane>
<ContentSection.Pane visual>
<Video mp4="/static/double-click-notebook.mp4" />
</ContentSection.Pane>
</ContentSection>
</ContentSections>
</Layout>
);
}
}
export default Atom;