GyuhoLee

[Update] Index page prototype

...@@ -3,17 +3,26 @@ ...@@ -3,17 +3,26 @@
3 3
4 <head> 4 <head>
5 <meta charset="UTF-8"> 5 <meta charset="UTF-8">
6 - <title>OSW</title> 6 + <title>OSSW</title>
7 - <link rel="stylesheet" href="/css/style.css" crossorigin="anonymous"> 7 + <link rel="stylesheet" href="/style.css" crossorigin="anonymous">
8 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" 8 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
9 integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous"> 9 integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
10 <link href="https://fonts.googleapis.com/css?family=Jua&display=swap" rel="stylesheet"> 10 <link href="https://fonts.googleapis.com/css?family=Jua&display=swap" rel="stylesheet">
11 </head> 11 </head>
12 12
13 <body> 13 <body>
14 - helloworld 14 + <nav class="navbar navbar-light bg-light" style="border-bottom: 1px solid lightgray;">
15 - 15 + <a class="navbar-brand" href="#" style="margin-left: 15px;">
16 - 16 + <img src="/image/logo.png" style="height:250px;"/>
17 + </a>
18 + </nav>
19 + <div class = "main">
20 + <img src="/image/thermometer.jpg" class = "icon">
21 + </div>
22 + <div class = "sub">
23 + <input type="text" id="location_input" value="영통1동" autofocus="true">
24 + <button id="location_button">입력</button>
25 + </div>
17 <script src="https://code.jquery.com/jquery-3.3.1.min.js" 26 <script src="https://code.jquery.com/jquery-3.3.1.min.js"
18 integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT" 27 integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT"
19 crossorigin="anonymous"></script> 28 crossorigin="anonymous"></script>
......
...@@ -15,9 +15,8 @@ code = [] ...@@ -15,9 +15,8 @@ code = []
15 for cell in sheet['E']: 15 for cell in sheet['E']:
16 code.append(cell.value) 16 code.append(cell.value)
17 17
18 -#nodejs 연동용 18 +sys.stdin.reconfigure(encoding='utf-8')
19 -#sys.stdin.reconfigure(encoding='utf-8') 19 +sys.stdout.reconfigure(encoding='utf-8')
20 -#sys.stdout.reconfigure(encoding='utf-8')
21 area = input() 20 area = input()
22 print(area) 21 print(area)
23 col = code.index(area) 22 col = code.index(area)
...@@ -71,11 +70,11 @@ if max(sens_temper) <= 8: ...@@ -71,11 +70,11 @@ if max(sens_temper) <= 8:
71 print("패딩, 겨울야상, 양털자켓, 폴라티, 니트, 기모바지") 70 print("패딩, 겨울야상, 양털자켓, 폴라티, 니트, 기모바지")
72 print("쌀쌀한 날씨입니다. 생각보다 추워요!") 71 print("쌀쌀한 날씨입니다. 생각보다 추워요!")
73 cold_danger=1 72 cold_danger=1
74 - elif min(sens_temper) < -3 and min(sens_temp)>=-10: 73 + elif min(sens_temper) < -3 and min(sens_temper)>=-10:
75 print("패딩, 겨울야상, 양털자켓, 폴라티, 니트, 기모바지") 74 print("패딩, 겨울야상, 양털자켓, 폴라티, 니트, 기모바지")
76 print("마스크, 목도리, 장갑을 착용하세요!") 75 print("마스크, 목도리, 장갑을 착용하세요!")
77 cold_danger=2 76 cold_danger=2
78 - if min(sens_temper) < -10and min(sens_temper)>=-15: 77 + if min(sens_temper) < -10 and min(sens_temper)>=-15:
79 print("피부를 되도록 노출하지 마세요") 78 print("피부를 되도록 노출하지 마세요")
80 print("최대한 따뜻하게 입고 다니세요") 79 print("최대한 따뜻하게 입고 다니세요")
81 cold_danger=3 80 cold_danger=3
......
1 +.main, .sub{
2 + margin-top: 200px;
3 + text-align: center;
4 + background:color= gray;
5 +}
6 +
7 +.icon{
8 + width: 550px;
9 + height: 550px;
10 +}
11 +
12 +#location_input{
13 + width: 400px;
14 + font-size: 50px;
15 +}
16 +
17 +#location_button{
18 + font-size:50px;
19 +}
...\ No newline at end of file ...\ No newline at end of file
...@@ -14,7 +14,7 @@ var app = http.createServer(function(request,response){ ...@@ -14,7 +14,7 @@ var app = http.createServer(function(request,response){
14 response.end(fs.readFileSync(__dirname + url)); 14 response.end(fs.readFileSync(__dirname + url));
15 15
16 }); 16 });
17 -app.listen(3000); 17 +app.listen(8080);
18 18
19 const {PythonShell} = require('python-shell'); 19 const {PythonShell} = require('python-shell');
20 20
...@@ -31,6 +31,7 @@ var test = new PythonShell('recommend_clothes.py', options); ...@@ -31,6 +31,7 @@ var test = new PythonShell('recommend_clothes.py', options);
31 var data='영통1동'; 31 var data='영통1동';
32 test.send(data); 32 test.send(data);
33 test.on('message',function(message){ 33 test.on('message',function(message){
34 - arr = message.split(' '); 34 + arr = message.split('\n');
35 + console.log(arr);
35 }) 36 })
36 37
......