mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
30 lines
1 KiB
Text
30 lines
1 KiB
Text
<div class="border border-gray-500 rounded-md border-opacity-30 bg-gray-100 dark:bg-gray-800 p-3">
|
|
<div class="flex justify-between">
|
|
<h4 class="stat-title text-left"><%= Date::MONTHNAMES[stat.month] %> <%= stat.year %></h4>
|
|
|
|
<div class="flex items-center space-x-2">
|
|
<%= link_to "Details", points_path(year: stat.year, month: stat.month),
|
|
class: "link link-primary" %>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="flex">
|
|
<div class="stat-value">
|
|
<p><%= number_with_delimiter stat.distance_in_unit(current_user.safe_settings.distance_unit).round %><%= current_user.safe_settings.distance_unit %></p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="stat-desc">
|
|
<%= countries_and_cities_stat_for_month(stat) %>
|
|
</div>
|
|
|
|
<%= area_chart(
|
|
stat.daily_distance.map { |day, distance_meters|
|
|
[day, Stat.convert_distance(distance_meters, current_user.safe_settings.distance_unit).round]
|
|
},
|
|
height: '200px',
|
|
suffix: " #{current_user.safe_settings.distance_unit}",
|
|
xtitle: 'Day',
|
|
ytitle: 'Distance'
|
|
) %>
|
|
</div>
|