changing default theme to Oqtane theme

This commit is contained in:
Shaun Walker
2020-05-18 10:44:54 -04:00
parent 9b74262c76
commit 6ae019336d
15 changed files with 24 additions and 31 deletions

View File

@ -13,32 +13,21 @@ namespace Oqtane.Themes
[Inject]
protected IJSRuntime JSRuntime { get; set; }
// optional interface properties
[CascadingParameter]
protected PageState PageState { get; set; }
public virtual string Panes { get; set; }
public virtual List<Resource> Resources { get; set; }
// path method
public string ThemePath()
{
return "Themes/" + GetType().Namespace + "/";
}
public async Task IncludeCSS(string Url)
{
if (!Url.StartsWith("http"))
{
Url = ThemePath() + Url;
}
var interop = new Interop(JSRuntime);
await interop.IncludeCSS("Theme", Url);
}
public async Task LoadBootstrapTheme(string url, string integrity = null)
{
var interop = new Interop(JSRuntime);
string crossorigin = string.IsNullOrEmpty(integrity) ? string.Empty : "anonymous";
await interop.IncludeLink("bootstrap", "stylesheet", url, "text/css", integrity, crossorigin);
}
// url methods
public string NavigateUrl()
{