-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Html document layout library. -- -- The library helps to format html documents using popular BluePrint CSS -- framework http://www.blueprintcss.org/. Currently, Blaze and -- HSX html generators are supported (note blaze and hsx -- flags). See repository for complex examples. @package BluePrintCSS @version 0.1 module Text.BluePrintCSS.Base -- | The most important function. Renders structure into solid html. First -- argument is total width of your css grid (see blueprintcss manual). -- Typical value is 24. Second argument is the document skeleton as -- returned by one of *section functions. Use it like this (HSX html -- generator is assumed): -- --
--   render 24 $ vsection [ 
--     float $ <h1> The header </h1>,
--     floatA [Box "Error"] $ <p>Password incorrect</p>,
--     hsection [ 
--       equal 3 $ <div> Column of width 3 </div>,
--       float   $ <div> Column of width (max - 3) </div>
--     ] 
--   ]
--   
render :: (AsMargin a, AsSection a d) => Int -> Tuple a d -> Either String d section :: a -> b -> c -> (a, b, c) -- | User can specify fixed of `greater than` width of section. Width is -- measured in blueprint css units (see official manual) data Layout LEQ :: Int -> Layout LGE :: Int -> Layout class AsSection a d asSection :: AsSection a d => a -> Int -> Bool -> [d] -> d asRootSection :: AsSection a d => a -> [d] -> d class AsMargin x smargin :: AsMargin x => x -> Int class AsCssClass x asCssClass :: AsCssClass x => x -> [String] makeCssClass :: AsCssClass x => x -> Int -> Bool -> [String] -- | Defines Html section tree from blueprint's point of view. data Tag a d Tag :: Align -> [Tuple a d] -> Tag a d Content :: d -> Tag a d data Align HSet :: Align VSet :: Align -- | Attributed version of hsection. First argument is a attribute list -- which allows to tweak `class` of html tag. Standard blueprint library -- contains a set of pre-defined classes like error, -- notify, box, `append-`, `prepend-`. Some of them, -- like `pull-` and `push-` are not supported. See Attr for -- details. hsectionA :: a -> [Tuple a d] -> Tuple a d -- | Starts horisontally aligned sectionlist hsection :: Monoid a => [Tuple a d] -> Tuple a d -- | Attributed version of vsection vsectionA :: a -> [Tuple a d] -> Tuple a d -- | Starts vertically aligned section vsection :: Monoid a => [Tuple a d] -> Tuple a d -- | Attributed version of equal equalA :: a -> Int -> d -> Tuple a d -- | Defines html content of fixed width. First argument is a width allowed -- for this content (in blueprintcss units, see manual). Second argument -- - html data type equal :: Monoid a => Int -> d -> Tuple a d -- | Attributed version of greater greaterA :: a -> Int -> d -> Tuple a d -- | Defines html content with width in range [arg1 .. max). First argument -- is a minimal width allowed (in blueprintcss units, see manual). Second -- argument - html data type greater :: Monoid a => Int -> d -> Tuple a d -- | Attributed version of float floatA :: a -> d -> Tuple a d -- | Defines html content with any width (same as greater with arg1 -- = 0) float :: Monoid a => d -> Tuple a d instance (Show a, Show d) => Show (Tag a d) instance Show Align instance Eq Layout instance Show Layout module Text.BluePrintCSS.Attr data BoxStyle Box :: BoxStyle Error :: BoxStyle Notice :: BoxStyle Success :: BoxStyle data Attr Decoration :: BoxStyle -> Attr Append :: Int -> Attr Prepend :: Int -> Attr ShowGrid :: Attr ColBorder :: Attr type Attrs = [Attr] toCssClass :: Attr -> String margin :: Attr -> Int instance Show Attr instance Show BoxStyle instance AsMargin Attrs instance AsCssClass Attrs module Text.BluePrintCSS