<% 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 %> <%= t("button.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 'shared/map', city: @city %>
<%= render 'shared/auto_ad' %>
<%= render 'cities/admin_panel' %>
<% # 构建更吸引人的分享标题 share_title = "🎨 #{@city.full_name}'s Weather Transformed into Art" # 构建更有描述性的分享描述 share_description = [ "Discover this stunning AI-generated weather art!", "in #{@city.full_name}.", "Visit TodayAIWeather to see more amazing weather art." ].join(" ") %> <%= render "shared/share_social", title: share_title, description: share_description, tags: "AIWeather,Art,AIart,Weather,#{@city&.name},#{@city&.country&.name}", image: url_for(@city&.latest_weather_art&.webp_image&.processed) %>

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 %>