Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bootstrap-helpers

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bootstrap-helpers

View helpers for using Twitter Bootstrap components and general markup

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

bootstrap-helpers

Install

$ npm install bootstrap-helpers

Usage

The examples here are Express and EJS, but the underlying functions are just string manipulation and are completely template/framework-agnostic. :)

// Express 3
app.locals.bootstrap = require("bootstrap-helpers");
// Express 2
app.helpers("bootstrap", require("bootstrap-helpers"));

// view.ejs
<%- bootstrap.button("Call to Action", {
    style: "primary",
    size:  "large"
}) %>
<button class="btn btn-primary btn-large" type="button">Call to Action</button>

<%- bootstrap.container({ fluid: true }); %>
<div class="container-fluid">
    <%- bootstrap.row({ fluid: true }) %>
    <div class="row-fluid">
        <%- bootstrap.col(4, { tag: "aside" }) %>
        <aside class="span4">
            Sidebar
        <%- bootstrap.colEnd("aside") %>
        </aside>

        <%- bootstrap.col(8, { id: "main" }) %>
        <div class="span8" id="main">
            <p>Hello World!</p>
        <%- bootstrap.colEnd() %>
        </div>
    <%- bootstrap.rowEnd() %>
    </div>
<%- bootstrap.containerEnd() %>
</div>

Changelog

0.0.1 Initial Release

Keywords

FAQs

Package last updated on 23 Oct 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc