mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
28 lines
1.1 KiB
Text
28 lines
1.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>
|
|
|
|
<canvas id="distance-chart-<%= stat.id %>"
|
|
data-daily-distance="<%= stat.daily_distance %>"
|
|
data-distance-type="monthly"
|
|
data-title="<%= Date::MONTHNAMES[stat.month] %> <%= stat.year %>"
|
|
data-y-axis-title="Distance"
|
|
suffix: " <%= current_user.safe_settings.distance_unit %>",
|
|
data-user-settings="<%= current_user.safe_settings.default_settings.to_json %>"></canvas>
|
|
</div>
|