scc-astro/src/components/DocumentsPage.vue

44 lines
1.5 KiB
Vue

<template>
<div class="container bg-white mx-auto text-blue-900 leading-loose text-xl">
<!-- <h2 class="text-2xl text-blue-900">All pages having Documents / file Attachments are listed below:</h2> -->
<br>
<br>
<br>
<div v-if="isLoading">
<h2 class="text-black text-4xl font-bold underline decoration-4 decoration-blue-700 text-center py-10">Loading ...</h2>
</div>
<div v-else>
<h2 class="text-black text-4xl font-bold underline decoration-4 decoration-blue-700 text-center py-10">Documents</h2>
<div v-for="(item, index) in page" >
<a :href="'/documents/'+item.slug"> <h3> {{item.title}}</h3> </a>
</div>
<!-- <div v-html="page[0].content" class="container mx-auto"></div> -->
</div>
</div>
</template>
<script>
export default {
data() {
return {
page: null,
isLoading: true
}
},
mounted: function () {
fetch('https://api8.siliconpin.com/items/scc22?filter[type][_eq]=documents&limit=-1')
// fetch('https://api8.siliconpin.com/items/scc22?slug=about-us')
.then(response => response.json())
.then(data => {
this.page = data.data
// console.log(data)
this.isLoading = false
})
}
}
</script>