LandingBlocks
Ecng.Markdown.Extensions
Pieces the landing sections share: recognising button and picture paragraphs, and writing blocks with the classes the host's stylesheet gives them.
方法
GetUrl
public static string GetUrl(LinkInline link)
result = LandingBlocks.GetUrl(link)
The link's address, dynamic ones included.
IsDiagram
public static bool IsDiagram(Block block)
result = LandingBlocks.IsDiagram(block)
A ```diagram fence, bare or inside a ^^^ figure.
IsImageOnly
public static bool IsImageOnly(Block block)
result = LandingBlocks.IsImageOnly(block)
A paragraph of pictures and nothing else.
IsLinkOnly
public static bool IsLinkOnly(Block block)
result = LandingBlocks.IsLinkOnly(block)
A paragraph of links and nothing else, which a section shows as buttons.
WriteActions
public static void WriteActions(HtmlRenderer renderer, ParagraphBlock paragraph, string wrapperClass, bool withArrow)
LandingBlocks.WriteActions(renderer, paragraph, wrapperClass, withArrow)
Writes the links of a link-only paragraph as buttons, the first one solid.
WriteHeading
public static void WriteHeading(HtmlRenderer renderer, HeadingBlock heading, string tag, string classes)
LandingBlocks.WriteHeading(renderer, heading, tag, classes)
Writes a heading as the given tag, keeping the author's {#id .class}.
WriteImage
public static void WriteImage(HtmlRenderer renderer, LinkInline image)
LandingBlocks.WriteImage(renderer, image)
Writes a picture with the file id or address the author gave; the formatter resolves ids.
WriteText
public static void WriteText(HtmlRenderer renderer, LeafBlock block, string tag, string classes)
LandingBlocks.WriteText(renderer, block, tag, classes)
Writes a paragraph's text in the given tag, keeping the author's {#id .class}.