private static WireframeGenerator BufferH( WireframeGenerator gen, int level, int wordCount = 2, object htmlAttributes = null) => gen.Add( WireframeGenerator.GenerateHtmlIpsum($"h{level}", () => Lorem.GenerateWords(wordCount), htmlAttributes) );
public static WireframeGenerator Table(this WireframeGenerator gen, int rows = 5, object tableAttributes = null) { A.Configure <IpsumTableModel>() .Fill(cfg => cfg.Lorem).AsLoremIpsumWords(2) .Fill(cfg => cfg.Ipsum).AsLoremIpsumWords(3) .Fill(cfg => cfg.Aliquam).AsLoremIpsumWords(1); IList <IpsumTableModel> data = A.ListOf <IpsumTableModel>(rows); return(gen.Add(CreateTableHtmlIpsum(data, tableAttributes))); }
public static WireframeGenerator Image(this WireframeGenerator gen, int width, int height, string text = null, string backgroundColor = null, string textColor = null, object htmlAttributes = null, ImgFormat format = ImgFormat.GIF) { var img = new TagBuilder("img"); img.TagRenderMode = TagRenderMode.SelfClosing; img.Attributes.Add("src", PlaceholditUrlBuilder.UrlFor(width, height, text, backgroundColor, textColor)); img.MergeAttributes(HtmlAttributeHelper.GetHtmlAttributeDictionaryOrNull(htmlAttributes)); return(gen.Add(img)); }
/// <summary> /// Gets a dl element containing lorem ipsum /// </summary> /// <example>To create a unordered list of Lorem Ipusm nested in HTML 'dl' tags.<code>@Html.dl()</code></example> /// <param name="listCount">Number of list items to create</param> /// <param name="wordCount">Number of words to create</param> /// <param name="links">List item will contain a link, ex: href="#"</param> /// <param name="dlAttributes">dl element attributes</param> /// <param name="ddAttributes">dd element attributes</param> /// <returns></returns> public static WireframeGenerator Dl(this WireframeGenerator gen, int listCount = 5, int wordCount = 2, bool links = false, object dlAttributes = null, object ddAttributes = null) => gen.Add(GenerateListHtmlIpsum("dl", "dd", listCount, links, ddAttributes, wordCount, dlAttributes));
/// <summary> /// Gets a ol element containing lorem ipsum /// </summary> /// <example>To create a unordered list of Lorem Ipusm nested in HTML 'ol' tags.<code>@Html.ol()</code></example> /// <param name="listCount">Number of list items to create</param> /// <param name="wordCount">Number of words to create</param> /// <param name="links">List item will contain a link, ex: href="#"</param> /// <param name="olAttributes">ol element attributes</param> /// <param name="liAttributes">li element attributes</param> /// <returns></returns> public static WireframeGenerator Ol(this WireframeGenerator gen, int listCount = 5, int wordCount = 2, bool links = false, object olAttributes = null, object liAttributes = null) => gen.Add(GenerateListHtmlIpsum("ol", "li", listCount, links, liAttributes, wordCount, olAttributes));
public static WireframeGenerator Table <T>( this WireframeGenerator gen, int rows = 5, object tableAttributes = null) where T : new() => gen.Add(CreateTableHtmlIpsum(A.ListOf <T>(rows), tableAttributes));