Showing
2 changed files
with
17 additions
and
7 deletions
... | @@ -174,14 +174,18 @@ helper.getCurrentWeatherByCityName("Seoul", (err, currentWeather) => { | ... | @@ -174,14 +174,18 @@ helper.getCurrentWeatherByCityName("Seoul", (err, currentWeather) => { |
174 | var cal = jresult.calories; | 174 | var cal = jresult.calories; |
175 | var user = db.get('users').find({ID:sID}).value(); | 175 | var user = db.get('users').find({ID:sID}).value(); |
176 | var bmi = user.weight/(user.height*user.height/100/100); | 176 | var bmi = user.weight/(user.height*user.height/100/100); |
177 | - var ccc = container.L(`<h2 style="margin-left: 10%">칼로리 : ${cal}kcal`,`<p style="margin-left: 10%">"Weather NOW"</p> | 177 | + var youkcal = user.height*user.height/100/100 * 21.5 * 35; |
178 | + var ccc = container.L(`<h2 style="margin-left: 10%">칼로리 : ${cal}kcal`, | ||
179 | + `<p style="margin-left: 10%">"Weather NOW"</p> | ||
178 | <p id="w1" style="margin-left: 10%">도시 = ${city}</p> | 180 | <p id="w1" style="margin-left: 10%">도시 = ${city}</p> |
179 | - <p id="w3" style="margin-left: 10%">현재온도 = ${temper}(+" ℃")</p> | 181 | + <p id="w3" style="margin-left: 10%">현재온도 = ${temper} ℃</p> |
180 | <span id="w2" style="margin-left: 10%">현재날씨 = ${weather}</span> | 182 | <span id="w2" style="margin-left: 10%">현재날씨 = ${weather}</span> |
181 | <span id="w4" style="margin-left: 10%">날씨상세 = ${detweather}</span> | 183 | <span id="w4" style="margin-left: 10%">날씨상세 = ${detweather}</span> |
182 | <br><br> | 184 | <br><br> |
183 | - <span id="w5" style="margin-left: 10%">바람 = ${wind}(+"m/s")</span> | 185 | + <span id="w5" style="margin-left: 10%">바람 = ${wind} m/s</span> |
184 | - <span id="w6" style="margin-left: 10%">구름 = ${cloud} (+"%")</span>`,`<h2 style="margin-left: 10%">bmi: ${bmi}</h2>`) | 186 | + <span id="w6" style="margin-left: 10%">구름 = ${cloud} %</span>`, |
187 | + `<h2 style="margin-left: 10%">bmi: ${bmi} </h2> | ||
188 | + <h2 style="margin-left: 10%"> 하루 권장 칼로리: ${youkcal}</h2>`) | ||
185 | var html = template.HTML(title,ch,``,body,`#logout{ | 189 | var html = template.HTML(title,ch,``,body,`#logout{ |
186 | position:absolute; | 190 | position:absolute; |
187 | right: 20ch; | 191 | right: 20ch; |
... | @@ -198,22 +202,27 @@ helper.getCurrentWeatherByCityName("Seoul", (err, currentWeather) => { | ... | @@ -198,22 +202,27 @@ helper.getCurrentWeatherByCityName("Seoul", (err, currentWeather) => { |
198 | #container1{ | 202 | #container1{ |
199 | float: left; | 203 | float: left; |
200 | border: 1px solid white; | 204 | border: 1px solid white; |
205 | + background-color: orange; | ||
201 | width: 100%; | 206 | width: 100%; |
202 | - height: 90%; | 207 | + height: 60%; |
203 | } | 208 | } |
204 | #container2{ | 209 | #container2{ |
205 | float: left; | 210 | float: left; |
206 | border: 1px solid white; | 211 | border: 1px solid white; |
207 | background-color: rgb(102, 219, 180); | 212 | background-color: rgb(102, 219, 180); |
213 | + font-weight: bold; | ||
208 | width: 100%; | 214 | width: 100%; |
209 | - height: 120%; | 215 | + height: 100%; |
210 | } | 216 | } |
211 | #container3{ | 217 | #container3{ |
212 | float: right; | 218 | float: right; |
213 | border: 1px solid white; | 219 | border: 1px solid white; |
220 | + background-color: gainsboro; | ||
214 | margin-right:5%; | 221 | margin-right:5%; |
215 | width: 40%; | 222 | width: 40%; |
216 | - height: 90%; | 223 | + height: 200%; |
224 | + | ||
225 | + | ||
217 | }`,ccc); | 226 | }`,ccc); |
218 | res.send(html); | 227 | res.send(html); |
219 | 228 | ... | ... |
1 | +{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/"},"__lastAccess":1559839070317,"is_logined":true,"ID":"harry"} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment