Skip to content

Commit ea845d7

Browse files
committed
Footer always at the bottom of the page
1 parent d89df2c commit ea845d7

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

Diff for: src/LinkDotNet.Blog.Web/Features/Home/Components/Footer.razor

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
@inject AppConfiguration appConfiguration
22

3-
<div class="py-4">
4-
<footer class="text-center container">
5-
<span class="py-2 mb-0 text-muted"@DateTime.Now.Year @CopyrightName</span>
6-
</footer>
7-
</div>
3+
<footer id="footer" class="text-center">
4+
<span class="py-2 mb-0 text-muted"@DateTime.Now.Year @CopyrightName</span>
5+
</footer>
86
@code {
97
private string CopyrightName => appConfiguration.IsAboutMeEnabled
108
? appConfiguration.ProfileInformation.Name
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#footer {
2+
position: absolute;
3+
bottom: 0;
4+
width: 100%;
5+
height: 2.5rem;
6+
}

Diff for: src/LinkDotNet.Blog.Web/Features/Home/Components/MainLayout.razor

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
@inherits LayoutComponentBase
33

44
<BlazoredToasts Position="ToastPosition.BottomRight" />
5-
<div class="position-relative">
5+
<div class="position-relative min-vh-100">
66
<NavMenu/>
77

8-
<main>
8+
<main class="py-4">
99
@Body
1010
</main>
11-
</div>
12-
<Footer></Footer>
11+
<Footer></Footer>
12+
</div>

0 commit comments

Comments
 (0)