Skip to content

Commit acd1b07

Browse files
authored
Merge pull request #8606 from sagemathinc/latex-landing-page-20251003
Refresh Latex Landing Page
2 parents 80cfb93 + 4f1ec2d commit acd1b07

27 files changed

+451
-226
lines changed

src/packages/frontend/account/dark-mode.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ import { AccountStore } from "./store";
1010

1111
export const DARK_MODE_KEYS = ["brightness", "contrast", "sepia"] as const;
1212

13-
// Icon unicode character for dark mode toggle (◑ - circle with right half black)
14-
export const DARK_MODE_ICON = 0x25d1;
15-
1613
type Config = Record<(typeof DARK_MODE_KEYS)[number], number>;
1714

1815
export const DARK_MODE_MINS: Config = {

src/packages/frontend/account/other-settings.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
*/
55

66
import { Button, Card, Slider } from "antd";
7-
import { debounce } from "lodash";
87
import { Map } from "immutable";
8+
import { debounce } from "lodash";
99
import { useMemo } from "react";
10-
import { defineMessages, FormattedMessage, useIntl } from "react-intl";
10+
import { FormattedMessage, defineMessages, useIntl } from "react-intl";
1111

1212
import { Checkbox, Panel } from "@cocalc/frontend/antd-bootstrap";
1313
import { Rendered, redux, useTypedRedux } from "@cocalc/frontend/app-framework";
@@ -41,15 +41,15 @@ import {
4141
import { NewFilenameFamilies } from "@cocalc/frontend/project/utils";
4242
import track from "@cocalc/frontend/user-tracking";
4343
import { webapp_client } from "@cocalc/frontend/webapp-client";
44+
import { DARK_MODE_ICON } from "@cocalc/util/consts/ui";
4445
import { DEFAULT_NEW_FILENAMES, NEW_FILENAMES } from "@cocalc/util/db-schema";
46+
import { DARK_MODE_DEFAULTS } from "@cocalc/util/db-schema/accounts";
4547
import { OTHER_SETTINGS_REPLY_ENGLISH_KEY } from "@cocalc/util/i18n/const";
4648
import {
47-
DARK_MODE_ICON,
4849
DARK_MODE_KEYS,
4950
DARK_MODE_MINS,
5051
get_dark_mode_config,
5152
} from "./dark-mode";
52-
import { DARK_MODE_DEFAULTS } from "@cocalc/util/db-schema/accounts";
5353
import { I18NSelector, I18N_MESSAGE, I18N_TITLE } from "./i18n-selector";
5454
import Messages from "./messages";
5555
import Tours from "./tours";

src/packages/frontend/frame-editors/frame-tree/commands/generic-commands.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { debounce } from "lodash";
1010
import { useEffect, useRef } from "react";
1111
import { defineMessage, IntlShape, useIntl } from "react-intl";
1212

13-
import { DARK_MODE_ICON } from "@cocalc/frontend/account/dark-mode";
1413
import { set_account_table } from "@cocalc/frontend/account/util";
1514
import { redux } from "@cocalc/frontend/app-framework";
1615
import { Icon } from "@cocalc/frontend/components";
@@ -30,6 +29,7 @@ import { isSupportedExtension } from "@cocalc/frontend/project/page/home-page/ai
3029
import { AI_GENERATE_DOC_TAG } from "@cocalc/frontend/project/page/home-page/ai-generate-utils";
3130
import openSupportTab from "@cocalc/frontend/support/open";
3231
import userTracking from "@cocalc/frontend/user-tracking";
32+
import { DARK_MODE_ICON } from "@cocalc/util/consts/ui";
3333
import { filename_extension } from "@cocalc/util/misc";
3434
import { addCommands } from "./commands";
3535
import { SEARCH_COMMANDS } from "./const";

src/packages/frontend/frame-editors/latex-editor/output-control-build.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ import type { MenuProps } from "antd";
1212
import { Dropdown } from "antd";
1313
import { useIntl } from "react-intl";
1414

15-
import { Button as BSButton } from "@cocalc/frontend/antd-bootstrap";
16-
import { DARK_MODE_ICON } from "@cocalc/frontend/account/dark-mode";
1715
import { set_account_table } from "@cocalc/frontend/account/util";
16+
import { Button as BSButton } from "@cocalc/frontend/antd-bootstrap";
1817
import { useRedux, useTypedRedux } from "@cocalc/frontend/app-framework";
1918
import { Icon } from "@cocalc/frontend/components";
2019
import { COMMANDS } from "@cocalc/frontend/frame-editors/frame-tree/commands";
@@ -24,6 +23,7 @@ import {
2423
BUILD_ON_SAVE_LABEL,
2524
} from "@cocalc/frontend/frame-editors/frame-tree/commands/generic-commands";
2625
import { editor, IntlMessage } from "@cocalc/frontend/i18n";
26+
import { DARK_MODE_ICON } from "@cocalc/util/consts/ui";
2727

2828
import { Actions } from "./actions";
2929

src/packages/next/components/landing/collaboration.tsx

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,38 +10,49 @@ import Info from "./info";
1010

1111
interface Props {
1212
image: StaticImageData;
13+
alt?: string;
14+
children?: React.ReactNode;
1315
}
1416

1517
export default function Collaboration(props: Props) {
16-
const { image } = props;
18+
const {
19+
image,
20+
alt = "Editing a document in two browser windows",
21+
children,
22+
} = props;
1723
return (
1824
<Info
1925
anchor="a-realtimesync"
2026
icon="users"
2127
title="Collaborative editing without limits"
2228
image={image}
23-
alt="Editing a document in two browser windows"
29+
alt={alt}
2430
>
25-
<Paragraph>
26-
Privately share your project with{" "}
27-
<A href="https://doc.cocalc.com/project-settings.html#about-collaborators">
28-
<strong>an unlimited number of collaborators</strong>
29-
</A>
30-
. Simultaneous modifications of your document are{" "}
31-
<strong>synchronized in real time</strong>. You see the cursors of
32-
others while they edit the document and also see the presence of
33-
watching collaborators.
34-
</Paragraph>
31+
{children ?? (
32+
<>
33+
<Paragraph>
34+
Privately share your project with{" "}
35+
<A href="https://doc.cocalc.com/project-settings.html#about-collaborators">
36+
<strong>an unlimited number of collaborators</strong>
37+
</A>
38+
. Simultaneous modifications of your document are{" "}
39+
<strong>synchronized in real time</strong>. You see the cursors of
40+
others while they edit the document and also see the presence of
41+
watching collaborators.
42+
</Paragraph>
3543

36-
<Paragraph>
37-
Additionally, any compilation status and output is synchronized between
38-
everyone, because everything runs online and is fully managed by CoCalc.
39-
</Paragraph>
44+
<Paragraph>
45+
Additionally, any compilation status and output is synchronized
46+
between everyone, because everything runs online and is fully
47+
managed by CoCalc.
48+
</Paragraph>
4049

41-
<Paragraph>
42-
This ensures that everyone involved experiences editing the document in
43-
exactly the same way.
44-
</Paragraph>
50+
<Paragraph>
51+
This ensures that everyone involved experiences editing the document
52+
in exactly the same way.
53+
</Paragraph>
54+
</>
55+
)}
4556
</Info>
4657
);
4758
}

src/packages/next/components/landing/compare.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,21 @@
312312
"authorea": true,
313313
"papeeria": false
314314
},
315+
{
316+
"feature": "AI Formula Assistant",
317+
"cocalc": {
318+
"type": true,
319+
"note": "Generate LaTeX formulas from natural language descriptions using AI",
320+
"link": "https://cocalc.com/features/latex-editor#a-ai-formula"
321+
},
322+
"overleaf": {
323+
"type": true,
324+
"note": "AI Assist add-on generates equations from prompts or images (paid feature with limited free uses)",
325+
"link": "https://www.overleaf.com/learn/how-to/AI_Assist"
326+
},
327+
"authorea": false,
328+
"papeeria": false
329+
},
315330
{
316331
"feature": "Bibliography",
317332
"cocalc": {

src/packages/next/components/landing/content.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ export default function Content(props: Props) {
188188
<Row
189189
gutter={[20, 30]}
190190
style={{
191-
paddingTop: "12px",
191+
paddingTop: "50px",
192+
paddingBottom: "50px",
192193
maxWidth: MAX_WIDTH_LANDING,
193194
marginTop: "0",
194195
marginBottom: "0",

src/packages/next/components/landing/info.tsx

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ interface Props {
2323
belowWide?: boolean;
2424
caption?: ReactNode;
2525
children: ReactNode;
26-
icon?: IconName;
26+
icon?: IconName | JSX.Element;
2727
image?: string | StaticImageData;
2828
imageComponent?: ReactNode; // if set, this replaces the image!
2929
level?: TitleProps["level"];
@@ -130,9 +130,9 @@ export default function Info({
130130
...textStyle,
131131
}}
132132
>
133-
{icon && (
133+
{icon != null && (
134134
<span style={{ fontSize: "24pt", marginRight: "5px" }}>
135-
<Icon name={icon} />{" "}
135+
{typeof icon === "string" ? <Icon name={icon} /> : icon}{" "}
136136
</span>
137137
)}
138138
{title}
@@ -310,10 +310,20 @@ interface HeadingProps {
310310
style?: CSSProperties;
311311
textStyle?: CSSProperties;
312312
level?: TitleProps["level"];
313+
anchor?: string;
314+
icon?: IconName | JSX.Element;
313315
}
314316

315317
Info.Heading = (props: HeadingProps) => {
316-
const { level = 1, children, description, style, textStyle } = props;
318+
const {
319+
level = 1,
320+
children,
321+
description,
322+
style,
323+
textStyle,
324+
anchor,
325+
icon,
326+
} = props;
317327
return (
318328
<div
319329
style={{
@@ -327,13 +337,19 @@ Info.Heading = (props: HeadingProps) => {
327337
>
328338
<Title
329339
level={level}
340+
id={anchor}
330341
style={{
331342
color: COLORS.GRAY_D,
332343
maxWidth: MAX_WIDTH_LANDING,
333-
margin: "0 auto",
344+
margin: "0 auto 20px auto",
334345
...textStyle,
335346
}}
336347
>
348+
{icon != null && (
349+
<span style={{ fontSize: "24pt", marginRight: "5px" }}>
350+
{typeof icon === "string" ? <Icon name={icon} /> : icon}{" "}
351+
</span>
352+
)}
337353
{children}
338354
</Title>
339355
{description && (

src/packages/next/components/landing/pitch.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export default function Pitch(props: Props) {
3636
<Row
3737
gutter={20}
3838
style={{ maxWidth: MAX_WIDTH_LANDING, margin: "0 auto" }}
39+
align="top"
3940
>
4041
<Col lg={12}>{col1}</Col>
4142
<Col lg={12}>{col2}</Col>

src/packages/next/pages/features/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import apiScreenshot from "/public/features/api-screenshot.png";
2222
import ChatGptInChatroom from "/public/features/chatgpt-fix-code.png";
2323
import teachingScreenshot from "/public/features/cocalc-course-assignments-2019.png";
2424
import JupyterTF from "/public/features/cocalc-jupyter2-20170508.png";
25-
import LatexEditorImage from "/public/features/cocalc-latex-editor-2019.png";
25+
import LatexEditorImage from "public/features/latex-editor-main-20251003.png";
2626
import octaveJupyter from "/public/features/cocalc-octave-jupyter-20200511.png";
2727
import RJupyter from "/public/features/cocalc-r-jupyter.png";
2828
import linuxShellScript from "/public/features/cocalc-shell-script-run.png";

0 commit comments

Comments
 (0)