Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uo277382 #53

Merged
merged 15 commits into from
Mar 9, 2024
1 change: 1 addition & 0 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added webapp/public/background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added webapp/public/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 12 additions & 10 deletions webapp/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@ import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import Navbar from "./components/Navbar";
import Home from "./components/Home";
import Inicio from './components/Inicio';
import Primera from './components/Primera';

function App() {

return (
<Router>
<Navbar />
<main className="main-content">
<Routes>
<Route path="/" element={<Inicio />} />
<Route path={process.env.RUTA_HOME || '/home'} element={<Home />} />
</Routes>
</main>
</Router>

<Router>
<Navbar />
<main className="main-content">
<Routes>
<Route path={process.env.RUTA_INICIO || '/'} element={<Primera />} />
<Route path={process.env.RUTA_LOGIN || '/login'} element={<Inicio />} />
<Route path={process.env.RUTA_HOME || '/home'} element={<Home />} />
</Routes>
</main>
</Router>

);
}

Expand Down
4 changes: 2 additions & 2 deletions webapp/src/App.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { render, screen } from '@testing-library/react';
import App from './App';

test('renders learn react link', () => {
test('renders primera', () => {
render(<App />);
const linkElement = screen.getByText(/Welcome to the 2024 edition of the Software Architecture course/i);
const linkElement = screen.getByText(/Saber y Ganar: El Juego/i);
expect(linkElement).toBeInTheDocument();
});
2 changes: 1 addition & 1 deletion webapp/src/components/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Navbar = () => {
</li>

<li className="nav-item">
<NavLink to={process.env.RUTA_INICIO || '/'} className="nav__link">
<NavLink to={process.env.RUTA_LOGIN || '/login'} className="nav__link">
Login
</NavLink>
</li>
Expand Down
18 changes: 18 additions & 0 deletions webapp/src/components/Primera.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

body:has(.box)
{
height: 100vh;
background-image: url("../../public/background.png");
background-repeat: no-repeat;
background-position: top;
background-size:cover;
}


.box .MuiTypography-h5
{
color:black;
background-color: white;
border: 0.2em solid black;
border-radius: 10em;
}
22 changes: 22 additions & 0 deletions webapp/src/components/Primera.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import CssBaseline from '@mui/material/CssBaseline';
import Container from '@mui/material/Container';
import Typography from '@mui/material/Typography';
import "./Primera.css";

function Primera() {



return (
<div class="box">
<Container>
<CssBaseline />
<Typography component="h1" variant="h5" align="center" sx={{ marginTop: 20 }}>
Saber y Ganar: El Juego
</Typography>
</Container>
</div>
);
}

export default Primera;
8 changes: 8 additions & 0 deletions webapp/src/components/Primera.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { render, screen } from '@testing-library/react';
import Primera from './Primera';

test('renders learn react link', () => {
render(<Primera />);
const linkElement = screen.getByText(/Saber y Ganar: El Juego/i);
expect(linkElement).toBeInTheDocument();
});
Loading