Module HTML.Styles.Bootstrap4

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

Author: Michael Hanus

Version: July 2020

Summary of exported operations:

bootstrapPage :: String -> [String] -> [String] -> String -> (String,[HtmlExp]) -> [[HtmlExp]] -> [[HtmlExp]] -> Int -> [HtmlExp] -> [HtmlExp] -> [HtmlExp] -> [HtmlExp] -> HtmlPage   
An HTML page rendered with bootstrap with a fixed top navigation bar.
bootstrapPage2 :: String -> [String] -> [String] -> String -> (String,[HtmlExp]) -> [(String,[HtmlExp])] -> [(String,[HtmlExp])] -> Int -> [HtmlExp] -> [HtmlExp] -> [HtmlExp] -> [HtmlExp] -> HtmlPage   
An HTML page rendered with bootstrap with a fixed top navigation bar and individual classes for the top menu items.
titledSideMenu :: String -> [[HtmlExp]] -> [HtmlExp]   
Create a side menu containing a title and a list of items:
primButton :: String -> ((CgiRef -> String) -> IO HtmlPage) -> HtmlExp   
Primary input button.
primSmButton :: String -> ((CgiRef -> String) -> IO HtmlPage) -> HtmlExp   
Small primary input button.
scndButton :: String -> ((CgiRef -> String) -> IO HtmlPage) -> HtmlExp   
Secondary input button.
scndSmButton :: String -> ((CgiRef -> String) -> IO HtmlPage) -> HtmlExp   
Small secondary input button.
infoButton :: String -> ((CgiRef -> String) -> IO HtmlPage) -> HtmlExp   
Info input button.
infoSmButton :: String -> ((CgiRef -> String) -> IO HtmlPage) -> HtmlExp   
Small info input button.
hrefPrimButton :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a primary button.
hrefPrimSmButton :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a small primary button.
hrefScndButton :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a secondary button.
hrefScndSmButton :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a small secondary button.
hrefInfoButton :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as an info button.
hrefInfoSmButton :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a small secondary button.
hrefSuccButton :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a success button.
hrefSuccSmButton :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a small success button.
hrefWarnButton :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a warning button.
hrefWarnSmButton :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a small warning button.
hrefDangButton :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a danger button.
hrefDangSmButton :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a small danger button.
hrefLightButton :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a light button.
hrefLightSmButton :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a small light button.
hrefDarkButton :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a dark button.
hrefDarkSmButton :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a small dark button.
hrefPrimBlock :: String -> [HtmlExp] -> HtmlExp   
hrefScndBlock :: String -> [HtmlExp] -> HtmlExp   
hrefInfoBlock :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as an info block button.
hrefPrimSmBlock :: String -> [HtmlExp] -> HtmlExp   
hrefScndSmBlock :: String -> [HtmlExp] -> HtmlExp   
hrefInfoSmBlock :: String -> [HtmlExp] -> HtmlExp   
hrefPrimBadge :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a primary badge.
hrefScndBadge :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a secondary badge.
hrefSuccBadge :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a success badge.
hrefInfoBadge :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as an info badge.
hrefWarnBadge :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a warning badge.
hrefDangBadge :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a danger badge.
hrefLightBadge :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a light badge.
hrefDarkBadge :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference rendered as a dark badge.
ehrefPrimBadge :: String -> [HtmlExp] -> HtmlExp   
External hypertext reference rendered as a primary badge.
ehrefScndBadge :: String -> [HtmlExp] -> HtmlExp   
External hypertext reference rendered as a secondary badge.
ehrefSuccBadge :: String -> [HtmlExp] -> HtmlExp   
External hypertext reference rendered as a success badge.
ehrefInfoBadge :: String -> [HtmlExp] -> HtmlExp   
External hypertext reference rendered as an info badge.
ehrefWarnBadge :: String -> [HtmlExp] -> HtmlExp   
External hypertext reference rendered as a warning badge.
ehrefDangBadge :: String -> [HtmlExp] -> HtmlExp   
External hypertext reference rendered as a danger badge.
ehrefLightBadge :: String -> [HtmlExp] -> HtmlExp   
External hypertext reference rendered as a light badge.
ehrefDarkBadge :: String -> [HtmlExp] -> HtmlExp   
External hypertext reference rendered as a dark badge.
hrefNav :: String -> [HtmlExp] -> HtmlExp   
Hypertext reference in navigations.
hrefNavActive :: String -> [HtmlExp] -> HtmlExp   
Active hypertext reference in navigations.
ehrefNav :: String -> [HtmlExp] -> HtmlExp   
External hypertext reference in navigations.
ehref :: String -> [HtmlExp] -> HtmlExp   
An external hypertext reference which opens on a new page.
eTarget :: HtmlExp -> HtmlExp   
Transforms a hypertext reference into an external one which opens on a new page.
kbdInput :: [HtmlExp] -> HtmlExp   
Render an HTML expression as keyboard or user input.

Exported operations:

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

An HTML page rendered with bootstrap with a fixed top navigation bar.

