I think overly complex starter examples are a waste. They let the creator think they have provided something without actually helping the new person find their way. If you wanted the BootStrap Navbar, for example, it's hard to find that element in a way you can just use it and figure out how to get fancy later.
I've been taking a course that includes Bootstrap, and it's helped me figure out how it works. So I decided to so create a database showing some of the basics so someone moving to Bootstrap (especially from traditional Notes or non-Bootstrap XPage work). It's not designed to show everything, but to help out in showing some of the basics. I think once someone gets these under their belt, the rest will come more easily.
Here is what is in this example, all in separate XPages so you can see just that.
- NavBar: the useful top. This one includes some links that collapse to the burger menu when on a mobile device. Also I've included a glyph in the upper right which is common and looks good.
- Jumbotron: The big top on a lot of websites, and with a button to go somewhere. It also shows how to use the Bootstrap styling of a button "btn btn-primary", you can put in "btn btn-success" for the green one, for example.
- Well/InputForm: This is my most complex entry here. This gives the nice appearance where there is grey box (the "well") with labels and fields and a nice button.
- Put everything in a container, there there is a div for the well, then a div for the form group. These combine for the appearance desired.
- I use the a "Display Errors" control and style it with the "alert alert-danger" for the expected Bootstrap validation.
- I put in a combobox so you can see how it styles as well
- ContexturalBackgrounds: these show the colors behind a paragraph or other elements. I have a variety of them.
- Lists: Also showing different colors for list items, list groups, and divs where you can put other elements.
- Offset columns: Bootstrap uses a grid system, and I have a page sampling the width and offset. Offset lets you specify the number of columns on either side of the 'populated' column. These allow the resizing needed going from desktops to mobile devices.
If you need to use Themes in your application, you can incorporate this one like this:
<theme extends="Bootstrap3.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<!-- jQuery -->
It's the first node, "theme extends" that does it, incorporating the Bootstrap theme from the Extension library into the theme you need.
It is my hope that this will be easier for someone to see how Bootstrap works in XPages
Here is the database.