extends layout
|
block content
|
.container
|
h2
|
p
|
| OpenShift Weather App
|
br
|
br
|
.row
|
.col-md-3
|
form(method="post", action="get_weather")
|
.form-group
|
label.sr-only(for="city") City Name
|
input.form-control( name="city" type="text" placeholder="Enter City Name (for ex: New York)" required='required')
|
button.btn.btn-success(type="submit") Get Weather
|
if error
|
br
|
.alert.alert-danger #{error}
|
if weather
|
.row
|
.col-md-5
|
p
|
br
|
.panel.panel-primary
|
.panel-heading Weather for: #{weather.name}, #{weather.sys.country}
|
.panel-body
|
p Current Temperature => #{weather.main.temp} ℃, #{weather.weather[0].description}
|
p Humidity => #{weather.main.humidity} %
|
p Min => #{weather.main.temp_min} ℃
|
p Max => #{weather.main.temp_max} ℃
|