forked from DevExpress-Examples/blazor-theme-switcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainLayout.razor
29 lines (28 loc) · 1.03 KB
/
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
27
28
29
@inherits LayoutComponentBase
<ThemeSwitcher>
<StylesheetLinkContainer>
<link href="_content/DevExpress.Blazor/dx-blazor.css" rel="stylesheet" />
<link href="@context.CurrentThemeUrl" rel="stylesheet" />
<div class="main">
@context.ToggleButton
<div id="settingsbar" class="@(context.ThemesSelectorVisible ? "" : "hidden-settings-bar")">
@context.ThemesSelectorContainer
</div>
<div class="content px-4">
@Body
</div>
</div>
</StylesheetLinkContainer>
<ToggleButton>
<div align="right" class="theme-settings @context.ThemesSelectorVisible">
<a class="nav-item nav-link" @onclick="@context.ToggleThemesContainer" href="javascript:void(0);">
<span class="oi oi-cog"></span>
</a>
</div>
</ToggleButton>
<ThemesSelectorContainer>
<nav id="themesMenu">
@context.ThemesSelectorView
</nav>
</ThemesSelectorContainer>
</ThemeSwitcher>