-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
550 lines (441 loc) · 23.4 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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
<title>covid-19 locate</title>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap" rel="stylesheet">
<link rel="icon" href="data:,">
<!-- my stylesheet-->
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700&display=swap" rel="stylesheet">
<link rel=stylesheet href="../static/css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.min.css"/>
<!-- JS -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="../static/js/jquery-1.12.3.js"></script>
<!-- my js-->
<script>
//현재시간
function setClock() {
const event = new Date();
$('#top_clock').text(event.toString());
}
setClock();
var timerId = setInterval(setClock, 1000);
</script>
<!-- @@@@@@@@여기부터 수정@@@@@@@@@ -->
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script>
<!-- 차트 링크 -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/chart.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script>
function q1() {
// 여기에 코드를 입력하세요
$('#names-q1').empty();
$.ajax({
type: "GET",
url: "http://openapi.seoul.go.kr:8088/63525543576f6e65363864706d7852/json/TbCorona19CountStatusJCG/1/5/2021.08.01.00",
data: {},
success: function (response) {
let seoul = response["TbCorona19CountStatusJCG"]["row"];
let ddm_total = seoul[0]["DDM"]
let ddm_day = seoul[0]["DDMADD"]
let temp_html = `${ddm_total} <br>
${ddm_day}`
$('#names-q1').append(temp_html);
}
})
}
<!-- @@@@@@@@여기까지 수정@@@@@@@@@ -->
</head>
<body>
<div id=wrap>
<div class="bg">
<img class="bg_img" src="../static/img/bg.png">
</div>
<!-- 헤더-->
<header>
<h1>
Covid-19 Locate
</h1>
</header>
<!-- 현재시간-->
<h6 id="top_clock">CLOCK</h6>
<!-- 메인상자-->
<div class="main">
<img class="main_bg" src="../static/img/main_bg.png">
<!-- 컨텐츠상자-->
<div class="cont">
<!-- 확진자 현황-->
<section class="coronic section">
<div class="section_bg"></div>
<!-- <img class="cont_bg" src="img/cont_bg.png">-->
<h2>확진자 현황</h2>
<div class="sec_cont coronic_cont">
<div class="bar_graph">
<canvas id="mychart2" style="height: 100%;">
<p>현재 사용하는 브라우저가 캔버스 요소를 지원하지 않습니다.</p>
</canvas>
</div>
</div>
</section>
<!-- 위드코로나-->
<section class="withcorona section">
<div class="section_bg"></div>
<!-- <img class="cont_bg" src="img/cont_bg.png" >-->
<h2>위드코로나</h2>
<div class="sec_cont">
<div class=" withcorona_cont">
<div class="grade_wrap">
<div class="grade">
<div class="grade_number">1차</div>
<div class="grade_title">
현재 1차 개편
</div>
</div>
<div class="detail">
<dl>
<dt>
<span class="title">모임</span>
</dt>
<dd>ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo</dd>
<dt>
<span class="title">2그룹 시설<br>(노래방,목욕탕,실내체육시설)</span>
</dt>
<dd>ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo</dd>
<dt>
<span class="title">3그룹 시설<br>(학원,영화관,공연장,독서실,pc방)</span>
</dt>
<dd>ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo</dd>
</dl>
</div>
<!-- <img class="fa-chevron-right" src="img/right_arrow.svg">-->
</div>
<div class="grade_wrap">
<div class="grade">
<div class="grade_number">2차</div>
<div class="grade_title">
현재 2차 개편
</div>
</div>
<div class="detail">
<dl>
<dt>
<span class="title">모임</span>
</dt>
<dd>ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo</dd>
<dt>
<span class="title">2그룹 시설<br>(노래방,목욕탕,실내체육시설)</span>
</dt>
<dd>ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo</dd>
<dt>
<span class="title">3그룹 시설<br>(학원,영화관,공연장,독서실,pc방)</span>
</dt>
<dd>ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo</dd>
</dl>
</div>
<!-- <i class="fas fa-chevron-right"></i>-->
</div>
<div class="grade_wrap">
<div class="grade">
<div class="grade_number">3차</div>
<div class="grade_title">
현재 3차 개편
</div>
</div>
<div class="detail">
<dl>
<dt>
<span class="title">모임</span>
</dt>
<dd>ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo</dd>
<dt>
<span class="title">2그룹 시설<br>(노래방,목욕탕,실내체육시설)</span>
</dt>
<dd>ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo</dd>
<dt>
<span class="title">3그룹 시설<br>(학원,영화관,공연장,독서실,pc방)</span>
</dt>
<dd>ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo</dd>
</dl>
</div>
<!-- <i class="fas fa-chevron-right"></i>-->
</div>
</div>
<div class="slide_btn">
<div class="btn_1 btn_active"></div>
<div class="btn_2"></div>
<div class="btn_3"></div>
</div>
</div>
</section>
<!-- 백신 접종률-->
<section class="vaccine section">
<div class="section_bg"></div>
<!-- <img class="cont_bg" src="img/cont_bg.png">-->
<h2>백신 접종률</h2>
<div class="sec_cont vaccine_cont">
<div class="vacont_wrap">
<div class="circle">
<canvas id="mychart1">
<p>현재 사용하는 브라우저가 캔버스 요소를 지원하지 않습니다.</p>
</canvas>
</div>
<div class="percent">
<p>90%</p>
<span>백신 접종완료</span>
</div>
</div>
</div>
</section>
<!-- 선별 진료소-->
<section class="hospital section">
<div class="section_bg"></div>
<!-- <img class="cont_bg" src="img/cont_bg.png" >-->
<h2>선별 진료소</h2>
<div class="sec_cont hospital_cont">
<div class="hospital_wrap">
<dl>
<dt>
<span class="hostpital_name">ㅇㅇ선별 진료소</span>
<span class="call">02-1234-1234</span>
</dt>
<dd>oooooooooooooooooooooooooooooooooooooooooooo</dd>
<dt>
<span class="hostpital_name">ㅇㅇ선별 진료소</span>
<span class="call">02-1234-1234</span>
</dt>
<dd>oooooooooooooooooooooooooooooooooooooooooooo</dd>
<dt>
<span class="hostpital_name">ㅇㅇ선별 진료소</span>
<span class="call">02-1234-1234</span>
</dt>
<dd>oooooooooooooooooooooooooooooooooooooooooooo</dd>
<dt>
<span class="hostpital_name">ㅇㅇ선별 진료소</span>
<span class="call">02-1234-1234</span>
</dt>
<dd>oooooooooooooooooooooooooooooooooooooooooooo</dd>
<dt>
<span class="hostpital_name">ㅇㅇ선별 진료소</span>
<span class="call">02-1234-1234</span>
</dt>
<dd>oooooooooooooooooooooooooooooooooooooooooooo</dd>
<dt>
<span class="hostpital_name">ㅇㅇ선별 진료소</span>
<span class="call">02-1234-1234</span>
</dt>
<dd>oooooooooooooooooooooooooooooooooooooooooooo</dd>
</dl>
</div>
<div class="go_vaccine_site">
<p><a href="https://ncvr2.kdca.go.kr/">백신 예약<br>바로 가기</a></p>
</div>
</div>
</section>
</div>
<!-- 지역메뉴-->
<nav>
<ul>
<li><a href="#">서울</a></li>
<li><a href="#">서울</a></li>
<li><a href="#">서울</a></li>
<li><a href="#">서울</a></li>
<li><a href="#">서울</a></li>
<li><a href="#">서울</a></li>
<li><a href="#">서울</a></li>
<li><a href="#">서울</a></li>
<li><a href="#">서울</a></li>
<li><a href="#">서울</a></li>
<li><a href="#">서울</a></li>
<li><a href="#">서울</a></li>
<li><a href="#">서울</a></li>
<li><a href="#">서울</a></li>
<li><a href="#">서울</a></li>
<li><a href="#">서울</a></li>
<li><a href="#">서울</a></li>
</ul>
</nav>
</div>
</div>
<!-- @@@@@@@@여기부터 수정@@@@@@@@@ -->
<!-- 스크립트 -->
<script type="text/javascript">
$(document).ready(function () {
// 파이 차트 스크립트
var context = document
.getElementById('mychart1')
.getContext('2d')
var mychart = new Chart(context, {
type: 'doughnut', // 차트 종류
data: { // 차트에 들어갈 데이터
labels: [
'미접종자', '접종자' // 레이블 이름
],
datasets: [
{ //데이터
label: 'Vaccination rate', //차트 제목
data: [
],
backgroundColor: [
// 그래프 배경색
'rgba(54, 162, 235, 0.2)',
'rgba(54, 162, 235, 1)'
],
borderColor: [
// 그래프 경계선 색상
'rgba(255, 255, 255, 0)',
'rgba(54, 162, 235, 0)',
],
borderWidth: 1 //경계선 굵기
,
hoverOffset: 5 //마우스 올릴 때의 애니메이션
}
]
},
options: {
plugins: {
title: {
display: false,
text: '백신 접종률 (단위: 만)' //그래프 제목
},
legend: {
display: false //범례 비가시화
}
},// plugin = 기타 다양한 기능들 - 현재 제목, 범례 조정
layout: {
padding: 10
},
devicePixelRatio: 2
}
});
// 바 차트 스크립트
var context = document
.getElementById('mychart2')
.getContext('2d')
var myChart2 = new Chart(context, {
plugins: [ChartDataLabels],
type: 'bar', // 차트 종류
data: { // 차트에 들어갈 데이터
labels: ['3', '2', '3', '4', '5', '6'], // 레이블 이름
datasets: [{
label: '확진자 수',
data: [25, 2, 3, 5, 2, 3], // 실제 데이터 값
backgroundColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
], // 그래프 배경색
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
], // 그래프 경계선 색상
// barThickness: 5, // 바의 굵기 지정, 설정될 경우 borderWidth와 barPercentage(아래 두 개)를 무시하고 적용됩니다.
borderWidth: 1, //테두리 굵기
barPercentage: 0.5, //그래프 한 칸에서 막대가 차지하는 비율 (width)
// categoryPercentage: 1, //그래프 전체에서 한 칸의 비율
base: 0, // 그래프의 기준 축
datalabels: {
labels: {
name: {
align: 'start',
anchor: 'start',
offset: '5',
font: { size: 16 },
formatter: function (value, ctx) {
return ctx.chart.data.labels[ctx.dataIndex];
}
}, // name = 레이블 이름의 위치, 크기, 색, 데이터 형식 등
value: {
align: 'end',
anchor: 'end',
offset: '2',
font: { size: 16 },
// color: function (ctx) {
// var value = ctx.dataset.data[ctx.dataIndex];
// return 'white'
// },
formatter: function (value, ctx) {
return Math.round(value);
}
} // value = 그래프 값의 위치, 크기, 색, 데이터 형식 등
}
}
}]
},
options: {
plugins: {
datalabels: {
color: 'white',
display: function (context) {
return context.dataset.data[context.dataIndex] > 0;
},
font: {
weight: 'bold'
},
formatter: Math.round
},
title: {
display: false,
text: '지역별 확진자 수' //타이틀 가시화, 텍스트
},
legend: {
display: false //범례 비가시화
}
}, // plugin = 기타 다양한 기능들 - 현재 폰트, 제목, 범례 조정
scales: {
x: {
display: false
},
y: {
display: false,
suggestedMin: -2
}
}, // 그래프의 축 정보 - 축 안보이게 하기, y축 5만큼 내리기 되어있음.
layout: {
padding: 10
},
devicePixelRatio: 2
}
});
})
</script>
<!-- 위까지 하영님수정 -->
<script>
//위드코로나 버튼활성화
var tabBtn = $(".slide_btn > div");
tabBtn.click(function(e){
e.preventDefault();
var target = $(this);
var index = target.index();
tabBtn.removeClass("btn_active");
target.addClass("btn_active");
});
//위드코로나 우측으로 슬라이드
document.querySelector('.btn_2').addEventListener('click', function(){ document.querySelector('.withcorona_cont').style.transform = 'translate(-25.99vw)';
})
document.querySelector('.btn_3').addEventListener('click', function(){ document.querySelector('.withcorona_cont').style.transform = 'translate(-52vw)';
})
document.querySelector('.btn_1').addEventListener('click', function(){ document.querySelector('.withcorona_cont').style.transform = 'translate(-0vw)';
})
</script>
</body>
</html>