28 namespace Ntp.Analyzer.Render
44 var
b =
new StringBuilder();
46 b.AppendLine(
@" <div class=""navbar navbar-inverse navbar-fixed-top"">");
47 b.AppendLine(
@" <div class=""container"">");
48 b.AppendLine(
@" <div class=""navbar-header"">");
50 @" <button type=""button"" class=""navbar-toggle"" data-toggle=""collapse"" data-target="".navbar-collapse"">");
51 b.AppendLine(
@" <span class=""icon-bar""></span>");
52 b.AppendLine(
@" <span class=""icon-bar""></span>");
53 b.AppendLine(
@" <span class=""icon-bar""></span>");
54 b.AppendLine(
@" </button>");
62 $
@" <a class=""navbar-brand"" href=""{headItem.Link.ToHtmlString()}"">{headItem.Caption}</a>");
65 b.AppendLine(
@" </div>");
66 b.AppendLine(
@" <div class=""navbar-collapse collapse"">");
67 b.AppendLine(
@" <ul class=""nav navbar-nav"">");
71 string active = item.Page == page ?
@" class=""active""" :
string.Empty;
76 $
@" <li{active}><a href=""{item.Link.ToHtmlString()}"">{item.Caption}</a></li>");
80 b.AppendLine(
@" <li class=""dropdown"">");
82 @" <a href=""#"" class=""dropdown-toggle"" data-toggle=""dropdown"">Peers <b class=""caret""></b></a>");
83 b.AppendLine(
@" <ul class=""dropdown-menu"">");
85 var dropdownItem = item as DropdownItemConfiguration;
87 foreach (var subItem
in dropdownItem.MenuItems)
92 $
@" <li><a href=""{subItem.Link.ToHtmlString()}"">{subItem.Caption}</a></li>");
96 b.AppendLine(
@" <li class=""divider""></li>");
100 b.AppendLine($
@" <li class=""dropdown-header"">{subItem.Caption}</li>");
104 throw new NotSupportedException(
"Unknown item type.");
108 b.AppendLine(
@" </ul>");
112 throw new NotSupportedException(
"Unknown item type.");
116 b.AppendLine(
@" </ul>");
117 b.AppendLine(
@" </div>");
118 b.AppendLine(
@" </div>");
119 b.AppendLine(
@" </div>");