<% if @city.latest_weather_art&.image&.attached? %>
<%= image_tag @city.latest_weather_art.webp_image.processed, class: "w-full h-full object-cover object-center" %>
<% end %>
<%= link_to cities_path, class: "inline-flex items-center btn btn-ghost gap-2 " do %> Back to Cities <% end %>

<%= @city.localized_name %>

<%= "#{@city&.country&.emoji + " " || ""}#{@city&.country&.name}" %>
<%= @city&.state&.name %>
<%= render partial: 'cities/stat_card', collection: [ { icon: 'temperature', title: 'Latest Weather', value: "#{@city.latest_weather_art&.temperature}°C", desc: @city.latest_weather_art&.description }, { icon: 'location', title: 'Coordinates', value: "#{@city.latitude}°N, #{@city.longitude}°E", desc: 'Geographical Location' }, { icon: 'history', title: 'Records', value: @city.weather_arts.count, desc: 'Total Weather Arts' } ], as: :stat %>
<%= render 'cities/map', city: @city %> <%= render 'cities/admin_panel' %>

Weather Art History

Last Updated: <%= time_ago_in_words(@city.last_weather_fetch) if @city.last_weather_fetch %>
<%= render partial: 'weather_arts/card', collection: @arts, as: :weather_art %>