mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-08 04:48:44 +00:00
Add BaseLayout
All pages should be using this.
This commit is contained in:
parent
0d5139489a
commit
4738684f6e
6 changed files with 31 additions and 24 deletions
|
@ -1,21 +1,7 @@
|
|||
@page "/"
|
||||
@using LBPUnion.ProjectLighthouse.Helpers
|
||||
@model LBPUnion.ProjectLighthouse.Controllers.ExternalAuth.LandingPage
|
||||
@model LBPUnion.ProjectLighthouse.Pages.ExternalAuth.LandingPage
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
Layout = "Layouts/BaseLayout";
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Project Lighthouse External Auth</title>
|
||||
</head>
|
||||
<body>
|
||||
test
|
||||
</body>
|
||||
<footer>
|
||||
<p>Page generated by @GitVersionHelper.FullVersion</p>
|
||||
</footer>
|
||||
</html>
|
|
@ -1,10 +1,12 @@
|
|||
using JetBrains.Annotations;
|
||||
using LBPUnion.ProjectLighthouse.Pages.Layouts;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Controllers.ExternalAuth
|
||||
namespace LBPUnion.ProjectLighthouse.Pages.ExternalAuth
|
||||
{
|
||||
public class LandingPage : PageModel
|
||||
public class LandingPage : BaseLayout
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public IActionResult OnGet() => this.Page();
|
||||
}
|
||||
}
|
16
ProjectLighthouse/Pages/Layouts/BaseLayout.cshtml
Normal file
16
ProjectLighthouse/Pages/Layouts/BaseLayout.cshtml
Normal file
|
@ -0,0 +1,16 @@
|
|||
@using LBPUnion.ProjectLighthouse.Helpers
|
||||
@model LBPUnion.ProjectLighthouse.Pages.Layouts.BaseLayout
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Project Lighthouse</title>
|
||||
</head>
|
||||
<body>
|
||||
@RenderBody()
|
||||
</body>
|
||||
<footer>
|
||||
<p>Page generated by @GitVersionHelper.FullVersion</p>
|
||||
</footer>
|
||||
</html>
|
7
ProjectLighthouse/Pages/Layouts/BaseLayout.cshtml.cs
Normal file
7
ProjectLighthouse/Pages/Layouts/BaseLayout.cshtml.cs
Normal file
|
@ -0,0 +1,7 @@
|
|||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Pages.Layouts
|
||||
{
|
||||
public class BaseLayout : PageModel
|
||||
{}
|
||||
}
|
|
@ -32,10 +32,6 @@
|
|||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Controllers\ExternalAuth"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
||||
<Exec Command="git describe --long --always --dirty --exclude=\* --abbrev=8 > "$(ProjectDir)/gitVersion.txt""/>
|
||||
<Exec Command="git branch --show-current > "$(ProjectDir)/gitBranch.txt""/>
|
||||
|
|
|
@ -153,7 +153,7 @@ namespace LBPUnion.ProjectLighthouse
|
|||
|
||||
app.UseRouting();
|
||||
|
||||
// app.UseEndpoints(endpoints => endpoints.MapControllers());
|
||||
app.UseEndpoints(endpoints => endpoints.MapControllers());
|
||||
app.UseEndpoints(endpoints => endpoints.MapRazorPages());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue