Skip to content

Commit 33e5767

Browse files
committed
Updated front page section of the settings page.
1 parent 6fd08d6 commit 33e5767

File tree

1 file changed

+29
-63
lines changed

1 file changed

+29
-63
lines changed

source/DasBlog.Web.UI/Views/Shared/_Admin_FrontPage.cshtml

Lines changed: 29 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -3,85 +3,51 @@
33
@inject IDasBlogSettings dasBlogSettings
44
@model DasBlogSettingsViewModel
55

6-
<div class="form-group row mb-3">
7-
8-
@Html.LabelFor(m => @Model.SiteConfig.FrontPageDayCount, null, new { @class = "col-form-label col-sm-2" })
9-
<div class="col-sm-2">
10-
@Html.TextBoxFor(m => @Model.SiteConfig.FrontPageDayCount, null, new { @class = "form-control col-2" })
11-
</div>
6+
<div class="col-md-2 form-check-inline">
7+
@Html.LabelFor(m => @Model.SiteConfig.FrontPageDayCount, null, new { @class = "col-form-label" })
8+
@Html.TextBoxFor(m => @Model.SiteConfig.FrontPageDayCount, null, new { @class = "form-control" })
129
@Html.ValidationMessageFor(m => m.SiteConfig.FrontPageDayCount, null, new { @class = "text-danger" })
13-
1410
</div>
1511

16-
<div class="form-group row mb-3">
17-
18-
@Html.LabelFor(m => @Model.SiteConfig.FrontPageEntryCount, null, new { @class = "col-form-label col-sm-2" })
19-
<div class="col-sm-2">
20-
@Html.TextBoxFor(m => @Model.SiteConfig.FrontPageEntryCount, null, new { @class = "form-control col-2" })
21-
</div>
12+
<div class="col-md-2 form-check-inline">
13+
@Html.LabelFor(m => @Model.SiteConfig.FrontPageEntryCount, null, new { @class = "col-form-label" })
14+
@Html.TextBoxFor(m => @Model.SiteConfig.FrontPageEntryCount, null, new { @class = "form-control" })
2215
@Html.ValidationMessageFor(m => m.SiteConfig.FrontPageEntryCount, null, new { @class = "text-danger" })
23-
2416
</div>
2517

26-
<div class="form-group row mb-3">
27-
28-
@Html.LabelFor(m => @Model.SiteConfig.EntriesPerPage, null, new { @class = "col-form-label col-sm-2" })
29-
<div class="col-sm-2">
30-
@Html.TextBoxFor(m => @Model.SiteConfig.EntriesPerPage, null, new { @class = "form-control col-2" })
31-
</div>
18+
<div class="col-md-2 form-check-inline">
19+
@Html.LabelFor(m => @Model.SiteConfig.EntriesPerPage, null, new { @class = "col-form-label" })
20+
@Html.TextBoxFor(m => @Model.SiteConfig.EntriesPerPage, null, new { @class = "form-control" })
3221
@Html.ValidationMessageFor(m => m.SiteConfig.EntriesPerPage, null, new { @class = "text-danger" })
33-
3422
</div>
3523

36-
<div class="form-group row mb-3">
37-
38-
@Html.LabelFor(m => @Model.SiteConfig.FrontPageCategory, null, new { @class = "col-form-label col-sm-2" })
39-
<div class="col-sm-5">
40-
@Html.TextBoxFor(m => @Model.SiteConfig.FrontPageCategory, null, new { @class = "form-control sm-10" })
41-
</div>
42-
@Html.ValidationMessageFor(m => m.SiteConfig.FrontPageCategory, null, new { @class = "text-danger" })
43-
44-
</div>
45-
46-
<div class="form-group row mb-3">
47-
48-
@Html.LabelFor(m => @Model.SiteConfig.ContentLookaheadDays, null, new { @class = "col-form-label col-sm-2" })
49-
<div class="col-sm-2">
50-
@Html.TextBoxFor(m => @Model.SiteConfig.ContentLookaheadDays, null, new { @class = "form-control col-2" })
51-
</div>
24+
<div class="col-md-3 form-check-inline">
25+
@Html.LabelFor(m => @Model.SiteConfig.ContentLookaheadDays, null, new { @class = "col-form-label" })
26+
@Html.TextBoxFor(m => @Model.SiteConfig.ContentLookaheadDays, null, new { @class = "form-control" })
5227
@Html.ValidationMessageFor(m => m.SiteConfig.ContentLookaheadDays, null, new { @class = "text-danger" })
53-
5428
</div>
5529

56-
<div class="form-group row mb-3">
30+
<div class="col-md-4 ">
31+
@Html.LabelFor(m => @Model.SiteConfig.FrontPageCategory, null, new { @class = "col-form-label" })
32+
@Html.TextBoxFor(m => @Model.SiteConfig.FrontPageCategory, null, new { @class = "form-control" })
33+
@Html.ValidationMessageFor(m => m.SiteConfig.FrontPageCategory, null, new { @class = "text-danger" })
34+
</div>
5735

58-
@Html.LabelFor(m => @Model.SiteConfig.PostPinnedToHomePage, null, new { @class = "col-form-label col-sm-2" })
59-
60-
<div class="col-sm-3">
61-
@Html.DropDownListFor(n => n.SiteConfig.PostPinnedToHomePage,
36+
<div class="col-mb-5">
37+
@Html.LabelFor(m => @Model.SiteConfig.PostPinnedToHomePage, null, new { @class = "col-form-label" })
38+
@Html.DropDownListFor(n => n.SiteConfig.PostPinnedToHomePage,
6239
new SelectList(new BlogPostListViewModel().Init(Model.Posts), "Id", "Name"),
63-
new { @class = "form-select col-1" })
64-
</div>
65-
66-
40+
new { @class = "form-select" })
6741
@Html.ValidationMessageFor(m => m.SiteConfig.PostPinnedToHomePage, null, new { @class = "text-danger" })
68-
6942
</div>
7043

71-
<div class="form-check row mb-3">
72-
<div class="col-sm-10 offset-sm-2">
73-
<div class="col-sm-2">
74-
@Html.CheckBoxFor(m => @Model.SiteConfig.EnableStartPageCaching, new { @class = "form-check-input" })
75-
</div>
76-
@Html.LabelFor(m => @Model.SiteConfig.EnableStartPageCaching, null, new { @class = "col-check-label col-sm-10" })
44+
<div class="col-mb-6">
45+
<div class="form-check">
46+
@Html.CheckBoxFor(m => @Model.SiteConfig.EnableStartPageCaching, new { @class = "form-check-input" })
47+
@Html.LabelFor(m => @Model.SiteConfig.EnableStartPageCaching, null, new { @class = "form-check-label" })
7748
</div>
78-
</div>
79-
80-
<div class="form-check row mb-3">
81-
<div class="col-sm-10 offset-sm-2">
82-
<div class="col-sm-2">
83-
@Html.CheckBoxFor(m => @Model.SiteConfig.ShowItemSummaryInAggregatedViews, new { @class = "form-check-input" })
84-
</div>
85-
@Html.LabelFor(m => @Model.SiteConfig.ShowItemSummaryInAggregatedViews, null, new { @class = "col-check-label col-sm-10" })
49+
<div class="form-check">
50+
@Html.CheckBoxFor(m => @Model.SiteConfig.ShowItemSummaryInAggregatedViews, new { @class = "form-check-input" })
51+
@Html.LabelFor(m => @Model.SiteConfig.ShowItemSummaryInAggregatedViews, null, new { @class = "form-check-label" })
8652
</div>
87-
</div>
53+
</div>

0 commit comments

Comments
 (0)