From 0453e97897010e9a1c319f0d87ec77d0d0b2acac Mon Sep 17 00:00:00 2001 From: Owen Date: Thu, 5 Nov 2026 15:52:56 +0100 Subject: [PATCH] update navbar and footer links - point Puzzle Search at the endgames list - list the signed-in username after Settings and Log out - replace the footer's landing anchors with privacy and terms links - align the landing-page test with the new footer --- lib/chesstrainer_web/components/layouts.ex | 12 +++++------- .../controllers/page_controller_test.exs | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/lib/chesstrainer_web/components/layouts.ex b/lib/chesstrainer_web/components/layouts.ex index 5361b44..0c7f425 100644 --- a/lib/chesstrainer_web/components/layouts.ex +++ b/lib/chesstrainer_web/components/layouts.ex @@ -110,7 +110,7 @@ defmodule ChesstrainerWeb.Layouts do defp nav_links(scope) do marketing = [ - %{label: "Puzzle Search", href: "/#puzzles"} + %{label: "Puzzle Search", href: "/endgames"} ] admin = @@ -124,9 +124,9 @@ defmodule ChesstrainerWeb.Layouts do case scope do %{user: %{username: username}} -> [ - %{label: username, kind: :text}, %{label: "Settings", href: ~p"/users/settings"}, - %{label: "Log out", href: ~p"/users/log-out", method: "delete"} + %{label: "Log out", href: ~p"/users/log-out", method: "delete"}, + %{label: username, kind: :text} ] _ -> @@ -167,10 +167,8 @@ defmodule ChesstrainerWeb.Layouts do © {@year} Lucid Chess diff --git a/test/chesstrainer_web/controllers/page_controller_test.exs b/test/chesstrainer_web/controllers/page_controller_test.exs index 0eadcaf..b3f5c8e 100644 --- a/test/chesstrainer_web/controllers/page_controller_test.exs +++ b/test/chesstrainer_web/controllers/page_controller_test.exs @@ -49,8 +49,8 @@ defmodule ChesstrainerWeb.PageControllerTest do assert html =~ "Learn to see the" assert html =~ "LUCID" - assert html =~ "Method" - assert html =~ "Puzzles" + assert html =~ "Privacy Policy" + assert html =~ "/#terms-conditions" assert html =~ "Start training" assert html =~ ~s(id="nav-links") assert html =~ "menu-button"