responsive review

This commit is contained in:
María
2025-10-07 13:09:10 +02:00
parent b945bf0673
commit 2784c9c1bf
10 changed files with 76 additions and 37 deletions

View File

@@ -78,6 +78,7 @@ export default {
.card { .card {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center;
border-radius: 1rem; border-radius: 1rem;
border: 2px solid white; border: 2px solid white;
background: #fff; background: #fff;
@@ -87,6 +88,11 @@ export default {
max-height: 546px; max-height: 546px;
max-width: 288px; max-width: 288px;
@include mobile {
width: 100%;
max-width: 100%;
}
.card-image { .card-image {
width: 100%; width: 100%;
height: 288px; height: 288px;

View File

@@ -13,6 +13,7 @@
ref="productDetails" ref="productDetails"
class="carousel" class="carousel"
:items-to-show="itemsToShow" :items-to-show="itemsToShow"
:breakpoints="config.breakpoints"
:gap="1" :gap="1"
:pagination-enabled="false" :pagination-enabled="false"
:wrap-around="false" :wrap-around="false"
@@ -80,7 +81,7 @@ export default {
}, },
itemsToShow: { itemsToShow: {
type: Number, type: Number,
default: 4, default: 1,
}, },
}, },
data() { data() {
@@ -90,15 +91,15 @@ export default {
height: 200, height: 200,
breakpointMode: 'carousel', // o 'viewport' breakpointMode: 'carousel', // o 'viewport'
breakpoints: { breakpoints: {
300: { 768: {
itemsToShow: 2, itemsToShow: 3,
snapAlign: 'center', snapAlign: 'center',
}, },
400: { 1024: {
itemsToShow: 3, itemsToShow: 3,
snapAlign: 'start', snapAlign: 'start',
}, },
500: { 1440: {
itemsToShow: 4, itemsToShow: 4,
snapAlign: 'start', snapAlign: 'start',
}, },

View File

@@ -103,7 +103,7 @@
</li> </li>
</NuxtLink> </NuxtLink>
</ul> </ul>
<ul class="link-list"> <!-- <ul class="link-list">
<li class="link"> <li class="link">
<a href="https://coceta.coop/" target="_blank"> <a href="https://coceta.coop/" target="_blank">
<span class="link-text">Coceta</span> <span class="link-text">Coceta</span>
@@ -124,7 +124,7 @@
<span class="link-text">Cookies</span> <span class="link-text">Cookies</span>
</li> </li>
</NuxtLink> </NuxtLink>
</ul> </ul> -->
<div class="credits"> <div class="credits">
<span>2025 Consumo Cuidado</span> <span>2025 Consumo Cuidado</span>
<a href="http://enreda.coop/" target="_blank" <a href="http://enreda.coop/" target="_blank"
@@ -239,7 +239,7 @@ export default {
.section-text { .section-text {
font-weight: $medium; font-weight: $medium;
font-size: $s; font-size: $l;
} }
.section-img { .section-img {

View File

@@ -192,10 +192,10 @@ export default {
flex-shrink: 0; flex-shrink: 0;
align-self: stretch; align-self: stretch;
border-radius: 24px 24px 0 0; border-radius: 24px 24px 0 0;
@include mobile { // @include mobile {
max-height: 10rem; // max-height: 10rem;
max-width: 10rem; // max-width: 10rem;
} // }
.image { .image {
width: 100%; width: 100%;
height: 100%; height: 100%;
@@ -218,6 +218,10 @@ export default {
position: relative; // necesario para controlar hijos absolutos position: relative; // necesario para controlar hijos absolutos
overflow: hidden; overflow: hidden;
@include mobile {
width: 270px;
}
p { p {
text-align: center; text-align: center;
display: -webkit-box; display: -webkit-box;

View File

@@ -297,6 +297,7 @@ export default {
@include mobile { @include mobile {
margin-top: 7rem; margin-top: 7rem;
padding: 2rem;
} }
} }
@@ -308,17 +309,14 @@ export default {
gap: 4rem; gap: 4rem;
width: 100%; width: 100%;
@media screen and (max-width: 1024px) { // @media screen and (max-width: 1024px) {
flex-direction: column; // flex-direction: column;
gap: 2rem; // gap: 2rem;
margin-top: 4rem; // padding: 3rem 2rem;
padding: 3rem 2rem; // }
}
@include mobile { @include mobile {
flex-direction: column; flex-direction: column;
gap: 1rem; gap: 1rem;
margin-top: 5rem;
padding: 2rem 1rem;
} }
} }
@@ -339,11 +337,11 @@ export default {
border-radius: 16px; border-radius: 16px;
} }
@include mobile { // @include mobile {
width: 200px; // width: 200px;
height: 200px; // height: 200px;
margin: 0 auto; // margin: 0 auto;
} // }
} }
.image { .image {
@@ -358,7 +356,8 @@ export default {
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
justify-content: center; justify-content: center;
max-width: 100%;
word-break: break-word;
@include mobile { @include mobile {
margin-top: 2rem; margin-top: 2rem;
} }
@@ -378,7 +377,6 @@ export default {
.description { .description {
margin-top: 8px; margin-top: 8px;
font-size: $m; font-size: $m;
width: 80%;
@include tablet { @include tablet {
width: 100%; width: 100%;
} }
@@ -482,6 +480,8 @@ export default {
.coop_info { .coop_info {
margin-top: 25px; margin-top: 25px;
max-width: 100%;
word-break: break-word;
h4 { h4 {
font-size: $h4; font-size: $h4;
font-weight: $medium; font-weight: $medium;

View File

@@ -253,6 +253,10 @@ export default {
gap: 3rem; gap: 3rem;
color: $color-primary; color: $color-primary;
@media (max-width: 768px) {
gap: 0px;
}
.c-filter-content { .c-filter-content {
width: 100%; width: 100%;
} }

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class=""> <div class="page-busqueda">
<!-- <HeroWithSearch <!-- <HeroWithSearch
title="Productos y servicios" title="Productos y servicios"
subtitle="Catálogo colectivo de consumo transformador" subtitle="Catálogo colectivo de consumo transformador"
@@ -31,7 +31,7 @@
</div> </div>
</div> </div>
</section> </section>
<div class="c-container row"> <div class="c-container">
<div class="col-md-3"> <div class="col-md-3">
<ProductFilter <ProductFilter
:filters="filters" :filters="filters"
@@ -399,19 +399,36 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.c-container { .page-busqueda {
contain: content; display: flex;
flex-direction: column;
align-content: center;
width: 100%; width: 100%;
min-height: 100dvh; min-height: 100dvh;
margin-bottom: 2rem; justify-content: center;
margin: 0 auto;
} }
.hero-section { .hero-section {
width: 100%; width: 100%;
@include mobile { @include mobile {
margin-top: 12dvh; margin-top: 0.75rem;
} }
} }
.c-container {
display: flex;
flex-direction: row;
gap: 1rem;
width: 100%;
min-height: 100dvh;
margin-bottom: 2rem;
@media (max-width: 768px) {
flex-direction: column;
gap: 0.5rem;
padding: 0;
}
}
.gradient { .gradient {
position: relative; position: relative;
display: flex; display: flex;

View File

@@ -126,6 +126,7 @@ export default {
align-self: center; align-self: center;
background-image: url('../assets/img/hand-heart.svg'); background-image: url('../assets/img/hand-heart.svg');
background-size: contain; background-size: contain;
background-position: center;
@include mobile { @include mobile {
width: 300px; width: 300px;
@@ -139,6 +140,7 @@ export default {
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
text-align: center;
border-radius: 24px; border-radius: 24px;
min-height: 85dvh; min-height: 85dvh;
background: linear-gradient(180deg, $color-consumo-base-extra-light, $color-consumo-base); background: linear-gradient(180deg, $color-consumo-base-extra-light, $color-consumo-base);

View File

@@ -413,12 +413,14 @@ export default {
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 16px;
object-fit: contain; object-fit: contain;
} }
@include mobile { @include mobile {
width: 200px; height: 335px;
height: 200px; width: 335px;
border-radius: 16px;
margin: 0 auto; margin: 0 auto;
} }
} }

View File

@@ -28,7 +28,6 @@
</div> </div>
</section> </section>
<div v-if="companyList && companyList.length" class="cards-section"> <div v-if="companyList && companyList.length" class="cards-section">
{{ companyList.length }} entidades encontradas
<section class="cards-grid"> <section class="cards-grid">
<article v-for="(coop, index) in companyList" :key="index"> <article v-for="(coop, index) in companyList" :key="index">
<CoopCard :coop="coop" /> <CoopCard :coop="coop" />
@@ -134,6 +133,10 @@ export default {
width: 100%; width: 100%;
padding: 4rem; padding: 4rem;
@media (max-width: 768px) {
padding: 2rem;
width: 100%;
}
// responsive breakpoints // responsive breakpoints
grid-template-columns: 1fr; grid-template-columns: 1fr;