Ejemplo n.º 1
0
 public static Dom dom(Lst <Tuple <string, string> > trail, Dom rest) =>
 combine(
     div(new { @class = "nav-bar" },
         combine(
             " \\ ",
             trail.Take(trail.Count - 1).Map(tup =>
                                             tup.Map((title, url) =>
                                                     a(@class: attr("nav-bar-link"),
                                                       href: attr(url),
                                                       inner: text(title))))
             .ToArray()
             .Freeze()
             .Add(trail.Last().Map(
                      (title, url) =>
                      span(new { @class = attr("nav-bar-link"), href = attr(url) }, text(title)))).ToArray())),
     rest);
Ejemplo n.º 2
0
 private static string FormatExpects(Lst <string> expects) =>
 expects.Count == 0
         ? ""
         : expects.Count == 1
             ? $"expecting {expects.Head()}"
             : $"expecting {String.Join(", ", expects.Take(expects.Count - 1))} or {expects.Last()}";