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

Ft027 diseño vista perfil y footer #50

Merged
merged 2 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
"""empty message

Revision ID: 72e27a338232
Revision ID: e36c9457bade
Revises:
Create Date: 2025-03-20 18:45:28.776433
Create Date: 2025-03-20 19:00:49.034691

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '72e27a338232'
revision = 'e36c9457bade'
down_revision = None
branch_labels = None
depends_on = None
Expand Down
4 changes: 2 additions & 2 deletions src/front/js/component/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const Footer = () => {
{/* Sección de Información */}
<div>
<h3 className="text-xl font-semibold mb-2">Sobre Nosotros</h3>
<p className="text-gray-600">Nos dedicamos a proporcionar la mejor información sobre alimentación y cuidado de tus mascotas.</p>
<p className="text-gray-600">En PupperEats queremos que tus peludos tengan la mejor calidad de vida posible. Somos defensores de la comida de calidad sin aditivos innecesarios que ofrezcan la mejor opción según las necesidades específicas de tu mascota.</p>
</div>

{/* Sección de Redes Sociales */}
Expand All @@ -27,7 +27,7 @@ export const Footer = () => {
</div>
</div>
<div className="text-center text-gray-500 text-sm mt-6">
&copy; 2024 Pupper Eats - Todos los derechos reservados
&copy; 2025 Pupper Eats - Todos los derechos reservados
</div>
</footer>
);
Expand Down
91 changes: 65 additions & 26 deletions src/front/js/pages/perfilUsuario.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useEffect, useContext, useState } from "react";
import logo from "../../img/Icono puppereats.png";
import {EdicionPerfil} from "../component/edicionPerfil";
import { EdicionPerfil } from "../component/edicionPerfil";
import { Context } from "../store/appContext";
import { User, MapPin, PlusCircle } from "lucide-react";
import { User, MapPin, PlusCircle, LogOut, ShoppingCart } from "lucide-react"; // Importar ShoppingCart para el ícono
import { useNavigate, Link } from "react-router-dom";
import "bootstrap/dist/css/bootstrap.min.css";

Expand All @@ -27,38 +27,74 @@ export const PerfilUsuario = () => {

return (
<div className="container py-5" style={{ background: "#f9f6f2", minHeight: "100vh", borderRadius: "10px" }}>
{/* Header */}
<div className="d-flex justify-content-between align-items-center mb-4">
<div>
<Link to="/" className="navbar-brand d-flex align-items-center" onClick={() => setActiveCategory(null)}>
<img src={logo} alt="Logo" style={{ height: "60px", border: "3px solid #000", borderRadius: "10px", padding: "3px" }} />
<span className="fw-bold text-dark" style={{ fontSize: "1.5rem", marginLeft: "10px" }}>Pupper Eats</span>
</Link>
<button className="btn btn-warning me-2" onClick={() => navigate("/carrito")}>🛒 Carrito</button>
<button className="btn btn-outline-secondary" onClick={actions.logout}>Cerrar sesión</button>
{/* Navbar personalizado */}
<nav className="navbar navbar-expand-lg mb-4" style={{ borderRadius: "12px", boxShadow: "0 4px 6px rgba(0, 0, 0, 0.1)", backgroundColor:"#257180" }}>
<div className="container-fluid">
{/* Logo */}
<Link to="/" className="navbar-brand d-flex align-items-center">
<img
src={logo}
alt="Logo"
style={{ height: "60px", border: "3px solid #000", borderRadius: "10px", padding: "3px" }}
/>
<span className="fw-bold text-dark ms-2" style={{ fontSize: "2.5rem" }}>Pupper Eats</span>
</Link>

{/* Botón del carrito */}
<button
className="btn btn-warning btn-sm d-flex align-items-center gap-2 ms-auto"
onClick={() => navigate("/carrito")}
style={{ borderRadius: "8px", whiteSpace: "nowrap" }} // Estilo personalizado
>
<ShoppingCart size={16} /> {/* Ícono del carrito */}
<span>Carrito</span>
</button>
</div>
</div>
</nav>

{/* Perfil de Usuario */}
<div className="card p-4 mb-4 shadow-lg" style={{ borderRadius: "12px", backgroundColor: "#fff8e1" }}>
<h2 className="text-dark">Hola, <span className="fw-bold">{store.user.name}</span> 👋</h2>
{/* Perfil usuario */}
<div className="card p-4 mb-5" style={{ borderRadius: "12px", backgroundColor: "#f9f6f2", border: "none", border: "none" }}>
<h2 className="text-dark mb-3">Hola, <span className="fw-bold">{store.user.name}</span> 👋</h2>
<button
className="btn btn-sm d-flex align-items-center gap-2"
onClick={actions.logout}
style={{ border: "none", color: "#6c757d", padding: "0" }} // Estilo personalizado
>
<LogOut size={16} /> {/* Ícono de cerrar sesión */}
<span>Cerrar sesión</span>
</button>
<div className="mt-3">
<p><User size={16} /> {store.user.name}</p>
<p><MapPin size={16} /> {store.user.email}</p>
<button className="btn btn-outline-primary" onClick={() => setIsEditModalOpen(true)}>Editar perfil</button>
<p className="d-flex align-items-center gap-2">
<User size={20} className="text-primary" /> {store.user.name}
</p>
<p className="d-flex align-items-center gap-2">
<MapPin size={20} className="text-primary" /> {store.user.email}
</p>
<button
className="btn btn-dark"
onClick={() => setIsEditModalOpen(true)}
style={{ borderRadius: "none", backgroundColor: "#FD8B51" }}
>
Editar perfil
</button>
</div>
</div>

{/* Modal de Edición de Perfil */}
<EdicionPerfil isOpen={isEditModalOpen} onClose={() => setIsEditModalOpen(false)} />

{/* Mis Mascotas */}
<h3 className="text-dark mb-3">🐾 Mis Mascotas</h3>
<div className="card p-3 shadow-lg" style={{ borderRadius: "12px", backgroundColor: "#fff" }}>
<div className="d-flex align-items-center gap-3 flex-wrap">
<button className="btn btn-outline-primary d-flex flex-column align-items-center">
<PlusCircle size={40} />
<Link to="/registro-mascota" className="btn btn-primary">Añadir perfil mascota</Link>
<h2 className="text-dark mb-4">🐾 Mis Mascotas</h2>
<div className="card p-4" style={{ borderRadius: "12px", backgroundColor: "#fff", border: "none" }}>
<div className="d-flex align-items-center gap-4 flex-wrap">
<button
className="btn btn-outline-light d-flex flex-column align-items-center justify-content-center p-3"
style={{ borderRadius: "12px", width: "120px", height: "120px", color:"#F2E5BF" }}
>
<PlusCircle size={40} className="mb-2" />
<Link to="/registro-mascota" className="text-decoration-none text-dark fs-6 fw-medium">
<span>Añadir mascota</span>
</Link>
</button>
{store.pets && store.pets.length > 0 ? (
store.pets.map((pet, index) => (
Expand All @@ -69,12 +105,15 @@ export const PerfilUsuario = () => {
style={{ cursor: "pointer" }}
>
<img
src={pet.url || "https://via.placeholder.com/60"}
src={pet.animal_type === "perro" ? "https://images.emojiterra.com/google/noto-emoji/unicode-16.0/color/1024px/1f436.png" :
pet.animal_type === "gato" ? "https://cdn-icons-png.flaticon.com/512/6988/6988878.png" :
pet.animal_type === "exotico" ? "https://cdn-icons-png.flaticon.com/512/802/802338.png" :
"https://via.placeholder.com/60" }
alt={pet.name}
className="rounded-circle border border-secondary"
style={{ width: 60, height: 60, objectFit: "cover" }}
/>
<span className="d-block mt-1 fw-semibold">{pet.name}</span>
<span className="d-block mt-2 fw-semibold">{pet.name}</span>
</div>
))
) : (
Expand Down
Empty file modified src/front/styles/home.css
100755 → 100644
Empty file.