2024-11-28 10:11:04 -05:00
|
|
|
|
<%= link_to trip, class: "block hover:shadow-lg rounded-lg" do %>
|
|
|
|
|
|
<div class="card bg-base-200 shadow-xl hover:shadow-2xl transition-shadow duration-200" data-trip-id="<%= trip.id %>" id="trip-<%= trip.id %>">
|
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
|
<h2 class="card-title justify-center">
|
|
|
|
|
|
<span class="hover:underline"><%= trip.name %></span>
|
|
|
|
|
|
</h2>
|
|
|
|
|
|
<p class="text-sm text-gray-600 text-center">
|
|
|
|
|
|
<%= "#{human_date(trip.started_at)} – #{human_date(trip.ended_at)}, #{trip.distance} #{DISTANCE_UNIT}" %>
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
<div style="width: 100%; aspect-ratio: 1/1;"
|
|
|
|
|
|
id="map-<%= trip.id %>"
|
2024-12-01 14:34:39 -05:00
|
|
|
|
class="rounded-lg z-0"
|
2024-11-28 10:11:04 -05:00
|
|
|
|
data-controller="trip-map"
|
|
|
|
|
|
data-trip-map-trip-id-value="<%= trip.id %>"
|
2025-01-24 09:19:05 -05:00
|
|
|
|
data-trip-map-path-value="<%= trip.path.to_json %>"
|
2024-11-28 10:11:04 -05:00
|
|
|
|
data-trip-map-api-key-value="<%= current_user.api_key %>"
|
|
|
|
|
|
data-trip-map-user-settings-value="<%= current_user.settings.to_json %>"
|
|
|
|
|
|
data-trip-map-timezone-value="<%= Rails.configuration.time_zone %>"
|
|
|
|
|
|
data-trip-map-distance-unit-value="<%= DISTANCE_UNIT %>">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<% end %>
|