Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
2c180e6
adjust for NixOS, temporarily
Kha Oct 9, 2023
46b56f0
update text
Kha Oct 9, 2023
baf6e34
further harden fs sandbox
Kha Oct 10, 2023
1a79f9e
take project from cwd
Kha Oct 25, 2023
1c92d68
Merge remote-tracking branch 'upstream/main' into nixos
Kha Dec 11, 2023
f5e1566
Merge branch 'main' into nixos
nomeata Apr 15, 2024
d95e884
Update package-lock.json
nomeata Apr 15, 2024
06baeac
Fix bubblewrap invocation
nomeata Apr 15, 2024
278c481
Disable other projects than MathlibLatest for now
nomeata Apr 15, 2024
665efb7
Merge remote-tracking branch 'upstream/main' into nixos
nomeata Apr 25, 2024
f09a421
Add LeanNightly project
nomeata Apr 25, 2024
51fe264
Update @leanprover/infoview
nomeata Apr 25, 2024
e442e5e
Merge branch 'main' of https://github.com/leanprover-community/lean4w…
nomeata Apr 26, 2024
2a58032
Try non-nightly
nomeata Apr 26, 2024
38787a0
Revert "Try non-nightly"
nomeata Apr 26, 2024
6c9dcf3
More debugging
nomeata Apr 26, 2024
1a2a30a
Merge branch 'main' of https://github.com/leanprover-community/lean4w…
nomeata May 6, 2024
f90494c
Completely regenerate package-log
nomeata May 6, 2024
9203666
Revert "use noto emoji font"
nomeata May 6, 2024
124ebe5
Add latest lean stable
nomeata May 8, 2024
44724f1
Mathlib stable, not lean stable
nomeata May 12, 2024
4c4c262
Merge remote-tracking branch 'upstream/main' into nixos
nomeata May 14, 2024
3e20feb
Less logging
nomeata May 14, 2024
0fc8096
Search for examples in ~
nomeata Jun 5, 2024
930fd1b
Merge remote-tracking branch 'upstream/main' into nixos
Kha Jun 14, 2024
94e49dd
More debugging from bubblewrap.sh
nomeata Jul 2, 2024
436b05c
ro-bind the right GLIBC
nomeata Jul 2, 2024
306b836
Move projects to `~/deploy/live`
nomeata Jul 23, 2024
a45f348
Merge branch 'main' of https://github.com/leanprover-community/lean4w…
nomeata Sep 9, 2024
425a6da
Run npm i --package-lock-only
nomeata Sep 9, 2024
ba177f3
Try to pin node itself to version in nixpkgs
nomeata Sep 9, 2024
b1a43ec
Try to not depend on node itsef
nomeata Sep 9, 2024
bc67509
server.mjs, not server.js
nomeata Sep 9, 2024
a12c40b
fix
nomeata Sep 9, 2024
c42a260
fix
nomeata Sep 9, 2024
9dc2fff
Merge remote-tracking branch 'upstream/main' into nixos
nomeata Sep 18, 2024
da64b85
CPU limit
nomeata Sep 19, 2024
cafeee3
fix import completion
Kha Dec 8, 2024
369fe37
include timezone info in jail
Kha Jan 5, 2025
ce88bb2
Fix api paths in nix setup
nomeata Feb 19, 2025
e25b2fa
Merge branch 'main' of https://github.com/leanprover-community/lean4w…
nomeata Feb 22, 2025
b89a790
Manually try to fix package-lock.json
nomeata Feb 22, 2025
11118b3
Merge branch 'main' of https://github.com/leanprover-community/lean4w…
nomeata Feb 23, 2025
f68bfa3
Merge branch 'main' of https://github.com/leanprover-community/lean4w…
nomeata Feb 25, 2025
52dd805
try adding empty editor file
Kha Mar 4, 2025
5f27215
more empty files more good
Kha Mar 4, 2025
f1e60a5
fix: do not change project path in sandbox
Kha May 6, 2025
1d536f9
Merge branch 'main' of https://github.com/leanprover-community/lean4w…
nomeata Jun 14, 2025
9af7cc7
Merge branch 'main' of https://github.com/leanprover-community/lean4w…
nomeata Jun 18, 2025
57c83ad
Set experimental.module in nightly tab
Kha Aug 2, 2025
5453150
Set experimental.module on the command line
nomeata Aug 18, 2025
f1c4f21
feat: add meta (#2)
algebraic-dev Oct 13, 2025
fba4d50
feat: add lean navbar and tracker (#1)
algebraic-dev Oct 13, 2025
d013e5b
fix: navbar css (#3)
algebraic-dev Oct 13, 2025
fce851a
feat: from navbar
algebraic-dev Oct 14, 2025
5d3fced
feat: hide navbar
algebraic-dev Oct 14, 2025
d4e9418
fix: navbar link
algebraic-dev Oct 14, 2025
3455712
Do not depend on webeditor
nomeata Oct 20, 2025
deb755b
Follow 7a2f25f5701cc20b1959fd1dc4cd13087be0fa2b
nomeata Oct 20, 2025
ebee5b6
Add -Dexperimental.module=true only if supported
nomeata Oct 26, 2025
2819ed7
More reliable feature detection
nomeata Oct 26, 2025
3cfa18a
Remove Stable/ to avoid confusion, not used on live.lean-lang.org
nomeata Nov 25, 2025
9e5f410
Add mathlib-v4.24.0 project
nomeata Nov 25, 2025
5a92fa7
Add mathlib-v4.20.0-rc5
nomeata Nov 25, 2025
2081e84
Remove mathlib-v4.20.0-rc5
nomeata Dec 8, 2025
100ad3e
check for project directory before launching project
robsimmons Feb 25, 2026
fbfbfa9
Merge pull request #7 from robsimmons/fronix-harden
nomeata Feb 25, 2026
bcc387f
Merge tag 'v0.2.1' into nixos
nomeata Mar 25, 2026
4f98395
Adjust to upstream changes, reducing overall diff a bit
nomeata Mar 26, 2026
16ca84c
Link to lean-lang for privacy and terms-of-use
nomeata Mar 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@
<meta charset="UTF-8" />
<title>Lean 4 Web</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<meta name="description" content="Try out Lean in your browser with the Lean Playground: an interactive live editor for testing Lean code.">

<meta property="og:title" content="Lean Playground">
<meta property="og:type" content="website">
<meta property="og:image" content="https://lean-lang.org/static/png/banner.png">
<meta property="og:url" content="https://live.lean-lang.org/">
<meta property="og:image:alt" content="Lean Playground">
<meta property="og:site_name" content="Lean Playground">

<meta name="twitter:title" content="Lean Playground">
<meta name="twitter:description" content="Try out Lean in your browser with the Lean Playground: an interactive live editor for testing Lean code.">
<meta name="twitter:image" content="https://lean-lang.org/static/png/banner.png">
<meta name="twitter:image:alt" content="Lean Playground">
<meta name="twitter:creator" content="@leanprover">
<meta name="twitter:card" content="summary_large_image">
<script defer data-domain="live.lean-lang.org" src="https://plausible.io/js/script.js"></script>

</head>
<body>
<div id="root">
Expand Down
1 change: 0 additions & 1 deletion client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import { useCallback, useEffect, useRef, useState } from 'react'
import Split from 'react-split'

import LeanLogo from './assets/logo.svg'

Check warning on line 14 in client/src/App.tsx

View workflow job for this annotation

GitHub Actions / Lint

'LeanLogo' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 14 in client/src/App.tsx

View workflow job for this annotation

GitHub Actions / Lint

'LeanLogo' is defined but never used
import { codeAtom } from './editor/code-atoms'
import { Menu } from './navigation/Navigation'
import { mobileAtom, settingsAtom } from './settings/settings-atoms'
Expand All @@ -22,7 +22,7 @@
import { save } from './utils/SaveToFile'

/** Returns true if the browser wants dark mode */
function isBrowserDefaultDark() {

Check warning on line 25 in client/src/App.tsx

View workflow job for this annotation

GitHub Actions / Lint

'isBrowserDefaultDark' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 25 in client/src/App.tsx

View workflow job for this annotation

GitHub Actions / Lint

'isBrowserDefaultDark' is defined but never used. Allowed unused vars must match /^_/u
return window.matchMedia('(prefers-color-scheme: dark)').matches
}

Expand Down Expand Up @@ -207,7 +207,7 @@
leanMonacoEditor.dispose()
_leanMonaco.dispose()
}
}, [infoviewRef, editorRef, options, project, settings])

