-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
88 lines (82 loc) · 3.15 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Suzuki Bike Website Landing Page</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<section class="main">
<header>
<a href="#"><img src="logo.png" class="logo"></a>
<div class="toggle"></div>
<ul class="navigation">
<li><a href="#">Top Features</a></li>
<li><a href="#">Gallery</a></li>
<li><a href="#">Store</a></li>
<li><a href="#">Contact</a></li>
</ul>
</header>
<div class="content">
<h2>Ready To <span>Race</span></h2>
<a href="#" class="btn">Ride Now</a>
<img src="bike.png" class="bike">
</div>
<!-- Slider Content -->
<div class="slider">
<div class="slides active">
<h2><span>Engine</span><br>599 cc</h2>
<h2><span>Max Speed</span><br>260 Kmph</h2>
</div>
<div class="slides">
<h2><span>Mileage</span><br>14 Kmpl</h2>
<h2><span>0-100 Kmph</span><br>4 Seconds</h2>
</div>
<div class="slides">
<h2><span>Wheels</span><br>17-Inch Alloy</h2>
<h2><span>Tyre Type</span><br>Tubeless</h2>
</div>
</div>
<div class="footer">
<ul class="sci">
<li><a href="#"><ion-icon name="logo-github"></ion-icon></a></li>
<li><a href="#"><ion-icon name="logo-instagram"></ion-icon></a></li>
<li><a href="#"><ion-icon name="logo-twitter"></ion-icon></a></li>
</ul>
<div class="dots">
<span class="dot active"></span>
<span class="dot"></span>
<span class="dot"></span>
</div>
</div>
</section>
<script type="module" src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.js"></script>
<script>
// Navigation }
const toggle = document.querySelector('.toggle');
const navigation = document.querySelector('.navigation');
toggle.onclick = function(){
toggle.classList.toggle('active');
navigation.classList.toggle('active');
}
// Slider
const slides = document.querySelectorAll('.slides');
const dots = document.querySelectorAll('.dot');
function setActive(i){
for (slide of slides)
slide.classList.remove('active');
slides[i].classList.add('active');
for (dot of dots)
dot.classList.remove('active');
dots[i].classList.add('active');
}
for (let j=0; j<dots.length; j++){
dots[j].addEventListener('click', function(){
setActive(j)
})
}
</script>
</body>
</html>