-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e384ff4
commit f7d11b6
Showing
5 changed files
with
61 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace Blazor.AdminLte | ||
{ | ||
public interface ILayoutManager | ||
{ | ||
bool IsFooterFixed { get; set; } | ||
bool IsNavBarFixed { get; set; } | ||
bool IsSideBarFixed { get; set; } | ||
|
||
void OverlayMode(bool isOverlayMode); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using Microsoft.JSInterop; | ||
|
||
namespace Blazor.AdminLte | ||
{ | ||
public class LayoutManager : ILayoutManager | ||
{ | ||
private bool _IsSideBarFixed; | ||
private bool _IsNavBarFixed; | ||
private bool _IsFooterFixed; | ||
|
||
public bool IsSideBarFixed { get { return _IsSideBarFixed; } set { _IsSideBarFixed = value; js.InvokeVoidAsync("sideBarFixed", value); } } | ||
public bool IsNavBarFixed { get { return _IsNavBarFixed; } set { _IsNavBarFixed = value; js.InvokeVoidAsync("navBarFixed", value); } } | ||
public bool IsFooterFixed { get { return _IsFooterFixed; } set { _IsFooterFixed = value; js.InvokeVoidAsync("footerFixed", value); } } | ||
|
||
private readonly IJSRuntime js; | ||
|
||
public LayoutManager(IJSRuntime js) | ||
{ | ||
this.js = js; | ||
} | ||
|
||
public void OverlayMode(bool isOverlayMode) | ||
{ | ||
if (isOverlayMode) | ||
{ | ||
js.InvokeVoidAsync("navBarFixed", false); | ||
js.InvokeVoidAsync("footerFixed", false); | ||
} | ||
else | ||
{ | ||
js.InvokeVoidAsync("navBarFixed", _IsNavBarFixed); | ||
js.InvokeVoidAsync("footerFixed", _IsFooterFixed); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters