Maintainer | Ertugrul Soeylemez <es@ertes.de> |
---|
HTML widgets, inspired by Yesod.
Widget type
A widget is essentially a full HTML page splitted into the actual HTML markup and its dependencies like CSS and JavaScript.
Monoid Widget | The empty widget is an HTML page with an empty body and no dependencies. The sum of two widgets is the concatenation of the individual HTML markups and the union of their dependencies, such that external stylesheets or JavaScript files are only included once. |
ToHtml Widget | A widget can be converted into HTML with a default page template. This should suffice for simple websites. |
Renderable Widget | Widgets render to HTML in the way specified in WebWire.Widget. |
Adding content
Stylesheets
cassiusW :: CssUrl a -> WidgetSource
Widget with an inline CSS stylesheet rendered by Cassius or Lucius.
JavaScript
juliusW :: JavascriptUrl a -> WidgetSource
Widget with inline JavaScript rendered by Julius.