"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getServerSideProps = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const antd_1 = require("antd");
const footer_1 = __importDefault(require("components/landing/footer"));
const header_1 = __importDefault(require("components/landing/header"));
const content_1 = __importDefault(require("components/landing/content"));
const with_customize_1 = __importDefault(require("lib/with-customize"));
const customize_1 = require("lib/customize");
const A_1 = __importDefault(require("components/misc/A"));
const sign_in_1 = __importDefault(require("components/landing/sign-in"));
const info_1 = __importDefault(require("components/landing/info"));
const code_1 = __importDefault(require("components/landing/code"));
const head_1 = __importDefault(require("components/landing/head"));
const snapshots_1 = __importDefault(require("components/landing/snapshots"));
const linux_1 = require("./linux");
const compare_1 = __importDefault(require("components/landing/compare"));
const icon_1 = require("@cocalc/frontend/components/icon");
const component = "a Linux Terminal";
const title = `Online Linux Terminal`;
const terminal_png_1 = __importDefault(require("/public/features/terminal.png"));
const linux_logo_svg_1 = __importDefault(require("/public/features/linux-logo.svg"));
const cocalc_terminal_collab_gif_1 = __importDefault(require("/public/features/cocalc-terminal-collab.gif"));
const cocalc_shell_script_run_png_1 = __importDefault(require("/public/features/cocalc-shell-script-run.png"));
const terminal_software_png_1 = __importDefault(require("/public/features/terminal-software.png"));
function Terminal({ customize }) {
    return ((0, jsx_runtime_1.jsxs)(customize_1.Customize, { value: customize, children: [(0, jsx_runtime_1.jsx)(head_1.default, { title: title }), (0, jsx_runtime_1.jsxs)(antd_1.Layout, { children: [(0, jsx_runtime_1.jsx)(header_1.default, { page: "features", subPage: "terminal" }), (0, jsx_runtime_1.jsxs)(antd_1.Layout.Content, { children: [(0, jsx_runtime_1.jsx)("div", { style: { backgroundColor: "#c7d9f5" }, children: (0, jsx_runtime_1.jsx)(content_1.default, { startup: component, logo: linux_logo_svg_1.default, title: title, subtitle: "A Linux Terminal that can't mess up your own computer.", subtitleBelow: true, image: terminal_png_1.default, alt: "Running Sage in a Terminal" }) }), (0, jsx_runtime_1.jsx)(linux_1.FullLinuxTerminal, {}), (0, jsx_runtime_1.jsx)(sign_in_1.default, { startup: component }), (0, jsx_runtime_1.jsx)(info_1.default.Heading, { description: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["There are many ways to use ", component, " online via CoCalc."] }), children: "Feature Overview" }), (0, jsx_runtime_1.jsxs)(info_1.default, { title: "Realtime collaboration", icon: "users", image: cocalc_terminal_collab_gif_1.default, anchor: "a-realtimecollab", alt: "Video showing synchronized terminals", wide: true, children: [(0, jsx_runtime_1.jsx)("p", { children: "The same terminal can be opened by two or more users. Both see the same view, which adaptively resizes to a common size." }), (0, jsx_runtime_1.jsxs)("p", { children: ["Additionally, open a", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://doc.cocalc.com/chat.html", children: "side chat" }), " panel to exchange thoughts and ideas."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["This is ideal for getting advice by a colleague or", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://doc.cocalc.com/teaching-interactions.html", children: "helping a student of yours" }), "."] })] }), (0, jsx_runtime_1.jsxs)(info_1.default, { title: "Run Bash, Python, R, etc.", icon: "r", image: cocalc_shell_script_run_png_1.default, anchor: "a-shell-script", alt: "Screenshot of editing and running a shell script", caption: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Bash ", (0, jsx_runtime_1.jsx)(code_1.default, { children: "script.sh" }), " file (left),", " ", (0, jsx_runtime_1.jsx)(code_1.default, { children: "bash -f script.sh" }), " to run (right)"] }), children: [(0, jsx_runtime_1.jsxs)("p", { children: ["CoCalc's", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://doc.cocalc.com/frame-editor.html", children: "frame editor" }), " ", "supports ", (0, jsx_runtime_1.jsx)("strong", { children: "editing script files" }), " side-by-side with a", " ", (0, jsx_runtime_1.jsx)("strong", { children: (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://doc.cocalc.com/terminal.html", children: "terminal" }) }), "."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["To get started, create a file with a suitable ending, e.g.", " ", (0, jsx_runtime_1.jsx)(code_1.default, { children: ".py" }), ", ", (0, jsx_runtime_1.jsx)(code_1.default, { children: ".sh" }), ", ", (0, jsx_runtime_1.jsx)(code_1.default, { children: ".r" }), ", ... Then open that file (via ", (0, jsx_runtime_1.jsx)(code_1.default, { children: "open filename.ext" }), ") and you can edit it with ", (0, jsx_runtime_1.jsx)("strong", { children: "syntax highlighting" }), ". Finally, split the frame and select the Terminal, like you can see it in the screenshot. Execute ", (0, jsx_runtime_1.jsx)(code_1.default, { children: "python3 script.py" }), ",", " ", (0, jsx_runtime_1.jsx)(code_1.default, { children: "bash -f script.sh" }), ", ... to run it.", " "] })] }), (0, jsx_runtime_1.jsxs)(info_1.default, { title: "Comprehensive software stack", icon: "server", image: terminal_software_png_1.default, anchor: "a-stack", alt: "Terminals software", caption: "Linux Terminals using vim, emacs, clang, mysql, cpp, maxim and zsh!", wide: true, children: [(0, jsx_runtime_1.jsxs)("p", { children: ["Many ", (0, jsx_runtime_1.jsx)("strong", { children: "popular applications" }), " are included in CoCalc:", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://git-scm.com/", children: "Git" }), " to interact with", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://www.github.com", children: "GitHub" }), ",", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://www.vim.org/", children: "VIM" }), ",", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://www.gnu.org/software/emacs/", children: "Emacs" }), ", various programming shells like ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://ipython.org/", children: "IPython" }), ", ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://www.r-project.org/", children: "R" }), ",", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://www.gnu.org/software/octave/index", children: "Octave" }), " and", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://www.sagemath.org/", children: "SageMath" }), "."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["There is also support for many programming languages and compilers. ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "/features/python", children: "Python" }), ", JAVA, C/C++ via", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://gcc.gnu.org/", children: "GCC" }), " and", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://clang.llvm.org/", children: "Clang" }), ",", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://ziglang.org/", children: "Zig" }), ",", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://en.wikipedia.org/wiki/Ada_(programming_language)", children: "Ada" }), ",", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://en.wikipedia.org/wiki/Haskell_(programming_language)", children: "Haskell" }), ", ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://en.wikipedia.org/wiki/Smalltalk", children: "Smalltalk" }), ",", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://www.rust-lang.org/", children: "Rust" }), " and many more."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["Look at our", " ", (0, jsx_runtime_1.jsx)("strong", { children: (0, jsx_runtime_1.jsx)(A_1.default, { href: "/software/executables", children: "list of executables" }) }), " ", "to check what is available!", " "] })] }), (0, jsx_runtime_1.jsx)(snapshots_1.default, {}), (0, jsx_runtime_1.jsx)(compare_1.default, { name: "terminal", disclaimer: true, title: (0, jsx_runtime_1.jsxs)("h2", { style: { textAlign: "center" }, children: [(0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "bolt" }), " Terminals in CoCalc versus the competition"] }) }), (0, jsx_runtime_1.jsx)(sign_in_1.default, { startup: component })] }), (0, jsx_runtime_1.jsx)(footer_1.default, {})] })] }));
}
exports.default = Terminal;
async function getServerSideProps(context) {
    return await (0, with_customize_1.default)({ context });
}
exports.getServerSideProps = getServerSideProps;
//# sourceMappingURL=terminal.js.map