themes
This commit is contained in:
193
src/components/OccasionAudioBook.vue
Normal file
193
src/components/OccasionAudioBook.vue
Normal file
@@ -0,0 +1,193 @@
|
||||
<template>
|
||||
<section class="container mx-auto pt-10 px-4 xl:px-24">
|
||||
<span class="h1-text text-blue-700 font-semibold">Audio Books</span>
|
||||
<h1 class="text-2xl text-justify text-color-2 py-4" v-if="page">{{page[0].audio_books_text}}</h1>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 mt-12 gap-10 place-items-center px-4">
|
||||
<div v-for="audiobooks in audiobooks" :key="audiobooks.id" class="grid">
|
||||
<div @click="showAbModal(audiobooks.file)">
|
||||
<div class="grid place-items-center cursor-pointer">
|
||||
<div class=" ">
|
||||
<img class="w-56" v-if="audiobooks.audio_icon" :src="'https://curriculum-app-api.beanstalkedu.com/assets/'+ audiobooks.audio_icon" alt=""/>
|
||||
</div>
|
||||
<h1 class="pt-4 w-fit font-20px">{{audiobooks.title}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div v-if="abModal" id="abModal" class="flex justify-center abModal">
|
||||
<div class="modal-content" @click="doNothing()">
|
||||
<span @click="hideAbModal" class="close">×</span>
|
||||
<audio controls>
|
||||
<source :src="'https://curriculum-app-api.beanstalkedu.com/assets/'+ abID" type="audio/ogg">
|
||||
Your browser does not support the audio element.
|
||||
</audio>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
page:null,
|
||||
abModal:false,
|
||||
audiobooks:null,
|
||||
abworld:null,
|
||||
abmath:null,
|
||||
abID:''
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showAbModal(abID){
|
||||
this.abModal=true
|
||||
this.abID=abID
|
||||
// alert(abID)
|
||||
},
|
||||
hideAbModal(){
|
||||
this.abModal=false
|
||||
// // this.abID=abID
|
||||
},
|
||||
doNothing(){
|
||||
// alert();
|
||||
}
|
||||
|
||||
},
|
||||
mounted: function () {
|
||||
// this.getVideos()
|
||||
fetch('https://curriculum-app-api.beanstalkedu.com/items/occassion?filter[status][_eq]=published')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
this.page = data.data
|
||||
this.isLoading = false
|
||||
// console.log(this.page[0].id)
|
||||
return this.page[0].id
|
||||
})
|
||||
fetch('https://curriculum-app-api.beanstalkedu.com/items/occassion_audio_book')
|
||||
.then(resp => resp.json())
|
||||
.then(audiobooks => {
|
||||
this.audiobooks=audiobooks.data.reverse().slice(0, 3)
|
||||
console.log(this.audiobooks)
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.abModal {
|
||||
/* display: none; */
|
||||
position: fixed;
|
||||
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);
|
||||
}
|
||||
.modal-content{
|
||||
background-color: rgb(255, 255, 255);
|
||||
padding: 20px;
|
||||
border: 1px solid #888;
|
||||
width: fit-content;
|
||||
height: fit-content;
|
||||
margin: 0 auto;
|
||||
border-radius: 16px;
|
||||
}
|
||||
.close {
|
||||
display: flex;
|
||||
place-items: center;
|
||||
color: #aaaaaa;
|
||||
float: right;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.close:hover,
|
||||
.close:focus {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
.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;
|
||||
|
||||
}
|
||||
}
|
||||
.text-color-1 {
|
||||
color: #7C4C23;
|
||||
}
|
||||
|
||||
.text-color-2 {
|
||||
color: #333333;
|
||||
}
|
||||
/* DROPDOWN MENU */
|
||||
.services {
|
||||
position: relative;
|
||||
}
|
||||
.dropdown {
|
||||
z-index: 999;
|
||||
background-color: rgb(247, 235, 173);
|
||||
padding: 1em 0;
|
||||
position: absolute; /*WITH RESPECT TO PARENT*/
|
||||
display: none;
|
||||
border-radius: 8px;
|
||||
top: 35px;
|
||||
margin-left: -30px;
|
||||
}
|
||||
.dropdown li + li {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.dropdown li {
|
||||
padding: 0.5em 1em;
|
||||
width: 8em;
|
||||
text-align: center;
|
||||
}
|
||||
.dropdown li:hover {
|
||||
background-color: rgb(250, 230, 133);
|
||||
color: #ff0000;
|
||||
}
|
||||
.services:hover .dropdown {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
|
||||
input[type=checkbox]{
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
248
src/components/OccassionVideo.vue
Normal file
248
src/components/OccassionVideo.vue
Normal file
@@ -0,0 +1,248 @@
|
||||
<template>
|
||||
|
||||
<section class="container mx-auto py-6 px-4 xl:px-24">
|
||||
<div class="h1-text text-blue-700 font-semibold py-4">Videos</div>
|
||||
<h1 class="text-2xl text-justify text-color-2 py-4" v-if="page">{{page[0].videos_text}}</h1>
|
||||
<div v-if="videos" class="grid place-items-center grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-8">
|
||||
<div v-for="vdo in videos.slice(0, 3)" :key="videos.id" class="p-4">
|
||||
<div @click="showYtModal(vdo.youtube_id)">
|
||||
<div class="flex bg-gray-200 -rotate-6 cursor-pointer gap-8">
|
||||
<div class="flex rotate-6 relative"><img v-if="vdo.video_thumb" :src="'https://curriculum-app-api.beanstalkedu.com/assets/'+vdo.video_thumb" alt="" class="rounded-tl-xl rounded-br-xl shadow-2xl" />
|
||||
<img class="absolute top-16 left-24 -rotate-6 w-16" src="/img/svg/play.svg" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-6 text-center text-xl text-color-2">{{vdo.videos_title}}</div>
|
||||
</div>
|
||||
|
||||
<!-- <label :for="vdo.videos_file" >
|
||||
<div class="flex bg-gray-200 -rotate-6 cursor-pointer gap-8">
|
||||
<div class="flex rotate-6 relative"><img v-if="vdo.video_thumb" :src="'https://curriculum-app-api.beanstalkedu.com/assets/'+vdo.video_thumb" alt="" class="rounded-tl-xl rounded-br-xl shadow-2xl" />
|
||||
<img v-else src="/img/image_not_available.png" alt="" />
|
||||
<img class="absolute top-20 left-28 -rotate-6 w-24" src="/img/svg/play.svg" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-6 text-center text-xl text-color-2">{{vdo.videos_title}}</div>
|
||||
</label>
|
||||
<input type="checkbox" :id="vdo.videos_file" class="modal-toggle" />
|
||||
<label :for="vdo.videos_file" class="modal cursor-pointer">
|
||||
<label class="modal-box relative" for="">
|
||||
<iframe width="340"
|
||||
src="https://www.youtube.com/embed/tgbNymZ7vqY">
|
||||
</iframe>
|
||||
</label>
|
||||
</label> -->
|
||||
</div>
|
||||
<router-link to="/plan">
|
||||
<div v-for="vdo in videos.slice(3, 4)" :key="videos.id" class="p-4">
|
||||
<div class="flex bg-gray-200 -rotate-6 gap-8">
|
||||
<div class="flex rotate-6 relative"><img v-if="vdo.video_thumb" :src="'https://curriculum-app-api.beanstalkedu.com/assets/'+vdo.video_thumb" alt="" class="rounded-tl-lg rounded-br-lg" />
|
||||
<div class="absolute top-16 left-20">
|
||||
<h3 class="text-center inline-block px-4 py-2.5 bg-amber-500 text-white font-medium text-xs leading-tight rounded shadow-md hover:bg-amber-400 hover:shadow-lg focus:bg-amber-600 focus:shadow-lg focus:outline-none focus:ring-0 active:bg-blue-800 active:shadow-lg transition duration-150 ease-in-out">+ Subscribe </h3>
|
||||
<h3 class="-ml-2"> To download <br> more resources</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-6 text-center text-lg ">...</div>
|
||||
</div></router-link>
|
||||
</div>
|
||||
</section>
|
||||
<div @click="hideYtModal" v-if="ytModal" id="ytModal" class="flex justify-center ytModal">
|
||||
<div class="modal-content">
|
||||
<span @click="hideYtModal" class="close">×</span>
|
||||
<div style="width: 100%;">
|
||||
<iframe width="380" height="320"
|
||||
:src="'https://www.youtube.com/embed/'+ytID">
|
||||
</iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<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,
|
||||
faqOccassion: null,
|
||||
occassionblog: null,
|
||||
themes:null,
|
||||
allOccassion:null,
|
||||
stories: null,
|
||||
ideas: null,
|
||||
worksheets: null,
|
||||
videos: null,
|
||||
youtube: null,
|
||||
audio: null,
|
||||
isLoading: true,
|
||||
ytModal:false,
|
||||
ytID:''
|
||||
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
fetch('https://curriculum-app-api.beanstalkedu.com/items/occassion?filter[status][_eq]=published')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
this.page = data.data
|
||||
this.isLoading = false
|
||||
// console.log(this.page[0].id)
|
||||
return this.page[0].id
|
||||
})
|
||||
.then((occassionID) => {
|
||||
fetch('https://curriculum-app-api.beanstalkedu.com/items/occassion_videos?filter[occassion_key][_in]='+ occassionID)
|
||||
.then(resp => resp.json())
|
||||
.then(videos => {
|
||||
this.videos=videos.data.reverse().slice(0, 4)
|
||||
// console.log(this.videos)
|
||||
})
|
||||
return occassionID
|
||||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scopped>
|
||||
.font-20px {
|
||||
font-size: 20px;
|
||||
}
|
||||
@media screen and (min-width: 1500px) {
|
||||
.hero-text {
|
||||
font-size: 50px;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1499px) {
|
||||
.hero-text {
|
||||
font-size: 40px;
|
||||
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1199px) {
|
||||
.hero-text {
|
||||
font-size: 30px;
|
||||
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 801px) {
|
||||
.h1-text {
|
||||
font-size: 40px;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1500px) {
|
||||
.h2-text {
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1499px) {
|
||||
.h2-text {
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1199px) {
|
||||
.h2-text {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
.h1-text {
|
||||
font-size: 30px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.load-wraper{
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: rgb(211,211,211);
|
||||
z-index: 44;
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.activity{
|
||||
position: absolute;
|
||||
left: -45%;
|
||||
height: 100%;
|
||||
width: 45%;
|
||||
background-image: linear-gradient(to left, rgba(251,251,251, .05), rgba(251,251,251, .3), rgba(251,251,251, .6), rgba(251,251,251, .3), rgba(251,251,251, .05));
|
||||
background-image: -moz-linear-gradient(to left, rgba(251,251,251, .05), rgba(251,251,251, .3), rgba(251,251,251, .6), rgba(251,251,251, .3), rgba(251,251,251, .05));
|
||||
background-image: -webkit-linear-gradient(to left, rgba(251,251,251, .05), rgba(251,251,251, .3), rgba(251,251,251, .6), rgba(251,251,251, .3), rgba(251,251,251, .05));
|
||||
animation: loading 1s infinite;
|
||||
z-index: 45;
|
||||
}
|
||||
|
||||
@keyframes loading {
|
||||
0%{
|
||||
left: -45%;
|
||||
}
|
||||
100%{
|
||||
left: 100%;
|
||||
}
|
||||
}
|
||||
.text-color-1 {
|
||||
color: #7C4C23;
|
||||
}
|
||||
|
||||
.text-color-2 {
|
||||
color: #333333;
|
||||
}
|
||||
.box{
|
||||
width: 380px;
|
||||
height: 220px;
|
||||
}
|
||||
.box1 {
|
||||
width: 500px;
|
||||
height: 220px;
|
||||
}
|
||||
input[type="file"] {
|
||||
display: none;
|
||||
}
|
||||
.custom-file-upload {
|
||||
border: 1px solid #ccc;
|
||||
display: inline-block;
|
||||
padding: 6px 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.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);
|
||||
}
|
||||
.bg3 {
|
||||
background: linear-gradient(0deg, rgb(191, 219, 254, 1) 0%, rgba(255, 255, 255) 100%);}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
16
src/components/ShareSideSticky.astro
Normal file
16
src/components/ShareSideSticky.astro
Normal file
@@ -0,0 +1,16 @@
|
||||
<section class="z-50">
|
||||
<div>
|
||||
<a href="#" target="_blank" style=" position: fixed; top: 200px; right: 10px; background-color: #7C4C23; width: 50px; height: 50px; border-radius: 50%; text-align: center;">
|
||||
<img class="" src="/img/svg/link.svg" alt="">
|
||||
</a>
|
||||
<a href="https://api.whatsapp.com/send/?phone=919163646431&text&app_absent=0" target="_blank" style=" position: fixed; top: 260px; right: 10px; background-color: #7C4C23; width: 50px; height: 50px; border-radius: 50%; text-align: center;">
|
||||
<img class="" src="/img/svg/whatsapp.svg" alt="">
|
||||
</a>
|
||||
<a href="#" target="_blank" style=" position: fixed; top: 320px; right: 10px; background-color: #7C4C23; width: 50px; height: 50px; border-radius: 50%; text-align: center;">
|
||||
<img class="" src="/img/svg/facebook.svg" alt="">
|
||||
</a>
|
||||
<a href="#" target="_blank" style=" position: fixed; top: 380px; right: 10px; background-color: #7C4C23; width: 50px; height: 50px; border-radius: 50%; text-align: center;">
|
||||
<img class="" src="/img/svg/twitterw.svg" alt="">
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
120
src/components/SubmitCelebration.vue
Normal file
120
src/components/SubmitCelebration.vue
Normal file
@@ -0,0 +1,120 @@
|
||||
<template>
|
||||
<!-- Submit your Celebration Story here -->
|
||||
<section class="container mx-auto px-4 xl:px-24">
|
||||
<h1 id="submitCelebration" class="h1-text text-blue-700 font-semibold">Submit your Celebration Story here</h1>
|
||||
|
||||
<div class=" bg-gray-300 rounded-tl-3xl rounded-br-3xl mt-4">
|
||||
<div class="grid grid-cols-1 md:grid-cols-1 lg:grid-cols-2 place-items-center " v-if="celebrationstory">
|
||||
<div class="grid place-items-center py-20 rounded-tl-3xl rounded-br-3xl">
|
||||
<div class="grid">
|
||||
<div class=" w-full max-w-xs gap-4 drop-shadow-2xl">
|
||||
<input v-model="scsname" type="text" placeholder="Your Name" class="input input-bordered w-full max-w-xs p-8"/>
|
||||
<input v-model="scsnumber" type="text" placeholder="Your Phone Number" class="input input-bordered w-full max-w-xs" />
|
||||
<input v-model="scsemail" type="text" placeholder="Your E-mail ID" class="input input-bordered w-full max-w-xs" />
|
||||
<input v-model="scsschoolname" type="text" placeholder="Your School Name" class="input input-bordered w-full max-w-xs" />
|
||||
<input v-model="scsglink" type="text" placeholder="Place your Google Drive File Link" class="input input-bordered w-full max-w-xs" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid place-items-end">
|
||||
<div class="flex place-content-end">
|
||||
<h1 class="justify-center pt-2 text-xl font-semibold py-8"> Occassion: </h1>
|
||||
<select class="select max-w-xs border-2 border-gray-400 text-lg" v-model="scsOccetion">
|
||||
<option disabled value="">Select your Occassion</option>
|
||||
<option>Good Friday</option>
|
||||
<option>Easter</option>
|
||||
<option>Christmas</option>
|
||||
<option>Thanksgiving</option>
|
||||
<option>Good Friday</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-control">
|
||||
<textarea v-model="scsdescription" class="textarea textarea-bordered h-48 w-96 text-lg shadow-2xl" placeholder="Write the description here....."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="py-8"><button @click="savecelebrationstory" class="text-lg bg-blue-700 text-white p-2 px-3 rounded-tl-lg rounded-br-lg">Publish Story</button></div>
|
||||
</div>
|
||||
<div v-else="savecelebrationstory"><h2 class="text-2xl text-center py-48"> Thank You <br>Published your Story Shortly.......</h2></div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
</template>
|
||||
<style scoped>
|
||||
.text-color-1 {
|
||||
color: #7c4c23
|
||||
}
|
||||
@media screen and (min-width: 801px) {
|
||||
.h1-text {
|
||||
font-size: 40px;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
.h1-text {
|
||||
font-size: 25px;
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isLoading: true,
|
||||
scsname:null,
|
||||
scsnumber:null,
|
||||
scsemail:null,
|
||||
celebrationstory:true,
|
||||
scsOccetion:'',
|
||||
scsschoolname:null,
|
||||
scsglink:null,
|
||||
scsdescription:null,
|
||||
|
||||
// contact_form:{}
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
// this.getItemByCategory()
|
||||
// console.log(this.smProducts)
|
||||
// console.log(this.$route.query.cat)
|
||||
// console.log(this.fruits)
|
||||
|
||||
},
|
||||
methods: {
|
||||
savecelebrationstory() {
|
||||
let formData = new FormData();
|
||||
formData.append('Name', this.scsname);
|
||||
formData.append('Phone', this.scsnumber);
|
||||
formData.append('Email', this.scsemail);
|
||||
formData.append('MessageDetails', 'Occassion: ' + this.scsOccetion +' Description: '+this.scsdescription+' school name: '+this.scsschoolname+' FileLink: '+this.scsglink);
|
||||
formData.append('formName', 'tb-educators-Need-Help-Planning-Curriculum');
|
||||
fetch('https://api.teenybeans.in/API/contactFormProcessor/v1/',
|
||||
{
|
||||
method: 'POST',
|
||||
// headers: {
|
||||
// 'Content-Type': 'multipart/form-data',
|
||||
// // 'Authorization': 'Bearer my-token',
|
||||
// // 'My-Custom-Header': 'foobar'
|
||||
// },
|
||||
body: formData,
|
||||
}
|
||||
)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
// console.log(this.scsOccetion)
|
||||
// console.log(data)
|
||||
});
|
||||
// formData=""
|
||||
this.celebrationstory=false
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
193
src/components/ThemesAudioBook.vue
Normal file
193
src/components/ThemesAudioBook.vue
Normal file
@@ -0,0 +1,193 @@
|
||||
<template>
|
||||
<section class="container mx-auto pt-10 px-4 xl:px-24">
|
||||
<span class="h1-text text-blue-700 font-semibold">Audio Books</span>
|
||||
<h1 class="text-2xl text-justify text-color-2 py-4" v-if="page">{{page[0].audio_books_text}}</h1>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 mt-12 gap-10 place-items-center px-4">
|
||||
<div v-for="audiobooks in audiobooks" :key="audiobooks.id" class="grid">
|
||||
<div @click="showAbModal(audiobooks.file)">
|
||||
<div class="grid place-items-center cursor-pointer">
|
||||
<div class=" ">
|
||||
<img class="w-56" v-if="audiobooks.audio_icon" :src="'https://curriculum-app-api.beanstalkedu.com/assets/'+ audiobooks.audio_icon" alt=""/>
|
||||
</div>
|
||||
<h1 class="pt-4 w-fit font-20px text-center">{{audiobooks.title}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div v-if="abModal" id="abModal" class="flex justify-center abModal">
|
||||
<div class="modal-content" @click="doNothing()">
|
||||
<span @click="hideAbModal" class="close">×</span>
|
||||
<audio controls>
|
||||
<source :src="'https://curriculum-app-api.beanstalkedu.com/assets/'+ abID" type="audio/ogg">
|
||||
Your browser does not support the audio element.
|
||||
</audio>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
page:null,
|
||||
abModal:false,
|
||||
audiobooks:null,
|
||||
abworld:null,
|
||||
abmath:null,
|
||||
abID:''
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showAbModal(abID){
|
||||
this.abModal=true
|
||||
this.abID=abID
|
||||
// alert(abID)
|
||||
},
|
||||
hideAbModal(){
|
||||
this.abModal=false
|
||||
// // this.abID=abID
|
||||
},
|
||||
doNothing(){
|
||||
// alert();
|
||||
}
|
||||
|
||||
},
|
||||
mounted: function () {
|
||||
// this.getVideos()
|
||||
fetch('https://curriculum-app-api.beanstalkedu.com/items/themes?filter[status][_eq]=published')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
this.page = data.data
|
||||
this.isLoading = false
|
||||
// console.log(this.page[0].id)
|
||||
return this.page[0].id
|
||||
})
|
||||
fetch('https://curriculum-app-api.beanstalkedu.com/items/theme_audio_book')
|
||||
.then(resp => resp.json())
|
||||
.then(audiobooks => {
|
||||
this.audiobooks=audiobooks.data.reverse().slice(0, 3)
|
||||
console.log(this.audiobooks)
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.abModal {
|
||||
/* display: none; */
|
||||
position: fixed;
|
||||
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);
|
||||
}
|
||||
.modal-content{
|
||||
background-color: rgb(255, 255, 255);
|
||||
padding: 20px;
|
||||
border: 1px solid #888;
|
||||
width: fit-content;
|
||||
height: fit-content;
|
||||
margin: 0 auto;
|
||||
border-radius: 16px;
|
||||
}
|
||||
.close {
|
||||
display: flex;
|
||||
place-items: center;
|
||||
color: #aaaaaa;
|
||||
float: right;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.close:hover,
|
||||
.close:focus {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
.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;
|
||||
|
||||
}
|
||||
}
|
||||
.text-color-1 {
|
||||
color: #7C4C23;
|
||||
}
|
||||
|
||||
.text-color-2 {
|
||||
color: #333333;
|
||||
}
|
||||
/* DROPDOWN MENU */
|
||||
.services {
|
||||
position: relative;
|
||||
}
|
||||
.dropdown {
|
||||
z-index: 999;
|
||||
background-color: rgb(247, 235, 173);
|
||||
padding: 1em 0;
|
||||
position: absolute; /*WITH RESPECT TO PARENT*/
|
||||
display: none;
|
||||
border-radius: 8px;
|
||||
top: 35px;
|
||||
margin-left: -30px;
|
||||
}
|
||||
.dropdown li + li {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.dropdown li {
|
||||
padding: 0.5em 1em;
|
||||
width: 8em;
|
||||
text-align: center;
|
||||
}
|
||||
.dropdown li:hover {
|
||||
background-color: rgb(250, 230, 133);
|
||||
color: #ff0000;
|
||||
}
|
||||
.services:hover .dropdown {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
|
||||
input[type=checkbox]{
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
248
src/components/ThemesVideos.vue
Normal file
248
src/components/ThemesVideos.vue
Normal file
@@ -0,0 +1,248 @@
|
||||
<template>
|
||||
|
||||
<section class="container mx-auto py-6 px-4 xl:px-24">
|
||||
<div class="h1-text text-blue-700 font-semibold py-4">Videos</div>
|
||||
<h1 class="text-2xl text-justify text-color-2 py-4" v-if="page">{{page[0].videos_text}}</h1>
|
||||
<div v-if="videos" class="grid place-items-center grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-8">
|
||||
<div v-for="vdo in videos.slice(0, 3)" :key="videos.id" class="p-4">
|
||||
<div @click="showYtModal(vdo.youtube_id)">
|
||||
<div class="flex bg-gray-200 -rotate-6 cursor-pointer gap-8">
|
||||
<div class="flex rotate-6 relative"><img v-if="vdo.video_thumb" :src="'https://curriculum-app-api.beanstalkedu.com/assets/'+vdo.video_thumb" alt="" class="rounded-tl-xl rounded-br-xl shadow-2xl" />
|
||||
<img class="absolute top-16 left-24 -rotate-6 w-16" src="/img/svg/play.svg" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-6 text-center text-xl text-color-2">{{vdo.videos_title}}</div>
|
||||
</div>
|
||||
|
||||
<!-- <label :for="vdo.videos_file" >
|
||||
<div class="flex bg-gray-200 -rotate-6 cursor-pointer gap-8">
|
||||
<div class="flex rotate-6 relative"><img v-if="vdo.video_thumb" :src="'https://curriculum-app-api.beanstalkedu.com/assets/'+vdo.video_thumb" alt="" class="rounded-tl-xl rounded-br-xl shadow-2xl" />
|
||||
<img v-else src="/img/image_not_available.png" alt="" />
|
||||
<img class="absolute top-20 left-28 -rotate-6 w-24" src="/img/svg/play.svg" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-6 text-center text-xl text-color-2">{{vdo.videos_title}}</div>
|
||||
</label>
|
||||
<input type="checkbox" :id="vdo.videos_file" class="modal-toggle" />
|
||||
<label :for="vdo.videos_file" class="modal cursor-pointer">
|
||||
<label class="modal-box relative" for="">
|
||||
<iframe width="340"
|
||||
src="https://www.youtube.com/embed/tgbNymZ7vqY">
|
||||
</iframe>
|
||||
</label>
|
||||
</label> -->
|
||||
</div>
|
||||
<a href="/plan">
|
||||
<div v-for="vdo in videos.slice(3, 4)" :key="videos.id" class="p-4">
|
||||
<div class="flex bg-gray-200 -rotate-6 gap-8">
|
||||
<div class="flex rotate-6 relative"><img v-if="vdo.video_thumb" :src="'https://curriculum-app-api.beanstalkedu.com/assets/'+vdo.video_thumb" alt="" class="rounded-tl-lg rounded-br-lg" />
|
||||
<div class="absolute top-16 left-20">
|
||||
<h3 class="text-center inline-block px-4 py-2.5 bg-amber-500 text-white font-medium text-xs leading-tight rounded shadow-md hover:bg-amber-400 hover:shadow-lg focus:bg-amber-600 focus:shadow-lg focus:outline-none focus:ring-0 active:bg-blue-800 active:shadow-lg transition duration-150 ease-in-out">+ Subscribe </h3>
|
||||
<h3 class="-ml-2"> To download <br> more resources</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-6 text-center text-lg ">...</div>
|
||||
</div></a>
|
||||
</div>
|
||||
</section>
|
||||
<div @click="hideYtModal" v-if="ytModal" id="ytModal" class="flex justify-center ytModal">
|
||||
<div class="modal-content">
|
||||
<span @click="hideYtModal" class="close">×</span>
|
||||
<div style="width: 100%;">
|
||||
<iframe width="380" height="320"
|
||||
:src="'https://www.youtube.com/embed/'+ytID">
|
||||
</iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<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,
|
||||
faqOccassion: null,
|
||||
occassionblog: null,
|
||||
themes:null,
|
||||
allOccassion:null,
|
||||
stories: null,
|
||||
ideas: null,
|
||||
worksheets: null,
|
||||
videos: null,
|
||||
youtube: null,
|
||||
audio: null,
|
||||
isLoading: true,
|
||||
ytModal:false,
|
||||
ytID:''
|
||||
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
fetch('https://curriculum-app-api.beanstalkedu.com/items/themes?filter[status][_eq]=published')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
this.page = data.data
|
||||
this.isLoading = false
|
||||
// console.log(this.page[0].id)
|
||||
return this.page[0].id
|
||||
})
|
||||
.then((themesID) => {
|
||||
fetch('https://curriculum-app-api.beanstalkedu.com/items/theme_videos?filter[theme_key][_in]='+ themesID)
|
||||
.then(resp => resp.json())
|
||||
.then(videos => {
|
||||
this.videos=videos.data.reverse().slice(0, 4)
|
||||
// console.log(this.videos)
|
||||
})
|
||||
return themesID
|
||||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scopped>
|
||||
.font-20px {
|
||||
font-size: 20px;
|
||||
}
|
||||
@media screen and (min-width: 1500px) {
|
||||
.hero-text {
|
||||
font-size: 50px;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1499px) {
|
||||
.hero-text {
|
||||
font-size: 40px;
|
||||
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1199px) {
|
||||
.hero-text {
|
||||
font-size: 30px;
|
||||
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 801px) {
|
||||
.h1-text {
|
||||
font-size: 40px;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1500px) {
|
||||
.h2-text {
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1499px) {
|
||||
.h2-text {
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1199px) {
|
||||
.h2-text {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
.h1-text {
|
||||
font-size: 30px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.load-wraper{
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: rgb(211,211,211);
|
||||
z-index: 44;
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.activity{
|
||||
position: absolute;
|
||||
left: -45%;
|
||||
height: 100%;
|
||||
width: 45%;
|
||||
background-image: linear-gradient(to left, rgba(251,251,251, .05), rgba(251,251,251, .3), rgba(251,251,251, .6), rgba(251,251,251, .3), rgba(251,251,251, .05));
|
||||
background-image: -moz-linear-gradient(to left, rgba(251,251,251, .05), rgba(251,251,251, .3), rgba(251,251,251, .6), rgba(251,251,251, .3), rgba(251,251,251, .05));
|
||||
background-image: -webkit-linear-gradient(to left, rgba(251,251,251, .05), rgba(251,251,251, .3), rgba(251,251,251, .6), rgba(251,251,251, .3), rgba(251,251,251, .05));
|
||||
animation: loading 1s infinite;
|
||||
z-index: 45;
|
||||
}
|
||||
|
||||
@keyframes loading {
|
||||
0%{
|
||||
left: -45%;
|
||||
}
|
||||
100%{
|
||||
left: 100%;
|
||||
}
|
||||
}
|
||||
.text-color-1 {
|
||||
color: #7C4C23;
|
||||
}
|
||||
|
||||
.text-color-2 {
|
||||
color: #333333;
|
||||
}
|
||||
.box{
|
||||
width: 380px;
|
||||
height: 220px;
|
||||
}
|
||||
.box1 {
|
||||
width: 500px;
|
||||
height: 220px;
|
||||
}
|
||||
input[type="file"] {
|
||||
display: none;
|
||||
}
|
||||
.custom-file-upload {
|
||||
border: 1px solid #ccc;
|
||||
display: inline-block;
|
||||
padding: 6px 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.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);
|
||||
}
|
||||
.bg3 {
|
||||
background: linear-gradient(0deg, rgb(191, 219, 254, 1) 0%, rgba(255, 255, 255) 100%);}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user