Explore Cities

Discover AI-generated weather art from cities around the world

<%= link_to "All Regions", cities_path, class: "btn btn-outline #{'btn-primary' unless @current_region}" %> <% @regions.each do |region| %> <%= link_to region.name, cities_path(region: region.slug), class: "btn btn-outline #{'btn-primary' if @current_region == region}" %> <% end %>
<% if @current_region %>
<%= link_to "All Countries in #{@current_region.name}", cities_path(region: @current_region.slug), class: "btn btn-sm btn-ghost #{'btn-active' unless @current_country}" %> <% @current_region.countries.order(:name).each do |country| %> <%= link_to country.name, cities_path(region: @current_region.slug, country: country.slug), class: "btn btn-sm btn-ghost #{'btn-active' if @current_country == country}" %> <% end %>
<% end %>
<% @cities.each do |city| %>
<% 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" %>

<%= 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.weather_date.strftime("%b %d, %Y") %>
<% end %>
<%= link_to "View Details", city_path(city), class: "btn btn-primary btn-sm" %>
<% end %>