|
1 |
| -import { Box, Container } from '@mui/material'; |
| 1 | +import { Box, Container, Typography } from '@mui/material'; |
2 | 2 | import { NavLink } from 'react-router-dom';
|
3 | 3 |
|
4 | 4 | export default function TypesPage() {
|
5 | 5 | const types = ['Movies', 'Shorts', 'TV Series'];
|
6 | 6 |
|
7 |
| - // flexFormat provides the formatting options for a "flexbox" layout that enables the album cards to be displayed |
8 |
| - // side-by-side and wrap to the next line when the screen is too narrow. |
9 |
| - // Flexboxes are incredibly powerful. You can learn more on MDN web docs linked below (or many other online |
10 |
| - // resources). |
11 |
| - // https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox |
12 |
| - // const flexFormat = { display: 'flex', flexDirection: 'row', flexWrap: 'wrap', justifyContent: 'space-evenly', height: '15vh'}; |
13 |
| - |
14 | 7 | const flexFormat = {
|
15 | 8 | display: 'flex',
|
16 |
| - flexDirection: 'row', |
17 |
| - flexWrap: 'wrap', |
18 |
| - justifyContent: 'space-evenly', |
19 |
| - // justifyContent: 'center', |
| 9 | + flexDirection: 'column', // Change to column to place subtitle and boxes vertically |
20 | 10 | alignItems: 'center',
|
21 |
| - minHeight: '100vh', // Use minHeight to center vertically |
| 11 | + minHeight: '90vh', // Adjust height to move content up |
| 12 | + justifyContent: 'flex-start', // Move content to the start of the container |
| 13 | + paddingTop: '150px', // Add some padding at the top |
| 14 | + }; |
| 15 | + |
| 16 | + const boxContainerStyle = { |
| 17 | + display: 'flex', |
| 18 | + justifyContent: 'space-evenly', |
| 19 | + width: '100%', |
| 20 | + }; |
| 21 | + |
| 22 | + const boxStyle = { |
| 23 | + background: 'grey', // Set the background color to grey |
| 24 | + borderRadius: '16px', |
| 25 | + border: '2px solid grey', // Set the border color to grey |
| 26 | + color: 'white', // Set the text color to white |
| 27 | + textAlign: 'center', // Center the text |
| 28 | + fontSize: '22px', |
| 29 | + margin: '20px', // Increase the spacing between boxes |
| 30 | + padding: '20px', // Add padding to make the boxes larger |
| 31 | + transition: 'transform 0.2s', // Add transition for hover effect |
| 32 | + }; |
| 33 | + |
| 34 | + const boxHoverStyle = { |
| 35 | + transform: 'scale(1.1)', // Increase the size slightly on hover |
| 36 | + }; |
| 37 | + |
| 38 | + const subtitleStyle = { |
| 39 | + marginBottom: '20px', // Adjust the spacing between subtitle and boxes |
| 40 | + textAlign: 'center', |
| 41 | + fontSize: '24px', // Add styling to the subtitle |
| 42 | + fontWeight: 'bold', |
22 | 43 | };
|
23 | 44 |
|
24 | 45 | return (
|
25 | 46 | <Container style={flexFormat}>
|
26 |
| - {types.map((type) => |
27 |
| - <Box |
28 |
| - key={type} |
29 |
| - p={3} |
30 |
| - m={2} |
31 |
| - // style={{ background: 'black', borderRadius: '16px', border: '2px solid #000' }} |
32 |
| - style={{ |
33 |
| - background: 'black', |
34 |
| - borderRadius: '16px', |
35 |
| - border: '2px solid #000', |
36 |
| - color: 'red', // Set the text color to red |
37 |
| - textAlign: 'center', // Center the text |
38 |
| - fontSize: '22px', |
39 |
| - }} |
40 |
| - > |
41 |
| - {/* <h4><NavLink to={`/search_productions/${type}`}>{type}</NavLink></h4> */} |
42 |
| - <h4> |
43 |
| - <NavLink to={`/search_productions/${type}`} style={{ color: 'red' }}> |
| 47 | + <Typography variant="h6" style={subtitleStyle}> |
| 48 | + Choose a Production Type to Search For |
| 49 | + </Typography> |
| 50 | + <Container style={boxContainerStyle}> |
| 51 | + {types.map((type) => |
| 52 | + <Box |
| 53 | + key={type} |
| 54 | + p={3} |
| 55 | + m={2} |
| 56 | + style={boxStyle} |
| 57 | + sx={{ |
| 58 | + '&:hover': boxHoverStyle, // Apply hover effect |
| 59 | + }} |
| 60 | + > |
| 61 | + <h4> |
| 62 | + <NavLink to={`/search_productions/${type}`} style={{ color: 'white' }}> |
44 | 63 | {type}
|
45 | 64 | </NavLink>
|
46 |
| - </h4> |
47 |
| - </Box> |
48 |
| - )} |
| 65 | + </h4> |
| 66 | + </Box> |
| 67 | + )} |
| 68 | + </Container> |
49 | 69 | </Container>
|
50 | 70 | );
|
51 |
| - |
52 |
| - |
53 | 71 | };
|
0 commit comments