Showing
2 changed files
with
46 additions
and
36 deletions
... | @@ -174,47 +174,56 @@ helper.getCurrentWeatherByCityName("Seoul", (err, currentWeather) => { | ... | @@ -174,47 +174,56 @@ 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; |
188 | - } | 192 | + } |
189 | - | 193 | + |
190 | - #section{ | 194 | + #section{ |
191 | - position: absolute; | 195 | + position: absolute; |
192 | - margin-left:5%; | 196 | + margin-left:5%; |
193 | - float:left; | 197 | + float:left; |
194 | - width: 40%; | 198 | + width: 40%; |
195 | - height: 90%; | 199 | + height: 90%; |
196 | - } | 200 | + } |
197 | - | 201 | + |
198 | - #container1{ | 202 | + #container1{ |
199 | - float: left; | 203 | + float: left; |
200 | - border: 1px solid white; | 204 | + border: 1px solid white; |
201 | - width: 100%; | 205 | + background-color: orange; |
202 | - height: 90%; | 206 | + width: 100%; |
203 | - } | 207 | + height: 60%; |
204 | - #container2{ | 208 | + } |
205 | - float: left; | 209 | + #container2{ |
206 | - border: 1px solid white; | 210 | + float: left; |
207 | - background-color: rgb(102, 219, 180); | 211 | + border: 1px solid white; |
208 | - width: 100%; | 212 | + background-color: rgb(102, 219, 180); |
209 | - height: 120%; | 213 | + font-weight: bold; |
210 | - } | 214 | + width: 100%; |
211 | - #container3{ | 215 | + height: 100%; |
212 | - float: right; | 216 | + } |
213 | - border: 1px solid white; | 217 | + #container3{ |
214 | - margin-right:5%; | 218 | + float: right; |
215 | - width: 40%; | 219 | + border: 1px solid white; |
216 | - height: 90%; | 220 | + background-color: gainsboro; |
217 | - }`,ccc); | 221 | + margin-right:5%; |
222 | + width: 40%; | ||
223 | + height: 200%; | ||
224 | + | ||
225 | + | ||
226 | + }`,ccc); | ||
218 | res.send(html); | 227 | res.send(html); |
219 | 228 | ||
220 | 229 | ... | ... |
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