nunjucks-bootstrap

0.2.0 • Public • Published

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:

<nav>
    <h2 class="sr-only">Site menu</h2>
    {% call nav.inline() %}
     {{ nav.activeItem('Active', '#item1') }}
        {{ nav.item('Default item', '#item2') }}
     <li>use <strong>custom HTML</strong> anywhere</li>
        {{ nav.item('Another item', '#item3') }}
    {% endcall %}
</nav>

Modules

You can view the demos of all available modules.

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.

Readme

Keywords

none

Package Sidebar

Install

npm i nunjucks-bootstrap

Weekly Downloads

2

Version

0.2.0

License

MIT

Last publish

Collaborators

  • jbmoelker