From 472eee8e318fc81d143d9453357bf4754ce9ac8d Mon Sep 17 00:00:00 2001 From: Francesc Leveque Date: Mon, 25 May 2026 12:31:43 +0200 Subject: [PATCH] Stack header buttons on mobile so "View radar/portfolio" fits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The single right-aligned row of four buttons (cross-link + Save Image + Share Link + Dashboard) overflowed on narrow viewports — the cross-link in particular fell off the right edge on phones. Split the row into two semantic groups (share / navigation) and let flex stack them on mobile, inline on sm+: - < sm: two rows stacked, right-aligned. Share buttons on top, nav (cross-link + Dashboard) below. - ≥ sm: one row, unchanged visual layout end-to-end. Applied identically to portfolio_live.ex and radar_live.ex so both pages keep parity. Co-Authored-By: Claude Opus 4.7 (1M context) --- lib/pulse_web/live/portfolio_live.ex | 86 ++++++++++++++------------- lib/pulse_web/live/radar_live.ex | 88 +++++++++++++++------------- 2 files changed, 93 insertions(+), 81 deletions(-) diff --git a/lib/pulse_web/live/portfolio_live.ex b/lib/pulse_web/live/portfolio_live.ex index 537c9fe..9458f8d 100644 --- a/lib/pulse_web/live/portfolio_live.ex +++ b/lib/pulse_web/live/portfolio_live.ex @@ -66,46 +66,52 @@ defmodule PulseWeb.PortfolioLive do
- <%!-- Navigation --%> -
- <.link - :if={@has_radar} - navigate={~p"/r/#{@slug}"} - class="btn btn-ghost btn-sm" - > - <.icon name="hero-eye" class="size-4" /> {gettext("View radar")} - - - - <.link navigate="/" class="btn btn-ghost btn-sm"> - <.icon name="hero-arrow-left-micro" class="size-4" /> {gettext("Dashboard")} - + <%!-- Navigation. Two groups (share / navigation) so the header + wraps cleanly on narrow screens: stacked on mobile (share on + top, nav on bottom), inline on sm+. --%> +
+
+ + +
+
+ <.link + :if={@has_radar} + navigate={~p"/r/#{@slug}"} + class="btn btn-ghost btn-sm" + > + <.icon name="hero-eye" class="size-4" /> {gettext("View radar")} + + <.link navigate="/" class="btn btn-ghost btn-sm"> + <.icon name="hero-arrow-left-micro" class="size-4" /> {gettext("Dashboard")} + +
<%!-- Capturable portfolio content --%> diff --git a/lib/pulse_web/live/radar_live.ex b/lib/pulse_web/live/radar_live.ex index e59485a..745f1be 100644 --- a/lib/pulse_web/live/radar_live.ex +++ b/lib/pulse_web/live/radar_live.ex @@ -149,47 +149,53 @@ defmodule PulseWeb.RadarLive do
- <%!-- Navigation: matches PortfolioLive ordering exactly. --%> -
- <.link - :if={@has_portfolio} - navigate={~p"/p/#{@slug}"} - class="btn btn-ghost btn-sm" - > - <.icon name="hero-briefcase" class="size-4" /> - {gettext("View portfolio")} - - - - <.link navigate="/" class="btn btn-ghost btn-sm"> - <.icon name="hero-arrow-left-micro" class="size-4" /> {gettext("Dashboard")} - + <%!-- Navigation: matches PortfolioLive ordering exactly. Two + groups (share / navigation) so the header wraps cleanly on + narrow screens: stacked on mobile, inline on sm+. --%> +
+
+ + +
+
+ <.link + :if={@has_portfolio} + navigate={~p"/p/#{@slug}"} + class="btn btn-ghost btn-sm" + > + <.icon name="hero-briefcase" class="size-4" /> + {gettext("View portfolio")} + + <.link navigate="/" class="btn btn-ghost btn-sm"> + <.icon name="hero-arrow-left-micro" class="size-4" /> {gettext("Dashboard")} + +
<%!-- Capturable card — id="portfolio-capture" so the SaveImage hook