productoras page

This commit is contained in:
María
2025-09-09 13:46:49 +02:00
parent 94655ce9e8
commit d7c0a76c7b
8 changed files with 322 additions and 313 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 KiB

BIN
assets/img/voluntarios.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 MiB

BIN
assets/img/voluntarios.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 551 KiB

View File

@@ -1,89 +1,40 @@
<template>
<div class="productcard_container">
<div class="row productcard_container-basic">
<div class="image_container col-md-2">
<img
v-if="coop.logo"
class="image"
<div class="card">
<div class="card-image">
<img
v-if="coop.logo"
class="image"
:src="coop.logo"
:alt="coop.company_name"
/>
<img
v-else
class="image"
src="@/assets/img/latienda-product-default.svg"
src="@/assets/img/consumo-default.png"
:alt="coop.company_name"
/>
</div>
<div class="card-body" align="left">
<h2>{{ coop.company_name }}</h2>
<p class="description">{{ coop.description }}</p>
<div class="tags">
<p
v-for="n in coop.tags"
:key="n"
:to="tagRoute(n)"
class="tags"
>
<span>{{ n }}</span>
</p>
</div>
<div class="info_container col-md-6" align="left">
<NuxtLink :to="`/c/${this.coop.id}`">
<h2>{{ coop.company_name }}</h2>
</NuxtLink>
<p class="description">{{ coop.description }}</p>
<div class="tags_container">
<NuxtLink
:to="tagRoute(n)"
class="tag_container"
v-for="n in coop.tags"
:key="n"
>
<img class="tag_img" src="@/assets/img/latienda-tag.svg" />
<span>{{ n }}</span>
</NuxtLink>
</div>
</div>
<div class="col-md-4 button_container" align="center">
<a v-if="coop.shop_link" :href="coop.shop_link" class="button_buy">
<img
alt="tienda"
class="button_cart_img"
src="@/assets/img/latienda-tienda.svg"
/>
<span>Tienda online</span>
</a>
<a v-if="coop.web_link" :href="coop.web_link" class="button_buy">
<img
alt="web"
class="button_cart_img"
src="@/assets/img/latienda-web.svg"
/>
<span>Página web</span>
</a>
<div class="smlogos_container">
<div class="smlogo_container">
<a @click="shareFacebook">
<img
class="smlogo_img"
alt="facebook logo"
src="@/assets/img/latienda-smlogo-facebook.svg"
/>
</a>
</div>
<a @click="shareTwitter">
<div class="smlogo_container">
<img
class="smlogo_img"
alt="twitter logo"
src="@/assets/img/latienda-smlogo-twitter.svg"
/>
</div>
</a>
<a
:href="shareWhatsApp()"
data-action="share/whatsapp/share"
target="_blank"
title="latiendacoop"
>
<div class="smlogo_container">
<img
alt="whatsapp logo"
class="smlogo_img"
src="@/assets/img/latienda-smlogo-whatsapp.svg"
/>
</div>
</a>
</div>
</div>
</div>
<div class="card-actions">
<NuxtLink :to="`/productoras/${this.coop.id}`" class="btn-outline">
<button >VER FICHA</button>
</NuxtLink>
<NuxtLink v-if="coop.web_link" :to="coop.web_link" class="btn-outline">
<button>WEB</button>
</NuxtLink>
</div>
</div>
</template>
@@ -91,12 +42,15 @@
<script>
import socialShare from '~/utils/socialShare'
export default {
name: 'CoopCard',
props: ['coop'],
props: {
coop: {
type: Object,
required: true,
},
},
computed: {
coopUrl() {
return `${window.location.origin}/c/${this.coop.id}`
return `${window.location.origin}/productoras/${this.coop.id}`
},
},
methods: {
@@ -120,118 +74,87 @@ export default {
</script>
<style lang="scss" scoped>
.productcard_container {
border: 3px #e9e9e9 solid;
border-radius: 5px;
margin-bottom: 25px;
}
.productcard_container-basic {
padding: 25px 20px;
}
.image_container {
height: 100%;
overflow: hidden;
margin: auto;
}
.image {
width: 100%;
height: 100%;
object-fit: cover;
}
.info_container {
h2 {
outline: none;
font-weight: $medium;
color: $color-navy;
font-size: $m;
}
.price {
font-weight: $bold;
color: $color-navy;
font-size: $m;
}
span {
color: #808080;
}
.description {
margin-top: 8px;
font-family: $font-secondary;
font-size: $s;
color: $color-greytext;
display: -webkit-box;
-webkit-line-clamp: 5;
-webkit-box-orient: vertical;
.card {
display: flex;
flex-direction: column;
border-radius: 1rem;
border: 2px solid white;
background: #fff;
overflow: hidden;
}
}
box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
height: 100%;
max-height: 546px;
max-width: 288px;
.button_container {
display: flex;
flex-direction: column;
font-size: $s;
.card-image {
width: 100%;
height: 288px;
display: flex;
justify-content: center;
align-items: center;
.button_buy {
width: 100%;
color: $color-orange;
font-weight: $bold;
padding: 10px 0;
margin-bottom: 5px;
border: 3px solid $color-orange;
border-radius: 5px;
background-color: $color-light;
&:hover {
box-shadow: 0 4px 16px rgba(99, 99, 99, 0.2);
transition: all 0.2s ease;
img {
max-width: 100%;
max-height: 100%;
object-fit: cover;
}
}
span {
display: inline-block;
.card-body {
padding: 1rem;
display: flex;
flex-direction: column;
h2 {
font-size: $m;
font-weight: $medium;
}
p {
font-size: $s;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
.tags {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
span {
font-size: 0.75rem;
padding: 0.25rem 0.5rem;
border-radius: 1rem;
border: 1px solid #787878;
color: #787878;
text-transform: uppercase;
}
}
}
.card-actions {
display: flex;
gap: 0.5rem;
padding: 1rem;
.btn-outline {
flex: 1;
text-align: center;
padding: 0.5rem;
font-size: $s;
color: $color-button;
border: 1px solid $color-button;
border-radius: 0.75rem;
cursor: pointer;
transition: all 0.2s ease;
&:hover {
background: #f3f4f6;
}
}
}
}
}
.tag_container {
margin: 25px 6px 0 0;
border: 2px solid $color-greylayout;
border-radius: 5px;
padding: 6px 10px;
display: inline-block;
font-family: $font-secondary;
font-size: $xs;
color: $color-greytext;
.tag_img {
width: 18px;
}
}
.smlogo_container {
display: inline-block;
margin-top: 15px;
.smlogo_img {
width: 35px;
fill: $color-greytext;
margin: 2px;
}
img:hover {
transform: scale(1.1);
transition: all 0.2s ease;
}
}
.button_cart_img {
width: 20px;
margin-right: 10px;
}
.content > h2,
h3,
p {
margin: 0;
}
</style>

View File

@@ -0,0 +1,84 @@
<template>
<section class="hero-section">
<div class="gradient">
<div class="content">
<h1>{{ title }}</h1>
<p>{{ subtitle }}</p>
<SearchHeader />
</div>
</div>
</section>
</template>
<script>
export default {
props: {
title: {
type: String,
required: true
},
subtitle: {
type: String,
required: true
}
}
}
</script>
<style lang="scss" scoped>
.hero-section {
width: 100%;
}
.gradient {
position: relative;
display: flex;
justify-content: center;
align-items: center;
border-radius: 24px;
min-height: 45dvh;
overflow: hidden;
// Imagen de fondo
background-image: url('../assets/img/voluntarios.jpg');
background-size: cover;
background-position: center;
// Overlay de gradiente
&::before {
content: "";
position: absolute;
inset: 0;
border-radius: 24px;
background: linear-gradient(
180deg,
$color-consumo-base 0%,
$color-consumo-base-light 100%
);
z-index: 1;
opacity: 0.8;
}
.content {
position: relative;
z-index: 2;
text-align: center;
padding: 2rem;
h1 {
text-align: center;
font-size: $hero;
font-weight: $bold;
@include mobile { max-width: 100%;
margin: 1.5rem 1rem 0.5rem 1rem;
}
}
p {
font-size: $xl;
}
}
@include mobile {
margin-top: 8dvh;
}
}
</style>

View File

@@ -33,7 +33,7 @@ export default {
typing: null,
selectedCategory: '',
//TODO: change categories
categories: [
'Alimentación, bebida y tabaco',
'Arte y ocio',

View File

@@ -46,7 +46,7 @@
gap: 3rem;
margin: 2rem 0 4rem;
@media (min-width: tablet) {
@media (min-width: $desktop) {
flex-direction: row;
justify-content: space-between;
padding: 3rem;

View File

@@ -1,53 +1,30 @@
<template>
<div class="container mt-5">
<div class="row justify-content-center">
<div class="col-10 coopcard-list">
<h1 class="title">Últimas cooperativas añadidas</h1>
<p class="help">
Si quieres que tu cooperativa forme parte de este gran proyecto
registrate en el siguiente
<NuxtLink to="/registro/cooperativa"><b>formulario</b></NuxtLink
>.
</p>
<div class="form-container">
<form class="search-container" @submit.prevent="search">
<input
v-model="searchText"
class="search-text"
type="text"
autocomplete="off"
placeholder="Buscar cooperativas"
/>
<img
class="search-icon"
src="@/assets/img/latienda-search-blue.svg"
alt="latienda.coop-search"
@click="search"
/>
</form>
</div>
<div v-for="coop in companyList" :key="coop.id">
<CoopCard :coop="coop" />
</div>
<div class="container">
<div class="content">
<HeroWithSearch
title="Encuentra tu entidad aliada"
subtitle="Colabora, compra o aprende con la economía social"
/>
<div class="cards-section">
<section class="cards-grid">
<article v-for="(coop, index) in companyList" :key="index">
<CoopCard :coop="coop" />
</article>
</section>
<BPagination
v-model="currentPage"
class="pagination"
:total-rows="rows"
:per-page="perPage"
/>
</div>
<TextWithImageAndButton />
</div>
<!-- <BPagination
v-model="currentPage"
class="pagination"
:total-rows="rows"
:per-page="perPage"
/> -->
</div>
</template>
<script>
export default {
setup(){
definePageMeta({
layout: 'default',
})
},
data() {
return {
currentPage: 1,
@@ -56,17 +33,17 @@ export default {
companyList: null
}
},
// computed: {
// rows() {
// return this.companyList?.length
// },
// slicedCompanies() {
// const initial = (this.currentPage - 1) * this.perPage
// const final = this.currentPage * this.perPage
// const items = this.companyList ? this.companyList.slice(initial, final) : []
// return items
// },
// },
computed: {
rows() {
return this.companyList?.length
},
slicedCompanies() {
const initial = (this.currentPage - 1) * this.perPage
const final = this.currentPage * this.perPage
const items = this.companyList ? this.companyList.slice(initial, final) : []
return items
},
},
mounted() {
this.getCompanies()
},
@@ -105,88 +82,113 @@ export default {
<style lang="scss" scoped>
.container {
margin-top: 80px;
margin-bottom: 80px;
}
.title {
margin-top: 60px;
margin-bottom: 40px;
font-size: $xxl;
color: $color-navy;
}
.form-container {
display: flex;
justify-content: flex-start;
}
.coopcard-list {
margin-bottom: 40px;
}
.pagination {
display: flex;
flex-direction: row;
flex-direction: column;
align-items: center;
justify-content: center;
}
width: 100%;
gap: 4rem;
margin-top: 2rem;
.help {
color: $color-navy;
margin-bottom: 0px;
font-size: $s;
}
.search-container {
border: none;
border-radius: 5px;
background: $color-consumo-base-light;
width: 50%;
height: 32px;
overflow: hidden;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
margin-top: 50px;
margin-bottom: 50px;
@include mobile {
.cards-section {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-bottom: 4rem;
border-radius: 1.5rem;
background: $color-bg-light;
margin: 2rem 0;
.cards-grid {
display: grid;
gap: 1.5rem;
border: none;
width: 100%;
padding: 4rem;
// responsive breakpoints
grid-template-columns: 1fr;
@media (min-width: 640px) {
grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 1024px) {
grid-template-columns: repeat(3, 1fr);
}
@media (min-width: 1280px) {
grid-template-columns: repeat(4, 1fr);
}
}
.pagination {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
}
}
.search-container img,
input,
select {
padding: 6px 10px;
margin-right: 16px;
background: transparent;
font-size: $xl;
border: none;
}
// .help {
// color: $color-navy;
// margin-bottom: 0px;
// font-size: $s;
// }
.search-icon {
float: right;
height: 90%;
}
// .search-container {
// border: none;
// border-radius: 5px;
// background: $color-consumo-base-light;
// width: 50%;
// height: 32px;
// overflow: hidden;
// display: flex;
// flex-direction: row;
// justify-content: space-between;
// align-items: center;
// margin-top: 50px;
// margin-bottom: 50px;
.search-text {
outline: none;
width: 100%;
text-align: center;
color: $color-navy;
font-size: $s;
font-weight: $regular;
}
// @include mobile {
// width: 100%;
// }
// }
::placeholder {
color: $color-navy;
font-size: $s;
}
// .search-container img,
// input,
// select {
// padding: 6px 10px;
// margin-right: 16px;
// background: transparent;
// font-size: $xl;
// border: none;
// }
select {
--webkit-appearance: auto;
}
// .search-icon {
// float: right;
// height: 90%;
// }
// .search-text {
// outline: none;
// width: 100%;
// text-align: center;
// color: $color-navy;
// font-size: $s;
// font-weight: $regular;
// }
// ::placeholder {
// color: $color-navy;
// font-size: $s;
// }
// select {
// --webkit-appearance: auto;
// }
</style>