This commit is contained in:
skidoodle 2024-03-13 00:33:46 +01:00
commit e124a47765
19374 changed files with 9806149 additions and 0 deletions

View file

@ -0,0 +1,27 @@
using System.Collections.Generic;
using System.Text;
using System.Web.Mvc;
namespace Kreta.Web.Helpers
{
public static class IconExtensions
{
public static MvcHtmlString KretaIcon(this HtmlHelper helper, string icon, IDictionary<string, object> htmlAttributes = null)
{
StringBuilder sb = new StringBuilder();
sb.Append(string.Format("<i class=\"fa {0}\" ", icon));
if (htmlAttributes != null)
{
foreach (var item in htmlAttributes)
{
sb.Append(string.Format(" {0}=\"{1}\" ", item.Key, item.Value.ToString()));
}
}
sb.Append("></i>");
MvcHtmlString str = new MvcHtmlString(sb.ToString());
return str;
}
}
}