mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-14 17:22:54 -07:00
Started #273
This commit is contained in:
parent
247ef4833a
commit
ae4d51de9b
14 changed files with 562 additions and 195 deletions
|
@ -154,6 +154,27 @@ namespace PlexRequests.UI.Helpers
|
|||
returnString = $"<li><a href=\"{url}\"><i class=\"fa fa-{fontIcon}\"></i> {title}</a></li>";
|
||||
}
|
||||
|
||||
return helper.Raw(returnString);
|
||||
}
|
||||
|
||||
public static IHtmlString GetNavbarUrl(this HtmlHelpers helper, NancyContext context, string url, string title, string fontIcon, string extraHtml)
|
||||
{
|
||||
var returnString = string.Empty;
|
||||
var content = GetLinkUrl(GetBaseUrl());
|
||||
if (!string.IsNullOrEmpty(content))
|
||||
{
|
||||
url = $"/{content}{url}";
|
||||
}
|
||||
|
||||
if (context.Request.Path == url)
|
||||
{
|
||||
returnString = $"<li class=\"active\"><a href=\"{url}\"><i class=\"fa fa-{fontIcon}\"></i> {title} {extraHtml}</a></li>";
|
||||
}
|
||||
else
|
||||
{
|
||||
returnString = $"<li><a href=\"{url}\"><i class=\"fa fa-{fontIcon}\"></i> {title} {extraHtml}</a></li>";
|
||||
}
|
||||
|
||||
return helper.Raw(returnString);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue