diff --git a/site/src/App.tsx b/site/src/App.tsx index 37ae8af..a9cc7f2 100644 --- a/site/src/App.tsx +++ b/site/src/App.tsx @@ -2,7 +2,7 @@ import NavBar from './components/Navbar' import Gallery from "./components/Gallery"; import MainContent from "./components/Content"; import CustomFooter from "./components/CustomFooter"; - +import Sidebar from "./components/Sidebar"; import {Container} from "@mui/material"; @@ -13,7 +13,11 @@ function App() { <> - + + + + + ) diff --git a/site/src/components/BigCard.tsx b/site/src/components/BigCard.tsx index 5f4f777..dc4c165 100644 --- a/site/src/components/BigCard.tsx +++ b/site/src/components/BigCard.tsx @@ -35,8 +35,8 @@ function BigCard({ data, cardNum }: ComponentProps) { // [textA,textB] = [textB,textA]; // } return ( - - + + + {cardData.map((item, index) => ( diff --git a/site/src/components/Sidebar.tsx b/site/src/components/Sidebar.tsx new file mode 100644 index 0000000..ac011ff --- /dev/null +++ b/site/src/components/Sidebar.tsx @@ -0,0 +1,19 @@ +import Container from '@mui/material/Container'; +import Grid from '@mui/material/Grid'; +import {sidecardData} from "../data"; +import SmallCard from "./SmallCard" +const cardData = sidecardData + +function Content() { + return ( + + {cardData.map((item, index) => ( + + + + ))} + + ); +} + +export default Content; \ No newline at end of file diff --git a/site/src/components/SmallCard.tsx b/site/src/components/SmallCard.tsx new file mode 100644 index 0000000..abd8596 --- /dev/null +++ b/site/src/components/SmallCard.tsx @@ -0,0 +1,77 @@ +import Card from '@mui/material/Card'; +import CardActions from '@mui/material/CardActions'; +import CardContent from '@mui/material/CardContent'; +import CardHeader from '@mui/material/CardHeader'; +import CardMedia from '@mui/material/CardMedia'; +import Button from '@mui/material/Button'; +import Typography from '@mui/material/Typography'; +import Box from '@mui/material/Box'; +import { styled } from '@mui/material/styles'; +interface ComponentProps { + data: { + img: string, + title: string, + description: string[] + }, + cardNum: number; +} + + +const StyledTypography = styled(Typography)(({ theme }) => ({ + color: theme.palette.text.secondary, + textAlign: 'justify', + marginBottom: '2px', + fontSize: '12px', + padding:"5px" +})); + + + + +function SmallCard({ data, cardNum }: ComponentProps) { + // if(reverseModifier){ + // [textA,textB] = [textB,textA]; + // } + let buf=data.description.reduce((acc, val) => acc + " " + val, ""); + + if(buf.length>70){ + buf = buf.slice(0,70)+"..."; + } + + const textPart = buf; + return ( + + + + + + + {textPart} + + + {data.description} + + + + + + + + + + + ) +} + +export default SmallCard; \ No newline at end of file