Skip to content

Commit

Permalink
Add StartPage
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexThundrous committed Oct 6, 2023
1 parent 11deb8c commit 88a1411
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 17 deletions.
49 changes: 33 additions & 16 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { ChakraProvider, Box, theme, Show } from '@chakra-ui/react';
import React, {useState, useEffect} from 'react';
import { ChakraProvider, Box, theme, Show, Fade } from '@chakra-ui/react';
import EventsMobile from './Components/Events/EventsMobile';
import Events from './Components/Events/events';
import './App.css';
Expand All @@ -8,23 +8,40 @@ import './App.css';
import Footer from './Components/Footer';
import Carousel from './Pages/Carousel';
import MediaPage from './Pages/MediaPage';
import StartPage from './Pages/StartPage';
function App() {
const [isLoading, setIsLoading] = useState(true);

useEffect(() => {
const timer = setTimeout(() => {
setIsLoading(false);
}, 6900);

return () => clearTimeout(timer);
}, []);


return (
<ChakraProvider theme={theme}>
<Box className='app-container' textAlign='center' fontSize='xl'>
<div style={{ overflowX: 'hidden' }}>
<HomePage />
</div>
<Show above='750px'>
<Events />
</Show>
<Show below='749px'>
<EventsMobile />
</Show>
<Carousel />
<MediaPage />
<Footer />
</Box>
{isLoading ?
<Fade in={isLoading} duration={0.2} transition="ease">
<StartPage />
</Fade> :
( <Box className='app-container' textAlign='center' fontSize='xl'>
<div style={{ overflowX: 'hidden' }}>
<HomePage />
</div>
<Show above='750px'>
<Events />
</Show>
<Show below='749px'>
<EventsMobile />
</Show>
<Carousel />
<MediaPage />
<Footer />
</Box> )
}
</ChakraProvider>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Components/ModalDesktop.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ const ModalDesktop = props => {
>
{CircleCol}
</Heading>
{CircleCol == '' ? <Image src={picture} /> : null}
{CircleCol === '' ? <Image src={picture} /> : null}
</motion.div>
</motion.div>
</motion.div>
Expand Down
30 changes: 30 additions & 0 deletions src/Pages/StartPage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from 'react';
import gif from '../assets/WavesAnimGIF_DevSoc.gif';

export default function StartPage () {
return (
<div
style={{
width: '100vw',
height: '100vh',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
overflow: 'hidden',
}}
>
<img
src={gif}
alt="Animated Waves"
style={{
maxWidth: '100%',
maxHeight: '100%',
width: 'auto',
height: 'auto',
}}
/>
</div>
);
};


Binary file added src/assets/WavesAnimGIF_DevSoc.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 88a1411

Please sign in to comment.