style: update layout of city show view
- Change stats div to be responsive - Adjust coordinates display format for better readability This update enhances the layout of the city show view by making it more responsive and improving the display of weather and geographical data. Additionally, the startup task for refreshing the sitemap is now consistently executed, removing unnecessary complexity.
This commit is contained in:
parent
c37a93bcdf
commit
742c94ced1
@ -27,7 +27,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="stats bg-base-100/80 backdrop-blur-sm shadow-lg rounded-box">
|
||||
<div class="stats stats-vertical sm:stats-horizontal bg-base-100/80 backdrop-blur-sm shadow-lg rounded-box w-full sm:w-auto">
|
||||
<div class="stat">
|
||||
<div class="stat-title">Latest Weather</div>
|
||||
<div class="stat-value text-2xl">
|
||||
@ -40,7 +40,7 @@
|
||||
<div class="stat">
|
||||
<div class="stat-title">Coordinates</div>
|
||||
<div class="stat-value text-xl">
|
||||
<%= @city.latitude %>°N, <%= @city.longitude %>°E
|
||||
<%= @city.latitude %>°N,<br class="sm:hidden"> <%= @city.longitude %>°E
|
||||
</div>
|
||||
<div class="stat-desc">Geographical Location</div>
|
||||
</div>
|
||||
@ -50,6 +50,8 @@
|
||||
<div class="stat-desc">Total Entries</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,21 +1,4 @@
|
||||
# config/initializers/schedule_tasks.rb
|
||||
Rails.application.config.after_initialize do
|
||||
if Rails.env.production? && !ENV["RAILS_BUILD"]
|
||||
begin
|
||||
redis_key = "startup_task_running"
|
||||
unless Sidekiq.redis { |conn| conn.get(redis_key) }
|
||||
Sidekiq.redis do |conn|
|
||||
conn.setex(redis_key, 1.hour.to_i, "1")
|
||||
end
|
||||
|
||||
RefreshSitemapWorker.perform_async
|
||||
|
||||
Rails.logger.info "Startup task (RefreshSitemapWorker) scheduled successfully"
|
||||
end
|
||||
rescue => e
|
||||
Rails.logger.error "Error scheduling startup task: #{e.message}"
|
||||
ensure
|
||||
Sidekiq.redis { |conn| conn.del(redis_key) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user