최정민

FEAT : 부트스트랩을 통한 디자인 로직 추가

-
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
1 +/*!
2 + * Bootstrap Reboot v5.0.0-alpha1 (https://getbootstrap.com/)
3 + * Copyright 2011-2020 The Bootstrap Authors
4 + * Copyright 2011-2020 Twitter, Inc.
5 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6 + * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
7 + */
8 +*,
9 +*::before,
10 +*::after {
11 + box-sizing: border-box;
12 +}
13 +
14 +body {
15 + margin: 0;
16 + font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
17 + font-size: 1rem;
18 + font-weight: 400;
19 + line-height: 1.5;
20 + color: #212529;
21 + background-color: #fff;
22 + -webkit-text-size-adjust: 100%;
23 + -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
24 +}
25 +
26 +[tabindex="-1"]:focus:not(:focus-visible) {
27 + outline: 0 !important;
28 +}
29 +
30 +hr {
31 + margin: 1rem 0;
32 + color: inherit;
33 + background-color: currentColor;
34 + border: 0;
35 + opacity: 0.25;
36 +}
37 +
38 +hr:not([size]) {
39 + height: 1px;
40 +}
41 +
42 +h1, h2, h3, h4, h5, h6 {
43 + margin-top: 0;
44 + margin-bottom: 0.5rem;
45 + font-weight: 500;
46 + line-height: 1.2;
47 +}
48 +
49 +h1 {
50 + font-size: calc(1.375rem + 1.5vw);
51 +}
52 +
53 +@media (min-width: 1200px) {
54 + h1 {
55 + font-size: 2.5rem;
56 + }
57 +}
58 +
59 +h2 {
60 + font-size: calc(1.325rem + 0.9vw);
61 +}
62 +
63 +@media (min-width: 1200px) {
64 + h2 {
65 + font-size: 2rem;
66 + }
67 +}
68 +
69 +h3 {
70 + font-size: calc(1.3rem + 0.6vw);
71 +}
72 +
73 +@media (min-width: 1200px) {
74 + h3 {
75 + font-size: 1.75rem;
76 + }
77 +}
78 +
79 +h4 {
80 + font-size: calc(1.275rem + 0.3vw);
81 +}
82 +
83 +@media (min-width: 1200px) {
84 + h4 {
85 + font-size: 1.5rem;
86 + }
87 +}
88 +
89 +h5 {
90 + font-size: 1.25rem;
91 +}
92 +
93 +h6 {
94 + font-size: 1rem;
95 +}
96 +
97 +p {
98 + margin-top: 0;
99 + margin-bottom: 1rem;
100 +}
101 +
102 +abbr[title],
103 +abbr[data-original-title] {
104 + text-decoration: underline;
105 + -webkit-text-decoration: underline dotted;
106 + text-decoration: underline dotted;
107 + cursor: help;
108 + -webkit-text-decoration-skip-ink: none;
109 + text-decoration-skip-ink: none;
110 +}
111 +
112 +address {
113 + margin-bottom: 1rem;
114 + font-style: normal;
115 + line-height: inherit;
116 +}
117 +
118 +ol,
119 +ul {
120 + padding-left: 2rem;
121 +}
122 +
123 +ol,
124 +ul,
125 +dl {
126 + margin-top: 0;
127 + margin-bottom: 1rem;
128 +}
129 +
130 +ol ol,
131 +ul ul,
132 +ol ul,
133 +ul ol {
134 + margin-bottom: 0;
135 +}
136 +
137 +dt {
138 + font-weight: 700;
139 +}
140 +
141 +dd {
142 + margin-bottom: .5rem;
143 + margin-left: 0;
144 +}
145 +
146 +blockquote {
147 + margin: 0 0 1rem;
148 +}
149 +
150 +b,
151 +strong {
152 + font-weight: bolder;
153 +}
154 +
155 +small {
156 + font-size: 0.875em;
157 +}
158 +
159 +mark {
160 + padding: 0.2em;
161 + background-color: #fcf8e3;
162 +}
163 +
164 +sub,
165 +sup {
166 + position: relative;
167 + font-size: 0.75em;
168 + line-height: 0;
169 + vertical-align: baseline;
170 +}
171 +
172 +sub {
173 + bottom: -.25em;
174 +}
175 +
176 +sup {
177 + top: -.5em;
178 +}
179 +
180 +a {
181 + color: #0d6efd;
182 + text-decoration: underline;
183 +}
184 +
185 +a:hover {
186 + color: #024dbc;
187 +}
188 +
189 +a:not([href]):not([class]), a:not([href]):not([class]):hover {
190 + color: inherit;
191 + text-decoration: none;
192 +}
193 +
194 +pre,
195 +code,
196 +kbd,
197 +samp {
198 + font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
199 + font-size: 1em;
200 +}
201 +
202 +pre {
203 + display: block;
204 + margin-top: 0;
205 + margin-bottom: 1rem;
206 + overflow: auto;
207 + font-size: 0.875em;
208 + -ms-overflow-style: scrollbar;
209 +}
210 +
211 +pre code {
212 + font-size: inherit;
213 + color: inherit;
214 + word-break: normal;
215 +}
216 +
217 +code {
218 + font-size: 0.875em;
219 + color: #d63384;
220 + word-wrap: break-word;
221 +}
222 +
223 +a > code {
224 + color: inherit;
225 +}
226 +
227 +kbd {
228 + padding: 0.2rem 0.4rem;
229 + font-size: 0.875em;
230 + color: #fff;
231 + background-color: #212529;
232 + border-radius: 0.2rem;
233 +}
234 +
235 +kbd kbd {
236 + padding: 0;
237 + font-size: 1em;
238 + font-weight: 700;
239 +}
240 +
241 +figure {
242 + margin: 0 0 1rem;
243 +}
244 +
245 +img,
246 +svg {
247 + vertical-align: middle;
248 +}
249 +
250 +table {
251 + caption-side: bottom;
252 + border-collapse: collapse;
253 +}
254 +
255 +caption {
256 + padding-top: 0.5rem;
257 + padding-bottom: 0.5rem;
258 + color: #6c757d;
259 + text-align: left;
260 +}
261 +
262 +th {
263 + text-align: inherit;
264 + text-align: -webkit-match-parent;
265 +}
266 +
267 +thead,
268 +tbody,
269 +tfoot,
270 +tr,
271 +td,
272 +th {
273 + border-color: inherit;
274 + border-style: solid;
275 + border-width: 0;
276 +}
277 +
278 +label {
279 + display: inline-block;
280 +}
281 +
282 +button {
283 + border-radius: 0;
284 +}
285 +
286 +button:focus {
287 + outline: 1px dotted;
288 + outline: 5px auto -webkit-focus-ring-color;
289 +}
290 +
291 +input,
292 +button,
293 +select,
294 +optgroup,
295 +textarea {
296 + margin: 0;
297 + font-family: inherit;
298 + font-size: inherit;
299 + line-height: inherit;
300 +}
301 +
302 +button,
303 +input {
304 + overflow: visible;
305 +}
306 +
307 +button,
308 +select {
309 + text-transform: none;
310 +}
311 +
312 +[role="button"] {
313 + cursor: pointer;
314 +}
315 +
316 +select {
317 + word-wrap: normal;
318 +}
319 +
320 +[list]::-webkit-calendar-picker-indicator {
321 + display: none;
322 +}
323 +
324 +button,
325 +[type="button"],
326 +[type="reset"],
327 +[type="submit"] {
328 + -webkit-appearance: button;
329 +}
330 +
331 +button:not(:disabled),
332 +[type="button"]:not(:disabled),
333 +[type="reset"]:not(:disabled),
334 +[type="submit"]:not(:disabled) {
335 + cursor: pointer;
336 +}
337 +
338 +::-moz-focus-inner {
339 + padding: 0;
340 + border-style: none;
341 +}
342 +
343 +textarea {
344 + resize: vertical;
345 +}
346 +
347 +fieldset {
348 + min-width: 0;
349 + padding: 0;
350 + margin: 0;
351 + border: 0;
352 +}
353 +
354 +legend {
355 + float: left;
356 + width: 100%;
357 + padding: 0;
358 + margin-bottom: 0.5rem;
359 + font-size: calc(1.275rem + 0.3vw);
360 + line-height: inherit;
361 + white-space: normal;
362 +}
363 +
364 +@media (min-width: 1200px) {
365 + legend {
366 + font-size: 1.5rem;
367 + }
368 +}
369 +
370 +legend + * {
371 + clear: left;
372 +}
373 +
374 +::-webkit-datetime-edit-fields-wrapper,
375 +::-webkit-datetime-edit-text,
376 +::-webkit-datetime-edit-minute,
377 +::-webkit-datetime-edit-hour-field,
378 +::-webkit-datetime-edit-day-field,
379 +::-webkit-datetime-edit-month-field,
380 +::-webkit-datetime-edit-year-field {
381 + padding: 0;
382 +}
383 +
384 +::-webkit-inner-spin-button {
385 + height: auto;
386 +}
387 +
388 +[type="search"] {
389 + outline-offset: -2px;
390 + -webkit-appearance: textfield;
391 +}
392 +
393 +::-webkit-search-decoration {
394 + -webkit-appearance: none;
395 +}
396 +
397 +::-webkit-color-swatch-wrapper {
398 + padding: 0;
399 +}
400 +
401 +::-webkit-file-upload-button {
402 + font: inherit;
403 + -webkit-appearance: button;
404 +}
405 +
406 +output {
407 + display: inline-block;
408 +}
409 +
410 +iframe {
411 + border: 0;
412 +}
413 +
414 +summary {
415 + display: list-item;
416 + cursor: pointer;
417 +}
418 +
419 +progress {
420 + vertical-align: baseline;
421 +}
422 +
423 +[hidden] {
424 + display: none !important;
425 +}
426 +/*# sourceMappingURL=bootstrap-reboot.css.map */
...\ No newline at end of file ...\ No newline at end of file
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
1 var express = require("express"); 1 var express = require("express");
2 var router = express.Router(); 2 var router = express.Router();
3 3
4 -//var request = require("request"); 4 +var request = require("request");
5 var bodyParser = require("body-parser"); 5 var bodyParser = require("body-parser");
6 6
7 var { OAuth2Client } = require("google-auth-library"); 7 var { OAuth2Client } = require("google-auth-library");
8 -//var querystring = require("querystring"); 8 +var querystring = require("querystring");
9 9
10 var CLIENT_ID = 10 var CLIENT_ID =
11 "94679084723-s5f0686p2porp9mkakrp1p89a48n24nj.apps.googleusercontent.com"; 11 "94679084723-s5f0686p2porp9mkakrp1p89a48n24nj.apps.googleusercontent.com";
......
1 -{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/"},"__lastAccess":1621433406098}
...\ No newline at end of file ...\ No newline at end of file
1 +{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/"},"__lastAccess":1621704357295,"user":{"name":"‍최정민[학생](소프트웨어융합대학 컴퓨터공학과)","email":"cjm2021401@khu.ac.kr","nickname":"cjm","age":"24","gender":"male"}}
...\ No newline at end of file ...\ No newline at end of file
1 -{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/"},"__lastAccess":1621187236305}
...\ No newline at end of file ...\ No newline at end of file
1 -{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/"},"__lastAccess":1621534089028,"user":{"name":"‍최정민[학생](소프트웨어융합대학 컴퓨터공학과)","email":"cjm2021401@khu.ac.kr"}}
...\ No newline at end of file ...\ No newline at end of file
1 -{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/"},"__lastAccess":1621408098038}
...\ No newline at end of file ...\ No newline at end of file
1 -{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/"},"__lastAccess":1621338937349}
...\ No newline at end of file ...\ No newline at end of file
1 -{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/"},"__lastAccess":1621186188104}
...\ No newline at end of file ...\ No newline at end of file
1 -{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/"},"__lastAccess":1621592914035,"user":{"name":"‍최정민[학생](소프트웨어융합대학 컴퓨터공학과)","email":"cjm2021401@khu.ac.kr","nickname":"MickeyMouse","age":"19","gender":"male"}}
...\ No newline at end of file ...\ No newline at end of file
1 -{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/"},"__lastAccess":1621191395860,"user":{"name":"‍최정민[학생](소프트웨어융합대학 컴퓨터공학과)","email":"cjm2021401@khu.ac.kr","nickname":"Mayf","age":"25","gender":"male"},"gender":"male"}
...\ No newline at end of file ...\ No newline at end of file
1 -{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/"},"__lastAccess":1621338737470}
...\ No newline at end of file ...\ No newline at end of file
1 -{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/"},"__lastAccess":1621216159014}
...\ No newline at end of file ...\ No newline at end of file
1 -{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/"},"__lastAccess":1621337475210}
...\ No newline at end of file ...\ No newline at end of file
...@@ -6,13 +6,63 @@ ...@@ -6,13 +6,63 @@
6 <meta name="google-signin-client_id" content="94679084723-s5f0686p2porp9mkakrp1p89a48n24nj.apps.googleusercontent.com"> 6 <meta name="google-signin-client_id" content="94679084723-s5f0686p2porp9mkakrp1p89a48n24nj.apps.googleusercontent.com">
7 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 7 <meta name="viewport" content="width=device-width, initial-scale=1.0">
8 <title>first</title> 8 <title>first</title>
9 - <link rel='stylesheet' href='/stylesheets/style.css' /> 9 + <link rel="stylesheet" href="stylesheets/bootstrap.css">
10 + <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@700&display=swap" rel="stylesheet">
11 +
12 + <style>
13 + img{
14 + max-width: 100%;
15 + height: 100% !important;
16 + }
17 + h1{font-family: 'Noto Sans KR', sans-serif;}
18 + h4{font-family: 'Noto Sans KR', sans-serif;}
19 + h2{font-family: 'Noto Sans KR', sans-serif;}
20 + h3{font-family: 'Noto Sans KR', sans-serif;}
21 + h5{font-family: 'Noto Sans KR', sans-serif;}
22 + .middle{
23 + display: inline-block;
24 + vertical-align: middle;
25 + }
26 + </style>
27 +
28 +
10 </head> 29 </head>
11 30
31 +
32 +
33 +
12 <body> 34 <body>
13 -<h1>Login</h1> 35 +<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
14 -<div class="g-signin2" data-onsuccess="onSignIn"></div> 36 + <a class="navbar-brand" href="/"><img src="images/home.png" width="40" height="40" alt="">
15 -<a href="#" onclick="signOut();">Sign out</a> 37 + </a>
38 + <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
39 + <span class="navbar-toggler-icon"></span>
40 + </button>
41 + <div class="collapse navbar-collapse" id="navbarSupportedContent">
42 + <a class="navbar-brand" href="/" ><strong>Home</strong></a>
43 + <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
44 +
45 + <li class="nav-item active">
46 + <a class="nav-link" style="color:#ffffff" href="/" onclick="signOut();">Logout<span class="sr-only">(current)</span></a>
47 + </li>
48 +
49 + </ul>
50 + </div>
51 +</nav>
52 +<div class="pricing-header px-3 py-1 pt-md-3 pb-md-1 mx-auto text-center">
53 + <h3 class="display-6 font-weight-bold" >Login</h3>
54 +</div>
55 +<section id="carousel-3" class="text-center">
56 + <div class="row">
57 + <div class="col-4"></div>
58 +
59 + <div class="col-4"><div class="g-signin2" class="text-center" data-onsuccess="onSignIn"></div></div>
60 +
61 +
62 + <a href="#" onclick="signOut();">Sign out</a>
63 + </div>
64 + </div>
65 +</section>
16 </body> 66 </body>
17 67
18 68
...@@ -40,4 +90,5 @@ ...@@ -40,4 +90,5 @@
40 }); 90 });
41 } 91 }
42 </script> 92 </script>
93 +<script src="javascripts/bootstrap.js"></script>
43 </html> 94 </html>
......
...@@ -5,23 +5,84 @@ ...@@ -5,23 +5,84 @@
5 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 6
7 <title>logined</title> 7 <title>logined</title>
8 +
9 + <link rel="stylesheet" href="stylesheets/bootstrap.css">
10 + <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@700&display=swap" rel="stylesheet">
11 +
12 + <style>
13 + img{
14 + max-width: 100%;
15 + height: 100% !important;
16 + }
17 + h1{font-family: 'Noto Sans KR', sans-serif;}
18 + h4{font-family: 'Noto Sans KR', sans-serif;}
19 + h2{font-family: 'Noto Sans KR', sans-serif;}
20 + h3{font-family: 'Noto Sans KR', sans-serif;}
21 + h5{font-family: 'Noto Sans KR', sans-serif;}
22 + .middle{
23 + display: inline-block;
24 + vertical-align: middle;
25 + }
26 + </style>
8 </head> 27 </head>
9 <body> 28 <body>
29 +<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
30 + <a class="navbar-brand" href="/"><img src="images/home.png" width="40" height="40" alt="">
31 + </a>
32 + <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
33 + <span class="navbar-toggler-icon"></span>
34 + </button>
35 + <div class="collapse navbar-collapse" id="navbarSupportedContent">
36 + <a class="navbar-brand" href="/" ><strong>Home</strong></a>
37 + <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
38 +
39 + <li class="nav-item active">
40 + <a class="nav-link" style="color:#ffffff" href="/" onclick="signOut();">Logout<span class="sr-only">(current)</span></a>
41 + </li>
42 +
43 + </ul>
44 + </div>
45 +</nav>
46 +<div class="pricing-header px-3 py-1 pt-md-3 pb-md-1 mx-auto text-center">
47 + <h3 class="display-6 font-weight-bold" >Signup</h3>
48 +</div>
49 +
50 +
51 +<hr class="my-2" >
52 +<section id="carousel-1">
53 + <div class="row">
54 + <div class="col-2"></div>
55 + <div class="col-8">
56 + <hr class="my-4" style="background-color: white">
57 + <form method="post">
58 + <div class="form-group ">
59 + <label for="id_input">닉네임을 입력하세요</label>
60 + <input type="text" class="form-control form-control-lg" name="nickname" aria-describedby="idHelp" placeholder="ID">
61 + <small id="idHelp" class="form-text text-muted">중복이 허용되지 않습니다.</small>
62 + </div>
63 + <hr class="my-3" style="background-color: white">
64 + <div class="form-group">
65 + <label for="age_input">나이를 입력하세요</label>
66 + <input class="form-control form-control-lg" type="number" name="age"placeholder="Age">
67 + </div>
68 + <hr class="my-3" style="background-color: white">
10 69
11 -<h1>Hi <%= user.name %></h1> 70 + <label for="gender" class="form-label ">성별을 입력하세요</label>
12 -<form method="post"> 71 + <select class="form-select form-select-lg" id="gender" name="gender" required>
13 - NickName:<br> 72 + <option selected disabled value="">Choose...</option>
14 - <input type="text" name="nickname" value="MickeyMouse"><br> 73 + <option value="male">Male</option>
15 - Age:<br> 74 + <option value="female">Female</option>
16 - <input type="text" name="age" value="19"><br><br> 75 + </select>
17 76
18 - <input type="radio" id="male" name="gender" value="male"> 77 + <hr class="my-4" style="background-color: white">
19 - <label for="male">Male</label><br> 78 + <button type="submit" style="float:right" class="btn btn-primary btn-lg" id="please">Submit</button>
20 - <input type="radio" id="female" name="gender" value="female"> 79 +
21 - <label for="female">Female</label><br> 80 + </form>
81 + </div>
82 + <div class="col-2"></div>
83 + </div>
84 +</section>
22 85
23 - <input type="submit" value="Submit">
24 -</form>
25 <a href="/logout" onclick="signOut();">Sign Out</a> 86 <a href="/logout" onclick="signOut();">Sign Out</a>
26 <%if (message=='same nickname'){%> 87 <%if (message=='same nickname'){%>
27 <script type="text/javascript"> 88 <script type="text/javascript">
...@@ -40,5 +101,12 @@ ...@@ -40,5 +101,12 @@
40 console.log('User signed out.'); 101 console.log('User signed out.');
41 }); 102 });
42 } 103 }
104 + function signOut() {
105 + var auth2 = gapi.auth2.getAuthInstance();
106 + auth2.signOut().then(function () {
107 + console.log('User signed out.');
108 + });
109 + }
43 </script> 110 </script>
111 +<script src="javascripts/bootstrap.js"></script>
44 </html> 112 </html>
...\ No newline at end of file ...\ No newline at end of file
......
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 - <head> 3 +<head>
4 + <link rel="stylesheet" href="stylesheets/bootstrap.css">
4 <title>Cafe Map</title> 5 <title>Cafe Map</title>
5 <style> 6 <style>
7 + .navbar{
8 + background-color: #1d2124 !important;
9 + }
10 + .btn-primary{
11 + color : white !important;
12 + }
13 + p{font-family: 'Noto Sans KR', sans-serif;}
14 + h1{font-family: 'Noto Sans KR', sans-serif;}
15 + h4{font-family: 'Noto Sans KR', sans-serif;}
16 + h2{font-family: 'Noto Sans KR', sans-serif;}
17 + h3{font-family: 'Noto Sans KR', sans-serif;}
18 + h5{font-family: 'Noto Sans KR', sans-serif;}
6 .placeinfo_wrap { 19 .placeinfo_wrap {
7 position: absolute; 20 position: absolute;
8 bottom: 28px; 21 bottom: 28px;
...@@ -70,43 +83,54 @@ ...@@ -70,43 +83,54 @@
70 margin-top: 0; 83 margin-top: 0;
71 } 84 }
72 </style> 85 </style>
73 - </head> 86 +</head>
74 - <body> 87 +<body>
75 - <div id="map" style="width: 100%; height: 575px"></div> 88 +<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
76 - 89 + <a class="navbar-brand" href="/"><img src="images/home.png" width="40" height="40" alt="">
77 - <script 90 + </a>
91 + <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
92 + <span class="navbar-toggler-icon"></span>
93 + </button>
94 + <div class="collapse navbar-collapse" id="navbarSupportedContent">
95 + <a class="navbar-brand" href="/" ><strong>Home</strong></a>
96 + <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
97 +
98 + <li class="nav-item active">
99 + <a class="nav-link" style="color:#ffffff" href="/" onclick="signOut();">Logout<span class="sr-only">(current)</span></a>
100 + </li>
101 +
102 + </ul>
103 + </div>
104 +</nav>
105 +<div class="pricing-header px-3 py-1 pt-md-3 pb-md-1 mx-auto text-center">
106 + <h3 class="display-6 font-weight-bold" >Map</h3>
107 +</div>
108 +
109 +<div id="map" style="width: 100%; height: 575px"></div>
110 +<script
78 type="text/javascript" 111 type="text/javascript"
79 src="//dapi.kakao.com/v2/maps/sdk.js?appkey=68cbccbcd6f0fef0a213e62ad37393ee&libraries=services" 112 src="//dapi.kakao.com/v2/maps/sdk.js?appkey=68cbccbcd6f0fef0a213e62ad37393ee&libraries=services"
80 - ></script> 113 +></script>
81 - <script> 114 +<script>
82 var lat = ""; 115 var lat = "";
83 var lon = ""; 116 var lon = "";
84 -
85 var placeOverlay = new kakao.maps.CustomOverlay({ zIndex: 1 }); 117 var placeOverlay = new kakao.maps.CustomOverlay({ zIndex: 1 });
86 var contentNode = document.createElement("div"); 118 var contentNode = document.createElement("div");
87 var markers = []; 119 var markers = [];
88 var currCategory = "CE7"; // 카테고리코드: 카페 120 var currCategory = "CE7"; // 카테고리코드: 카페
89 var order = 1; 121 var order = 1;
90 -
91 var mapContainer = document.getElementById("map"), 122 var mapContainer = document.getElementById("map"),
92 mapOption = { 123 mapOption = {
93 center: new kakao.maps.LatLng(36.2477502, 127.078164), 124 center: new kakao.maps.LatLng(36.2477502, 127.078164),
94 level: 3, 125 level: 3,
95 }; 126 };
96 -
97 var map = new kakao.maps.Map(mapContainer, mapOption); 127 var map = new kakao.maps.Map(mapContainer, mapOption);
98 -
99 var ps = new kakao.maps.services.Places(map); 128 var ps = new kakao.maps.services.Places(map);
100 -
101 kakao.maps.event.addListener(map, "idle", searchPlaces); 129 kakao.maps.event.addListener(map, "idle", searchPlaces);
102 -
103 contentNode.className = "placeinfo_wrap"; 130 contentNode.className = "placeinfo_wrap";
104 -
105 addEventHandle(contentNode, "mousedown", kakao.maps.event.preventMap); 131 addEventHandle(contentNode, "mousedown", kakao.maps.event.preventMap);
106 addEventHandle(contentNode, "touchstart", kakao.maps.event.preventMap); 132 addEventHandle(contentNode, "touchstart", kakao.maps.event.preventMap);
107 -
108 placeOverlay.setContent(contentNode); 133 placeOverlay.setContent(contentNode);
109 -
110 function addEventHandle(target, type, callback) { 134 function addEventHandle(target, type, callback) {
111 if (target.addEventListener) { 135 if (target.addEventListener) {
112 target.addEventListener(type, callback); 136 target.addEventListener(type, callback);
...@@ -114,51 +138,40 @@ ...@@ -114,51 +138,40 @@
114 target.attachEvent("on" + type, callback); 138 target.attachEvent("on" + type, callback);
115 } 139 }
116 } 140 }
117 -
118 placeOverlay.setContent(contentNode); 141 placeOverlay.setContent(contentNode);
119 if (navigator.geolocation) { 142 if (navigator.geolocation) {
120 navigator.geolocation.getCurrentPosition(function (position) { 143 navigator.geolocation.getCurrentPosition(function (position) {
121 lat = position.coords.latitude; 144 lat = position.coords.latitude;
122 lon = position.coords.longitude; 145 lon = position.coords.longitude;
123 -
124 var locPosition = new kakao.maps.LatLng(lat, lon); 146 var locPosition = new kakao.maps.LatLng(lat, lon);
125 -
126 displayCurrentPosition(locPosition); 147 displayCurrentPosition(locPosition);
127 }); 148 });
128 } else { 149 } else {
129 var locPosition = new kakao.maps.LatLng(36.2477502, 127.078164); 150 var locPosition = new kakao.maps.LatLng(36.2477502, 127.078164);
130 -
131 displayCurrentPosition(locPosition); 151 displayCurrentPosition(locPosition);
132 } 152 }
133 -
134 function displayCurrentPosition(locPosition) { 153 function displayCurrentPosition(locPosition) {
135 map.setCenter(locPosition); 154 map.setCenter(locPosition);
136 } 155 }
137 -
138 kakao.maps.event.addListener(map, "idle", searchPlaces); 156 kakao.maps.event.addListener(map, "idle", searchPlaces);
139 -
140 function searchPlaces() { 157 function searchPlaces() {
141 if (!currCategory) { 158 if (!currCategory) {
142 return; 159 return;
143 } 160 }
144 placeOverlay.setMap(null); 161 placeOverlay.setMap(null);
145 -
146 ps.categorySearch(currCategory, placesSearchCB, { usemapBounds: true }); 162 ps.categorySearch(currCategory, placesSearchCB, { usemapBounds: true });
147 } 163 }
148 -
149 function placesSearchCB(data, status, pagination) { 164 function placesSearchCB(data, status, pagination) {
150 if (status === kakao.maps.services.Status.OK) { 165 if (status === kakao.maps.services.Status.OK) {
151 displayPlaces(data); 166 displayPlaces(data);
152 } 167 }
153 } 168 }
154 -
155 function displayPlaces(places) { 169 function displayPlaces(places) {
156 for (var i = 0; i < places.length; i++) { 170 for (var i = 0; i < places.length; i++) {
157 var marker = addMarker( 171 var marker = addMarker(
158 new kakao.maps.LatLng(places[i].y, places[i].x), 172 new kakao.maps.LatLng(places[i].y, places[i].x),
159 order 173 order
160 ); 174 );
161 -
162 (function (marker, place) { 175 (function (marker, place) {
163 kakao.maps.event.addListener(marker, "click", function () { 176 kakao.maps.event.addListener(marker, "click", function () {
164 displayPlaceInfo(place); 177 displayPlaceInfo(place);
...@@ -166,7 +179,6 @@ ...@@ -166,7 +179,6 @@
166 })(marker, places[i]); 179 })(marker, places[i]);
167 } 180 }
168 } 181 }
169 -
170 function addMarker(position, order) { 182 function addMarker(position, order) {
171 var imageSrc = 183 var imageSrc =
172 "https://t1.daumcdn.net/localimg/localimages/07/mapapidoc/places_category.png"; 184 "https://t1.daumcdn.net/localimg/localimages/07/mapapidoc/places_category.png";
...@@ -181,18 +193,14 @@ ...@@ -181,18 +193,14 @@
181 imageSize, 193 imageSize,
182 imgOptions 194 imgOptions
183 ); 195 );
184 -
185 var marker = new kakao.maps.Marker({ 196 var marker = new kakao.maps.Marker({
186 position: position, 197 position: position,
187 image: markerImage, 198 image: markerImage,
188 }); 199 });
189 -
190 marker.setMap(map); 200 marker.setMap(map);
191 markers.push(marker); 201 markers.push(marker);
192 -
193 return marker; 202 return marker;
194 } 203 }
195 -
196 function displayPlaceInfo(place) { 204 function displayPlaceInfo(place) {
197 var content = 205 var content =
198 '<div class="placeinfo">' + 206 '<div class="placeinfo">' +
...@@ -203,7 +211,6 @@ ...@@ -203,7 +211,6 @@
203 '">' + 211 '">' +
204 place.place_name + 212 place.place_name +
205 "</a>"; 213 "</a>";
206 -
207 if (place.road_address_name) { 214 if (place.road_address_name) {
208 content += 215 content +=
209 ' <span title="' + 216 ' <span title="' +
...@@ -224,18 +231,18 @@ ...@@ -224,18 +231,18 @@
224 place.address_name + 231 place.address_name +
225 "</span>"; 232 "</span>";
226 } 233 }
227 -
228 content += 234 content +=
229 ' <span class="tel">' + 235 ' <span class="tel">' +
230 place.phone + 236 place.phone +
231 "</span>" + 237 "</span>" +
232 "</div>" + 238 "</div>" +
233 '<div class="after"></div>'; 239 '<div class="after"></div>';
234 -
235 contentNode.innerHTML = content; 240 contentNode.innerHTML = content;
236 placeOverlay.setPosition(new kakao.maps.LatLng(place.y, place.x)); 241 placeOverlay.setPosition(new kakao.maps.LatLng(place.y, place.x));
237 placeOverlay.setMap(map); 242 placeOverlay.setMap(map);
238 } 243 }
239 - </script> 244 +</script>
240 - </body> 245 +<script src="javascripts/bootstrap.js"></script>
246 +<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
247 +</body>
241 </html> 248 </html>
......