Safe Haskell | None |
---|
- module Text.Blaze
- module Text.Blaze.Html5
- module Text.Blaze.Html5.Attributes
- class Attributable h where
- (!.) :: Attributable h => h -> AttributeValue -> h
- (!#) :: Attributable h => h -> AttributeValue -> h
- linesToHtml :: [Html] -> Html
- htmlIntercalate :: Html -> [Html] -> Html
- htmlCommasAnd :: [Html] -> Html
- htmlCommas :: [Html] -> Html
Re-exports
module Text.Blaze
module Text.Blaze.Html5
module Text.Blaze.Html5.Attributes
Attribute combinators
class Attributable h where
Used for applying attributes. You should not define your own instances of this class.
Apply an attribute to an element.
Example:
img ! src "foo.png"
Result:
<img src="foo.png" />
This can be used on nested elements as well.
Example:
p ! style "float: right" $ "Hello!"
Result:
<p style="float: right">Hello!</p>
Attributable (MarkupM a) | |
Attributable (MarkupM a -> MarkupM b) |
(!.) :: Attributable h => h -> AttributeValue -> hSource
Class attribute.
(!#) :: Attributable h => h -> AttributeValue -> hSource
Id attribute.
Common operations
linesToHtml :: [Html] -> HtmlSource
Render the lines as HTML lines.
htmlIntercalate :: Html -> [Html] -> HtmlSource
Intercalate the given things.
htmlCommasAnd :: [Html] -> HtmlSource
Show some HTML comma-separated with “and” inbetween to be grammatical.
htmlCommas :: [Html] -> HtmlSource
Comma-separate some HTML.