diff --git a/lib/dotcom_web/components/trip_planner/results.ex b/lib/dotcom_web/components/trip_planner/results.ex index 446ce54886..0a057f156f 100644 --- a/lib/dotcom_web/components/trip_planner/results.ex +++ b/lib/dotcom_web/components/trip_planner/results.ex @@ -12,12 +12,11 @@ defmodule DotcomWeb.Components.TripPlanner.Results do ~H"""
0 && @results.itinerary_group_selection} - class="h-min w-full p-4" + class="h-min w-full mb-3.5" >
-
0} class="w-full p-4 row-start-2 col-start-1"> +
0} class="w-full"> <.itinerary_panel results={@results} />
@@ -35,32 +34,34 @@ defmodule DotcomWeb.Components.TripPlanner.Results do defp itinerary_panel(%{results: %{itinerary_group_selection: nil}} = assigns) do ~H""" -
+
- {summary.tag} -
- <.itinerary_summary summary={summary} /> -
-
0} class="grow text-sm text-grey-dark"> - Similar trips depart at {Enum.map( - summary.next_starts, - &Timex.format!(&1, "%-I:%M", :strftime) - ) - |> Enum.join(", ")} -
- + {summary.tag} +
+ <.itinerary_summary summary={summary} /> +
+
0} class="grow text-sm text-grey-dark"> + Similar trips depart at {Enum.map( + summary.next_starts, + &Timex.format!(&1, "%-I:%M", :strftime) + ) + |> Enum.join(", ")} +
+ +
""" @@ -76,11 +77,9 @@ defmodule DotcomWeb.Components.TripPlanner.Results do } ~H""" -
-
- <.itinerary_summary summary={@summary} /> - <.itinerary_detail results={@results} /> -
+
+ <.itinerary_summary summary={@summary} /> + <.itinerary_detail results={@results} />
""" end diff --git a/lib/dotcom_web/live/trip_planner.ex b/lib/dotcom_web/live/trip_planner.ex index 82c9b65700..a0c09a2dc8 100644 --- a/lib/dotcom_web/live/trip_planner.ex +++ b/lib/dotcom_web/live/trip_planner.ex @@ -67,15 +67,14 @@ defmodule DotcomWeb.Live.TripPlanner do <.input_form changeset={@input_form.changeset} /> <.results_summary changeset={@input_form.changeset} results={@results} />
0 && "md:grid-cols-2", - Enum.count(@results.itinerary_groups) == 0 && "md:grid-cols-1" + "flex flex-col gap-4 md:flex-row md:gap-7" ]}> <.live_component module={MbtaMetro.Live.Map} id="trip-planner-map" class={[ - "h-64 md:h-96 w-full", + "md:order-last", + "h-64 md:h-[32rem] w-full", @results.itinerary_group_selection == nil && "hidden md:block", @results.itinerary_group_selection != nil && "block" ]} @@ -84,7 +83,11 @@ defmodule DotcomWeb.Live.TripPlanner do pins={@map.pins} points={@map.points} /> - <.results class="row-start-1 col-start-1" results={@results} /> + <.results + :if={Enum.count(@results.itinerary_groups) > 0} + class="md:max-w-[25rem]" + results={@results} + />
"""