Compare commits

..

5 Commits

Author SHA1 Message Date
635963f74a
fix mobile ui for scroll
Some checks failed
buildbot/travis_bionic Build done.
2022-02-21 17:35:18 +05:30
ea8204989d
fix safari ui issue
Some checks failed
buildbot/travis_bionic Build done.
2022-02-15 15:39:20 +05:30
79282eb4ce
changed video tag to img and script logic also
Some checks failed
buildbot/travis_bionic Build done.
2022-02-09 22:07:27 +05:30
a2fb88783e
add posters as video thumbnails 2022-02-07 15:23:25 +05:30
c0ce5bca96
fix ui issue
Some checks failed
buildbot/travis_bionic Build done.
2022-02-03 19:10:36 +05:30
10 changed files with 198 additions and 182 deletions

Binary file not shown.

BIN
00-intro.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

BIN
01-analogies.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

BIN
02-principles.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

BIN
03-faq.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -1,87 +1,92 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./style.css"> <link rel="stylesheet" href="./style.css">
<title>Educational Bitcoin videos</title> <title>Educational Bitcoin videos</title>
</head> </head>
<body> <body>
<h3 class="heading">Bitcoin educational videos </h3>
<div class="container"> <div class="container">
<!-- Main video container start -->
<div class="main-video"> <div class="main-video">
<h1 class="heading"> Bitcoin educational videos </h1>
<div class="video"> <div class="video">
<video controls autoplay> <video controls preload="none" poster="00-intro.png">
<source src="00-intro.mp4" type="video/mp4"> <source src="00-intro.mp4" type="video/mp4">
<track default src="00-intro.vtt" kind="captions" srclang="en" label="English"> <track default src="00-intro.vtt" kind="captions" srclang="en" label="English">
</video> </video>
<h3 class="title">01. Intro</h3> <h3 class="title">01. Intro</h3>
</div> </div>
</div> </div>
<!-- Main video container end -->
<!-- Sidebar scroller start -->
<div class="video-list"> <div class="video-list">
<div class="vid active"> <div class="vid active">
<video controls muted autoplay> <!-- <video controls muted preload="none" poster="00-intro.png">
<source src="00-intro.mp4" type="video/mp4"> <source src="00-intro.mp4" type="video/mp4">
<track default src="00-intro.vtt" kind="captions" srclang="en" label="English"> <track default src="00-intro.vtt" kind="captions" srclang="en" label="English">
</video> -->
</video> <img src="00-intro.png" alt="00-intro" data-video="00-intro.mp4" data-vtt="00-intro.vtt">
<h3 class="title">01. Intro</h3> <h3 class="title">01. Intro</h3>
</div> </div>
<div class="vid"> <div class="vid">
<video controls muted autoplay> <img src="01-analogies.png" alt="01-analogies" data-video="01-analogies.mp4" data-vtt="01-analogies.vtt">
<!-- <video controls muted preload="none" poster="01-analogies.png">
<source src="01-analogies.mp4" type="video/mp4"> <source src="01-analogies.mp4" type="video/mp4">
<track default src="01-analogies.vtt" kind="captions" srclang="en" label="English"> <track default src="01-analogies.vtt" kind="captions" srclang="en" label="English">
</video> -->
</video>
<h3 class="title">02. Analogies</h3> <h3 class="title">02. Analogies</h3>
</div> </div>
<div class="vid"> <div class="vid">
<video controls muted autoplay> <img src="02-principles.png" alt="02-principles" data-video="02-principles.mp4" data-vtt="02-principles.vtt">
<!-- <video controls muted preload="none" poster="02-principles.png">
<source src="02-principles.mp4" type="video/mp4"> <source src="02-principles.mp4" type="video/mp4">
<track default src="02-principles.vtt" kind="captions" srclang="en" label="English"> <track default src="02-principles.vtt" kind="captions" srclang="en" label="English">
</video> -->
</video>
<h3 class="title">03. Principles</h3> <h3 class="title">03. Principles</h3>
</div> </div>
<div class="vid"> <div class="vid">
<video controls muted autoplay> <img src="03-faq.png" alt="03-faq" data-video="03-faq.mp4" data-vtt="03-faq.vtt">
<!-- <video controls muted preload="none" poster="03-faq.png">
<source src="03-faq.mp4" type="video/mp4"> <source src="03-faq.mp4" type="video/mp4">
<track default src="03-faq.vtt" kind="captions" srclang="en" label="English"> <track default src="03-faq.vtt" kind="captions" srclang="en" label="English">
</video> -->
</video>
<h3 class="title">04. FAQ</h3> <h3 class="title">04. FAQ</h3>
</div> </div>
</div> </div>
<!-- Sidebar scroller start -->
</div> </div>
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"/> -->
<script> <script>
let listVideo= document.querySelectorAll('.video-list .vid'); let listVideo= document.querySelectorAll('.video-list .vid');
let mainVideo= document.querySelector('.main-video video') let mainVideo= document.querySelector('.main-video video')
let title = document.querySelector('.main-video .title') let title = document.querySelector('.main-video .title')
listVideo.forEach(video =>{ listVideo.forEach(video =>{
video.onclick = () =>{ if(video){
listVideo.forEach(vid => vid.classList.remove('active')); video.onclick = () =>{
video.classList.add('active'); listVideo.forEach(vid => vid.classList.remove('active'));
console.log("video",video) video.classList.add('active');
let src = document.getElementsByClassName('active').item('video').children[0].currentSrc; let src = document.getElementsByClassName('active').item('img').children[0].attributes['data-video'].nodeValue;
// let src = $('.active').children[0].currentSrc; // let vtt = document.getElementsByClassName('active').item('img').children[0].attributes['data-vtt'].nodeValue;
if(video.classList.contains('active')){ let poster = document.getElementsByClassName('active').item('img').children[0].src;
// let src = video if(video.classList.contains('active')){
console.log("here is the src",src) mainVideo.src = src;
mainVideo.src = src; mainVideo.children[0].attributes['src'].nodeValue = src;
let text = video.children[1].innerHTML; // mainVideo.children[1].attributes['src'].nodeValue = vtt;
title.innerHTML = text; mainVideo.poster = poster;
let text = video.children[1].innerHTML;
title.innerHTML = text;
};
}; };
}; }
}); });
</script> </script>
</body> </body>
</html> </html>

