Created
March 3, 2023 09:31
-
-
Save highoncarbs/fef05f02a5aeef33c12754d689b4d6a4 to your computer and use it in GitHub Desktop.
Index template for route /products - https://jaiteart-web.web.app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<div class="section "> | |
<div class="columns is-vcentered is-centered" > | |
<div class="column is-5 "> | |
<div class="px-6 has-text-centered"> | |
<h2 class=" | |
title | |
serif | |
has-text-weight-normal | |
is-size-1-desktop is-size-3-touch | |
"> | |
Hand Block Printed Textile Products | |
</h2> | |
<p class="is-size-4-desktop is-size-5-touch"> | |
60+ Categories of handicraft products handmade by artisans all over India. With reguar | |
new additions to our range. | |
</p> | |
<br> | |
<p class="mono">Quality Fabrics — Natural & AZO Free Dyes — Handmade </p> | |
<a class="has-text-dark mono is-outlined"> | |
Scroll down ↓ | |
</a> | |
</div> | |
</div> | |
</div> | |
</div> | |
<br> | |
<div class="section py-2 mt-4 mb-5"> | |
<div class="columns is-mobile is-multiline"> | |
<n-link :to="'/products/'+row.attributes.slug" class="column is-3-desktop is-6-touch has-text-dark " v-for="(row,index) in items" :key="'prod_cat_'+index"> | |
<div class=""> | |
<figure class="image has-background-light is-3by4"> | |
<nuxt-picture provider="strapi" :src="row.attributes.image.data.attributes.formats.medium.url" /> | |
</figure> | |
<p class="mt-2 serif is-size-4-desktop is-size-4-touch">{{ row.attributes.category_title }}</p> | |
<p class=" is-size-6-desktop mono">{{ row.attributes.categories.data.length }} Categories</p> | |
<n-link :to="'/products/'+row.attributes.category_title" class="is-underlined has-text-dark">View →</n-link> | |
</div> | |
</n-link> | |
</div> | |
</div> | |
</div> | |
</template> | |
<script> | |
export default { | |
data(){ | |
return{ | |
items:[] | |
} | |
}, | |
async fetch() { | |
await this.$axios.get('product-categories?populate=*').then((response) => { | |
this.items = response.data.data | |
}) | |
} | |
, | |
layout: 'content', | |
} | |
</script> | |
<style> | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment