-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpepsi_landing_page.html
199 lines (196 loc) · 6.29 KB
/
pepsi_landing_page.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pepsi Landing Page</title>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: sans-serif;
}
section{
position: relative;
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background:#0062be;
padding: 100px;
transition: 0.5s;
}
header{
position: absolute;
top: 0;
left:0;
width: 100%;
padding: 20px 100px;
display: flex;
justify-content: space-between;
align-items: center;
}
header .logo{
position: relative;
max-width: 80px;
}
header ul{
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
header ul li{
list-style: none;
}
header ul li a{
list-style: none;
font-weight: 400;
margin-left: 40px;
color: white;
text-decoration: none;
}
.content{
position: relative;
width: 100%;
display: flex;
justify-content: space-around;
align-items: center;
}
.content .textBox{
position: relative;
max-width: 600px;
}
.content .textBox h2{
color: white;
font-size: 4em;
line-height: 1.5em;
font-weight: 900;
text-transform: uppercase;
}
.content .textBox h2 span{
font-size: 2em;
}
.content .textBox p{
color: white;
}
.content .textBox a{
display: inline-block;
margin-top: 20px;
text-decoration: none;
background: white;
font-weight: 500;
padding: 10px 20px;
color: black;
border-radius: 40px;
text-transform: uppercase;
letter-spacing: 1px;
}
.content .imgBox{
width: 600px;
display: flex;
padding-right: 50px;
justify-content: flex-end;
align-items: center;
margin-top: 50px;
}
.content .imgBox img{
max-width: 600px;
transform: scale(0.9);
}
.thumb{
position: absolute;
left: 50%;
bottom: 5%;
transform: translate(-50%);
display: flex;
}
.thumb li{
margin: 0 20px;
list-style: none;
display: inline-block;
cursor: pointer;
transition: 0.5s;
}
.thumb li img:hover{
transform: translateY(-20px);
}
.thumb li img{
max-width: 40px;
}
.sci{
position: relative;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
left: 0;
transform: translateX(100%);
}
.sci li{
position: relative;
list-style: none;
padding: 10px;
}
.sci li img{
filter: invert(1);
transform: scale(0.9);
}
</style>
</head>
<body>
<section>
<header>
<a href="#"><img src="assets/Pepsi/logo.png" class="logo"></a>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Products</a></li>
<li><a href="#">Whats New</a></li>
<li><a href="#">News Letter</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</header>
<div class="content">
<div class="textBox">
<h2>That's What<br><span>I Like</span></h2>
<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Labore, nihil? Assumenda recusandae tenetur sed ratione dignissimos necessitatibus quasi commodi quam veritatis ipsum quisquam vel, ducimus tempore, ut eaque accusantium ullam.</p>
<a href="#">View All Products</a>
</div>
<div class="imgBox">
<img src="assets/Pepsi/pepsi001.png" class="pepsi">
</div>
</div>
<ul class="thumb">
<li><img src="assets/Pepsi/pepsi001.png"></li>
<li><img src="assets/Pepsi/pepsi002.png"></li>
<li><img src="assets/Pepsi/pepsi003.png"></li>
</ul>
<ul class="sci">
<li><a href="#"><img src="assets/Pepsi/facebook.png"></a></li>
<li><a href="#"><img src="assets/Pepsi/twitter.png"></a></li>
<li><a href="#"><img src="assets/Pepsi/instagram.png"></a></li>
</ul>
</section>
<script>
let pepsi_1 = document.getElementsByClassName("thumb")[0].childNodes[1]
let pepsi_2 = document.getElementsByClassName("thumb")[0].childNodes[3]
let pepsi_3 = document.getElementsByClassName("thumb")[0].childNodes[5]
let sec = document.getElementsByTagName("section")[0]
let content = document.getElementsByClassName("content")[0].children[1]
pepsi_1.addEventListener("click",function(){
sec.style.background = "#0062be"
content.innerHTML = '<img src="assets/Pepsi/pepsi001.png" class="pepsi">'
})
pepsi_2.addEventListener("click",function(){
sec.style.background = "red"
content.innerHTML = '<img src="assets/Pepsi/pepsi002.png" class="pepsi">'
})
pepsi_3.addEventListener("click",function(){
sec.style.background = "black"
content.innerHTML = '<img src="assets/Pepsi/pepsi003.png" class="pepsi">'
})
</script>
</body>
</html>