From 45f05c8bb78178b84283321fb1ae897de3c7d15d Mon Sep 17 00:00:00 2001 From: jamey Date: Mon, 23 Feb 2026 21:23:09 +0000 Subject: [PATCH] add site name separator to shop page titles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All shop pages now render as "Page · Store Name" using live_title suffix. Home stays as "Home · Store Name" for consistency with live navigation. Updated cart test to use regex for whitespace-tolerant title matching. Co-Authored-By: Claude Sonnet 4.6 --- lib/berrypod_web/components/layouts/shop_root.html.heex | 4 +++- test/berrypod_web/live/shop/cart_test.exs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/berrypod_web/components/layouts/shop_root.html.heex b/lib/berrypod_web/components/layouts/shop_root.html.heex index 8fc6f55..0b59dc1 100644 --- a/lib/berrypod_web/components/layouts/shop_root.html.heex +++ b/lib/berrypod_web/components/layouts/shop_root.html.heex @@ -11,7 +11,9 @@ "Welcome to #{@theme_settings.site_name}" } /> - <.live_title>{assigns[:page_title] || @theme_settings.site_name} + <.live_title suffix={" · #{@theme_settings.site_name}"}> + {assigns[:page_title]} + <%= for preload <- Berrypod.Theme.Fonts.preload_links( @theme_settings.typography, diff --git a/test/berrypod_web/live/shop/cart_test.exs b/test/berrypod_web/live/shop/cart_test.exs index a8515e8..be38b18 100644 --- a/test/berrypod_web/live/shop/cart_test.exs +++ b/test/berrypod_web/live/shop/cart_test.exs @@ -112,7 +112,7 @@ defmodule BerrypodWeb.Shop.CartTest do test "page title is Cart", %{conn: conn} do {:ok, _view, html} = live(conn, ~p"/cart") - assert html =~ "Cart" + assert html =~ ~r/Cart\s*·\s*Store Name/ end end end