CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/components/landing/available-tools.tsx
Views: 687
1
/*
2
* This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import { Col, Row } from "antd";
7
import { ReactNode } from "react";
8
9
import { Icon, IconName } from "@cocalc/frontend/components/icon";
10
import Image from "components/landing/image";
11
import LaTeX from "components/landing/latex";
12
import { CSS, Paragraph, Title } from "components/misc";
13
import A from "components/misc/A";
14
import latexLogo from "public/features/latex-logo.svg";
15
import linuxLogo from "public/features/linux-logo.svg";
16
import sticker from "public/features/sage-sticker-1x1_inch-small.png";
17
import Info from "./info";
18
import JupyterLogo from "/public/features/jupyter-logo.svg";
19
import { LANDING_HEADER_LEVEL } from "./constants";
20
21
interface Props {
22
style?: React.CSSProperties;
23
}
24
25
export function AvailableTools(props: Props) {
26
const { style } = props;
27
28
return (
29
<Info
30
level={LANDING_HEADER_LEVEL}
31
title="Jupyter, SageMath, LaTeX, and Linux"
32
icon="wrench"
33
anchor="available-tools"
34
style={{ ...style }}
35
>
36
<Row>
37
<Col lg={6}>
38
<Tool
39
image={JupyterLogo}
40
href="/features/jupyter-notebook"
41
title="Jupyter Notebooks"
42
alt="Jupyter logo"
43
>
44
CoCalc's own{" "}
45
<A href="/features/jupyter-notebook">Jupyter Notebook</A>{" "}
46
implementation offers realtime synchronization, TimeTravel,
47
automatic grading, side chat, and more.
48
</Tool>
49
</Col>
50
<Col lg={6}>
51
<Tool
52
image={sticker}
53
href="https://doc.cocalc.com/sagews.html"
54
title="Sage Worksheets"
55
alt="SageMath sticker logo"
56
>
57
<A href="https://doc.cocalc.com/sagews.html">Sage Worksheets</A> are
58
similar to Jupyter Notebooks, but made to work well with{" "}
59
<A href="https://www.sagemath.org">SageMath</A>. They offer a
60
single-document model that scales to large documents and integrated
61
3d graphics.
62
</Tool>
63
</Col>
64
<Col lg={6}>
65
<Tool
66
image={latexLogo}
67
href="/features/latex-editor"
68
alt="LaTeX Logo"
69
title={
70
<>
71
<LaTeX /> Editor
72
</>
73
}
74
>
75
A full{" "}
76
<A href="/features/latex-editor">
77
<LaTeX />
78
editor
79
</A>{" "}
80
supporting preview rendering, forward/inverse search, error
81
reporting, and{" "}
82
<A href="https://doc.cocalc.com/latex.html">much more</A>.
83
</Tool>
84
</Col>
85
<Col lg={6}>
86
<Tool
87
image={linuxLogo}
88
href="/features/terminal"
89
title="Linux Terminal"
90
alt="Tux Linux Penguin"
91
>
92
The very sophisticated collaborative{" "}
93
<A href={"/features/linux"}>Linux</A> Terminal makes you incredibly
94
productive. Many programming languages and hundreds of tools are
95
available at your fingertips in a{" "}
96
<A href="/features/linux">full Ubuntu Linux environment</A>.
97
</Tool>
98
</Col>
99
</Row>
100
</Info>
101
);
102
}
103
104
interface ToolProps {
105
image?;
106
alt: string;
107
href: string;
108
title: ReactNode;
109
children: ReactNode;
110
icon?: IconName;
111
size?: number;
112
style?: CSS;
113
textStyle?: CSS;
114
}
115
116
export function Tool(props: ToolProps) {
117
const {
118
size = 75,
119
image,
120
alt,
121
href,
122
title,
123
children,
124
icon,
125
style,
126
textStyle,
127
} = props;
128
129
return (
130
<div style={{ padding: "15px" }}>
131
<div
132
style={{
133
textAlign: "center",
134
marginBottom: "15px",
135
height: "100px",
136
display: "flex",
137
flexDirection: "column",
138
justifyContent: "center",
139
...style,
140
}}
141
>
142
<A href={href}>
143
{image ? (
144
<Image
145
style={{ width: "75px", margin: "auto", ...textStyle }}
146
src={image}
147
alt={alt}
148
/>
149
) : (
150
<Icon
151
name={icon}
152
style={{ color: "black", fontSize: `${size}px`, ...textStyle }}
153
/>
154
)}
155
</A>
156
</div>
157
<Title level={3} style={{ textAlign: "center" }}>
158
<A href={href} style={{ ...textStyle }}>
159
{title}
160
</A>
161
</Title>
162
<Paragraph style={{ ...textStyle }}>{children}</Paragraph>
163
</div>
164
);
165
}
166
167