Code Monkey home page Code Monkey logo

wordpress-bootstrap's Introduction

##Use Twitter Bootstrap in your WordPress plugins

This namespaced version of Twitter Bootstrap is specifically for crafting awesome, responsive UI for WordPress plugins. The toolkit gives you access to the entire Twitter Bootstrap package: base CSS, responsive scaffolding, buttons, tabs, forms, and javascript plugins, so that you can design with the widest possible palette of flexible UI.

To use the toolkit with your plugin:

Copy the css, js, and images folders from our bootstrap folder into your plugin directory.

Register the css and js files in your plugin init callback:

wp_register_style('boostrap_css', plugins_url('css/bootstrap.css', __FILE__));
wp_register_style('bootstrap_responsive_css', plugins_url('css/bootstrap-responsive.css', __FILE__));
wp_register_script('bootstrap_js', plugins_url('js/bootstrap.js', __FILE__));

Then, enqueue these files any time your UI depends on them:

wp_enqueue_style('bootstrap_css');
wp_enqueue_style('boosttrap_responsive_css');
wp_enqueue_script('bootstrap_js');

Wrap the UI you want to style with Twitter Bootstrap in a namespaced container, e.g.,

<div class="wp_bootstrap">
  <!-- Twitter Bootstrap styles are applied here -->
</div>

##How did we do this?

With the power of less. Twitter Bootstrap makes use of less in its stylesheets. We simply prefixed Twitter's styles with .wp_bootstrap.

##Build bootstrap for WordPress

We have included a makefile with convenience methods for working with the Bootstrap library.

  • build - make Runs the LESS compiler to rebuild the /less files and compiles the docs pages. Requires lessc and uglify-js. Read more in Twitter's docs.

  • watch - make watch This is a convenience method for watching just Less files and automatically building them whenever you save. Requires the Watchr gem.

##About the Developers

Twitter Bootstrap for WordPress was forged by Joey Blake for Fat Panda. But it wouldn't have been possible without the awesome work by the Twitter guys who made Twitter Bootstrap.

wordpress-bootstrap's People

Contributors

mdo avatar fat avatar collegeman avatar joeyblake avatar lookfirst avatar cgunther avatar smaboshe avatar purwandi avatar caniszczyk avatar buraktuyan avatar ansman avatar rvagg avatar sankage avatar pthrasher avatar necolas avatar tinyfly avatar mgaetan89 avatar pokonski avatar pamelafox avatar wrightlabs avatar calvein avatar evnm avatar dhs avatar aaronj1335 avatar kriansa avatar nkryptic avatar eirikb avatar raulriera avatar matthewpennell avatar mchung avatar

Stargazers

 avatar

Watchers

 avatar  avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.