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
This commit is contained in:
2026-11-05 15:52:56 +01:00
parent 1b44dae378
commit 0453e97897
2 changed files with 7 additions and 9 deletions
+5 -7
View File
@@ -110,7 +110,7 @@ defmodule ChesstrainerWeb.Layouts do
defp nav_links(scope) do defp nav_links(scope) do
marketing = [ marketing = [
%{label: "Puzzle Search", href: "/#puzzles"} %{label: "Puzzle Search", href: "/endgames"}
] ]
admin = admin =
@@ -124,9 +124,9 @@ defmodule ChesstrainerWeb.Layouts do
case scope do case scope do
%{user: %{username: username}} -> %{user: %{username: username}} ->
[ [
%{label: username, kind: :text},
%{label: "Settings", href: ~p"/users/settings"}, %{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
</div> </div>
<nav class="footer-links" aria-label="Footer"> <nav class="footer-links" aria-label="Footer">
<a href="/#method">Method</a> <a href="/#privacy">Privacy Policy</a>
<a href="/#puzzles">Puzzles</a> <a href="/#terms-conditions">Terms & Conditions</a>
<a href="/#progress">Progress</a>
<a href={~p"/endgames"}>Endgames</a>
</nav> </nav>
<small>© {@year} Lucid Chess</small> <small>© {@year} Lucid Chess</small>
@@ -49,8 +49,8 @@ defmodule ChesstrainerWeb.PageControllerTest do
assert html =~ "Learn to see the" assert html =~ "Learn to see the"
assert html =~ "LUCID" assert html =~ "LUCID"
assert html =~ "Method" assert html =~ "Privacy Policy"
assert html =~ "Puzzles" assert html =~ "/#terms-conditions"
assert html =~ "Start training" assert html =~ "Start training"
assert html =~ ~s(id="nav-links") assert html =~ ~s(id="nav-links")
assert html =~ "menu-button" assert html =~ "menu-button"