Spaces:
Runtime error
Runtime error
feat: moving content around, added DividerBox
Browse files- src/components/boxes.tsx +8 -1
- src/components/example-components.tsx +12 -4
- src/components/getting-started.tsx +14 -35
- src/components/title.tsx +36 -8
- src/lib/theme.ts +6 -0
- src/pages/index.tsx +3 -0
src/components/boxes.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import { Paper, PaperProps } from "@mui/material";
|
| 2 |
import { styled } from "@mui/material/styles";
|
| 3 |
|
| 4 |
export const SectionBox = styled(Paper)<PaperProps>(({ theme }) => ({
|
|
@@ -20,3 +20,10 @@ export const HighlightBox = styled(Paper)<PaperProps>(({ theme }) => ({
|
|
| 20 |
borderImage: `linear-gradient(to bottom right, #b827fc 0%, #2c90fc 25%, #b8fd33 50%, #fec837 75%, #fd1892 100%)`,
|
| 21 |
borderImageSlice: 1,
|
| 22 |
}));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { Divider, DividerProps, Paper, PaperProps } from "@mui/material";
|
| 2 |
import { styled } from "@mui/material/styles";
|
| 3 |
|
| 4 |
export const SectionBox = styled(Paper)<PaperProps>(({ theme }) => ({
|
|
|
|
| 20 |
borderImage: `linear-gradient(to bottom right, #b827fc 0%, #2c90fc 25%, #b8fd33 50%, #fec837 75%, #fd1892 100%)`,
|
| 21 |
borderImageSlice: 1,
|
| 22 |
}));
|
| 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
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import { Typography } from "@mui/material";
|
| 2 |
import Huggingface from "./huggingface/huggingface";
|
| 3 |
import { SectionBox } from "./boxes";
|
| 4 |
|
|
@@ -6,10 +6,18 @@ export default function ExampleComponents() {
|
|
| 6 |
return (
|
| 7 |
<>
|
| 8 |
<SectionBox>
|
| 9 |
-
<
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
</SectionBox>
|
|
|
|
| 13 |
<Huggingface />
|
| 14 |
</>
|
| 15 |
);
|
|
|
|
| 1 |
+
import { Stack, Typography } from "@mui/material";
|
| 2 |
import Huggingface from "./huggingface/huggingface";
|
| 3 |
import { SectionBox } from "./boxes";
|
| 4 |
|
|
|
|
| 6 |
return (
|
| 7 |
<>
|
| 8 |
<SectionBox>
|
| 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>
|
| 19 |
</SectionBox>
|
| 20 |
+
|
| 21 |
<Huggingface />
|
| 22 |
</>
|
| 23 |
);
|
src/components/getting-started.tsx
CHANGED
|
@@ -24,16 +24,8 @@ import { HighlightBox } from "./boxes";
|
|
| 24 |
export default function GettingStarted() {
|
| 25 |
return (
|
| 26 |
<>
|
| 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 |
-
|
| 35 |
<Grid container spacing={2}>
|
| 36 |
-
<Grid item sm={8} lg={6}>
|
| 37 |
<Paper sx={{ p: 2 }}>
|
| 38 |
<List disablePadding>
|
| 39 |
<ListSubheader>Features</ListSubheader>
|
|
@@ -98,8 +90,7 @@ export default function GettingStarted() {
|
|
| 98 |
<SyncIcon />
|
| 99 |
</ListItemIcon>
|
| 100 |
<ListItemText>
|
| 101 |
-
Sync your repo on GitHub with your 🤗 Space
|
| 102 |
-
Action
|
| 103 |
</ListItemText>
|
| 104 |
</ListItem>
|
| 105 |
<ListItem>
|
|
@@ -115,40 +106,28 @@ export default function GettingStarted() {
|
|
| 115 |
<Grid item sm={4} lg={3}>
|
| 116 |
<Stack gap={2}>
|
| 117 |
<Paper sx={{ p: 2 }}>
|
| 118 |
-
<
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 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"
|
| 131 |
target="_blank"
|
| 132 |
rel="noopener"
|
| 133 |
>
|
| 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">
|
| 143 |
README
|
| 144 |
-
</Link>
|
|
|
|
|
|
|
| 145 |
</Typography>
|
| 146 |
</Paper>
|
| 147 |
|
| 148 |
<Paper sx={{ p: 2 }}>
|
| 149 |
<Typography variant="body1">
|
| 150 |
Something missing?{" "}
|
| 151 |
-
<Link
|
|
|
|
|
|
|
|
|
|
|
|
|
| 152 |
Please let us know!
|
| 153 |
</Link>
|
| 154 |
</Typography>
|
|
|
|
| 24 |
export default function GettingStarted() {
|
| 25 |
return (
|
| 26 |
<>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
<Grid container spacing={2}>
|
| 28 |
+
<Grid item sm={8} lg={6} sx={{ justifyContent: "center" }}>
|
| 29 |
<Paper sx={{ p: 2 }}>
|
| 30 |
<List disablePadding>
|
| 31 |
<ListSubheader>Features</ListSubheader>
|
|
|
|
| 90 |
<SyncIcon />
|
| 91 |
</ListItemIcon>
|
| 92 |
<ListItemText>
|
| 93 |
+
Sync your repo on GitHub with your 🤗 Space
|
|
|
|
| 94 |
</ListItemText>
|
| 95 |
</ListItem>
|
| 96 |
<ListItem>
|
|
|
|
| 106 |
<Grid item sm={4} lg={3}>
|
| 107 |
<Stack gap={2}>
|
| 108 |
<Paper sx={{ p: 2 }}>
|
| 109 |
+
<Typography variant="body1">
|
| 110 |
+
Explore our{" "}
|
| 111 |
+
<Link
|
| 112 |
+
href="https://huggingface.co/spaces/failfast/nextjs-docker-starter/blob/main/README.md"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
target="_blank"
|
| 114 |
rel="noopener"
|
| 115 |
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
README
|
| 117 |
+
</Link>{" "}
|
| 118 |
+
for a comprehensive guide on local development, Docker
|
| 119 |
+
utilization, secret management, and GitHub-based Space control.
|
| 120 |
</Typography>
|
| 121 |
</Paper>
|
| 122 |
|
| 123 |
<Paper sx={{ p: 2 }}>
|
| 124 |
<Typography variant="body1">
|
| 125 |
Something missing?{" "}
|
| 126 |
+
<Link
|
| 127 |
+
href="https://huggingface.co/spaces/failfast/nextjs-docker-starter/discussions"
|
| 128 |
+
target="_blank"
|
| 129 |
+
rel="noopener"
|
| 130 |
+
>
|
| 131 |
Please let us know!
|
| 132 |
</Link>
|
| 133 |
</Typography>
|
src/components/title.tsx
CHANGED
|
@@ -1,18 +1,19 @@
|
|
| 1 |
-
import { Link, Typography } from "@mui/material";
|
| 2 |
-
import {
|
|
|
|
| 3 |
|
| 4 |
export default function Title() {
|
| 5 |
return (
|
| 6 |
-
<
|
|
|
|
| 7 |
sx={{
|
| 8 |
-
display: "flex",
|
| 9 |
justifyContent: "center",
|
| 10 |
alignItems: "center",
|
| 11 |
-
minHeight: "
|
|
|
|
| 12 |
}}
|
| 13 |
>
|
| 14 |
-
<Typography variant="
|
| 15 |
-
{" "}
|
| 16 |
<Link
|
| 17 |
href="https://nextjs.org"
|
| 18 |
target="_blank"
|
|
@@ -29,6 +30,33 @@ export default function Title() {
|
|
| 29 |
Spaces
|
| 30 |
</Link>
|
| 31 |
</Typography>
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
);
|
| 34 |
}
|
|
|
|
| 1 |
+
import { Button, Link, Paper, Stack, Typography } from "@mui/material";
|
| 2 |
+
import { HighlightBox } from "./boxes";
|
| 3 |
+
import ContentCopyIcon from "@mui/icons-material/ContentCopy";
|
| 4 |
|
| 5 |
export default function Title() {
|
| 6 |
return (
|
| 7 |
+
<Stack
|
| 8 |
+
spacing={4}
|
| 9 |
sx={{
|
|
|
|
| 10 |
justifyContent: "center",
|
| 11 |
alignItems: "center",
|
| 12 |
+
minHeight: "40vh",
|
| 13 |
+
p: 4,
|
| 14 |
}}
|
| 15 |
>
|
| 16 |
+
<Typography variant="h1" component="h1">
|
|
|
|
| 17 |
<Link
|
| 18 |
href="https://nextjs.org"
|
| 19 |
target="_blank"
|
|
|
|
| 30 |
Spaces
|
| 31 |
</Link>
|
| 32 |
</Typography>
|
| 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>
|
| 61 |
);
|
| 62 |
}
|
src/lib/theme.ts
CHANGED
|
@@ -41,12 +41,18 @@ const theme = extendTheme({
|
|
| 41 |
},
|
| 42 |
typography: {
|
| 43 |
...roboto.style,
|
|
|
|
|
|
|
|
|
|
| 44 |
},
|
| 45 |
components: {
|
| 46 |
MuiLink: {
|
| 47 |
styleOverrides: {
|
| 48 |
root: {
|
| 49 |
textDecoration: "none",
|
|
|
|
|
|
|
|
|
|
| 50 |
},
|
| 51 |
},
|
| 52 |
},
|
|
|
|
| 41 |
},
|
| 42 |
typography: {
|
| 43 |
...roboto.style,
|
| 44 |
+
h1: {
|
| 45 |
+
fontSize: "5.25em",
|
| 46 |
+
},
|
| 47 |
},
|
| 48 |
components: {
|
| 49 |
MuiLink: {
|
| 50 |
styleOverrides: {
|
| 51 |
root: {
|
| 52 |
textDecoration: "none",
|
| 53 |
+
":hover": {
|
| 54 |
+
textDecoration: "underline",
|
| 55 |
+
},
|
| 56 |
},
|
| 57 |
},
|
| 58 |
},
|
src/pages/index.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import Huggingface from "@/components/huggingface/huggingface";
|
|
| 6 |
import GettingStarted from "@/components/getting-started";
|
| 7 |
import ExampleComponents from "@/components/example-components";
|
| 8 |
import { Stack } from "@mui/material";
|
|
|
|
| 9 |
|
| 10 |
export default function Home() {
|
| 11 |
return (
|
|
@@ -22,6 +23,8 @@ export default function Home() {
|
|
| 22 |
|
| 23 |
<GettingStarted />
|
| 24 |
|
|
|
|
|
|
|
| 25 |
<ExampleComponents />
|
| 26 |
</Stack>
|
| 27 |
</Container>
|
|
|
|
| 6 |
import GettingStarted from "@/components/getting-started";
|
| 7 |
import ExampleComponents from "@/components/example-components";
|
| 8 |
import { Stack } from "@mui/material";
|
| 9 |
+
import { DividerBox } from "@/components/boxes"
|
| 10 |
|
| 11 |
export default function Home() {
|
| 12 |
return (
|
|
|
|
| 23 |
|
| 24 |
<GettingStarted />
|
| 25 |
|
| 26 |
+
<DividerBox />
|
| 27 |
+
|
| 28 |
<ExampleComponents />
|
| 29 |
</Stack>
|
| 30 |
</Container>
|