Bitcoin_educational_videos/index.html

93 lines
4.3 KiB
HTML
Raw Permalink Normal View History

2022-02-01 14:08:53 +01:00
<!DOCTYPE html>
<html lang="en">
2022-02-07 10:53:25 +01:00
<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">
2022-02-01 14:08:53 +01:00
<link rel="stylesheet" href="./style.css">
<title>Educational Bitcoin videos</title>
</head>
2021-12-24 03:34:45 +01:00
<body>
2022-02-07 10:53:25 +01:00
2022-02-01 14:08:53 +01:00
<div class="container">
<!-- Main video container start -->
<div class="main-video">
2022-02-07 10:53:25 +01:00
<h1 class="heading"> Bitcoin educational videos </h1>
2022-02-01 14:08:53 +01:00
<div class="video">
2022-02-07 10:53:25 +01:00
<video controls preload="none" poster="00-intro.png">
2022-02-01 14:08:53 +01:00
<source src="00-intro.mp4" type="video/mp4">
<track default src="00-intro.vtt" kind="captions" srclang="en" label="English">
</video>
<h3 class="title">01. Intro</h3>
</div>
</div>
<!-- Main video container end -->
2021-12-24 03:34:45 +01:00
2022-02-01 14:08:53 +01:00
<!-- Sidebar scroller start -->
<div class="video-list">
<div class="vid active">
<!-- <video controls muted preload="none" poster="00-intro.png">
2022-02-01 14:08:53 +01:00
<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">
2022-02-01 14:08:53 +01:00
<h3 class="title">01. Intro</h3>
</div>
2022-02-07 10:53:25 +01:00
<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">
2022-02-01 14:08:53 +01:00
<source src="01-analogies.mp4" type="video/mp4">
<track default src="01-analogies.vtt" kind="captions" srclang="en" label="English">
</video> -->
2022-02-01 14:08:53 +01:00
<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">
2022-02-01 14:08:53 +01:00
<source src="02-principles.mp4" type="video/mp4">
<track default src="02-principles.vtt" kind="captions" srclang="en" label="English">
</video> -->
2022-02-01 14:08:53 +01:00
<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">
2022-02-01 14:08:53 +01:00
<source src="03-faq.mp4" type="video/mp4">
<track default src="03-faq.vtt" kind="captions" srclang="en" label="English">
</video> -->
2022-02-01 14:08:53 +01:00
<h3 class="title">04. FAQ</h3>
</div>
</div>
<!-- Sidebar scroller start -->
</div>
2021-12-24 03:34:45 +01:00
2022-02-03 14:40:36 +01:00
<script>
let listVideo= document.querySelectorAll('.video-list .vid');
let mainVideo= document.querySelector('.main-video video')
let title = document.querySelector('.main-video .title')
listVideo.forEach(video =>{
2022-02-07 10:53:25 +01:00
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;
2022-02-07 10:53:25 +01:00
if(video.classList.contains('active')){
mainVideo.src = src;
mainVideo.children[0].attributes['src'].nodeValue = src;
// mainVideo.children[1].attributes['src'].nodeValue = vtt;
2022-02-07 10:53:25 +01:00
mainVideo.poster = poster;
let text = video.children[1].innerHTML;
title.innerHTML = text;
};
2022-02-03 14:40:36 +01:00
};
2022-02-07 10:53:25 +01:00
}
2022-02-03 14:40:36 +01:00
});
</script>
2021-12-24 03:34:45 +01:00
</body>
2022-02-07 10:53:25 +01:00
</html>