TITLE: Demonstration of Bootstrap styles for DocOnce documents
DATE: today

The "Bootstrap": "http://getbootstrap.com" framework for creating
web pages with modern design and functionality can be used in many
different ways. This note shows the default setup for using Bootstrap
styles with HTML documents generated from "DocOnce": "http://hplgit.github.io/doconce/doc/web/index.html" source code.
DocOnce supports many variants of Bootstrap themes. Most of them
are demonstrated below.

!split
===== The basic Bootstrap style =====

=== Special features ===

The Bootstrap styles in DocOnce offer the following special features:

 * Fully responsive pages that work across a wide range of devices, small
   and large.
 * A navigation bar at the top with link to the beginning of the
   document and a pull-down menu with a table of contents. The table
   of contents is automatically fit to the page height, which means
   that very short documents may have all headings present in the table
   of contents, while very large documents may only have the top sections
   (or even only chapters) present.
 * Admonitions, which come in two versions:
   * `alert`, with a colored background, often with the famous
     admonition colores from the original Bootstrap theme
   * `panel`, with a colored heading but otherwise white background for
     the content.
 * Jumbotron, which is explained and illustrated in all the demos
   below.
 * A flexible grid of cells with various document elements (code, math,
   text, images). This makes it easy to have images in one column and
   text or code in another. The demos below illustrates such grids.

=== The basic style ===

A "plain Bootstrap style": "bootstrap_plain.html" is generated by

!bc sys
doconce format html bootstrap_demo --html_style=bootstrap
        --pygments_html_style=default --html_admon=bootstrap_panel
doconce split_html bootstrap_demo --pagination --nav_button=bottom
!ec
If you do not like the special red font used for inline verbatim
(monospace) text, use the option `--html_code_style=inherit` to
force the background and foreground colors to inherit from the
colors used in the document.
# --html_pre_style=inherit

__Placement of navigation buttons.__
Navigation buttons or a page indicator can be
placed at the bottom of the page (default), the top, or both at the
top and bottom using `--nav_button=bottom`, `--nav_button=top`, or
`--nav_buttom=top+bottom`, respectively as option to `doconce split_html`.
By default, navigation buttons with `Prev` and `Next` are used, but
the `--pagination` option replaces buttons with a horizontal "array of page
numbers": "bootstrap_plain.html".


===== Color variations of the original Bootstrap theme =====

Some color variations of the basic Bootstrap theme are bundled with
DocOnce:

<%
options="--html_admon=bootstrap_panel --html_code_style=inherit"
%>

 * "bootflat": "bootstrap_bootflat.html" (`--html_style=bootstrap_bootflat ${options}`)
 * "Flat UI": "bootstrap_FlatUI.html" (`--html_style=bootstrap_FlatUI ${options}`)
 * "blue": "bootstrap_blue.html" (`--html_style=bootstrap_blue  ${options}`)
 * "bluegray": "bootstrap_bluegray.html" (`--html_style=bootstrap_bluegray  ${options}`)
 * "brown": "bootstrap_brown.html" (`--html_style=bootstrap_brown  ${options}`)
 * "red": "bootstrap_red.html" (`--html_style=bootstrap_red  ${options}`)
 * "bloodish": "bootstrap_bloodish.html" (`--html_style=bootstrap_bloodish  ${options}`)
 * "cbc": "cbc.html" (`--html_style=bootstrap_cbc  ${options}`)
 * "simula": "bootstrap_simula.html" (`--html_style=bootstrap_simula  ${options}`)

===== Bootswatch styles =====

URL: "http://bootswatch.com" offers a series of free Bootstrap styles
with different designs. Typical generation of styles with white background
goes like

!bc sys
doconce format html bootstrap_demo --html_style=bootswatch_simplex
        --pygments_html_style=default --html_admon=bootstrap_panel
        -html_pre_style=inherit
!ec
This gives admonitions with `panel` style. With the `alert` style we
normally like to have computer code with the same background as
the alert and consequently add the option `-html_pre_style=inherit`:

