Path: blob/master/src/packages/next/components/landing/pitch.tsx
5894 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" }}38align="top"39>40<Col lg={12}>{col1}</Col>41<Col lg={12}>{col2}</Col>42</Row>43{ext && <CallToAction ext={ext} />}44</div>45);46}4748const STYLE_CALL: CSS = {49textAlign: "center",50padding: "30px 0",51fontSize: "14pt",52} as const;5354function CallToAction(props: { ext: string }) {55const { ext } = props;56return (57<Paragraph style={STYLE_CALL}>58<strong>Ready out of the box</strong>:{" "}59<A href="https://doc.cocalc.com/getting-started.html">60Sign up, create a project61</A>62, create or <A href="https://doc.cocalc.com/howto/upload.html">upload</A>{" "}63your {ext && <Code>*.{ext}</Code>} file, and you're ready to go!64</Paragraph>65);66}676869