mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-01 09:48:37 +00:00
Move servers to LBPU.PL.Servers
This commit is contained in:
parent
545b5a0709
commit
b2ec7eae57
116 changed files with 173 additions and 162 deletions
|
@ -0,0 +1,43 @@
|
|||
#nullable enable
|
||||
using LBPUnion.ProjectLighthouse.Types;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts;
|
||||
|
||||
public class BaseLayout : PageModel
|
||||
{
|
||||
|
||||
public readonly Database Database;
|
||||
|
||||
public readonly List<PageNavigationItem> NavigationItems = new()
|
||||
{
|
||||
new PageNavigationItem("Home", "/", "home"),
|
||||
new PageNavigationItem("Users", "/users/0", "user friends"),
|
||||
new PageNavigationItem("Photos", "/photos/0", "camera"),
|
||||
new PageNavigationItem("Levels", "/slots/0", "certificate"),
|
||||
};
|
||||
|
||||
public readonly List<PageNavigationItem> NavigationItemsRight = new();
|
||||
public string Description = string.Empty;
|
||||
|
||||
public bool IsMobile;
|
||||
|
||||
public bool ShowTitleInPage = true;
|
||||
|
||||
public string Title = string.Empty;
|
||||
|
||||
private User? user;
|
||||
public BaseLayout(Database database)
|
||||
{
|
||||
this.Database = database;
|
||||
}
|
||||
|
||||
public new User? User {
|
||||
get {
|
||||
if (this.user != null) return this.user;
|
||||
|
||||
return this.user = this.Database.UserFromWebRequest(this.Request);
|
||||
}
|
||||
set => this.user = value;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue