Skip to content

Commit 79fead0

Browse files
committed
Small CSS improvements to reflect ASP.NET Core 5 template changes
1 parent 3c27f0a commit 79fead0

File tree

3 files changed

+26
-8
lines changed

3 files changed

+26
-8
lines changed

src/Web/AspNetCoreTemplate.Web/Views/Shared/_Layout.cshtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
@using AspNetCoreTemplate.Common
22
<!DOCTYPE html>
3-
<html>
3+
<html lang="en">
44
<head>
55
<meta charset="utf-8" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>@this.ViewData["Title"] - @GlobalConstants.SystemName</title>
8-
<link href="~/lib/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" asp-append-version="true" />
9-
<link href="~/css/site.min.css" rel="stylesheet" asp-append-version="true" />
8+
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" asp-append-version="true" />
9+
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
1010
</head>
1111
<body>
1212
<header>
@@ -50,7 +50,7 @@
5050

5151
<script src="~/lib/jquery/dist/jquery.min.js" asp-append-version="true"></script>
5252
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js" asp-append-version="true"></script>
53-
<script src="~/lib/jquery-validation-unobtrusive/dist/jquery.validate.unobtrusive.js" asp-append-version="true"></script>
53+
<script src="~/lib/jquery-validation-unobtrusive/dist/jquery.validate.unobtrusive.min.js" asp-append-version="true"></script>
5454
<script src="~/lib/bootstrap/dist/js/bootstrap.min.js" asp-append-version="true"></script>
5555
<script src="~/js/site.min.js" asp-append-version="true"></script>
5656
@await this.RenderSectionAsync("Scripts", required: false)

src/Web/AspNetCoreTemplate.Web/Views/Shared/_LoginPartial.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@if (this.SignInManager.IsSignedIn(this.User))
99
{
1010
<li class="nav-item">
11-
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage">Hello @(this.User.Identity.Name)!</a>
11+
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage">Hello @this.User.Identity.Name!</a>
1212
</li>
1313
if (this.User.IsInRole(GlobalConstants.AdministratorRoleName))
1414
{
@@ -17,7 +17,7 @@
1717
</li>
1818
}
1919
<li class="nav-item">
20-
<form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@(this.Url.Action("Index", "Home", new { area = string.Empty }))">
20+
<form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@this.Url.Action("Index", "Home", new { area = string.Empty })">
2121
<button type="submit" class="nav-link btn btn-link text-dark">Logout</button>
2222
</form>
2323
</li>

src/Web/AspNetCoreTemplate.Web/wwwroot/css/site.css

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,29 @@ a.navbar-brand {
77
word-break: break-all;
88
}
99

10+
/* Provide sufficient contrast against white background */
11+
a {
12+
color: #0366d6;
13+
}
14+
15+
.btn-primary {
16+
color: #fff;
17+
background-color: #1b6ec2;
18+
border-color: #1861ac;
19+
}
20+
21+
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
22+
color: #fff;
23+
background-color: #1b6ec2;
24+
border-color: #1861ac;
25+
}
26+
1027
/* Sticky footer styles
1128
-------------------------------------------------- */
1229
html {
1330
font-size: 14px;
1431
}
32+
1533
@media (min-width: 768px) {
1634
html {
1735
font-size: 16px;
@@ -21,6 +39,7 @@ html {
2139
.border-top {
2240
border-top: 1px solid #e5e5e5;
2341
}
42+
2443
.border-bottom {
2544
border-bottom: 1px solid #e5e5e5;
2645
}
@@ -45,12 +64,11 @@ body {
4564
/* Margin bottom by footer height */
4665
margin-bottom: 60px;
4766
}
67+
4868
.footer {
4969
position: absolute;
5070
bottom: 0;
5171
width: 100%;
5272
white-space: nowrap;
53-
/* Set the fixed height of the footer here */
54-
height: 60px;
5573
line-height: 60px; /* Vertically center the text there */
5674
}

0 commit comments

Comments
 (0)