today_ai_weather/app/views/weather_arts/_weather_stats.html.erb
songtianlun bd42833953 feat: add translatable name module for countries and regions
- Introduced `TranslatableName` module to allow for
  localized names for `Country` and `Region` models.
- Updated views to display `localized_name` instead of
  `name` for improved internationalization.
- Refactored JSON serialization for `translations` attribute.
- Enhanced localization support by adding new languages:
  Japanese and Korean, with updated locale files.
- Removed outdated English and Chinese locales for countries
  and regions to clean up the codebase.
2025-02-21 23:46:25 +08:00

37 lines
1.9 KiB
Plaintext

<%# Partial _weather_stats.html.erb %>
<div class="stat bg-gradient-to-br from-primary/10 to-primary/20 hover:from-primary hover:to-primary/30 p-4 rounded-lg">
<div class="stat-title font-medium text-base"><%= t("card.temperature") %></div>
<div class="stat-value text-3xl"><%= weather_art.temperature %>°C</div>
<div class="stat-desc"><%= t("card.feel_like") %> <%= weather_art.feeling_temp %>°C</div>
</div>
<div class="stat bg-gradient-to-br from-secondary/10 to-secondary/20 hover:from-secondary hover:to-secondary/30 p-4 rounded-lg">
<div class="stat-title font-medium text-base"><%= t("card.wind") %></div>
<div class="stat-value text-3xl"><%= weather_art.wind_scale %></div>
<div class="stat-desc"><%= weather_art.wind_speed %> km/h</div>
</div>
<div class="stat bg-base-300 hover:bg-base-400 p-4 rounded-lg">
<div class="stat-title font-medium text-base"><%= t("card.humidity") %></div>
<div class="stat-value text-3xl"><%= weather_art.humidity %>%</div>
<div class="stat-desc"><%= t("card.relative_humidity") %></div>
</div>
<div class="stat bg-base-300 hover:bg-base-400 p-4 rounded-lg">
<div class="stat-title font-medium text-base"><%= t("card.visibility") %></div>
<div class="stat-value text-3xl"><%= weather_art.visibility %> km</div>
<div class="stat-desc"><%= t("card.clear_view_distance") %></div>
</div>
<div class="stat bg-accent/10 hover:bg-accent p-4 rounded-lg">
<div class="stat-title font-medium text-base"><%= t("card.pressure") %></div>
<div class="stat-value text-3xl"><%= weather_art.pressure %> hPa</div>
<div class="stat-desc"><%= t("card.atmospheric_pressure") %></div>
</div>
<div class="stat bg-base-200 hover:bg-base-100 p-4 rounded-lg">
<div class="stat-title font-medium text-base"><%= t("card.cloud_cover") %></div>
<div class="stat-value text-3xl"><%= weather_art.cloud %>%</div>
<div class="stat-desc"><%= t("card.sky_coverage") %></div>
</div>