diff --git a/app/views/arts/index.html.erb b/app/views/arts/index.html.erb index d1fc094..466c7aa 100644 --- a/app/views/arts/index.html.erb +++ b/app/views/arts/index.html.erb @@ -7,7 +7,9 @@ <% if featured_art&.image&.attached? %>
<% begin %> + <% alt_text = "#{art.city.full_name} Weather Art - at #{art.temperature}°C on #{art.formatted_time(:date)}" %> <%= image_tag featured_art.webp_image.processed, + alt: alt_text, class: "w-full h-full object-cover" %> <% rescue StandardError => e %> <% Rails.logger.error("image load error: #{e.message}") if defined?(Rails) %> @@ -112,7 +114,9 @@
<% if art.image.attached? %> <% begin %> + <% alt_text = "#{art.city.full_name} Weather Art - at #{art.temperature}°C on #{art.formatted_time(:date)}" %> <%= image_tag art.preview_image.processed, + alt: alt_text, class: "w-full h-full object-cover transform group-hover:scale-105 transition-transform duration-500" %> <% rescue StandardError => e %>
diff --git a/app/views/weather_arts/show.html.erb b/app/views/weather_arts/show.html.erb index b1644c3..7491dda 100644 --- a/app/views/weather_arts/show.html.erb +++ b/app/views/weather_arts/show.html.erb @@ -46,6 +46,7 @@