-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrecomendacionesCruza.ejs
109 lines (107 loc) · 5.74 KB
/
recomendacionesCruza.ejs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
<%- include ('header', {tituloweb: '¡Oh my dog! | Recomendaciones cruza ' }); %>
<body id="body">
<div class="container h-50 mt-4">
<div class="row d-flex justify-content-center align-items-center">
<div class="col-lg-12 col-xl-8">
<div class="card text-black mb-2" style="border-radius: 25px;">
<div class="card-body p-md-4">
<p class="text-center h1 fw-bold mb-4 mx-1 mx-md-4 mt-3">Recomendaciones <i
class="bi bi-chat-right-heart-fill"></i></p>
<div class="alert alert-info alert-dismissible fade show text-center" role="alert">
<i class="bi bi-info-circle-fill"></i> Se están visualizando las recomendaciones para la mascota
<strong><%= mascota.nombre %></strong>. Las recomendaciones corresponden a <strong><%= mascota.sexo === 'Macho' ? 'hembras' : 'machos' %> </strong> de raza <strong> <%= mascota.raza %></strong>.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<% if (cruzas.length> 0) { %>
<div id="carouselRecomendaciones" class="carousel carousel-dark slide">
<div class="carousel-inner">
<div class="carousel-item active">
<img src="<%=cruzas[0].foto%>" class="d-block w-100 rounded-4 static_image_size"
alt="Cruza foto 0">
<div class="carousel-caption d-md-block">
<div class="p-3 bg-dark text-white rounded-4 position-relative" style="--bs-bg-opacity: .5;">
<h4 class="m-0">
<strong>
<%= cruzas[0].nombre %>
</strong>
</h4>
<button type="button"
class="btn btn-secondary btn-sm position-absolute top-0 end-0 m-2 rounded-4"
onclick="window.location.href = '/cruzas/contactoCruza/<%=cruzas[0].MascotumId%>-<%=idContactante%>'">
<i class="bi bi-envelope-heart"></i> Contactar
</button>
<p class="m-0">
<%= cruzas[0].sexo %>
</p>
<p class="m-0">
<%= cruzas[0].texto_libre %>
</p>
</div>
</div>
</div>
<% cruzas.slice(1).forEach((cruza,index)=> {%>
<div class="carousel-item">
<img src="<%= cruza.foto%>" class="d-block w-100 rounded-4 static_image_size"
alt="Cruza <%=index + 1 %>">
<div class="carousel-caption d-md-block">
<div class="p-3 bg-dark text-white rounded-4 position-relative" style="--bs-bg-opacity: .5;">
<h4 class="m-0">
<strong>
<%= cruza.nombre %>
</strong>
</h4>
<button type="button"
class="btn btn-secondary btn-sm position-absolute top-0 end-0 m-2 rounded-4"
onclick="window.location.href = '/cruzas/contactoCruza/<%=cruza.MascotumId%>-<%=idContactante%>'">
<i class="bi bi-envelope-heart"></i> Contactar
</button>
<p class="m-0">
<%= cruza.sexo %>
</p>
<p class="m-0">
<%= cruza.texto_libre %>
</p>
</div>
</div>
</div>
<% }); %>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carouselRecomendaciones"
data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Anterior</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carouselRecomendaciones"
data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Siguiente</span>
</button>
</div>
<% } else { %>
<div class="row mb-3 h-100 align-items-center">
<div class="alert alert-danger mb-3 text-center" role="alert">
<p class="text-danger m-0">En este momento no hay recomendaciones disponibles para la mascota</p>
</div>
</div>
<% } %>
</div>
</div>
<div class="text-center m-0">
<a class="small" href="/cruzas" style="color: white;">Volver</a>
</div>
</div>
</div>
</div>
<style>
.static_image_size {
width: 100%;
height: 400px;
/* Ajusta el valor de altura según tus necesidades */
}
</style>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz"
crossorigin="anonymous"></script>
</body>
</html>