diff --git a/app/pets/routes.py b/app/pets/routes.py index 95e479f..2756cc7 100644 --- a/app/pets/routes.py +++ b/app/pets/routes.py @@ -4,4 +4,8 @@ from app.services.pet_service import PetService @bp.route('/') def index(): - return render_template("pets/index.html", options=PetService.get_options(request)) \ No newline at end of file + return render_template( + "pets/index.html", + options=PetService.get_options(request), + pagination_result=PetService.get_pets(request) + ) \ No newline at end of file diff --git a/app/static/css/pets.css b/app/static/css/pets.css new file mode 100644 index 0000000..c5667dd --- /dev/null +++ b/app/static/css/pets.css @@ -0,0 +1,75 @@ +.fliping-card { + flex: initial; + position: relative; + height: 200px; + width: 200px; + -moz-perspective: 200rem; + perspective: 200rem; +} + +.fliping-card__side { + display: flex; + justify-content: center; + align-items: center; + transition: all 0.8s ease; + position: absolute; + top: 0; + left: 0; + width: 100%; + -webkit-backface-visibility: hidden; /* We don't want to see the back part of the element. */ + backface-visibility: hidden; /* We don't want to see the back part of the element. */ + border-radius: var(--bs-border-radius); + overflow: hidden; /* The image is overflowing the parent. */ + box-shadow: 0 2rem 6rem rgba(#000, 0.15); +} + +.fliping-card__side--back { + border: 1px solid #c0c0c0; + color: white; + height: 100%; + transform: rotateY(180deg); +} + +.fliping-card__side--back-male { + background-color: #0d6efd; +} + +.fliping-card__side--back-female { + background-color: #fd0d99; +} + +.fliping-card:hover .fliping-card__side--back { + transform: rotateY(0); +} + +.fliping-card:hover .fliping-card__side--front { + transform: rotateY(-180deg); +} + +@media only screen and (max-width: 575px), only screen and (hover: none) { + .fliping-card { + height: 350px; + -moz-perspective: none; + perspective: none; + } + + .fliping-card__side { + height: auto; + position: relative; + box-shadow: none; + } + .fliping-card__side--front { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + border-bottom: 0px; + } + .fliping-card:hover .fliping-card__side--front { + transform: rotateY(0); + } + .fliping-card__side--back { + border: 0px; + border-top-left-radius: 0; + border-top-right-radius: 0; + transform: rotateY(0); + } +} diff --git a/app/templates/pets/index.html b/app/templates/pets/index.html index 4a0cbcd..defaa4c 100644 --- a/app/templates/pets/index.html +++ b/app/templates/pets/index.html @@ -1,14 +1,16 @@ -{% extends "layout/layout.html" %} +{% extends "layout/layout.html" %} +{% from "paginator/paginator.html" import paginator %} {% block title %} Home {% endblock %} {% block head %} {{ super() }} + {% endblock %} {% block content %}
-
+
-
+