|
Happstack.Helpers.HtmlOutput.Common |
|
|
Description |
Simple stupid output of common types of html
|
|
Synopsis |
|
|
|
Documentation |
|
|
fullUrlLink "http:www.google.com"
| for when you want a link that the anchor text is the full url. eg, for displaying a url for darcs get.
|
|
|
simpleLink ("http:www.google.com","google is a nice way to look for information")
|
|
|
like simpleLink, but a link tag is class=attention
if class attention is defined via css you can get some useful behavior. I typically do something like the following, in a global css file:
a.attention:link {color: orange}
a.attention:active {color: orange}
a.attention:visited {color: orange}
a.attention:hover {color: orange}
|
|
|
width and height args blank blank if you don't want to specify this
simpleImage (url, alttext) (width, height) = ...
|
|
|
format a list of text vertically by putting list items in paragraphs
|
|
|
:: Maybe [String] | optional header rows
| -> [[String]] | table cells
| -> Maybe Pagination | optional pagination
| -> String | | paintTable mbHeaderCells datacells mbPagination = ...
mbHeaderCells: text for header cells, if you want them. Can use html formatting if desired.
pagination also optional
|
|
|
|
:: String -> String | table tag function
| -> [String] -> String | row tag function, input is table cell contents
| -> (String, Bool) | | -> Maybe ([String], [String] -> String) | optional (header rows, header row tag function)
| -> [[String]] | table cells
| -> Maybe Pagination | optional pagination
| -> String | | paintTable' tableF trF spacerRow mbHeaderStuff datacells mbPagination =
helper function for a table with pagination
see paintTable for an example of how this can be used
|
|
|
|
|
|
|
|
|
|
|
substitute newlines with br
|
|
|
The checkbox form element has optional attribute checked.
If this attribute is present, readcheckbox returns true, otherwise false.
use in conjunction with checkStringIfTrue, when, eg, writing StringTemplate code that renders a from with a box that might or not be checked. Something like:
attrs = [ ... , (somethingIsChecked, checkedStringIfTrue $ someBoolVal ) ... ]
|
|
|
useful hack for dealing with checkboxes in HAppS. Maybe there's a better way?
checkedStringIfTrue p = if p then "checked" else ""
|
|
|
Render a list of strings as an unordered list (ul>...</ul)
|
|
|
Render a list of strings as an ordered list (ol>...</ol)
|
|
|
render a list of strings horizontally, separated by " | "
|
|
|
Constructors | | Instances | |
|
|
|
Constructors | | Instances | |
|
|
Produced by Haddock version 2.6.1 |