Compare commits
5 Commits
s2
...
801d68aa35
| Author | SHA1 | Date | |
|---|---|---|---|
| 801d68aa35 | |||
| c86519065d | |||
| bf31fd54d5 | |||
| acdf4d154f | |||
| 97ba2d9034 |
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Vite, Vue3, Tailwind CSS</title>
|
<title>Sreechaitanya College, Habra</title>
|
||||||
<!-- <link
|
<!-- <link
|
||||||
rel="preload"
|
rel="preload"
|
||||||
href="/font/Inter-roman.var.woff2"
|
href="/font/Inter-roman.var.woff2"
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
>
|
>
|
||||||
<div class="bg-stone-800 rounded-md h-48 m-6 text-gray-100 text-left text-xl p-3">Important Links<hr class="blue-400">
|
<div class="bg-stone-800 rounded-md h-48 m-6 text-gray-100 text-left text-xl p-3">Important Links<hr class="blue-400">
|
||||||
<div class="grid grid-rows-3 text-blue-600 p-3 gap-4">
|
<div class="grid grid-rows-3 text-blue-600 p-3 gap-4">
|
||||||
<a href="gallery">Gallery <hr class="border-slate-900"></a>
|
<a href="/gallery">Gallery <hr class="border-slate-900"></a>
|
||||||
<a href="notice">Notice <hr class="border-slate-900"></a>
|
<a href="/notice">Notice <hr class="border-slate-900"></a>
|
||||||
<a href="document">Document</a>
|
<a href="/document">Document</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class=" bg-stone-800 rounded-md h-44 m-6 text-gray-100 text-left text-xl p-3">Related Sites<hr>
|
<div class=" bg-stone-800 rounded-md h-44 m-6 text-gray-100 text-left text-xl p-3">Related Sites<hr>
|
||||||
@@ -20,16 +20,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class=" bg-stone-800 rounded-md h-44 m-6 text-gray-100 text-left text-xl p-3">Document Links <hr>
|
<div class=" bg-stone-800 rounded-md h-44 m-6 text-gray-100 text-left text-xl p-3">Document Links <hr>
|
||||||
<div class="grid grid-rows-3 text-blue-600 p-3 gap-4">
|
<div class="grid grid-rows-3 text-blue-600 p-3 gap-4">
|
||||||
<a href="">A.Q.A.R<hr class="border-slate-900"></a>
|
<a href="/aqar">AQAR<hr class="border-slate-900"></a>
|
||||||
<a href="">R & D Cell<hr class="border-slate-900"></a>
|
<a href="/iqac">IQAC<hr class="border-slate-900"></a>
|
||||||
<a href="">Academic Calendar</a>
|
<a href="/academic-calendar">Academic Calendar</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid grid-cols-1 md:grid-cols-3 bg-stone-600 place-items-center text-gray-100 -mt-4 ">
|
<div class="grid grid-cols-1 md:grid-cols-3 bg-stone-600 place-items-center text-gray-100 -mt-4 ">
|
||||||
<a href=""><div class="">© sreechaitanyacollege.in   |<hr> </div></a>
|
<a href=""><div class="">© sreechaitanyacollege.in <hr> </div></a>
|
||||||
<a href=""><div class=""> Powered by DWD Consultancy Services   | <hr></div></a>
|
<a href="https://dwd.siliconpin.com"><div class=""> Powered by DWD Consultancy Services <hr></div></a>
|
||||||
<a href=""><div class=""> Count 112964   | Site Performance   <hr> </div></a>
|
<a href=""><div class=""> Count 112964 | Site Performance <hr> </div></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
90
src/pages/documents/[id].vue
Normal file
90
src/pages/documents/[id].vue
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
<template>
|
||||||
|
<div class="container bg-white mx-auto mt-3 p-0">
|
||||||
|
<div v-if="isLoading">
|
||||||
|
<h2>Loading ...</h2>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<div v-html="page[0].content" class="container mx-auto">
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div v-if="fileAttached">
|
||||||
|
<h2>Attachments</h2>
|
||||||
|
<table>
|
||||||
|
<tr v-for="(file, index) in files">
|
||||||
|
|
||||||
|
<td>{{index+1}}. </td>
|
||||||
|
<td><a target="_blank" :href="`https://api8.siliconpin.com/assets/` + file.id+'?download' " :download="file.filename_download">
|
||||||
|
<h3> {{ file.filename_download }}</h3>
|
||||||
|
</a></td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
page: null,
|
||||||
|
fileAttached:false,
|
||||||
|
files: [],
|
||||||
|
isLoading: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted: function () {
|
||||||
|
fetch('https://api8.siliconpin.com/items/scc22?filter[slug][_eq]=' + this.$route.params.id)
|
||||||
|
.then((response) => {
|
||||||
|
if (response.ok) {
|
||||||
|
return response.json();
|
||||||
|
}
|
||||||
|
throw new Error('Something went wrong');
|
||||||
|
})
|
||||||
|
.then(jsonPageData => {
|
||||||
|
this.page = jsonPageData.data
|
||||||
|
this.isLoading = false
|
||||||
|
return jsonPageData.data[0].id
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((pageID) => {
|
||||||
|
fetch('https://api8.siliconpin.com/items/scc22_files_1?filter[scc22_id][_in]=' + pageID)
|
||||||
|
.then(resp => resp.json())
|
||||||
|
.then(file => {
|
||||||
|
let attIDs = ''
|
||||||
|
let t = 0
|
||||||
|
file.data.forEach(ids => {
|
||||||
|
if (t == 0) attIDs = ids.directus_files_id
|
||||||
|
else attIDs = attIDs + ',' + ids.directus_files_id
|
||||||
|
t++
|
||||||
|
});
|
||||||
|
if(t>0) this.fileAttached=true
|
||||||
|
return attIDs
|
||||||
|
})
|
||||||
|
.then((attIDs) => {
|
||||||
|
fetch('https://api8.siliconpin.com/files?filter[id][_in]=' + attIDs)
|
||||||
|
.then(resp => resp.json())
|
||||||
|
.then(file => {
|
||||||
|
this.files = file.data
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.log(error)
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// getAttachments(att) {
|
||||||
|
|
||||||
|
// console.log(att)
|
||||||
|
// // fetch('https://api8.siliconpin.com/items/ecom55?filter[slug][_eq]=' + this.$route.params.id)
|
||||||
|
// // .then(response => response.json())
|
||||||
|
// // .then(data => this.itemByCategory = data)
|
||||||
|
// // console.log(this.itemByCategory)
|
||||||
|
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
44
src/pages/documents/index.vue
Normal file
44
src/pages/documents/index.vue
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<template>
|
||||||
|
<div class="container bg-white mx-auto mt-3 p-0">
|
||||||
|
<h2>All pages having Documents / file Attachments are listed below:</h2>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<div v-if="isLoading">
|
||||||
|
<h2>Loading ...</h2>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<div v-for="(item, index) in page" >
|
||||||
|
<router-link :to="'/documents/'+item.slug"> <h3> {{item.title}}</h3> </router-link>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</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>
|
||||||
@@ -8,20 +8,18 @@
|
|||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div v-if="files">
|
<div v-if="fileAttached">
|
||||||
<h2>Attachments</h2>
|
<h2>Attachments</h2>
|
||||||
<div v-for="(file, index) in files">
|
<div v-for="(file, index) in files">
|
||||||
{{index+1}}<a :href="'https://api8.siliconpin.com/assets/' + file.directus_files_id">
|
|
||||||
<h3> {{ file.directus_files_id }}</h3>
|
{{index+1}}
|
||||||
|
<a target="_blank" :href="`https://api8.siliconpin.com/assets/` + file.id+'?download' " :download="file.filename_download">
|
||||||
|
<h3> {{ file.filename_download }}</h3>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <div>{{page[0].attachments[0]}}</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -38,24 +36,43 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
fetch('https://api8.siliconpin.com/items/scc22?filter[slug][_eq]=' + this.$route.params.id)
|
fetch('https://api8.siliconpin.com/items/scc22?filter[slug][_eq]=' + this.$route.params.id)
|
||||||
.then(response => response.json())
|
.then((response) => {
|
||||||
.then(data => {
|
if (response.ok) {
|
||||||
this.page = data.data
|
return response.json();
|
||||||
|
}
|
||||||
|
throw new Error('Something went wrong');
|
||||||
|
})
|
||||||
|
.then(jsonPageData => {
|
||||||
|
this.page = jsonPageData.data
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
|
return jsonPageData.data[0].id
|
||||||
fetch('https://api8.siliconpin.com/items/scc22_files_1?filter[scc22_id][_in]=' + this.page[0].id)
|
}
|
||||||
|
)
|
||||||
|
.then((pageID) => {
|
||||||
|
fetch('https://api8.siliconpin.com/items/scc22_files_1?filter[scc22_id][_in]=' + pageID)
|
||||||
|
.then(resp => resp.json())
|
||||||
|
.then(file => {
|
||||||
|
let attIDs = ''
|
||||||
|
let t = 0
|
||||||
|
file.data.forEach(ids => {
|
||||||
|
if (t == 0) attIDs = ids.directus_files_id
|
||||||
|
else attIDs = attIDs + ',' + ids.directus_files_id
|
||||||
|
t++
|
||||||
|
});
|
||||||
|
if(t>0) this.fileAttached=true
|
||||||
|
return attIDs
|
||||||
|
})
|
||||||
|
.then((attIDs) => {
|
||||||
|
fetch('https://api8.siliconpin.com/files?filter[id][_in]=' + attIDs)
|
||||||
.then(resp => resp.json())
|
.then(resp => resp.json())
|
||||||
.then(file => {
|
.then(file => {
|
||||||
this.files = file.data
|
this.files = file.data
|
||||||
this.fileAttached=true
|
|
||||||
// attach.data.forEach(fileID=> this.files.push(fileID.directus_files_id))
|
|
||||||
console.log(file.data)
|
|
||||||
// this.attachments.push(attach.data[0].directus_files_id)
|
|
||||||
})
|
})
|
||||||
if(fileAttached){}
|
|
||||||
// console.log(Object.assign({}, this.files))
|
|
||||||
// console.log(this.files)
|
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.log(error)
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// getAttachments(att) {
|
// getAttachments(att) {
|
||||||
|
|||||||
@@ -27,12 +27,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
fetch('https://api8.siliconpin.com/items/scc22?filter[type][_eq]=notice')
|
fetch('https://api8.siliconpin.com/items/scc22?filter[type][_eq]=notice&limit=-1')
|
||||||
// fetch('https://api8.siliconpin.com/items/scc22?slug=about-us')
|
// fetch('https://api8.siliconpin.com/items/scc22?slug=about-us')
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
this.page = data.data
|
this.page = data.data
|
||||||
console.log(data)
|
// console.log(data)
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
2
typed-router.d.ts
vendored
2
typed-router.d.ts
vendored
@@ -39,6 +39,8 @@ declare module 'vue-router/auto/routes' {
|
|||||||
'/[...404]': RouteRecordInfo<'/[...404]', '/:404(.*)', { 404: ParamValue<true> }, { 404: ParamValue<false> }>,
|
'/[...404]': RouteRecordInfo<'/[...404]', '/:404(.*)', { 404: ParamValue<true> }, { 404: ParamValue<false> }>,
|
||||||
'/[id]': RouteRecordInfo<'/[id]', '/:id', { id: ParamValue<true> }, { id: ParamValue<false> }>,
|
'/[id]': RouteRecordInfo<'/[id]', '/:id', { id: ParamValue<true> }, { id: ParamValue<false> }>,
|
||||||
'/about': RouteRecordInfo<'/about', '/about', Record<never, never>, Record<never, never>>,
|
'/about': RouteRecordInfo<'/about', '/about', Record<never, never>, Record<never, never>>,
|
||||||
|
'/documents/': RouteRecordInfo<'/documents/', '/documents', Record<never, never>, Record<never, never>>,
|
||||||
|
'/documents/[id]': RouteRecordInfo<'/documents/[id]', '/documents/:id', { id: ParamValue<true> }, { id: ParamValue<false> }>,
|
||||||
'/gallery': RouteRecordInfo<'/gallery', '/gallery', Record<never, never>, Record<never, never>>,
|
'/gallery': RouteRecordInfo<'/gallery', '/gallery', Record<never, never>, Record<never, never>>,
|
||||||
'/index2': RouteRecordInfo<'/index2', '/index2', Record<never, never>, Record<never, never>>,
|
'/index2': RouteRecordInfo<'/index2', '/index2', Record<never, never>, Record<never, never>>,
|
||||||
'/notice/': RouteRecordInfo<'/notice/', '/notice', Record<never, never>, Record<never, never>>,
|
'/notice/': RouteRecordInfo<'/notice/', '/notice', Record<never, never>, Record<never, never>>,
|
||||||
|
|||||||
Reference in New Issue
Block a user