Skip to content

Commit 2ee95d8

Browse files
Modernize site with Next.js + MUI
1 parent 22bf678 commit 2ee95d8

227 files changed

Lines changed: 2484 additions & 46 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pages.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Deploy (GitHub Pages)
2+
3+
on:
4+
push:
5+
branches: [master]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 20
28+
cache: npm
29+
30+
- name: Install
31+
run: npm ci
32+
33+
- name: Build (static export)
34+
run: npm run build
35+
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: out
40+
41+
deploy:
42+
needs: build
43+
runs-on: ubuntu-latest
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
steps:
48+
- name: Deploy
49+
id: deployment
50+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,21 @@
11
.DS_Store
22
.project
3+
4+
# Node / Next.js
5+
node_modules/
6+
.next/
7+
out/
8+
.vercel/
9+
10+
# Logs
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
pnpm-debug.log*
15+
16+
# Env
17+
.env*
18+
19+
# TypeScript
20+
*.tsbuildinfo
21+

app/layout.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import type { Metadata } from "next";
2+
import { Rubik } from "next/font/google";
3+
import { Providers } from "./providers";
4+
5+
const rubik = Rubik({
6+
subsets: ["latin"],
7+
weight: ["400", "500", "700", "900"],
8+
display: "swap",
9+
});
10+
11+
export const metadata: Metadata = {
12+
title: "MADS: Model Analysis & Decision Support",
13+
description:
14+
"Open-source high-performance computational framework for data- & model-based analyses in Julia and C.",
15+
};
16+
17+
export default function RootLayout({ children }: { children: React.ReactNode }) {
18+
return (
19+
<html lang="en" className={rubik.className}>
20+
<body>
21+
<Providers>{children}</Providers>
22+
</body>
23+
</html>
24+
);
25+
}

app/page.tsx

