-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
59 lines (55 loc) · 2.36 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
<!DOCTYPE html>
<html lang="pt-br">
<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">
<title>Starbucks Landing Page</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<section>
<div class="circle"></div>
<header>
<a href="#"><img src="img/logo.png" class="logo"></a>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Menu</a></li>
<li><a href="#">What's New</a></li>
<li><a href="#">Contact</a></li>
</ul>
</header>
<div class="content">
<div class="textBox">
<h2>It's not just Coffee<br>It's <span id="span">Starbucks</span></h2>
<p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Itaque, earum ab. Dolor, repellat laborum officia, dolore sint hic officiis quasi placeat corporis fugiat, eveniet molestiae iste totam magni nobis nam!</p>
<a id="button" href="#">Learn More</a>
</div>
<div class="imgBox">
<img src="img/img1.png" class="starbucks">
</div>
</div>
<ul class="thumb">
<li><img src="img/thumb1.png" onclick="changeImageAndColor('img/img1.png', 'var(--primary)')"></li>
<li><img src="img/thumb2.png" onclick="changeImageAndColor('img/img2.png', 'var(--second)')"></li>
<li><img src="img/thumb3.png" onclick="changeImageAndColor('img/img3.png', 'var(--third)')"></li>
</ul>
<ul class="sci">
<li><a href="#"><img src="img/facebook.png"></a></li>
<li><a href="#"><img src="img/twitter.png"></a></li>
<li><a href="#"><img src="img/instagram.png"></a></li>
</ul>
</section>
<script type="text/javascript">
function changeImageAndColor(img, color){
const span = document.getElementById('span');
const button = document.getElementById('button');
const circle = document.querySelector('.circle');
document.querySelector('.starbucks').src = img;
span.style.color = color;
button.style.backgroundColor = color;
circle.style.background = color;
}
</script>
</body>
</html>