feat: SectionHeader component

This commit is contained in:
Faris Ansari
2018-08-26 20:00:42 +05:30
parent 4a2ea993fd
commit bf5cc7d823
2 changed files with 11 additions and 10 deletions

View File

@@ -0,0 +1,3 @@
<template>
<div class="hub-items-header level"><slot></slot></div>
</template>

View File

@@ -7,36 +7,34 @@
:placeholder="search_placeholder" :placeholder="search_placeholder"
:on_search="set_search_route" :on_search="set_search_route"
v-model="search_value" v-model="search_value"
> />
</search-input>
<div v-for="section in sections" <div v-for="section in sections" :key="section.title">
:key="section.title"
> <section-header>
<div class="hub-items-header margin-bottom level">
<h4>{{ section.title }}</h4> <h4>{{ section.title }}</h4>
<p :data-route="'marketplace/category/' + section.title">{{ 'See All' }}</p> <p :data-route="'marketplace/category/' + section.title">{{ 'See All' }}</p>
</div> </section-header>
<item-cards-container <item-cards-container
:container_name="section.title" :container_name="section.title"
:items="section.items" :items="section.items"
:item_id_fieldname="item_id_fieldname" :item_id_fieldname="item_id_fieldname"
:on_click="go_to_item_details_page" :on_click="go_to_item_details_page"
> />
</item-cards-container>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import SearchInput from '../components/SearchInput.vue'; import SearchInput from '../components/SearchInput.vue';
import SectionHeader from '../components/SectionHeader.vue';
import ItemCardsContainer from '../components/ItemCardsContainer.vue'; import ItemCardsContainer from '../components/ItemCardsContainer.vue';
export default { export default {
name: 'home-page', name: 'home-page',
components: { components: {
SectionHeader,
SearchInput, SearchInput,
ItemCardsContainer ItemCardsContainer
}, },