Make page titles consistent with application structure

- All existing pages get a nice title
- Suffix is "Music Library"
- Fallback is current request path
This commit is contained in:
Claudio Ortolina
2024-10-15 17:32:59 +01:00
parent cac644e563
commit 69e6cc67a2
2 changed files with 5 additions and 3 deletions
@@ -15,7 +15,9 @@ defmodule MusicLibraryWeb.StatsController do
records_count = Enum.reduce(records_count_by_format, 0, fn {_, count}, acc -> acc + count end)
latest_record = Records.get_latest_record!()
render(conn, :index,
conn
|> assign(:page_title, "Stats")
|> render(:index,
records_count_by_format: records_count_by_format,
records_count_by_type: records_count_by_type,
records_count: records_count,