Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Identity.API/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<link rel="icon" type="image/x-icon" href="favicon.png">
<link rel="shortcut icon" type="image/x-icon" href="~/favicon.png" />

<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/lib/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/site.css" />
</head>
<body>
Expand Down Expand Up @@ -43,8 +43,8 @@
</div>
</footer>

<script src="~/lib/jquery/dist/jquery.slim.min.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="~/lib/jquery/jquery.slim.min.js"></script>
<script src="~/lib/bootstrap/js/bootstrap.bundle.min.js"></script>

@RenderSection("scripts", required: false)
</body>
Expand Down
24 changes: 18 additions & 6 deletions src/WebApp/Components/Layout/MainLayout.razor
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
@using eShop.WebApp.Components.Chatbot
@inherits LayoutComponentBase

<HeaderBar />
@Body
<ShowChatbotButton />
<FooterBar />

@inject NavigationManager Navigation
<div class="@GetLayoutClass()">
<div>
<HeaderBar />
@Body
<ShowChatbotButton />
</div>
<FooterBar />
</div>
<div id="blazor-error-ui">
An unhandled error has occurred.
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>

@code {
private string GetLayoutClass()
{
var currentUrl = Navigation.ToBaseRelativePath(Navigation.Uri);
return currentUrl.StartsWith("user/orders") || currentUrl.StartsWith("cart") ? "layout-container sticky-footer-page" :
"layout-container";
}
}
10 changes: 10 additions & 0 deletions src/WebApp/Components/Layout/MainLayout.razor.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,13 @@
right: 0.75rem;
top: 0.5rem;
}

.layout-container {
min-height: 100vh;
display: flex;
flex-direction: column;
}

.layout-container.sticky-footer-page ::deep .eshop-footer {
margin-top: auto;
}