Compare commits
No commits in common. "79282eb4cee93e5ed533ced456df3a420769fd6b" and "c0ce5bca9677cb36ee608567db2cf3b71fa8ffdc" have entirely different histories.
79282eb4ce
...
c0ce5bca96
BIN
00-intro.png
BIN
00-intro.png
Binary file not shown.
Before Width: | Height: | Size: 141 KiB |
BIN
01-analogies.png
BIN
01-analogies.png
Binary file not shown.
Before Width: | Height: | Size: 21 KiB |
Binary file not shown.
Before Width: | Height: | Size: 26 KiB |
BIN
03-faq.png
BIN
03-faq.png
Binary file not shown.
Before Width: | Height: | Size: 28 KiB |
71
index.html
71
index.html
|
@ -1,21 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="./style.css">
|
||||
<title>Educational Bitcoin videos</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
<h1 class="heading"> Bitcoin educational videos </h1>
|
||||
</div>
|
||||
<div class="container">
|
||||
<!-- Main video container start -->
|
||||
<div class="main-video">
|
||||
<h1 class="heading"> Bitcoin educational videos </h1>
|
||||
|
||||
<div class="video">
|
||||
<video controls preload="none" poster="00-intro.png">
|
||||
<video controls autoplay>
|
||||
<source src="00-intro.mp4" type="video/mp4">
|
||||
<track default src="00-intro.vtt" kind="captions" srclang="en" label="English">
|
||||
</video>
|
||||
|
@ -28,36 +28,31 @@
|
|||
<!-- Sidebar scroller start -->
|
||||
<div class="video-list">
|
||||
<div class="vid active">
|
||||
<!-- <video controls muted preload="none" poster="00-intro.png">
|
||||
<video controls muted autoplay>
|
||||
<source src="00-intro.mp4" type="video/mp4">
|
||||
<track default src="00-intro.vtt" kind="captions" srclang="en" label="English">
|
||||
</video> -->
|
||||
<img src="00-intro.png" alt="00-intro" data-video="00-intro.mp4" data-vtt="00-intro.vtt">
|
||||
|
||||
</video>
|
||||
<h3 class="title">01. Intro</h3>
|
||||
</div>
|
||||
<div class="vid">
|
||||
<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">
|
||||
<div class="vid ">
|
||||
<video controls muted autoplay>
|
||||
<source src="01-analogies.mp4" type="video/mp4">
|
||||
<track default src="01-analogies.vtt" kind="captions" srclang="en" label="English">
|
||||
</video> -->
|
||||
</video>
|
||||
<h3 class="title">02. Analogies</h3>
|
||||
</div>
|
||||
<div class="vid">
|
||||
<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">
|
||||
<video controls muted autoplay>
|
||||
<source src="02-principles.mp4" type="video/mp4">
|
||||
<track default src="02-principles.vtt" kind="captions" srclang="en" label="English">
|
||||
</video> -->
|
||||
</video>
|
||||
<h3 class="title">03. Principles</h3>
|
||||
</div>
|
||||
<div class="vid">
|
||||
<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">
|
||||
<video controls muted autoplay>
|
||||
<source src="03-faq.mp4" type="video/mp4">
|
||||
<track default src="03-faq.vtt" kind="captions" srclang="en" label="English">
|
||||
</video> -->
|
||||
</video>
|
||||
<h3 class="title">04. FAQ</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -69,24 +64,22 @@
|
|||
let mainVideo= document.querySelector('.main-video video')
|
||||
let title = document.querySelector('.main-video .title')
|
||||
listVideo.forEach(video =>{
|
||||
if(video){
|
||||
video.onclick = () =>{
|
||||
listVideo.forEach(vid => vid.classList.remove('active'));
|
||||
video.classList.add('active');
|
||||
let src = document.getElementsByClassName('active').item('img').children[0].attributes['data-video'].nodeValue;
|
||||
// let vtt = document.getElementsByClassName('active').item('img').children[0].attributes['data-vtt'].nodeValue;
|
||||
let poster = document.getElementsByClassName('active').item('img').children[0].src;
|
||||
if(video.classList.contains('active')){
|
||||
mainVideo.src = src;
|
||||
mainVideo.children[0].attributes['src'].nodeValue = src;
|
||||
// mainVideo.children[1].attributes['src'].nodeValue = vtt;
|
||||
mainVideo.poster = poster;
|
||||
let text = video.children[1].innerHTML;
|
||||
title.innerHTML = text;
|
||||
};
|
||||
video.onclick = () =>{
|
||||
listVideo.forEach(vid => vid.classList.remove('active'));
|
||||
video.classList.add('active');
|
||||
console.log("video",video)
|
||||
let src = document.getElementsByClassName('active').item('video').children[0].currentSrc;
|
||||
// let src = $('.active').children[0].currentSrc;
|
||||
if(video.classList.contains('active')){
|
||||
// let src = video
|
||||
console.log("here is the src",src)
|
||||
mainVideo.src = src;
|
||||
let text = video.children[1].innerHTML;
|
||||
title.innerHTML = text;
|
||||
};
|
||||
}
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
|
@ -9,12 +9,12 @@
|
|||
|
||||
body {
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.heading {
|
||||
color: dimgrey;
|
||||
font-size: 40px;
|
||||
/*text-align: center;*/
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ body {
|
|||
.container .video-list {
|
||||
background: white;
|
||||
border-radius: 5px;
|
||||
height: 100vh;
|
||||
height: 520px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user