-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.html
175 lines (173 loc) · 5.75 KB
/
main.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=East+Sea+Dokdo&family=Hahmlet:[email protected]&family=Nanum+Gothic&display=swap" rel="stylesheet">
<title>Main</title>
<style>
* {
font-family: "Hahmlet", serif;
}
#img {
position: fixed;
width: 100%;
height: 100%;
background-image: url("전주한옥마을-네이버지식백과.jpg");
opacity: 40%;
filter:blur(4px);
background-size: cover;
z-index: -1;
top: 0;
left: 0;
}
#logo {
position: absolute;
top: 27%;
left: 50%;
transform: translate(-50%,-40%);
width: 270px;
}
.menu {
position: absolute;
bottom: 11%;
left: 50%;
transform: translate(-50%, 0%);
width: 400px;
height: 300px;
}
.menu a {
text-decoration: none;
color: black;
font-weight:550;
font-size: 1.5em;
background-color: white;
padding: 20px 40px;
position: relative;
top: 60px;
left: 20px;
border-radius: 25% 0 25% 0;
}
.menu a:hover {
background-color: rgb(248,66,100);
color: white;
}
#menu1, #menu3 {
margin-right: 30px;
}
#menu2, #menu4 {
margin-left: 30px;
}
#menu4 {
padding: 20px 28px;
}
footer {
position: fixed;
left: 0;
bottom: 0;
background-color: gray;
width: 100%;
height: 70px;
color: white;
text-align: center;
font-size: smaller;
padding-top: 10px;
line-height: 20px;
opacity: 80%;
}
footer span:hover {
text-decoration: underline;
}
#popup {
display: none;
position: fixed;
background-color: rgb(238,238,238);
z-index: 1;
padding: 5px;
width: 400px;
height: 450px;
top: 5%;
left: 5%;
}
#popup .button {
margin-left: 225px;
margin-top: 5px;
}
.button #popupclose {
background-color: rgb(45, 45, 45);
color: white;
}
#popup img {
width: 390px;
height: auto;
margin-left: 5px;
margin-top: 5px;
}
</style>
</head>
<body>
<div id="img"></div>
<div id="reference" style="font-size: x-small;">이미지 출처 - 네이버백과사전</div>
<img src="01. 한바탕전주 세계를 비빈다_03.png" alt="전주로고" id="logo">
<div class="menu">
<a href="hanok.html" id="menu1">놀거리</a>
<a href="food_type.html" id="menu2">먹거리</a><br><br><br><br><br>
<a href="main.html" id="menu3">교통편</a>
<a href="review.html" id="menu4">커뮤니티</a>
</div>
<footer>
<span id="contact_us">CONTACT US</span>
<span id="reference_file">참고 및 출처</span><br>
04310 서울특별시 용산구 청파로 47길 100 숙명여자대학교 100<br>Ⓒdlruddms
</footer>
<div id="popup">
<img src="팝업광고.png" alt="팝업광고 사진">
<div class="button">
<button id="popupclose">닫기</button>
<button id="dontshow">오늘 하루 보지 않기</button>
</div>
</div>
<script>
let contact = document.getElementById("contact_us");
contact.addEventListener("click",function(){
window.open("contact_us.html", "popup", "width=630 height=450");
})
let rf = document.getElementById("reference_file");
rf.addEventListener("click", function(){
window.open("reference.html","popup","width=630 height=450");
})
function getCookie(name) {
let pairs = document.cookie.split(";"); // 쿠키문자열을 ;을 경계로 분할
for(let i=0; i<pairs.length; i++) {
let pair = pairs[i].trim(); // 쿠키 앞뒤의 빈칸 제거
let unit = pair.split("=");
if(unit[0] == name) {
return unescape(unit[1]);
}
}
return null;
}
function setCookie (name, value, expireDate) {
let cookieStr = name + "=" + escape(value) +
((expireDate == null)?"":("; expires=" + expireDate.toUTCString()));
document.cookie = cookieStr;
}
document.addEventListener("DOMContentLoaded", function() {
if(getCookie("popup") !== "false") {
document.getElementById("popup").style.display = "block";
}
})
document.getElementById("popupclose").addEventListener("click", function(){ //팝업닫기
document.getElementById("popup").style.display = "none"
})
document.getElementById("dontshow").addEventListener("click", function(){ //오늘하루보지않기
let expire = new Date();
expire.setTime(expire.getTime() + (24*60*60*1000));
setCookie("popup", "false", expire);
document.getElementById("popup").style.display = "none";
})
</script>
</body>
</html>