-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
144 lines (130 loc) · 5.39 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ISTE</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="navbar">
<div class="logowrapper">
<div class="logo">
<img src="logo.png" alt="logo" width="40px">
</div>
<div class="text">
This is a text
</div>
</div>
<nav>
<ul>
<li class="navlink"> <a href="#"> Home </a> </li>
<li class="navlink"> <a href="#"> About Us </a> </li>
<li class="navlink">
<div class="dropdown">
<div class="dropbtn">
<a href="#"> Products </a>
</div>
<div class="dropcontent">
<div class="div2">
<a href="#">Product 1</a>
<a href="#">Product 2</a>
<a href="#">Product 3</a>
</div>
</div>
</li>
<li class="navlink"> <a href="#"> Log In </a> </li>
</ul>
</nav>
</div>
<div class="slider">
<div class="carousel">
<div class="item item--visible">
<img src="https://images.unsplash.com/photo-1525382455947-f319bc05fb35?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1414&q=80"" />
</div>
<div class="item">
<img src="https://images.unsplash.com/photo-1503301360699-4f60cf292ec8?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1400&q=80"" />
</div>
<div class="item">
<img src="https://images.unsplash.com/photo-1553558888-6440b4097908?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1400&q=80" />
</div>
<div class="actions">
<button id="button--prev" aria-label="Previous slide"><</button>
<button id="button--next" aria-label="Next slide">></button>
</div>
</div>
</div>
<div class="section">
<div class="imgsecwrapper">
<div class="imgsec">
<img src="https://images.unsplash.com/photo-1525382455947-f319bc05fb35?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1414&q=80">
<img src="https://images.unsplash.com/photo-1503301360699-4f60cf292ec8?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1400&q=80">
<img src="https://images.unsplash.com/photo-1553558888-6440b4097908?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1400&q=80">
<img src="https://images.unsplash.com/photo-1495620908389-1218c605faec?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1400&q=80">
</div>
</div>
<div class="div1">
<div class="content">
<h1>Panda</h1>
<p> Lorem, ipsum dolor sit amet consectetur adipisicing elit. Odit enim pariatur quo? Saepe, soluta at dolor animi voluptatem optio ratione quod. Eum itaque officia possimus nemo, quisquam perferendis alias. Nostrum?</p>
</div>
<div class="img">
<img src="https://images.unsplash.com/photo-1525382455947-f319bc05fb35?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1414&q=80">
</div>
</div>
</div>
<hr>
<div class="footer">
<div class="icons">
<a href="https://www.facebook.com"> <img src="https://www.flaticon.com/svg/vstatic/svg/174/174848.svg?token=exp=1612005502~hmac=3d165bf3229cf32f7e845fdb8e0ca3a8"> </a>
<a href="https://www.instagram.com"> <img src="https://www.flaticon.com/svg/vstatic/svg/2111/2111463.svg?token=exp=1612005502~hmac=1151027e265242218b5d15385ed3fbdc"> </a>
<a href="https://twitter.com"> <img src="https://www.flaticon.com/svg/vstatic/svg/733/733579.svg?token=exp=1612005502~hmac=6b62b62bc620719291a6bcf4327434cd"> </a>
<a href="https://linkedin.com"> <img src="https://www.flaticon.com/svg/vstatic/svg/174/174857.svg?token=exp=1612005502~hmac=1a106c533c1534a4873d747b33d2b657"> </a>
</div>
<div class="footerlogo">
<img src="logo.png" width="60px">
</div>
<div class="text">
This is a random text.
</div>
</div>
<script>
let slidePosition = 0;
const slides = document.getElementsByClassName('item');
const totalSlides = slides.length;
document.
getElementById('button--next')
.addEventListener("click", function() {
moveToNextSlide();
});
document.
getElementById('button--prev')
.addEventListener("click", function() {
moveToPrevSlide();
});
function updateSlidePosition() {
for (let slide of slides) {
slide.classList.remove('item--visible');
slide.classList.add('item--hidden');
}
slides[slidePosition].classList.add('item--visible');
}
function moveToNextSlide() {
if (slidePosition === totalSlides - 1) {
slidePosition = 0;
} else {
slidePosition++;
}
updateSlidePosition();
}
function moveToPrevSlide() {
if (slidePosition === 0) {
slidePosition = totalSlides - 1;
} else {
slidePosition--;
}
updateSlidePosition();
}
</script>
</body>
</html>