Skip to content

Commit

Permalink
Fixed cosas
Browse files Browse the repository at this point in the history
  • Loading branch information
donatomartin committed Mar 1, 2024
1 parent 3f90390 commit 363b9cb
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 24 deletions.
27 changes: 7 additions & 20 deletions webapp/src/Home.jsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
import Container from "@mui/material/Container";
import Typography from "@mui/material/Typography";
import {Button} from "@mui/material";
import Particles from "./components/Particles";
import {Fragment} from "react";
import {Link} from "react-router-dom";

import { ReactComponent as Logo } from './media/logoL.svg';

function Home() {

const shadowConfig = "7px 7px 16px"
const buttonConfig = {margin: "1rem", width: "10em", height: "4em"}

return(
<Fragment>
<Particles />

<Container sx={{
position: "absolute",
height: "fit-content",
Expand All @@ -26,22 +21,14 @@ function Home() {
left: "50%",
top: "50%"}}
>
<Typography component="p" sx={{
textShadow: shadowConfig,
fontSize: {xs: "h5.fontSize", md: "h4.fontSize"}}}
>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce varius placerat mi, vitae ornare odio.
</Typography>
<Typography component="p" sx={{
textShadow: shadowConfig,
fontSize: {md: "h5.fontSize"}}}
>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce varius placerat mi, vitae ornare odio.
</Typography>
<Container className="svg-container" style={{textAlign: "center", margin: "1rem"}}>
<Logo style={{ width: '75%', height: '75%' }} />
</Container>

<Container>
<Button
variant="contained"
sx={buttonConfig}
sx={{margin: "1rem", width: "10em", height: "4em"}}
component={Link}
to="/login"
>
Expand Down
8 changes: 6 additions & 2 deletions webapp/src/components/Particles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ export default function Particles() {
particlesJS('particles-js', config);
}, []);

return <div id="particles-js" style={{
return <div id="particles-js"
style={{
position: "absolute",
height: "90%",
width: "100%",
background: "rgba(255, 255, 255)",
filter: "blur(2px)"}}></div>;
filter: "blur(2px)",
zIndex: -1,
}}
></div>;

};

26 changes: 24 additions & 2 deletions webapp/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,31 @@ import Signup from "./Signup"
import About from "./About"
import Ranking from "./Ranking"

import Particles from "./components/Particles"

import { ThemeProvider } from '@mui/material/styles';
import { createTheme } from '@mui/material/styles';

const theme = createTheme({
palette: {
primary: {
main: '#055902', // Your primary color
},
},

typography: {
fontFamily: 'Verdana, sans-serif', // Your preferred font family
fontSize: 16, // Base font size
},
// Other theme options (spacing, breakpoints, etc.)
});

const App = () => {
return (
<Fragment>
<ThemeProvider theme={theme}>
<Nav/>
<Particles/>
<Routes>
<Route path="/home" element={<Home/>} />
<Route path="/signup" element={<Signup/>} />
Expand All @@ -25,15 +46,16 @@ const App = () => {
<Route path="/ranking" element={<Ranking/>} />
<Route path="*" element={<Home/>} />
</Routes>
<Footer/>
<Footer/>
</ThemeProvider>
</Fragment>
)
}

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<BrowserRouter>
<App/>
<App/>
</BrowserRouter>
);

Expand Down

0 comments on commit 363b9cb

Please sign in to comment.