<%= link_to city_path(@weather_art.city),
class: "btn btn-ghost btn-md gap-2 bg-base-200 hover:bg-base-300 transition-all duration-300 mb-4" do %>
<%= "#{t("button.back_to")} #{@weather_art.city.name}" %>
<% end %>
<%= @weather_art.city.full_name %> Weather Art
<% if @weather_art.city.country.present? && @weather_art.city.country.region.present? %>
<%= link_to cities_path(country: @weather_art.city.country, region: @weather_art.city.country.region), class: "badge badge-lg badge-primary hover:badge-outline transition-all duration-200" do %>
<%= "#{@weather_art.city.country.emoji + " " || ""}#{@weather_art.city.country.localized_name}" %>
<% end %>
<% elsif @weather_art.city.country.present? %>
<%= "#{@weather_art&.city&.country&.emoji + " " || ""}#{@city&.country&.localized_name}" %>
<% end %>
<% if @weather_art.city.country.present? && @weather_art.city.state.present? && @weather_art.city.country.region.present? %>
<%= link_to cities_path(country: @weather_art.city.country, state: @weather_art.city.state, region: @weather_art.city.country.region), class: "badge badge-lg badge-secondary hover:badge-outline transition-all duration-200" do %>
<%= @weather_art.city.state.name %>
<% end %>
<% elsif @weather_art.city.state.present? %>
<%= @weather_art&.city&.state&.name %>
<% end %>
<%= render "shared/wiki_data_badge", city: @weather_art&.city %>
<%= @weather_art.formatted_time(:date) %>
<%= @weather_art.formatted_time(:time, true) %>
<% if @weather_art.image.attached? %>
<% watermarked = @weather_art.webp_image.processed %>
<%= link_to rails_blob_path(watermarked),
data: {
pswp_src: rails_blob_url(watermarked),
pswp_caption: 'Weather Art',
pswp_width: 1792,
pswp_height: 1024
} do %>
<%= image_tag @weather_art.preview_image(:big).processed,
alt: @weather_art.image_alt,
class: "w-full h-auto object-cover transition-transform hover:scale-105 duration-300 ease-in-out" %>
<% end %>
<% end %>
<%= weather_description_icon(@weather_art.description) %>
<%= @weather_art.description %>
<%= render 'weather_stats', weather_art: @weather_art %>
<%= t("title.ai_prompt") %>
<%= @weather_art.prompt %>
<%= render 'shared/city_ai_description', city: @city %>
<%= render 'shared/map', city: @weather_art.city %>
<%#= render 'shared/download_card', weather_art: @weather_art %>
<%= render 'shared/auto_ad' %>
<%
share_title = [
"🎨 Amazing AI Weather Art: #{@weather_art.city.full_name}",
"#{@weather_art.description} at #{@weather_art.temperature}°C",
"#{@weather_art.formatted_time(:all, true)}"
].join("\n")
share_description = [
"Discover this stunning AI-generated weather art!",
"#{@weather_art.description} in #{@weather_art.city.full_name}.",
"Created at #{@weather_art.formatted_time(:time, true)}",
"Visit TodayAIWeather to see more amazing weather art."
].join(" ")
%>
<%= render "shared/share_social",
title: share_title,
description: share_description,
tags: "AIWeather,Art,AIart,Weather,#{format_as_tag(@weather_art.city&.name)},#{format_as_tag(@weather_art.city&.country&.name)},#{format_as_tag(@weather_art.city&.country&.region&.name)},#{format_as_tag(@weather_art.city&.country&.subregion&.name)}",
image: url_for(@weather_art.webp_image.processed)
%>