Check warning on line 210 in client/src/App.tsx

View workflow job for this annotation

GitHub Actions / Lint

React Hook useEffect has missing dependencies: 'code', 'mobile', and 'setCode'. Either include them or remove the dependency array

/** Set editor content to the code loaded from the URL */
useEffect(() => {
Expand Down Expand Up @@ -262,7 +262,6 @@
return (
<div className="app monaco-editor">
<nav>
<LeanLogo />
<Menu
setContent={setContent}
restart={leanMonaco?.restart}
Expand Down
270 changes: 270 additions & 0 deletions client/src/NavBar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,270 @@
import React, { useState } from "react";

Check warning on line 1 in client/src/NavBar.tsx

View workflow job for this annotation

GitHub Actions / Lint

Run autofix to sort these imports!
import "./css/Nav.css";

import GitHubIcon from "./assets/github.svg?react"
import MathLibLogo from "./assets/mathlib_initiative_logo.svg?react"
import { useNavBar } from "./context/NavBarContext";

export interface NavItem {
title: React.ReactNode;
url?: string;
active?: boolean;
alt?: string;
classes?: string;
blank?: boolean;
}

const NavItemComponent: React.FC<{ item: NavItem }> = ({ item }) => {
const classes = item.classes ? ` ${item.classes}` : "";

return (
<li className={`nav-item-lean${item.active ? " active" : ""}`}>
{item.url ? (
<a
href={item.url}
className={`bar-link-lean${classes}`}
aria-label={item.alt || ""}
target={item.blank ? "_blank" : "_self"}
rel={item.blank ? "noopener noreferrer" : undefined}
>
{item.title}
</a>
) : (
<button
className={`bar-link-lean${classes}`}
aria-label={item.alt || ""}
>
{item.title}
</button>
)}
</li>
);
};

interface NavBarProps {
logo: React.FC,
leftItems: NavItem[];
rightItems: NavItem[];
menuItems: NavItem[];
externalLinks: NavItem[];
classname: string
}

export const NavBar: React.FC<NavBarProps> = ({
logo: Logo,
leftItems,
rightItems,
menuItems,
externalLinks,
classname
}) => {
const [isNavOpen, setIsNavOpen] = useState(false);
const [isFroOpen, setIsFroOpen] = useState(false);

return (
<header className={`site-header ${classname}`}>
<nav className="navbar" role="navigation" aria-label="Primary navigation">
<div className="navbar-container container">
<Logo />
<div className="nav-toggle">
<input
type="checkbox"
id="nav-toggle"
className="nav-toggle-checkbox"
checked={isNavOpen}
onChange={(e) => setIsNavOpen(e.target.checked)}
/>
<label
htmlFor="nav-toggle"
className="nav-toggle-label"
aria-label="Toggle navigation menu"
>
</label>
</div>

<menu className="desktop-menu">
<ul className="desktop-menu-part">
{leftItems.map((item, index) => (
<NavItemComponent key={index} item={item} />
))}
<li>
<span className="divider" />
</li>
{externalLinks.map((item, index) => (
<NavItemComponent key={index} item={item} />
))}
</ul>
<ul className="desktop-menu-part">
{rightItems.map((item, index) => (
<NavItemComponent key={index} item={item} />
))}
</ul>
</menu>
</div>
<menu className="mobile-nav">
<ul className="nav-list">
{leftItems.slice(0, -1).map((item, index) => (
<NavItemComponent key={index} item={item} />
))}
{externalLinks.slice(0, -1).map((item, index) => (
<NavItemComponent key={index} item={item} />
))}
<li className="nav-item-lean has-submenu">
<input
type="checkbox"
id="fro-toggle"
className="fro-toggle-checkbox"
hidden
checked={isFroOpen}
onChange={(e) => setIsFroOpen(e.target.checked)}
/>
<label
htmlFor="fro-toggle"
className="bar-link-lean"
aria-label="Toggle navigation menu"
>
FRO
</label>
<ul className="submenu">
{menuItems.map((item, index) => (
<NavItemComponent key={index} item={item} />
))}
</ul>
</li>
</ul>
</menu>
</nav>
</header>
);
};

const LeanLogo: React.FC = () =>
<a className="nav-logo" href="https://lean-lang.org/">
<svg
width="70"
height="20"
viewBox="0 0 486 169"
xmlns="http://www.w3.org/2000/svg"
stroke="#386EE0"
fill="transparent"
strokeWidth="10"
>
<path
d="M206.333 5.67949H105.667M206.333 5.67949L243.25 84.5M206.333 5.67949V84.5M243.25 84.5H317.549M243.25 84.5L279.667 163.321L280.889 163.318L317.549 84.5M206.333 84.5V163.321H5V5M206.333 84.5H105.667M317.549 84.5L353 5.67949M353 5.67949V164M353 5.67949H353.667L480.333 163.454H481V5"
strokeLinecap="round"
strokeLinejoin="round"
></path>
</svg>
</a>

const NavBarLean: React.FC = () => {
const outItems: NavItem[] = [
{ title: "Playground", url: "https://live.lean-lang.org/", blank: true, active: true },
{
title: "Reservoir",
url: "https://reservoir.lean-lang.org/",
blank: true,
},
];

const rightItems: NavItem[] = [
{
title: <GitHubIcon style={{fill: "var(--color-text)"}} />,
alt: "Github",
url: "https://github.com/leanprover/lean4",
blank: true,
},
];

const leftItems: NavItem[] = [
{ title: "Install", url: "https://lean-lang.org/install" },
{ title: "Learn", url: "https://lean-lang.org/learn" },
{ title: "Community", url: "https://lean-lang.org/community" },
{ title: "Use Cases", url: "https://lean-lang.org/use-cases" },
{ title: "FRO", url: "https://lean-lang.org/fro" },
];

const menuItems = [
{ title: "Home", url: "https://lean-lang.org/fro" },
{ title: "About", url: "https://lean-lang.org/fro/about" },
{ title: "Team", url: "https://lean-lang.org/fro/team" },
{ title: "Roadmap", url: "https://lean-lang.org/fro/roadmap" },
{ title: "Contact", url: "https://lean-lang.org/fro/contact" },

];

return (
<NavBar
logo={LeanLogo}
leftItems={leftItems}
rightItems={rightItems}
menuItems={menuItems}
externalLinks={outItems}
classname="lean"
/>
);
};

const MathLibIniciativeLogo = () =>
<MathLibLogo height={40} width={100}/>

const NavBarMathLib: React.FC = () => {
const outItems: NavItem[] = [
{ title: "Lean", url: "https://lean-lang.org/", blank: true },
{ title: "Mathlib Community", url: "https://leanprover-community.github.io/", blank: true },
{ title: "Playground", url: "https://live.lean-lang.org/?from=lean", blank: true, active: true },
{ title: "Reservoir", url: "https://reservoir.lean-lang.org/", blank: true },
];

const rightItems: NavItem[] = [
{
title: <GitHubIcon style={{fill: "var(--color-text)"}} />,
alt: "Github",
url: "https://github.com/leanprover/lean4",
blank: true,
}
];

const leftItems: NavItem[] = [
{ title: "About", url: "https://mathlib-initiative.org/about" },
{ title: "Roadmap", url: "https://mathlib-initiative.org/roadmap" },
{ title: "Team", url: "https://mathlib-initiative.org/team" },
{ title: "Careers", url: "https://mathlib-initiative.org/careers" },
{ title: "Support Us", url: "https://mathlib-initiative.org/support" },
{ title: "Contact", url: "https://mathlib-initiative.org/contact" },
];

const menuItems = [
{ title: "Home", url: "https://lean-lang.org/fro" },
{ title: "About", url: "https://lean-lang.org/fro/about" },
{ title: "Team", url: "https://lean-lang.org/fro/team" },
{ title: "Roadmap", url: "https://lean-lang.org/fro/roadmap" },
{ title: "Contact", url: "https://lean-lang.org/fro/contact" },

];

return (
<NavBar
logo={MathLibIniciativeLogo}
leftItems={leftItems}
rightItems={rightItems}
menuItems={menuItems}
externalLinks={outItems}
classname="mathlib"
/>
);
};


const NavBarComp: React.FC = () => {
let navBar = useNavBar()

return (!navBar.hideNavBar && <>
{navBar.requiresNavBar === 1 && <NavBarMathLib/>}
{navBar.requiresNavBar === 2 && <NavBarLean/>}
</>)

}

export {NavBarLean, NavBarMathLib, NavBarComp};

Check warning on line 270 in client/src/NavBar.tsx

View workflow job for this annotation

GitHub Actions / Lint

Run autofix to sort these exports!
7 changes: 7 additions & 0 deletions client/src/assets/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions client/src/assets/mathlib_initiative_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading