-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
294 lines (269 loc) · 15.1 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
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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>The Band</title>
<link rel="stylesheet" href="./assets/css/style.css">
<link rel="stylesheet" href="./assets/css/rps.css">
<link rel="stylesheet" href="./assets/fonts/themify-icons/themify-icons.css">
<link rel="shortcut icon" href="./assets/img/thebandicon.jpg">
</head>
<body>
<div id="main">
<div id="header">
<!--Start---Nav-->
<ul id="nav">
<li><a href="#">Home</a></li>
<li><a href="#band">Band</a></li>
<li><a href="#tour">Tour</a></li>
<li><a href="#contact">Contact</a></li>
<li>
<a href="#">MORE <i class="ti-angle-down"></i></a>
<ul class="subnav">
<li><a href="#">Merchandise</a></li>
<li><a href="#">Extras</a></li>
<li><a href="#">Media</a></li>
</ul>
</li>
<li><a href="/login.html">Signin</a></li>
<li><a href="/Register.html">Signup</a></li>
</ul>
<!--End---Nav-->
<!--Start---Search-->
<div class="search-button">
<i class="search-icon ti-search"></i>
<!--End---Search-->
</div>
<div id="mobile-menu" class="mobile-menu">
<i class="icon-menu ti-menu"></i>
</div>
</div>
<div id="slider">
<div class="text-content">
<h2 class="text-heading">Los Angeles</h2>
<div class="text-discription">We had the best time playing at Venice Beach!</div>
</div>
</div>
<div id="content">
<!--The Band-->
<div id="band" class="content-section">
<h2 class="section-heading">THE BAND</h2>
<p class="section-sub-heading">We love music</p>
<p class="about-content">We have created a fictional band website. Lorem ipsum dolor sit amet,
consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
mollit anim id est laborum consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat.</p>
<!--Member-->
<div class="member-list">
<div class="member-item">
<p class="member-name">Name</p>
<img src="./assets/img/band/member1.jpg" alt="Name" class="member-img">
</div>
<div class="member-item">
<p class="member-name">Name</p>
<img src="./assets/img/band/member1.jpg" alt="Name" class="member-img">
</div>
<div class="member-item">
<p class="member-name">Name</p>
<img src="./assets/img/band/member1.jpg" alt="Name" class="member-img">
</div>
<div id="clear"></div>
</div>
</div>
<!--Tour-->
<div id="tour" class="tour-section">
<div class="content-section">
<h2 class="section-heading text-while">TOUR DATES</h2>
<p class="section-sub-heading text-while">Remember to book your tickets!</p>
<ul class="ticket-list">
<li>September <span class="sold-out">Sold out</span></li>
<li>October <span class="sold-out">Sold out</span></li>
<li>November <span class="quantity">3</span></li>
</ul>
<!-- Place -->
<div class="place-list">
<div class="place-item">
<img src="/assets/img/tickets/tickets1.jpg" alt="New York" class="place-img">
<div class="place-body">
<h3 class="place-heading">New York</h3>
<p class="place-time">Fri 27 Nov 2016</p>
<p class="place-discription">Praesent tincidunt sed tellus ut rutrum sed vitae justo.</p>
<button class="btn js-buy-ticket">Buy Tickets</button>
</div>
</div>
<div class="place-item">
<img src="/assets/img/tickets/tickets2.jpg" alt="Paris" class="place-img">
<div class="place-body">
<h3 class="place-heading">Paris</h3>
<p class="place-time">Sat 28 Nov 2016</p>
<p class="place-discription">Praesent tincidunt sed tellus ut rutrum sed vitae justo.</p>
<button class="btn js-buy-ticket">Buy Tickets</button>
</div>
</div>
<div class="place-item">
<img src="/assets/img/tickets/tickets3.jpg" alt="San Francisco" class="place-img">
<div class="place-body">
<h3 class="place-heading">San Francisco</h3>
<p class="place-time">Sun 29 Nov 2016</p>
<p class="place-discription">Praesent tincidunt sed tellus ut rutrum sed vitae justo.</p>
<button class="btn js-buy-ticket">Buy Tickets</button>
</div>
</div>
</div>
</div>
<div id="clear"></div>
</div>
<!-- Begin: Contact-Section -->
<div id="contact" class="contact-section">
<div class="content-section">
<h2 class="section-heading">CONTACT</h2>
<p class="section-sub-heading">Fan? Drop a note!</p>
<div class="full-contact">
<div class="info-contact">
<div class="info-web-contact">
<p><i class="ti-location-pin"> Chicago, US</i></p>
<p><i class="ti-mobile"><a href="tel:+00 151515"> Phone: +00 151515</a></i></p>
<p><i class="ti-email"><a href="mailto:mail@mail.com"> Email: mail@mail.com</a></i></p>
</div>
</div>
<div class="form-contact">
<form action="">
<div class="contact-nameandemail-form">
<div class="form-name">
<input type="text" name="" placeholder="Name" required id="" class="form-control-name">
</div>
<div class="form-email">
<input type="email" name="" placeholder="Email" required id="" class="form-control-email">
</div>
</div>
<div class="contact-message-form">
<div class="message-form">
<input type="text" name="" placeholder=" Message" id="" required class="form-control-message">
</div>
</div>
<input class="send-summit" type="submit" value="SEND">
</form>
</div>
<div id="clear"></div>
</div>
</div>
</div>
<div class="map-section">
<img src="./assets/img/map.jpg" alt="Map">
</div>
<div id="footer">
<div class="socials-list">
<a href=""><i class="ti-facebook"></i></a>
<a href=""><i class="ti-instagram"></i></a>
<a href=""><i class="ti-youtube"></i></a>
<a href=""><i class="ti-pinterest"></i></a>
<a href=""><i class="ti-twitter"></i></a>
<a href=""><i class="ti-linkedin"></i></a>
</div>
<p class="copyright">Design by <a href="www.facebook.com/TaiTitans">TaiTitans</a></p>
</div>
</div>
</div>
<!-- End: Contact-Section -->
<!-- Ticket Box -->
<div class="modal js-modal">
<div class="modal-container js-modal-container">
<div class="modal-close js-modal-close">
<i class="ti-close"></i>
</div>
<header class="modal-header">
<i class="modal-heading-icon ti-bag"></i>
Tickets
</header>
<div class="modal-body">
<label for="ticket-quantity" class="modal-label">
<i class="ti-shopping-cart"></i>
Tickets, $15 person
</label>
<input id="ticket-quantity" type="text" class="modal-input" placeholder="How many?">
<label for="ticket-email" class="modal-label">
<i class="ti-user"></i>
Send to
</label>
<input id="ticket-email" type="email" class="modal-input" placeholder="Enter email...">
<button id="buy-tickets">
Pay <i class="ti-check"></i>
</button>
<footer class="modal-footer">
<p class="modal-help">Need <a href="">help?</a></p>
</footer>
</div>
</div>
</div>
<!-- Đóng mở menu-->
<script>
const buyBtns = document.querySelectorAll('.js-buy-ticket')
const modal = document.querySelector('.js-modal')
const modalContainer = document.querySelector('.js-modal-container')
const modalClose = document.querySelector('.js-modal-close')
//Hàm hiển thị modal mua vé (thêm classs open vào modal)
function showBuyTickets() {
modal.classList.add('open')
}
//Hàm ẩn modal mua vé ( gỡ bỏ class open của modal)
function hideBuyTickets() {
modal.classList.remove('open')
}
// Lập qua từng thẻ button và nghe hành vi click
for (const buyBtn of buyBtns){
buyBtn.addEventListener('click', showBuyTickets)
}
// Nghe hành vi click vào button close
modalClose.addEventListener('click', hideBuyTickets)
modal.addEventListener('click', hideBuyTickets)
modalContainer.addEventListener('click', function(event){
event.stopPropagation()
})
</script>
<!-- Menu Mobile -->
<script>
var header = document.getElementById('header');
var mobileMenu = document.getElementById('mobile-menu');
var headerHeight = header.clientHeight;
// Đóng/ Mở mobile menu
mobileMenu.onclick = function() {
var isClosed =header.clientHeight === headerHeight;
if (isClosed) {
header.style.height ='auto';
} else {
header.style.height = null;
}
}
// Khai báo biến header/ mobile/ headerHeight
// Đóng/ Mở mobile menu
// Khi click vào mobileMenu thì sẽ chạy hàm như sau:
// Khai báo biến isclosed = header.clientHeight bằng với headerHeight (biến True False);
// Nếu biến isClosed đúng thì header.style.height ='auto' --> sổ ra
// Nếu biến isClosed sai thì header.style.height = null --> đóng vào
// Tự động đóng khi chọn menu\
var menuItems =document.querySelectorAll('#nav li a[href*="#"]');
for (i=0; i<menuItems.length;i++) {
var menuItem = menuItems[i];
menuItem.onclick =function(event) {
var isParentMenu = this.nextElementSibling && this.nextElementSibling.classList.contains('subnav');
if(isParentMenu){
event.preventDefault();
} else {
header.style.height =null;
}
}
}
//Khai báo biến menuItems là các thẻ nav li a có chứa dấu #
// Chạy vòng lặp for (khai báo biến i=0; nếu i nhỏ hơn số lượng MenuItems; tăng i lên 1) Nếu i thỏa mãn chạy:
// Khai báo biến tạm menuItem = truyền giá trị của menuItems vị trí i vào;
// Khi click vào menuItem chạy hàm
//header.style.height =null; --> giấu thanh đi
</script>
</body>
</html>