Path: blob/master/src/packages/next/components/landing/pitch.tsx
1450 views
/*1* This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import { Row, Col } from "antd";6import { ReactNode } from "react";78import A from "components/misc/A";9import Code from "./code";10import { CSS, Paragraph, Title } from "components/misc";11import { MAX_WIDTH_LANDING } from "lib/config";1213export const STYLE_PITCH: CSS = {14padding: "60px 15px",15backgroundColor: "white",16} as const;1718interface Props {19col1: ReactNode;20col2: ReactNode;21ext?: string;22style?: CSS;23title?: ReactNode;24}2526export default function Pitch(props: Props) {27const { col1, col2, ext, style, title } = props;28return (29<div style={{ ...STYLE_PITCH, ...style }}>30{title ? (31<Title level={2} style={{ textAlign: "center", ...style }}>32{title}33</Title>34) : undefined}35<Row36gutter={20}37style={{ maxWidth: MAX_WIDTH_LANDING, margin: "0 auto" }}38>39<Col lg={12}>{col1}</Col>40<Col lg={12}>{col2}</Col>41</Row>42{ext && <CallToAction ext={ext} />}43</div>44);45}4647const STYLE_CALL: CSS = {48textAlign: "center",49padding: "30px 0",50fontSize: "14pt",51} as const;5253function CallToAction(props: { ext: string }) {54const { ext } = props;55return (56<Paragraph style={STYLE_CALL}>57<strong>Ready out of the box</strong>:{" "}58<A href="https://doc.cocalc.com/getting-started.html">59Sign up, create a project60</A>61, create or <A href="https://doc.cocalc.com/howto/upload.html">upload</A>{" "}62your {ext && <Code>*.{ext}</Code>} file, and you're ready to go!63</Paragraph>64);65}666768