diff --git a/app/views/cities/_city.html.erb b/app/views/cities/_city.html.erb index bc7177e..aae338b 100644 --- a/app/views/cities/_city.html.erb +++ b/app/views/cities/_city.html.erb @@ -1,53 +1,126 @@ +
<% if city.latest_weather_art&.image&.attached? %> -
- <%= image_tag city.latest_weather_art.image, - class: "w-full h-full object-cover transform group-hover:scale-105 transition-transform duration-500" %> -
+ +
+ +
+ <%= image_tag city.latest_weather_art.image, + class: "w-full h-full object-cover transform group-hover:scale-105 transition-transform duration-500" %> +
+ + +
+
+ + +
+
+ <%= city.latest_weather_art.temperature %>°C +
+
+ Feels <%= city.latest_weather_art.feeling_temp %>°C +
+
+ +
-

+

<%= city.name %>

-

+

+ + + <%= city.country.name %>, <%= city.region.name %> -

-
-
- <% else %> -
-

<%= city.name %>

-

- <%= city.country.name %>, <%= city.region.name %> -

-
- Lat: <%= city.latitude %> - Long: <%= city.longitude %> +
- <% end %> -
-
-
- - - - - <%= city.timezone %> -
- <% if city.latest_weather_art %> + +
+ +
+
+ + + + <%= city.latest_weather_art.description %> +
<%= city.latest_weather_art.weather_date.strftime("%b %d, %Y") %>
- <% end %> +
+ + +
+
+
Humidity
+
<%= city.latest_weather_art.humidity %>%
+
+
+
Wind
+
<%= city.latest_weather_art.wind_scale %>
+
+
+
Visibility
+
<%= city.latest_weather_art.visibility %>km
+
+
+ + +
+ <%= link_to city_path(city), + class: "btn btn-primary btn-sm gap-2" do %> + View Details + + + + <% end %> +
-
- <%= link_to "View Details", city_path(city), - class: "btn btn-primary btn-sm" %> + <% else %> + +
+

<%= city.name %>

+ +
+ + + + <%= city.country.name %>, <%= city.region.name %> +
+ +
+
+
+ + + + Lat: <%= city.latitude %> +
+
+ + + + Long: <%= city.longitude %> +
+
+
+ +
+ <%= link_to city_path(city), + class: "btn btn-primary btn-sm gap-2" do %> + View Details + + + + <% end %> +
-
+ <% end %>
\ No newline at end of file