diff --git a/docs/_config.yml b/docs/_config.yml index e9e9dbae25..2732bd7108 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,17 +1,54 @@ ---- -markdown: redcarpet -name: React -description: A JavaScript library for building user interfaces -redcarpet: - extensions: - - fenced_code_blocks -react_version: 0.3.2 -pygments: true -exclude: +--- +baseurl: /react +url: http://facebook.github.io +permalink: /blog/:year/:month/:day/:title.html +exclude: - Gemfile - Gemfile.lock - README.md - Rakefile -url: http://facebook.github.io -baseurl: /react -permalink: /blog/:year/:month/:day/:title.html +redcarpet: + extensions: + - fenced_code_blocks +pygments: true +name: React +markdown: redcarpet +react_version: 0.4.0a +description: A JavaScript library for building user interfaces +relative_permalinks: true + +nav_docs_sections: +- title: Quick Start + items: + - id: getting-started + title: Getting Started + - id: tutorial + title: Tutorial +- title: Guides + items: + - id: why-react + title: Why React? + - id: displaying-data + title: Displaying Data + subitems: + - id: jsx-in-depth + title: JSX in Depth + - id: jsx-gotchas + title: JSX Gotchas + - id: interactivity-and-dynamic-uis + title: Interactivity and Dynamic UIs + - id: multiple-components + title: Multiple Components + - id: reusable-components + title: Reusable Components + - id: forms + title: Forms + - id: working-with-the-browser + title: Working With the Browser + subitems: + - id: more-about-refs + title: More About Refs + - id: tooling-integration + title: Tooling integration + - id: reference + title: Reference diff --git a/docs/_css/react.scss b/docs/_css/react.scss index 971701ed81..68bfe87e81 100644 --- a/docs/_css/react.scss +++ b/docs/_css/react.scss @@ -206,6 +206,9 @@ li { list-style: none; margin: 0; } + ul ul { + margin-left: 20px; + } li { margin: 0; } diff --git a/docs/_includes/nav_docs.html b/docs/_includes/nav_docs.html index 1dbd3b5c91..e71ece3cb2 100644 --- a/docs/_includes/nav_docs.html +++ b/docs/_includes/nav_docs.html @@ -1,31 +1,27 @@ diff --git a/docs/_js/examples/markdown.js b/docs/_js/examples/markdown.js index ec70b95503..89facd3a26 100644 --- a/docs/_js/examples/markdown.js +++ b/docs/_js/examples/markdown.js @@ -11,9 +11,9 @@ var MarkdownEditor = React.createClass({\n\ getInitialState: function() {\n\ return {value: 'Type some *markdown* here!'};\n\ },\n\ - handleInput: React.autoBind(function() {\n\ + handleInput: function() {\n\ this.setState({value: this.refs.textarea.getDOMNode().value});\n\ - }),\n\ + },\n\ render: function() {\n\ return (\n\
\n\ diff --git a/docs/_js/examples/timer.js b/docs/_js/examples/timer.js index f0488ec403..68f4f65761 100644 --- a/docs/_js/examples/timer.js +++ b/docs/_js/examples/timer.js @@ -7,9 +7,9 @@ var Timer = React.createClass({\n\ getInitialState: function() {\n\ return {secondsElapsed: 0};\n\ },\n\ - tick: React.autoBind(function() {\n\ + tick: function() {\n\ this.setState({secondsElapsed: this.state.secondsElapsed + 1});\n\ - }),\n\ + },\n\ componentDidMount: function() {\n\ setInterval(this.tick, 1000);\n\ },\n\ diff --git a/docs/docs/01-why-react.md b/docs/docs/01-why-react.md new file mode 100644 index 0000000000..0968b72906 --- /dev/null +++ b/docs/docs/01-why-react.md @@ -0,0 +1,30 @@ +--- +id: why-react +title: Why React? +layout: docs +permalink: why-react.html +next: displaying-data.html +--- +React is a JavaScript library for creating user interfaces by Facebook and Instagram. Many people choose to think of React as the **V** in **[MVC](http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller)**. + +We built React to solve one problem: **building large applications with data that changes over time**. To do this, React uses two main ideas. + +### Simple + +Simply express how your app should look at any given point in time, and React will automatically manage all UI updates when your underlying data changes. + +### Declarative + +When the data changes, React conceptually hits the "refresh" button, and knows to only update the changed parts. + +## Build Composable Components + +React is all about building reusable components. In fact, with React the *only* thing you do is build components. Since they're so encapsulated, components make code reuse, testing, and separation of concerns easy. + +## Give It Five Minutes + +React challenges a lot of conventional wisdom, and at first glance some of the ideas may seem crazy. [Give it five minutes](http://37signals.com/svn/posts/3124-give-it-five-minutes) while reading this guide; those crazy ideas have worked for building thousands of components both inside and outside of Facebook and Instagram. + +## Learn More + +You can learn more about our motivations behind building React in [this blog post](http://facebook.github.io/react/blog/2013/06/05/why-react.html). diff --git a/docs/docs/02-displaying-data.md b/docs/docs/02-displaying-data.md new file mode 100644 index 0000000000..72954a596e --- /dev/null +++ b/docs/docs/02-displaying-data.md @@ -0,0 +1,91 @@ +--- +id: displaying-data +title: Displaying Data +layout: docs +permalink: displaying-data.html +prev: why-react.html +next: jsx-in-depth.html +--- + +The most basic thing you can do with a UI is display some data. React makes it easy to display data and automatically keeps the interface up-to-date when the data changes. + + +## Getting Started + +Let's look at a really simple example. Create a `hello-react.html` file with the following code: + +```html + + + + Hello React + + + + +
+ + + +``` + +For the rest of the documentation, we'll just focus on the JavaScript code and assume it's inserted into a template like the one above. Replace the placeholder comment above with the following JS: + +```javascript +/** @jsx React.DOM */ + +var HelloWorld = React.createClass({ + render: function() { + return ( +

+ Hello, ! + It is {this.props.date.toTimeString()} +

+ ); + } +}); + +setInterval(function() { + React.renderComponent( + , + document.getElementById('example') + ); +}, 500); +``` + + +## Reactive Updates + +Open `hello-react.html` in a web browser and type your name into the text field. Notice that React is only changing the time string in the UI — any input you put in the text field remains, even though you haven't written any code to manage this behavior. React figures it out for you and does the right thing. + +The way we are able to figure this out is that React does not manipulate the DOM unless it needs to. **It uses a fast, internal mock DOM to perform diffs and computes the most efficient DOM mutation for you.** + +The inputs to this component are called `props` — short for "properties". They're passed as attributes in JSX syntax. You should think of these as immutable within the component, that is, **never write to `this.props`**. + + +## Components are Just Like Functions + +React components are very simple. You can think of them as simple function that take in `props` and `state` (discussed later) and render HTML. Because they're so simple, it makes them very easy to reason about. + +> Note: +> +> **One limitation**: React components can only render a single root node. If you want to return multiple nodes they *must* be wrapped in a single root. + + +## JSX Syntax + +We strongly believe that components are the right way to separate concerns rather than "templates" and "display logic." We think that markup and the code that generates it are intimately tied together. Additionally, display logic is often very complex and using template languages to express it becomes cumbersome. + +We've found that the best solution for this problem is to generate markup directly from the JavaScript code such that you can use all of the expressive power of a real programming language to build UIs. In order to make this easier, we've added a very simple, **optional** HTML-like syntax for the function calls that generate markup called JSX. + +**JSX lets you write JavaScript function calls with HTML syntax.** To generate a link in React using pure JavaScript you'd write: `React.DOM.a({href: 'http://facebook.github.io/react/'}, 'Hello React!')`. With JSX this becomes `Hello React!`. We've found this has made building React apps easier and designers tend to prefer the syntax, but everyone has their own workflow, so **JSX is not required to use React.** + +JSX is very small; the "hello, world" example above uses every feature of JSX. To learn more about it, see [JSX in depth](./02.1-jsx-in-depth.html). Or see the transform in action in [our live JSX compiler](/react/jsx-compiler.html). + +JSX is similar to HTML, but not exactly the same. See [JSX gotchas](./02.2-jsx-gotchas.html) for some key differences. + +The easiest way to get started with JSX is to use the in-browser `JSXTransformer`. We strongly recommend that you don't use this in production. You can precompile your code using our command-line [react-tools](http://npmjs.org/package/react-tools) package. diff --git a/docs/docs/syntax.md b/docs/docs/02.1-jsx-in-depth.md similarity index 68% rename from docs/docs/syntax.md rename to docs/docs/02.1-jsx-in-depth.md index 570f933826..7be45709b9 100644 --- a/docs/docs/syntax.md +++ b/docs/docs/02.1-jsx-in-depth.md @@ -1,18 +1,17 @@ --- -id: docs-syntax -title: JSX Syntax -description: Writing JavaScript with XML syntax. +id: jsx-in-depth +title: JSX in Depth layout: docs -prev: common-questions.html -next: component-basics.html +permalink: jsx-in-depth.html +prev: displaying-data.html +next: jsx-gotchas.html --- -JSX is a JavaScript XML syntax transform recommended (but not required) for use +JSX is a JavaScript XML syntax transform recommended for use with React. -## Why JSX? -First of all, **don't use JSX if you don't like it!** +## Why JSX? React works out of the box without JSX. Simply construct your markup using the functions on `React.DOM`. For example, here's how to construct a simple link: @@ -23,21 +22,22 @@ var link = React.DOM.a({href: 'http://facebook.github.io/react'}, 'React'); We recommend using JSX for many reasons: -- It's easier to visualize the structure of the DOM. -- Designers are more comfortable making changes. -- It's familiar for those who have used MXML or XAML. +* It's easier to visualize the structure of the DOM. +* Designers are more comfortable making changes. +* It's familiar for those who have used MXML or XAML. + ## The Transform -JSX transforms XML-like syntax into native JavaScript. It turns XML elements and -attributes into function calls and objects, respectively. +JSX transforms from an XML-like syntax into native JavaScript. XML elements and +attributes are transformed into function calls and objects, respectively. ```javascript var Nav; // Input (JSX): var app =
+ +
+ +

Form control states

+
+
+

Bootstrap features styles for browser-supported focused and disabled states. We remove the default Webkit outline and apply a box-shadow in its place for :focus.

+
+

Form validation

+

It also includes validation styles for errors, warnings, and success. To use, add the error class to the surrounding .control-group.

+
+<fieldset
+  class="control-group error">
+  …
+</fieldset>
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ Some value here +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + Something may have gone wrong +
+
+
+ +
+ + Please correct the error +
+
+
+ +
+ + Woohoo! +
+
+
+ +
+ + Woohoo! +
+
+
+ + +
+
+
+
+
+ +
+ +

Extending form controls

+
+
+

Prepend & append inputs

+

Input groups—with appended or prepended text—provide an easy way to give more context for your inputs. Great examples include the @ sign for Twitter usernames or $ for finances.

+
+

Checkboxes and radios

+

Up to v1.4, Bootstrap required extra markup around checkboxes and radios to stack them. Now, it's a simple matter of repeating the <label class="checkbox"> that wraps the <input type="checkbox">.

+

Inline checkboxes and radios are also supported. Just add .inline to any .checkbox or .radio and you're done.

+
+

Inline forms and append/prepend

+

To use prepend or append inputs in an inline form, be sure to place the .add-on and input on the same line, without spaces.

+
+

Form help text

+

To add help text for your form inputs, include inline help text with <span class="help-inline"> or a help text block with <p class="help-block"> after the input element.

+
+
+
+
+
+ +
+ + + + + + +

Use the same .span* classes from the grid system for input sizes.

+
+
+
+ +
+ + + +

You may also use static classes that don't map to the grid, adapt to the responsive CSS styles, or account for varying types of controls (e.g., input vs. select).

+
+
+
+ +
+
+ @ +
+

Here's some help text

+
+
+
+ +
+
+ .00 +
+ Here's more help text +
+
+
+ +
+
+ $.00 +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+ + + +
+
+
+ +
+ + + +

Note: Labels surround all the options for much larger click areas and a more usable form.

+
+
+
+ +
+ + +
+
+
+ + +
+
+
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Buttonclass=""Description
btnStandard gray button with gradient
btn btn-primaryProvides extra visual weight and identifies the primary action in a set of buttons
btn btn-infoUsed as an alternative to the default styles
btn btn-successIndicates a successful or positive action
btn btn-warningIndicates caution should be taken with this action
btn btn-dangerIndicates a dangerous or potentially negative action
btn btn-inverseAlternate dark gray button, not tied to a semantic action or use
+ +
+
+

Buttons for actions

+

As a convention, buttons should only be used for actions while hyperlinks are to be used for objects. For instance, "Download" should be a button while "recent activity" should be a link.

+

Button styles can be applied to anything with the .btn class applied. However, typically you'll want to apply these to only <a> and <button> elements.

+

Cross browser compatibility

+

IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled button elements, rendering text gray with a nasty text-shadow that we cannot fix.

+
+
+

Multiple sizes

+

Fancy larger or smaller buttons? Add .btn-large, .btn-small, or .btn-mini for two additional sizes.

+

+ + +

+

+ + +

+

+ + +

+
+

Disabled state

+

For disabled buttons, add the .disabled class to links and the disabled attribute for <button> elements.

+

+ Primary link + Link +

+

+ + +

+

+ Heads up! + We use .disabled as a utility class here, similar to the common .active class, so no prefix is required. +

+
+
+

One class, multiple tags

+

Use the .btn class on an <a>, <button>, or <input> element.

+
+Link + + + +
+
+<a class="btn" href="">Link</a>
+<button class="btn" type="submit">
+  Button
+</button>
+<input class="btn" type="button"
+         value="Input">
+<input class="btn" type="submit"
+         value="Submit">
+
+

As a best practice, try to match the element for you context to ensure matching cross-browser rendering. If you have an input, use an <input type="submit"> for your button.

+
+
+
+ + + + +
+ +
+
+
    +
  • icon-glass
  • +
  • icon-music
  • +
  • icon-search
  • +
  • icon-envelope
  • +
  • icon-heart
  • +
  • icon-star
  • +
  • icon-star-empty
  • +
  • icon-user
  • +
  • icon-film
  • +
  • icon-th-large
  • +
  • icon-th
  • +
  • icon-th-list
  • +
  • icon-ok
  • +
  • icon-remove
  • +
  • icon-zoom-in
  • +
  • icon-zoom-out
  • +
  • icon-off
  • +
  • icon-signal
  • +
  • icon-cog
  • +
  • icon-trash
  • +
  • icon-home
  • +
  • icon-file
  • +
  • icon-time
  • +
  • icon-road
  • +
  • icon-download-alt
  • +
  • icon-download
  • +
  • icon-upload
  • +
  • icon-inbox
  • +
  • icon-play-circle
  • +
  • icon-repeat
  • +
  • icon-refresh
  • +
  • icon-list-alt
  • +
  • icon-lock
  • +
  • icon-flag
  • +
  • icon-headphones
  • +
+
+
+
    +
  • icon-volume-off
  • +
  • icon-volume-down
  • +
  • icon-volume-up
  • +
  • icon-qrcode
  • +
  • icon-barcode
  • +
  • icon-tag
  • +
  • icon-tags
  • +
  • icon-book
  • +
  • icon-bookmark
  • +
  • icon-print
  • +
  • icon-camera
  • +
  • icon-font
  • +
  • icon-bold
  • +
  • icon-italic
  • +
  • icon-text-height
  • +
  • icon-text-width
  • +
  • icon-align-left
  • +
  • icon-align-center
  • +
  • icon-align-right
  • +
  • icon-align-justify
  • +
  • icon-list
  • +
  • icon-indent-left
  • +
  • icon-indent-right
  • +
  • icon-facetime-video
  • +
  • icon-picture
  • +
  • icon-pencil
  • +
  • icon-map-marker
  • +
  • icon-adjust
  • +
  • icon-tint
  • +
  • icon-edit
  • +
  • icon-share
  • +
  • icon-check
  • +
  • icon-move
  • +
  • icon-step-backward
  • +
  • icon-fast-backward
  • +
+
+
+
    +
  • icon-backward
  • +
  • icon-play
  • +
  • icon-pause
  • +
  • icon-stop
  • +
  • icon-forward
  • +
  • icon-fast-forward
  • +
  • icon-step-forward
  • +
  • icon-eject
  • +
  • icon-chevron-left
  • +
  • icon-chevron-right
  • +
  • icon-plus-sign
  • +
  • icon-minus-sign
  • +
  • icon-remove-sign
  • +
  • icon-ok-sign
  • +
  • icon-question-sign
  • +
  • icon-info-sign
  • +
  • icon-screenshot
  • +
  • icon-remove-circle
  • +
  • icon-ok-circle
  • +
  • icon-ban-circle
  • +
  • icon-arrow-left
  • +
  • icon-arrow-right
  • +
  • icon-arrow-up
  • +
  • icon-arrow-down
  • +
  • icon-share-alt
  • +
  • icon-resize-full
  • +
  • icon-resize-small
  • +
  • icon-plus
  • +
  • icon-minus
  • +
  • icon-asterisk
  • +
  • icon-exclamation-sign
  • +
  • icon-gift
  • +
  • icon-leaf
  • +
  • icon-fire
  • +
  • icon-eye-open
  • +
+
+
+
    +
  • icon-eye-close
  • +
  • icon-warning-sign
  • +
  • icon-plane
  • +
  • icon-calendar
  • +
  • icon-random
  • +
  • icon-comment
  • +
  • icon-magnet
  • +
  • icon-chevron-up
  • +
  • icon-chevron-down
  • +
  • icon-retweet
  • +
  • icon-shopping-cart
  • +
  • icon-folder-close
  • +
  • icon-folder-open
  • +
  • icon-resize-vertical
  • +
  • icon-resize-horizontal
  • +
  • icon-hdd
  • +
  • icon-bullhorn
  • +
  • icon-bell
  • +
  • icon-certificate
  • +
  • icon-thumbs-up
  • +
  • icon-thumbs-down
  • +
  • icon-hand-right
  • +
  • icon-hand-left
  • +
  • icon-hand-up
  • +
  • icon-hand-down
  • +
  • icon-circle-arrow-right
  • +
  • icon-circle-arrow-left
  • +
  • icon-circle-arrow-up
  • +
  • icon-circle-arrow-down
  • +
  • icon-globe
  • +
  • icon-wrench
  • +
  • icon-tasks
  • +
  • icon-filter
  • +
  • icon-briefcase
  • +
  • icon-fullscreen
  • +
+
+
+ +
+ +
+
+

Built as a sprite

+

Instead of making every icon an extra request, we've compiled them into a sprite—a bunch of images in one file that uses CSS to position the images with background-position. This is the same method we use on Twitter.com and it has worked well for us.

+

All icons classes are prefixed with .icon- for proper namespacing and scoping, much like our other components. This will help avoid conflicts with other tools.

+

Glyphicons has granted us use of the Halflings set in our open-source toolkit so long as we provide a link and credit here in the docs. Please consider doing the same in your projects.

+
+
+

How to use

+

Bootstrap uses an <i> tag for all icons, but they have no case class—only a shared prefix. To use, place the following code just about anywhere:

+
+<i class="icon-search"></i>
+
+

There are also styles available for inverted (white) icons, made ready with one extra class:

+
+<i class="icon-search icon-white"></i>
+
+

There are 140 classes to choose from for your icons. Just add an <i> tag with the right classes and you're set. You can find the full list in sprites.less or right here in this document.

+

+ Heads up! + When using beside strings of text, as in buttons or nav links, be sure to leave a space after the <i> tag for proper spacing. +

+
+
+

Use cases

+

Icons are great, but where would one use them? Here are a few ideas:

+
    +
  • As visuals for your sidebar navigation
  • +
  • For a purely icon-driven navigation
  • +
  • For buttons to help convey the meaning of an action
  • +
  • With links to share context on a user's destination
  • +
+

Essentially, anywhere you can put an <i> tag, you can put an icon.

+
+
+ +

Examples

+

Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.

+
+
+
+
+ + + + +
+ +
+

+ Refresh + Checkout + Delete +

+

+ Comment + Settings + More Info +

+
+ +
+
+
+ +
+
+ +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/docs/likebutton/docs/components.html b/docs/docs/likebutton/docs/components.html new file mode 100755 index 0000000000..55eb2e4a13 --- /dev/null +++ b/docs/docs/likebutton/docs/components.html @@ -0,0 +1,1931 @@ + + + + + Components · Twitter Bootstrap + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+

Components

+

Dozens of reusable components are built into Bootstrap to provide navigation, alerts, popovers, and much more.

+ +
+ + + + +
+ +
+
+

Button groups

+

Use button groups to join multiple buttons together as one composite component. Build them with a series of <a> or <button> elements.

+

Best practices

+

We recommend the following guidelines for using button groups and toolbars:

+
    +
  • Always use the same element in a single button group, <a> or <button>.
  • +
  • Don't mix buttons of different colors in the same button group.
  • +
  • Use icons in addition to or instead of text, but be sure include alt and title text where appropriate.
  • +
+

Related Button groups with dropdowns (see below) should be called out separately and always include a dropdown caret to indicate intended behavior.

+
+
+

Default example

+

Here's how the HTML looks for a standard button group built with anchor tag buttons:

+
+
+ + + +
+
+
+<div class="btn-group">
+  <button class="btn">1</button>
+  <button class="btn">2</button>
+  <button class="btn">3</button>
+</div>
+
+

Toolbar example

+

Combine sets of <div class="btn-group"> into a <div class="btn-toolbar"> for more complex components.

+
+
+ + + + +
+
+ + + +
+
+ +
+
+
+<div class="btn-toolbar">
+  <div class="btn-group">
+    ...
+  </div>
+</div>
+
+
+
+

Checkbox and radio flavors

+

Button groups can also function as radios, where only one button may be active, or checkboxes, where any number of buttons may be active. View the Javascript docs for that.

+

Get the javascript »

+

Dropdowns in button groups

+

Heads up! Buttons with dropdowns must be individually wrapped in their own .btn-group within a .btn-toolbar for proper rendering.

+
+
+
+ + + + +
+ + +

Button dropdowns

+
+
+

Overview and examples

+

Use any button to trigger a dropdown menu by placing it within a .btn-group and providing the proper menu markup.

+ + +
+
+

Example markup

+

Similar to a button group, our markup uses regular button markup, but with a handful of additions to refine the style and support Bootstrap's dropdown jQuery plugin.

+
+<div class="btn-group">
+  <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
+    Action
+    <span class="caret"></span>
+  </a>
+  <ul class="dropdown-menu">
+    <!-- dropdown menu links -->
+  </ul>
+</div>
+
+
+
+
+
+

Works with all button sizes

+

Button dropdowns work at any size. your button sizes to .btn-large, .btn-small, or .btn-mini.

+
+
+ + +
+
+ + +
+ +
+
+
+

Requires javascript

+

Button dropdowns require the Bootstrap dropdown plugin to function.

+

In some cases—like mobile—dropdown menus will extend outside the viewport. You need to resolve the alignment manually or with custom javascript.

+
+
+
+ +

Split button dropdowns

+
+
+

Overview and examples

+

Building on the button group styles and markup, we can easily create a split button. Split buttons feature a standard action on the left and a dropdown toggle on the right with contextual links.

+ + +
+ +
+

Sizes

+

Utilize the extra button classes .btn-mini, .btn-small, or .btn-large for sizing.

+
+
+ + + +
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+<div class="btn-group">
+  ...
+  <ul class="dropdown-menu pull-right">
+    <!-- dropdown menu links -->
+  </ul>
+</div>
+
+
+
+

Example markup

+

We expand on the normal button dropdowns to provide a second button action that operates as a separate dropdown trigger.

+
+<div class="btn-group">
+  <button class="btn">Action</button>
+  <button class="btn dropdown-toggle" data-toggle="dropdown">
+    <span class="caret"></span>
+  </button>
+  <ul class="dropdown-menu">
+    <!-- dropdown menu links -->
+  </ul>
+</div>
+
+

Dropup menus

+

Dropdown menus can also be toggled from the bottom up by adding a single class to the immediate parent of .dropdown-menu. It will flip the direction of the .caret and reposition the menu itself to move from the bottom up instead of top down.

+
+ +
+ + + +
+
+
+<div class="btn-group dropup">
+  <button class="btn">Dropup</button>
+  <button class="btn dropdown-toggle" data-toggle="dropdown">
+    <span class="caret"></span>
+  </button>
+  <ul class="dropdown-menu">
+    <!-- dropdown menu links -->
+  </ul>
+</div>
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + +
+ + +

Multicon-page pagination

+
+
+

When to use

+

Ultra simplistic and minimally styled pagination inspired by Rdio, great for apps and search results. The large block is hard to miss, easily scalable, and provides large click areas.

+

Stateful page links

+

Links are customizable and work in a number of circumstances with the right class. .disabled for unclickable links and .active for current page.

+

Flexible alignment

+

Add either of two optional classes to change the alignment of pagination links: .pagination-centered and .pagination-right.

+
+
+

Examples

+

The default pagination component is flexible and works in a number of variations.

+ + + + +
+
+

Markup

+

Wrapped in a <div>, pagination is just a <ul>.

+
+<div class="pagination">
+  <ul>
+    <li><a href="#">Prev</a></li>
+    <li class="active">
+      <a href="#">1</a>
+    </li>
+    <li><a href="#">2</a></li>
+    <li><a href="#">3</a></li>
+    <li><a href="#">4</a></li>
+    <li><a href="#">Next</a></li>
+  </ul>
+</div>
+
+
+
+ +

Pager For quick previous and next links

+
+
+

About pager

+

The pager component is a set of links for simple pagination implementations with light markup and even lighter styles. It's great for simple sites like blogs or magazines.

+

Optional disabled state

+

Pager links also use the general .disabled class from the pagination.

+
+
+

Default example

+

By default, the pager centers links.

+ +
+<ul class="pager">
+  <li>
+    <a href="#">Previous</a>
+  </li>
+  <li>
+    <a href="#">Next</a>
+  </li>
+</ul>
+
+
+
+

Aligned links

+

Alternatively, you can align each link to the sides:

+ +
+<ul class="pager">
+  <li class="previous">
+    <a href="#">&larr; Older</a>
+  </li>
+  <li class="next">
+    <a href="#">Newer &rarr;</a>
+  </li>
+</ul>
+
+
+
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LabelsMarkup
+ Default + + <span class="label">Default</span> +
+ Success + + <span class="label label-success">Success</span> +
+ Warning + + <span class="label label-warning">Warning</span> +
+ Important + + <span class="label label-important">Important</span> +
+ Info + + <span class="label label-info">Info</span> +
+ Inverse + + <span class="label label-inverse">Inverse</span> +
+
+ + + + +
+ +
+
+

About

+

Badges are small, simple components for displaying an indicator or count of some sort. They're commonly found in email clients like Mail.app or on mobile apps for push notifications.

+
+
+

Available classes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameExampleMarkup
+ Default + + 1 + + <span class="badge">1</span> +
+ Success + + 2 + + <span class="badge badge-success">2</span> +
+ Warning + + 4 + + <span class="badge badge-warning">4</span> +
+ Important + + 6 + + <span class="badge badge-important">6</span> +
+ Info + + 8 + + <span class="badge badge-info">8</span> +
+ Inverse + + 10 + + <span class="badge badge-inverse">10</span> +
+
+
+
+ + + + +
+ +

Hero unit

+
+
+

Bootstrap provides a lightweight, flexible component called a hero unit to showcase content on your site. It works well on marketing and content-heavy sites.

+

Markup

+

Wrap your content in a div like so:

+
+<div class="hero-unit">
+  <h1>Heading</h1>
+  <p>Tagline</p>
+  <p>
+    <a class="btn btn-primary btn-large">
+      Learn more
+    </a>
+  </p>
+</div>
+
+
+
+
+

Hello, world!

+

This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.

+

Learn more

+
+
+
+

Page header

+
+
+

A simple shell for an h1 to appropriately space out and segment sections of content on a page. It can utilize the h1's default small, element as well most other components (with additional styles).

+
+
+ +
+<div class="page-header">
+  <h1>Example page header</h1>
+</div>
+
+
+
+
+ + + + +
+ + +
+
+

Default thumbnails

+

By default, Bootstrap's thumbnails are designed to showcase linked images with minimal required markup.

+ +
+
+

Highly customizable

+

With a bit of extra markup, it's possible to add any kind of HTML content like headings, paragraphs, or buttons into thumbnails.

+
    +
  • +
    + +
    +
    Thumbnail label
    +

    Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

    +

    Action Action

    +
    +
    +
  • +
  • +
    + +
    +
    Thumbnail label
    +

    Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

    +

    Action Action

    +
    +
    +
  • +
+
+
+ +
+
+

Why use thumbnails

+

Thumbnails (previously .media-grid up until v1.4) are great for grids of photos or videos, image search results, retail products, portfolios, and much more. They can be links or static content.

+
+
+

Simple, flexible markup

+

Thumbnail markup is simple—a ul with any number of li elements is all that is required. It's also super flexible, allowing for any type of content with just a bit more markup to wrap your contents.

+
+
+

Uses grid column sizes

+

Lastly, the thumbnails component uses existing grid system classes—like .span2 or .span3—for control of thumbnail dimensions.

+
+
+ +
+
+

The markup

+

As mentioned previously, the required markup for thumbnails is light and straightforward. Here's a look at the default setup for linked images:

+
+<ul class="thumbnails">
+  <li class="span3">
+    <a href="#" class="thumbnail">
+      <img src="http://placehold.it/260x180" alt="">
+    </a>
+  </li>
+  ...
+</ul>
+
+

For custom HTML content in thumbnails, the markup changes slightly. To allow block level content anywhere, we swap the <a> for a <div> like so:

+
+<ul class="thumbnails">
+  <li class="span3">
+    <div class="thumbnail">
+      <img src="http://placehold.it/260x180" alt="">
+      <h5>Thumbnail label</h5>
+      <p>Thumbnail caption right here...</p>
+    </div>
+  </li>
+  ...
+</ul>
+
+
+
+

More examples

+

Explore all your options with the various grid classes available to you. You can also mix and match different sizes.

+ +
+
+ +
+ + + + +
+ + +

Lightweight defaults

+
+
+

Rewritten base class

+

With Bootstrap 2, we've simplified the base class: .alert instead of .alert-message. We've also reduced the minimum required markup—no <p> is required by default, just the outer <div>.

+

Single alert message

+

For a more durable component with less code, we've removed the differentiating look for block alerts, messages that come with more padding and typically more text. The class also has changed to .alert-block.

+
+

Goes great with javascript

+

Bootstrap comes with a great jQuery plugin that supports alert messages, making dismissing them quick and easy.

+

Get the plugin »

+
+
+

Example alerts

+

Wrap your message and an optional close icon in a div with simple class.

+
+ + Warning! Best check yo self, you're not looking too good. +
+
+<div class="alert">
+  <button class="close" data-dismiss="alert">×</button>
+  <strong>Warning!</strong> Best check yo self, you're not looking too good.
+</div>
+
+

Heads up! iOS devices require an href="#" for the dismissal of alerts. Be sure to include it and the data attribute for anchor close icons. Alternatively, you may use a <button> element with the data attribute, which we have opted to do for our docs. When using <button>, you must include type="button" or your forms may not submit.

+

Easily extend the standard alert message with two optional classes: .alert-block for more padding and text controls and .alert-heading for a matching heading.

+
+ +

Warning!

+

Best check yo self, you're not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

+
+
+<div class="alert alert-block">
+  <a class="close" data-dismiss="alert" href="#">×</a>
+  <h4 class="alert-heading">Warning!</h4>
+  Best check yo self, you're not...
+</div>
+
+
+
+ +

Contextual alternatives Add optional classes to change an alert's connotation

+
+
+

Error or danger

+
+ + Oh snap! Change a few things up and try submitting again. +
+
+<div class="alert alert-error">
+  ...
+</div>
+
+
+
+

Success

+
+ + Well done! You successfully read this important alert message. +
+
+<div class="alert alert-success">
+  ...
+</div>
+
+
+
+

Information

+
+ + Heads up! This alert needs your attention, but it's not super important. +
+
+<div class="alert alert-info">
+  ...
+</div>
+
+
+
+ +
+ + + + +
+ + +

Examples and markup

+
+
+

Basic

+

Default progress bar with a vertical gradient.

+
+
+
+
+<div class="progress">
+  <div class="bar"
+       style="width: 60%;"></div>
+</div>
+
+
+
+

Striped

+

Uses a gradient to create a striped effect (no IE).

+
+
+
+
+<div class="progress progress-striped">
+  <div class="bar"
+       style="width: 20%;"></div>
+</div>
+
+
+
+

Animated

+

Takes the striped example and animates it (no IE).

+
+
+
+
+<div class="progress progress-striped
+     active">
+  <div class="bar"
+       style="width: 40%;"></div>
+</div>
+
+
+
+ +

Options and browser support

+
+
+

Additional colors

+

Progress bars use some of the same button and alert classes for consistent styles.

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Striped bars

+

Similar to the solid colors, we have varied striped progress bars.

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Behavior

+

Progress bars use CSS3 transitions, so if you dynamically adjust the width via javascript, it will smoothly resize.

+

If you use the .active class, your .progress-striped progress bars will animate the stripes left to right.

+
+
+

Browser support

+

Progress bars use CSS3 gradients, transitions, and animations to achieve all their effects. These features are not supported in IE7-9 or older versions of Firefox.

+

Opera and IE do not support animations at this time.

+
+
+ +
+ + + + + + +
+ +
+
+

Wells

+

Use the well as a simple effect on an element to give it an inset effect.

+
+ Look, I'm in a well! +
+
+<div class="well">
+  ...
+</div>
+
+
+
+

Close icon

+

Use the generic close icon for dismissing content like modals and alerts.

+

+
<button class="close">&times;</button>
+

iOS devices require an href="#" for click events if you rather use an anchor.

+
<a class="close" href="#">&times;</a>
+
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/docs/likebutton/docs/download.html b/docs/docs/likebutton/docs/download.html new file mode 100755 index 0000000000..00700388c1 --- /dev/null +++ b/docs/docs/likebutton/docs/download.html @@ -0,0 +1,454 @@ + + + + + Download · Twitter Bootstrap + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+

Customize and download

+

Download the full repository or customize your entire Bootstrap build by selecting only the components, javascript plugins, and assets you need.

+ +
+ +
+ +
+
+

Scaffolding

+ + + + +

Base CSS

+ + + + + + + +
+
+

Components

+ + + + + + + + + + +
+
+

JS Components

+ + + + + + +
+
+

Miscellaneous

+ + + + +

Responsive

+ + + + + +
+
+
+ +
+ +
+
+ + + + + + +
+
+ + + + + + +
+
+

Heads up!

+

All checked plugins will be compiled into a single file, bootstrap.js. All plugins require the latest version of jQuery to be included.

+
+
+
+ + +
+ +
+
+

Scaffolding

+ + + + + +

Links

+ + + + +

Colors

+ + + + + + + + + + + + + + + +

Sprites

+ + + + + +
+
+

Grid system

+ + + + + + +

Fluid grid system

+ + + + + +

Typography

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Tables

+ + + + + + + + + +

Navbar

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Dropdowns

+ + + + + + + + + + +
+
+

Forms

+ + + + + + + + + + + + + + + + + + +

Form states & alerts

+ + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+ Customize and Download +

What's included?

+

Downloads include compiled CSS, compiled and minified CSS, and compiled jQuery plugins, all nicely packed up into a zipball for your convenience.

+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/docs/likebutton/docs/examples.html b/docs/docs/likebutton/docs/examples.html new file mode 100755 index 0000000000..5e8d74a3b5 --- /dev/null +++ b/docs/docs/likebutton/docs/examples.html @@ -0,0 +1,147 @@ + + + + + Examples · Twitter Bootstrap + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+

Bootstrap examples

+

We've included a few basic examples as starting points for your work with Bootstrap. We encourage folks to iterate on these examples and not simply use them as an end result.

+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/docs/likebutton/docs/examples/fluid.html b/docs/docs/likebutton/docs/examples/fluid.html new file mode 100755 index 0000000000..f235d76149 --- /dev/null +++ b/docs/docs/likebutton/docs/examples/fluid.html @@ -0,0 +1,162 @@ + + + + + Bootstrap, from Twitter + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+

Hello, world!

+

This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.

+

Learn more »

+
+
+
+

Heading

+

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

+

View details »

+
+
+

Heading

+

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

+

View details »

+
+
+

Heading

+

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

+

View details »

+
+
+
+
+

Heading

+

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

+

View details »

+
+
+

Heading

+

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

+

View details »

+
+
+

Heading

+

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

+

View details »

+
+
+
+
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + diff --git a/docs/docs/likebutton/docs/examples/hero.html b/docs/docs/likebutton/docs/examples/hero.html new file mode 100755 index 0000000000..7fb3f67b7e --- /dev/null +++ b/docs/docs/likebutton/docs/examples/hero.html @@ -0,0 +1,109 @@ + + + + + Bootstrap, from Twitter + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+

Hello, world!

+

This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.

+

Learn more »

+
+ + +
+
+

Heading

+

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

+

View details »

+
+
+

Heading

+

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

+

View details »

+
+
+

Heading

+

Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

+

View details »

+
+
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + diff --git a/docs/docs/likebutton/docs/examples/starter-template.html b/docs/docs/likebutton/docs/examples/starter-template.html new file mode 100755 index 0000000000..538ff08bee --- /dev/null +++ b/docs/docs/likebutton/docs/examples/starter-template.html @@ -0,0 +1,79 @@ + + + + + Bootstrap, from Twitter + + + + + + + + + + + + + + + + + + + + + + + + +
+ +

Bootstrap starter template

+

Use this document as a way to quick start any new project.
All you get is this message and a barebones HTML document.

+ +
+ + + + + + + + + + + + + + + + + + + diff --git a/docs/docs/likebutton/docs/index.html b/docs/docs/likebutton/docs/index.html new file mode 100755 index 0000000000..60a784160c --- /dev/null +++ b/docs/docs/likebutton/docs/index.html @@ -0,0 +1,259 @@ + + + + + Twitter Bootstrap + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+

Bootstrap, from Twitter

+

Simple and flexible HTML, CSS, and Javascript for popular user interface components and interactions.

+

+ View project on GitHub + Download Bootstrap (v2.0.4) +

+
+ + +
+ +
+ +
+

Designed for everyone, everywhere.

+ +
+
+ +

Built for and by nerds

+

Like you, we love building awesome products on the web. We love it so much, we decided to help people just like us do it easier, better, and faster. Bootstrap is built for you.

+
+
+ +

For all skill levels

+

Bootstrap is designed to help people of all skill levels—designer or developer, huge nerd or early beginner. Use it as a complete kit or use to start something more complex.

+
+
+ +

Cross-everything

+

Originally built with only modern browsers in mind, Bootstrap has evolved to include support for all major browsers (even IE7!) and, with Bootstrap 2, tablets and smartphones, too.

+
+
+
+
+ +

12-column grid

+

Grid systems aren't everything, but having a durable and flexible one at the core of your work can make development much simpler. Use our built-in grid classes or roll your own.

+
+
+ +

Responsive design

+

With Bootstrap 2, we've gone fully responsive. Our components are scaled according to a range of resolutions and devices to provide a consistent experience, no matter what.

+
+
+ +

Styleguide docs

+

Unlike other front-end toolkits, Bootstrap was designed first and foremost as a styleguide to document not only our features, but best practices and living, coded examples.

+
+
+
+
+ +

Growing library

+

Despite being only 10kb (gzipped), Bootstrap is one of the most complete front-end toolkits out there with dozens of fully functional components ready to be put to use.

+
+
+ +

Custom jQuery plugins

+

What good is an awesome design component without easy-to-use, proper, and extensible interactions? With Bootstrap, you get custom-built jQuery plugins to bring your projects to life.

+
+
+ +

Built on LESS

+

Where vanilla CSS falters, LESS excels. Variables, nesting, operations, and mixins in LESS makes coding CSS faster and more efficient with minimal overhead.

+
+
+
+
+ +

HTML5

+

Built to support new HTML5 elements and syntax.

+
+
+ +

CSS3

+

Progressively enhanced components for ultimate style.

+
+
+ +

Open-source

+

Built for and maintained by the community via GitHub.

+
+
+ +

Made at Twitter

+

Brought to you by an experienced engineer and designer.

+
+
+ +
+ +

Built with Bootstrap.

+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/docs/likebutton/docs/javascript.html b/docs/docs/likebutton/docs/javascript.html new file mode 100755 index 0000000000..6d06ff6d19 --- /dev/null +++ b/docs/docs/likebutton/docs/javascript.html @@ -0,0 +1,1520 @@ + + + + + Javascript · Twitter Bootstrap + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+

Javascript for Bootstrap

+

Bring Bootstrap's components to life—now with 12 custom jQuery plugins. +

+
+ + + +
+ +
+
+

Modals

+

A streamlined, but flexible, take on the traditional javascript modal plugin with only the minimum required functionality and smart defaults.

+
+
+

Dropdowns

+

Add dropdown menus to nearly anything in Bootstrap with this simple plugin. Bootstrap features full dropdown menu support on in the navbar, tabs, and pills.

+
+
+

Scrollspy

+

Use scrollspy to automatically update the links in your navbar to show the current active link based on scroll position.

+
+
+

Togglable tabs

+

Use this plugin to make tabs and pills more useful by allowing them to toggle through tabbable panes of local content.

+
+
+
+
+

Tooltips

+

A new take on the jQuery Tipsy plugin, Tooltips don't rely on images—they use CSS3 for animations and data-attributes for local title storage.

+
+
+

Popovers *

+

Add small overlays of content, like those on the iPad, to any element for housing secondary information.

+

* Requires Tooltips to be included

+
+
+

Alert messages

+

The alert plugin is a tiny class for adding close functionality to alerts.

+
+
+

Buttons

+

Do more with buttons. Control button states or create groups of buttons for more components like toolbars.

+
+
+
+
+

Collapse

+

Get base styles and flexible support for collapsible components like accordions and navigation.

+
+
+

Carousel

+

Create a merry-go-round of any content you wish to provide an interactive slideshow of content.

+
+
+

Typeahead

+

A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.

+
+
+

Transitions *

+

For simple transition effects, include bootstrap-transition.js once to slide in modals or fade out alerts.

+

* Required for animation in plugins

+
+
+
Heads up! All javascript plugins require the latest version of jQuery.
+
+ + + + +
+ +
+
+

About modals

+

A streamlined, but flexible, take on the traditional javascript modal plugin with only the minimum required functionality and smart defaults.

+ Download file +
+
+

Static example

+

Below is a statically rendered modal.

+ + +

Live demo

+

Toggle a modal via javascript by clicking the button below. It will slide down and fade in from the top of the page.

+ + + Launch demo modal + +
+ +

Using bootstrap-modal

+

Call the modal via javascript:

+
$('#myModal').modal(options)
+

Options

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Nametypedefaultdescription
backdropbooleantrueIncludes a modal-backdrop element. Alternatively, specify static for a backdrop which doesn't close the modal on click.
keyboardbooleantrueCloses the modal when escape key is pressed
showbooleantrueShows the modal when initialized.
+

Markup

+

You can activate modals on your page easily without having to write a single line of javascript. Just set data-toggle="modal" on a controller element with a data-target="#foo" or href="#foo" which corresponds to a modal element id, and when clicked, it will launch your modal.

+

Also, to add options to your modal instance, just include them as additional data attributes on either the control element or the modal markup itself.

+
+<a class="btn" data-toggle="modal" href="#myModal" >Launch Modal</a>
+
+ +
+<div class="modal hide" id="myModal">
+  <div class="modal-header">
+    <button type="button" class="close" data-dismiss="modal">×</button>
+    <h3>Modal header</h3>
+  </div>
+  <div class="modal-body">
+    <p>One fine body…</p>
+  </div>
+  <div class="modal-footer">
+    <a href="#" class="btn" data-dismiss="modal">Close</a>
+    <a href="#" class="btn btn-primary">Save changes</a>
+  </div>
+</div>
+
+
+ Heads up! If you want your modal to animate in and out, just add a .fade class to the .modal element (refer to the demo to see this in action) and include bootstrap-transition.js. +
+

Methods

+

.modal(options)

+

Activates your content as a modal. Accepts an optional options object.

+
+$('#myModal').modal({
+  keyboard: false
+})
+

.modal('toggle')

+

Manually toggles a modal.

+
$('#myModal').modal('toggle')
+

.modal('show')

+

Manually opens a modal.

+
$('#myModal').modal('show')
+

.modal('hide')

+

Manually hides a modal.

+
$('#myModal').modal('hide')
+

Events

+

Bootstrap's modal class exposes a few events for hooking into modal functionality.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
EventDescription
showThis event fires immediately when the show instance method is called.
shownThis event is fired when the modal has been made visible to the user (will wait for css transitions to complete).
hideThis event is fired immediately when the hide instance method has been called.
hiddenThis event is fired when the modal has finished being hidden from the user (will wait for css transitions to complete).
+ +
+$('#myModal').on('hidden', function () {
+  // do something…
+})
+
+
+
+ + + + + + + + + +
+ +
+
+

The ScrollSpy plugin is for automatically updating nav targets based on scroll position.

+ Download file +
+
+

Example navbar with scrollspy

+

Scroll the area below and watch the navigation update. The dropdown sub items will be highlighted as well. Try it!

+ +
+

@fat

+

+ Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat. +

+

@mdo

+

+ Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt. +

+

one

+

+ Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone. +

+

two

+

+ In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt. +

+

three

+

+ Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat. +

+

Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats. +

+
+
+

Using bootstrap-scrollspy.js

+

Call the scrollspy via javascript:

+
$('#navbar').scrollspy()
+

Markup

+

To easily add scrollspy behavior to your topbar navigation, just add data-spy="scroll" to the element you want to spy on (most typically this would be the body).

+
<body data-spy="scroll" >...</body>
+
+ Heads up! + Navbar links must have resolvable id targets. For example, a <a href="#home">home</a> must correspond to something in the dom like <div id="home"></div>. +
+

Methods

+

.scrollspy('refresh')

+

When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:

+
+$('[data-spy="scroll"]').each(function () {
+  var $spy = $(this).scrollspy('refresh')
+});
+
+

Options

+ + + + + + + + + + + + + + + + + +
Nametypedefaultdescription
offsetnumber10Pixels to offset from top when calculating position of scroll.
+

Events

+ + + + + + + + + + + + + +
EventDescription
activateThis event fires whenever a new item becomes activated by the scrollspy.
+
+
+
+ + + + +
+ +
+
+

This plugin adds quick, dynamic tab and pill functionality for transitioning through local content.

+ Download file +
+
+

Example tabs

+

Click the tabs below to toggle between hidden panes, even via dropdown menus.

+ +
+
+

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

+
+
+

Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.

+
+ + +
+
+

Using bootstrap-tab.js

+

Enable tabbable tabs via javascript (each tab needs to be activated individually):

+
+$('#myTab a').click(function (e) {
+  e.preventDefault();
+  $(this).tab('show');
+})
+

You can activate individual tabs in several ways:

+
+$('#myTab a[href="#profile"]').tab('show'); // Select tab by name
+$('#myTab a:first').tab('show'); // Select first tab
+$('#myTab a:last').tab('show'); // Select last tab
+$('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed)
+
+

Markup

+

You can activate a tab or pill navigation without writing any javascript by simply specifying data-toggle="tab" or data-toggle="pill" on an element. Adding the nav and nav-tabs classes to the tab ul will apply the bootstrap tab styling.

+
+<ul class="nav nav-tabs">
+  <li><a href="#home" data-toggle="tab">Home</a></li>
+  <li><a href="#profile" data-toggle="tab">Profile</a></li>
+  <li><a href="#messages" data-toggle="tab">Messages</a></li>
+  <li><a href="#settings" data-toggle="tab">Settings</a></li>
+</ul>
+

Methods

+

$().tab

+

+ Activates a tab element and content container. Tab should have either a data-target or an href targeting a container node in the DOM. +

+
+<ul class="nav nav-tabs" id="myTab">
+  <li class="active"><a href="#home">Home</a></li>
+  <li><a href="#profile">Profile</a></li>
+  <li><a href="#messages">Messages</a></li>
+  <li><a href="#settings">Settings</a></li>
+</ul>
+
+<div class="tab-content">
+  <div class="tab-pane active" id="home">...</div>
+  <div class="tab-pane" id="profile">...</div>
+  <div class="tab-pane" id="messages">...</div>
+  <div class="tab-pane" id="settings">...</div>
+</div>
+
+<script>
+  $(function () {
+    $('#myTab a:last').tab('show');
+  })
+</script>
+

Events

+ + + + + + + + + + + + + + + + + +
EventDescription
showThis event fires on tab show, but before the new tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.
shownThis event fires on tab show after a tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.
+ +
+$('a[data-toggle="tab"]').on('shown', function (e) {
+  e.target // activated tab
+  e.relatedTarget // previous tab
+})
+
+
+
+ + + +
+ +
+
+

About Tooltips

+

Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, use css3 for animations, and data-attributes for local title storage.

+ Download file +
+
+

Example use of Tooltips

+

Hover over the links below to see tooltips:

+
+

Tight pants next level keffiyeh you probably haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel have a terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan whatever keytar, scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral. +

+
+
+

Using bootstrap-tooltip.js

+

Trigger the tooltip via javascript:

+
$('#example').tooltip(options)
+

Options

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Nametypedefaultdescription
animationbooleantrueapply a css fade transition to the tooltip
placementstring|function'top'how to position the tooltip - top | bottom | left | right
selectorstringfalseIf a selector is provided, tooltip objects will be delegated to the specified targets.
titlestring | function''default title value if `title` tag isn't present
triggerstring'hover'how tooltip is triggered - hover | focus | manual
delaynumber | object0 +

delay showing and hiding the tooltip (ms) - does not apply to manual trigger type

+

If a number is supplied, delay is applied to both hide/show

+

Object structure is: delay: { show: 500, hide: 100 }

+
+
+ Heads up! + Options for individual tooltips can alternatively be specified through the use of data attributes. +
+

Markup

+

For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.

+
+<a href="#" rel="tooltip" title="first tooltip">hover over me</a>
+
+

Methods

+

$().tooltip(options)

+

Attaches a tooltip handler to an element collection.

+

.tooltip('show')

+

Reveals an element's tooltip.

+
$('#element').tooltip('show')
+

.tooltip('hide')

+

Hides an element's tooltip.

+
$('#element').tooltip('hide')
+

.tooltip('toggle')

+

Toggles an element's tooltip.

+
$('#element').tooltip('toggle')
+
+
+
+ + + + +
+ +
+
+

About popovers

+

Add small overlays of content, like those on the iPad, to any element for housing secondary information.

+

* Requires Tooltip to be included

+ Download file +
+
+

Example hover popover

+

Hover over the button to trigger the popover.

+ +
+

Using bootstrap-popover.js

+

Enable popovers via javascript:

+
$('#example').popover(options)
+

Options

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Nametypedefaultdescription
animationbooleantrueapply a css fade transition to the tooltip
placementstring|function'right'how to position the popover - top | bottom | left | right
selectorstringfalseif a selector is provided, tooltip objects will be delegated to the specified targets
triggerstring'hover'how tooltip is triggered - hover | focus | manual
titlestring | function''default title value if `title` attribute isn't present
contentstring | function''default content value if `data-content` attribute isn't present
delaynumber | object0 +

delay showing and hiding the popover (ms) - does not apply to manual trigger type

+

If a number is supplied, delay is applied to both hide/show

+

Object structure is: delay: { show: 500, hide: 100 }

+
+
+ Heads up! + Options for individual popovers can alternatively be specified through the use of data attributes. +
+

Markup

+

+ For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option. +

+

Methods

+

$().popover(options)

+

Initializes popovers for an element collection.

+

.popover('show')

+

Reveals an elements popover.

+
$('#element').popover('show')
+

.popover('hide')

+

Hides an elements popover.

+
$('#element').popover('hide')
+

.popover('toggle')

+

Toggles an elements popover.

+
$('#element').popover('toggle')
+
+
+
+ + + + +
+ +
+
+

About alerts

+

The alert plugin is a tiny class for adding close functionality to alerts.

+ Download +
+
+

Example alerts

+

The alerts plugin works on regular alert messages, and block messages.

+
+ + Holy guacamole! Best check yo self, you're not looking too good. +
+
+ +

Oh snap! You got an error!

+

Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.

+

+ Take this action Or do this +

+
+
+

Using bootstrap-alert.js

+

Enable dismissal of an alert via javascript:

+
$(".alert").alert()
+

Markup

+

Just add data-dismiss="alert" to your close button to automatically give an alert close functionality.

+
<a class="close" data-dismiss="alert" href="#">&times;</a>
+

Methods

+

$().alert()

+

Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the .fade and .in class already applied to them.

+

.alert('close')

+

Closes an alert.

+
$(".alert").alert('close')
+

Events

+

Bootstrap's alert class exposes a few events for hooking into alert functionality.

+ + + + + + + + + + + + + + + + + +
EventDescription
closeThis event fires immediately when the close instance method is called.
closedThis event is fired when the alert has been closed (will wait for css transitions to complete).
+
+$('#my-alert').bind('closed', function () {
+  // do something…
+})
+
+
+
+ + + + +
+ +
+
+

About

+

Do more with buttons. Control button states or create groups of buttons for more components like toolbars.

+ Download file +
+
+

Example uses

+

Use the buttons plugin for states and toggles.

+ + + + + + + + + + + + + + + + + + + +
Stateful + +
Single toggle + +
Checkbox +
+ + + +
+
Radio +
+ + + +
+
+
+

Using bootstrap-button.js

+

Enable buttons via javascript:

+
$('.nav-tabs').button()
+

Markup

+

Data attributes are integral to the button plugin. Check out the example code below for the various markup types.

+
+<!-- Add data-toggle="button" to activate toggling on a single button -->
+<button class="btn" data-toggle="button">Single Toggle</button>
+
+<!-- Add data-toggle="buttons-checkbox" for checkbox style toggling on btn-group -->
+<div class="btn-group" data-toggle="buttons-checkbox">
+  <button class="btn">Left</button>
+  <button class="btn">Middle</button>
+  <button class="btn">Right</button>
+</div>
+
+<!-- Add data-toggle="buttons-radio" for radio style toggling on btn-group -->
+<div class="btn-group" data-toggle="buttons-radio">
+  <button class="btn">Left</button>
+  <button class="btn">Middle</button>
+  <button class="btn">Right</button>
+</div>
+
+

Methods

+

$().button('toggle')

+

Toggles push state. Gives the button the appearance that it has been activated.

+
+ Heads up! + You can enable auto toggling of a button by using the data-toggle attribute. +
+
<button class="btn" data-toggle="button" >…</button>
+

$().button('loading')

+

Sets button state to loading - disables button and swaps text to loading text. Loading text should be defined on the button element using the data attribute data-loading-text. +

+
<button class="btn" data-loading-text="loading stuff..." >...</button>
+
+ Heads up! + Firefox persists the disabled state across page loads. A workaround for this is to use autocomplete="off". +
+

$().button('reset')

+

Resets button state - swaps text to original text.

+

$().button(string)

+

Resets button state - swaps text to any data defined text state.

+
<button class="btn" data-complete-text="finished!" >...</button>
+<script>
+  $('.btn').button('complete')
+</script>
+
+
+
+ + + + +
+ +
+
+

About

+

Get base styles and flexible support for collapsible components like accordions and navigation.

+ Download file +

* Requires the Transitions plugin to be included.

+
+
+

Example accordion

+

Using the collapse plugin, we built a simple accordion style widget:

+ +
+
+ +
+
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. +
+
+
+
+ +
+
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. +
+
+
+
+ +
+
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. +
+
+
+
+ + +
+

Using bootstrap-collapse.js

+

Enable via javascript:

+
$(".collapse").collapse()
+

Options

+ + + + + + + + + + + + + + + + + + + + + + + +
Nametypedefaultdescription
parentselectorfalseIf selector then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior)
togglebooleantrueToggles the collapsible element on invocation
+

Markup

+

Just add data-toggle="collapse" and a data-target to element to automatically assign control of a collapsible element. The data-target attribute accepts a css selector to apply the collapse to. Be sure to add the class collapse to the collapsible element. If you'd like it to default open, add the additional class in.

+
+<button class="btn btn-danger" data-toggle="collapse" data-target="#demo">
+  simple collapsible
+</button>
+
+<div id="demo" class="collapse in"> … </div>
+
+ Heads up! + To add accordion-like group management to a collapsible control, add the data attribute data-parent="#selector". Refer to the demo to see this in action. +
+

Methods

+

.collapse(options)

+

Activates your content as a collapsible element. Accepts an optional options object. +

+$('#myCollapsible').collapse({
+  toggle: false
+})
+

.collapse('toggle')

+

Toggles a collapsible element to shown or hidden.

+

.collapse('show')

+

Shows a collapsible element.

+

.collapse('hide')

+

Hides a collapsible element.

+

Events

+

+ Bootstrap's collapse class exposes a few events for hooking into collapse functionality. +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
EventDescription
showThis event fires immediately when the show instance method is called.
shownThis event is fired when a collapse element has been made visible to the user (will wait for css transitions to complete).
hide + This event is fired immediately when the hide method has been called. +
hiddenThis event is fired when a collapse element has been hidden from the user (will wait for css transitions to complete).
+ +
+$('#myCollapsible').on('hidden', function () {
+  // do something…
+})
+
+
+
+ + + + + + + + + +
+ +
+
+

About

+

A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.

+ Download file +
+
+

Example

+

Start typing in the field below to show the typeahead results.

+
+ +
+
+

Using bootstrap-typeahead.js

+

Call the typeahead via javascript:

+
$('.typeahead').typeahead()
+

Options

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Nametypedefaultdescription
sourcearray[ ]The data source to query against.
itemsnumber8The max number of items to display in the dropdown.
matcherfunctioncase insensitiveThe method used to determine if a query matches an item. Accepts a single argument, the item against which to test the query. Access the current query with this.query. Return a boolean true if query is a match.
sorterfunctionexact match,
case sensitive,
case insensitive
Method used to sort autocomplete results. Accepts a single argument items and has the scope of the typeahead instance. Reference the current query with this.query.
highlighterfunctionhighlights all default matchesMethod used to highlight autocomplete results. Accepts a single argument item and has the scope of the typeahead instance. Should return html.
+ +

Markup

+

Add data attributes to register an element with typeahead functionality.

+
+<input type="text" data-provide="typeahead">
+
+

Methods

+

.typeahead(options)

+

Initializes an input with a typeahead.

+
+
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/docs/likebutton/docs/less.html b/docs/docs/likebutton/docs/less.html new file mode 100755 index 0000000000..8f1ebf7ada --- /dev/null +++ b/docs/docs/likebutton/docs/less.html @@ -0,0 +1,1060 @@ + + + + + Less · Twitter Bootstrap + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+

Using LESS with Bootstrap

+

Customize and extend Bootstrap with LESS, a CSS preprocessor, to take advantage of the variables, mixins, and more used to build Bootstrap's CSS.

+ +
+ + + + +
+ +
+
+

Why LESS?

+

Bootstrap is made with LESS at its core, a dynamic stylesheet language created by our good friend, Alexis Sellier. It makes developing systems-based CSS faster, easier, and more fun.

+
+
+

What's included?

+

As an extension of CSS, LESS includes variables, mixins for reusable snippets of code, operations for simple math, nesting, and even color functions.

+
+
+

Learn more

+ LESS CSS +

Visit the official website at http://lesscss.org to learn more.

+
+
+
+
+

Variables

+

Managing colors and pixel values in CSS can be a bit of a pain, usually full of copy and paste. Not with LESS though—assign colors or pixel values as variables and change them once.

+
+
+

Mixins

+

Those three border-radius declarations you need to make in regular ol' CSS? Now they're down to one line with the help of mixins, snippets of code you can reuse anywhere.

+
+
+

Operations

+

Make your grid, leading, and more super flexible by doing the math on the fly with operations. Multiply, divide, add, and subtract your way to CSS sanity.

+
+
+
+ + + + +
+ + +

Scaffolding and links

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
@bodyBackground@whitePage background color
@textColor@grayDarkDefault text color for entire body, headings, and more
@linkColor#08cDefault link text color
@linkColorHoverdarken(@linkColor, 15%)Default link text hover color
+

Grid system

+ + + + + + + + + + + + + + + + + + + + + + + +
@gridColumns12
@gridColumnWidth60px
@gridGutterWidth20px
@fluidGridColumnWidth6.382978723%
@fluidGridGutterWidth2.127659574%
+

Typography

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@sansFontFamily"Helvetica Neue", Helvetica, Arial, sans-serif
@serifFontFamilyGeorgia, "Times New Roman", Times, serif
@monoFontFamilyMenlo, Monaco, "Courier New", monospace
@baseFontSize13pxMust be pixels
@baseFontFamily@sansFontFamily
@baseLineHeight18pxMust be pixels
@altFontFamily@serifFontFamily
@headingsFontFamilyinherit
@headingsFontWeightbold
@headingsColorinherit
+

Tables

+ + + + + + + + + + + + + + + + + + + +
@tableBackgroundtransparent
@tableBackgroundAccent#f9f9f9
@tableBackgroundHover#f5f5f5
@tableBorderddd
+ +

Grayscale colors

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@black#000
@grayDarker#222
@grayDark#333
@gray#555
@grayLight#999
@grayLighter#eee
@white#fff
+

Accent colors

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@blue#049cdb
@green#46a546
@red#9d261d
@yellow#ffc40d
@orange#f89406
@pink#c3325f
@purple#7a43b6
+ + +

Components

+ +

Buttons

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@btnBackground@white
@btnBackgroundHighlightdarken(@white, 10%)
@btnBorderdarken(@white, 20%)
@btnPrimaryBackground@linkColor
@btnPrimaryBackgroundHighlightspin(@btnPrimaryBackground, 15%)
@btnInfoBackground#5bc0de
@btnInfoBackgroundHighlight#2f96b4
@btnSuccessBackground#62c462
@btnSuccessBackgroundHighlight51a351
@btnWarningBackgroundlighten(@orange, 15%)
@btnWarningBackgroundHighlight@orange
@btnDangerBackground#ee5f5b
@btnDangerBackgroundHighlight#bd362f
@btnInverseBackground@gray
@btnInverseBackgroundHighlight@grayDarker
+

Forms

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
@placeholderText@grayLight
@inputBackground@white
@inputBorder#ccc
@inputBorderRadius3px
@inputDisabledBackground@grayLighter
@formActionsBackground#f5f5f5
+

Form states and alerts

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@warningText#c09853
@warningBackground#f3edd2
@errorText#b94a48
@errorBackground#f2dede
@successText#468847
@successBackground#dff0d8
@infoText#3a87ad
@infoBackground#d9edf7
+ +

Navbar

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@navbarHeight40px
@navbarBackground@grayDarker
@navbarBackgroundHighlight@grayDark
@navbarText@grayLight
@navbarLinkColor@grayLight
@navbarLinkColorHover@white
@navbarLinkColorActive@navbarLinkColorHover
@navbarLinkBackgroundHovertransparent
@navbarLinkBackgroundActive@navbarBackground
@navbarSearchBackgroundlighten(@navbarBackground, 25%)
@navbarSearchBackgroundFocus@white
@navbarSearchBorderdarken(@navbarSearchBackground, 30%)
@navbarSearchPlaceholderColor#ccc
@navbarBrandColor@navbarLinkColor
+

Dropdowns

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@dropdownBackground@white
@dropdownBorderrgba(0,0,0,.2)
@dropdownLinkColor@grayDark
@dropdownLinkColorHover@white
@dropdownLinkBackgroundHover@linkColor
@@dropdownDividerTop#e5e5e5
@@dropdownDividerBottom@white
+

Hero unit

+ + + + + + + + + + + + + + + + + + +
@heroUnitBackground@grayLighter
@heroUnitHeadingColorinherit
@heroUnitLeadColorinhereit
+ + +
+ + + + +
+ +

About mixins

+
+
+

Basic mixins

+

A basic mixin is essentially an include or a partial for a snippet of CSS. They're written just like a CSS class and can be called anywhere.

+
+.element {
+  .clearfix();
+}
+
+
+
+

Parametric mixins

+

A parametric mixin is just like a basic mixin, but it also accepts parameters (hence the name) with optional default values.

+
+.element {
+  .border-radius(4px);
+}
+
+
+
+

Easily add your own

+

Nearly all of Bootstrap's mixins are stored in mixins.less, a wonderful utility .less file that enables you to use a mixin in any of the .less files in the toolkit.

+

So, go ahead and use the existing ones or feel free to add your own as you need.

+
+
+

Included mixins

+

Utilities

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MixinParametersUsage
.clearfix()noneAdd to any parent to clear floats within
.tab-focus()noneApply the Webkit focus style and round Firefox outline
.center-block()noneAuto center a block-level element using margin: auto
.ie7-inline-block()noneUse in addition to regular display: inline-block to get IE7 support
.size()@height @widthQuickly set the height and width on one line
.square()@sizeBuilds on .size() to set the width and height as same value
.opacity()@opacitySet, in whole numbers, the opacity percentage (e.g., "50" or "75")
+

Forms

+ + + + + + + + + + + + + + + +
MixinParametersUsage
.placeholder()@color: @placeholderTextSet the placeholder text color for inputs
+

Typography

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MixinParametersUsage
#font > #family > .serif()noneMake an element use a serif font stack
#font > #family > .sans-serif()noneMake an element use a sans-serif font stack
#font > #family > .monospace()noneMake an element use a monospace font stack
#font > .shorthand()@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeightEasily set font size, weight, and leading
#font > .serif()@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeightSet font family to serif, and control size, weight, and leading
#font > .sans-serif()@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeightSet font family to sans-serif, and control size, weight, and leading
#font > .monospace()@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeightSet font family to monospace, and control size, weight, and leading
+

Grid system

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MixinParametersUsage
.container-fixed()noneCreate a horizontally centered container for holding your content
#grid > .core()@gridColumnWidth, @gridGutterWidthGenerate a pixel grid system (container, row, and columns) with n columns and x pixel wide gutter
#grid > .fluid()@fluidGridColumnWidth, @fluidGridGutterWidthGenerate a percent grid system with n columns and x % wide gutter
#grid > .input()@gridColumnWidth, @gridGutterWidthGenerate the pixel grid system for input elements, accounting for padding and borders
.makeColumn@columns: 1, @offset: 0Turn any div into a grid column without the .span* classes
+

CSS3 properties

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MixinParametersUsage
.border-radius()@radiusRound the corners of an element. Can be a single value or four space-separated values
.box-shadow()@shadowAdd a drop shadow to an element
.transition()@transitionAdd CSS3 transition effect (e.g., all .2s linear)
.rotate()@degreesRotate an element n degrees
.scale()@ratioScale an element to n times its original size
.translate()@x, @yMove an element on the x and y planes
.background-clip()@clipCrop the background of an element (useful for border-radius)
.background-size()@sizeControl the size of background images via CSS3
.box-sizing()@boxmodelChange the box model for an element (e.g., border-box for a full-width input)
.user-select()@selectControl cursor selection of text on a page
.backface-visibility()@visibility: visiblePrevent flickering of content when using CSS 3D transforms
.resizable()@direction: bothMake any element resizable on the right and bottom
.content-columns()@columnCount, @columnGap: @gridGutterWidthMake the content of any element use CSS3 columns
.hyphens()@mode: autoCSS3 hyphenation when you want it (includes word-wrap: break-word)
+

Backgrounds and gradients

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MixinParametersUsage
#translucent > .background()@color: @white, @alpha: 1Give an element a translucent background color
#translucent > .border()@color: @white, @alpha: 1Give an element a translucent border color
#gradient > .vertical()@startColor, @endColorCreate a cross-browser vertical background gradient
#gradient > .horizontal()@startColor, @endColorCreate a cross-browser horizontal background gradient
#gradient > .directional()@startColor, @endColor, @degCreate a cross-browser directional background gradient
#gradient > .vertical-three-colors()@startColor, @midColor, @colorStop, @endColorCreate a cross-browser three-color background gradient
#gradient > .radial()@innerColor, @outerColorCreate a cross-browser radial background gradient
#gradient > .striped()@color, @angleCreate a cross-browser striped background gradient
#gradientBar()@primaryColor, @secondaryColorUsed for buttons to assign a gradient and slightly darker border
+
+ + + + +
+ +
+ Note: If you're submitting a pull request to GitHub with modified CSS, you must recompile the CSS via any of these methods. +
+

Tools for compiling

+
+
+

Node with makefile

+

Install the LESS command line compiler, JSHint, Recess, and uglify-js globally with npm by running the following command:

+
$ npm install -g less jshint recess uglify-js
+

Once installed just run make from the root of your bootstrap directory and you're all set.

+

Additionally, if you have watchr installed, you may run make watch to have bootstrap automatically rebuilt every time you edit a file in the bootstrap lib (this isn't required, just a convenience method).

+
+
+

Command line

+

Install the LESS command line tool via Node and run the following command:

+
$ lessc ./less/bootstrap.less > bootstrap.css
+

Be sure to include --compress in that command if you're trying to save some bytes!

+
+
+

Javascript

+

Download the latest Less.js and include the path to it (and Bootstrap) in the <head>.

+
+<link rel="stylesheet/less" href="/path/to/bootstrap.less">
+<script src="/path/to/less.js"></script>
+
+

To recompile the .less files, just save them and reload your page. Less.js compiles them and stores them in local storage.

+
+
+
+
+

Unofficial Mac app

+

The unofficial Mac app watches directories of .less files and compiles the code to local files after every save of a watched .less file.

+

If you like, you can toggle preferences in the app for automatic minifying and which directory the compiled files end up in.

+
+
+

More Mac apps

+

Crunch

+

Crunch is a great looking LESS editor and compiler built on Adobe Air.

+

CodeKit

+

Created by the same guy as the unofficial Mac app, CodeKit is a Mac app that compiles LESS, SASS, Stylus, and CoffeeScript.

+

Simpless

+

Mac, Linux, and PC app for drag and drop compiling of LESS files. Plus, the source code is on GitHub.

+
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/docs/likebutton/docs/scaffolding.html b/docs/docs/likebutton/docs/scaffolding.html new file mode 100755 index 0000000000..4d6835caf0 --- /dev/null +++ b/docs/docs/likebutton/docs/scaffolding.html @@ -0,0 +1,671 @@ + + + + + Scaffolding · Twitter Bootstrap + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+

Scaffolding

+

Bootstrap is built on a responsive 12-column grid. We've also included fixed- and fluid-width layouts based on that system.

+ +
+ + + + + +
+ +
+
+

Requires HTML5 doctype

+

Bootstrap makes use of HTML elements and CSS properties that require the use of the HTML5 doctype. Be sure to include it at the beginning of every Bootstrapped page in your project.

+
+<!DOCTYPE html>
+<html lang="en">
+  ...
+</html>
+
+
+
+

Typography and links

+

Within the scaffolding.less file, we set basic global display, typography, and link styles. Specifically, we:

+
    +
  • Remove margin on the body
  • +
  • Set background-color: white; on the body
  • +
  • Use the @baseFontFamily, @baseFontSize, and @baseLineHeight attributes as our typographyic base
  • +
  • Set the global link color via @linkColor and apply link underlines only on :hover
  • +
+
+
+

Reset via Normalize

+

As of Bootstrap 2, the traditional CSS reset has evolved to make use of elements from Normalize.css, a project by Nicolas Gallagher that also powers the HTML5 Boilerplate.

+

The new reset can still be found in reset.less, but with many elements removed for brevity and accuracy.

+
+
+
+ + + + + +
+ + +
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
+
+
4
+
4
+
4
+
+
+
4
+
8
+
+
+
6
+
6
+
+
+
12
+
+
+
+

The default grid system provided in Bootstrap utilizes 12 columns that render out at widths of 724px, 940px (default without responsive CSS included), and 1170px. Below 767px viewports, the columns become fluid and stack vertically.

+
+
+
+<div class="row">
+  <div class="span4">...</div>
+  <div class="span8">...</div>
+</div>
+
+
+
+

As shown here, a basic layout can be created with two "columns", each spanning a number of the 12 foundational columns we defined as part of our grid system.

+
+
+ +
+ +

Offsetting columns

+
+
4
+
4 offset 4
+
+
+
3 offset 3
+
3 offset 3
+
+
+
8 offset 4
+
+
+<div class="row">
+  <div class="span4">...</div>
+  <div class="span4 offset4">...</div>
+</div>
+
+ +
+ +

Nesting columns

+
+
+

With the static (non-fluid) grid system in Bootstrap, nesting is easy. To nest your content, just add a new .row and set of .span* columns within an existing .span* column.

+

Example

+

Nested rows should include a set of columns that add up to the number of columns of it's parent. For example, two nested .span3 columns should be placed within a .span6.

+
+
+ Level 1 of column +
+
+ Level 2 +
+
+ Level 2 +
+
+
+
+
+
+
+<div class="row">
+  <div class="span6">
+    Level 1 column
+    <div class="row">
+      <div class="span3">Level 2</div>
+      <div class="span3">Level 2</div>
+    </div>
+  </div>
+</div>
+
+
+
+
+ + + + +
+ + +

Fluid columns

+
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
+
+
4
+
4
+
4
+
+
+
4
+
8
+
+
+
6
+
6
+
+
+
12
+
+ +
+
+

Percents, not pixels

+

The fluid grid system uses percents for column widths instead of fixed pixels. It also has the same responsive variations as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.

+
+
+

Fluid rows

+

Make any row fluid simply by changing .row to .row-fluid. The columns stay the exact same, making it super straightforward to flip between fixed and fluid layouts.

+
+
+

Markup

+
+<div class="row-fluid">
+  <div class="span4">...</div>
+  <div class="span8">...</div>
+</div>
+
+
+
+ +

Fluid nesting

+
+
+

Nesting with fluid grids is a bit different: the number of nested columns doesn't need to match the parent. Instead, your columns are reset at each level because each row takes up 100% of the parent column.

+
+
+ Fluid 12 +
+
+ Fluid 6 +
+
+ Fluid 6 +
+
+
+
+
+
+
+<div class="row-fluid">
+  <div class="span12">
+    Level 1 of column
+    <div class="row-fluid">
+      <div class="span6">Level 2</div>
+      <div class="span6">Level 2</div>
+    </div>
+  </div>
+</div>
+
+
+
+ +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableDefault valueDescription
@gridColumns12Number of columns
@gridColumnWidth60pxWidth of each column
@gridGutterWidth20pxNegative space between columns
+
+
+

Variables in LESS

+

Built into Bootstrap are a handful of variables for customizing the default 940px grid system, documented above. All variables for the grid are stored in variables.less.

+
+
+

How to customize

+

Modifying the grid means changing the three @grid* variables and recompiling Bootstrap. Change the grid variables in variables.less and use one of the four ways documented to recompile. If you're adding more columns, be sure to add the CSS for those in grid.less.

+
+
+

Staying responsive

+

Customization of the grid only works at the default level, the 940px grid. To maintain the responsive aspects of Bootstrap, you'll also have to customize the grids in responsive.less.

+
+
+ +
+ + + + +
+ + +
+
+

Fixed layout

+

The default and simple 940px-wide, centered layout for just about any website or page provided by a single <div class="container">.

+
+
+
+
+<body>
+  <div class="container">
+    ...
+  </div>
+</body>
+
+
+
+

Fluid layout

+

<div class="container-fluid"> gives flexible page structure, min- and max-widths, and a left-hand sidebar. It's great for apps and docs.

+
+
+
+
+
+<div class="container-fluid">
+  <div class="row-fluid">
+    <div class="span2">
+      <!--Sidebar content-->
+    </div>
+    <div class="span10">
+      <!--Body content-->
+    </div>
+  </div>
+</div>
+
+
+
+
+ + + + + +
+ + +
+
+

Responsive devices

+

What they do

+

Media queries allow for custom CSS based on a number of conditions—ratios, widths, display type, etc—but usually focuses around min-width and max-width.

+
    +
  • Modify the width of column in our grid
  • +
  • Stack elements instead of float wherever necessary
  • +
  • Resize headings and text to be more appropriate for devices
  • +
+

Use media queries responsibly and only as a start to your mobile audiences. For larger projects, do consider dedicated code bases and not layers of media queries.

+
+
+

Supported devices

+

Bootstrap supports a handful of media queries in a single file to help make your projects more appropriate on different devices and screen resolutions. Here's what's included:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LabelLayout widthColumn widthGutter width
Smartphones480px and belowFluid columns, no fixed widths
Smartphones to tablets767px and belowFluid columns, no fixed widths
Portrait tablets768px and above42px20px
Default980px and up60px20px
Large display1200px and up70px30px
+ +

Requires meta tag

+

To ensure devices display responsive pages properly, include the viewport meta tag.

+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+
+ +
+ + +

Using the media queries

+
+
+

Bootstrap doesn't automatically include these media queries, but understanding and adding them is very easy and requires minimal setup. You have a few options for including the responsive features of Bootstrap:

+
    +
  1. Use the compiled responsive version, bootstrap-responsive.css
  2. +
  3. Add @import "responsive.less" and recompile Bootstrap
  4. +
  5. Modify and recompile responsive.less as a separate file
  6. +
+

Why not just include it? Truth be told, not everything needs to be responsive. Instead of encouraging developers to remove this feature, we figure it best to enable it.

+
+
+
+  /* Landscape phones and down */
+  @media (max-width: 480px) { ... }
+
+  /* Landscape phone to portrait tablet */
+  @media (max-width: 767px) { ... }
+
+  /* Portrait tablet to landscape and desktop */
+  @media (min-width: 768px) and (max-width: 979px) { ... }
+
+  /* Large desktop */
+  @media (min-width: 1200px) { ... }
+
+
+
+
+ + +

Responsive utility classes

+
+
+

What are they

+

For faster mobile-friendly development, use these basic utility classes for showing and hiding content by device.

+

When to use

+

Use on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation.

+

For example, you might show a <select> element for nav on mobile layouts, but not on tablets or desktops.

+
+
+

Support classes

+

Shown here is a table of the classes we support and their effect on a given media query layout (labeled by device). They can be found in responsive.less.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ClassPhones 480px and belowTablets 767px and belowDesktops 768px and above
.visible-phoneVisible
.visible-tabletVisible
.visible-desktopVisible
.hidden-phoneVisibleVisible
.hidden-tabletVisibleVisible
.hidden-desktopVisibleVisible
+

Test case

+

Resize your browser or load on different devices to test the above classes.

+

Visible on...

+

Green checkmarks indicate that class is visible in your current viewport.

+
    +
  • Phone✔ Phone
  • +
  • Tablet✔ Tablet
  • +
  • Desktop✔ Desktop
  • +
+

Hidden on...

+

Here, green checkmarks indicate that class is hidden in your current viewport.

+
    +
  • Phone✔ Phone
  • +
  • Tablet✔ Tablet
  • +
  • Desktop✔ Desktop
  • +
+
+
+ + +
+
+
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/docs/likebutton/docs/templates/layout.mustache b/docs/docs/likebutton/docs/templates/layout.mustache new file mode 100755 index 0000000000..ae2ce4aad0 --- /dev/null +++ b/docs/docs/likebutton/docs/templates/layout.mustache @@ -0,0 +1,146 @@ + + + + + {{title}} + + + + + + + + + + + + + + + + + + + + + {{#production}} + + {{/production}} + + + + + + + + +
+ +{{>body}} + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + {{#production}} + + + {{/production}} + + + diff --git a/docs/docs/likebutton/docs/templates/pages/base-css.mustache b/docs/docs/likebutton/docs/templates/pages/base-css.mustache new file mode 100755 index 0000000000..1404a31f02 --- /dev/null +++ b/docs/docs/likebutton/docs/templates/pages/base-css.mustache @@ -0,0 +1,1594 @@ + +
+

{{_i}}Base CSS{{/i}}

+

{{_i}}On top of the scaffolding, basic HTML elements are styled and enhanced with extensible classes to provide a fresh, consistent look and feel.{{/i}}

+ +
+ + + +
+ + +

{{_i}}Headings & body copy{{/i}}

+ + +
+
+

{{_i}}Typographic scale{{/i}}

+

{{_i}}The entire typographic grid is based on two Less variables in our variables.less file: @baseFontSize and @baseLineHeight. The first is the base font-size used throughout and the second is the base line-height.{{/i}}

+

{{_i}}We use those variables, and some math, to create the margins, paddings, and line-heights of all our type and more.{{/i}}

+
+
+

{{_i}}Example body text{{/i}}

+

Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.

+

{{_i}}Lead body copy{{/i}}

+

{{_i}}Make a paragraph stand out by adding .lead.{{/i}}

+

Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.

+
+
+
+

h1. {{_i}}Heading 1{{/i}}

+

h2. {{_i}}Heading 2{{/i}}

+

h3. {{_i}}Heading 3{{/i}}

+

h4. {{_i}}Heading 4{{/i}}

+
h5. {{_i}}Heading 5{{/i}}
+
h6. {{_i}}Heading 6{{/i}}
+
+
+
+ + +

{{_i}}Emphasis, address, and abbreviation{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Element{{/i}}{{_i}}Usage{{/i}}{{_i}}Optional{{/i}}
+ <strong> + + {{_i}}For emphasizing a snippet of text with important{{/i}} + + {{_i}}None{{/i}} +
+ <em> + + {{_i}}For emphasizing a snippet of text with stress{{/i}} + + {{_i}}None{{/i}} +
+ <abbr> + + {{_i}}Wraps abbreviations and acronyms to show the expanded version on hover{{/i}} + +

{{_i}}Include optional title attribute for expanded text{{/i}}

+ {{_i}}Use .initialism class for uppercase abbreviations.{{/i}} +
+ <address> + + {{_i}}For contact information for its nearest ancestor or the entire body of work{{/i}} + + {{_i}}Preserve formatting by ending all lines with <br>{{/i}} +
+ +
+
+

{{_i}}Using emphasis{{/i}}

+

Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Maecenas faucibus mollis interdum. Nulla vitae elit libero, a pharetra augue.

+

{{_i}}Note: Feel free to use <b> and <i> in HTML5, but their usage has changed a bit. <b> is meant to highlight words or phrases without conveying additional importance while <i> is mostly for voice, technical terms, etc.{{/i}}

+
+
+

{{_i}}Example addresses{{/i}}

+

{{_i}}Here are two examples of how the <address> tag can be used:{{/i}}

+
+ Twitter, Inc.
+ 795 Folsom Ave, Suite 600
+ San Francisco, CA 94107
+ P: (123) 456-7890 +
+
+ {{_i}}Full Name{{/i}}
+ {{_i}}first.last@gmail.com{{/i}} +
+
+
+

{{_i}}Example abbreviations{{/i}}

+

{{_i}}Abbreviations with a title attribute have a light dotted bottom border and a help cursor on hover. This gives users extra indication something will be shown on hover.{{/i}}

+

{{_i}}Add the initialism class to an abbreviation to increase typographic harmony by giving it a slightly smaller text size.{{/i}}

+

{{_i}}HTML is the best thing since sliced bread.{{/i}}

+

{{_i}}An abbreviation of the word attribute is attr.{{/i}}

+
+
+ + + +

{{_i}}Blockquotes{{/i}}

+ + + + + + + + + + + + + + + + + + + + +
{{_i}}Element{{/i}}{{_i}}Usage{{/i}}{{_i}}Optional{{/i}}
+ <blockquote> + + {{_i}}Block-level element for quoting content from another source{{/i}} + +

{{_i}}Add cite attribute for source URL{{/i}}

+ {{_i}}Use .pull-left and .pull-right classes for floated options{{/i}} +
+ <small> + + {{_i}}Optional element for adding a user-facing citation, typically an author with title of work{{/i}} + + {{_i}}Place the <cite> around the title or name of source{{/i}} +
+
+
+

{{_i}}To include a blockquote, wrap <blockquote> around any HTML as the quote. For straight quotes we recommend a <p>.{{/i}}

+

{{_i}}Include an optional <small> element to cite your source and you'll get an em dash &mdash; before it for styling purposes.{{/i}}

+
+
+
+<blockquote>
+  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante venenatis.</p>
+  <small>{{_i}}Someone famous{{/i}}</small>
+</blockquote>
+
+
+
+ +

{{_i}}Example blockquotes{{/i}}

+
+
+

{{_i}}Default blockquotes are styled as such:{{/i}}

+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante venenatis.

+ {{_i}}Someone famous in Body of work{{/i}} +
+
+
+

{{_i}}To float your blockquote to the right, add class="pull-right":{{/i}}

+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante venenatis.

+ {{_i}}Someone famous in Body of work{{/i}} +
+
+
+ + + +

{{_i}}Lists{{/i}}

+
+
+

{{_i}}Unordered{{/i}}

+

<ul>

+
    +
  • Lorem ipsum dolor sit amet
  • +
  • Consectetur adipiscing elit
  • +
  • Integer molestie lorem at massa
  • +
  • Facilisis in pretium nisl aliquet
  • +
  • Nulla volutpat aliquam velit +
      +
    • Phasellus iaculis neque
    • +
    • Purus sodales ultricies
    • +
    • Vestibulum laoreet porttitor sem
    • +
    • Ac tristique libero volutpat at
    • +
    +
  • +
  • Faucibus porta lacus fringilla vel
  • +
  • Aenean sit amet erat nunc
  • +
  • Eget porttitor lorem
  • +
+
+
+

{{_i}}Unstyled{{/i}}

+

<ul class="unstyled">

+
    +
  • Lorem ipsum dolor sit amet
  • +
  • Consectetur adipiscing elit
  • +
  • Integer molestie lorem at massa
  • +
  • Facilisis in pretium nisl aliquet
  • +
  • Nulla volutpat aliquam velit +
      +
    • Phasellus iaculis neque
    • +
    • Purus sodales ultricies
    • +
    • Vestibulum laoreet porttitor sem
    • +
    • Ac tristique libero volutpat at
    • +
    +
  • +
  • Faucibus porta lacus fringilla vel
  • +
  • Aenean sit amet erat nunc
  • +
  • Eget porttitor lorem
  • +
+
+
+

{{_i}}Ordered{{/i}}

+

<ol>

+
    +
  1. Lorem ipsum dolor sit amet
  2. +
  3. Consectetur adipiscing elit
  4. +
  5. Integer molestie lorem at massa
  6. +
  7. Facilisis in pretium nisl aliquet
  8. +
  9. Nulla volutpat aliquam velit
  10. +
  11. Faucibus porta lacus fringilla vel
  12. +
  13. Aenean sit amet erat nunc
  14. +
  15. Eget porttitor lorem
  16. +
+
+
+
+
+
+

{{_i}}Description{{/i}}

+

<dl>

+
+
{{_i}}Description lists{{/i}}
+
{{_i}}A description list is perfect for defining terms.{{/i}}
+
Euismod
+
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
+
Donec id elit non mi porta gravida at eget metus.
+
Malesuada porta
+
Etiam porta sem malesuada magna mollis euismod.
+
+
+
+

{{_i}}Horizontal description{{/i}}

+

<dl class="dl-horizontal">

+
+
{{_i}}Description lists{{/i}}
+
{{_i}}A description list is perfect for defining terms.{{/i}}
+
Euismod
+
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
+
Donec id elit non mi porta gravida at eget metus.
+
Malesuada porta
+
Etiam porta sem malesuada magna mollis euismod.
+
Felis euismod semper eget lacinia
+
Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
+
+
+

+ {{_i}}Heads up!{{/i}} + {{_i}}Horizontal description lists will truncate terms that are too long to fit in the left column fix text-overflow. In narrower viewports, they will change to the default stacked layout.{{/i}} +

+
+
+
+ + + + +
+ +
+
+

Inline

+

Wrap inline snippets of code with <code>.

+
+{{_i}}For example, <code>section</code> should be wrapped as inline.{{/i}}
+
+
+
+

Basic block

+

{{_i}}Use <pre> for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.{{/i}}

+
+<p>{{_i}}Sample text here...{{/i}}</p>
+
+
+<pre>
+  &lt;p&gt;{{_i}}Sample text here...{{/i}}&lt;/p&gt;
+</pre>
+
+

{{_i}}Note: Be sure to keep code within <pre> tags as close to the left as possible; it will render all tabs.{{/i}}

+

{{_i}}You may optionally add the .pre-scrollable class which will set a max-height of 350px and provide a y-axis scrollbar.{{/i}}

+
+
+

Google Prettify

+

Take the same <pre> element and add two optional classes for enhanced rendering.

+
+<p>{{_i}}Sample text here...{{/i}}</p>
+
+
+<pre class="prettyprint
+     linenums">
+  &lt;p&gt;{{_i}}Sample text here...{{/i}}&lt;/p&gt;
+</pre>
+
+

{{_i}}Download google-code-prettify and view the readme for how to use.{{/i}}

+
+
+
+ + + + +
+ + +

{{_i}}Table markup{{/i}}

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Tag{{/i}}{{_i}}Description{{/i}}
+ <table> + + {{_i}}Wrapping element for displaying data in a tabular format{{/i}} +
+ <thead> + + {{_i}}Container element for table header rows (<tr>) to label table columns{{/i}} +
+ <tbody> + + {{_i}}Container element for table rows (<tr>) in the body of the table{{/i}} +
+ <tr> + + {{_i}}Container element for a set of table cells (<td> or <th>) that appears on a single row{{/i}} +
+ <td> + + {{_i}}Default table cell{{/i}} +
+ <th> + + {{_i}}Special table cell for column (or row, depending on scope and placement) labels{{/i}}
+ {{_i}}Must be used within a <thead>{{/i}} +
+ <caption> + + {{_i}}Description or summary of what the table holds, especially useful for screen readers{{/i}} +
+
+
+
+<table>
+  <thead>
+    <tr>
+      <th>…</th>
+      <th>…</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td>…</td>
+      <td>…</td>
+    </tr>
+  </tbody>
+</table>
+
+
+
+ +

{{_i}}Table options{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Name{{/i}}{{_i}}Class{{/i}}{{_i}}Description{{/i}}
{{_i}}Default{{/i}}{{_i}}None{{/i}}{{_i}}No styles, just columns and rows{{/i}}
{{_i}}Basic{{/i}} + .table + {{_i}}Only horizontal lines between rows{{/i}}
{{_i}}Bordered{{/i}} + .table-bordered + {{_i}}Rounds corners and adds outer border{{/i}}
{{_i}}Zebra-stripe{{/i}} + .table-striped + {{_i}}Adds light gray background color to odd rows (1, 3, 5, etc){{/i}}
{{_i}}Condensed{{/i}} + .table-condensed + {{_i}}Cuts vertical padding in half, from 8px to 4px, within all td and th elements{{/i}}
+ + +

{{_i}}Example tables{{/i}}

+ +

1. {{_i}}Default table styles{{/i}}

+
+
+

{{_i}}Tables are automatically styled with only a few borders to ensure readability and maintain structure. With 2.0, the .table class is required.{{/i}}

+
+<table class="table">
+  …
+</table>
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#{{_i}}First Name{{/i}}{{_i}}Last Name{{/i}}{{_i}}Username{{/i}}
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+
+
+ + +

2. {{_i}}Striped table{{/i}}

+
+
+

{{_i}}Get a little fancy with your tables by adding zebra-striping—just add the .table-striped class.{{/i}}

+

{{_i}}Note: Striped tables use the :nth-child CSS selector and is not available in IE7-IE8.{{/i}}

+
+<table class="table table-striped">
+  …
+</table>
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#{{_i}}First Name{{/i}}{{_i}}Last Name{{/i}}{{_i}}Username{{/i}}
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+
+
+ + +

3. {{_i}}Bordered table{{/i}}

+
+
+

{{_i}}Add borders around the entire table and rounded corners for aesthetic purposes.{{/i}}

+
+<table class="table table-bordered">
+  …
+</table>
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#{{_i}}First Name{{/i}}{{_i}}Last Name{{/i}}{{_i}}Username{{/i}}
1MarkOtto@mdo
MarkOtto@TwBootstrap
2JacobThornton@fat
3Larry the Bird@twitter
+
+
+ + +

4. {{_i}}Condensed table{{/i}}

+
+
+

{{_i}}Make your tables more compact by adding the .table-condensed class to cut table cell padding in half (from 8px to 4px).{{/i}}

+
+<table class="table table-condensed">
+  …
+</table>
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#{{_i}}First Name{{/i}}{{_i}}Last Name{{/i}}{{_i}}Username{{/i}}
1MarkOtto@mdo
2JacobThornton@fat
3Larry the Bird@twitter
+
+
+ + + +

5. {{_i}}Combine them all!{{/i}}

+
+
+

{{_i}}Feel free to combine any of the table classes to achieve different looks by utilizing any of the available classes.{{/i}}

+
+<table class="table table-striped table-bordered table-condensed">
+  ...
+</table>
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Full name{{/i}}
#{{_i}}First Name{{/i}}{{_i}}Last Name{{/i}}{{_i}}Username{{/i}}
1MarkOtto@mdo
2JacobThornton@fat
3Larry the Bird@twitter
+
+
+
+ + + + +
+ +
+
+

{{_i}}Flexible HTML and CSS{{/i}}

+

{{_i}}The best part about forms in Bootstrap is that all your inputs and controls look great no matter how you build them in your markup. No superfluous HTML is required, but we provide the patterns for those who require it.{{/i}}

+

{{_i}}More complicated layouts come with succinct and scalable classes for easy styling and event binding, so you're covered at every step.{{/i}}

+
+
+

{{_i}}Four layouts included{{/i}}

+

{{_i}}Bootstrap comes with support for four types of form layouts:{{/i}}

+
    +
  • {{_i}}Vertical (default){{/i}}
  • +
  • {{_i}}Search{{/i}}
  • +
  • {{_i}}Inline{{/i}}
  • +
  • {{_i}}Horizontal{{/i}}
  • +
+

{{_i}}Different types of form layouts require some changes to markup, but the controls themselves remain and behave the same.{{/i}}

+
+
+

{{_i}}Control states and more{{/i}}

+

{{_i}}Bootstrap's forms include styles for all the base form controls like input, textarea, and select you'd expect. But it also comes with a number of custom components like appended and prepended inputs and support for lists of checkboxes.{{/i}}

+

{{_i}}States like error, warning, and success are included for each type of form control. Also included are styles for disabled controls.{{/i}}

+
+
+ +

{{_i}}Four types of forms{{/i}}

+

{{_i}}Bootstrap provides simple markup and styles for four styles of common web forms.{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Name{{/i}}{{_i}}Class{{/i}}{{_i}}Description{{/i}}
{{_i}}Vertical (default){{/i}}.form-vertical ({{_i}}not required{{/i}}){{_i}}Stacked, left-aligned labels over controls{{/i}}
{{_i}}Inline{{/i}}.form-inline{{_i}}Left-aligned label and inline-block controls for compact style{{/i}}
{{_i}}Search{{/i}}.form-search{{_i}}Extra-rounded text input for a typical search aesthetic{{/i}}
{{_i}}Horizontal{{/i}}.form-horizontal{{_i}}Float left, right-aligned labels on same line as controls{{/i}}
+ + +

{{_i}}Example forms using just form controls, no extra markup{{/i}}

+
+
+

{{_i}}Basic form{{/i}}

+

{{_i}}Smart and lightweight defaults without extra markup.{{/i}}

+
+ + +

{{_i}}Example block-level help text here.{{/i}}

+ + +
+
+<form class="well">
+  <label>{{_i}}Label name{{/i}}</label>
+  <input type="text" class="span3" placeholder="{{_i}}Type something…{{/i}}">
+  <span class="help-block">Example block-level help text here.</span>
+  <label class="checkbox">
+    <input type="checkbox"> {{_i}}Check me out{{/i}}
+  </label>
+  <button type="submit" class="btn">{{_i}}Submit{{/i}}</button>
+</form>
+
+
+
+

{{_i}}Search form{{/i}}

+

{{_i}}Add .form-search to the form and .search-query to the input.{{/i}}

+ +
+<form class="well form-search">
+  <input type="text" class="input-medium search-query">
+  <button type="submit" class="btn">{{_i}}Search{{/i}}</button>
+</form>
+
+ +

{{_i}}Inline form{{/i}}

+

{{_i}}Add .form-inline to finesse the vertical alignment and spacing of form controls.{{/i}}

+
+ + + + +
+
+<form class="well form-inline">
+  <input type="text" class="input-small" placeholder="{{_i}}Email{{/i}}">
+  <input type="password" class="input-small" placeholder="{{_i}}Password{{/i}}">
+  <label class="checkbox">
+    <input type="checkbox"> {{_i}}Remember me{{/i}}
+  </label>
+  <button type="submit" class="btn">{{_i}}Sign in{{/i}}</button>
+</form>
+
+
+
+ +
+ +

{{_i}}Horizontal forms{{/i}}

+
+
+

{{_i}}{{/i}}

+

{{_i}}Shown on the right are all the default form controls we support. Here's the bulleted list:{{/i}}

+
    +
  • {{_i}}text inputs (text, password, email, etc){{/i}}
  • +
  • {{_i}}checkbox{{/i}}
  • +
  • {{_i}}radio{{/i}}
  • +
  • {{_i}}select{{/i}}
  • +
  • {{_i}}multiple select{{/i}}
  • +
  • {{_i}}file input{{/i}}
  • +
  • {{_i}}textarea{{/i}}
  • +
+
+
+
+
+
+ +
+ +

{{_i}}In addition to freeform text, any HTML5 text-based input appears like so.{{/i}}

+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ + +
+
+
+

{{_i}}Example markup{{/i}}

+

{{_i}}Given the above example form layout, here's the markup associated with the first input and control group. The .control-group, .control-label, and .controls classes are all required for styling.{{/i}}

+
+<form class="form-horizontal">
+  <fieldset>
+    <legend>{{_i}}Legend text{{/i}}</legend>
+    <div class="control-group">
+      <label class="control-label" for="input01">{{_i}}Text input{{/i}}</label>
+      <div class="controls">
+        <input type="text" class="input-xlarge" id="input01">
+        <p class="help-block">{{_i}}Supporting help text{{/i}}</p>
+      </div>
+    </div>
+  </fieldset>
+</form>
+
+
+
+ +
+ +

{{_i}}Form control states{{/i}}

+
+
+

{{_i}}Bootstrap features styles for browser-supported focused and disabled states. We remove the default Webkit outline and apply a box-shadow in its place for :focus.{{/i}}

+
+

{{_i}}Form validation{{/i}}

+

{{_i}}It also includes validation styles for errors, warnings, and success. To use, add the error class to the surrounding .control-group.{{/i}}

+
+<fieldset
+  class="control-group error">
+  …
+</fieldset>
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ Some value here +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + {{_i}}Something may have gone wrong{{/i}} +
+
+
+ +
+ + {{_i}}Please correct the error{{/i}} +
+
+
+ +
+ + {{_i}}Woohoo!{{/i}} +
+
+
+ +
+ + {{_i}}Woohoo!{{/i}} +
+
+
+ + +
+
+
+
+
+ +
+ +

{{_i}}Extending form controls{{/i}}

+
+
+

{{_i}}Prepend & append inputs{{/i}}

+

{{_i}}Input groups—with appended or prepended text—provide an easy way to give more context for your inputs. Great examples include the @ sign for Twitter usernames or $ for finances.{{/i}}

+
+

{{_i}}Checkboxes and radios{{/i}}

+

{{_i}}Up to v1.4, Bootstrap required extra markup around checkboxes and radios to stack them. Now, it's a simple matter of repeating the <label class="checkbox"> that wraps the <input type="checkbox">.{{/i}}

+

{{_i}}Inline checkboxes and radios are also supported. Just add .inline to any .checkbox or .radio and you're done.{{/i}}

+
+

{{_i}}Inline forms and append/prepend{{/i}}

+

{{_i}}To use prepend or append inputs in an inline form, be sure to place the .add-on and input on the same line, without spaces.{{/i}}

+
+

{{_i}}Form help text{{/i}}

+

{{_i}}To add help text for your form inputs, include inline help text with <span class="help-inline"> or a help text block with <p class="help-block"> after the input element.{{/i}}

+
+
+
+
+
+ +
+ + + + + + +

{{_i}}Use the same .span* classes from the grid system for input sizes.{{/i}}

+
+
+
+ +
+ + + +

{{_i}}You may also use static classes that don't map to the grid, adapt to the responsive CSS styles, or account for varying types of controls (e.g., input vs. select).{{/i}}

+
+
+
+ +
+
+ @ +
+

{{_i}}Here's some help text{{/i}}

+
+
+
+ +
+
+ .00 +
+ {{_i}}Here's more help text{{/i}} +
+
+
+ +
+
+ $.00 +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+ + + +
+
+
+ +
+ + + +

{{_i}}Note: Labels surround all the options for much larger click areas and a more usable form.{{/i}}

+
+
+
+ +
+ + +
+
+
+ + +
+
+
+
+
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Button{{/i}}{{_i}}class=""{{/i}}{{_i}}Description{{/i}}
btn{{_i}}Standard gray button with gradient{{/i}}
btn btn-primary{{_i}}Provides extra visual weight and identifies the primary action in a set of buttons{{/i}}
btn btn-info{{_i}}Used as an alternative to the default styles{{/i}}
btn btn-success{{_i}}Indicates a successful or positive action{{/i}}
btn btn-warning{{_i}}Indicates caution should be taken with this action{{/i}}
btn btn-danger{{_i}}Indicates a dangerous or potentially negative action{{/i}}
btn btn-inverse{{_i}}Alternate dark gray button, not tied to a semantic action or use{{/i}}
+ +
+
+

{{_i}}Buttons for actions{{/i}}

+

{{_i}}As a convention, buttons should only be used for actions while hyperlinks are to be used for objects. For instance, "Download" should be a button while "recent activity" should be a link.{{/i}}

+

{{_i}}Button styles can be applied to anything with the .btn class applied. However, typically you'll want to apply these to only <a> and <button> elements.{{/i}}

+

{{_i}}Cross browser compatibility{{/i}}

+

{{_i}}IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled button elements, rendering text gray with a nasty text-shadow that we cannot fix.{{/i}}

+
+
+

{{_i}}Multiple sizes{{/i}}

+

{{_i}}Fancy larger or smaller buttons? Add .btn-large, .btn-small, or .btn-mini for two additional sizes.{{/i}}

+

+ + +

+

+ + +

+

+ + +

+
+

{{_i}}Disabled state{{/i}}

+

{{_i}}For disabled buttons, add the .disabled class to links and the disabled attribute for <button> elements.{{/i}}

+

+ {{_i}}Primary link{{/i}} + {{_i}}Link{{/i}} +

+

+ + +

+

+ {{_i}}Heads up!{{/i}} + {{_i}}We use .disabled as a utility class here, similar to the common .active class, so no prefix is required.{{/i}} +

+
+
+

{{_i}}One class, multiple tags{{/i}}

+

{{_i}}Use the .btn class on an <a>, <button>, or <input> element.{{/i}}

+
+{{_i}}Link{{/i}} + + + +
+
+<a class="btn" href="">{{_i}}Link{{/i}}</a>
+<button class="btn" type="submit">
+  {{_i}}Button{{/i}}
+</button>
+<input class="btn" type="button"
+         value="{{_i}}Input{{/i}}">
+<input class="btn" type="submit"
+         value="{{_i}}Submit{{/i}}">
+
+

{{_i}}As a best practice, try to match the element for you context to ensure matching cross-browser rendering. If you have an input, use an <input type="submit"> for your button.{{/i}}

+
+
+
+ + + + +
+ +
+
+
    +
  • icon-glass
  • +
  • icon-music
  • +
  • icon-search
  • +
  • icon-envelope
  • +
  • icon-heart
  • +
  • icon-star
  • +
  • icon-star-empty
  • +
  • icon-user
  • +
  • icon-film
  • +
  • icon-th-large
  • +
  • icon-th
  • +
  • icon-th-list
  • +
  • icon-ok
  • +
  • icon-remove
  • +
  • icon-zoom-in
  • +
  • icon-zoom-out
  • +
  • icon-off
  • +
  • icon-signal
  • +
  • icon-cog
  • +
  • icon-trash
  • +
  • icon-home
  • +
  • icon-file
  • +
  • icon-time
  • +
  • icon-road
  • +
  • icon-download-alt
  • +
  • icon-download
  • +
  • icon-upload
  • +
  • icon-inbox
  • +
  • icon-play-circle
  • +
  • icon-repeat
  • +
  • icon-refresh
  • +
  • icon-list-alt
  • +
  • icon-lock
  • +
  • icon-flag
  • +
  • icon-headphones
  • +
+
+
+
    +
  • icon-volume-off
  • +
  • icon-volume-down
  • +
  • icon-volume-up
  • +
  • icon-qrcode
  • +
  • icon-barcode
  • +
  • icon-tag
  • +
  • icon-tags
  • +
  • icon-book
  • +
  • icon-bookmark
  • +
  • icon-print
  • +
  • icon-camera
  • +
  • icon-font
  • +
  • icon-bold
  • +
  • icon-italic
  • +
  • icon-text-height
  • +
  • icon-text-width
  • +
  • icon-align-left
  • +
  • icon-align-center
  • +
  • icon-align-right
  • +
  • icon-align-justify
  • +
  • icon-list
  • +
  • icon-indent-left
  • +
  • icon-indent-right
  • +
  • icon-facetime-video
  • +
  • icon-picture
  • +
  • icon-pencil
  • +
  • icon-map-marker
  • +
  • icon-adjust
  • +
  • icon-tint
  • +
  • icon-edit
  • +
  • icon-share
  • +
  • icon-check
  • +
  • icon-move
  • +
  • icon-step-backward
  • +
  • icon-fast-backward
  • +
+
+
+
    +
  • icon-backward
  • +
  • icon-play
  • +
  • icon-pause
  • +
  • icon-stop
  • +
  • icon-forward
  • +
  • icon-fast-forward
  • +
  • icon-step-forward
  • +
  • icon-eject
  • +
  • icon-chevron-left
  • +
  • icon-chevron-right
  • +
  • icon-plus-sign
  • +
  • icon-minus-sign
  • +
  • icon-remove-sign
  • +
  • icon-ok-sign
  • +
  • icon-question-sign
  • +
  • icon-info-sign
  • +
  • icon-screenshot
  • +
  • icon-remove-circle
  • +
  • icon-ok-circle
  • +
  • icon-ban-circle
  • +
  • icon-arrow-left
  • +
  • icon-arrow-right
  • +
  • icon-arrow-up
  • +
  • icon-arrow-down
  • +
  • icon-share-alt
  • +
  • icon-resize-full
  • +
  • icon-resize-small
  • +
  • icon-plus
  • +
  • icon-minus
  • +
  • icon-asterisk
  • +
  • icon-exclamation-sign
  • +
  • icon-gift
  • +
  • icon-leaf
  • +
  • icon-fire
  • +
  • icon-eye-open
  • +
+
+
+
    +
  • icon-eye-close
  • +
  • icon-warning-sign
  • +
  • icon-plane
  • +
  • icon-calendar
  • +
  • icon-random
  • +
  • icon-comment
  • +
  • icon-magnet
  • +
  • icon-chevron-up
  • +
  • icon-chevron-down
  • +
  • icon-retweet
  • +
  • icon-shopping-cart
  • +
  • icon-folder-close
  • +
  • icon-folder-open
  • +
  • icon-resize-vertical
  • +
  • icon-resize-horizontal
  • +
  • icon-hdd
  • +
  • icon-bullhorn
  • +
  • icon-bell
  • +
  • icon-certificate
  • +
  • icon-thumbs-up
  • +
  • icon-thumbs-down
  • +
  • icon-hand-right
  • +
  • icon-hand-left
  • +
  • icon-hand-up
  • +
  • icon-hand-down
  • +
  • icon-circle-arrow-right
  • +
  • icon-circle-arrow-left
  • +
  • icon-circle-arrow-up
  • +
  • icon-circle-arrow-down
  • +
  • icon-globe
  • +
  • icon-wrench
  • +
  • icon-tasks
  • +
  • icon-filter
  • +
  • icon-briefcase
  • +
  • icon-fullscreen
  • +
+
+
+ +
+ +
+
+

{{_i}}Built as a sprite{{/i}}

+

{{_i}}Instead of making every icon an extra request, we've compiled them into a sprite—a bunch of images in one file that uses CSS to position the images with background-position. This is the same method we use on Twitter.com and it has worked well for us.{{/i}}

+

{{_i}}All icons classes are prefixed with .icon- for proper namespacing and scoping, much like our other components. This will help avoid conflicts with other tools.{{/i}}

+

{{_i}}Glyphicons has granted us use of the Halflings set in our open-source toolkit so long as we provide a link and credit here in the docs. Please consider doing the same in your projects.{{/i}}

+
+
+

{{_i}}How to use{{/i}}

+

{{_i}}Bootstrap uses an <i> tag for all icons, but they have no case class—only a shared prefix. To use, place the following code just about anywhere:{{/i}}

+
+<i class="icon-search"></i>
+
+

{{_i}}There are also styles available for inverted (white) icons, made ready with one extra class:{{/i}}

+
+<i class="icon-search icon-white"></i>
+
+

{{_i}}There are 140 classes to choose from for your icons. Just add an <i> tag with the right classes and you're set. You can find the full list in sprites.less or right here in this document.{{/i}}

+

+ {{_i}}Heads up!{{/i}} + {{_i}}When using beside strings of text, as in buttons or nav links, be sure to leave a space after the <i> tag for proper spacing.{{/i}} +

+
+
+

{{_i}}Use cases{{/i}}

+

{{_i}}Icons are great, but where would one use them? Here are a few ideas:{{/i}}

+
    +
  • {{_i}}As visuals for your sidebar navigation{{/i}}
  • +
  • {{_i}}For a purely icon-driven navigation{{/i}}
  • +
  • {{_i}}For buttons to help convey the meaning of an action{{/i}}
  • +
  • {{_i}}With links to share context on a user's destination{{/i}}
  • +
+

{{_i}}Essentially, anywhere you can put an <i> tag, you can put an icon.{{/i}}

+
+
+ +

{{_i}}Examples{{/i}}

+

{{_i}}Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.{{/i}}

+
+ + +
+
+
+ +
+
+ +
+
+
+
+
+
+
diff --git a/docs/docs/likebutton/docs/templates/pages/components.mustache b/docs/docs/likebutton/docs/templates/pages/components.mustache new file mode 100755 index 0000000000..b1f8589981 --- /dev/null +++ b/docs/docs/likebutton/docs/templates/pages/components.mustache @@ -0,0 +1,1815 @@ + +
+

{{_i}}Components{{/i}}

+

{{_i}}Dozens of reusable components are built into Bootstrap to provide navigation, alerts, popovers, and much more.{{/i}}

+ +
+ + + + +
+ +
+
+

{{_i}}Button groups{{/i}}

+

{{_i}}Use button groups to join multiple buttons together as one composite component. Build them with a series of <a> or <button> elements.{{/i}}

+

{{_i}}Best practices{{/i}}

+

{{_i}}We recommend the following guidelines for using button groups and toolbars:{{/i}}

+
    +
  • {{_i}}Always use the same element in a single button group, <a> or <button>.{{/i}}
  • +
  • {{_i}}Don't mix buttons of different colors in the same button group.{{/i}}
  • +
  • {{_i}}Use icons in addition to or instead of text, but be sure include alt and title text where appropriate.{{/i}}
  • +
+

{{_i}}Related Button groups with dropdowns (see below) should be called out separately and always include a dropdown caret to indicate intended behavior.{{/i}}

+
+
+

{{_i}}Default example{{/i}}

+

{{_i}}Here's how the HTML looks for a standard button group built with anchor tag buttons:{{/i}}

+
+
+ + + +
+
+
+<div class="btn-group">
+  <button class="btn">1</button>
+  <button class="btn">2</button>
+  <button class="btn">3</button>
+</div>
+
+

{{_i}}Toolbar example{{/i}}

+

{{_i}}Combine sets of <div class="btn-group"> into a <div class="btn-toolbar"> for more complex components.{{/i}}

+
+
+ + + + +
+
+ + + +
+
+ +
+
+
+<div class="btn-toolbar">
+  <div class="btn-group">
+    ...
+  </div>
+</div>
+
+
+
+

{{_i}}Checkbox and radio flavors{{/i}}

+

{{_i}}Button groups can also function as radios, where only one button may be active, or checkboxes, where any number of buttons may be active. View the Javascript docs for that.{{/i}}

+

{{_i}}Get the javascript »{{/i}}

+

{{_i}}Dropdowns in button groups{{/i}}

+

{{_i}}Heads up!{{/i}} {{_i}}Buttons with dropdowns must be individually wrapped in their own .btn-group within a .btn-toolbar for proper rendering.{{/i}}

+
+
+
+ + + + +
+ + +

{{_i}}Button dropdowns{{/i}}

+
+
+

{{_i}}Overview and examples{{/i}}

+

{{_i}}Use any button to trigger a dropdown menu by placing it within a .btn-group and providing the proper menu markup.{{/i}}

+ + +
+
+

{{_i}}Example markup{{/i}}

+

{{_i}}Similar to a button group, our markup uses regular button markup, but with a handful of additions to refine the style and support Bootstrap's dropdown jQuery plugin.{{/i}}

+
+<div class="btn-group">
+  <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
+    {{_i}}Action{{/i}}
+    <span class="caret"></span>
+  </a>
+  <ul class="dropdown-menu">
+    <!-- {{_i}}dropdown menu links{{/i}} -->
+  </ul>
+</div>
+
+
+
+
+
+

{{_i}}Works with all button sizes{{/i}}

+

{{_i}}Button dropdowns work at any size. your button sizes to .btn-large, .btn-small, or .btn-mini.{{/i}}

+ +
+
+

{{_i}}Requires javascript{{/i}}

+

{{_i}}Button dropdowns require the Bootstrap dropdown plugin to function.{{/i}}

+

{{_i}}In some cases—like mobile—dropdown menus will extend outside the viewport. You need to resolve the alignment manually or with custom javascript.{{/i}}

+
+
+
+ +

{{_i}}Split button dropdowns{{/i}}

+
+
+

{{_i}}Overview and examples{{/i}}

+

{{_i}}Building on the button group styles and markup, we can easily create a split button. Split buttons feature a standard action on the left and a dropdown toggle on the right with contextual links.{{/i}}

+ + + +

{{_i}}Sizes{{/i}}

+

{{_i}}Utilize the extra button classes .btn-mini, .btn-small, or .btn-large for sizing.{{/i}}

+ + + +
+<div class="btn-group">
+  ...
+  <ul class="dropdown-menu pull-right">
+    <!-- {{_i}}dropdown menu links{{/i}} -->
+  </ul>
+</div>
+
+
+
+

{{_i}}Example markup{{/i}}

+

{{_i}}We expand on the normal button dropdowns to provide a second button action that operates as a separate dropdown trigger.{{/i}}

+
+<div class="btn-group">
+  <button class="btn">{{_i}}Action{{/i}}</button>
+  <button class="btn dropdown-toggle" data-toggle="dropdown">
+    <span class="caret"></span>
+  </button>
+  <ul class="dropdown-menu">
+    <!-- {{_i}}dropdown menu links{{/i}} -->
+  </ul>
+</div>
+
+

{{_i}}Dropup menus{{/i}}

+

{{_i}}Dropdown menus can also be toggled from the bottom up by adding a single class to the immediate parent of .dropdown-menu. It will flip the direction of the .caret and reposition the menu itself to move from the bottom up instead of top down.{{/i}}

+ +
+<div class="btn-group dropup">
+  <button class="btn">{{_i}}Dropup{{/i}}</button>
+  <button class="btn dropdown-toggle" data-toggle="dropdown">
+    <span class="caret"></span>
+  </button>
+  <ul class="dropdown-menu">
+    <!-- {{_i}}dropdown menu links{{/i}} -->
+  </ul>
+</div>
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + +
+ + +

{{_i}}Multicon-page pagination{{/i}}

+
+
+

{{_i}}When to use{{/i}}

+

{{_i}}Ultra simplistic and minimally styled pagination inspired by Rdio, great for apps and search results. The large block is hard to miss, easily scalable, and provides large click areas.{{/i}}

+

{{_i}}Stateful page links{{/i}}

+

{{_i}}Links are customizable and work in a number of circumstances with the right class. .disabled for unclickable links and .active for current page.{{/i}}

+

{{_i}}Flexible alignment{{/i}}

+

{{_i}}Add either of two optional classes to change the alignment of pagination links: .pagination-centered and .pagination-right.{{/i}}

+
+
+

{{_i}}Examples{{/i}}

+

{{_i}}The default pagination component is flexible and works in a number of variations.{{/i}}

+ + + + +
+
+

{{_i}}Markup{{/i}}

+

{{_i}}Wrapped in a <div>, pagination is just a <ul>.{{/i}}

+
+<div class="pagination">
+  <ul>
+    <li><a href="#">Prev</a></li>
+    <li class="active">
+      <a href="#">1</a>
+    </li>
+    <li><a href="#">2</a></li>
+    <li><a href="#">3</a></li>
+    <li><a href="#">4</a></li>
+    <li><a href="#">Next</a></li>
+  </ul>
+</div>
+
+
+
+ +

{{_i}}Pager{{/i}} {{_i}}For quick previous and next links{{/i}}

+
+
+

{{_i}}About pager{{/i}}

+

{{_i}}The pager component is a set of links for simple pagination implementations with light markup and even lighter styles. It's great for simple sites like blogs or magazines.{{/i}}

+

{{_i}}Optional disabled state{{/i}}

+

{{_i}}Pager links also use the general .disabled class from the pagination.{{/i}}

+
+
+

{{_i}}Default example{{/i}}

+

{{_i}}By default, the pager centers links.{{/i}}

+ +
+<ul class="pager">
+  <li>
+    <a href="#">{{_i}}Previous{{/i}}</a>
+  </li>
+  <li>
+    <a href="#">{{_i}}Next{{/i}}</a>
+  </li>
+</ul>
+
+
+
+

{{_i}}Aligned links{{/i}}

+

{{_i}}Alternatively, you can align each link to the sides:{{/i}}

+ +
+<ul class="pager">
+  <li class="previous">
+    <a href="#">{{_i}}&larr; Older{{/i}}</a>
+  </li>
+  <li class="next">
+    <a href="#">{{_i}}Newer &rarr;{{/i}}</a>
+  </li>
+</ul>
+
+
+
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Labels{{/i}}{{_i}}Markup{{/i}}
+ {{_i}}Default{{/i}} + + <span class="label">{{_i}}Default{{/i}}</span> +
+ {{_i}}Success{{/i}} + + <span class="label label-success">{{_i}}Success{{/i}}</span> +
+ {{_i}}Warning{{/i}} + + <span class="label label-warning">{{_i}}Warning{{/i}}</span> +
+ {{_i}}Important{{/i}} + + <span class="label label-important">{{_i}}Important{{/i}}</span> +
+ {{_i}}Info{{/i}} + + <span class="label label-info">{{_i}}Info{{/i}}</span> +
+ {{_i}}Inverse{{/i}} + + <span class="label label-inverse">{{_i}}Inverse{{/i}}</span> +
+
+ + + + +
+ +
+
+

About

+

{{_i}}Badges are small, simple components for displaying an indicator or count of some sort. They're commonly found in email clients like Mail.app or on mobile apps for push notifications.{{/i}}

+
+
+

Available classes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Name{{/i}}{{_i}}Example{{/i}}{{_i}}Markup{{/i}}
+ {{_i}}Default{{/i}} + + 1 + + <span class="badge">1</span> +
+ {{_i}}Success{{/i}} + + 2 + + <span class="badge badge-success">2</span> +
+ {{_i}}Warning{{/i}} + + 4 + + <span class="badge badge-warning">4</span> +
+ {{_i}}Important{{/i}} + + 6 + + <span class="badge badge-important">6</span> +
+ {{_i}}Info{{/i}} + + 8 + + <span class="badge badge-info">8</span> +
+ {{_i}}Inverse{{/i}} + + 10 + + <span class="badge badge-inverse">10</span> +
+
+
+
+ + + + +
+ +

{{_i}}Hero unit{{/i}}

+
+
+

{{_i}}Bootstrap provides a lightweight, flexible component called a hero unit to showcase content on your site. It works well on marketing and content-heavy sites.{{/i}}

+

{{_i}}Markup{{/i}}

+

{{_i}}Wrap your content in a div like so:{{/i}}

+
+<div class="hero-unit">
+  <h1>{{_i}}Heading{{/i}}</h1>
+  <p>{{_i}}Tagline{{/i}}</p>
+  <p>
+    <a class="btn btn-primary btn-large">
+      {{_i}}Learn more{{/i}}
+    </a>
+  </p>
+</div>
+
+
+
+
+

{{_i}}Hello, world!{{/i}}

+

{{_i}}This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.{{/i}}

+

{{_i}}Learn more{{/i}}

+
+
+
+

{{_i}}Page header{{/i}}

+
+
+

{{_i}}A simple shell for an h1 to appropriately space out and segment sections of content on a page. It can utilize the h1's default small, element as well most other components (with additional styles).{{/i}}

+
+
+ +
+<div class="page-header">
+  <h1>{{_i}}Example page header{{/i}}</h1>
+</div>
+
+
+
+
+ + + + +
+ + +
+
+

{{_i}}Default thumbnails{{/i}}

+

{{_i}}By default, Bootstrap's thumbnails are designed to showcase linked images with minimal required markup.{{/i}}

+ +
+
+

{{_i}}Highly customizable{{/i}}

+

{{_i}}With a bit of extra markup, it's possible to add any kind of HTML content like headings, paragraphs, or buttons into thumbnails.{{/i}}

+
    +
  • +
    + +
    +
    {{_i}}Thumbnail label{{/i}}
    +

    Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

    +

    {{_i}}Action{{/i}} {{_i}}Action{{/i}}

    +
    +
    +
  • +
  • +
    + +
    +
    {{_i}}Thumbnail label{{/i}}
    +

    Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

    +

    {{_i}}Action{{/i}} {{_i}}Action{{/i}}

    +
    +
    +
  • +
+
+
+ +
+
+

{{_i}}Why use thumbnails{{/i}}

+

{{_i}}Thumbnails (previously .media-grid up until v1.4) are great for grids of photos or videos, image search results, retail products, portfolios, and much more. They can be links or static content.{{/i}}

+
+
+

{{_i}}Simple, flexible markup{{/i}}

+

{{_i}}Thumbnail markup is simple—a ul with any number of li elements is all that is required. It's also super flexible, allowing for any type of content with just a bit more markup to wrap your contents.{{/i}}

+
+
+

{{_i}}Uses grid column sizes{{/i}}

+

{{_i}}Lastly, the thumbnails component uses existing grid system classes—like .span2 or .span3—for control of thumbnail dimensions.{{/i}}

+
+
+ +
+
+

{{_i}}The markup{{/i}}

+

{{_i}}As mentioned previously, the required markup for thumbnails is light and straightforward. Here's a look at the default setup for linked images:{{/i}}

+
+<ul class="thumbnails">
+  <li class="span3">
+    <a href="#" class="thumbnail">
+      <img src="http://placehold.it/260x180" alt="">
+    </a>
+  </li>
+  ...
+</ul>
+
+

{{_i}}For custom HTML content in thumbnails, the markup changes slightly. To allow block level content anywhere, we swap the <a> for a <div> like so:{{/i}}

+
+<ul class="thumbnails">
+  <li class="span3">
+    <div class="thumbnail">
+      <img src="http://placehold.it/260x180" alt="">
+      <h5>{{_i}}Thumbnail label{{/i}}</h5>
+      <p>{{_i}}Thumbnail caption right here...{{/i}}</p>
+    </div>
+  </li>
+  ...
+</ul>
+
+
+
+

{{_i}}More examples{{/i}}

+

{{_i}}Explore all your options with the various grid classes available to you. You can also mix and match different sizes.{{/i}}

+ +
+
+ +
+ + + + +
+ + +

{{_i}}Lightweight defaults{{/i}}

+
+
+

{{_i}}Rewritten base class{{/i}}

+

{{_i}}With Bootstrap 2, we've simplified the base class: .alert instead of .alert-message. We've also reduced the minimum required markup—no <p> is required by default, just the outer <div>.{{/i}}

+

{{_i}}Single alert message{{/i}}

+

{{_i}}For a more durable component with less code, we've removed the differentiating look for block alerts, messages that come with more padding and typically more text. The class also has changed to .alert-block.{{/i}}

+
+

{{_i}}Goes great with javascript{{/i}}

+

{{_i}}Bootstrap comes with a great jQuery plugin that supports alert messages, making dismissing them quick and easy.{{/i}}

+

{{_i}}Get the plugin »{{/i}}

+
+
+

{{_i}}Example alerts{{/i}}

+

{{_i}}Wrap your message and an optional close icon in a div with simple class.{{/i}}

+
+ + {{_i}}Warning!{{/i}} {{_i}}Best check yo self, you're not looking too good.{{/i}} +
+
+<div class="alert">
+  <button class="close" data-dismiss="alert">×</button>
+  <strong>{{_i}}Warning!{{/i}}</strong> {{_i}}Best check yo self, you're not looking too good.{{/i}}
+</div>
+
+

{{_i}}Heads up!{{/i}} {{_i}}iOS devices require an href="#" for the dismissal of alerts. Be sure to include it and the data attribute for anchor close icons. Alternatively, you may use a <button> element with the data attribute, which we have opted to do for our docs. When using <button>, you must include type="button" or your forms may not submit.{{/i}}

+

{{_i}}Easily extend the standard alert message with two optional classes: .alert-block for more padding and text controls and .alert-heading for a matching heading.{{/i}}

+
+ +

{{_i}}Warning!{{/i}}

+

{{_i}}Best check yo self, you're not looking too good.{{/i}} Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

+
+
+<div class="alert alert-block">
+  <a class="close" data-dismiss="alert" href="#">×</a>
+  <h4 class="alert-heading">{{_i}}Warning!{{/i}}</h4>
+  {{_i}}Best check yo self, you're not...{{/i}}
+</div>
+
+
+
+ +

{{_i}}Contextual alternatives{{/i}} {{_i}}Add optional classes to change an alert's connotation{{/i}}

+
+
+

{{_i}}Error or danger{{/i}}

+
+ + {{_i}}Oh snap!{{/i}} {{_i}}Change a few things up and try submitting again.{{/i}} +
+
+<div class="alert alert-error">
+  ...
+</div>
+
+
+
+

{{_i}}Success{{/i}}

+
+ + {{_i}}Well done!{{/i}} {{_i}}You successfully read this important alert message.{{/i}} +
+
+<div class="alert alert-success">
+  ...
+</div>
+
+
+
+

{{_i}}Information{{/i}}

+
+ + {{_i}}Heads up!{{/i}} {{_i}}This alert needs your attention, but it's not super important.{{/i}} +
+
+<div class="alert alert-info">
+  ...
+</div>
+
+
+
+ +
+ + + + +
+ + +

{{_i}}Examples and markup{{/i}}

+
+
+

{{_i}}Basic{{/i}}

+

{{_i}}Default progress bar with a vertical gradient.{{/i}}

+
+
+
+
+<div class="progress">
+  <div class="bar"
+       style="width: 60%;"></div>
+</div>
+
+
+
+

{{_i}}Striped{{/i}}

+

{{_i}}Uses a gradient to create a striped effect (no IE).{{/i}}

+
+
+
+
+<div class="progress progress-striped">
+  <div class="bar"
+       style="width: 20%;"></div>
+</div>
+
+
+
+

{{_i}}Animated{{/i}}

+

{{_i}}Takes the striped example and animates it (no IE).{{/i}}

+
+
+
+
+<div class="progress progress-striped
+     active">
+  <div class="bar"
+       style="width: 40%;"></div>
+</div>
+
+
+
+ +

{{_i}}Options and browser support{{/i}}

+
+
+

{{_i}}Additional colors{{/i}}

+

{{_i}}Progress bars use some of the same button and alert classes for consistent styles.{{/i}}

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

{{_i}}Striped bars{{/i}}

+

{{_i}}Similar to the solid colors, we have varied striped progress bars.{{/i}}

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

{{_i}}Behavior{{/i}}

+

{{_i}}Progress bars use CSS3 transitions, so if you dynamically adjust the width via javascript, it will smoothly resize.{{/i}}

+

{{_i}}If you use the .active class, your .progress-striped progress bars will animate the stripes left to right.{{/i}}

+
+
+

{{_i}}Browser support{{/i}}

+

{{_i}}Progress bars use CSS3 gradients, transitions, and animations to achieve all their effects. These features are not supported in IE7-9 or older versions of Firefox.{{/i}}

+

{{_i}}Opera and IE do not support animations at this time.{{/i}}

+
+
+ +
+ + + + + + +
+ +
+
+

{{_i}}Wells{{/i}}

+

{{_i}}Use the well as a simple effect on an element to give it an inset effect.{{/i}}

+
+ {{_i}}Look, I'm in a well!{{/i}} +
+
+<div class="well">
+  ...
+</div>
+
+
+
+

{{_i}}Close icon{{/i}}

+

{{_i}}Use the generic close icon for dismissing content like modals and alerts.{{/i}}

+

+
<button class="close">&times;</button>
+

{{_i}}iOS devices require an href="#" for click events if you rather use an anchor.{{/i}}

+
<a class="close" href="#">&times;</a>
+
+
+
diff --git a/docs/docs/likebutton/docs/templates/pages/download.mustache b/docs/docs/likebutton/docs/templates/pages/download.mustache new file mode 100755 index 0000000000..6efe757454 --- /dev/null +++ b/docs/docs/likebutton/docs/templates/pages/download.mustache @@ -0,0 +1,338 @@ + +
+

{{_i}}Customize and download{{/i}}

+

{{_i}}Download the full repository or customize your entire Bootstrap build by selecting only the components, javascript plugins, and assets you need.{{/i}}

+ +
+ +
+ +
+
+

{{_i}}Scaffolding{{/i}}

+ + + + +

{{_i}}Base CSS{{/i}}

+ + + + + + + +
+
+

{{_i}}Components{{/i}}

+ + + + + + + + + + +
+
+

{{_i}}JS Components{{/i}}

+ + + + + + +
+
+

{{_i}}Miscellaneous{{/i}}

+ + + + +

{{_i}}Responsive{{/i}}

+ + + + + +
+
+
+ +
+ +
+
+ + + + + + +
+
+ + + + + + +
+
+

{{_i}}Heads up!{{/i}}

+

{{_i}}All checked plugins will be compiled into a single file, bootstrap.js. All plugins require the latest version of jQuery to be included.{{/i}}

+
+
+
+ + +
+ +
+
+

{{_i}}Scaffolding{{/i}}

+ + + + + +

{{_i}}Links{{/i}}

+ + + + +

{{_i}}Colors{{/i}}

+ + + + + + + + + + + + + + + +

{{_i}}Sprites{{/i}}

+ + + + + +
+
+

{{_i}}Grid system{{/i}}

+ + + + + + +

{{_i}}Fluid grid system{{/i}}

+ + + + + +

{{_i}}Typography{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

{{_i}}Tables{{/i}}

+ + + + + + + + + +

{{_i}}Navbar{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

{{_i}}Dropdowns{{/i}}

+ + + + + + + + + + +
+
+

{{_i}}Forms{{/i}}

+ + + + + + + + + + + + + + + + + + +

{{_i}}Form states & alerts{{/i}}

+ + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+ Customize and Download +

{{_i}}What's included?{{/i}}

+

{{_i}}Downloads include compiled CSS, compiled and minified CSS, and compiled jQuery plugins, all nicely packed up into a zipball for your convenience.{{/i}}

+
+
diff --git a/docs/docs/likebutton/docs/templates/pages/examples.mustache b/docs/docs/likebutton/docs/templates/pages/examples.mustache new file mode 100755 index 0000000000..dee7d5651d --- /dev/null +++ b/docs/docs/likebutton/docs/templates/pages/examples.mustache @@ -0,0 +1,31 @@ + +
+

{{_i}}Bootstrap examples{{/i}}

+

{{_i}}We've included a few basic examples as starting points for your work with Bootstrap. We encourage folks to iterate on these examples and not simply use them as an end result.{{/i}}

+
+ + + diff --git a/docs/docs/likebutton/docs/templates/pages/index.mustache b/docs/docs/likebutton/docs/templates/pages/index.mustache new file mode 100755 index 0000000000..f14e95c14a --- /dev/null +++ b/docs/docs/likebutton/docs/templates/pages/index.mustache @@ -0,0 +1,144 @@ + +
+
+

{{_i}}Bootstrap, from Twitter{{/i}}

+

{{_i}}Simple and flexible HTML, CSS, and Javascript for popular user interface components and interactions.{{/i}}

+

+ {{_i}}View project on GitHub{{/i}} + {{_i}}Download Bootstrap (v2.0.4){{/i}} +

+
+ + +
+ +
+ +
+

{{_i}}Designed for everyone, everywhere.{{/i}}

+

{{_i}}Need reasons to love Bootstrap? Look no further.{{/i}}

+
+
+ +

{{_i}}Built for and by nerds{{/i}}

+

{{_i}}Like you, we love building awesome products on the web. We love it so much, we decided to help people just like us do it easier, better, and faster. Bootstrap is built for you.{{/i}}

+
+
+ +

{{_i}}For all skill levels{{/i}}

+

{{_i}}Bootstrap is designed to help people of all skill levels—designer or developer, huge nerd or early beginner. Use it as a complete kit or use to start something more complex.{{/i}}

+
+
+ +

{{_i}}Cross-everything{{/i}}

+

{{_i}}Originally built with only modern browsers in mind, Bootstrap has evolved to include support for all major browsers (even IE7!) and, with Bootstrap 2, tablets and smartphones, too.{{/i}}

+
+
+
+
+ +

{{_i}}12-column grid{{/i}}

+

{{_i}}Grid systems aren't everything, but having a durable and flexible one at the core of your work can make development much simpler. Use our built-in grid classes or roll your own.{{/i}}

+
+
+ +

{{_i}}Responsive design{{/i}}

+

{{_i}}With Bootstrap 2, we've gone fully responsive. Our components are scaled according to a range of resolutions and devices to provide a consistent experience, no matter what.{{/i}}

+
+
+ +

{{_i}}Styleguide docs{{/i}}

+

{{_i}}Unlike other front-end toolkits, Bootstrap was designed first and foremost as a styleguide to document not only our features, but best practices and living, coded examples.{{/i}}

+
+
+
+
+ +

{{_i}}Growing library{{/i}}

+

{{_i}}Despite being only 10kb (gzipped), Bootstrap is one of the most complete front-end toolkits out there with dozens of fully functional components ready to be put to use.{{/i}}

+
+
+ +

{{_i}}Custom jQuery plugins{{/i}}

+

{{_i}}What good is an awesome design component without easy-to-use, proper, and extensible interactions? With Bootstrap, you get custom-built jQuery plugins to bring your projects to life.{{/i}}

+
+
+ +

{{_i}}Built on LESS{{/i}}

+

{{_i}}Where vanilla CSS falters, LESS excels. Variables, nesting, operations, and mixins in LESS makes coding CSS faster and more efficient with minimal overhead.{{/i}}

+
+
+
+
+ +

HTML5

+

{{_i}}Built to support new HTML5 elements and syntax.{{/i}}

+
+
+ +

CSS3

+

{{_i}}Progressively enhanced components for ultimate style.{{/i}}

+
+
+ +

{{_i}}Open-source{{/i}}

+

{{_i}}Built for and maintained by the community via GitHub.{{/i}}

+
+
+ +

{{_i}}Made at Twitter{{/i}}

+

{{_i}}Brought to you by an experienced engineer and designer.{{/i}}

+
+
+ +
+ +

{{_i}}Built with Bootstrap.{{/i}}

+

{{_i}}For even more sites built with Bootstrap, visit the unofficial Tumblr or browse the examples.{{/i}}

+ + +
\ No newline at end of file diff --git a/docs/docs/likebutton/docs/templates/pages/javascript.mustache b/docs/docs/likebutton/docs/templates/pages/javascript.mustache new file mode 100755 index 0000000000..4ed30284a2 --- /dev/null +++ b/docs/docs/likebutton/docs/templates/pages/javascript.mustache @@ -0,0 +1,1405 @@ + +
+

{{_i}}Javascript for Bootstrap{{/i}}

+

{{_i}}Bring Bootstrap's components to life—now with 12 custom jQuery plugins.{{/i}} +

+
+ + + +
+ +
+
+

{{_i}}Modals{{/i}}

+

{{_i}}A streamlined, but flexible, take on the traditional javascript modal plugin with only the minimum required functionality and smart defaults.{{/i}}

+
+
+

{{_i}}Dropdowns{{/i}}

+

{{_i}}Add dropdown menus to nearly anything in Bootstrap with this simple plugin. Bootstrap features full dropdown menu support on in the navbar, tabs, and pills.{{/i}}

+
+
+

{{_i}}Scrollspy{{/i}}

+

{{_i}}Use scrollspy to automatically update the links in your navbar to show the current active link based on scroll position.{{/i}}

+
+
+

{{_i}}Togglable tabs{{/i}}

+

{{_i}}Use this plugin to make tabs and pills more useful by allowing them to toggle through tabbable panes of local content.{{/i}}

+
+
+
+
+

{{_i}}Tooltips{{/i}}

+

{{_i}}A new take on the jQuery Tipsy plugin, Tooltips don't rely on images—they use CSS3 for animations and data-attributes for local title storage.{{/i}}

+
+
+

{{_i}}Popovers{{/i}} *

+

{{_i}}Add small overlays of content, like those on the iPad, to any element for housing secondary information.{{/i}}

+

* {{_i}}Requires Tooltips to be included{{/i}}

+
+
+

{{_i}}Alert messages{{/i}}

+

{{_i}}The alert plugin is a tiny class for adding close functionality to alerts.{{/i}}

+
+
+

{{_i}}Buttons{{/i}}

+

{{_i}}Do more with buttons. Control button states or create groups of buttons for more components like toolbars.{{/i}}

+
+
+
+
+

{{_i}}Collapse{{/i}}

+

{{_i}}Get base styles and flexible support for collapsible components like accordions and navigation.{{/i}}

+
+
+

{{_i}}Carousel{{/i}}

+

{{_i}}Create a merry-go-round of any content you wish to provide an interactive slideshow of content.{{/i}}

+
+
+

Typeahead

+

{{_i}}A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.{{/i}}

+
+
+

{{_i}}Transitions{{/i}} *

+

{{_i}}For simple transition effects, include bootstrap-transition.js once to slide in modals or fade out alerts.{{/i}}

+

* {{_i}}Required for animation in plugins{{/i}}

+
+
+
{{_i}}Heads up!{{/i}} {{_i}}All javascript plugins require the latest version of jQuery.{{/i}}
+
+ + + + +
+ +
+
+

{{_i}}About modals{{/i}}

+

{{_i}}A streamlined, but flexible, take on the traditional javascript modal plugin with only the minimum required functionality and smart defaults.{{/i}}

+ {{_i}}Download file{{/i}} +
+
+

{{_i}}Static example{{/i}}

+

{{_i}}Below is a statically rendered modal.{{/i}}

+ + +

{{_i}}Live demo{{/i}}

+

{{_i}}Toggle a modal via javascript by clicking the button below. It will slide down and fade in from the top of the page.{{/i}}

+ + + {{_i}}Launch demo modal{{/i}} + +
+ +

{{_i}}Using bootstrap-modal{{/i}}

+

{{_i}}Call the modal via javascript:{{/i}}

+
$('#myModal').modal(options)
+

{{_i}}Options{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
{{_i}}backdrop{{/i}}{{_i}}boolean{{/i}}{{_i}}true{{/i}}{{_i}}Includes a modal-backdrop element. Alternatively, specify static for a backdrop which doesn't close the modal on click.{{/i}}
{{_i}}keyboard{{/i}}{{_i}}boolean{{/i}}{{_i}}true{{/i}}{{_i}}Closes the modal when escape key is pressed{{/i}}
{{_i}}show{{/i}}{{_i}}boolean{{/i}}{{_i}}true{{/i}}{{_i}}Shows the modal when initialized.{{/i}}
+

{{_i}}Markup{{/i}}

+

{{_i}}You can activate modals on your page easily without having to write a single line of javascript. Just set data-toggle="modal" on a controller element with a data-target="#foo" or href="#foo" which corresponds to a modal element id, and when clicked, it will launch your modal.

+

Also, to add options to your modal instance, just include them as additional data attributes on either the control element or the modal markup itself.{{/i}}

+
+<a class="btn" data-toggle="modal" href="#myModal" >{{_i}}Launch Modal{{/i}}</a>
+
+ +
+<div class="modal hide" id="myModal">
+  <div class="modal-header">
+    <button type="button" class="close" data-dismiss="modal">×</button>
+    <h3>Modal header</h3>
+  </div>
+  <div class="modal-body">
+    <p>{{_i}}One fine body…{{/i}}</p>
+  </div>
+  <div class="modal-footer">
+    <a href="#" class="btn" data-dismiss="modal">{{_i}}Close{{/i}}</a>
+    <a href="#" class="btn btn-primary">{{_i}}Save changes{{/i}}</a>
+  </div>
+</div>
+
+
+ {{_i}}Heads up!{{/i}} {{_i}}If you want your modal to animate in and out, just add a .fade class to the .modal element (refer to the demo to see this in action) and include bootstrap-transition.js.{{/i}} +
+ Methods{{/i}} +

.modal({{_i}}options{{/i}})

+

{{_i}}Activates your content as a modal. Accepts an optional options object.{{/i}}

+
+$('#myModal').modal({
+  keyboard: false
+})
+

.modal('toggle')

+

{{_i}}Manually toggles a modal.{{/i}}

+
$('#myModal').modal('toggle')
+

.modal('show')

+

{{_i}}Manually opens a modal.{{/i}}

+
$('#myModal').modal('show')
+

.modal('hide')

+

{{_i}}Manually hides a modal.{{/i}}

+
$('#myModal').modal('hide')
+

{{_i}}Events{{/i}}

+

{{_i}}Bootstrap's modal class exposes a few events for hooking into modal functionality.{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Event{{/i}}{{_i}}Description{{/i}}
{{_i}}show{{/i}}{{_i}}This event fires immediately when the show instance method is called.{{/i}}
{{_i}}shown{{/i}}{{_i}}This event is fired when the modal has been made visible to the user (will wait for css transitions to complete).{{/i}}
{{_i}}hide{{/i}}{{_i}}This event is fired immediately when the hide instance method has been called.{{/i}}
{{_i}}hidden{{/i}}{{_i}}This event is fired when the modal has finished being hidden from the user (will wait for css transitions to complete).{{/i}}
+ +
+$('#myModal').on('hidden', function () {
+  // {{_i}}do something…{{/i}}
+})
+
+
+
+ + + + + + + + + +
+ +
+
+

{{_i}}The ScrollSpy plugin is for automatically updating nav targets based on scroll position.{{/i}}

+ {{_i}}Download file{{/i}} +
+
+

{{_i}}Example navbar with scrollspy{{/i}}

+

{{_i}}Scroll the area below and watch the navigation update. The dropdown sub items will be highlighted as well. Try it!{{/i}}

+ +
+

@fat

+

+ Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat. +

+

@mdo

+

+ Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt. +

+

one

+

+ Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone. +

+

two

+

+ In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt. +

+

three

+

+ Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat. +

+

Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats. +

+
+
+

{{_i}}Using bootstrap-scrollspy.js{{/i}}

+

{{_i}}Call the scrollspy via javascript:{{/i}}

+
$('#navbar').scrollspy()
+

{{_i}}Markup{{/i}}

+

{{_i}}To easily add scrollspy behavior to your topbar navigation, just add data-spy="scroll" to the element you want to spy on (most typically this would be the body).{{/i}}

+
<body data-spy="scroll" >...</body>
+
+ {{_i}}Heads up!{{/i}} + {{_i}}Navbar links must have resolvable id targets. For example, a <a href="#home">home</a> must correspond to something in the dom like <div id="home"></div>.{{/i}} +
+

{{_i}}Methods{{/i}}

+

.scrollspy('refresh')

+

{{_i}}When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:{{/i}}

+
+$('[data-spy="scroll"]').each(function () {
+  var $spy = $(this).scrollspy('refresh')
+});
+
+

{{_i}}Options{{/i}}

+ + + + + + + + + + + + + + + + + +
{{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
{{_i}}offset{{/i}}{{_i}}number{{/i}}{{_i}}10{{/i}}{{_i}}Pixels to offset from top when calculating position of scroll.{{/i}}
+

{{_i}}Events{{/i}}

+ + + + + + + + + + + + + +
{{_i}}Event{{/i}}{{_i}}Description{{/i}}
{{_i}}activate{{/i}}{{_i}}This event fires whenever a new item becomes activated by the scrollspy.{{/i}}
+
+
+
+ + + + +
+ +
+
+

{{_i}}This plugin adds quick, dynamic tab and pill functionality for transitioning through local content.{{/i}}

+ {{_i}}Download file{{/i}} +
+
+

{{_i}}Example tabs{{/i}}

+

{{_i}}Click the tabs below to toggle between hidden panes, even via dropdown menus.{{/i}}

+ +
+
+

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

+
+
+

Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.

+
+ + +
+
+

{{_i}}Using bootstrap-tab.js{{/i}}

+

{{_i}}Enable tabbable tabs via javascript (each tab needs to be activated individually):{{/i}}

+
+$('#myTab a').click(function (e) {
+  e.preventDefault();
+  $(this).tab('show');
+})
+

{{_i}}You can activate individual tabs in several ways:{{/i}}

+
+$('#myTab a[href="#profile"]').tab('show'); // Select tab by name
+$('#myTab a:first').tab('show'); // Select first tab
+$('#myTab a:last').tab('show'); // Select last tab
+$('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed)
+
+

{{_i}}Markup{{/i}}

+

{{_i}}You can activate a tab or pill navigation without writing any javascript by simply specifying data-toggle="tab" or data-toggle="pill" on an element. Adding the nav and nav-tabs classes to the tab ul will apply the bootstrap tab styling.{{/i}}

+
+<ul class="nav nav-tabs">
+  <li><a href="#home" data-toggle="tab">{{_i}}Home{{/i}}</a></li>
+  <li><a href="#profile" data-toggle="tab">{{_i}}Profile{{/i}}</a></li>
+  <li><a href="#messages" data-toggle="tab">{{_i}}Messages{{/i}}</a></li>
+  <li><a href="#settings" data-toggle="tab">{{_i}}Settings{{/i}}</a></li>
+</ul>
+

{{_i}}Methods{{/i}}

+

$().tab

+

+ {{_i}}Activates a tab element and content container. Tab should have either a data-target or an href targeting a container node in the DOM.{{/i}} +

+
+<ul class="nav nav-tabs" id="myTab">
+  <li class="active"><a href="#home">{{_i}}Home{{/i}}</a></li>
+  <li><a href="#profile">{{_i}}Profile{{/i}}</a></li>
+  <li><a href="#messages">{{_i}}Messages{{/i}}</a></li>
+  <li><a href="#settings">{{_i}}Settings{{/i}}</a></li>
+</ul>
+
+<div class="tab-content">
+  <div class="tab-pane active" id="home">...</div>
+  <div class="tab-pane" id="profile">...</div>
+  <div class="tab-pane" id="messages">...</div>
+  <div class="tab-pane" id="settings">...</div>
+</div>
+
+<script>
+  $(function () {
+    $('#myTab a:last').tab('show');
+  })
+</script>
+

{{_i}}Events{{/i}}

+ + + + + + + + + + + + + + + + + +
{{_i}}Event{{/i}}{{_i}}Description{{/i}}
{{_i}}show{{/i}}{{_i}}This event fires on tab show, but before the new tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.{{/i}}
{{_i}}shown{{/i}}{{_i}}This event fires on tab show after a tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.{{/i}}
+ +
+$('a[data-toggle="tab"]').on('shown', function (e) {
+  e.target // activated tab
+  e.relatedTarget // previous tab
+})
+
+
+
+ + + +
+ +
+
+

{{_i}}About Tooltips{{/i}}

+

{{_i}}Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, use css3 for animations, and data-attributes for local title storage.{{/i}}

+ {{_i}}Download file{{/i}} +
+
+

{{_i}}Example use of Tooltips{{/i}}

+

{{_i}}Hover over the links below to see tooltips:{{/i}}

+
+

{{_i}}Tight pants next level keffiyeh you probably haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel have a terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan whatever keytar, scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral.{{/i}} +

+
+
+

{{_i}}Using{{/i}} bootstrap-tooltip.js

+

{{_i}}Trigger the tooltip via javascript:{{/i}}

+
$('#example').tooltip({{_i}}options{{/i}})
+

{{_i}}Options{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
{{_i}}animation{{/i}}{{_i}}boolean{{/i}}true{{_i}}apply a css fade transition to the tooltip{{/i}}
{{_i}}placement{{/i}}{{_i}}string|function{{/i}}'top'{{_i}}how to position the tooltip{{/i}} - top | bottom | left | right
{{_i}}selector{{/i}}{{_i}}string{{/i}}false{{_i}}If a selector is provided, tooltip objects will be delegated to the specified targets.{{/i}}
{{_i}}title{{/i}}{{_i}}string | function{{/i}}''{{_i}}default title value if `title` tag isn't present{{/i}}
{{_i}}trigger{{/i}}{{_i}}string{{/i}}'hover'{{_i}}how tooltip is triggered{{/i}} - hover | focus | manual
{{_i}}delay{{/i}}{{_i}}number | object{{/i}}0 +

{{_i}}delay showing and hiding the tooltip (ms) - does not apply to manual trigger type{{/i}}

+

{{_i}}If a number is supplied, delay is applied to both hide/show{{/i}}

+

{{_i}}Object structure is: delay: { show: 500, hide: 100 }{{/i}}

+
+
+ {{_i}}Heads up!{{/i}} + {{_i}}Options for individual tooltips can alternatively be specified through the use of data attributes.{{/i}} +
+

{{_i}}Markup{{/i}}

+

{{_i}}For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.{{/i}}

+
+<a href="#" rel="tooltip" title="{{_i}}first tooltip{{/i}}">{{_i}}hover over me{{/i}}</a>
+
+

{{_i}}Methods{{/i}}

+

$().tooltip({{_i}}options{{/i}})

+

{{_i}}Attaches a tooltip handler to an element collection.{{/i}}

+

.tooltip('show')

+

{{_i}}Reveals an element's tooltip.{{/i}}

+
$('#element').tooltip('show')
+

.tooltip('hide')

+

{{_i}}Hides an element's tooltip.{{/i}}

+
$('#element').tooltip('hide')
+

.tooltip('toggle')

+

{{_i}}Toggles an element's tooltip.{{/i}}

+
$('#element').tooltip('toggle')
+
+
+
+ + + + +
+ +
+
+

{{_i}}About popovers{{/i}}

+

{{_i}}Add small overlays of content, like those on the iPad, to any element for housing secondary information.{{/i}}

+

* {{_i}}Requires Tooltip to be included{{/i}}

+ {{_i}}Download file{{/i}} +
+
+

{{_i}}Example hover popover{{/i}}

+

{{_i}}Hover over the button to trigger the popover.{{/i}}

+ +
+

{{_i}}Using bootstrap-popover.js{{/i}}

+

{{_i}}Enable popovers via javascript:{{/i}}

+
$('#example').popover({{_i}}options{{/i}})
+

{{_i}}Options{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
{{_i}}animation{{/i}}{{_i}}boolean{{/i}}true{{_i}}apply a css fade transition to the tooltip{{/i}}
{{_i}}placement{{/i}}{{_i}}string|function{{/i}}'right'{{_i}}how to position the popover{{/i}} - top | bottom | left | right
{{_i}}selector{{/i}}{{_i}}string{{/i}}false{{_i}}if a selector is provided, tooltip objects will be delegated to the specified targets{{/i}}
{{_i}}trigger{{/i}}{{_i}}string{{/i}}'hover'{{_i}}how tooltip is triggered{{/i}} - hover | focus | manual
{{_i}}title{{/i}}{{_i}}string | function{{/i}}''{{_i}}default title value if `title` attribute isn't present{{/i}}
{{_i}}content{{/i}}{{_i}}string | function{{/i}}''{{_i}}default content value if `data-content` attribute isn't present{{/i}}
{{_i}}delay{{/i}}{{_i}}number | object{{/i}}0 +

{{_i}}delay showing and hiding the popover (ms) - does not apply to manual trigger type{{/i}}

+

{{_i}}If a number is supplied, delay is applied to both hide/show{{/i}}

+

{{_i}}Object structure is: delay: { show: 500, hide: 100 }{{/i}}

+
+
+ {{_i}}Heads up!{{/i}} + {{_i}}Options for individual popovers can alternatively be specified through the use of data attributes.{{/i}} +
+

{{_i}}Markup{{/i}}

+

+ {{_i}}For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.{{/i}} +

+

{{_i}}Methods{{/i}}

+

$().popover({{_i}}options{{/i}})

+

{{_i}}Initializes popovers for an element collection.{{/i}}

+

.popover('show')

+

{{_i}}Reveals an elements popover.{{/i}}

+
$('#element').popover('show')
+

.popover('hide')

+

{{_i}}Hides an elements popover.{{/i}}

+
$('#element').popover('hide')
+

.popover('toggle')

+

{{_i}}Toggles an elements popover.{{/i}}

+
$('#element').popover('toggle')
+
+
+
+ + + + +
+ +
+
+

{{_i}}About alerts{{/i}}

+

{{_i}}The alert plugin is a tiny class for adding close functionality to alerts.{{/i}}

+ {{_i}}Download{{/i}} +
+
+

{{_i}}Example alerts{{/i}}

+

{{_i}}The alerts plugin works on regular alert messages, and block messages.{{/i}}

+
+ + {{_i}}Holy guacamole!{{/i}} {{_i}}Best check yo self, you're not looking too good.{{/i}} +
+
+ +

{{_i}}Oh snap! You got an error!{{/i}}

+

{{_i}}Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.{{/i}}

+

+ {{_i}}Take this action{{/i}} {{_i}}Or do this{{/i}} +

+
+
+

{{_i}}Using bootstrap-alert.js{{/i}}

+

{{_i}}Enable dismissal of an alert via javascript:{{/i}}

+
$(".alert").alert()
+

{{_i}}Markup{{/i}}

+

{{_i}}Just add data-dismiss="alert" to your close button to automatically give an alert close functionality.{{/i}}

+
<a class="close" data-dismiss="alert" href="#">&times;</a>
+

{{_i}}Methods{{/i}}

+

$().alert()

+

{{_i}}Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the .fade and .in class already applied to them.{{/i}}

+

.alert('close')

+

{{_i}}Closes an alert.{{/i}}

+
$(".alert").alert('close')
+

{{_i}}Events{{/i}}

+

{{_i}}Bootstrap's alert class exposes a few events for hooking into alert functionality.{{/i}}

+ + + + + + + + + + + + + + + + + +
{{_i}}Event{{/i}}{{_i}}Description{{/i}}
{{_i}}close{{/i}}{{_i}}This event fires immediately when the close instance method is called.{{/i}}
{{_i}}closed{{/i}}{{_i}}This event is fired when the alert has been closed (will wait for css transitions to complete).{{/i}}
+
+$('#my-alert').bind('closed', function () {
+  // {{_i}}do something…{{/i}}
+})
+
+
+
+ + + + +
+ +
+
+

{{_i}}About{{/i}}

+

{{_i}}Do more with buttons. Control button states or create groups of buttons for more components like toolbars.{{/i}}

+ {{_i}}Download file{{/i}} +
+
+

{{_i}}Example uses{{/i}}

+

{{_i}}Use the buttons plugin for states and toggles.{{/i}}

+ + + + + + + + + + + + + + + + + + + +
{{_i}}Stateful{{/i}} + +
{{_i}}Single toggle{{/i}} + +
{{_i}}Checkbox{{/i}} +
+ + + +
+
{{_i}}Radio{{/i}} +
+ + + +
+
+
+

{{_i}}Using bootstrap-button.js{{/i}}

+

{{_i}}Enable buttons via javascript:{{/i}}

+
$('.nav-tabs').button()
+

{{_i}}Markup{{/i}}

+

{{_i}}Data attributes are integral to the button plugin. Check out the example code below for the various markup types.{{/i}}

+
+<!-- {{_i}}Add data-toggle="button" to activate toggling on a single button{{/i}} -->
+<button class="btn" data-toggle="button">Single Toggle</button>
+
+<!-- {{_i}}Add data-toggle="buttons-checkbox" for checkbox style toggling on btn-group{{/i}} -->
+<div class="btn-group" data-toggle="buttons-checkbox">
+  <button class="btn">Left</button>
+  <button class="btn">Middle</button>
+  <button class="btn">Right</button>
+</div>
+
+<!-- {{_i}}Add data-toggle="buttons-radio" for radio style toggling on btn-group{{/i}} -->
+<div class="btn-group" data-toggle="buttons-radio">
+  <button class="btn">Left</button>
+  <button class="btn">Middle</button>
+  <button class="btn">Right</button>
+</div>
+
+

{{_i}}Methods{{/i}}

+

$().button('toggle')

+

{{_i}}Toggles push state. Gives the button the appearance that it has been activated.{{/i}}

+
+ {{_i}}Heads up!{{/i}} + {{_i}}You can enable auto toggling of a button by using the data-toggle attribute.{{/i}} +
+
<button class="btn" data-toggle="button" >…</button>
+

$().button('loading')

+

{{_i}}Sets button state to loading - disables button and swaps text to loading text. Loading text should be defined on the button element using the data attribute data-loading-text.{{/i}} +

+
<button class="btn" data-loading-text="loading stuff..." >...</button>
+
+ {{_i}}Heads up!{{/i}} + {{_i}}Firefox persists the disabled state across page loads. A workaround for this is to use autocomplete="off".{{/i}} +
+

$().button('reset')

+

{{_i}}Resets button state - swaps text to original text.{{/i}}

+

$().button(string)

+

{{_i}}Resets button state - swaps text to any data defined text state.{{/i}}

+
<button class="btn" data-complete-text="finished!" >...</button>
+<script>
+  $('.btn').button('complete')
+</script>
+
+
+
+ + + + +
+ +
+
+

{{_i}}About{{/i}}

+

{{_i}}Get base styles and flexible support for collapsible components like accordions and navigation.{{/i}}

+ {{_i}}Download file{{/i}} +

* {{_i}}Requires the Transitions plugin to be included.{{/i}}

+
+
+

{{_i}}Example accordion{{/i}}

+

{{_i}}Using the collapse plugin, we built a simple accordion style widget:{{/i}}

+ +
+
+ +
+
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. +
+
+
+
+ +
+
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. +
+
+
+
+ +
+
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. +
+
+
+
+ + +
+

{{_i}}Using bootstrap-collapse.js{{/i}}

+

{{_i}}Enable via javascript:{{/i}}

+
$(".collapse").collapse()
+

{{_i}}Options{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
{{_i}}parent{{/i}}{{_i}}selector{{/i}}false{{_i}}If selector then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior){{/i}}
{{_i}}toggle{{/i}}{{_i}}boolean{{/i}}true{{_i}}Toggles the collapsible element on invocation{{/i}}
+

{{_i}}Markup{{/i}}

+

{{_i}}Just add data-toggle="collapse" and a data-target to element to automatically assign control of a collapsible element. The data-target attribute accepts a css selector to apply the collapse to. Be sure to add the class collapse to the collapsible element. If you'd like it to default open, add the additional class in.{{/i}}

+
+<button class="btn btn-danger" data-toggle="collapse" data-target="#demo">
+  {{_i}}simple collapsible{{/i}}
+</button>
+
+<div id="demo" class="collapse in"> … </div>
+
+ {{_i}}Heads up!{{/i}} + {{_i}}To add accordion-like group management to a collapsible control, add the data attribute data-parent="#selector". Refer to the demo to see this in action.{{/i}} +
+

{{_i}}Methods{{/i}}

+

.collapse({{_i}}options{{/i}})

+

{{_i}}Activates your content as a collapsible element. Accepts an optional options object.{{/i}} +

+$('#myCollapsible').collapse({
+  toggle: false
+})
+

.collapse('toggle')

+

{{_i}}Toggles a collapsible element to shown or hidden.{{/i}}

+

.collapse('show')

+

{{_i}}Shows a collapsible element.{{/i}}

+

.collapse('hide')

+

{{_i}}Hides a collapsible element.{{/i}}

+

{{_i}}Events{{/i}}

+

+ {{_i}}Bootstrap's collapse class exposes a few events for hooking into collapse functionality.{{/i}} +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Event{{/i}}{{_i}}Description{{/i}}
{{_i}}show{{/i}}{{_i}}This event fires immediately when the show instance method is called.{{/i}}
{{_i}}shown{{/i}}{{_i}}This event is fired when a collapse element has been made visible to the user (will wait for css transitions to complete).{{/i}}
{{_i}}hide{{/i}} + {{_i}}This event is fired immediately when the hide method has been called.{{/i}} +
{{_i}}hidden{{/i}}{{_i}}This event is fired when a collapse element has been hidden from the user (will wait for css transitions to complete).{{/i}}
+ +
+$('#myCollapsible').on('hidden', function () {
+  // {{_i}}do something…{{/i}}
+})
+
+
+
+ + + + + + + + + +
+ +
+
+

{{_i}}About{{/i}}

+

{{_i}}A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.{{/i}}

+ {{_i}}Download file{{/i}} +
+
+

{{_i}}Example{{/i}}

+

{{_i}}Start typing in the field below to show the typeahead results.{{/i}}

+
+ +
+
+

{{_i}}Using bootstrap-typeahead.js{{/i}}

+

{{_i}}Call the typeahead via javascript:{{/i}}

+
$('.typeahead').typeahead()
+

{{_i}}Options{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
{{_i}}source{{/i}}{{_i}}array{{/i}}[ ]{{_i}}The data source to query against.{{/i}}
{{_i}}items{{/i}}{{_i}}number{{/i}}8{{_i}}The max number of items to display in the dropdown.{{/i}}
{{_i}}matcher{{/i}}{{_i}}function{{/i}}{{_i}}case insensitive{{/i}}{{_i}}The method used to determine if a query matches an item. Accepts a single argument, the item against which to test the query. Access the current query with this.query. Return a boolean true if query is a match.{{/i}}
{{_i}}sorter{{/i}}{{_i}}function{{/i}}{{_i}}exact match,
case sensitive,
case insensitive{{/i}}
{{_i}}Method used to sort autocomplete results. Accepts a single argument items and has the scope of the typeahead instance. Reference the current query with this.query.{{/i}}
{{_i}}highlighter{{/i}}{{_i}}function{{/i}}{{_i}}highlights all default matches{{/i}}{{_i}}Method used to highlight autocomplete results. Accepts a single argument item and has the scope of the typeahead instance. Should return html.{{/i}}
+ +

{{_i}}Markup{{/i}}

+

{{_i}}Add data attributes to register an element with typeahead functionality.{{/i}}

+
+<input type="text" data-provide="typeahead">
+
+

{{_i}}Methods{{/i}}

+

.typeahead({{_i}}options{{/i}})

+

{{_i}}Initializes an input with a typeahead.{{/i}}

+
+
+
\ No newline at end of file diff --git a/docs/docs/likebutton/docs/templates/pages/less.mustache b/docs/docs/likebutton/docs/templates/pages/less.mustache new file mode 100755 index 0000000000..7bdbe76147 --- /dev/null +++ b/docs/docs/likebutton/docs/templates/pages/less.mustache @@ -0,0 +1,944 @@ + +
+

{{_i}}Using LESS with Bootstrap{{/i}}

+

{{_i}}Customize and extend Bootstrap with LESS, a CSS preprocessor, to take advantage of the variables, mixins, and more used to build Bootstrap's CSS.{{/i}}

+ +
+ + + + +
+ +
+
+

{{_i}}Why LESS?{{/i}}

+

{{_i}}Bootstrap is made with LESS at its core, a dynamic stylesheet language created by our good friend, Alexis Sellier. It makes developing systems-based CSS faster, easier, and more fun.{{/i}}

+
+
+

{{_i}}What's included?{{/i}}

+

{{_i}}As an extension of CSS, LESS includes variables, mixins for reusable snippets of code, operations for simple math, nesting, and even color functions.{{/i}}

+
+
+

{{_i}}Learn more{{/i}}

+ LESS CSS +

{{_i}}Visit the official website at http://lesscss.org to learn more.{{/i}}

+
+
+
+
+

{{_i}}Variables{{/i}}

+

{{_i}}Managing colors and pixel values in CSS can be a bit of a pain, usually full of copy and paste. Not with LESS though—assign colors or pixel values as variables and change them once.{{/i}}

+
+
+

{{_i}}Mixins{{/i}}

+

{{_i}}Those three border-radius declarations you need to make in regular ol' CSS? Now they're down to one line with the help of mixins, snippets of code you can reuse anywhere.{{/i}}

+
+
+

{{_i}}Operations{{/i}}

+

{{_i}}Make your grid, leading, and more super flexible by doing the math on the fly with operations. Multiply, divide, add, and subtract your way to CSS sanity.{{/i}}

+
+
+
+ + + + +
+ + +

{{_i}}Scaffolding and links{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
@bodyBackground@white{{_i}}Page background color{{/i}}
@textColor@grayDark{{_i}}Default text color for entire body, headings, and more{{/i}}
@linkColor#08c{{_i}}Default link text color{{/i}}
@linkColorHoverdarken(@linkColor, 15%){{_i}}Default link text hover color{{/i}}
+

{{_i}}Grid system{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + +
@gridColumns12
@gridColumnWidth60px
@gridGutterWidth20px
@fluidGridColumnWidth6.382978723%
@fluidGridGutterWidth2.127659574%
+

{{_i}}Typography{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@sansFontFamily"Helvetica Neue", Helvetica, Arial, sans-serif
@serifFontFamilyGeorgia, "Times New Roman", Times, serif
@monoFontFamilyMenlo, Monaco, "Courier New", monospace
@baseFontSize13pxMust be pixels
@baseFontFamily@sansFontFamily
@baseLineHeight18pxMust be pixels
@altFontFamily@serifFontFamily
@headingsFontFamilyinherit
@headingsFontWeightbold
@headingsColorinherit
+

{{_i}}Tables{{/i}}

+ + + + + + + + + + + + + + + + + + + +
@tableBackgroundtransparent
@tableBackgroundAccent#f9f9f9
@tableBackgroundHover#f5f5f5
@tableBorderddd
+ +

{{_i}}Grayscale colors{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@black#000
@grayDarker#222
@grayDark#333
@gray#555
@grayLight#999
@grayLighter#eee
@white#fff
+

{{_i}}Accent colors{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@blue#049cdb
@green#46a546
@red#9d261d
@yellow#ffc40d
@orange#f89406
@pink#c3325f
@purple#7a43b6
+ + +

{{_i}}Components{{/i}}

+ +

{{_i}}Buttons{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@btnBackground@white
@btnBackgroundHighlightdarken(@white, 10%)
@btnBorderdarken(@white, 20%)
@btnPrimaryBackground@linkColor
@btnPrimaryBackgroundHighlightspin(@btnPrimaryBackground, 15%)
@btnInfoBackground#5bc0de
@btnInfoBackgroundHighlight#2f96b4
@btnSuccessBackground#62c462
@btnSuccessBackgroundHighlight51a351
@btnWarningBackgroundlighten(@orange, 15%)
@btnWarningBackgroundHighlight@orange
@btnDangerBackground#ee5f5b
@btnDangerBackgroundHighlight#bd362f
@btnInverseBackground@gray
@btnInverseBackgroundHighlight@grayDarker
+

{{_i}}Forms{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
@placeholderText@grayLight
@inputBackground@white
@inputBorder#ccc
@inputBorderRadius3px
@inputDisabledBackground@grayLighter
@formActionsBackground#f5f5f5
+

{{_i}}Form states and alerts{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@warningText#c09853
@warningBackground#f3edd2
@errorText#b94a48
@errorBackground#f2dede
@successText#468847
@successBackground#dff0d8
@infoText#3a87ad
@infoBackground#d9edf7
+ +

{{_i}}Navbar{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@navbarHeight40px
@navbarBackground@grayDarker
@navbarBackgroundHighlight@grayDark
@navbarText@grayLight
@navbarLinkColor@grayLight
@navbarLinkColorHover@white
@navbarLinkColorActive@navbarLinkColorHover
@navbarLinkBackgroundHovertransparent
@navbarLinkBackgroundActive@navbarBackground
@navbarSearchBackgroundlighten(@navbarBackground, 25%)
@navbarSearchBackgroundFocus@white
@navbarSearchBorderdarken(@navbarSearchBackground, 30%)
@navbarSearchPlaceholderColor#ccc
@navbarBrandColor@navbarLinkColor
+

{{_i}}Dropdowns{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@dropdownBackground@white
@dropdownBorderrgba(0,0,0,.2)
@dropdownLinkColor@grayDark
@dropdownLinkColorHover@white
@dropdownLinkBackgroundHover@linkColor
@@dropdownDividerTop#e5e5e5
@@dropdownDividerBottom@white
+

{{_i}}Hero unit{{/i}}

+ + + + + + + + + + + + + + + + + + +
@heroUnitBackground@grayLighter
@heroUnitHeadingColorinherit
@heroUnitLeadColorinhereit
+ + +
+ + + + +
+ +

{{_i}}About mixins{{/i}}

+
+
+

{{_i}}Basic mixins{{/i}}

+

{{_i}}A basic mixin is essentially an include or a partial for a snippet of CSS. They're written just like a CSS class and can be called anywhere.{{/i}}

+
+.element {
+  .clearfix();
+}
+
+
+
+

{{_i}}Parametric mixins{{/i}}

+

{{_i}}A parametric mixin is just like a basic mixin, but it also accepts parameters (hence the name) with optional default values.{{/i}}

+
+.element {
+  .border-radius(4px);
+}
+
+
+
+

{{_i}}Easily add your own{{/i}}

+

{{_i}}Nearly all of Bootstrap's mixins are stored in mixins.less, a wonderful utility .less file that enables you to use a mixin in any of the .less files in the toolkit.{{/i}}

+

{{_i}}So, go ahead and use the existing ones or feel free to add your own as you need.{{/i}}

+
+
+

{{_i}}Included mixins{{/i}}

+

{{_i}}Utilities{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Mixin{{/i}}{{_i}}Parameters{{/i}}{{_i}}Usage{{/i}}
.clearfix()none{{_i}}Add to any parent to clear floats within{{/i}}
.tab-focus()none{{_i}}Apply the Webkit focus style and round Firefox outline{{/i}}
.center-block()none{{_i}}Auto center a block-level element using margin: auto{{/i}}
.ie7-inline-block()none{{_i}}Use in addition to regular display: inline-block to get IE7 support{{/i}}
.size()@height @width{{_i}}Quickly set the height and width on one line{{/i}}
.square()@size{{_i}}Builds on .size() to set the width and height as same value{{/i}}
.opacity()@opacity{{_i}}Set, in whole numbers, the opacity percentage (e.g., "50" or "75"){{/i}}
+

Forms

+ + + + + + + + + + + + + + + +
{{_i}}Mixin{{/i}}{{_i}}Parameters{{/i}}{{_i}}Usage{{/i}}
.placeholder()@color: @placeholderText{{_i}}Set the placeholder text color for inputs{{/i}}
+

Typography

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Mixin{{/i}}{{_i}}Parameters{{/i}}{{_i}}Usage{{/i}}
#font > #family > .serif()none{{_i}}Make an element use a serif font stack{{/i}}
#font > #family > .sans-serif()none{{_i}}Make an element use a sans-serif font stack{{/i}}
#font > #family > .monospace()none{{_i}}Make an element use a monospace font stack{{/i}}
#font > .shorthand()@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight{{_i}}Easily set font size, weight, and leading{{/i}}
#font > .serif()@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight{{_i}}Set font family to serif, and control size, weight, and leading{{/i}}
#font > .sans-serif()@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight{{_i}}Set font family to sans-serif, and control size, weight, and leading{{/i}}
#font > .monospace()@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight{{_i}}Set font family to monospace, and control size, weight, and leading{{/i}}
+

Grid system

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Mixin{{/i}}{{_i}}Parameters{{/i}}{{_i}}Usage{{/i}}
.container-fixed()none{{_i}}Create a horizontally centered container for holding your content{{/i}}
#grid > .core()@gridColumnWidth, @gridGutterWidth{{_i}}Generate a pixel grid system (container, row, and columns) with n columns and x pixel wide gutter{{/i}}
#grid > .fluid()@fluidGridColumnWidth, @fluidGridGutterWidth{{_i}}Generate a percent grid system with n columns and x % wide gutter{{/i}}
#grid > .input()@gridColumnWidth, @gridGutterWidth{{_i}}Generate the pixel grid system for input elements, accounting for padding and borders{{/i}}
.makeColumn@columns: 1, @offset: 0{{_i}}Turn any div into a grid column without the .span* classes{{/i}}
+

{{_i}}CSS3 properties{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Mixin{{/i}}{{_i}}Parameters{{/i}}{{_i}}Usage{{/i}}
.border-radius()@radius{{_i}}Round the corners of an element. Can be a single value or four space-separated values{{/i}}
.box-shadow()@shadow{{_i}}Add a drop shadow to an element{{/i}}
.transition()@transition{{_i}}Add CSS3 transition effect (e.g., all .2s linear){{/i}}
.rotate()@degrees{{_i}}Rotate an element n degrees{{/i}}
.scale()@ratio{{_i}}Scale an element to n times its original size{{/i}}
.translate()@x, @y{{_i}}Move an element on the x and y planes{{/i}}
.background-clip()@clip{{_i}}Crop the background of an element (useful for border-radius){{/i}}
.background-size()@size{{_i}}Control the size of background images via CSS3{{/i}}
.box-sizing()@boxmodel{{_i}}Change the box model for an element (e.g., border-box for a full-width input){{/i}}
.user-select()@select{{_i}}Control cursor selection of text on a page{{/i}}
.backface-visibility()@visibility: visible{{_i}}Prevent flickering of content when using CSS 3D transforms{{/i}}
.resizable()@direction: both{{_i}}Make any element resizable on the right and bottom{{/i}}
.content-columns()@columnCount, @columnGap: @gridGutterWidth{{_i}}Make the content of any element use CSS3 columns{{/i}}
.hyphens()@mode: auto{{_i}}CSS3 hyphenation when you want it (includes word-wrap: break-word){{/i}}
+

{{_i}}Backgrounds and gradients{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Mixin{{/i}}{{_i}}Parameters{{/i}}{{_i}}Usage{{/i}}
#translucent > .background()@color: @white, @alpha: 1{{_i}}Give an element a translucent background color{{/i}}
#translucent > .border()@color: @white, @alpha: 1{{_i}}Give an element a translucent border color{{/i}}
#gradient > .vertical()@startColor, @endColor{{_i}}Create a cross-browser vertical background gradient{{/i}}
#gradient > .horizontal()@startColor, @endColor{{_i}}Create a cross-browser horizontal background gradient{{/i}}
#gradient > .directional()@startColor, @endColor, @deg{{_i}}Create a cross-browser directional background gradient{{/i}}
#gradient > .vertical-three-colors()@startColor, @midColor, @colorStop, @endColor{{_i}}Create a cross-browser three-color background gradient{{/i}}
#gradient > .radial()@innerColor, @outerColor{{_i}}Create a cross-browser radial background gradient{{/i}}
#gradient > .striped()@color, @angle{{_i}}Create a cross-browser striped background gradient{{/i}}
#gradientBar()@primaryColor, @secondaryColor{{_i}}Used for buttons to assign a gradient and slightly darker border{{/i}}
+
+ + + + +
+ +
+ {{_i}}Note: If you're submitting a pull request to GitHub with modified CSS, you must recompile the CSS via any of these methods.{{/i}} +
+

{{_i}}Tools for compiling{{/i}}

+
+
+

{{_i}}Node with makefile{{/i}}

+

{{_i}}Install the LESS command line compiler, JSHint, Recess, and uglify-js globally with npm by running the following command:{{/i}}

+
$ npm install -g less jshint recess uglify-js
+

{{_i}}Once installed just run make from the root of your bootstrap directory and you're all set.{{/i}}

+

{{_i}}Additionally, if you have watchr installed, you may run make watch to have bootstrap automatically rebuilt every time you edit a file in the bootstrap lib (this isn't required, just a convenience method).{{/i}}

+
+
+

{{_i}}Command line{{/i}}

+

{{_i}}Install the LESS command line tool via Node and run the following command:{{/i}}

+
$ lessc ./less/bootstrap.less > bootstrap.css
+

{{_i}}Be sure to include --compress in that command if you're trying to save some bytes!{{/i}}

+
+
+

{{_i}}Javascript{{/i}}

+

{{_i}}Download the latest Less.js and include the path to it (and Bootstrap) in the <head>.{{/i}}

+
+<link rel="stylesheet/less" href="/path/to/bootstrap.less">
+<script src="/path/to/less.js"></script>
+
+

{{_i}}To recompile the .less files, just save them and reload your page. Less.js compiles them and stores them in local storage.{{/i}}

+
+
+
+
+

{{_i}}Unofficial Mac app{{/i}}

+

{{_i}}The unofficial Mac app watches directories of .less files and compiles the code to local files after every save of a watched .less file.{{/i}}

+

{{_i}}If you like, you can toggle preferences in the app for automatic minifying and which directory the compiled files end up in.{{/i}}

+
+
+

{{_i}}More Mac apps{{/i}}

+

Crunch

+

{{_i}}Crunch is a great looking LESS editor and compiler built on Adobe Air.{{/i}}

+

CodeKit

+

{{_i}}Created by the same guy as the unofficial Mac app, CodeKit is a Mac app that compiles LESS, SASS, Stylus, and CoffeeScript.{{/i}}

+

Simpless

+

{{_i}}Mac, Linux, and PC app for drag and drop compiling of LESS files. Plus, the source code is on GitHub.{{/i}}

+
+
+
diff --git a/docs/docs/likebutton/docs/templates/pages/scaffolding.mustache b/docs/docs/likebutton/docs/templates/pages/scaffolding.mustache new file mode 100755 index 0000000000..1088cc7753 --- /dev/null +++ b/docs/docs/likebutton/docs/templates/pages/scaffolding.mustache @@ -0,0 +1,555 @@ + +
+

{{_i}}Scaffolding{{/i}}

+

{{_i}}Bootstrap is built on a responsive 12-column grid. We've also included fixed- and fluid-width layouts based on that system.{{/i}}

+ +
+ + + + + +
+ +
+
+

{{_i}}Requires HTML5 doctype{{/i}}

+

{{_i}}Bootstrap makes use of HTML elements and CSS properties that require the use of the HTML5 doctype. Be sure to include it at the beginning of every Bootstrapped page in your project.{{/i}}

+
+<!DOCTYPE html>
+<html lang="en">
+  ...
+</html>
+
+
+
+

{{_i}}Typography and links{{/i}}

+

{{_i}}Within the scaffolding.less file, we set basic global display, typography, and link styles. Specifically, we:{{/i}}

+
    +
  • {{_i}}Remove margin on the body{{/i}}
  • +
  • {{_i}}Set background-color: white; on the body{{/i}}
  • +
  • {{_i}}Use the @baseFontFamily, @baseFontSize, and @baseLineHeight attributes as our typographyic base{{/i}}
  • +
  • {{_i}}Set the global link color via @linkColor and apply link underlines only on :hover{{/i}}
  • +
+
+
+

{{_i}}Reset via Normalize{{/i}}

+

{{_i}}As of Bootstrap 2, the traditional CSS reset has evolved to make use of elements from Normalize.css, a project by Nicolas Gallagher that also powers the HTML5 Boilerplate.{{/i}}

+

{{_i}}The new reset can still be found in reset.less, but with many elements removed for brevity and accuracy.{{/i}}

+
+
+
+ + + + + +
+ + +
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
+
+
4
+
4
+
4
+
+
+
4
+
8
+
+
+
6
+
6
+
+
+
12
+
+
+
+

{{_i}}The default grid system provided in Bootstrap utilizes 12 columns that render out at widths of 724px, 940px (default without responsive CSS included), and 1170px. Below 767px viewports, the columns become fluid and stack vertically. {{/i}}

+
+
+
+<div class="row">
+  <div class="span4">...</div>
+  <div class="span8">...</div>
+</div>
+
+
+
+

{{_i}}As shown here, a basic layout can be created with two "columns", each spanning a number of the 12 foundational columns we defined as part of our grid system.{{/i}}

+
+
+ +
+ +

{{_i}}Offsetting columns{{/i}}

+
+
4
+
4 offset 4
+
+
+
3 offset 3
+
3 offset 3
+
+
+
8 offset 4
+
+
+<div class="row">
+  <div class="span4">...</div>
+  <div class="span4 offset4">...</div>
+</div>
+
+ +
+ +

{{_i}}Nesting columns{{/i}}

+
+
+

{{_i}}With the static (non-fluid) grid system in Bootstrap, nesting is easy. To nest your content, just add a new .row and set of .span* columns within an existing .span* column.{{/i}}

+

{{_i}}Example{{/i}}

+

{{_i}}Nested rows should include a set of columns that add up to the number of columns of it's parent. For example, two nested .span3 columns should be placed within a .span6.{{/i}}

+
+
+ {{_i}}Level 1 of column{{/i}} +
+
+ {{_i}}Level 2{{/i}} +
+
+ {{_i}}Level 2{{/i}} +
+
+
+
+
+
+
+<div class="row">
+  <div class="span6">
+    {{_i}}Level 1 column{{/i}}
+    <div class="row">
+      <div class="span3">{{_i}}Level 2{{/i}}</div>
+      <div class="span3">{{_i}}Level 2{{/i}}</div>
+    </div>
+  </div>
+</div>
+
+
+
+
+ + + + +
+ + +

{{_i}}Fluid columns{{/i}}

+
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
+
+
4
+
4
+
4
+
+
+
4
+
8
+
+
+
6
+
6
+
+
+
12
+
+ +
+
+

{{_i}}Percents, not pixels{{/i}}

+

{{_i}}The fluid grid system uses percents for column widths instead of fixed pixels. It also has the same responsive variations as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.{{/i}}

+
+
+

{{_i}}Fluid rows{{/i}}

+

{{_i}}Make any row fluid simply by changing .row to .row-fluid. The columns stay the exact same, making it super straightforward to flip between fixed and fluid layouts.{{/i}}

+
+
+

{{_i}}Markup{{/i}}

+
+<div class="row-fluid">
+  <div class="span4">...</div>
+  <div class="span8">...</div>
+</div>
+
+
+
+ +

{{_i}}Fluid nesting{{/i}}

+
+
+

{{_i}}Nesting with fluid grids is a bit different: the number of nested columns doesn't need to match the parent. Instead, your columns are reset at each level because each row takes up 100% of the parent column.{{/i}}

+
+
+ {{_i}}Fluid 12{{/i}} +
+
+ {{_i}}Fluid 6{{/i}} +
+
+ {{_i}}Fluid 6{{/i}} +
+
+
+
+
+
+
+<div class="row-fluid">
+  <div class="span12">
+    {{_i}}Level 1 of column{{/i}}
+    <div class="row-fluid">
+      <div class="span6">{{_i}}Level 2{{/i}}</div>
+      <div class="span6">{{_i}}Level 2{{/i}}</div>
+    </div>
+  </div>
+</div>
+
+
+
+ +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Variable{{/i}}{{_i}}Default value{{/i}}{{_i}}Description{{/i}}
@gridColumns12{{_i}}Number of columns{{/i}}
@gridColumnWidth60px{{_i}}Width of each column{{/i}}
@gridGutterWidth20px{{_i}}Negative space between columns{{/i}}
+
+
+

{{_i}}Variables in LESS{{/i}}

+

{{_i}}Built into Bootstrap are a handful of variables for customizing the default 940px grid system, documented above. All variables for the grid are stored in variables.less.{{/i}}

+
+
+

{{_i}}How to customize{{/i}}

+

{{_i}}Modifying the grid means changing the three @grid* variables and recompiling Bootstrap. Change the grid variables in variables.less and use one of the four ways documented to recompile. If you're adding more columns, be sure to add the CSS for those in grid.less.{{/i}}

+
+
+

{{_i}}Staying responsive{{/i}}

+

{{_i}}Customization of the grid only works at the default level, the 940px grid. To maintain the responsive aspects of Bootstrap, you'll also have to customize the grids in responsive.less.{{/i}}

+
+
+ +
+ + + + +
+ + +
+
+

{{_i}}Fixed layout{{/i}}

+

{{_i}}The default and simple 940px-wide, centered layout for just about any website or page provided by a single <div class="container">.{{/i}}

+
+
+
+
+<body>
+  <div class="container">
+    ...
+  </div>
+</body>
+
+
+
+

{{_i}}Fluid layout{{/i}}

+

{{_i}}<div class="container-fluid"> gives flexible page structure, min- and max-widths, and a left-hand sidebar. It's great for apps and docs.{{/i}}

+
+
+
+
+
+<div class="container-fluid">
+  <div class="row-fluid">
+    <div class="span2">
+      <!--{{_i}}Sidebar content{{/i}}-->
+    </div>
+    <div class="span10">
+      <!--{{_i}}Body content{{/i}}-->
+    </div>
+  </div>
+</div>
+
+
+
+
+ + + + + +
+ + +
+
+

Responsive devices

+

{{_i}}What they do{{/i}}

+

{{_i}}Media queries allow for custom CSS based on a number of conditions—ratios, widths, display type, etc—but usually focuses around min-width and max-width.{{/i}}

+
    +
  • {{_i}}Modify the width of column in our grid{{/i}}
  • +
  • {{_i}}Stack elements instead of float wherever necessary{{/i}}
  • +
  • {{_i}}Resize headings and text to be more appropriate for devices{{/i}}
  • +
+

{{_i}}Use media queries responsibly and only as a start to your mobile audiences. For larger projects, do consider dedicated code bases and not layers of media queries.{{/i}}

+
+
+

{{_i}}Supported devices{{/i}}

+

{{_i}}Bootstrap supports a handful of media queries in a single file to help make your projects more appropriate on different devices and screen resolutions. Here's what's included:{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Label{{/i}}{{_i}}Layout width{{/i}}{{_i}}Column width{{/i}}{{_i}}Gutter width{{/i}}
{{_i}}Smartphones{{/i}}480px and below{{_i}}Fluid columns, no fixed widths{{/i}}
{{_i}}Smartphones to tablets{{/i}}767px and below{{_i}}Fluid columns, no fixed widths{{/i}}
{{_i}}Portrait tablets{{/i}}768px and above42px20px
{{_i}}Default{{/i}}980px and up60px20px
{{_i}}Large display{{/i}}1200px and up70px30px
+ +

{{_i}}Requires meta tag{{/i}}

+

{{_i}}To ensure devices display responsive pages properly, include the viewport meta tag.{{/i}}

+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+
+ +
+ + +

{{_i}}Using the media queries{{/i}}

+
+
+

{{_i}}Bootstrap doesn't automatically include these media queries, but understanding and adding them is very easy and requires minimal setup. You have a few options for including the responsive features of Bootstrap:{{/i}}

+
    +
  1. {{_i}}Use the compiled responsive version, bootstrap-responsive.css{{/i}}
  2. +
  3. {{_i}}Add @import "responsive.less" and recompile Bootstrap{{/i}}
  4. +
  5. {{_i}}Modify and recompile responsive.less as a separate file{{/i}}
  6. +
+

{{_i}}Why not just include it? Truth be told, not everything needs to be responsive. Instead of encouraging developers to remove this feature, we figure it best to enable it.{{/i}}

+
+
+
+  /* {{_i}}Landscape phones and down{{/i}} */
+  @media (max-width: 480px) { ... }
+
+  /* {{_i}}Landscape phone to portrait tablet{{/i}} */
+  @media (max-width: 767px) { ... }
+
+  /* {{_i}}Portrait tablet to landscape and desktop{{/i}} */
+  @media (min-width: 768px) and (max-width: 979px) { ... }
+
+  /* {{_i}}Large desktop{{/i}} */
+  @media (min-width: 1200px) { ... }
+
+
+
+
+ + +

{{_i}}Responsive utility classes{{/i}}

+
+
+

{{_i}}What are they{{/i}}

+

{{_i}}For faster mobile-friendly development, use these basic utility classes for showing and hiding content by device.{{/i}}

+

{{_i}}When to use{{/i}}

+

{{_i}}Use on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation.{{/i}}

+

{{_i}}For example, you might show a <select> element for nav on mobile layouts, but not on tablets or desktops.{{/i}}

+
+
+

{{_i}}Support classes{{/i}}

+

{{_i}}Shown here is a table of the classes we support and their effect on a given media query layout (labeled by device). They can be found in responsive.less.{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Class{{/i}}{{_i}}Phones 480px and below{{/i}}{{_i}}Tablets 767px and below{{/i}}{{_i}}Desktops 768px and above{{/i}}
.visible-phone{{_i}}Visible{{/i}}
.visible-tablet{{_i}}Visible{{/i}}
.visible-desktop{{_i}}Visible{{/i}}
.hidden-phone{{_i}}Visible{{/i}}{{_i}}Visible{{/i}}
.hidden-tablet{{_i}}Visible{{/i}}{{_i}}Visible{{/i}}
.hidden-desktop{{_i}}Visible{{/i}}{{_i}}Visible{{/i}}
+

{{_i}}Test case{{/i}}

+

{{_i}}Resize your browser or load on different devices to test the above classes.{{/i}}

+

{{_i}}Visible on...{{/i}}

+

{{_i}}Green checkmarks indicate that class is visible in your current viewport.{{/i}}

+
    +
  • {{_i}}Phone{{/i}}✔ {{_i}}Phone{{/i}}
  • +
  • {{_i}}Tablet{{/i}}✔ {{_i}}Tablet{{/i}}
  • +
  • {{_i}}Desktop{{/i}}✔ {{_i}}Desktop{{/i}}
  • +
+

{{_i}}Hidden on...{{/i}}

+

{{_i}}Here, green checkmarks indicate that class is hidden in your current viewport.{{/i}}

+
    +
  • {{_i}}Phone{{/i}}✔ {{_i}}Phone{{/i}}
  • +
  • {{_i}}Tablet{{/i}}✔ {{_i}}Tablet{{/i}}
  • +
  • {{_i}}Desktop{{/i}}✔ {{_i}}Desktop{{/i}}
  • +
+
+
+ + +
+
+
+
+
diff --git a/docs/docs/likebutton/docs/templates/pages/upgrading.mustache b/docs/docs/likebutton/docs/templates/pages/upgrading.mustache new file mode 100755 index 0000000000..5a82e2dc98 --- /dev/null +++ b/docs/docs/likebutton/docs/templates/pages/upgrading.mustache @@ -0,0 +1,194 @@ + +
+

{{_i}}Upgrading to Bootstrap 2{{/i}}

+

{{_i}}Learn about significant changes and additions since v1.4 with this handy guide.{{/i}}

+
+ + + + +
+ + +
+ + + + +
+ +

{{_i}}Grid system{{/i}}

+ +

{{_i}}Responsive (media queries){{/i}}

+ +
+ + + + +
+ +

{{_i}}Typography{{/i}}

+ +

{{_i}}Code{{/i}}

+ +

{{_i}}Tables{{/i}}

+ +

{{_i}}Buttons{{/i}}

+ +

{{_i}}Forms{{/i}}

+ +

{{_i}}Icons, by Glyphicons{{/i}}

+ +
+ + + + +
+ +

{{_i}}Button groups and dropdowns{{/i}}

+ +

{{_i}}Navigation{{/i}}

+ +

{{_i}}Navbar (formerly topbar){{/i}}

+ +

{{_i}}Dropdown menus{{/i}}

+ +

{{_i}}Labels{{/i}}

+ +

{{_i}}Thumbnails{{/i}}

+ +

{{_i}}Alerts{{/i}}

+ +

{{_i}}Progress bars{{/i}}

+ +

{{_i}}Miscellaneous components{{/i}}

+ +
+ + + + +
+ +
+ {{_i}}Heads up!{{/i}} {{_i}}We've rewritten just about everything for our plugins, so head on over to the Javascript page to learn more.{{/i}} +
+

{{_i}}Tooltips{{/i}}

+ +

{{_i}}Popovers{{/i}}

+ +

{{_i}}New plugins{{/i}}

+ +
+ diff --git a/docs/docs/likebutton/docs/upgrading.html b/docs/docs/likebutton/docs/upgrading.html new file mode 100755 index 0000000000..2a2c398186 --- /dev/null +++ b/docs/docs/likebutton/docs/upgrading.html @@ -0,0 +1,310 @@ + + + + + Upgrading · Twitter Bootstrap + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+

Upgrading to Bootstrap 2

+

Learn about significant changes and additions since v1.4 with this handy guide.

+
+ + + + +
+ + +
+ + + + +
+ +

Grid system

+ +

Responsive (media queries)

+ +
+ + + + +
+ +

Typography

+ +

Code

+ +

Tables

+ +

Buttons

+ +

Forms

+ +

Icons, by Glyphicons

+ +
+ + + + +
+ +

Button groups and dropdowns

+ +

Navigation

+ +

Navbar (formerly topbar)

+ +

Dropdown menus

+ +

Labels

+ +

Thumbnails

+ +

Alerts

+ +

Progress bars

+ +

Miscellaneous components

+ +
+ + + + +
+ +
+ Heads up! We've rewritten just about everything for our plugins, so head on over to the Javascript page to learn more. +
+

Tooltips

+ +

Popovers

+ +

New plugins

+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/docs/likebutton/img/LikeToggler.png b/docs/docs/likebutton/img/LikeToggler.png new file mode 100644 index 0000000000..547bfa7cf3 Binary files /dev/null and b/docs/docs/likebutton/img/LikeToggler.png differ diff --git a/docs/docs/likebutton/img/ReactDataDiagram.png b/docs/docs/likebutton/img/ReactDataDiagram.png new file mode 100755 index 0000000000..2e78f0c13f Binary files /dev/null and b/docs/docs/likebutton/img/ReactDataDiagram.png differ diff --git a/docs/docs/likebutton/img/ReactLogo3.png b/docs/docs/likebutton/img/ReactLogo3.png new file mode 100755 index 0000000000..f909440f48 Binary files /dev/null and b/docs/docs/likebutton/img/ReactLogo3.png differ diff --git a/docs/docs/likebutton/img/glyphicons-halflings-white.png b/docs/docs/likebutton/img/glyphicons-halflings-white.png new file mode 100755 index 0000000000..3bf6484a29 Binary files /dev/null and b/docs/docs/likebutton/img/glyphicons-halflings-white.png differ diff --git a/docs/docs/likebutton/img/glyphicons-halflings.png b/docs/docs/likebutton/img/glyphicons-halflings.png new file mode 100755 index 0000000000..79bc568c21 Binary files /dev/null and b/docs/docs/likebutton/img/glyphicons-halflings.png differ diff --git a/docs/docs/likebutton/index.html b/docs/docs/likebutton/index.html new file mode 100755 index 0000000000..adf55cf648 --- /dev/null +++ b/docs/docs/likebutton/index.html @@ -0,0 +1,931 @@ + + + + + + React Javascript Framework + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+

Start Hacking with React

+
+ +
+
+

A Simple Example

+
    +
  • @jsx React.DOM enables XML syntax known as jsx.
  • +
  • The React module allows for creation and rendering of React components.
  • +
  • msg is a React component instance, constructed using XML syntax.
  • +
  • React.renderComponent renders the react content into the document.
  • +
+
+
+ Behind the Scenes +
+
+
Fig 1: Simple Example of React Usage
+
+  /**
+   * @jsx React.DOM
+   */
+  var React = require('React');
+  var msg =
+    <div class="outerDiv">
+      <span>hello</span>
+    </div>;
+  React.renderComponent(msg, document.getElementById('someId'));
+
+ +
+
+
+
+
+

Behind the Scenes

+

+ The previous example was very straightforward except for the use of + XML syntax. The inclusion of @jsx React.DOM accomplishes + two things. +

    +
  1. Tells the build system to compile XML syntax into standard + javascript function calls. +
  2. +
  3. + Ensures that div and span are + functions that are in scope. In fact, all standard DOM tags + (such as img and ul are also treated + this way). +
  4. +
+

+

+ Obviously, javascript isn't the most attractive way to specify + declarative structures. The XML syntax will be used for the + remainder of this tutorial. Additionally, require calls and calls to + React.renderComponent will be ommited from + examples. +

+
+
+
Fig 2: Example of compiler output
+
+  /**
+   * @jsx React.DOM
+   */
+  var React = require('React');
+  var div = React.DOM.div;
+  var span = React.DOM.span;
+  var msg =
+    div({
+      className:"outerDiv",
+      children: [
+        span({
+          children: ['hello']
+        })
+      ]
+    });
+  React.renderComponent(msg, document.getElementById('someId'));
+          
+
+
+ +
+
+

Mobile Development

+ If developing for mobile, ensure that React is listening to touch + events before performing rendering. This only needs to be done + once. Everything else is exactly as it would be on desktop. +
+
+
+
+
Fig 2.5: Supporting mobile
+
+React.initializeTouchEvents(true);
+React.renderComponent(yourComponent, document.getElementById('someId')); 
+
+
+ + + +
+
+

JSX Development Environment

+
    +
  • Vim already supports the jsx syntax out of the box.
  • +
  • If you prefer Emacs, JS2 mode works well.
  • +
  • For Sublime Text, you can use the + excellent Facelime + tools which adds syntax highlighting and inline editor linting of jsx. +
  • +
  • Arc lint correctly supports jsx syntax.
  • +
+
+
+
+
+ + +
+
+

Types of Components application building blocks

+
+ + + + + + + + + + + + + + + + + +
+
+

DOM Components such as div and span. +

+ DOM components are always in scope when including @jsx + React.DOM in the first docblock comment. All DOM components + support children in addition to standard DOM + attributes class, href, etc. The only thing to + remember, is that DOM attributes should be expressed in camelCase (onClick). +
+
+
Fig 4: DOM Component attributes
+
+var fbUrl = "www.facebook.com";
+var btn = <a href={fbUrl} class="butButton"> Visit Facebook </a>;
+          
+
+
+ + + + +
+
+

Composite Components such as Typeahead and LeftNav

+

+ ReactCompositeComponents are "custom" components. + Composite components are not automatically "in scope" like + ReactDOMComponents. The tag name will need to be + defined as a variable in the scope. By convention, each + ReactCompositeComponent is a commonJS module. +

+
+

Remember: Composite + components must be in scope before use.

+
+
+
Fig 5: Usage of COMPOSITE COMPONENT
+
+// Suppose Typeahead is an instnace of ReactCompositeComponent
+var Typeahead = require('Typeahead');
+
+// Typeahead has chosen to accept a "selected" attribute
+// and children.
+var myTypeahead=
+  <Typeahead selected="jordanjcw" >
+    {something.dataset}
+  </Typeahead>;
+          
+
+
+ + + +
+
+

Let's Build a Component from scratch

+
+
+
+

+ The following tutorial shows you how to define a new component type + called LikeToggler. + The LikeToggler will render an image and allow the user to + toggle the like status on the image. See Image 1 to the right for a + screenshot of the final result. +

+

To create a new component type, we must specify:

+
    +
  • + The structure of the component - what is it composed of, and how it + should be rendered. +
  • +
  • + How it encapsulates state, and how that state changes over time. +
  • +
  • + The way in which user interactions may influence state changes. +
  • +
+

Note: React favors composition + over inheritance as a means of abstraction.

+

+
+
+
Image 1: Final Result
+ +
+
+ + + + + + + +
+
+

1. Begin the tutorial

+

+ All of the plumbing for this tutorial has been set up for you in + www/trunk. Simply edit the main tutorial javascript file and refresh + your browser. (See Figure 6 to the right). +

+
+
+
Fig 6: Editing the tutorial
+
vim ~/www/html/js/components/ReactTutorial/ReactTutorial.js
+Open http://yourSandbox.facebook.com/intern/reacttutorial
+ +
+
+
+
+

2. A New Component Shell

+

+ Here, we create a new component called LikeToggler by + making a call to React.createClass. We pass a + javascript object that describes the methods to include in the new + class. render is the most important method, and is the + only one required. It describes the structure of your + component. +

+

Remember: render should never have side effects.

+

Remember: + When returning jsx blocks, parenthesis guard + against ASI.

+
+
+
Fig 7: basic component definition
+
+var LikeToggler = React.createClass({
+  render: function() {
+    return (
+      <div>
+        Welcome to the tutorial. Implement LikeToggler here!
+      </div>
+    );
+  }
+});
+
+
+ + + + + + + + + +
+
+

3. Add Richer Structure

+ Here, we've added a header component and a picture of Boo. We've + also placed a class on the outermost div to give the component some + style. In your tutorial file, change your render + function to match Figure 8. +
+
+
Fig 8: Richer structure
+
+var LikeToggler = React.createClass({
+  render: function() {
+    return (
+      <div class="LikeToggler">
+        <h5>Toggle your like.</h5>
+        <img src="https://graph.facebook.com/boo/picture" />
+      </div>
+    );
+  }
+});
+
+
+ + + + + + + + +
+
+

4. Add Statefulness

+

+ Let's make our app interactive! We'll allow the user to "Like" Boo + through our component's interface. In order to do so, we'll want to + track that state in our component internally. +

+ Add a method called getInitialState to your component. + getInitialState should return a javascript object that + represents your component's initial state. We'll return an object + with likes set to false to indicate that + the user does not initially like Boo. +
+
+
Fig 9: Beginning statefulness
+
+var LikeToggler = React.createClass({
+  getInitialState: function() {      // <--New method here
+    return {likes: false};
+  },
+  render: function() {
+    return (
+      <div class="LikeToggler">
+        <h5>Toggle your like.</h5>
+        <img src="https://graph.facebook.com/boo/picture" />
+      </div>
+    );
+  }
+});
+
+
+ + + + + + + + + +
+
+

5. Set Up User Interactions.

+
    +
  • All DOM components support attributes and event handlers just as + you would expect (but are specified in the camelCase form).
  • +
  • + Add a new like toggler span in your rendered output. +
  • +
  • + Add a new div in your rendered output to display the + current like status. +
  • +
  • + Add a new member function that will handle the click on that new + like toggler. Call this method doToggle. +
  • +
  • + Set the onClick attribute of the span to + be the new member. +
  • +
  • + Place an alert inside of the doToggle handler to + confirm that your click is wired up correctly. +
  • +
+

Remember: Always specify DOM attributes in their camelCase form.

+
+
+
Fig 10: Setting up user interactions
+
+var LikeToggler = React.createClass({
+  getInitialState: function() {
+    return {likes: false};
+  },
+  doToggle: function(event) {
+    // What shall we do here?
+  },
+  render: function() {
+    return (
+      <div class="LikeToggler">
+        <h5>Toggle your like.</h5>
+        <img src="https://graph.facebook.com/boo/picture" />
+        <div class="btn" onClick={this.doToggle}>
+          Like Boo
+        </div>
+        <div></div>
+      </div>
+    );
+  }
+});
+
+
+ + + + + + +
+
+

6. Change State.

+

+ We need to accomplish the following when the user clicks. +

+
    +
  • Toggle our internal state field's likes field.
  • +
  • Change the content of the toggler div from + "Like Boo" to "Unlike Boo"
  • +
  • Change the content of the span from empty + to "You like this."
  • +
+

You might be tempted to search for the DOM nodes whos content you + wish to change, and force them to change. However, React provides a + more powerful abstraction to help you express the dynamics of changing + content over time. In react, we change our state fields via a call to + this.setState. Then, we express render + as a function of this.state at all points in time + - for an arbitrary state. Nothing else is needed!

+ +

Here's how that plays out in our example:

+

+ First, We set our next state's likes field to an + inversion/toggle of our current likes (Line 8). + Then, we make our like toggler button's content is an expression + that is a function or an arbitrary state: +

+
+<div class="btn" onClick={this.doToggle}>
+  {this.state.likes ? 'Unlike Boo' : 'Like Boo'}
+</div>
+
+

+ Finally, we do the same with the span's content +

+
+<span>{this.state.likes ?  'You Like This.' : ''}</span>
+
+ React guarantees that when state is updated, these expressions + will be reevaluated and the underlying DOM structures will be reconciled. + To be clear, you can put any expression in terms of + this.state inside of render. There are + essentially no limitations. Consider the + render function to be a constraint that you specify + and that React will always satisfy. +
+
+
Fig 11: Changing State
+
+var LikeToggler = React.createClass({
+  getInitialState: function() {
+    return {likes: false};
+  },
+  doToggle: function(event) {
+    this.setState({likes: !this.state.likes});
+  },
+  render: function() {
+    return (
+      <div class="LikeToggler">
+        <h5>Toggle your like.</h5>
+        <img src="https://graph.facebook.com/boo/picture" />
+        <span>{this.state.likes ? 'You Like This.' : ''}</span>
+        <div class="btn" onClick={this.doToggle}>
+          {this.state.likes ? 'Unlike Boo' : 'Like Boo'}
+        </div>
+      </div>
+    );
+  }
+});
+
+
+ + + + + +
+
+ +
+
+

7. Add attributes or props

+

+ There's something lacking from our LikeToggler + component. Components such as div and span + accept attributes (such as href and + class), but currently, our component is instantiated as + follows, without attributes: +

+
var myLikeToggler = <LikeToggler />;
+

+ Now suppose we want to control the entity being liked. +

+
var myLikeToggler =
+  <LikeToggler
+    name="Boo"
+    imgSrc="http://graph.facebook.com/boo/picture"
+  />;
+

+

+ This is extremely easy to do! Inside of the render + method, all attributes are accessible through a special member called + this.props. See the Figure 12 for the complete component. +

+

+ It's worth taking a close look at the last span's + content. Recognize how the content depends on two separate pieces of + data, from two completely different locations (props + and state). Any time either of these data + change, the content of that span will always be + reconciled to the expression specified. +

+
+<div class="btn" onClick={this.doToggle}>
+  {(this.state.likes ? 'Unlike ' : 'Like ') + this.props.name}
+</div>
+
+ +
+
+
Fig 12: Supporting Attributes
+
+var LikeToggler = React.createClass({
+  getInitialState: function() {
+    return {likes: false};
+  },
+  doToggle: function(event) {
+    this.setState({likes: !this.state.likes});
+  },
+  render: function() {
+    return (
+      <div class="LikeToggler">
+        <h5>Toggle your like.</h5>
+        <img src={this.props.imgSrc} />
+        <span>{this.state.likes ? 'You Like This.' : ''}</span>
+        <div class="btn" onClick={this.doToggle}>
+          {(this.state.likes ? 'Unlike ' : 'Like ') + this.props.name}
+        </div>
+      </div>
+    );
+  }
+});
+
+
+ + + + + + + + +
+
+
+
+

Properties and State ownership of information

+
+
+
+

Note: The terms attributes and props used interchangably.

+

Ownership:

+

+ When you look at render, anywhere you see tags + <...> there exists an implication of "ownership". + Meaning that whatever instance renders, also "owns" + those components that are rendered. For example, in Figure 13, we + define a new component type LikeTogglerWrapper that is + composed of the LikeToggler that we previously + defined. + The LikeTogglerWrapper instance clearly owns the + LikeToggler component. The + LikeTogglerWrapper is only thing thing that determines + the props (or attributes) of the + LikeToggler. Furthermore, it is the only thing that + determines its very existence. +

+
+
+
Fig 13: new component
+
+var LikeTogglerWrapper = React.createClass({
+  render: function() {
+    return (
+      <LikeToggler
+        imgSrc="https://graph.facebook.com//picture"
+        name="jwalke"
+      />
+    );
+  }
+});
+
+
+
+
+

Control Of Information:

+

+ +

Clearly, our new component is somehow "in charge" of the + LikeToggler, so it makes sense to use the term "owner". + However, there's still one thing it's not in charge of - the + internal state of the LikeToggler. + state and props are both simple packages + of information, but they are distinct in one critical aspect + - control. +

+
    +
  • + You control your this.state. You are the only one that + should ever update this.state. You never need to ask + permission to update your own state because you are in control of + it. +
  • +
  • + You do not control your this.props. Your + props are controlled by the same entity that instantiated + you - that is to say that your this.props are + controlled by your owner. + Therefore, you should never update your own this.props. +
  • +
+

+ The description of this.state + describes traditional encapsulation. But the description of + this.props is less familiar. We've described + this.props as public, but in a more restricted way than + in traditional OO design. Our props can be controlled from outside + of our component instance, because they can only be controlled from + outside of our component instance, by the owner of us. See + Figure 14 for an illustration of data flow, ownerhip and control. +

+

+ These two conventions ensure that all data in the system has a + single owner. If you wish to control information that you do not + own, you must find a way to inform the owner of that + information that you wish to change it. In other programming + paradigms, these authoritatively owned packages of information may + be refered to as models. +

+
+

+ Remember: + A component instance must be the only one to update its own + this.state via a call to + this.setState({..}) and nothing else should update + its this.state. +

+

+ Remember: + A component must never update its own this.props. Only + a component's "owner" (or the Reactive system) should ever + update its props. +

+

Streams:

+

+ Examine Figure 14. It helps to think of this.props and + this.state as streams of information that your + render function operates on in order to return your + component's structure. render always + sees the freshest values of these streams. You do not need to + perform any setup to make this happen. You do not need to subscribe + to any changes. The React core makes sure that + render correctly describes your component's structure + whenever this.props or this.state may have + changed. +

+

Flow Of Information:

+

+ We said that render always "sees the freshest values" + of this.props and this.state, but how does + this + happen? In particular, how does a component always see the freshest + values of this.props? If a component cannot update its + own this.props, then who does? The answer is that + changes to this.props will be the result of a call to + setState() at a higher level in the component + hierarchy. From the point of state update, the reactive system will + ensure that the component subtree is brought up to date by updating + the props of components below it in the hierarchy. +

+

+ There are some exceptional cases, where it doesn't make sense to + merely rely on state changes to update props, but those cases are + rare. In those cases, React allows a way to attach a reference + handle to individual components returned from render + and to directly tell that component to update its props, bypassing + the standard reactive data flow. In doing so, we're not violating + the rules mentioned above. The component that specifies the + reference handles, and invokes `updateProps` is the rightful "owner" + of the referenced component and has full authority to update the + props directly. +

+

Note: This will be + further documented in a new tutorial section discussing "refs" (not + yet written).

+

+
+
+
Fig 14: Control of information
+ +
+
+ + + + + + + + +
+
+
+
+

Recap memorize this

+
+
+
+
    +
  • + Require other Composite Components by requireing + them. DOM components (such as <div />) are + always in scope and do not need to be required. +
  • +
  • + DOM components support the familiar attributes, but in camelCase form (such as onClick). +
  • +
  • + Use React.createClass to create a new custom component class. +
  • +
  • + Specify the visual structure of your component in + render as a function of an arbitrary + this.state and this.props. +
  • +
  • + Inside of render, you observe attributes by + referencing this.props.attributeName. +
  • +
  • + Inside of render, you observe internal state by + referencing this.states.stateFieldName. +
  • +
  • + render always sees the most up-to-date values for + this.state and this.props. +
  • +
  • + Render should never have side effects. +
  • +
  • + Perform state updates via calls to this.setState({...}). +
  • +
  • + Only you may update your this.state. +
  • +
  • + You may never update your own this.props. +
  • +
  • + this.state should only ever contain serializable data (think "JSON") + and you should never stuff react component instances into + this.state. +
  • +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + diff --git a/docs/docs/likebutton/js/.jshintrc b/docs/docs/likebutton/js/.jshintrc new file mode 100755 index 0000000000..bbac349e8f --- /dev/null +++ b/docs/docs/likebutton/js/.jshintrc @@ -0,0 +1,10 @@ +{ + "validthis": true, + "laxcomma" : true, + "laxbreak" : true, + "browser" : true, + "debug" : true, + "boss" : true, + "expr" : true, + "asi" : true +} \ No newline at end of file diff --git a/docs/docs/likebutton/js/README.md b/docs/docs/likebutton/js/README.md new file mode 100755 index 0000000000..b7927ba6b2 --- /dev/null +++ b/docs/docs/likebutton/js/README.md @@ -0,0 +1,112 @@ +## 2.0 BOOTSTRAP JS PHILOSOPHY +These are the high-level design rules which guide the development of Bootstrap's plugin apis. + +--- + +### DATA-ATTRIBUTE API + +We believe you should be able to use all plugins provided by Bootstrap purely through the markup API without writing a single line of JavaScript. This is Bootstrap's first class API. + +We acknowledge that this isn't always the most performant and it may sometimes be desirable to turn this functionality off altogether. Therefore, as of 2.0 we provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this: + + $('body').off('.data-api') + +To target a specific plugin, just include the plugins name as a namespace along with the data-api namespace like this: + + $('body').off('.alert.data-api') + +--- + +### PROGRAMATIC API + +We also believe you should be able to use all plugins provided by Bootstrap purely through the JavaScript API. + +All public APIs should be single, chainable methods, and return the collection acted upon. + + $(".btn.danger").button("toggle").addClass("fat") + +All methods should accept an optional options object, a string which targets a particular method, or null which initiates the default behavior: + + $("#myModal").modal() // initialized with defaults + $("#myModal").modal({ keyboard: false }) // initialized with no keyboard + $("#myModal").modal('show') // initializes and invokes show immediately + +--- + +### OPTIONS + +Options should be sparse and add universal value. We should pick the right defaults. + +All plugins should have a default object which can be modified to affect all instances' default options. The defaults object should be available via `$.fn.plugin.defaults`. + + $.fn.modal.defaults = { … } + +An options definition should take the following form: + + *noun*: *adjective* - describes or modifies a quality of an instance + +Examples: + + backdrop: true + keyboard: false + placement: 'top' + +--- + +### EVENTS + +All events should have an infinitive and past participle form. The infinitive is fired just before an action takes place, the past participle on completion of the action. + + show | shown + hide | hidden + +All infinitive events should provide preventDefault functionality. This provides the abililty to stop the execution of an action. + + $('#myModal').on('show', function (e) { + if (!data) return e.preventDefault() // stops modal from being shown + }) + +--- + +### CONSTRUCTORS + +Each plugin should expose its raw constructor on a `Constructor` property -- accessed in the following way: + + + $.fn.popover.Constructor + +--- + +### DATA ACCESSOR + +Each plugin stores a copy of the invoked class on an object. This class instance can be accessed directly through jQuery's data API like this: + + $('[rel=popover]').data('popover') instanceof $.fn.popover.Constructor + +--- + +### DATA ATTRIBUTES + +Data attributes should take the following form: + +- data-{{verb}}={{plugin}} - defines main interaction +- data-target || href^=# - defined on "control" element (if element controls an element other than self) +- data-{{noun}} - defines class instance options + +Examples: + + // control other targets + data-toggle="modal" data-target="#foo" + data-toggle="collapse" data-target="#foo" data-parent="#bar" + + // defined on element they control + data-spy="scroll" + + data-dismiss="modal" + data-dismiss="alert" + + data-toggle="dropdown" + + data-toggle="button" + data-toggle="buttons-checkbox" + data-toggle="buttons-radio" \ No newline at end of file diff --git a/docs/docs/likebutton/js/bootstrap-alert.js b/docs/docs/likebutton/js/bootstrap-alert.js new file mode 100755 index 0000000000..57890a9a28 --- /dev/null +++ b/docs/docs/likebutton/js/bootstrap-alert.js @@ -0,0 +1,90 @@ +/* ========================================================== + * bootstrap-alert.js v2.0.4 + * http://twitter.github.com/bootstrap/javascript.html#alerts + * ========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* ALERT CLASS DEFINITION + * ====================== */ + + var dismiss = '[data-dismiss="alert"]' + , Alert = function (el) { + $(el).on('click', dismiss, this.close) + } + + Alert.prototype.close = function (e) { + var $this = $(this) + , selector = $this.attr('data-target') + , $parent + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + $parent = $(selector) + + e && e.preventDefault() + + $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) + + $parent.trigger(e = $.Event('close')) + + if (e.isDefaultPrevented()) return + + $parent.removeClass('in') + + function removeElement() { + $parent + .trigger('closed') + .remove() + } + + $.support.transition && $parent.hasClass('fade') ? + $parent.on($.support.transition.end, removeElement) : + removeElement() + } + + + /* ALERT PLUGIN DEFINITION + * ======================= */ + + $.fn.alert = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('alert') + if (!data) $this.data('alert', (data = new Alert(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.alert.Constructor = Alert + + + /* ALERT DATA-API + * ============== */ + + $(function () { + $('body').on('click.alert.data-api', dismiss, Alert.prototype.close) + }) + +}(window.jQuery); \ No newline at end of file diff --git a/docs/docs/likebutton/js/bootstrap-button.js b/docs/docs/likebutton/js/bootstrap-button.js new file mode 100755 index 0000000000..7f187be620 --- /dev/null +++ b/docs/docs/likebutton/js/bootstrap-button.js @@ -0,0 +1,96 @@ +/* ============================================================ + * bootstrap-button.js v2.0.4 + * http://twitter.github.com/bootstrap/javascript.html#buttons + * ============================================================ + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* BUTTON PUBLIC CLASS DEFINITION + * ============================== */ + + var Button = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.button.defaults, options) + } + + Button.prototype.setState = function (state) { + var d = 'disabled' + , $el = this.$element + , data = $el.data() + , val = $el.is('input') ? 'val' : 'html' + + state = state + 'Text' + data.resetText || $el.data('resetText', $el[val]()) + + $el[val](data[state] || this.options[state]) + + // push to event loop to allow forms to submit + setTimeout(function () { + state == 'loadingText' ? + $el.addClass(d).attr(d, d) : + $el.removeClass(d).removeAttr(d) + }, 0) + } + + Button.prototype.toggle = function () { + var $parent = this.$element.parent('[data-toggle="buttons-radio"]') + + $parent && $parent + .find('.active') + .removeClass('active') + + this.$element.toggleClass('active') + } + + + /* BUTTON PLUGIN DEFINITION + * ======================== */ + + $.fn.button = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('button') + , options = typeof option == 'object' && option + if (!data) $this.data('button', (data = new Button(this, options))) + if (option == 'toggle') data.toggle() + else if (option) data.setState(option) + }) + } + + $.fn.button.defaults = { + loadingText: 'loading...' + } + + $.fn.button.Constructor = Button + + + /* BUTTON DATA-API + * =============== */ + + $(function () { + $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + $btn.button('toggle') + }) + }) + +}(window.jQuery); \ No newline at end of file diff --git a/docs/docs/likebutton/js/bootstrap-carousel.js b/docs/docs/likebutton/js/bootstrap-carousel.js new file mode 100755 index 0000000000..551de58911 --- /dev/null +++ b/docs/docs/likebutton/js/bootstrap-carousel.js @@ -0,0 +1,169 @@ +/* ========================================================== + * bootstrap-carousel.js v2.0.4 + * http://twitter.github.com/bootstrap/javascript.html#carousel + * ========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* CAROUSEL CLASS DEFINITION + * ========================= */ + + var Carousel = function (element, options) { + this.$element = $(element) + this.options = options + this.options.slide && this.slide(this.options.slide) + this.options.pause == 'hover' && this.$element + .on('mouseenter', $.proxy(this.pause, this)) + .on('mouseleave', $.proxy(this.cycle, this)) + } + + Carousel.prototype = { + + cycle: function (e) { + if (!e) this.paused = false + this.options.interval + && !this.paused + && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) + return this + } + + , to: function (pos) { + var $active = this.$element.find('.active') + , children = $active.parent().children() + , activePos = children.index($active) + , that = this + + if (pos > (children.length - 1) || pos < 0) return + + if (this.sliding) { + return this.$element.one('slid', function () { + that.to(pos) + }) + } + + if (activePos == pos) { + return this.pause().cycle() + } + + return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos])) + } + + , pause: function (e) { + if (!e) this.paused = true + clearInterval(this.interval) + this.interval = null + return this + } + + , next: function () { + if (this.sliding) return + return this.slide('next') + } + + , prev: function () { + if (this.sliding) return + return this.slide('prev') + } + + , slide: function (type, next) { + var $active = this.$element.find('.active') + , $next = next || $active[type]() + , isCycling = this.interval + , direction = type == 'next' ? 'left' : 'right' + , fallback = type == 'next' ? 'first' : 'last' + , that = this + , e = $.Event('slide') + + this.sliding = true + + isCycling && this.pause() + + $next = $next.length ? $next : this.$element.find('.item')[fallback]() + + if ($next.hasClass('active')) return + + if ($.support.transition && this.$element.hasClass('slide')) { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + $next.addClass(type) + $next[0].offsetWidth // force reflow + $active.addClass(direction) + $next.addClass(direction) + this.$element.one($.support.transition.end, function () { + $next.removeClass([type, direction].join(' ')).addClass('active') + $active.removeClass(['active', direction].join(' ')) + that.sliding = false + setTimeout(function () { that.$element.trigger('slid') }, 0) + }) + } else { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + $active.removeClass('active') + $next.addClass('active') + this.sliding = false + this.$element.trigger('slid') + } + + isCycling && this.cycle() + + return this + } + + } + + + /* CAROUSEL PLUGIN DEFINITION + * ========================== */ + + $.fn.carousel = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('carousel') + , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option) + if (!data) $this.data('carousel', (data = new Carousel(this, options))) + if (typeof option == 'number') data.to(option) + else if (typeof option == 'string' || (option = options.slide)) data[option]() + else if (options.interval) data.cycle() + }) + } + + $.fn.carousel.defaults = { + interval: 5000 + , pause: 'hover' + } + + $.fn.carousel.Constructor = Carousel + + + /* CAROUSEL DATA-API + * ================= */ + + $(function () { + $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) { + var $this = $(this), href + , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 + , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data()) + $target.carousel(options) + e.preventDefault() + }) + }) + +}(window.jQuery); \ No newline at end of file diff --git a/docs/docs/likebutton/js/bootstrap-collapse.js b/docs/docs/likebutton/js/bootstrap-collapse.js new file mode 100755 index 0000000000..fbc915b9f9 --- /dev/null +++ b/docs/docs/likebutton/js/bootstrap-collapse.js @@ -0,0 +1,157 @@ +/* ============================================================= + * bootstrap-collapse.js v2.0.4 + * http://twitter.github.com/bootstrap/javascript.html#collapse + * ============================================================= + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* COLLAPSE PUBLIC CLASS DEFINITION + * ================================ */ + + var Collapse = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.collapse.defaults, options) + + if (this.options.parent) { + this.$parent = $(this.options.parent) + } + + this.options.toggle && this.toggle() + } + + Collapse.prototype = { + + constructor: Collapse + + , dimension: function () { + var hasWidth = this.$element.hasClass('width') + return hasWidth ? 'width' : 'height' + } + + , show: function () { + var dimension + , scroll + , actives + , hasData + + if (this.transitioning) return + + dimension = this.dimension() + scroll = $.camelCase(['scroll', dimension].join('-')) + actives = this.$parent && this.$parent.find('> .accordion-group > .in') + + if (actives && actives.length) { + hasData = actives.data('collapse') + if (hasData && hasData.transitioning) return + actives.collapse('hide') + hasData || actives.data('collapse', null) + } + + this.$element[dimension](0) + this.transition('addClass', $.Event('show'), 'shown') + this.$element[dimension](this.$element[0][scroll]) + } + + , hide: function () { + var dimension + if (this.transitioning) return + dimension = this.dimension() + this.reset(this.$element[dimension]()) + this.transition('removeClass', $.Event('hide'), 'hidden') + this.$element[dimension](0) + } + + , reset: function (size) { + var dimension = this.dimension() + + this.$element + .removeClass('collapse') + [dimension](size || 'auto') + [0].offsetWidth + + this.$element[size !== null ? 'addClass' : 'removeClass']('collapse') + + return this + } + + , transition: function (method, startEvent, completeEvent) { + var that = this + , complete = function () { + if (startEvent.type == 'show') that.reset() + that.transitioning = 0 + that.$element.trigger(completeEvent) + } + + this.$element.trigger(startEvent) + + if (startEvent.isDefaultPrevented()) return + + this.transitioning = 1 + + this.$element[method]('in') + + $.support.transition && this.$element.hasClass('collapse') ? + this.$element.one($.support.transition.end, complete) : + complete() + } + + , toggle: function () { + this[this.$element.hasClass('in') ? 'hide' : 'show']() + } + + } + + + /* COLLAPSIBLE PLUGIN DEFINITION + * ============================== */ + + $.fn.collapse = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('collapse') + , options = typeof option == 'object' && option + if (!data) $this.data('collapse', (data = new Collapse(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.collapse.defaults = { + toggle: true + } + + $.fn.collapse.Constructor = Collapse + + + /* COLLAPSIBLE DATA-API + * ==================== */ + + $(function () { + $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) { + var $this = $(this), href + , target = $this.attr('data-target') + || e.preventDefault() + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 + , option = $(target).data('collapse') ? 'toggle' : $this.data() + $(target).collapse(option) + }) + }) + +}(window.jQuery); \ No newline at end of file diff --git a/docs/docs/likebutton/js/bootstrap-dropdown.js b/docs/docs/likebutton/js/bootstrap-dropdown.js new file mode 100755 index 0000000000..454a9684b5 --- /dev/null +++ b/docs/docs/likebutton/js/bootstrap-dropdown.js @@ -0,0 +1,100 @@ +/* ============================================================ + * bootstrap-dropdown.js v2.0.4 + * http://twitter.github.com/bootstrap/javascript.html#dropdowns + * ============================================================ + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* DROPDOWN CLASS DEFINITION + * ========================= */ + + var toggle = '[data-toggle="dropdown"]' + , Dropdown = function (element) { + var $el = $(element).on('click.dropdown.data-api', this.toggle) + $('html').on('click.dropdown.data-api', function () { + $el.parent().removeClass('open') + }) + } + + Dropdown.prototype = { + + constructor: Dropdown + + , toggle: function (e) { + var $this = $(this) + , $parent + , selector + , isActive + + if ($this.is('.disabled, :disabled')) return + + selector = $this.attr('data-target') + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + $parent = $(selector) + $parent.length || ($parent = $this.parent()) + + isActive = $parent.hasClass('open') + + clearMenus() + + if (!isActive) $parent.toggleClass('open') + + return false + } + + } + + function clearMenus() { + $(toggle).parent().removeClass('open') + } + + + /* DROPDOWN PLUGIN DEFINITION + * ========================== */ + + $.fn.dropdown = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('dropdown') + if (!data) $this.data('dropdown', (data = new Dropdown(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.dropdown.Constructor = Dropdown + + + /* APPLY TO STANDARD DROPDOWN ELEMENTS + * =================================== */ + + $(function () { + $('html').on('click.dropdown.data-api', clearMenus) + $('body') + .on('click.dropdown', '.dropdown form', function (e) { e.stopPropagation() }) + .on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle) + }) + +}(window.jQuery); \ No newline at end of file diff --git a/docs/docs/likebutton/js/bootstrap-modal.js b/docs/docs/likebutton/js/bootstrap-modal.js new file mode 100755 index 0000000000..38fd0c8468 --- /dev/null +++ b/docs/docs/likebutton/js/bootstrap-modal.js @@ -0,0 +1,218 @@ +/* ========================================================= + * bootstrap-modal.js v2.0.4 + * http://twitter.github.com/bootstrap/javascript.html#modals + * ========================================================= + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================= */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* MODAL CLASS DEFINITION + * ====================== */ + + var Modal = function (content, options) { + this.options = options + this.$element = $(content) + .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) + } + + Modal.prototype = { + + constructor: Modal + + , toggle: function () { + return this[!this.isShown ? 'show' : 'hide']() + } + + , show: function () { + var that = this + , e = $.Event('show') + + this.$element.trigger(e) + + if (this.isShown || e.isDefaultPrevented()) return + + $('body').addClass('modal-open') + + this.isShown = true + + escape.call(this) + backdrop.call(this, function () { + var transition = $.support.transition && that.$element.hasClass('fade') + + if (!that.$element.parent().length) { + that.$element.appendTo(document.body) //don't move modals dom position + } + + that.$element + .show() + + if (transition) { + that.$element[0].offsetWidth // force reflow + } + + that.$element.addClass('in') + + transition ? + that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : + that.$element.trigger('shown') + + }) + } + + , hide: function (e) { + e && e.preventDefault() + + var that = this + + e = $.Event('hide') + + this.$element.trigger(e) + + if (!this.isShown || e.isDefaultPrevented()) return + + this.isShown = false + + $('body').removeClass('modal-open') + + escape.call(this) + + this.$element.removeClass('in') + + $.support.transition && this.$element.hasClass('fade') ? + hideWithTransition.call(this) : + hideModal.call(this) + } + + } + + + /* MODAL PRIVATE METHODS + * ===================== */ + + function hideWithTransition() { + var that = this + , timeout = setTimeout(function () { + that.$element.off($.support.transition.end) + hideModal.call(that) + }, 500) + + this.$element.one($.support.transition.end, function () { + clearTimeout(timeout) + hideModal.call(that) + }) + } + + function hideModal(that) { + this.$element + .hide() + .trigger('hidden') + + backdrop.call(this) + } + + function backdrop(callback) { + var that = this + , animate = this.$element.hasClass('fade') ? 'fade' : '' + + if (this.isShown && this.options.backdrop) { + var doAnimate = $.support.transition && animate + + this.$backdrop = $('