Example call:
(bootstrapPage favicon styles jsincludes title brand columns sidemenu header contents footer)
Parameters:
  • favicon : the icon file favicon.ico (when empty not included)
  • styles : the style files to be included (typically, css/bootstrap.min.css)
  • jsincludes : the JavaScript files to be included (typically, .../jquery.js, js/bootstrap.min.js)
  • title : the title of the form
  • brand : the brand shown top left (a URL/title pair)
  • 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 (will be rendered with jumbotron style)
  • contents : the main contents of the document
  • footer : the footer of the document

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

An HTML page rendered with bootstrap with a fixed top navigation bar and individual classes for the top menu items.

Example call:
(bootstrapPage2 favicon styles jsincludes title brand columns sidemenu header contents footer)
Parameters:
  • favicon : the icon file favicon.ico (when empty not included)
  • styles : the style files to be included (typically, css/bootstrap.min.css)
  • jsincludes : the JavaScript files to be included (typically, .../jquery.js, js/bootstrap.min.js)
  • title : the title of the form
  • brand : the brand shown top left (a URL/title pair)
  • 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 (will be rendered with jumbotron style)
  • contents : the main contents of the document
  • footer : the footer of the document

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

Create a side menu containing a title and a list of items:

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

Primary input button.

primSmButton :: String -> ((CgiRef -> String) -> IO HtmlPage) -> HtmlExp   

Small primary input button.

scndButton :: String -> ((CgiRef -> String) -> IO HtmlPage) -> HtmlExp   

Secondary input button.

scndSmButton :: String -> ((CgiRef -> String) -> IO HtmlPage) -> HtmlExp   

Small secondary input button.

infoButton :: String -> ((CgiRef -> String) -> IO HtmlPage) -> HtmlExp   

Info input button.

infoSmButton :: String -> ((CgiRef -> String) -> IO HtmlPage) -> HtmlExp   

Small info input button.

hrefPrimButton :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a primary button.

hrefPrimSmButton :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a small primary button.

hrefScndButton :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a secondary button.

hrefScndSmButton :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a small secondary button.

hrefInfoButton :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as an info button.

hrefInfoSmButton :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a small secondary button.

hrefSuccButton :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a success button.

hrefSuccSmButton :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a small success button.

hrefWarnButton :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a warning button.

hrefWarnSmButton :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a small warning button.

hrefDangButton :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a danger button.

hrefDangSmButton :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a small danger button.

hrefLightButton :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a light button.

hrefLightSmButton :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a small light button.

hrefDarkButton :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a dark button.

hrefDarkSmButton :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a small dark button.

hrefPrimBlock :: String -> [HtmlExp] -> HtmlExp   

hrefScndBlock :: String -> [HtmlExp] -> HtmlExp   

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

Hypertext reference rendered as an info block button.

hrefPrimSmBlock :: String -> [HtmlExp] -> HtmlExp   

hrefScndSmBlock :: String -> [HtmlExp] -> HtmlExp   

hrefInfoSmBlock :: String -> [HtmlExp] -> HtmlExp   

hrefPrimBadge :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a primary badge.

hrefScndBadge :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a secondary badge.

hrefSuccBadge :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a success badge.

hrefInfoBadge :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as an info badge.

hrefWarnBadge :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a warning badge.

hrefDangBadge :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a danger badge.

hrefLightBadge :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a light badge.

hrefDarkBadge :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference rendered as a dark badge.

ehrefPrimBadge :: String -> [HtmlExp] -> HtmlExp   

External hypertext reference rendered as a primary badge.

ehrefScndBadge :: String -> [HtmlExp] -> HtmlExp   

External hypertext reference rendered as a secondary badge.

ehrefSuccBadge :: String -> [HtmlExp] -> HtmlExp   

External hypertext reference rendered as a success badge.

ehrefInfoBadge :: String -> [HtmlExp] -> HtmlExp   

External hypertext reference rendered as an info badge.

ehrefWarnBadge :: String -> [HtmlExp] -> HtmlExp   

External hypertext reference rendered as a warning badge.

ehrefDangBadge :: String -> [HtmlExp] -> HtmlExp   

External hypertext reference rendered as a danger badge.

ehrefLightBadge :: String -> [HtmlExp] -> HtmlExp   

External hypertext reference rendered as a light badge.

ehrefDarkBadge :: String -> [HtmlExp] -> HtmlExp   

External hypertext reference rendered as a dark badge.

hrefNav :: String -> [HtmlExp] -> HtmlExp   

Hypertext reference in navigations.

hrefNavActive :: String -> [HtmlExp] -> HtmlExp   

Active hypertext reference in navigations.

ehrefNav :: String -> [HtmlExp] -> HtmlExp   

External hypertext reference in navigations.

ehref :: String -> [HtmlExp] -> HtmlExp   

An external hypertext reference which opens on a new page.

eTarget :: HtmlExp -> HtmlExp   

Transforms a hypertext reference into an external one which opens on a new page. Basically, the attribute target="_blank" is added.

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

kbdInput :: [HtmlExp] -> HtmlExp   

Render an HTML expression as keyboard or user input.

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