commit | author | age
|
d0d409
|
1 |
extends layout |
RS |
2 |
block content |
|
3 |
.container |
|
4 |
h2 |
|
5 |
p |
|
6 |
| OpenShift Weather App |
|
7 |
br |
|
8 |
br |
|
9 |
.row |
|
10 |
.col-md-3 |
|
11 |
form(method="post", action="get_weather") |
|
12 |
.form-group |
|
13 |
label.sr-only(for="city") City Name |
|
14 |
input.form-control( name="city" type="text" placeholder="Enter City Name (for ex: New York)" required='required') |
|
15 |
button.btn.btn-success(type="submit") Get Weather |
|
16 |
if error |
|
17 |
br |
|
18 |
.alert.alert-danger #{error} |
|
19 |
if weather |
|
20 |
.row |
|
21 |
.col-md-5 |
|
22 |
p |
|
23 |
br |
|
24 |
.panel.panel-primary |
|
25 |
.panel-heading Weather for: #{weather.name}, #{weather.sys.country} |
|
26 |
.panel-body |
|
27 |
p Current Temperature => #{weather.main.temp} ℃, #{weather.weather[0].description} |
|
28 |
p Humidity => #{weather.main.humidity} % |
|
29 |
p Min => #{weather.main.temp_min} ℃ |
|
30 |
p Max => #{weather.main.temp_max} ℃ |