-
Notifications
You must be signed in to change notification settings - Fork 9
/
MainLayout.razor
26 lines (21 loc) · 884 Bytes
/
MainLayout.razor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
@inherits LayoutComponentBase
@inject NavigationManager NavigationManager
<div class="page">
<div class="sidebar">
<NavMenu />
</div>
<main>
<div class="top-row px-4">
<a href="@($"https://github.com/KristofferStrube/Blazor.WebAuthentication/blob/main/samples/KristofferStrube.Blazor.WebAuthentication.WasmExample/Pages/{page}")" target="_blank" style="position: fixed; top: 5px; right: 5px">
<img src="https://img.shields.io/badge/this%20page%20on%20GitHub-@(page)-green?logo=github" />
</a>
</div>
<article class="content px-4">
@Body
</article>
</main>
</div>
@code {
private string relativeUri => NavigationManager.ToBaseRelativePath(NavigationManager.Uri);
protected string page => (string.IsNullOrEmpty(relativeUri) ? "Index" : relativeUri) + ".razor";
}