Skip to content

Commit a19f333

Browse files
committed
[ci skip] update website docs
- update main page: promote docker - python-c.mdx: fix typo
1 parent b92fda9 commit a19f333

3 files changed

Lines changed: 85 additions & 2 deletions

File tree

docs/python-c.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,4 +270,4 @@ iterations = 69
270270
outer iterations = 5
271271
solve time = 0.140401 ms
272272
```
273-
```
273+

website/src/css/custom.css

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,45 @@ body {
434434
margin-bottom: 0;
435435
}
436436

437+
.homeDockerPromo {
438+
display: grid;
439+
grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
440+
gap: 1.5rem;
441+
align-items: center;
442+
width: min(1100px, calc(100% - 2rem));
443+
margin: 0 auto;
444+
}
445+
446+
.homeDockerPromo__content,
447+
.homeDockerPromo__visual {
448+
min-width: 0;
449+
}
450+
451+
.homeDockerPromo__content h2 {
452+
margin: 0 0 0.85rem;
453+
color: #2f1a14;
454+
font-size: clamp(2rem, 4vw, 3rem);
455+
line-height: 1.08;
456+
}
457+
458+
.homeDockerPromo__content p {
459+
color: var(--open-page-muted);
460+
}
461+
462+
.homeDockerPromo__image {
463+
display: block;
464+
width: min(100%, 280px);
465+
margin: 0 auto 1rem;
466+
}
467+
468+
.homeDockerPromo__codeBlock {
469+
margin-top: 0;
470+
}
471+
472+
.homeDockerPromo__codeBlock .theme-code-block {
473+
margin-bottom: 0;
474+
}
475+
437476
.homeSplit__copy,
438477
.homeSplit__media {
439478
min-width: 0;
@@ -684,7 +723,8 @@ body {
684723
}
685724

686725
.homeOcpPromo,
687-
.homeRos2Promo {
726+
.homeRos2Promo,
727+
.homeDockerPromo {
688728
grid-template-columns: 1fr;
689729
}
690730
}

website/src/pages/index.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ build_config = og.config.BuildConfiguration() \
4444
.with_build_directory("my_optimizers") \
4545
.with_ros2(ros2_config)`;
4646

47+
const dockerPromoCode = String.raw`docker pull alphaville/open:0.7.0`
48+
4749
const heroStats = [
4850
{label: 'Core language', value: 'Rust'},
4951
{label: 'Primary uses', value: 'MPC, MHE, Robotics'},
@@ -120,6 +122,7 @@ export default function Home() {
120122
const assetUrl = (path) => `${baseUrl}${path.replace(/^\//, '')}`;
121123
const promoGif = assetUrl('img/open-promo.gif');
122124
const boxLogo = assetUrl('img/box.png');
125+
const dockerGif = assetUrl('img/docker.gif');
123126
const ocpStatesImage = assetUrl('img/ocp-states.png');
124127
const ros2RobotImage = assetUrl('img/ros2-robot.png');
125128
const [zoomedImage, setZoomedImage] = useState(null);
@@ -410,6 +413,46 @@ export default function Home() {
410413
</div>
411414
</div>
412415
</section>
416+
417+
<section className="homeSection homeSection--alt">
418+
<div className="homeDockerPromo">
419+
<div className="homeDockerPromo__content">
420+
<p className="homeSection__eyebrow">Docker image</p>
421+
<h2>Run OpEn in a ready-made container</h2>
422+
<p>
423+
OpEn ships with a Docker image that gets you straight into a
424+
working environment with Jupyter, Python, and the tooling needed
425+
to explore examples without local setup friction.
426+
</p>
427+
<p>
428+
It is a convenient way to try the Python interface, browse the
429+
notebooks, and experiment with the OCP workflows in a clean,
430+
reproducible environment.
431+
</p>
432+
<div className="homeHero__actions">
433+
<Link className="button button--primary" to="/docs/docker">
434+
Learn more
435+
</Link>
436+
<Link
437+
className="button button--secondary"
438+
href="https://hub.docker.com/r/alphaville/open"
439+
>
440+
Docker Hub
441+
</Link>
442+
</div>
443+
</div>
444+
<div className="homeDockerPromo__visual">
445+
<img
446+
className="homeDockerPromo__image"
447+
src={dockerGif}
448+
alt="OpEn running inside the Docker image with Jupyter"
449+
/>
450+
<div className="homeCodeBlock homeDockerPromo__codeBlock">
451+
<CodeBlock language="bash">{dockerPromoCode}</CodeBlock>
452+
</div>
453+
</div>
454+
</div>
455+
</section>
413456
</main>
414457
{zoomedImage ? (
415458
<div

0 commit comments

Comments
 (0)