productoras page
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user