297
style.css
View File

@ -1,144 +1,155 @@
*{ * {
margin: 0; margin: 0;
padding: 0; padding: 0;
box-sizing: border-box; -webkit-box-sizing: border-box;
text-transform: capitalize; box-sizing: border-box;
font-family: Verdana, Geneva, Tahoma, sans-serif; text-transform: capitalize;
font-weight: normal; font-family: Verdana, Geneva, Tahoma, sans-serif;
} font-weight: normal;
body{ }
background: transparent;
} body {
.heading{ background: #fff;
color: #fff; overflow: hidden;
font-size: 40px; }
text-align: center;
padding: 10px; .heading {
} color: dimgrey;
font-size: 40px;
.container{ padding: 10px;
display: grid; }
grid-template-columns: 2fr 1fr;
gap: 15px; .container {
align-items: flex-start; display: -ms-grid;
padding: 5px 5%; display: grid;
} -ms-grid-columns: 2fr 1fr;
.container .main-video{ grid-template-columns: 2fr 1fr;
background: white; gap: 15px;
border-radius: 5px; -webkit-box-align: start;
padding: 10px; -ms-flex-align: start;
} align-items: flex-start;
.container .main-video video{ padding: 5px 5%;
width: 100%; }
border-radius: 5px;
.container .main-video {
} background: white;
.container .main-video video .title{ border-radius: 5px;
color: grey; padding: 10px;
font-size: 23px; }
padding-top: 15px;
padding-bottom: 15px; .container .main-video video {
} width: 100%;
border-radius: 5px;
.container .video-list{ }
background: white;
border-radius: 5px; .container .main-video video .title {
height: 520px; color: grey;
overflow-y: scroll; font-size: 23px;
padding-top: 15px;
padding-bottom: 15px;
} }
.container .video-list .vid video{
width: 100%; .container .video-list {
border-radius: 5px; background: white;
border-radius: 5px;
} height: 100vh;
overflow-y: scroll;
}
.container .main-video .title{
color: grey; .container .video-list .vid video {
font-size: 23px; width: 100%;
padding-top: 15px; border-radius: 5px;
padding-bottom: 15px; }
}
.container .main-video .title {
.container .video-list{ color: grey;
background: white; font-size: 23px;
border-radius: 5px; padding-top: 15px;
height: 520px; padding-bottom: 15px;
overflow-y: scroll; }
}
.container .video-list::-webkit-scrollbar {
.container .video-list::-webkit-scrollbar{ width: 7px;
width: 7px; }
}
.container .video-list::-webkit-scrollbar-track{ .container .video-list::-webkit-scrollbar-track {
background: white; background: white;
border-radius: 50px; border-radius: 50px;
}
}
.container .video-list::-webkit-scrollbar-thumb {
.container .video-list::-webkit-scrollbar-thumb{ background: #ccc;
background: grey; border-radius: 50px;
border-radius: 50px; }
} .container .video-list .vid video {
.container .video-list .vid video{ width: 100px;
width: 100px; border-radius: 5px;
border-radius: 5px; }
} .container .video-list .vid {
display: -webkit-box;
display: -ms-flexbox;
.container .video-list .vid{ display: flex;
display: flex; gap: 15px;
gap: 15px; background: white;
background: white; border-radius: 5px;
border-radius: 5px; margin: 10px;
margin: 10px; padding: 10px;
padding: 10px; border: 1px solid rgba(0, 0, 0, 0.1);
border: 1px solid rgba(0, 0, 0, .1); cursor: pointer;
cursor: pointer; -webkit-box-orient: vertical;
flex-direction: column; -webkit-box-direction: normal;
} -ms-flex-direction: column;
.container .video-list .vid:hover{ flex-direction: column;
background: white; }
}
.container .video-list .vid:hover {
.container .video-list .vid.active{ background: white;
background: #ccc; }
}
.container .video-list .vid.active.title{ .container .video-list .vid.active {
color: white; background: #ccc;
} }
.container .video-list .vid .title{ .container .video-list .vid.active.title {
color: grey; color: white;
font-size: 17px; }
}
.container .video-list .vid .title {
.container .video-list .vid video { color: grey;
width: 100%; font-size: 17px;
border-radius: 5px; }
}
.container .video-list .vid video {
@media(max-width:994px){ width: 100%;
.container{ border-radius: 5px;
}
grid-template-columns: 1.5fr 1fr;
@media (max-width: 994px) {
padding: 10px; .container {
} -ms-grid-columns: 1.5fr 1fr;
grid-template-columns: 1.5fr 1fr;
} padding: 10px;
@media(max-width:778px){ }
.container{ }
grid-template-columns: 1fr; @media (max-width: 767px) {
.container {
padding: 10px; -ms-grid-columns: 1fr;
} grid-template-columns: 1fr;
padding: 10px;
} }
.container .video-list {
background: white;
border-radius: 5px;
height: 100VH;
overflow-y: auto;
padding-bottom: 75vh;
}
}
/*# sourceMappingURL=style.css.map */
.vid img{
width: 100%;
}