-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayout.html
More file actions
118 lines (110 loc) · 3.38 KB
/
layout.html
File metadata and controls
118 lines (110 loc) · 3.38 KB
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
<!DOCTYPE html>
<html lang="en">
<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>layout</title>
<script src="https://kit.fontawesome.com/f43f0ce23f.js" crossorigin="anonymous"></script>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@200&display=swap" rel="stylesheet">
<style type="text/css">
html {
}
body {
margin: 0px;
font-family: 'Source Sans Pro';
}
.layoutWrap{
display: flex;
justify-content:space-between;
align-items : center;
background-color: #263343;
width: calc(100% - 40px);
/* height: 130px; */
padding: 20px;
}
.hamburgerBtn{
display: none
}
.logo{
/* margin-left: 20px; */
}
.contentsList {
display: flex;
list-style:none;
padding-left: 0px;
}
.contentsList>li{
color: #FFFFFF;
font-size: 18px;
cursor: pointer;
padding: 8px 12px;
}
.contentsList>li:hover{
background-color: #d49466;
border-radius: 4px;
}
.SNS{
font-size: 18px;
/* margin-right: 20px; */
}
.SNS>a{
color: #FFFFFF;
margin: 0px 5px;
}
@media screen and (max-width:760px){
.layoutWrap{
flex-direction: column;
/* min-height: 370px; */
text-align:center;
}
.contentsList {
flex-direction: column;
width: 100%;
display: none;
}
.hamburgerBtn{
display: block;
position: absolute;
right: 30px;
font-size: 40px;
color: #FFFFFF;
cursor: pointer;
}
.SNS{
display: none;
}
.contentsList.active,
.SNS.active{
display: flex;
}
}
</style>
</head>
<body>
<header class="layoutWrap">
<div class="logo"><a href="https://academy.dream-coding.com/"><img src="https://import.cdn.thinkific.com/292401/PuGMXOphTKWoVdN3FOd6_D__6___1__png" alt=""></a></div>
<ul class="contentsList">
<li>Home</li>
<li>Gallery</li>
<li>Weddings</li>
<li>FAQ</li>
<li>Bookings</li>
</ul>
<div class="SNS"><a href="https://twitter.com/?lang=ko"><i class="fab fa-twitter"></i></a> <a href="https://www.facebook.com/"><i class="fab fa-facebook-f"></i></a> </div>
<div class="hamburgerBtn"><i class="fas fa-bars"></i></div>
</header>
</body>
</html>
<script>
let hamburgerBtn = document.querySelector('.hamburgerBtn')
let contentsList = document.querySelector('.contentsList')
let SNS = document.querySelector('.SNS')
hamburgerBtn.addEventListener('click', ()=>{
contentsList.classList.toggle('active')
SNS.classList.toggle('active')
console.log(contentsList.classList)
console.log(SNS.classList)
});
</script>