Skip to content

Commit 4460085

Browse files
committed
feat: moving content around, added DividerBox
1 parent 5786921 commit 4460085

File tree

6 files changed

+79
-48
lines changed

6 files changed

+79
-48
lines changed

src/components/boxes.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Paper, PaperProps } from "@mui/material";
1+
import { Divider, DividerProps, Paper, PaperProps } from "@mui/material";
22
import { styled } from "@mui/material/styles";
33

44
export const SectionBox = styled(Paper)<PaperProps>(({ theme }) => ({
@@ -20,3 +20,10 @@ export const HighlightBox = styled(Paper)<PaperProps>(({ theme }) => ({
2020
borderImage: `linear-gradient(to bottom right, #b827fc 0%, #2c90fc 25%, #b8fd33 50%, #fec837 75%, #fd1892 100%)`,
2121
borderImageSlice: 1,
2222
}));
23+
24+
export const DividerBox = styled(Divider)<DividerProps>(({ theme }) => ({
25+
marginTop: 20,
26+
marginBottom: 20,
27+
background: "transparent",
28+
border: "none",
29+
}));

src/components/example-components.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
1-
import { Typography } from "@mui/material";
1+
import { Stack, Typography } from "@mui/material";
22
import Huggingface from "./huggingface/huggingface";
33
import { SectionBox } from "./boxes";
44

55
export default function ExampleComponents() {
66
return (
77
<>
88
<SectionBox>
9-
<Typography component="h2" variant="h3" sx={{ textAlign: "center" }}>
10-
Example Components
11-
</Typography>
9+
<Stack spacing={2}>
10+
<Typography component="h2" variant="h3" sx={{ textAlign: "center" }}>
11+
Components
12+
</Typography>
13+
14+
<Typography variant="body1">
15+
Unsure where to begin? Our pre-built components are at your service,
16+
offering a jumpstart for your ML demo.
17+
</Typography>
18+
</Stack>
1219
</SectionBox>
20+
1321
<Huggingface />
1422
</>
1523
);

src/components/getting-started.tsx

Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,8 @@ import { HighlightBox } from "./boxes";
2424
export default function GettingStarted() {
2525
return (
2626
<>
27-
<Stack sx={{ alignItems: "center", mb: 2 }}>
28-
<HighlightBox>
29-
<Typography variant="h5" component="p">
30-
Run your ML demo with ease in a Next.js/React environment
31-
</Typography>
32-
</HighlightBox>
33-
</Stack>
34-
3527
<Grid container spacing={2}>
36-
<Grid item sm={8} lg={6}>
28+
<Grid item sm={8} lg={6} sx={{ justifyContent: "center" }}>
3729
<Paper sx={{ p: 2 }}>
3830
<List disablePadding>
3931
<ListSubheader>Features</ListSubheader>
@@ -98,8 +90,7 @@ export default function GettingStarted() {
9890
<SyncIcon />
9991
</ListItemIcon>
10092
<ListItemText>
101-
Sync your repo on GitHub with your 🤗 Space via a GitHub
102-
Action
93+
Sync your repo on GitHub with your 🤗 Space
10394
</ListItemText>
10495
</ListItem>
10596
<ListItem>
@@ -115,40 +106,28 @@ export default function GettingStarted() {
115106
<Grid item sm={4} lg={3}>
116107
<Stack gap={2}>
117108
<Paper sx={{ p: 2 }}>
118-
<Stack gap={2}>
119-
<Button
120-
startIcon={<ContentCopyIcon />}
121-
variant="contained"
122-
href="https://huggingface.co/spaces/failfast/nextjs-docker-starter?duplicate=true"
123-
target="_blank"
124-
rel="noopener"
125-
>
126-
Duplicate space
127-
</Button>
128-
129-
<Button
130-
href="https://github.com/failfa-st/nextjs-docker-starter"
109+
<Typography variant="body1">
110+
Explore our{" "}
111+
<Link
112+
href="https://huggingface.co/spaces/failfast/nextjs-docker-starter/blob/main/README.md"
131113
target="_blank"
132114
rel="noopener"
133115
>
134-
Contribute on GitHub
135-
</Button>
136-
</Stack>
137-
</Paper>
138-
139-
<Paper sx={{ p: 2 }}>
140-
<Typography variant="body1">
141-
Get started with the{" "}
142-
<Link href="https://huggingface.co/spaces/failfast/nextjs-docker-starter/blob/main/README.md">
143116
README
144-
</Link>
117+
</Link>{" "}
118+
for a comprehensive guide on local development, Docker
119+
utilization, secret management, and GitHub-based Space control.
145120
</Typography>
146121
</Paper>
147122

148123
<Paper sx={{ p: 2 }}>
149124
<Typography variant="body1">
150125
Something missing?{" "}
151-
<Link href="https://huggingface.co/spaces/failfast/nextjs-docker-starter/discussions">
126+
<Link
127+
href="https://huggingface.co/spaces/failfast/nextjs-docker-starter/discussions"
128+
target="_blank"
129+
rel="noopener"
130+
>
152131
Please let us know!
153132
</Link>
154133
</Typography>

src/components/title.tsx

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
import { Link, Typography } from "@mui/material";
2-
import { Box } from "@mui/material";
1+
import { Button, Link, Paper, Stack, Typography } from "@mui/material";
2+
import { HighlightBox } from "./boxes";
3+
import ContentCopyIcon from "@mui/icons-material/ContentCopy";
34

45
export default function Title() {
56
return (
6-
<Box
7+
<Stack
8+
spacing={4}
79
sx={{
8-
display: "flex",
910
justifyContent: "center",
1011
alignItems: "center",
11-
minHeight: "20vh",
12+
minHeight: "40vh",
13+
p: 4,
1214
}}
1315
>
14-
<Typography variant="h2" component="h1">
15-
{" "}
16+
<Typography variant="h1" component="h1">
1617
<Link
1718
href="https://nextjs.org"
1819
target="_blank"
@@ -29,6 +30,33 @@ export default function Title() {
2930
Spaces
3031
</Link>
3132
</Typography>
32-
</Box>
33+
34+
<HighlightBox>
35+
<Typography variant="h5" component="p">
36+
Run your ML demo with ease in a Next.js/React environment
37+
</Typography>
38+
</HighlightBox>
39+
40+
<Stack gap={2} direction="row">
41+
<Button
42+
startIcon={<ContentCopyIcon />}
43+
variant="contained"
44+
href="https://huggingface.co/spaces/failfast/nextjs-docker-starter?duplicate=true"
45+
target="_blank"
46+
rel="noopener"
47+
color="secondary"
48+
>
49+
Duplicate space
50+
</Button>
51+
52+
<Button
53+
href="https://github.com/failfa-st/nextjs-docker-starter"
54+
target="_blank"
55+
rel="noopener"
56+
>
57+
Contribute on GitHub
58+
</Button>
59+
</Stack>
60+
</Stack>
3361
);
3462
}

src/lib/theme.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,18 @@ const theme = extendTheme({
4141
},
4242
typography: {
4343
...roboto.style,
44+
h1: {
45+
fontSize: "5.25em",
46+
},
4447
},
4548
components: {
4649
MuiLink: {
4750
styleOverrides: {
4851
root: {
4952
textDecoration: "none",
53+
":hover": {
54+
textDecoration: "underline",
55+
},
5056
},
5157
},
5258
},

src/pages/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Huggingface from "@/components/huggingface/huggingface";
66
import GettingStarted from "@/components/getting-started";
77
import ExampleComponents from "@/components/example-components";
88
import { Stack } from "@mui/material";
9+
import { DividerBox } from "@/components/boxes"
910

1011
export default function Home() {
1112
return (
@@ -22,6 +23,8 @@ export default function Home() {
2223

2324
<GettingStarted />
2425

26+
<DividerBox />
27+
2528
<ExampleComponents />
2629
</Stack>
2730
</Container>

0 commit comments

Comments
 (0)