teenybeanspreschoolcurricul.../src/components/Video-world.vue

172 lines
6.6 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<div>
<!-- Hero Section -->
<section class="container-fluid shadow-2xl">
<div class="bg-gradient-to-t from-blue-200 hero-text font-bold text-blue-700 text-center py-24 md:py-48 px-4">Videos for <span class="text-color-1">Understanding the Worlds</span></div>
<!-- Age Filter Triger -->
<!-- <div class="bg3 flex flex-col md:flex-row justify-center md:justify-end lg:px-48 px-4 pt-5 shadow-xl lg:gap-4">
<div class="flex">
<h1 class=" pt-3 font-semibold py-8">Age:&nbsp;</h1>
<select class="select max-w-xs bg3">
<option>Select your Age</option>
<option>2-3 Year</option>
<option>3-4 Year</option>
<option>4-5 Year</option>
<option>5-6 Year</option>
</select>
</div>
</div> -->
</section>
<section class="container mx-auto pt-10 px-6 xl:px-24">
<span class="h1-text text-color-1">All Videos</span>
<p class=" text-lg text-color-2 pb-16 text-base md:text-2xl text-justify">Our educational videos for preschoolers will bring a blend of education and entertainment to provide an easy comprehension of the world to students while they enjoy the visual and audio effects. Each topic concerns general knowledge of a childs surroundings. </p>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-10 place-items-center">
<div v-for="videobooks in vbworld" :key="vbworld.id" class="grid">
<div @click="showYtModal(videobooks.youtube_id)">
<div class="grid place-items-center">
<div class="relative rounded-tl-xl rounded-br-xl bg-gray-200 rotate-6">
<img class="w-96 relative -rotate-6 rounded-tl-xl rounded-br-xl cursor-pointer" v-if="videobooks.img" :src="'https://management.beanstalkedu.com/assets/'+ videobooks.img" alt=""/>
<img class="absolute inset-24 lg:inset-16 left-36 lg:left-24 w-16 cursor-pointer" src="/img/svg/play.svg" alt="">
</div>
<h1 class="text-center pt-4 w-fit font-20px">{{videobooks.title}}</h1>
<!-- <button class="bg-blue-700 p-1 text-white pl-4 pr-4 rounded-tl-lg rounded-br-lg ml-6 mt-8"><img class="w-5 pr-1 inline" src="/img/download.png" alt="">Download</button> -->
</div>
</div>
</div>
</div>
</section>
<section class="container mx-auto pt-10 px-6 xl:px-24 mb-16">
<a href="/premium">
<div class="flex prime-bg p-10 relative justify-center">
<h1 class="flex text-center justify-center absolute inset-0 pb-40 place-items-center text-4xl text-white">Subscribe To Our Plan <br> To View More</h1>
<div class="flex justify-center absolute inset-0 place-items-center">
<button class="bg-yellow-500 p-2 px-4 text-xl rounded-br-xl rounded-tl-xl text-white">Subscribe Now</button></div>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-10 place-items-center opacity-20">
<div v-for="videobooks in wbfworld" :key="wbfworld.id" class="grid">
<div class="grid place-items-center">
<div class="flex rounded-tl-xl rounded-br-xl bg-gray-200 rotate-6">
<img class="-rotate-6 rounded-tl-xl rounded-br-xl" v-if="videobooks.img" :src="'https://management.beanstalkedu.com/assets/'+ videobooks.img" alt=""/>
<img class="absolute inset-24 lg:inset-16 left-36 lg:left-24 w-16" src="/img/svg/play.svg" alt=""/>
</div>
<h1 class="text-center pt-4 w-fit">{{videobooks.title}}</h1>
</div>
</div>
</div>
</div>
</a>
</section>
<!-- Youtube Modal -->
<div @click="hideYtModal" v-if="ytModal" id="ytModal" class="flex justify-center ytModal">
<div class="modal-content">
<span @click="hideYtModal" class="close">&times;</span>
<div>
<iframe width="380" height="320" :src="'https://www.youtube.com/embed/'+ytID"></iframe>
</div>
</div>
</div>
</div>
</template>
<style scoped>
.bg3 {
background: linear-gradient(0deg, rgb(191, 219, 254, 1) 0%, rgba(255, 255, 255) 100%);
}
.font-20px {
font-size: 20px;
}
@media screen and (min-width: 801px) {
.hero-text {
font-size: 50px;
}
}
@media screen and (max-width: 800px) {
.hero-text {
font-size: 25px;
}
}
@media screen and (min-width: 801px) {
.h1-text {
font-size: 40px;
}
}
@media screen and (max-width: 800px) {
.h1-text {
font-size: 25px;
}
}
.ytModal {
/* display: none; */
position: fixed;
width: 80%;
z-index: 999991;
padding-top: 100px;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgb(0,0,0);
background-color: rgba(0,0,0,0.4);
}
.text-color-1 {
color: #7C4C23;
}
.prime-bg {
background-color: rgba(0, 0, 0, 0.2);
}
</style>
<script>
export default {
setup(){
// const route = useRoute();
},
methods: {
showYtModal(ytID){
this.ytModal=true
this.ytID=ytID
},
hideYtModal(){
this.ytModal=false
// this.ytID=ytID
}
},
data() {
return {
page: null,
videobooks: null,
vbworld: null,
wsWorld: null,
wbfworld: null,
isLoading: true,
ytModal:false,
ytID:''
}
},
mounted: function () {
fetch('https://management.beanstalkedu.com/items/video_book?filter[category][_eq]=world')
.then(resp => resp.json())
.then(videobooks => {
this.vbworld=videobooks.data
// console.log(this.vbworld)
})
fetch('https://management.beanstalkedu.com/items/video_book?filter[category][_eq]=world&limit=5')
.then(resp => resp.json())
.then(videobooks => {
this.wbfworld=videobooks.data
// console.log(this.wbfworld)
})
}
}
</script>