Skip to content

Commit

Permalink
Simplify layout
Browse files Browse the repository at this point in the history
  • Loading branch information
SeriaWei committed Oct 19, 2024
1 parent bf49e7c commit 276058f
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 53 deletions.
3 changes: 2 additions & 1 deletion src/ZKEACMS.WebHost/Views/Account/Forgotten.cshtml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@model ZKEACMS.Account.ForgottenViewModel
@{
this.WorkContext().CurrentPage.Title = ZKEACMS.Version.CurrentVersion + " " + ZKEACMS.Version.Rank;
Layout = Layouts.NormalDefault;
Layout = Layouts.EmptyLayout;
Style.Reqiured("bootStrap").AtHead();
Style.Reqiured("Customer").AtHead();
Script.Reqiured("validate").AtFoot();
}
Expand Down
3 changes: 2 additions & 1 deletion src/ZKEACMS.WebHost/Views/Account/Login.cshtml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@model ZKEACMS.Common.ViewModels.AdminSignViewModel
@{
this.WorkContext().CurrentPage.Title = ZKEACMS.Version.CurrentVersion + " " + ZKEACMS.Version.Rank;
Layout = Layouts.NormalDefault;
Layout = Layouts.EmptyLayout;
Style.Reqiured("bootStrap").AtHead();
Style.Reqiured("Login").AtHead();
Script.Reqiured("validate").AtFoot();
}
Expand Down
3 changes: 2 additions & 1 deletion src/ZKEACMS.WebHost/Views/Account/Reset.cshtml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@model ZKEACMS.Account.ResetViewModel
@{
this.WorkContext().CurrentPage.Title = ZKEACMS.Version.CurrentVersion + " " + ZKEACMS.Version.Rank;
Layout = Layouts.NormalDefault;
Layout = Layouts.EmptyLayout;
Style.Reqiured("bootStrap").AtHead();
Style.Reqiured("Customer").AtHead();
Script.Reqiured("validate").AtFoot();
}
Expand Down
3 changes: 2 additions & 1 deletion src/ZKEACMS.WebHost/Views/Account/Sended.cshtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@{
this.WorkContext().CurrentPage.Title = ZKEACMS.Version.CurrentVersion + " " + ZKEACMS.Version.Rank;
Layout = Layouts.NormalDefault;
Layout = Layouts.EmptyLayout;
Style.Reqiured("bootStrap").AtHead();
Style.Reqiured("Customer").AtHead();
Script.Reqiured("validate").AtFoot();
string link = "~/";
Expand Down
3 changes: 2 additions & 1 deletion src/ZKEACMS.WebHost/Views/Account/SignIn.cshtml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@model ZKEACMS.Common.ViewModels.CustomerSignInViewModel
@{
this.WorkContext().CurrentPage.Title = ZKEACMS.Version.CurrentVersion + " " + ZKEACMS.Version.Rank;
Layout = Layouts.NormalDefault;
Layout = Layouts.EmptyLayout;
Style.Reqiured("bootStrap").AtHead();
Style.Reqiured("Customer").AtHead();
Script.Reqiured("validate").AtFoot();
var returnUrl = ViewBag.ReturnUrl ?? ViewContext.HttpContext.Request.Query["ReturnUrl"];
Expand Down
3 changes: 2 additions & 1 deletion src/ZKEACMS.WebHost/Views/Account/SignUp.cshtml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@model Easy.Modules.User.Models.UserEntity
@{
this.WorkContext().CurrentPage.Title = ZKEACMS.Version.CurrentVersion + " " + ZKEACMS.Version.Rank;
Layout = Layouts.NormalDefault;
Layout = Layouts.EmptyLayout;
Style.Reqiured("bootStrap").AtHead();
Style.Reqiured("Customer").AtHead();
Script.Reqiured("validate").AtFoot();
var returnUrl = ViewBag.ReturnUrl ?? ViewContext.HttpContext.Request.Query["ReturnUrl"];
Expand Down
3 changes: 2 additions & 1 deletion src/ZKEACMS.WebHost/Views/Account/SignUpSuccess.cshtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@{
this.WorkContext().CurrentPage.Title = ZKEACMS.Version.CurrentVersion + " " + ZKEACMS.Version.Rank;
Layout = Layouts.NormalDefault;
Layout = Layouts.EmptyLayout;
Style.Reqiured("bootStrap").AtHead();
Style.Reqiured("Customer").AtHead();
Script.Reqiured("validate").AtFoot();
}
Expand Down
2 changes: 1 addition & 1 deletion src/ZKEACMS.WebHost/Views/Error/Forbidden.cshtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@{
this.WorkContext().CurrentPage.Title = System.Net.HttpStatusCode.Forbidden.ToString();
Layout = Layouts.Generic;
Layout = Layouts.EmptyLayout;
}
<div style="text-align: center; height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center;">
<img src="~/images/error.png" />
Expand Down
2 changes: 1 addition & 1 deletion src/ZKEACMS.WebHost/Views/Error/Index.cshtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@{
this.WorkContext().CurrentPage.Title = ViewContext.HttpContext.Response.StatusCode.ToString();
Layout = Layouts.Generic;
Layout = Layouts.EmptyLayout;
}
<div style="text-align: center; height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center;">
<img src="~/images/error.png" />
Expand Down
2 changes: 1 addition & 1 deletion src/ZKEACMS.WebHost/Views/Error/NotFound.cshtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@{
this.WorkContext().CurrentPage.Title = System.Net.HttpStatusCode.NotFound.ToString();
Layout = Layouts.Generic;
Layout = Layouts.EmptyLayout;
}
<div style="text-align: center; height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center;">
<img src="~/images/error.png" />
Expand Down
2 changes: 1 addition & 1 deletion src/ZKEACMS.WebHost/Views/Shared/NotFound.cshtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@{
this.WorkContext().CurrentPage.Title = System.Net.HttpStatusCode.NotFound.ToString();
Layout = Layouts.Generic;
Layout = Layouts.EmptyLayout;
}
<div style="text-align: center; height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center;">
<img src="~/images/error.png" />
Expand Down
4 changes: 2 additions & 2 deletions src/ZKEACMS.WebHost/Views/Shared/_EmptyLayout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
@await Html.PartialAsync("Partial.PageHeader")
</head>
<body>
<div>
<main>
@RenderBody()
</div>
</main>
@await Html.PartialAsync("Partial.PageFooter")
</body>
</html>
15 changes: 0 additions & 15 deletions src/ZKEACMS.WebHost/Views/Shared/_LayoutGeneric.cshtml

This file was deleted.

17 changes: 0 additions & 17 deletions src/ZKEACMS.WebHost/Views/Shared/_LayoutNormal.cshtml

This file was deleted.

8 changes: 0 additions & 8 deletions src/ZKEACMS/Constant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@ public class Layouts
/// </summary>
public const string Default = "_Layout";
/// <summary>
/// Layout with current theme and body with container.
/// </summary>
public const string NormalDefault = "_LayoutNormal";
/// <summary>
/// Layout with current theme
/// </summary>
public const string Generic = "_LayoutGeneric";
/// <summary>
/// Layout for admin pop up modal
/// </summary>
public const string PopUp = "_PopUpLayout";
Expand Down

0 comments on commit 276058f

Please sign in to comment.