notice-page-delete

master
Subhodip Ghosh 2023-05-24 18:35:50 +05:30
parent 5bf7e5d004
commit d29a7d665d
2 changed files with 38 additions and 5 deletions

38
src/components/Notice.vue Normal file
View File

@ -0,0 +1,38 @@
<template>
<div class="container bg-white mx-auto mt-3 p-0 text-blue-700 leading-loose">
<div v-if="isLoading">
<h2>Loading ...</h2>
</div>
<div v-else>
<div v-for="(item, index) in page" >
<a :href="'/notice/'+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]=notice&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>

View File

@ -1,5 +0,0 @@
---
import Notice from '../components/Notice.vue';
---
<Notice client:idle />