Skip to content

Commit c27860e

Browse files
authored
Merge branch 'develop' into ft001-base-de-datos
2 parents 7d0dd7b + 6b0da17 commit c27860e

File tree

9 files changed

+164
-37
lines changed

9 files changed

+164
-37
lines changed

migrations/versions/2e3a70a695d4_.py

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
"""empty message
2+
3+
Revision ID: 2e3a70a695d4
4+
Revises:
5+
Create Date: 2025-02-28 10:57:49.125716
6+
7+
"""
8+
from alembic import op
9+
import sqlalchemy as sa
10+
11+
12+
# revision identifiers, used by Alembic.
13+
revision = '2e3a70a695d4'
14+
down_revision = None
15+
branch_labels = None
16+
depends_on = None
17+
18+
19+
def upgrade():
20+
# ### commands auto generated by Alembic - please adjust! ###
21+
op.create_table('user',
22+
sa.Column('id', sa.Integer(), nullable=False),
23+
sa.Column('email', sa.String(length=120), nullable=False),
24+
sa.Column('password', sa.String(length=80), nullable=False),
25+
sa.Column('is_active', sa.Boolean(), nullable=False),
26+
sa.PrimaryKeyConstraint('id'),
27+
sa.UniqueConstraint('email')
28+
)
29+
# ### end Alembic commands ###
30+
31+
32+
def downgrade():
33+
# ### commands auto generated by Alembic - please adjust! ###
34+
op.drop_table('user')
35+
# ### end Alembic commands ###

package-lock.json

+16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
"prop-types": "^15.6.1",
7777
"react": "^16.8.4",
7878
"react-dom": "^16.8.4",
79+
"react-icons": "^5.5.0",
7980
"react-polyfills": "0.0.1",
8081
"react-router-dom": "^6.3.0"
8182
}

src/api/routes.py

+1
Original file line numberDiff line numberDiff line change
@@ -224,3 +224,4 @@ def create_pet():
224224
# })
225225

226226

227+

src/front/js/component/card.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React, { Component } from "react";
2+
3+
export const Card = () => {
4+
return (
5+
<div className="card m-2" style={{ width: "18rem" }}>
6+
<img
7+
src="https://static.zoomalia.com/prod_img/46527/la_53533e8075e9970de0cfea955afd4644bb21537446021.jpg"
8+
style={{ width: "150px", height: "200px" }}
9+
className="card-img-top mx-auto d-block mt-2"
10+
alt="..."
11+
/>
12+
<div className="card-body text-center">
13+
<h5 className="card-title">Título</h5>
14+
<p className="card-text">Some quick example text to build on the card.</p>
15+
</div>
16+
<div className="mt-auto text-center">
17+
<button className="btn btn-primary m-2">Añadir carrito</button>
18+
</div>
19+
</div>
20+
);
21+
}

src/front/js/component/footer.js

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import React, { Component } from "react";
22

3-
export const Footer = () => (
4-
<footer className="footer mt-auto py-3 text-center">
5-
<p>
6-
Made with <i className="fa fa-heart text-danger" /> by{" "}
7-
<a href="http://www.4geeksacademy.com">4Geeks Academy</a>
8-
</p>
9-
</footer>
10-
);
3+
export const Footer = () => {
4+
return (
5+
<div className="card text-center" style={{maxWidth:"100%"}}>
6+
<div className="card-header">
7+
Footer
8+
</div>
9+
<div className="card-body">
10+
<h5 className="card-title">Special title treatment</h5>
11+
<p className="card-text">With supporting text below as a natural lead-in to additional content.</p>
12+
</div>
13+
</div>
14+
);
15+
};

src/front/js/component/navbar.js

+38-14
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,43 @@
11
import React from "react";
22
import { Link } from "react-router-dom";
3+
import { CiSearch } from "react-icons/ci";
4+
5+
36

