Ravi Srinivasan
2019-09-11 0442e61cadd99fb09d15f94cfc2861fb4ecc7ab2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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} ℃