diff --git a/ProjectLighthouse/Pages/Layouts/BaseLayout.cshtml b/ProjectLighthouse/Pages/Layouts/BaseLayout.cshtml index 6dc55c22..a025f24b 100644 --- a/ProjectLighthouse/Pages/Layouts/BaseLayout.cshtml +++ b/ProjectLighthouse/Pages/Layouts/BaseLayout.cshtml @@ -6,8 +6,8 @@ @{ if (Model!.User == null) { - Model.NavigationItems.Add(new PageNavigationItem("Log in", "/login", "user alternate")); - Model.NavigationItems.Add(new PageNavigationItem("Register", "/register", "user alternate edit")); + Model.NavigationItemsRight.Add(new PageNavigationItem("Log in", "/login", "user alternate")); + Model.NavigationItemsRight.Add(new PageNavigationItem("Register", "/register", "user alternate edit")); } else { @@ -15,7 +15,8 @@ { Model.NavigationItems.Add(new PageNavigationItem("Authentication", "/authentication", "key")); } - Model.NavigationItems.Add(new PageNavigationItem("Log out", "/logout", "user alternate slash")); // should always be last + Model.NavigationItemsRight.Add(new PageNavigationItem("Profile", "/user/" + Model.User.UserId, "user alternate")); + Model.NavigationItemsRight.Add(new PageNavigationItem("Log out", "/logout", "user alternate slash")); // should always be last } } @@ -40,6 +41,18 @@ @navigationItem.Name } + diff --git a/ProjectLighthouse/Pages/Layouts/BaseLayout.cshtml.cs b/ProjectLighthouse/Pages/Layouts/BaseLayout.cshtml.cs index 3d3fbcc2..9ebe8b9f 100644 --- a/ProjectLighthouse/Pages/Layouts/BaseLayout.cshtml.cs +++ b/ProjectLighthouse/Pages/Layouts/BaseLayout.cshtml.cs @@ -31,5 +31,8 @@ namespace LBPUnion.ProjectLighthouse.Pages.Layouts new PageNavigationItem("Photos", "/photos/0", "camera"), }; + public readonly List NavigationItemsRight = new() + {}; + } } \ No newline at end of file