47
export const Navbar = () => {
5-
return (
6-
<nav className="navbar navbar-light bg-light">
7-
<div className="container">
8-
<Link to="/">
9-
<span className="navbar-brand mb-0 h1">React Boilerplate</span>
10-
</Link>
11-
<div className="ml-auto">
12-
<Link to="/demo">
13-
<button className="btn btn-primary">Check the Context in action</button>
14-
</Link>
15-
</div>
16-
</div>
17-
</nav>
18-
);
8+
return (
9+
<nav className="navbar navbar-expand-lg bg-light">
10+
<div className="container-fluid">
11+
<a className="navbar-brand" href="#">Pupper Eats</a>
12+
<button className="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
13+
<span className="navbar-toggler-icon"></span>
14+
</button>
15+
<div className="collapse navbar-collapse" id="navbarSupportedContent">
16+
<form className="d-flex" role="search">
17+
<input className="form-control me-2" type="search" placeholder="Search" aria-label="Search" />
18+
<button className="btn btn-outline-success" type="submit">
19+
<CiSearch />
20+
</button>
21+
</form>
22+
<ul className="navbar-nav mx-auto mb-2 mb-lg-0">
23+
<li className="nav-item m-3">
24+
<a className="nav-link active" aria-current="page" href="#">Caninos</a>
25+
</li>
26+
<li className="nav-item m-3">
27+
<a className="nav-link" href="#">Felinos</a>
28+
</li>
29+
<li className="nav-item m-3">
30+
<a className="nav-link" href="#">Exóticos</a>
31+
</li>
32+
</ul>
33+
<ul className="navbar-nav mb-2 mb-lg-0">
34+
<li className="nav-item">
35+
<button type="button" className="btn btn-primary" href="#">Registro/Inicio"</button>
36+
{/* <!--Pendiente linkear al formulario de registro cuando esté terminado--> */}
37+
</li>
38+
</ul>
39+
</div>
40+
</div>
41+
</nav>
42+
);
1943
};

src/front/js/pages/home.js

+38-14
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,50 @@
11
import React, { useContext } from "react";
22
import { Context } from "../store/appContext";
3-
import rigoImageUrl from "../../img/rigo-baby.jpg";
3+
import { Card } from "../component/card";
44
import "../../styles/home.css";
55

66
export const Home = () => {
77
const { store, actions } = useContext(Context);
88

99
return (
10-
<div className="text-center mt-5">
11-
<h1>Hello Rigo!!</h1>
12-
<p>
13-
<img src={rigoImageUrl} />
14-
</p>
15-
<div className="alert alert-info">
16-
{store.message || "Loading message from the backend (make sure your python backend is running)..."}
10+
11+
<div className="container m-0">
12+
<div className="text-center"> {/* Centra la imagen */}
13+
<img
14+
className="img-fluid"
15+
src="https://animalesde.net/wp-content/uploads/2016/12/los-animales-dom%C3%A9sticos.jpg"
16+
alt="Banner"
17+
/>
18+
</div>
19+
<div className="sección perros m-5">
20+
<h3>Productos top para perros</h3>
21+
<div className="row">
22+
<Card className="col-md-3" />
23+
<Card className="col-md-3" />
24+
<Card className="col-md-3" />
25+
<Card className="col-md-3" />
26+
</div>
27+
</div>
28+
29+
<div className="sección gatos m-5">
30+
<h3>Productos top para gatos</h3>
31+
<div className="row">
32+
<Card className="col-md-3" />
33+
<Card className="col-md-3" />
34+
<Card className="col-md-3" />
35+
<Card className="col-md-3" />
36+
</div>
37+
</div>
38+
39+
<div className="sección exóticos m-5">
40+
<h3>Productos top para animales exóticos</h3>
41+
<div className="row">
42+
<Card className="col-md-3" />
43+
<Card className="col-md-3" />
44+
<Card className="col-md-3" />
45+
<Card className="col-md-3" />
46+
</div>
1747
</div>
18-
<p>
19-
This boilerplate comes with lots of documentation:{" "}
20-
<a href="https://start.4geeksacademy.com/starters/react-flask">
21-
Read documentation
22-
</a>
23-
</p>
2448
</div>
2549
);
2650
};

src/front/styles/home.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
All pages share the styles on index.css but you should create
55
one more css for each page that will contain the selected used
66
on that page only (the ones not reused in other pages).
7-
*/
7+
*/

0 commit comments

Comments
 (0)