allow developers to use custom icon libraries (Open Iconic is the default)
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
@namespace Oqtane.Modules.Admin.Dashboard
|
||||
@namespace Oqtane.Modules.Admin.Dashboard
|
||||
@inherits ModuleBase
|
||||
@inject IPageService PageService
|
||||
@inject IUserService UserService
|
||||
@ -11,7 +11,7 @@
|
||||
string url = NavigateUrl(p.Path);
|
||||
<div class="col-md-2 mx-auto text-center">
|
||||
<NavLink class="nav-link" href="@url" Match="NavLinkMatch.All">
|
||||
<h2><span class="oi oi-@p.Icon" aria-hidden="true"></span></h2>@p.Name
|
||||
<h2><span class="@p.Icon" aria-hidden="true"></span></h2>@p.Name
|
||||
</NavLink>
|
||||
</div>
|
||||
}
|
||||
|
@ -157,7 +157,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="Icon" HelpText="Optionally provide an icon for this page which will be displayed in the site navigation" ResourceKey="Icon">Icon: </Label>
|
||||
<Label For="Icon" HelpText="Optionally provide an icon class name for this page which will be displayed in the site navigation" ResourceKey="Icon">Icon: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="Icon" class="form-control" @bind="@_icon" />
|
||||
|
@ -168,7 +168,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="Icon" HelpText="Optionally provide an icon for this page which will be displayed in the site navigation" ResourceKey="Icon">Icon: </Label>
|
||||
<Label For="Icon" HelpText="Optionally provide an icon class name for this page which will be displayed in the site navigation" ResourceKey="Icon">Icon: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="Icon" class="form-control" @bind="@_icon" />
|
||||
|
@ -94,7 +94,11 @@
|
||||
|
||||
if (!string.IsNullOrEmpty(IconName))
|
||||
{
|
||||
_iconSpan = $"<span class=\"oi oi-{IconName}\"></span> ";
|
||||
if (!IconName.Contains(" "))
|
||||
{
|
||||
IconName = "oi oi-" + IconName;
|
||||
}
|
||||
_iconSpan = $"<span class=\"{IconName}\"></span> ";
|
||||
}
|
||||
|
||||
Text = Localize(nameof(Text), Text);
|
||||
|
@ -91,7 +91,11 @@
|
||||
|
||||
if (!string.IsNullOrEmpty(IconName))
|
||||
{
|
||||
_iconSpan = $"<span class=\"oi oi-{IconName}\"></span>{(IconOnly ? "" : " ")}";
|
||||
if (!IconName.Contains(" "))
|
||||
{
|
||||
IconName = "oi oi-" + IconName;
|
||||
}
|
||||
_iconSpan = $"<span class=\"{IconName}\"></span>{(IconOnly ? "" : " ")}";
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
@namespace Oqtane.Themes.Controls
|
||||
@namespace Oqtane.Themes.Controls
|
||||
@inherits MenuBase
|
||||
|
||||
@if (MenuPages.Any())
|
||||
@ -19,7 +19,7 @@
|
||||
<a class="nav-link" href="@GetUrl(p)" target="@GetTarget(p)" >
|
||||
@if (p.Icon != string.Empty)
|
||||
{
|
||||
<span class="oi oi-@p.Icon" aria-hidden="true"></span>
|
||||
<span class="@p.Icon" aria-hidden="true"></span>
|
||||
}
|
||||
@p.Name<span class="sr-only">(current)</span>
|
||||
</a>
|
||||
@ -31,7 +31,7 @@
|
||||
<a class="nav-link" href="@GetUrl(p)" target="@GetTarget(p)" >
|
||||
@if (p.Icon != string.Empty)
|
||||
{
|
||||
<span class="oi oi-@p.Icon" aria-hidden="true"></span>
|
||||
<span class="@p.Icon" aria-hidden="true"></span>
|
||||
}
|
||||
@p.Name
|
||||
</a>
|
||||
|
@ -1,4 +1,4 @@
|
||||
@namespace Oqtane.Themes.Controls
|
||||
@namespace Oqtane.Themes.Controls
|
||||
@inherits MenuBase
|
||||
|
||||
@if (MenuPages.Any())
|
||||
@ -22,7 +22,7 @@
|
||||
}
|
||||
@if (p.Icon != string.Empty)
|
||||
{
|
||||
<span class="oi oi-@p.Icon" aria-hidden="true"></span>
|
||||
<span class="@p.Icon" aria-hidden="true"></span>
|
||||
}
|
||||
@p.Name
|
||||
</a>
|
||||
|
@ -1,4 +1,4 @@
|
||||
@namespace Oqtane.Themes.Controls
|
||||
@namespace Oqtane.Themes.Controls
|
||||
@inherits ModuleActionsBase
|
||||
@attribute [OqtaneIgnore]
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="oi oi-@action.Icon" aria-hidden="true"></span>
|
||||
<span class="@action.Icon" aria-hidden="true"></span>
|
||||
}
|
||||
|
||||
@action.Name
|
||||
|
Reference in New Issue
Block a user