diff --git a/.vscode/settings.json b/.vscode/settings.json
index 7bd07e2e82..7f1bff12d5 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -6,5 +6,8 @@
},
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
+ },
+ "[javascriptreact]": {
+ "editor.defaultFormatter": "vscode.typescript-language-features"
}
}
diff --git a/Pipfile.lock b/Pipfile.lock
index 68cca804a6..6d7703c2a2 100644
--- a/Pipfile.lock
+++ b/Pipfile.lock
@@ -377,7 +377,6 @@
],
"markers": "python_version >= '3.9'",
"version": "==2.10.1"
-
},
"python-dotenv": {
"hashes": [
diff --git a/migrations/versions/5cf725964086_.py b/migrations/versions/cb544095a50b_.py
similarity index 93%
rename from migrations/versions/5cf725964086_.py
rename to migrations/versions/cb544095a50b_.py
index 3c4b693934..373038b2e3 100644
--- a/migrations/versions/5cf725964086_.py
+++ b/migrations/versions/cb544095a50b_.py
@@ -1,8 +1,8 @@
"""empty message
-Revision ID: 5cf725964086
-Revises: e882aaa7e01e
-Create Date: 2024-11-30 11:31:26.832067
+Revision ID: cb544095a50b
+Revises: d6e7917535b2
+Create Date: 2024-12-11 22:58:32.170013
"""
from alembic import op
@@ -10,8 +10,8 @@
# revision identifiers, used by Alembic.
-revision = '5cf725964086'
-down_revision = 'e882aaa7e01e'
+revision = 'cb544095a50b'
+down_revision = 'd6e7917535b2'
branch_labels = None
depends_on = None
@@ -21,7 +21,7 @@ def upgrade():
op.create_table('breed',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(length=30), nullable=True),
- sa.Column('species', sa.Enum('perro', 'gato', 'ave', 'conejo', 'otro', name='species'), nullable=False),
+ sa.Column('species', sa.Enum('perro', 'gato', 'ave', 'conejo', 'reptil', 'otro', name='species'), nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_table('pet',
diff --git a/migrations/versions/65ec0a935ab9_.py b/migrations/versions/d6e7917535b2_.py
similarity index 89%
rename from migrations/versions/65ec0a935ab9_.py
rename to migrations/versions/d6e7917535b2_.py
index 6b1dc1c9a0..226461e361 100644
--- a/migrations/versions/65ec0a935ab9_.py
+++ b/migrations/versions/d6e7917535b2_.py
@@ -1,8 +1,8 @@
"""empty message
-Revision ID: 65ec0a935ab9
+Revision ID: d6e7917535b2
Revises:
-Create Date: 2024-11-27 23:26:32.249259
+Create Date: 2024-12-03 00:34:48.862682
"""
from alembic import op
@@ -10,7 +10,7 @@
# revision identifiers, used by Alembic.
-revision = '65ec0a935ab9'
+revision = 'd6e7917535b2'
down_revision = None
branch_labels = None
depends_on = None
diff --git a/migrations/versions/e882aaa7e01e_.py b/migrations/versions/e882aaa7e01e_.py
deleted file mode 100644
index 45864ac075..0000000000
--- a/migrations/versions/e882aaa7e01e_.py
+++ /dev/null
@@ -1,35 +0,0 @@
-"""empty message
-
-Revision ID: e882aaa7e01e
-Revises:
-Create Date: 2024-11-30 11:14:24.658166
-
-"""
-from alembic import op
-import sqlalchemy as sa
-
-
-# revision identifiers, used by Alembic.
-revision = 'e882aaa7e01e'
-down_revision = None
-branch_labels = None
-depends_on = None
-
-
-def upgrade():
- # ### commands auto generated by Alembic - please adjust! ###
- op.create_table('user',
- sa.Column('id', sa.Integer(), nullable=False),
- sa.Column('email', sa.String(length=120), nullable=False),
- sa.Column('password', sa.String(length=80), nullable=False),
- sa.Column('is_active', sa.Boolean(), nullable=False),
- sa.PrimaryKeyConstraint('id'),
- sa.UniqueConstraint('email')
- )
- # ### end Alembic commands ###
-
-
-def downgrade():
- # ### commands auto generated by Alembic - please adjust! ###
- op.drop_table('user')
- # ### end Alembic commands ###
diff --git a/src/api/admin.py b/src/api/admin.py
index 3eecb64140..12b3d411ea 100644
--- a/src/api/admin.py
+++ b/src/api/admin.py
@@ -1,7 +1,7 @@
import os
from flask_admin import Admin
-from .models import db, User
+from .models import db, User, Pet, Post_Description, Breed
from flask_admin.contrib.sqla import ModelView
def setup_admin(app):
@@ -12,6 +12,9 @@ def setup_admin(app):
# Add your models here, for example this is how we add a the User model to the admin
admin.add_view(ModelView(User, db.session))
+ admin.add_view(ModelView(Pet, db.session))
+ admin.add_view(ModelView(Post_Description, db.session))
+ admin.add_view(ModelView(Breed, db.session))
# You can duplicate that line to add mew models
# admin.add_view(ModelView(YourModelName, db.session))
\ No newline at end of file
diff --git a/src/api/models.py b/src/api/models.py
index 534e858ab4..82704652f4 100644
--- a/src/api/models.py
+++ b/src/api/models.py
@@ -48,7 +48,7 @@ class Pet(db.Model):
__tablename__ ="pet"
id = db.Column (db.Integer, primary_key=True)
name = db.Column (db.String(30))
- breed = db.Column (db.Integer, db.ForeignKey("breed.id"))
+ breed = db.Column (db.Integer, db.ForeignKey("breed.id")) # bread_id
gender = db.Column (db.Enum(Genders))
color = db.Column (db.String(15))
photo_1 = db.Column (db.String(120), nullable=False)
@@ -58,15 +58,14 @@ class Pet(db.Model):
user_id = db.Column (db.Integer, db.ForeignKey("user.id"))
user = db.relationship ("User", back_populates="pet")
post = db.relationship("Post_Description", back_populates="pet_relationship")
- breed_relationship = db.relationship("Breed", back_populates= "pets")
+ breed_relationship = db.relationship("Breed", back_populates= "pets") # breed
def __repr__(self):
- return f''
+ return f''
def serialize(self):
return{
"name" : self.name,
- "species" : self.species,
"breed" : self.breed,
"color": self.color,
"photo_1": self.photo_1,
diff --git a/src/app.py b/src/app.py
index 8aa49f6c42..403fe831d8 100644
--- a/src/app.py
+++ b/src/app.py
@@ -218,6 +218,15 @@ def create_post_description():
return jsonify({'msg':'Post creado exitosamente', 'data': new_post.serialize()}), 201
#######
+#GET All pets Matias 17:46PM 3/12/24..Update: working 11:43AM 4/12/24
+@app.route('/pets', methods=['GET'])
+def get_all_pets():
+ pets = Pet.query.all()
+ pets_serialized = []
+ for pet in pets:
+ pets_serialized.append(pet.serialize())
+ return jsonify({'msg': 'ok', 'data': pets_serialized}), 200
+
# any other endpoint will try to serve it like a static file
@app.route('/', methods=['GET'])
diff --git a/src/front/js/App.js b/src/front/js/App.js
new file mode 100644
index 0000000000..9f848d4022
--- /dev/null
+++ b/src/front/js/App.js
@@ -0,0 +1,18 @@
+import React from "react";
+import { PasswordResetProvider } from "./PasswordResetContext"; // Importamos el proveedor
+import ResetPassword from "./ResetPassword"; // Importamos el componente de recuperación de contraseña
+import PetsView from "./PetsView"; // Vista de mascotas
+
+function App() {
+ return (
+
+
+
Aplicación de Recuperación de Contraseña y Mascotas
+
{/* Componente de recuperación de contraseña */}
+
{/* Componente de vista de mascotas */}
+
+
+ );
+}
+
+export default App;
diff --git a/src/front/js/component/Filters.js b/src/front/js/component/Filters.js
new file mode 100644
index 0000000000..c561a1cf71
--- /dev/null
+++ b/src/front/js/component/Filters.js
@@ -0,0 +1,46 @@
+import React from "react";
+import "../../styles/pets-view.css";
+
+const Filters = ({ onFilterChange }) => {
+ return (
+
+ );
+};
+
+export default Filters;
diff --git a/src/front/js/component/PetCard.jsx b/src/front/js/component/PetCard.jsx
new file mode 100644
index 0000000000..11338a6329
--- /dev/null
+++ b/src/front/js/component/PetCard.jsx
@@ -0,0 +1,225 @@
+import React, { useContext, useState, useEffect } from "react";
+import { Context } from "../store/appContext";
+import { useParams } from "react-router-dom";
+
+const PetCard = () => {
+ const { store } = useContext(Context);
+ const { theid } = useParams();
+ const [detail, setDetail] = useState(null);
+ const [mainImage, setMainImage] = useState("https://cdn.pixabay.com/photo/2023/11/12/17/12/puppy-8383633_1280.jpg"); // Imagen principal inicial
+
+ const findDetail = () => {
+ const result = store.petData.find((item) => item.id == theid);
+ setDetail(result);
+ setMainImage(result?.image || "https://cdn.pixabay.com/photo/2023/11/12/17/12/puppy-8383633_1280.jpg"); // Establecemos la imagen principal
+ };
+
+ useEffect(() => {
+ findDetail();
+ }, [theid]);
+
+ return (
+
+ {/* Navigation path */}
+
+
+
+ {/* Imagen y carrousel */}
+
+ {/* Imagen principal */}
+
+
+
+
+ {/* Miniaturas debajo de la imagen principal */}
+
+
setMainImage("https://via.placeholder.com/600x400")}
+ />
+
setMainImage("https://via.placeholder.com/600x400/ff7f7f")}
+ />
+
setMainImage("https://via.placeholder.com/600x400/7fff7f")}
+ />
+
setMainImage("https://cdn.pixabay.com/photo/2023/11/12/17/12/puppy-8383633_1280.jpg")}
+ />
+
+
+ {/* Botón Share debajo de la carrousel */}
+
+
+
+ {/* Pet details */}
+
+
{detail?.name}
+
+ Perdido/Encontrado el {detail?.lostDate}
+
+
+ Comunicarse
+
+
+
+
+ NOMBRE: |
+ {detail?.name} |
+
+
+ SEXO: |
+ {detail?.gender} |
+
+
+ EDAD: |
+ {detail?.age} |
+
+
+ TAMAÑO:
+ |
+ {detail?.size} |
+
+
+ COLOR: |
+ {detail?.color} |
+
+
+ SE PERDIÓ EN: |
+ {detail?.location} |
+
+
+
+
+ INFORMACIÓN ADICIONAL: {detail?.additionalInfo}
+
+
+
+
+ {/* Modal para contacto */}
+
+
+ );
+};
+
+export default PetCard;
diff --git a/src/front/js/component/PetView.jsx b/src/front/js/component/PetView.jsx
new file mode 100644
index 0000000000..3074bc2fc6
--- /dev/null
+++ b/src/front/js/component/PetView.jsx
@@ -0,0 +1,269 @@
+import React, { useState, useEffect } from "react";
+import { Link } from "react-router-dom";
+
+const PetsView = () => {
+ // Estado para los datos y los filtros
+ const [pets, setPets] = useState([]);
+ const [filteredPets, setFilteredPets] = useState([]);
+ const [filters, setFilters] = useState({
+ type: "", // Tipo de mascota (perro, gato, etc.)
+ color: "", // Color de la mascota
+ size: "", // Tamaño de la mascota
+ sex: "", // Sexo de la mascota (macho o hembra)
+ });
+
+const BringAllPetsAPI = () => {
+ fetch('https://super-duper-dollop-x5rqv9jj6pv7cvx4p-3001.app.github.dev/pets')
+ .then((resp) => resp.json())
+ .then((data) => {
+ setPets(data.data);
+ setFilteredPets(data.data); // Mostrar todo inicialmente
+ })
+}
+
+
+ // Simulación de datos o carga desde una API
+ useEffect(() => {
+ const petData = [
+ { id: 1, name: "Max", type: "Perro", color: "Negro", sex: "Macho", size: "Grande", image: "" },
+ { id: 2, name: "Bella", type: "Gato", color: "Amarillo", sex: "Hembra", size: "Pequeño", image:"" },
+ { id: 3, name: "Rocky", type: "Perro", color: "marrón", size: "Mediano", image: "" },
+ { id: 4, name: "Spike", type: "gato", color: "verde", sex:"macho", size: "Pequeño", image: "" },
+ { id: 5, name: "Luna", type: "otro", color: "gris", size: "Grande", image: "" },
+ { id: 6, name: "Chameleon", type: "reptil", color: "multicolor", size: "Pequeño", image: "https://mundoreptil.net/wp-content/uploads/primer-plano-increible-habilidad.webp" },
+ { id: 7, name: "Blanquita", type: "otro", color: "Blanco y Negro", size: "Pequeño", image: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSfkhMZAkUKlthC2a_1jMkEhoMzNakBrJcegQ&s" },
+ { id: 8, name: "Bella", type: "gato", color: "blanco", size: "pequeño", image: "https://vitalcan.es/wp-content/uploads/kitty-2903812_1280.jpg" },
+ { id: 9, name: "Bella", type: "gato", color: "blanco", size: "pequeño", image: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxISEhUTEhIVFRUWFxUVFRUVFhUVFRUVFRUWFhUVFRUYHSggGBolGxUVITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OFQ8QFy0dFR0tLS0tLS0rLSsrLS0tLS0tLS0tLSstKy0tLS0rLS0tLS0tLS0tLS0tLSstLS0rLTctLf/AABEIALcBEwMBIgACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAAFAAECAwQGBwj/xAA5EAACAQIDBgQEBQMDBQAAAAAAAQIDEQQhMQUSQVFhcQaBkfATIqGxBzLB0eEUQvEjM1IXJFNicv/EABkBAQEBAQEBAAAAAAAAAAAAAAABAgMEBf/EAB4RAQEBAQADAQEBAQAAAAAAAAABEQIDITESQVET/9oADAMBAAIRAxEAPwDVUMGICFQH4kyqjDanS7CV5pdG/oczhdTpNiStUj5r6FgI4qGeZTGy4mzEzz0KFLoV0X4as4u6fpp6cAjUpwrxtLKX9sveoLppdn3NFKLi7r+O/cM2BeLwkqct2S8+DXN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vf3LY56F8qCY8aACgTiiW4PBFFsMiepWmTiggVtLw7SrO8kBsT+G+Fnqn+x2sUSiB5wvwpwyesvUhU/DDD/wBqPTt0rlAK8x/6aUI57t31AO3vCqpL8rfRZHs8oXMtbAQlrFMI+dp7LqXypLzuI9+exqX/AAXoII8VnjCl4sGOTEkzy/8AR575xXD17yR02Alc43Bp7x2OzVkjfHWunj8n6FLZDpD2yHjE7O56SvkvU306Xpz4sz00vI2Up8/8EElQ55LlxZVVi3pkuX7l8ZXdlqSqZIYBtX5e/v3YwSVs9W3lxv1YSq07mWtR1fkvfb7mVZfitNJPq3zfP3+o0HKeSfu/3FHJ5muhFLTL7gacBstKN3x1vxDsKCUU0tFoAIVpXWenoEFtPdRo0U+EpJPdSf0KKuBpyWdupno7VT0yMeJrO97++ATVFfDODstPsX4em156/qJTT7m3B0tLkG7C0/f7m6JXQiaVT4lRBImkT3RiiDY8UPqSi7FDpEoj3uPCIRKJakVltMKkkKSJWHsBRKI1i2UStoCDiMTEB8zRZNMQj5z5a3Cv5kdjs9ZIQjv4Xo8AtYdIQj1PYthz+hdCXFiEQX06m6urzZFyuIRFRlErqQy99/2EIgwVqRRZoQjNVKNVrQm6ohE1Uqc+JdC7EIuoIYKgGsPSHEaiNtOJfBiEaiJNkWhCKGUR3TGEA26XUxCAmyykIQF6Q4hEEWVyQhEFTEIRof/Z" },
+ // Más datos...
+ ];
+ setPets(petData);
+ setFilteredPets(petData); // Mostrar todo inicialmente
+ }, []);
+
+ // Manejar cambios en los filtros
+ const handleFilterChange = (e) => {
+ const { name, value } = e.target;
+ setFilters({
+ ...filters,
+ [name]: value,
+ });
+ };
+
+ // Filtrar mascotas
+ useEffect(() => {
+ const filtered = pets.filter((pet) => {
+ return (
+ (filters.type === "" || pet.type === filters.type) &&
+ (filters.color === "" || pet.color === filters.color) &&
+ (filters.size === "" || pet.size === filters.size) &&
+ (filters.sex === "" || pet.sex === filters.sex)
+ );
+ });
+ setFilteredPets(filtered);
+ }, [filters, pets]);
+ return (
+
+
+ {/* Columna de Filtros */}
+
+
+
Filtrar por:
+ {/* Filtro por sexo */}
+
+
+
+
+ {/* Filtro por tipo */}
+
+
+
+
+
+ {/* Filtro por color */}
+
+ {/* Filtro por tamaño */}
+
+
+
+
+
+
+
+ {/* Columna de Tarjetas */}
+
+
+ {filteredPets.map((pet) => (
+
+
+
+
+
{pet.name}
+
+ Tipo: {pet.type}
+ Color: {pet.color}
+ Sexo: {pet.size}
+
+
Más información
+
+
+
+ ))}
+
+
+
+
+ );
+};
+
+export default PetsView;
diff --git a/src/front/js/component/ResetPassword.jsx b/src/front/js/component/ResetPassword.jsx
new file mode 100644
index 0000000000..4483e345a4
--- /dev/null
+++ b/src/front/js/component/ResetPassword.jsx
@@ -0,0 +1,116 @@
+import React, { useState } from "react";
+
+const ResetPassword = () => {
+ const [securityAnswer, setSecurityAnswer] = useState("");
+ const [newPassword, setNewPassword] = useState("");
+ const [confirmPassword, setConfirmPassword] = useState("");
+ const [message, setMessage] = useState("");
+ const [error, setError] = useState("");
+
+ const handleSubmit = async (e) => {
+ e.preventDefault();
+
+ // Validación simple del formulario
+ if (!securityAnswer || !newPassword || !confirmPassword) {
+ setError("Todos los campos son obligatorios.");
+ setMessage("");
+ return;
+ }
+
+ if (newPassword !== confirmPassword) {
+ setError("Las contraseñas no coinciden.");
+ setMessage("");
+ return;
+ }
+
+ try {
+ // Llamada a la API
+ const response = await fetch("https://sturdy-space-invention-q7947gjpqj76fx57r-3001.app.github.dev/user/1", {
+ method: "PUT",
+ headers: {
+ "Content-Type": "application/json",
+ },
+ body: JSON.stringify({
+ security_question: securityAnswer,
+ new_password: newPassword,
+ }),
+ });
+
+ if (response.ok) {
+ const data = await response.json();
+ setMessage(data.msg || "Contraseña cambiada correctamente.");
+ setError("");
+ } else {
+ const errorData = await response.json();
+ setError(errorData.msg || "Ocurrió un error. Intenta nuevamente.");
+ setMessage("");
+ }
+ } catch (err) {
+ setError("Error al conectar con el servidor.");
+ setMessage("");
+ }
+ };
+
+ return (
+
+
+
+
¿Olvidó su contraseña?
+
+
+ {message &&
{message}
}
+ {error &&
{error}
}
+
+
+
+ );
+};
+
+export default ResetPassword;
diff --git a/src/front/js/component/footer.js b/src/front/js/component/footer.js
index 670323e091..cda777bf4a 100755
--- a/src/front/js/component/footer.js
+++ b/src/front/js/component/footer.js
@@ -6,5 +6,6 @@ export const Footer = () => (
Made with by{" "}
4Geeks Academy
+
);
diff --git a/src/front/js/component/navbar.js b/src/front/js/component/navbar.js
index 795c8348d7..416dcc7ab0 100755
--- a/src/front/js/component/navbar.js
+++ b/src/front/js/component/navbar.js
@@ -1,6 +1,8 @@
import React from "react";
import { Link } from "react-router-dom";
import logotipo from "../../img/PatasperdidasPNG.png"
+
+
export const Navbar = () => {
return (
);
-};
+}
diff --git a/src/front/js/component/ubication_map.js b/src/front/js/component/ubication_map.js
index 935ec60f6c..11dd67ac6a 100644
--- a/src/front/js/component/ubication_map.js
+++ b/src/front/js/component/ubication_map.js
@@ -1,25 +1,25 @@
import React, { useState } from "react";
-import "leaflet/dist/leaflet.css";
-import { MapContainer, TileLayer, useMapEvents, Marker, Popup } from 'react-leaflet'
-import { Icon, divIcon, map } from "leaflet"
-import MarkerClusterGroup from 'react-leaflet-cluster';
-import L from "leaflet"
+// import "leaflet/dist/leaflet.css";
+// import { MapContainer, TileLayer, useMapEvents, Marker, Popup } from 'react-leaflet'
+// import { Icon, divIcon, map } from "leaflet"
+// import MarkerClusterGroup from 'react-leaflet-cluster';
+// import L from "leaflet"
const UbicationMap = ({ coordenates }) => {
- const CustomIcon = L.divIcon({
- html: '',
- className: "custom-icon",
- iconSize: [24, 24],
- iconAnchor: [12, 24]
- })
+ // const CustomIcon = L.divIcon({
+ // html: '',
+ // className: "custom-icon",
+ // iconSize: [24, 24],
+ // iconAnchor: [12, 24]
+ // })
const [position, setPosition] = useState(null)
function ClickHandler() {
useMapEvents({
click: (e) => {
const { lat, lng } = e.latlng;
- const newPosition = {lat, lng}
+ const newPosition = { lat, lng }
setPosition(newPosition);
console.log(`Latitud: ${lat}, Longitud: ${lng}`);
if (coordenates) {
diff --git a/src/front/js/layout.js b/src/front/js/layout.js
index 7774e671eb..180f6275ca 100755
--- a/src/front/js/layout.js
+++ b/src/front/js/layout.js
@@ -16,6 +16,9 @@ import { Navbar } from "./component/navbar";
import { Footer } from "./component/footer";
import NewPetLost from "./pages/newPetLost.js";
import NewFoundPet from "./pages/newFoundPet.js";
+import ResetPassword from "./component/ResetPassword.jsx";
+import PetView from "./component/PetView.jsx";
+import PetCard from "./component/PetCard.jsx";
import UbicationMap from "./component/ubication_map.js";
//create your first component
@@ -41,6 +44,10 @@ const Layout = () => {
} path="/single/:theid" />
} path="/user" />
} path="/login" />
+ } path="/forgot-password" />
+ } path="/petview"/>
+ } path="/petcard/:theid" />
+
} path="/signup" />
Not found!} />
diff --git a/src/front/js/pages/newPetLost.js b/src/front/js/pages/newPetLost.js
index 5995abdda5..891850a87c 100644
--- a/src/front/js/pages/newPetLost.js
+++ b/src/front/js/pages/newPetLost.js
@@ -3,8 +3,8 @@ import React, { useState, useContext } from "react";
import { useNavigate } from "react-router-dom";
import { Context } from "../store/appContext";
import Cloudinary from "../component/cloudinary";
-import "leaflet/dist/leaflet.css";
-import L from "leaflet"
+// import "leaflet/dist/leaflet.css";
+// import L from "leaflet"
import UbicationMap from "../component/ubication_map";
const NewPetLost = () => {
diff --git a/src/front/js/store/flux.js b/src/front/js/store/flux.js
index c8b60e1b57..52804f7a55 100755
--- a/src/front/js/store/flux.js
+++ b/src/front/js/store/flux.js
@@ -1,10 +1,8 @@
const getState = ({ getStore, getActions, setStore }) => {
return {
store: {
-
message: null,
demo: [
-
{
title: "FIRST",
background: "white",
@@ -15,7 +13,19 @@ const getState = ({ getStore, getActions, setStore }) => {
background: "white",
initial: "white"
}
- ]
+ ],
+ petData:[
+ { id: 1, name: "Max", type: "perro", color: "negro", size: "grande", image: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2w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KwEnSwC8c8OaSCkNUOaGRGWBI2pbetCT6j5KdrDbSmh6C1673+qbCid0ApgjgW5oaISTUdwcWk1a5o6ZSDankELizXesr03EBA90HnhQhwKbFWBN8WEZeJmruohHc0knU28b8lFKxKXHmnTMH9wV6Apuid0Tet6UPWo1VSC+l6k6geChhRKmhViHC5q9Ars97Y8kkswSVakpgN2ibLaFJJbV0IfaII+qTNCkkmsWiGH8SniLxJGLfZZgKRuqSSgKGRfiXrtF6kqRb7I9lFuEklGSPYQktQn4tskksy7HshgaKw/ZeJIZdkLzNAiEPRJJZ32aF0j3EP+WPFVpTRepJcuhj/AKPW/wApM1SSQMjI4uqp4jovEkcO0Ll0z2T+FXP2FJJNKiDYWpVw/RJJGi10QpJJKiz/2Q==" },
+ { id: 2, name: "Bella", type: "gato", color: "blanco", size: "pequeño", image: "/img/bella.jpg" },
+ { id: 3, name: "Rocky", type: "conejo", color: "marrón", size: "mediano", image: "/img/rocky.jpg" },
+ { id: 4, name: "Spike", type: "reptil", color: "verde", size: "pequeño", image: "/img/spike.jpg" },
+ { id: 5, name: "Luna", type: "otro", color: "gris", size: "grande", image: "/img/luna.jpg" },
+ { id: 6, name: "Bella", type: "gato", color: "blanco", size: "pequeño", image: "/img/bella.jpg" },
+ { id: 7, name: "Bella", type: "gato", color: "blanco", size: "pequeño", image: "/img/bella.jpg" },
+ { id: 8, name: "Bella", type: "gato", color: "blanco", size: "pequeño", image: "/img/bella.jpg" },
+ { id: 9, name: "Bella", type: "gato", color: "blanco", size: "pequeño", image: "/img/bella.jpg" },
+
+ ],
},
actions: {
diff --git a/src/front/styles/home.css b/src/front/styles/home.css
index 723acfb61b..41035aeaea 100755
--- a/src/front/styles/home.css
+++ b/src/front/styles/home.css
@@ -1,10 +1,4 @@
-/*
- home.css: This website contains selectors only used in home.css
- All pages share the styles on index.css but you should create
- one more css for each page that will contain the selected used
- on that page only (the ones not reused in other pages).
-*/
.adlam-display-regular {
font-family: "ADLaM Display";
font-weight: 400;
@@ -26,6 +20,167 @@ body {
.btnStart{
background-color: darkblue;
}
+
+.forgot-password {
+ border-radius: 20px;
+}
+
+/* Contenedor principal */
+.pet-card-container {
+ max-width: 80%;
+ margin: 30px auto;
+ background-color: #fff;
+ border-radius: 10px;
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+ padding: 20px;
+}
+
+/* Diseño 50/50 */
+.pet-card {
+ display: flex;
+ gap: 20px;
+}
+
+.image-section {
+ flex: 1;
+}
+
+.main-image {
+ width: 100%;
+ height: auto;
+ border-radius: 10px;
+ object-fit: cover;
+}
+
+.info-section {
+ flex: 1;
+ padding: 10px;
+}
+
+.info-section h3 {
+ font-size: 24px;
+ margin-bottom: 10px;
+}
+
+.text-danger {
+ color: #ff4d4d;
+ font-weight: bold;
+}
+
+a.btn-primary {
+ display: inline-block;
+ background-color: #007bff;
+ color: #fff;
+ text-decoration: none;
+ padding: 10px 15px;
+ border-radius: 5px;
+ margin: 10px 0;
+}
+
+a.btn-primary:hover {
+ background-color: #0056b3;
+}
+
+.table {
+ margin-top: 15px;
+ width: 100%;
+ border-collapse: collapse;
+}
+
+.table th {
+ text-align: left;
+ font-weight: bold;
+ padding: 5px 0;
+}
+
+.table td {
+ padding: 5px 0;
+}
+
+p {
+ font-size: 14px;
+}
+
+.additional-info {
+ margin-top: 15px;
+ font-style: italic;
+}
+
+/* Galería */
+.gallery {
+ display: flex;
+ gap: 10px;
+ margin-bottom: 10px;
+}
+
+.gallery img {
+ width: 70px;
+ height: 70px;
+ object-fit: cover;
+ border-radius: 5px;
+ cursor: pointer;
+ transition: transform 0.2s ease;
+}
+
+.gallery img:hover {
+ transform: scale(1.1);
+}
+
+/* Íconos de compartir */
+.share-icons span {
+ font-weight: bold;
+ margin-right: 10px;
+}
+
+.share-icons a {
+ color: #6c757d;
+ margin-right: 5px;
+ font-size: 18px;
+}
+
+.share-icons a:hover {
+ color: #007bff;
+}
+.filters-container {
+ padding: 10px;
+ border: 1px solid #ccc;
+ border-radius: 5px;
+ background-color: #f9f9f9;
+}
+
+.filters-container h5 {
+ margin-bottom: 15px;
+}
+
+.filter label {
+ font-weight: bold;
+}
+
+.filter input[type="radio"] {
+ margin-right: 10px;
+}
+.main-image {
+ width: 100%;
+ height: auto;
+ margin-bottom: 15px;
+}
+
+.gallery img {
+ cursor: pointer;
+ transition: transform 0.2s;
+}
+
+.gallery img:hover {
+ transform: scale(1.1);
+}
+.navigation-path a {
+ color: #6c757d;
+ text-decoration: none;
+}
+
+.navigation-path a:hover {
+ text-decoration: underline;
+}
.bg-success {
--bs-bg-opacity: 0.2;
background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important;
@@ -34,3 +189,21 @@ body {
color: darkblue;
font-size: 30px;
}
+
+
+.btn-primary:hover {
+ background-color: #004a99; /* Azul oscuro más claro al pasar el cursor */
+}
+
+/* Color del nombre */
+.text-primary {
+ color: #002f6c !important; /* Azul oscuro */
+}
+
+/* Iconos sin recuadro */
+.btn-outline-secondary {
+ border: none; /* Sin recuadro */
+ background: none; /* Sin fondo */
+ padding: 0;
+}
+
diff --git a/src/front/styles/pet-views.css b/src/front/styles/pet-views.css
new file mode 100644
index 0000000000..b16153de77
--- /dev/null
+++ b/src/front/styles/pet-views.css
@@ -0,0 +1,92 @@
+/* Barra de navegación */
+.navbar {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ background-color: white;
+ padding: 10px 20px;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
+}
+
+/* Contenedor de vista de mascotas (Filtros y tarjetas) */
+.pets-view {
+ display: flex;
+ gap: 20px;
+ justify-content: space-between;
+}
+
+/* Filtros */
+.filters {
+ width: 200px; /* Ajusta el ancho de los filtros */
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+ position: sticky;
+ top: 20px;
+}
+
+/* Categorías de filtros */
+.filter-category {
+ display: flex;
+ flex-direction: column;
+ gap: 10px;
+}
+
+.filter-category h3 {
+ margin: 0;
+ font-size: 1.2em;
+ font-weight: bold;
+}
+
+/* Estilo para los filtros (circulitos y cuadrados) */
+label {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+}
+
+/* Círculos de color */
+.color-circle {
+ width: 15px;
+ height: 15px;
+ border-radius: 50%;
+ display: inline-block;
+}
+
+.color-circle.red {
+ background-color: red;
+}
+
+.color-circle.blue {
+ background-color: blue;
+}
+
+.color-circle.green {
+ background-color: green;
+}
+
+/* Cuadrados de tamaño */
+.size-square {
+ width: 15px;
+ height: 15px;
+ display: inline-block;
+ border: 1px solid #ccc;
+ background-color: #f0f0f0;
+}
+
+/* Contenedor principal de las tarjetas de mascotas */
+.pet-cards {
+ display: grid;
+ grid-template-columns: repeat(3, 1fr);
+ gap: 20px;
+ width: calc(100% - 220px); /* Ajusta el ancho para dar espacio a los filtros */
+}
+
+/* Tarjeta individual */
+.pet-card {
+ background-color: white;
+ padding: 10px;
+ border-radius: 5px;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
+ text-align: center;
+}