Skip to content

Commit 12ecd42

Browse files
authored
Merge pull request #1152 from RaananW/removeDeprecated
Preparation to move the docs to the main repository
2 parents 1192828 + 223a5b5 commit 12ecd42

38 files changed

+3826
-5010
lines changed

.vscode/settings.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,13 @@
2121
},
2222
"editor.tabSize": 4,
2323
"typescript.tsdk": "node_modules\\typescript\\lib",
24-
"typescript.preferences.importModuleSpecifier": "relative"
24+
"typescript.preferences.importModuleSpecifier": "relative",
25+
"appService.zipIgnorePattern": [
26+
"node_modules{,/**}",
27+
".vscode{,/**}",
28+
".temp{,/**}",
29+
".next{,/**}",
30+
],
31+
"appService.deploySubpath": ".",
32+
"appService.defaultWebAppToDeploy": "None"
2533
}

.yarnrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
network-timeout 60000
1+
network-timeout: 500000
2+
<!-- registry: https://registry.npmjs.org/ -->

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ will add a playground to the examples pane, allow to show its preview, add a sty
3737

3838
Documentation for all markdown components is coming soon.
3939

40-
[![Powered by vercel](public/powered-by-vercel.svg?raw=true)](https://vercel.com/?utm_source=babylonjs&utm_campaign=oss)
40+
<!-- [![Powered by vercel](public/powered-by-vercel.svg?raw=true)](https://vercel.com/?utm_source=babylonjs&utm_campaign=oss) -->

components/bucketContent.component.tsx

Lines changed: 75 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { FunctionComponent } from "react";
22
import { IDocumentationPageProps } from "../lib/content.interfaces";
3-
import { Card, CardContent, Theme, Typography } from "@mui/material";
4-
import { createStyles, makeStyles } from "@mui/styles";
3+
import { Card, CardContent, Typography } from "@mui/material";
4+
import { styled } from "@mui/material/styles";
55

6-
import Link from "next/link";
6+
import Link, { LinkProps } from "next/link";
77
import Image from "next/image";
88
import { getImageUrl } from "../lib/frontendUtils/frontendTools";
99

@@ -15,64 +15,44 @@ export interface IBucketContentProps {
1515
externalLinks?: { title: string; url: string }[];
1616
}
1717

18-
const useStyles = makeStyles((theme: Theme) =>
19-
createStyles({
20-
h3: {
21-
borderTop: "1px solid",
22-
marginTop: "3.125rem !important",
23-
paddingTop: theme.spacing(2),
24-
},
25-
container: {
26-
display: "flex",
27-
flexWrap: "wrap",
28-
maxWidth: "100%",
29-
},
30-
divRoot: {
31-
padding: 16,
32-
height: 160,
33-
minHeight: 160,
34-
minWidth: 200,
35-
width: "100%",
18+
const StyledLink = styled(Link)<LinkProps>(({ theme }) => ({
19+
padding: 16,
20+
height: 160,
21+
minHeight: 160,
22+
minWidth: 200,
23+
width: "100%",
3624

37-
[theme.breakpoints.up("lg")]: {
38-
width: "50% !important",
39-
},
40-
[theme.breakpoints.up("xl")]: {
41-
width: "33% !important",
42-
},
43-
},
44-
root: {
45-
display: "flex",
46-
height: "100%",
47-
cursor: "pointer",
48-
},
49-
details: {
50-
display: "flex",
51-
flexDirection: "column",
52-
width: "50% !important",
53-
flex: 1,
54-
},
55-
content: {
56-
flex: "1 0 auto",
57-
},
58-
imageContainer: {
59-
minHeight: "100%",
60-
cursor: "pointer",
61-
display: "inline-block",
62-
overflow: "hidden",
63-
position: "relative",
64-
minWidth: "150px !important",
65-
width: "unset !important",
66-
"& img": {
67-
pointerEvents: "none",
68-
position: "absolute",
69-
minWidth: "100%",
70-
minHeight: "100%",
71-
objectFit: "cover",
72-
},
73-
},
74-
}),
75-
);
25+
[theme.breakpoints.up("lg")]: {
26+
width: "50% !important",
27+
},
28+
[theme.breakpoints.up("xl")]: {
29+
width: "33% !important",
30+
},
31+
}));
32+
33+
const ImageContainer = styled("div")(({ theme }) => ({
34+
minHeight: "100%",
35+
cursor: "pointer",
36+
display: "inline-block",
37+
overflow: "hidden",
38+
position: "relative",
39+
minWidth: "150px !important",
40+
width: "unset !important",
41+
"& img": {
42+
pointerEvents: "none",
43+
position: "absolute",
44+
minWidth: "100%",
45+
minHeight: "100%",
46+
objectFit: "cover",
47+
},
48+
}));
49+
50+
const DetailsDiv = styled("div")(({ theme }) => ({
51+
display: "flex",
52+
flexDirection: "column",
53+
width: "50% !important",
54+
flex: 1,
55+
}));
7656

7757
interface IBucketItem {
7858
title: string;
@@ -82,30 +62,44 @@ interface IBucketItem {
8262
}
8363

8464
const SingleBucketItem: FunctionComponent<IBucketItem> = ({ link, title, imageUrl, description }: IBucketItem) => {
85-
const classes = useStyles();
8665
return (
87-
<Link key={link} href={link} className={classes.divRoot}>
88-
<Card className={classes.root}>
89-
<div className={classes.details}>
90-
<CardContent className={classes.content}>
66+
<StyledLink key={link} href={link}>
67+
<Card
68+
sx={{
69+
display: "flex",
70+
height: "100%",
71+
cursor: "pointer",
72+
}}
73+
>
74+
<DetailsDiv>
75+
<CardContent
76+
sx={{
77+
flex: "1 0 auto",
78+
}}
79+
>
9180
<Typography component="h6" variant="h6">
9281
{title}
9382
</Typography>
9483
<Typography style={{}} variant="subtitle1" color="textSecondary" title={title}>
9584
{description}
9685
</Typography>
9786
</CardContent>
98-
</div>
99-
<div className={classes.imageContainer}>
87+
</DetailsDiv>
88+
<ImageContainer>
10089
<Image alt={title} src={imageUrl} fill={true}></Image>
101-
</div>
90+
</ImageContainer>
10291
</Card>
103-
</Link>
92+
</StyledLink>
10493
);
10594
};
10695

96+
const DivContainer = styled("div")(({ theme }) => ({
97+
display: "flex",
98+
flexWrap: "wrap",
99+
maxWidth: "100%",
100+
}));
101+
107102
export const BucketContent: FunctionComponent<IBucketContentProps> = ({ childPages, title = "Coming next", externalLinks }) => {
108-
const classes = useStyles();
109103
const bucketItems: IBucketItem[] = Object.keys(childPages || []).map((child) => {
110104
const childData = childPages[child].metadata;
111105
const title = (childData.title || child).replace(/_/g, " ");
@@ -117,15 +111,23 @@ export const BucketContent: FunctionComponent<IBucketContentProps> = ({ childPag
117111
<>
118112
{(!!bucketItems.length || (externalLinks && !!externalLinks.length)) && (
119113
<>
120-
<Typography className={classes.h3} component="h3" variant="h3">
114+
<Typography
115+
sx={{
116+
borderTop: "1px solid",
117+
marginTop: "3.125rem !important",
118+
pt: 2, // theme.spacing(2)
119+
}}
120+
component="h3"
121+
variant="h3"
122+
>
121123
{title}
122124
</Typography>
123125
{!!bucketItems.length && (
124-
<div className={classes.container}>
126+
<DivContainer>
125127
{bucketItems.map((child, idx) => {
126128
return <SingleBucketItem key={idx} {...child} />;
127129
})}
128-
</div>
130+
</DivContainer>
129131
)}
130132
{externalLinks && (
131133
<ul>

0 commit comments

Comments
 (0)