Module HTML.Styles.Bootstrap3

This library contains some operations to generate web pages rendered with Bootstrap

Author: Michael Hanus

Version: October 2017

Summary of exported operations:

bootstrapForm :: String -> [String] -> String -> (String,[HtmlExp]) -> [[HtmlExp]] -> [[HtmlExp]] -> Int -> [HtmlExp] -> [HtmlExp] -> [HtmlExp] -> [HtmlExp] -> HtmlForm   
An HTML form rendered with bootstrap.
bootstrapPage :: String -> [String] -> String -> (String,[HtmlExp]) -> [[HtmlExp]] -> [[HtmlExp]] -> Int -> [HtmlExp] -> [HtmlExp] -> [HtmlExp] -> [HtmlExp] -> HtmlPage   
An HTML page rendered with bootstrap.
titledSideMenu :: String -> [[HtmlExp]] -> [HtmlExp]   
defaultButton :: String -> ((CgiRef -> String) -> IO HtmlForm) -> HtmlExp   
Default input button.
smallButton :: String -> ((CgiRef -> String) -> IO HtmlForm) -> HtmlExp   
Small input button.
primButton :: String -> ((CgiRef -> String) -> IO HtmlForm) -> HtmlExp   
Primary input button.
hrefButton :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a button.
hrefBlock :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a block level button.
hrefInfoBlock :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as an info block level button.
glyphicon :: String -> HtmlExp   
homeIcon :: HtmlExp   
userIcon :: HtmlExp   
loginIcon :: HtmlExp   
logoutIcon :: HtmlExp   

Exported operations:

bootstrapForm :: String -> [String] -> String -> (String,[HtmlExp]) -> [[HtmlExp]] -> [[HtmlExp]] -> Int -> [HtmlExp] -> [HtmlExp] -> [HtmlExp] -> [HtmlExp] -> HtmlForm   

An HTML form rendered with bootstrap.

Example call:
(bootstrapForm rootdir styles title brandurltitle columns sidemenu header contents footer)
Parameters:
  • rootdir : the root directory to find styles (in subdirectory css of the root) and images (in subdirectory img of the root)
  • styles : the style files to be included (typically, bootstrap and bootstrap-responsive), stored in rootdir/css with suffix .css)
  • title : the title of the form
  • brandurltitle : the URL and contents shown as the brand of the page
  • columns : number of columns for the left-side menu (if columns==0, then the left-side menu is omitted)
  • sidemenu : the menu shown at the left-side of the main document (maybe created with titledSideMenu)
  • header : the main header (rendered with jumbotron style)
  • contents : the main contents of the document
  • footer : the footer of the document

bootstrapPage :: String -> [String] -> String -> (String,[HtmlExp]) -> [[HtmlExp]] -> [[HtmlExp]] -> Int -> [HtmlExp] -> [HtmlExp] -> [HtmlExp] -> [HtmlExp] -> HtmlPage   

An HTML page rendered with bootstrap.

Example call:
(bootstrapPage rootdir styles title columns sidemenu header contents footer)
Parameters:
  • rootdir : the root directory to find styles, fonts, scripts (in subdirectories css, fonts, js) and the favicon.ico of the root) and images (in subdirectory img of the root)
  • styles : the style files to be included (typically, bootstrap and bootstrap-responsive), stored in rootdir/css with suffix .css)
  • title : the title of the form
  • columns : number of columns for the left-side menu (if columns==0, then the left-side menu is omitted)
  • sidemenu : the menu shown at the left-side of the main document (maybe created with titledSideMenu)
  • header : the main header (rendered with jumbotron style)
  • contents : the main contents of the document
  • footer : the footer of the document

titledSideMenu :: String -> [[HtmlExp]] -> [HtmlExp]   

defaultButton :: String -> ((CgiRef -> String) -> IO HtmlForm) -> HtmlExp   

Default input button.

smallButton :: String -> ((CgiRef -> String) -> IO HtmlForm) -> HtmlExp   

Small input button.

primButton :: String -> ((CgiRef -> String) -> IO HtmlForm) -> HtmlExp   

Primary input button.

hrefButton :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a button.

Further infos:
  • solution complete, i.e., able to compute all solutions

hrefBlock :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a block level button.

Further infos:
  • solution complete, i.e., able to compute all solutions

hrefInfoBlock :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as an info block level button.

Further infos:
  • solution complete, i.e., able to compute all solutions

glyphicon :: String -> HtmlExp   

homeIcon :: HtmlExp   

userIcon :: HtmlExp   

loginIcon :: HtmlExp   

logoutIcon :: HtmlExp