Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Cell site = Cell {}
- cell :: WidgetT site IO () -> Cell site
- stringCell :: String -> Cell site
- textCell :: Text -> Cell site
- builderCell :: Builder -> Cell site
- anchorCell :: (a -> Route site) -> (a -> WidgetT site IO ()) -> a -> Cell site
- table :: Foldable f => [(Text, Text)] -> Colonnade Headed (Cell site) a -> f a -> WidgetT site IO ()
- tableHeadless :: Foldable f => [(Text, Text)] -> Colonnade Headless (Cell site) a -> f a -> WidgetT site IO ()
- definitionTable :: [(Text, Text)] -> Colonnade Headed (Cell site) a -> a -> WidgetT site IO ()
- listItems :: (WidgetT site IO () -> WidgetT site IO ()) -> (WidgetT site IO () -> WidgetT site IO () -> WidgetT site IO ()) -> Colonnade Headed (Cell site) a -> a -> WidgetT site IO ()
Build Encoding
The attributes that will be applied to a td
and
the HTML content that will go inside it.
Apply Encoding
:: Foldable f | |
=> [(Text, Text)] | Attributes of |
-> Colonnade Headed (Cell site) a | How to encode data as a row |
-> f a | Rows of data |
-> WidgetT site IO () |
If you are using the bootstrap css framework, then you may want to call this with the first argument as:
table [("class","table table-striped")] ...
:: [(Text, Text)] | Attributes of |
-> Colonnade Headed (Cell site) a | How to encode data as a row |
-> a | The value to display |
-> WidgetT site IO () |
A two-column table with the header content displayed in the
first column and the data displayed in the second column. Note
that the generated HTML table does not have a thead
.
:: (WidgetT site IO () -> WidgetT site IO ()) | Wrapper for items, often |
-> (WidgetT site IO () -> WidgetT site IO () -> WidgetT site IO ()) | Combines header with data |
-> Colonnade Headed (Cell site) a | How to encode data as a row |
-> a | The value to display |
-> WidgetT site IO () |
This determines the attributes that are added
to the individual li
s by concatenating the header's
attributes with the data's attributes.