Skip to content

Commit 276058f

Browse files
committedOct 19, 2024·
Simplify layout
1 parent bf49e7c commit 276058f

15 files changed

+20
-53
lines changed
 

‎src/ZKEACMS.WebHost/Views/Account/Forgotten.cshtml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
@model ZKEACMS.Account.ForgottenViewModel
22
@{
33
this.WorkContext().CurrentPage.Title = ZKEACMS.Version.CurrentVersion + " " + ZKEACMS.Version.Rank;
4-
Layout = Layouts.NormalDefault;
4+
Layout = Layouts.EmptyLayout;
5+
Style.Reqiured("bootStrap").AtHead();
56
Style.Reqiured("Customer").AtHead();
67
Script.Reqiured("validate").AtFoot();
78
}

‎src/ZKEACMS.WebHost/Views/Account/Login.cshtml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
@model ZKEACMS.Common.ViewModels.AdminSignViewModel
22
@{
33
this.WorkContext().CurrentPage.Title = ZKEACMS.Version.CurrentVersion + " " + ZKEACMS.Version.Rank;
4-
Layout = Layouts.NormalDefault;
4+
Layout = Layouts.EmptyLayout;
5+
Style.Reqiured("bootStrap").AtHead();
56
Style.Reqiured("Login").AtHead();
67
Script.Reqiured("validate").AtFoot();
78
}

‎src/ZKEACMS.WebHost/Views/Account/Reset.cshtml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
@model ZKEACMS.Account.ResetViewModel
22
@{
33
this.WorkContext().CurrentPage.Title = ZKEACMS.Version.CurrentVersion + " " + ZKEACMS.Version.Rank;
4-
Layout = Layouts.NormalDefault;
4+
Layout = Layouts.EmptyLayout;
5+
Style.Reqiured("bootStrap").AtHead();
56
Style.Reqiured("Customer").AtHead();
67
Script.Reqiured("validate").AtFoot();
78
}

‎src/ZKEACMS.WebHost/Views/Account/Sended.cshtml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@{
22
this.WorkContext().CurrentPage.Title = ZKEACMS.Version.CurrentVersion + " " + ZKEACMS.Version.Rank;
3-
Layout = Layouts.NormalDefault;
3+
Layout = Layouts.EmptyLayout;
4+
Style.Reqiured("bootStrap").AtHead();
45
Style.Reqiured("Customer").AtHead();
56
Script.Reqiured("validate").AtFoot();
67
string link = "~/";

‎src/ZKEACMS.WebHost/Views/Account/SignIn.cshtml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
@model ZKEACMS.Common.ViewModels.CustomerSignInViewModel
22
@{
33
this.WorkContext().CurrentPage.Title = ZKEACMS.Version.CurrentVersion + " " + ZKEACMS.Version.Rank;
4-
Layout = Layouts.NormalDefault;
4+
Layout = Layouts.EmptyLayout;
5+
Style.Reqiured("bootStrap").AtHead();
56
Style.Reqiured("Customer").AtHead();
67
Script.Reqiured("validate").AtFoot();
78
var returnUrl = ViewBag.ReturnUrl ?? ViewContext.HttpContext.Request.Query["ReturnUrl"];

‎src/ZKEACMS.WebHost/Views/Account/SignUp.cshtml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
@model Easy.Modules.User.Models.UserEntity
22
@{
33
this.WorkContext().CurrentPage.Title = ZKEACMS.Version.CurrentVersion + " " + ZKEACMS.Version.Rank;
4-
Layout = Layouts.NormalDefault;
4+
Layout = Layouts.EmptyLayout;
5+
Style.Reqiured("bootStrap").AtHead();
56
Style.Reqiured("Customer").AtHead();
67
Script.Reqiured("validate").AtFoot();
78
var returnUrl = ViewBag.ReturnUrl ?? ViewContext.HttpContext.Request.Query["ReturnUrl"];

‎src/ZKEACMS.WebHost/Views/Account/SignUpSuccess.cshtml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@{
22
this.WorkContext().CurrentPage.Title = ZKEACMS.Version.CurrentVersion + " " + ZKEACMS.Version.Rank;
3-
Layout = Layouts.NormalDefault;
3+
Layout = Layouts.EmptyLayout;
4+
Style.Reqiured("bootStrap").AtHead();
45
Style.Reqiured("Customer").AtHead();
56
Script.Reqiured("validate").AtFoot();
67
}

‎src/ZKEACMS.WebHost/Views/Error/Forbidden.cshtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@{
22
this.WorkContext().CurrentPage.Title = System.Net.HttpStatusCode.Forbidden.ToString();
3-
Layout = Layouts.Generic;
3+
Layout = Layouts.EmptyLayout;
44
}
55
<div style="text-align: center; height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center;">
66
<img src="~/images/error.png" />

‎src/ZKEACMS.WebHost/Views/Error/Index.cshtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@{
22
this.WorkContext().CurrentPage.Title = ViewContext.HttpContext.Response.StatusCode.ToString();
3-
Layout = Layouts.Generic;
3+
Layout = Layouts.EmptyLayout;
44
}
55
<div style="text-align: center; height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center;">
66
<img src="~/images/error.png" />

‎src/ZKEACMS.WebHost/Views/Error/NotFound.cshtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@{
22
this.WorkContext().CurrentPage.Title = System.Net.HttpStatusCode.NotFound.ToString();
3-
Layout = Layouts.Generic;
3+
Layout = Layouts.EmptyLayout;
44
}
55
<div style="text-align: center; height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center;">
66
<img src="~/images/error.png" />

‎src/ZKEACMS.WebHost/Views/Shared/NotFound.cshtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@{
22
this.WorkContext().CurrentPage.Title = System.Net.HttpStatusCode.NotFound.ToString();
3-
Layout = Layouts.Generic;
3+
Layout = Layouts.EmptyLayout;
44
}
55
<div style="text-align: center; height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center;">
66
<img src="~/images/error.png" />

‎src/ZKEACMS.WebHost/Views/Shared/_EmptyLayout.cshtml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
@await Html.PartialAsync("Partial.PageHeader")
77
</head>
88
<body>
9-
<div>
9+
<main>
1010
@RenderBody()
11-
</div>
11+
</main>
1212
@await Html.PartialAsync("Partial.PageFooter")
1313
</body>
1414
</html>

‎src/ZKEACMS.WebHost/Views/Shared/_LayoutGeneric.cshtml

-15
This file was deleted.

‎src/ZKEACMS.WebHost/Views/Shared/_LayoutNormal.cshtml

-17
This file was deleted.

‎src/ZKEACMS/Constant.cs

-8
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,6 @@ public class Layouts
3333
/// </summary>
3434
public const string Default = "_Layout";
3535
/// <summary>
36-
/// Layout with current theme and body with container.
37-
/// </summary>
38-
public const string NormalDefault = "_LayoutNormal";
39-
/// <summary>
40-
/// Layout with current theme
41-
/// </summary>
42-
public const string Generic = "_LayoutGeneric";
43-
/// <summary>
4436
/// Layout for admin pop up modal
4537
/// </summary>
4638
public const string PopUp = "_PopUpLayout";

0 commit comments

Comments
 (0)
Please sign in to comment.