You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Hero.jsx 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. import { Button, Typography } from '@mui/material';
  2. import { Box } from '@mui/system';
  3. import Image from 'next/image';
  4. import { useRouter } from 'next/router';
  5. import { PRODUCTS_PAGE } from '../../constants/pages';
  6. const Hero = () => {
  7. const router = useRouter();
  8. return (
  9. <>
  10. <Box
  11. sx={{
  12. display: 'flex',
  13. flexDirection: { xs: 'column', md: 'row' },
  14. width: '100%',
  15. height: { xs: '100vh', md: '1024px' },
  16. }}
  17. >
  18. <Box
  19. sx={{
  20. minWidth: '50%',
  21. width: { xs: '100%', md: '50%' },
  22. height: '100%',
  23. display: 'flex',
  24. flexDirection: 'column',
  25. justifyContent: { xs: 'space-around', md: 'center' },
  26. backgroundColor: 'primary.light',
  27. }}
  28. >
  29. <Box display="flex" flexDirection="column">
  30. <Typography
  31. variant="h1"
  32. sx={{
  33. fontSize: { xs: '96px', md: '64px', lg: '96px' },
  34. ml: 10,
  35. color: 'white',
  36. }}
  37. >
  38. Its a
  39. </Typography>
  40. <Typography
  41. variant="h1"
  42. sx={{
  43. fontSize: { xs: '96px', md: '64px', lg: '96px' },
  44. ml: 10,
  45. color: 'white',
  46. }}
  47. >
  48. {' '}
  49. Coffee Break
  50. </Typography>
  51. </Box>
  52. <Typography
  53. display="flex"
  54. justifyItems="center"
  55. sx={{
  56. fontSize: { xs: '22px', md: '18px' },
  57. ml: 10,
  58. mt: { md: '50px' },
  59. color: 'white',
  60. pr: '20%',
  61. }}
  62. >
  63. If you drink coffee regulary you will know the difference between
  64. fresh coffee and old coffee. Our goal is to provide the freshest
  65. coffee beans in each day.
  66. </Typography>
  67. <Box
  68. sx={{
  69. mt: { md: '50px' },
  70. width: '100%',
  71. display: 'flex',
  72. flexDirection: { xs: 'column', sm: 'row' },
  73. ml: { md: 10 },
  74. justifyContent: { sm: 'space-evenly', md: 'flex-start' },
  75. alignItems: { xs: 'center' },
  76. }}
  77. >
  78. <Button
  79. disableRipple
  80. sx={{
  81. backgroundColor: '#CBA213',
  82. mr: { md: 4 },
  83. height: 50,
  84. width: 150,
  85. textTransform: 'none',
  86. color: 'white',
  87. }}
  88. onClick={() => router.push(PRODUCTS_PAGE)}
  89. >
  90. Explore the Shop
  91. </Button>
  92. <Button
  93. disableRipple
  94. sx={{
  95. display: { xs: 'none', sm: 'flex' },
  96. textTransform: 'none',
  97. color: 'white',
  98. }}
  99. startIcon={
  100. <Image
  101. src="/images/Play.svg"
  102. alt="profile"
  103. width={50}
  104. height={50}
  105. />
  106. }
  107. >
  108. How to make
  109. </Button>
  110. </Box>
  111. </Box>
  112. <Box
  113. sx={{
  114. display: { xs: 'none', md: 'flex' },
  115. backgroundColor: 'white',
  116. }}
  117. >
  118. <Box
  119. sx={{ ml: { md: -12 } }}
  120. display="flex"
  121. justifyContent="center"
  122. alignItems="center"
  123. >
  124. <Image
  125. src="/images/Hero-Image.png"
  126. alt="profile"
  127. width={818}
  128. height={796}
  129. />
  130. </Box>
  131. </Box>
  132. </Box>
  133. </>
  134. );
  135. };
  136. export default Hero;