diff --git a/components/Carousel.tsx b/components/Carousel.tsx new file mode 100644 index 0000000..db1c903 --- /dev/null +++ b/components/Carousel.tsx @@ -0,0 +1,129 @@ +import { Box, Image } from '@chakra-ui/react'; +import React, { useState } from 'react'; +import { FaArrowCircleRight, FaArrowCircleLeft } from 'react-icons/fa'; +import MediaQuery from 'react-responsive'; +// help from: https://www.youtube.com/watch?v=l1MYfu5YWHc :) + +const images = [ + 'https://lh3.googleusercontent.com/pw/ACtC-3eAOr_3m8nkwHFxUGVCocpqAsfRXF9iBmFBJ9Vsu6cUNNBf1KblJizIy-ouzALEPFiO3cPxHnBdcnGmWSzupTLDEdmjrjyTsEiG9OnGPSL_Oq8VED1IQ3Wn3MSpokTIJXZANbbmcmg3Loq_rv-YK_8jJQ=w1258-h944-no?authuser=0', + 'https://lh3.googleusercontent.com/pw/ACtC-3eRo1AoiFwa2Ae5_SHXdEWVHcCEOIELaImOC832EgsRSCjUmjfXXEPd9QMvYfiHfCW9yJhZWFc_Zj0pwBMcBf4MeqOEV-QwLYD8CTOjzWudM8BcO1Zj-cnOtQGdliJ8ggUliYJcorb-tbWrOGob4eXCAA=w1258-h944-no?authuser=0', + 'https://lh3.googleusercontent.com/pw/ACtC-3cnkp2xlwwIbF8sYZ4U3ODlOg4MHlX4UNA2ZhM8XQ01IYLkT5ig7VmCMyHoJHz2-cBehp4_7kwn7jK7d5ruXbLUeLiqtHjuglkXUX4j8bll4x0AjNzZg9424ep6VQqEgCh9TOUdhc3qGgEoAmMt_PFLzg=w1258-h944-no?authuser=0', +]; + +const Carousel = () => { + const [current, setCurrent] = useState(0); + const increment = () => setCurrent((current + 1) % images.length); + const decrement = () => { + setCurrent(current !== 0 ? current - 1 : images.length - 1); + }; + return ( + <> + + + + {images.map((src, key) => ( + + {key === current && ( + + )} + + ))} + + + + + + + {images.map((src, key) => ( + + {key === current && ( + + )} + + ))} + + + + + ); +}; + +export default Carousel; diff --git a/components/Floating.tsx b/components/Floating.tsx index 2c5797e..f19990a 100644 --- a/components/Floating.tsx +++ b/components/Floating.tsx @@ -4,26 +4,23 @@ import MediaQuery from 'react-responsive'; import Link from 'next/link'; const Floating = () => { - const ans = '1'; return ( <> - - - + @@ -38,6 +35,7 @@ const Floating = () => { bottom: '0', width: '100%', height: '80px', + zIndex: 100, position: 'fixed', }} > diff --git a/components/Nav.tsx b/components/Nav.tsx index da275f9..ca3031b 100644 --- a/components/Nav.tsx +++ b/components/Nav.tsx @@ -27,21 +27,21 @@ const Nav: FC = ({ l1, l2, l3 }) => { color="whitesmoke" style={{ fontSize: '20px', fontWeight: 'bold' }} > - {l1} + {l1} - {l2} + {l2} - {l3} + {l3} ); diff --git a/pages/Calendar.tsx b/pages/Calendar.tsx index 598d35c..a741681 100644 --- a/pages/Calendar.tsx +++ b/pages/Calendar.tsx @@ -7,7 +7,7 @@ import MediaQuery from 'react-responsive'; const Calendar = () => { return ( - + <> Calendar @@ -105,7 +105,7 @@ const Calendar = () => {