productora page
This commit is contained in:
@@ -20,14 +20,26 @@
|
||||
:breakpoints-enabled="true"
|
||||
>
|
||||
<Slide v-for="item in items" :key="item.id" class="slide-container">
|
||||
<NuxtLink :to="formattedItem(item).url" class="slide">
|
||||
<div class="slide">
|
||||
<div class="image-container">
|
||||
<img class="image" :src="formattedItem(item).image" alt="" />
|
||||
</div>
|
||||
<div class="details-container">
|
||||
<p>{{ formattedItem(item).name }}</p>
|
||||
<p class="company">{{ item.company.company_name }}</p>
|
||||
<p v-if="item.price" class="price">{{ item.price }}€</p>
|
||||
</div>
|
||||
</NuxtLink>
|
||||
<div class="links-btns">
|
||||
<NuxtLink :to="`/productos/${item.id}`" class="div-action show-link">
|
||||
<img class="div-action-img" src="@/assets/img/eye.svg" />
|
||||
VER
|
||||
</NuxtLink>
|
||||
<NuxtLink v-if="item.url" :to="item.url" class="div-action buy-link">
|
||||
<img class="div-action-img" src="@/assets/img/shopping-cart.svg" />
|
||||
COMPRAR
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</div>
|
||||
</Slide>
|
||||
<template #addons>
|
||||
<Navigation />
|
||||
@@ -129,40 +141,6 @@ export default {
|
||||
justify-content: center
|
||||
}
|
||||
|
||||
.slide-container {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: $color-primary;
|
||||
}
|
||||
|
||||
.slide {
|
||||
width: 237px;
|
||||
height: 316px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: stretch;
|
||||
padding: 0.5rem;
|
||||
background-color: #FDFCFB;
|
||||
border: 5px solid white;
|
||||
border-radius: 24px;
|
||||
box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
|
||||
text-decoration: none;
|
||||
p {
|
||||
text-align: center;
|
||||
display: -webkit-box;
|
||||
--webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
font-weight: $medium;
|
||||
font-size: $m;
|
||||
}
|
||||
}
|
||||
|
||||
.image-container {
|
||||
width: 100%;
|
||||
height: 11rem;
|
||||
@@ -181,12 +159,133 @@ a {
|
||||
}
|
||||
}
|
||||
|
||||
.details-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.slide-container {
|
||||
padding: 0.5rem;
|
||||
text-align: center;
|
||||
border-radius: 0 0 24px 24px;
|
||||
|
||||
}
|
||||
|
||||
.slide {
|
||||
width: 237px;
|
||||
height: 316px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: stretch;
|
||||
background-color: #FDFCFB;
|
||||
border: 5px solid white;
|
||||
border-radius: 24px;
|
||||
box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
|
||||
text-decoration: none;
|
||||
position: relative; // necesario para controlar hijos absolutos
|
||||
overflow: hidden;
|
||||
|
||||
p {
|
||||
text-align: center;
|
||||
display: -webkit-box;
|
||||
--webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
font-weight: $medium;
|
||||
font-size: $m;
|
||||
}
|
||||
|
||||
// detalles visibles por defecto
|
||||
.details-container {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transition: all 0.3s ease;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
height: 100%;
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
.company {
|
||||
font-weight: $regular;
|
||||
font-size: $s;
|
||||
margin: 0;
|
||||
}
|
||||
.price {
|
||||
font-weight: $bold;
|
||||
font-size: $m;
|
||||
margin-top: auto;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
// botones ocultos por defecto
|
||||
.links-btns {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
bottom: 1rem;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
// en hover se intercambian
|
||||
&:hover {
|
||||
.details-container {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transform: translateY(10px); // opcional efecto
|
||||
}
|
||||
|
||||
.links-btns {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.links-btns {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0 0.5rem;
|
||||
.div-action {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.5rem;
|
||||
font-weight: $bold;
|
||||
font-size: $s;
|
||||
text-decoration: none;
|
||||
|
||||
&.show-link {
|
||||
border: 1px solid $color-button;
|
||||
padding: 0.25rem 0.5rem;
|
||||
border-radius: 12px;
|
||||
background-color: white;
|
||||
&:hover {
|
||||
background-color: $color-button;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
&.buy-link {
|
||||
color: white;
|
||||
border: 1px solid $color-button;
|
||||
padding: 0.25rem 0.5rem;
|
||||
border-radius: 12px;
|
||||
background-color: $color-button;
|
||||
&:hover {
|
||||
background-color: white;
|
||||
color: $color-button;
|
||||
}
|
||||
}
|
||||
|
||||
.div-action-img {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user