<% featured_art = WeatherArt.includes(:city).joins(:image_attachment).order(created_at: :desc).first %>
<% if featured_art&.image&.attached? %>
<%= image_tag featured_art.image, class: "w-full h-full object-cover object-center" %>
<% end %>

Explore Cities

Discover AI-generated weather art from cities around the world

<% if featured_art %>
Latest from <%= featured_art.city.name %>, <%= featured_art.city.country.name %> <%= featured_art.weather_date.strftime("%B %d, %Y") %>
<% end %>
<% if @current_region %> <% end %>
<%= @cities.count %> <%= 'city'.pluralize(@cities.count) %> <% if @current_country %> in <%= @current_country.name %> <% elsif @current_region %> in <%= @current_region.name %> <% end %>
<%= render partial: 'city', collection: @cities %>
<%= render 'shared/pagination', collection: @cities, collection_name: 'cities' %>