Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/next/lib/styles/layouts.tsx
Views: 687
/*1* This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import { Col, Row } from "antd";67import { Icon } from "@cocalc/frontend/components/icon";8import { COLORS } from "@cocalc/util/theme";9import { CSS, Paragraph, Title } from "components/misc";10import A from "components/misc/A";1112const gridProps = { sm: 24, md: 12 } as const;1314export const OVERVIEW_STYLE: React.CSSProperties = {15textAlign: "center",16width: "75%",17margin: "0px auto 0px auto",18} as const;1920export const OVERVIEW_LARGE_ICON: React.CSSProperties = {21fontSize: "100px",22color: COLORS.COCALC_BLUE,23borderRadius: "50%",24backgroundColor: COLORS.COCALC_ORANGE,25border: `15px solid ${COLORS.COCALC_BLUE}`,26padding: "20px 20px 15px 15px",27display: "inline-block",28margin: "30px 0px 40px 0px",29boxShadow: "0px 2px 10px 2px",30} as const;3132// variation of the above, since some icons need more margin33export const OVERVIEW_LARGE_ICON_MARGIN: React.CSSProperties = {34...OVERVIEW_LARGE_ICON,35padding: "23px 20px 20px 20px",36fontSize: "80px",37} as const;3839const ICON_SIZE = "50px";40const ICON_STYLE: CSS = { fontSize: ICON_SIZE, fontWeight: "bold" } as const;4142export function Product({43icon,44icon2,45title,46href,47children,48external,49}: {50icon;51icon2?;52title;53href;54children;55external?;56}) {57function renderIcon2() {58if (!icon2) return null;59return (60<>61<span62style={{63fontSize: "30px",64paddingLeft: "10px",65paddingRight: "10px",66}}67>68/69</span>70<Icon style={ICON_STYLE} name={icon2} />71</>72);73}7475return (76<Col {...gridProps}>77{/* display: flex to avoid line breaks if there are 2 icons */}78<A79href={href}80external={external}81style={{82display: "flex",83justifyContent: "center",84alignItems: "center",85marginBottom: "10px",86}}87>88<Icon style={ICON_STYLE} name={icon} />89{renderIcon2()}90</A>91<Title92level={2}93style={{ fontSize: "25px", marginBottom: "15px", marginTop: "15px" }}94>95<A href={href} external={external}>96{title}97</A>98</Title>99<Paragraph>{children}</Paragraph>100</Col>101);102}103104export function OverviewRow({ children }) {105return (106<Row gutter={[25, 50]} style={{ marginTop: "30px", marginBottom: "60px" }}>107{children}108</Row>109);110}111112113