Lines changed: 275 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,275 @@
1+
"use client";
2+
3+
import * as React from "react";
4+
import {
5+
AppBar,
6+
Box,
7+
Button,
8+
Container,
9+
Divider,
10+
Link,
11+
Paper,
12+
Stack,
13+
Toolbar,
14+
Typography,
15+
} from "@mui/material";
16+
import { alpha } from "@mui/material/styles";
17+
18+
const Section: React.FC<{
19+
id: string;
20+
title: string;
21+
subtitle?: string;
22+
children: React.ReactNode;
23+
}> = ({ id, title, subtitle, children }) => {
24+
return (
25+
<Box id={id} component="section" sx={{ scrollMarginTop: 88, py: { xs: 6, md: 10 } }}>
26+
<Container maxWidth="lg">
27+
<Stack spacing={1.5} sx={{ mb: 4 }}>
28+
<Typography variant="h3" component="h2">
29+
{title}
30+
</Typography>
31+
{subtitle ? (
32+
<Typography variant="body1" color="text.secondary" sx={{ maxWidth: 900 }}>
33+
{subtitle}
34+
</Typography>
35+
) : null}
36+
</Stack>
37+
{children}
38+
</Container>
39+
</Box>
40+
);
41+
};
42+
43+
export default function HomePage() {
44+
return (
45+
<Box>
46+
<AppBar
47+
position="sticky"
48+
sx={(t) => ({
49+
backdropFilter: "blur(10px)",
50+
backgroundColor: alpha(t.palette.background.default, 0.85),
51+
})}
52+
>
53+
<Toolbar>
54+
<Stack direction="row" spacing={2} alignItems="center" sx={{ flex: 1, minWidth: 0 }}>
55+
<Box
56+
component="img"
57+
src="/mads_logos/mads_white_swan_logo_big_text.png"
58+
alt="MADS"
59+
sx={{ height: 34, width: "auto" }}
60+
/>
61+
<Stack direction="row" spacing={1} sx={{ display: { xs: "none", md: "flex" } }}>
62+
<Button href="#documentation" color="inherit">Documentation</Button>
63+
<Button href="#research" color="inherit">Research</Button>
64+
<Button href="#downloads" color="inherit">Downloads</Button>
65+
<Button href="#contact" color="inherit">Contact</Button>
66+
</Stack>
67+
</Stack>
68+
<Button
69+
variant="contained"
70+
href="https://github.com/madsjulia/Mads.jl"
71+
target="_blank"
72+
rel="noreferrer"
73+
>
74+
GitHub
75+
</Button>
76+
</Toolbar>
77+
</AppBar>
78+
79+
<Box
80+
component="header"
81+
sx={{
82+
py: { xs: 8, md: 12 },
83+
borderBottom: 1,
84+
borderColor: "divider",
85+
backgroundImage: (t) =>
86+
`linear-gradient(${alpha(t.palette.common.black, 0.78)}, ${alpha(t.palette.common.black, 0.55)}), url(/images/dark.jpg)`,
87+
backgroundSize: "cover",
88+
backgroundPosition: "center",
89+
color: "common.white",
90+
}}
91+
>
92+
<Container maxWidth="lg">
93+
<Stack spacing={2.5} sx={{ maxWidth: 980 }}>
94+
<Typography variant="h2" component="h1" sx={{ letterSpacing: -0.5 }}>
95+
MADS
96+
</Typography>
97+
<Typography variant="h5" sx={{ opacity: 0.95 }}>
98+
Model Analysis &amp; Decision Support
99+
</Typography>
100+
<Typography variant="body1" sx={{ opacity: 0.9, fontSize: "1.05rem" }}>
101+
Open-source high-performance computational framework for data- &amp; model-based analyses in Julia and C.
102+
</Typography>
103+
<Stack direction={{ xs: "column", sm: "row" }} spacing={1.5} sx={{ pt: 1 }}>
104+
<Button variant="contained" href="#documentation">
105+
Documentation
106+
</Button>
107+
<Button
108+
variant="outlined"
109+
href="https://madsjulia.github.io/Mads.jl"
110+
target="_blank"
111+
rel="noreferrer"
112+
sx={(t) => ({ borderColor: alpha(t.palette.common.white, 0.7), color: "common.white" })}
113+
>
114+
Julia docs
115+
</Button>
116+
</Stack>
117+
</Stack>
118+
</Container>
119+
</Box>
120+
121+
<Section
122+
id="overview"
123+
title="What MADS can do"
124+
subtitle="MADS supports common workflows in model analysis, inversion, uncertainty quantification, and decision support."
125+
>
126+
<Paper variant="outlined" sx={{ p: { xs: 2.5, md: 4 } }}>
127+
<Box component="ul" sx={{ m: 0, pl: 3, display: "grid", gap: 1, gridTemplateColumns: { xs: "1fr", md: "1fr 1fr" } }}>
128+
<li>Sensitivity Analysis</li>
129+
<li>Parameter Estimation</li>
130+
<li>Model Inversion and Calibration</li>
131+
<li>Uncertainty Quantification</li>
132+
<li>Model Selection and Model Averaging</li>
133+
<li>Model Reduction and Surrogate Modeling</li>
134+
<li>Machine Learning and Blind Source Separation</li>
135+
<li>Decision Analysis and Support</li>
136+
</Box>
137+
</Paper>
138+
</Section>
139+
140+
<Section id="documentation" title="Documentation & Examples">
141+
<Stack direction={{ xs: "column", md: "row" }} spacing={2}>
142+
<Paper variant="outlined" sx={{ p: 3, flex: 1 }}>
143+
<Typography variant="h5" sx={{ mb: 1 }}>
144+
Julia version
145+
</Typography>
146+
<Typography color="text.secondary" sx={{ mb: 2 }}>
147+
Actively developed.
148+
</Typography>
149+
<Stack direction="row" spacing={1.5}>
150+
<Button
151+
variant="contained"
152+
href="https://madsjulia.github.io/Mads.jl"
153+
target="_blank"
154+
rel="noreferrer"
155+
>
156+
Docs
157+
</Button>
158+
<Button
159+
variant="outlined"
160+
href="https://github.com/madsjulia/Mads.jl"
161+
target="_blank"
162+
rel="noreferrer"
163+
>
164+
Repo
165+
</Button>
166+
</Stack>
167+
</Paper>
168+
169+
<Paper variant="outlined" sx={{ p: 3, flex: 1 }}>
170+
<Typography variant="h5" sx={{ mb: 1 }}>
171+
C version
172+
</Typography>
173+
<Typography color="text.secondary" sx={{ mb: 2 }}>
174+
Continued support.
175+
</Typography>
176+
<Stack direction="row" spacing={1.5}>
177+
<Button
178+
variant="contained"
179+
href="http://madsc.lanl.gov/index.html"
180+
target="_blank"
181+
rel="noreferrer"
182+
>
183+
Site
184+
</Button>
185+
<Button
186+
variant="outlined"
187+
href="https://gitlab.com/monty/mads"
188+
target="_blank"
189+
rel="noreferrer"
190+
>
191+
GitLab
192+
</Button>
193+
</Stack>
194+
</Paper>
195+
</Stack>
196+
</Section>
197+
198+
<Section
199+
id="research"
200+
title="Theory & Research"
201+
subtitle="Key publications, presentations, and reports (PDF links)."
202+
>
203+
<Paper variant="outlined" sx={{ p: { xs: 2.5, md: 4 } }}>
204+
<Typography variant="body2" color="text.secondary">
205+
The legacy site contains a long curated list of links. This modernization keeps PDFs in the same folders
206+
(for stable URLs) while the homepage layout is refreshed.
207+
</Typography>
208+
<Divider sx={{ my: 2.5 }} />
209+
<Stack direction={{ xs: "column", sm: "row" }} spacing={1.5}>
210+
<Button variant="contained" href="#downloads">
211+
Downloads
212+
</Button>
213+
<Button variant="outlined" href="/papers/" target="_blank" rel="noreferrer">
214+
Papers folder
215+
</Button>
216+
<Button variant="outlined" href="/presentations/" target="_blank" rel="noreferrer">
217+
Presentations folder
218+
</Button>
219+
<Button variant="outlined" href="/reports/" target="_blank" rel="noreferrer">
220+
Reports folder
221+
</Button>
222+
</Stack>
223+
<Typography variant="caption" display="block" color="text.secondary" sx={{ mt: 1.5 }}>
224+
Note: GitHub Pages does not always show directory listings; if needed, browse via GitHub.
225+
</Typography>
226+
</Paper>
227+
</Section>
228+
229+
<Section id="downloads" title="Downloads">
230+
<Stack direction={{ xs: "column", md: "row" }} spacing={2}>
231+
<Paper variant="outlined" sx={{ p: 3, flex: 1 }}>
232+
<Typography variant="h6" sx={{ mb: 1 }}>
233+
Julia version
234+
</Typography>
235+
<Stack spacing={0.75}>
236+
<Link href="https://github.com/madsjulia/Mads.jl" target="_blank" rel="noreferrer">
237+
github.com/madsjulia/Mads.jl
238+
</Link>
239+
<Link href="https://gitlab.com/mads/Mads.jl" target="_blank" rel="noreferrer">
240+
gitlab.com/mads/Mads.jl
241+
</Link>
242+
</Stack>
243+
</Paper>
244+
<Paper variant="outlined" sx={{ p: 3, flex: 1 }}>
245+
<Typography variant="h6" sx={{ mb: 1 }}>
246+
C version
247+
</Typography>
248+
<Link href="https://gitlab.com/monty/mads" target="_blank" rel="noreferrer">
249+
gitlab.com/monty/mads
250+
</Link>
251+
</Paper>
252+
</Stack>
253+
</Section>
254+
255+
<Box id="contact" component="footer" sx={{ py: 6, borderTop: 1, borderColor: "divider" }}>
256+
<Container maxWidth="lg">
257+
<Stack spacing={1.25}>
258+
<Typography variant="h5">Contact: mads@lanl.gov</Typography>
259+
<Stack direction={{ xs: "column", sm: "row" }} spacing={2}>
260+
<Link href="https://github.com/madsjulia/Mads.jl/graphs/contributors" target="_blank" rel="noreferrer">
261+
MADS Contributors
262+
</Link>
263+
<Link href="https://montyvesselinov.github.io" target="_blank" rel="noreferrer">
264+
Monty Hub
265+
</Link>
266+
</Stack>
267+
<Typography variant="body2" color="text.secondary">
268+
Velimir V Vesselinov (monty) and collaborators.
269+
</Typography>
270+
</Stack>
271+
</Container>
272+
</Box>
273+
</Box>
274+
);
275+
}

app/providers.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"use client";
2+
3+
import * as React from "react";
4+
import { CssBaseline, ThemeProvider } from "@mui/material";
5+
import { theme } from "./theme";
6+
7+
export const Providers: React.FC<{ children: React.ReactNode }> = ({ children }) => {
8+
return (
9+
<ThemeProvider theme={theme}>
10+
<CssBaseline />
11+
{children}
12+
</ThemeProvider>
13+
);
14+
};

0 commit comments

Comments
 (0)