Nunjucks Bootstrap
Nunjucks templates (macros) for Bootstrap (v4) modules.
Purpose
This project provides a collection of reusable macros for Bootstrap modules to quickly create web pages. Each module offers multiple very small macros, which allow you to mix and match, use them all, or just a few of them.
The macros produce HTML, so you can combine macros and HTML as you please. Here's an example:
Site menu {% call nav.inline() %} {{ nav.activeItem('Active', '#item1') }} {{ nav.item('Default item', '#item2') }} use custom HTML anywhere {{ nav.item('Another item', '#item3') }} {% endcall %}
Modules
You can view the demos of all available modules.
- media
- nav
The source files of all modules can be found in src/
. Each module has its own readme with instructions on how to use its macros.
Template render engines
These templates are created for Nunjucks (JavaScript). The templates can also be used with template render engines in other languages (mostly without modification): Jinja2 (Python), Twig (PHP), Jinjava (Java) and Pongo (Go Lang).
Contributing
See CONTRIBUTING.md for guidelines and development scripts.