-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix excess margin on mobile for activity show
- Loading branch information
Showing
1 changed file
with
54 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,68 @@ | ||
<div class="container-dashboard container pt-4 pb-8"> | ||
<div class="col-md-8 offset-md-2 col-lg-6 offset-lg-3"> | ||
<div class="card overflow-hidden"> | ||
<div class="row no-gutters"> | ||
<div class="col-12"> | ||
<div class="card-body"> | ||
<div class="row align-items-center"> | ||
<div class="col-auto"> | ||
<%= live_component(SqueezeWeb.AvatarComponent, user: @current_user, size: "lg") %> | ||
</div> | ||
<div class="col ml--2"> | ||
<h1 class="h3 mb-0"><%= @activity.name %></h1> | ||
<p class="text-sm text-muted mb-0"> | ||
<%= date(assigns) %> · <%= @activity.type %> | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<div class="row pt-4"> | ||
<div class="col-3"> | ||
<h5 class="card-title text-uppercase text-muted mb-0">Distance</h5> | ||
<span class="h2 font-weight-bold mb-0"><%= format_distance(@activity.distance, @current_user.user_prefs) %></span> | ||
</div> | ||
|
||
<div class="col-3"> | ||
<h5 class="card-title text-uppercase text-muted mb-0">Time</h5> | ||
<span class="h2 font-weight-bold mb-0"><%= format_duration(@activity.duration) %></span> | ||
<div class="row"> | ||
<div class="col-md-8 offset-md-2 col-lg-6 offset-lg-3"> | ||
<div class="card overflow-hidden"> | ||
<div class="row no-gutters"> | ||
<div class="col-12"> | ||
<div class="card-body"> | ||
<div class="row align-items-center"> | ||
<div class="col-auto"> | ||
<%= live_component(SqueezeWeb.AvatarComponent, user: @current_user, size: "lg") %> | ||
</div> | ||
<div class="col ml--2"> | ||
<h1 class="h3 mb-0"><%= @activity.name %></h1> | ||
<p class="text-sm text-muted mb-0"> | ||
<%= date(assigns) %> · <%= @activity.type %> | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<%= if show_pace?(assigns) do %> | ||
<div class="col-3"> | ||
<h5 class="card-title text-uppercase text-muted mb-0">Pace</h5> | ||
<span class="h2 font-weight-bold mb-0"> | ||
<%= format_pace(@activity, @current_user.user_prefs) %> | ||
</span> | ||
<div class="row pt-4"> | ||
<div class="mb-3 col-4 col-md-3"> | ||
<h5 class="card-title text-uppercase text-muted mb-0">Distance</h5> | ||
<span class="h2 font-weight-bold mb-0"><%= format_distance(@activity.distance, @current_user.user_prefs) %></span> | ||
</div> | ||
<% end %> | ||
|
||
<%= if @activity.elevation_gain > 0 do %> | ||
<div class="col-3"> | ||
<h5 class="card-title text-uppercase text-muted mb-0">Elevation</h5> | ||
<span class="h2 font-weight-bold mb-0"> | ||
<%= elevation(assigns) %> | ||
</span> | ||
<div class="col-4 col-md-3"> | ||
<h5 class="card-title text-uppercase text-muted mb-0">Time</h5> | ||
<span class="h2 font-weight-bold mb-0"><%= format_duration(@activity.duration) %></span> | ||
</div> | ||
<% end %> | ||
|
||
<%= if show_pace?(assigns) do %> | ||
<div class="col-4 col-md-3"> | ||
<h5 class="card-title text-uppercase text-muted mb-0">Pace</h5> | ||
<span class="h2 font-weight-bold mb-0"> | ||
<%= format_pace(@activity, @current_user.user_prefs) %> | ||
</span> | ||
</div> | ||
<% end %> | ||
|
||
<%= if @activity.elevation_gain > 0 do %> | ||
<div class="col-4 col-md-3"> | ||
<h5 class="card-title text-uppercase text-muted mb-0">Elevation</h5> | ||
<span class="h2 font-weight-bold mb-0"> | ||
<%= elevation(assigns) %> | ||
</span> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="col-12"> | ||
<%= if show_map?(assigns) do %> | ||
<div id="activity-map" | ||
class="activity-map" | ||
phx-hook="ActivityMap" | ||
phx-update="ignore" | ||
> | ||
</div> | ||
<% end %> | ||
<div class="col-12"> | ||
<%= if show_map?(assigns) do %> | ||
<div id="activity-map" | ||
class="activity-map" | ||
phx-hook="ActivityMap" | ||
phx-update="ignore" | ||
> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<%= live_component(SqueezeWeb.ActivityLive.LapsComponent, user: @current_user, activity: @activity) %> | ||
<%= live_component(SqueezeWeb.ActivityLive.LapsComponent, user: @current_user, activity: @activity) %> | ||
</div> | ||
</div> | ||
</div> |