1. Basic navbar
To start, navbars are static (not fixed at the top) and include project name and basic navigation.
Example of Asciidoc document. See source text
[https://raw.github.com/llaville/asciidoc-bootstrap-backend/master/examples/demo.asciidoc]
.
You have to provide a brand
and navinfo
(or navinfo1
or navinfo2
) attributes to see something.
Otherwise you will see an empty navbar.
2. Result with default theme
Invoke the following command:
$ asciidoc
-b bootstrap
-f /path/to/examples/demo4.conf
-o navbar-default-sample.html
-a navbar=default
/path/to/examples/demo.asciidoc
And here are the final result that you should get.
3. About options to generate documents
We reused and group all common attributes to generate documents in a standard asciidoc configuration file called demo4.conf
.
[attributes] linkcss numbered lang=en jumbotron jumbotron-fullwidth! totop iconsfont=font-awesome footer! footer-fullwidth! brand="My Project" tocmmenu stylesheet=user2.css
With custom user stylesheet called user2.css
a.toc-top-link {
right: 0.5em;
position: absolute;
}
.mm-menu {
width: 70%;
}
.mm-listview .mm-next::before {
border-left-style: none;
}
.jumbotron .toc-top-link {
display: none;
}
footer[role="contentinfo"] {
background-color: inherit;
}
invoke the following command:
$ asciidoc
-b bootstrap
-f /path/to/examples/bootstrap3.conf
/path/to/examples/{docfile}
[http://asciidoc.org/userguide.html#X60]
for
docfile
attribute.With this configuration file called bootstrap3.conf
[attributes] linkcss numbered tocmmenu toclevels=2 lang=en jumbotron jumbotron-fullwidth totop stylesheet=user.css iconsfont=font-awesome theme=readable themeswitcher themeswitcher-cookiethemename=adocbsexamples.bootstrapTheme.name themeswitcher-cookiethemecss=adocbsexamples.bootstrapTheme.css navbar=fixed navinfo1 footer! footer-fullwidth
And custom user stylesheet called user.css
a.toc-top-link {
right: 0.5em;
position: absolute;
}
.mm-menu {
width: 70%;
}
.mm-listview .mm-next::before {
border-left-style: none;
}
.jumbotron .toc-top-link {
display: none;
}