!bc sys
doconce format html bootstrap_demo --html_style=bootswatch_simplex
        --pygments_html_style=default --html_admon=bootstrap_alert
        -html_code_style=inherit -html_pre_style=inherit
!ec

For dark styles we use `--html_pre_style=inherit --keep_pygments_html_bg`
as options to avoid any white background. We also use a dark pygments
style for computer code blocks: `--pygments_html_style=monokai`.

!bc sys
doconce format html bootstrap_demo --html_style=bootswatch_slate
        --pygments_html_style=monokai --html_admon=bootstrap_panel
        --html_output=cyborg --keep_pygments_html_bg
        --html_code_style=inherit --html_pre_style=inherit
!ec

!bnotice Tip: Some Bootswatch styles benefit from larger font!
Some of the Boostrap/Bootswatch styles come with quite small fonts,
which make the text very dense. Use the command-line option
`"--html_body_style=font-size:20px;line-height:1.5"` to override the
font size and the line height (the chosen values are suitable for
`bootswatch_journal`).
!enotice

Admons with `panel` style:

 * White background:
   * "journal": "journal.html"
   * "journal with bigger font and more space": "journal_big.html" (`"--html_body_style=font-size:20px;line-height:1.5"`)
   * "readable": "readable.html"
   * "simplex": "simplex.html"
   * "cerulean": "cerulean.html"
   * "flatly": "flatly.html"
   * "cosmo": "cosmo.html"
   * "lumen": "lumen.html"
   * "spacelab": "spacelab.html"
   * "united": "united.html"
   * "yeti": "yeti.html"
 * Dark background:
   * "slate": "slate.html"
   * "cyborg": "cyborg.html"
   * "darkly": "darkly.html"
   * "superhero": "superhero.html"
   * "amelia": "amelia.html"

Admons as alerts (colored background):

 * White background:
   * "journal": "journal_v1.html"
   * "readable": "readable_v1.html"
   * "simplex": "simplex_v1.html"
   * "cerulean": "cerulean_v1.html"
   * "flatly": "flatly_v1.html"
   * "cosmo": "cosmo_v1.html"
   * "lumen": "lumen_v1.html"
   * "spacelab": "spacelab_v1.html"
   * "united": "united_v1.html"
   * "yeti": "yeti_v1.html"
 * Dark background:
   * "slate": "slate_v1.html"
   * "cyborg": "cyborg_v1.html"
   * "darkly": "darkly_v1.html"
   * "superhero": "superhero_v1.html"
   * "amelia": "amelia_v1.html"


===== Special templates based on Bootstrap themes =====

The styles above are generated by DocOnce at compile time. There is also
a possibility to specify an HTML template file where the core DocOnce
text are embedded. In this way, one has complete control of the header and
footer parts of the document, and in particular layouts based on having
the core text inside nested `<div>` tags.

DocOnce comes with two Bootstrap-based templates:

 * "vagrant": "vagrant.html" (`--html_style=bootstrap --html_template=template_vagrant.html --html_toc_indent=0`)
 * "bootstrap with fixed toc on the right": "bootstrap_wtoc.html" (`--html_style=bootstrap --html_template=template_bootstrap_wtoc.html`)


# #ifdef EXTRA
https://kuler.adobe.com/My-Kuler-Themek-color-theme-3787095/
https://kuler.adobe.com/Theme-6-color-theme-3787059/
https://kuler.adobe.com/inspiration-color-theme-3787021/
https://kuler.adobe.com/Milk-Bath-color-theme-3786952/
https://kuler.adobe.com/Frost-Tones-color-theme-3786775/
https://kuler.adobe.com/Slate-Blue-Green-BG-color-theme-3789907/
https://kuler.adobe.com/a42637-color-theme-3789783/
https://kuler.adobe.com/CQM_RenBar_3-color-theme-3789628/
https://kuler.adobe.com/Peacock-Monochromatic-color-theme-3789407/
https://kuler.adobe.com/Copy-of-Copy-of-Red-Embrace-color-theme-3791663/

http://paintstrap.com/
# #endif
