곽태식

Merge branch 'wallpaper'

1 const db = require('./db.js'); 1 const db = require('./db.js');
2 const secret_key = require('../keys/api_option').key; 2 const secret_key = require('../keys/api_option').key;
3 +//const secret_D_key = require('../keys/api_option').D_key;//사망교통사고 키
3 const requesting = require('request'); 4 const requesting = require('request');
4 const lat = "37.239795"; 5 const lat = "37.239795";
5 const lon = "127.083240"; 6 const lon = "127.083240";
...@@ -23,6 +24,9 @@ module.exports = (server, app) => { ...@@ -23,6 +24,9 @@ module.exports = (server, app) => {
23 24
24 let info = {} 25 let info = {}
25 26
27 +
28 +
29 +
26 const req_API = (when, what) => { 30 const req_API = (when, what) => {
27 //async await 사용하기 위하여 promise 사용 31 //async await 사용하기 위하여 promise 사용
28 return new Promise((resolve, reject) => { 32 return new Promise((resolve, reject) => {
...@@ -44,6 +48,10 @@ module.exports = (server, app) => { ...@@ -44,6 +48,10 @@ module.exports = (server, app) => {
44 }); 48 });
45 }) 49 })
46 } 50 }
51 +
52 +
53 +
54 +
47 const API_bundle = async () => { 55 const API_bundle = async () => {
48 56
49 try { 57 try {
...@@ -52,7 +60,8 @@ module.exports = (server, app) => { ...@@ -52,7 +60,8 @@ module.exports = (server, app) => {
52 Heat_index = await req_API("index", "heat"); //열지수 60 Heat_index = await req_API("index", "heat"); //열지수
53 Discomport_index = await req_API("index", "th"); //불쾌지수 61 Discomport_index = await req_API("index", "th"); //불쾌지수
54 Ultra_Violet_index = await req_API("index", "uv"); //자외선지수 62 Ultra_Violet_index = await req_API("index", "uv"); //자외선지수
55 - 63 + //let kts = await req_D_API();
64 +
56 info = { 65 info = {
57 heat: Heat_index.weather.wIndex.heatIndex[0].current.index, //열지수 66 heat: Heat_index.weather.wIndex.heatIndex[0].current.index, //열지수
58 sensible_temperature: Sensible_T.weather.wIndex.wctIndex[0].current.index, //체감온도 67 sensible_temperature: Sensible_T.weather.wIndex.wctIndex[0].current.index, //체감온도
...@@ -67,9 +76,12 @@ module.exports = (server, app) => { ...@@ -67,9 +76,12 @@ module.exports = (server, app) => {
67 typhoon: Current_Weather.common.stormYn, //현재 태풍 76 typhoon: Current_Weather.common.stormYn, //현재 태풍
68 time: Current_Weather.weather.minutely[0].timeObservation, // 불러온 시각 77 time: Current_Weather.weather.minutely[0].timeObservation, // 불러온 시각
69 death_prob: 0 //확률 78 death_prob: 0 //확률
79 +
70 } 80 }
71 console.log("API INFO \n", info); 81 console.log("API INFO \n", info);
72 82
83 +
84 +
73 // ------------------------------ death_prob 정의 ------------------------------ 85 // ------------------------------ death_prob 정의 ------------------------------
74 86
75 info.death_prob += info.sky.substr(5) * 1 //하늘 상태에 따라 확률 증가 87 info.death_prob += info.sky.substr(5) * 1 //하늘 상태에 따라 확률 증가
......

37.7 KB | W: | H:

243 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
1 <!-- <!DOCTYPE html> 1 <!-- <!DOCTYPE html>
2 -<html> 2 +<html lang="ko">
3 3
4 <head> 4 <head>
5 <!-- font --> 5 <!-- font -->
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
8 8
9 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 9 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10 <meta name="viewport" content="width=device-width, initial-scale=1" /> 10 <meta name="viewport" content="width=device-width, initial-scale=1" />
11 - <title>Highcharts Example</title> 11 + <title>당신이 지금 죽을 확률은?</title>
12 12
13 <style type="text/css"> 13 <style type="text/css">
14 html { 14 html {
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
39 <script src="modules/exporting.js"></script> 39 <script src="modules/exporting.js"></script>
40 <script src="modules/export-data.js"></script> 40 <script src="modules/export-data.js"></script>
41 41
42 - <img src="images/background.jpg" alt="" style="z-index:-1; min-width: 100%; min-height: 100%"> 42 + <img src="images/indexWallpaper.jpg" alt="" style="z-index:-1; min-width: 100%; min-height: 100%"width="50%" height="100%">
43 43
44 <div id="banner"> 44 <div id="banner">
45 <div id="container1" style="width:1260px; height: 400px; margin: 0 auto;"></div> 45 <div id="container1" style="width:1260px; height: 400px; margin: 0 auto;"></div>
......
1 <!DOCTYPE <!DOCTYPE html> 1 <!DOCTYPE <!DOCTYPE html>
2 -<html> 2 +<html lang="ko">
3 +
3 4
4 <head> 5 <head>
5 <meta charset="utf-8" /> 6 <meta charset="utf-8" />
6 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 7 <meta http-equiv="X-UA-Compatible" content="IE=edge">
7 - <title>Page Title</title> 8 + <title>당신이 죽을 확률은?</title>
8 9
9 <!-- font --> 10 <!-- font -->
10 <link href="https://fonts.googleapis.com/css?family=Nanum+Brush+Script&amp;subset=korean" rel="stylesheet"> 11 <link href="https://fonts.googleapis.com/css?family=Nanum+Brush+Script&amp;subset=korean" rel="stylesheet">
...@@ -71,7 +72,8 @@ ...@@ -71,7 +72,8 @@
71 </head> 72 </head>
72 73
73 <body> 74 <body>
74 - <img src="images/background.jpg" alt="" style="z-index:-1; min-width: 100%; min-height: 100%"> 75 + <img src="images/background.jpg" alt="" style="z-index:-1; min-width: 100%; min-height: 100%" height="100%" width="50%">
76 +
75 <div id="banner"> 77 <div id="banner">
76 <div style="width:100%; text-align: center; padding-top:170px;"> 78 <div style="width:100%; text-align: center; padding-top:170px;">
77 <h1 style="font-size:90px;">당신이 지금 죽을 확률은?</h1> 79 <h1 style="font-size:90px;">당신이 지금 죽을 확률은?</h1>
...@@ -84,16 +86,16 @@ ...@@ -84,16 +86,16 @@
84 <input type="text" name="name" class="form-control" placeholder="김철수" style="width:200px;"> 86 <input type="text" name="name" class="form-control" placeholder="김철수" style="width:200px;">
85 &nbsp &nbsp&nbsp&nbsp 87 &nbsp &nbsp&nbsp&nbsp
86 <label>생년월일</label> 88 <label>생년월일</label>
87 - <input type="text" name="birth" class="form-control" placeholder="971009" style="width:200px;"> 89 + <input type="text" name="birth" class="form-control" placeholder="971009" style="width:200px;" minlength="6" maxlength="6">
88 <br><br><br> 90 <br><br><br>
89 - <input type="submit" value="시작하기" class="btn btn-default" style="font-family: 'Yeon Sung', cursive; width:100px;font-weight: bold; font-size: 18px; background-color: white;"> 91 + <input type="submit" value="운명보기" class="btn btn-default" style="font-family: 'Yeon Sung', cursive; width:100px;font-weight: bold; font-size: 18px; background-color: white;">
90 </div> 92 </div>
91 </form> 93 </form>
92 </div> 94 </div>
93 95
94 </div> 96 </div>
95 97
96 - <div id="footer">오픈소스SW개발 조민지 강환석 배희수</div> 98 + <div id="footer">오픈소스SW개발 곽태식 이승규 강병호</div>
97 </body> 99 </body>
98 100
99 </html> 101 </html>
...\ No newline at end of file ...\ No newline at end of file
......