Skip to content

Commit

Permalink
Replace regex with domDocument, update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
FoolsRun committed Sep 20, 2013
1 parent da6cab7 commit 524cb25
Show file tree
Hide file tree
Showing 2 changed files with 197 additions and 147 deletions.
274 changes: 152 additions & 122 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,38 @@ To install this plugin, just download it, and drop the folder in the ```wp-conte
## Supported shortcodes
The plugin doesn't support all Bootstrap elements yet, but most of them.

### CSS
* [Grid](#grid)
* [Buttons](#buttons)
* [Button Groups](#button-groups)
* [Lead body copy](#lead-body-copy)
* [Emphasis classes](#emphasis-classes)
* [Alerts](#alerts)
* [Code](#code)
* [Tables](#tables)
* [Buttons](#buttons)
* [Responsive utilities](#responsive-utilities)

### Components
* [Icons](#icons)
* [Button Groups](#button-groups)
* [Labels](#labels)
* [Badges](#badges)
* [Icons](#icons)
* [Tables](#tables)
* [Collapse (Accordion)](#collapse)
* [List Groups](#list-groups)
* [Tabs](#tabs)
* [Wells](#wells)
* [Panels](#panels)
* [Media Objects](#media-objects)
* [Jumbotron](#jumbotron)
* [Thumbnails](#thumbnails)
* [Alerts](#alerts)
* [Media Objects](#media-objects)
* [List Groups](#list-groups)
* [Panels](#panels)
* [Wells](#wells)

### JavaScript
* [Tabs](#tabs)
* [Tooltip](#tooltip)
* [Collapse (Accordion)](#collapse)
* [Modals](#modals)
* [Responsive utilities](#responsive-utilities)

## Usage

# Usage

## CSS

### Grid
[row]
Expand All @@ -48,6 +57,11 @@ The plugin doesn't support all Bootstrap elements yet, but most of them.
[/column]
[/row]


#### [row] parameters
None

#### [column] parameters
Parameter | Description | Required | Values | Default
--- | --- | --- | --- | ---
xs | Size of column on extra small screens (less than 768px) | optional | 1-12 | false
Expand All @@ -69,6 +83,35 @@ push-lg | Push on column on large screens | optional | 1-12 | false

[Bootstrap grid documentation](http://getbootstrap.com/css/#grid).

### Lead body copy
[lead] … [/lead]

[Bootstrap body copy documentation](http://getbootstrap.com/css/#type-body-copy)

### Emphasis classes
[emphasis type="success"] … [/emphasis]

Parameter | Description | Required | Values | Default
--- | --- | --- | --- | ---
type | The type of label to display | required | muted, primary, success, info, warning, danger | muted

[Bootstrap emphasis classes documentation](http://getbootstrap.com/css/#type-emphasis)

### Code
[code] … [/code]

Parameter | Description | Required | Values | Default
--- | --- | --- | --- | ---
inline | Display inline code | optional | true, false | false
scrollable | Set a max height of 350px and provide a scroll bar. Not usable with inline="true". | optional | true, false | false

[Bootstrap code documentation](http://getbootstrap.com/css/#code)

### Tables
[table type="striped" cols="#,First Name, Last Name, Username" data="1, Filip, Stefansson, filipstefansson, 2, Victor, Meyer, Pudge, 3, Måns, Ketola-Backe, mossboll"]

[Bootstrap table documentation](http://getbootstrap.com/css/#tables)

### Buttons
[button type="success" size="lg" link="#"] … [/button]

Expand All @@ -85,55 +128,41 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p

[Bootstrap button documentation](http://getbootstrap.com/css/#buttons)

### Button Groups
[button-group size="lg" justified="" vertical=""]
[button link="#"] … [/button]
[button link="#"] … [/button]
[button link="#"] … [/button]
[/button-group]

Parameter | Description | Required | Values | Default
--- | --- | --- | --- | ---
size | The size of the button group | optional | xs, sm, lg | none
justified | Whether button group is justified | optional | true, false | false
vertical | Whether button group is vertical | optional | true, false | false

[Bootstrap button groups documentation](http://getbootstrap.com/css/#btn-groups)

### Lead body copy
[lead] … [/lead]

[Bootstrap body copy documentation](http://getbootstrap.com/css/#type-body-copy)

### Emphasis classes
[emphasis type="success"] … [/emphasis]
### Responsive Utilities
[responsive visible="sm xs" hidden="lg"] … [/responsive]

Parameter | Description | Required | Values | Default
--- | --- | --- | --- | ---
type | The type of label to display | required | muted, primary, success, info, warning, danger | muted
visible | Sizes at which this element is visible (separated by spaces) | optional | xs, sm, md, lg | false
hidden | Sizes at which this element is hidden (separated by spaces) | optional | xs, sm, md, lg | false

[Bootstrap emphasis classes documentation](http://getbootstrap.com/css/#type-emphasis)

### Alerts
[alert type="success"] … [/alert]
## Components

### Icons
[icon type="arrow"]

Parameter | Description | Required | Values | Default
--- | --- | --- | --- | ---
type | The type of the alert | required | success, info, warning, danger | success
dismissable | If the alert should be dismissable | optional | true, false | false
strong | Text to display in bold at the beginning | optional | any text | false

[Bootstrap alert documentation](http://getbootstrap.com/components/#alerts)
type | The type of icon you want to display | required | See Bootstrap docs | none

### Code
[code] … [/code]
[Bootstrap Glyphicons documentation](http://getbootstrap.com/components/#glyphicons)

### Button Groups
[button-group size="lg" justified="" vertical=""]
[button link="#"] … [/button]
[button link="#"] … [/button]
[button link="#"] … [/button]
[/button-group]

Parameter | Description | Required | Values | Default
--- | --- | --- | --- | ---
inline | Display inline code | optional | true, false | false
scrollable | Set a max height of 350px and provide a scroll bar. Not usable with inline="true". | optional | true, false | false
size | The size of the button group | optional | xs, sm, lg | none
justified | Whether button group is justified | optional | true, false | false
vertical | Whether button group is vertical | optional | true, false | false

[Bootstrap code documentation](http://getbootstrap.com/css/#code)
[Bootstrap button groups documentation](http://getbootstrap.com/css/#btn-groups)

### Labels
[label type="success"] … [/label]
Expand All @@ -153,39 +182,51 @@ right | Whether the badge should align to the right of its container | optional

[Bootstrap badges documentation](http://getbootstrap.com/components/#badges)

### Icons
[icon type="arrow"]
### Jumbotron
[jumbotron title="My Jumbotron"] … [/jumbotron]

Parameter | Description | Required | Values | Default
--- | --- | --- | --- | ---
type | The type of icon you want to display | required | See Bootstrap docs | none
title | The jumbotron title | optional | Any text | none

[Bootstrap Glyphicons documentation](http://getbootstrap.com/components/#glyphicons)
[Bootstrap jumbotron documentation](http://getbootstrap.com/components/#jumbotron)

### Tables
[table type="striped" cols="#,First Name, Last Name, Username" data="1, Filip, Stefansson, filipstefansson, 2, Victor, Meyer, Pudge, 3, Måns, Ketola-Backe, mossboll"]
### Thumbnails
[thumbnail] … [/thumbnail]
[thumbnail] … [/thumbnail]
[thumbnail] … [/thumbnail]

[Bootstrap thumbnails documentation](http://getbootstrap.com/components/#thumbnails)

[Bootstrap table documentation](http://getbootstrap.com/css/#tables)
### Alerts
[alert type="success"] … [/alert]

### Collapse (Accordion)
[collapsibles]
[collapse title="Collapse 1" state="active"]
[/collapse]
[collapse title="Copllapse 2"]
Parameter | Description | Required | Values | Default
--- | --- | --- | --- | ---
type | The type of the alert | required | success, info, warning, danger | success
dismissable | If the alert should be dismissable | optional | true, false | false
strong | Text to display in bold at the beginning | optional | any text | false

[Bootstrap alert documentation](http://getbootstrap.com/components/#alerts)

### Media Objects
[media]
[media-object pull="right"]
[/collapse]
[collapse title="Copllapse 3"]
[/media-object]
[media-body title="Testing"]
[/collapse]
[/collapsibles]
[/media-body]
[/media]

Parameter | Description | Required | Values | Default
--- | --- | --- | --- | ---
title | The title of the collapsible, visible when collapsed | required | any text | false
active | Whether the tab is expanded at load time | optional | active | false
pull | Whether the image pulls to the left or right | optional | left, right | right
title | The object title | required | Any text | none

[Bootstrap collapse documentation](http://getbootstrap.com/javascript/#collapse)
__NOTE: media-object should contain an image, or linked image, inserted using the WordPress TinyMCE editor__

[Bootstrap media objects documentation](http://getbootstrap.com/components/#media)

### List Groups
[list-group]
Expand All @@ -202,24 +243,16 @@ active | Whether the tab is expanded at load time | optional | active | false

[Bootstrap list groups documentation](http://getbootstrap.com/components/#list-group)

### Tabs
[tabs]
[tab title="Home"]
[/tab]
[tab title="Profile"]
[/tab]
[tab title="Messages"]
[/tab]
[/tabs]
### Panels
[panel type="info" title="Panel Title" footer="Footer text"] … [/panel]

Parameter | Description | Required | Values | Default
--- | --- | --- | --- | ---
title | The title of the tab | required | any text | false
type | The type of the panel | optional | default, primary, success, info, warning, danger, link | default
title | The panel title | required | any text | none
footer | The panel footer text if desired | optional | any text | none

[Bootstrap list groups documentation](http://getbootstrap.com/javascript/#tabs)
[Bootstrap panels documentation](http://getbootstrap.com/components/#panels)

### Wells
[well size="small"] … [/well]
Expand All @@ -230,61 +263,58 @@ size | Modifies the amount of padding inside the well | optional | sm, lg | norm

[Bootstrap wells documentation](http://getbootstrap.com/components/#wells)

### Panels
[panel type="info" title="Panel Title" footer="Footer text"] … [/panel]

Parameter | Description | Required | Values | Default
--- | --- | --- | --- | ---
type | The type of the panel | optional | default, primary, success, info, warning, danger, link | default
title | The panel title | required | any text | none
footer | The panel footer text if desired | optional | any text | none

[Bootstrap panels documentation](http://getbootstrap.com/components/#panels)
## Components

### Media Objects
[media]
[media-object pull="right"]
### Tabs
[tabs]
[tab title="Home"]
[/media-object]
[media-body title="Testing"]
[/tab]
[tab title="Profile"]
[/media-body]
[/media]
[/tab]
[tab title="Messages"]
[/tab]
[/tabs]

Parameter | Description | Required | Values | Default
--- | --- | --- | --- | ---
pull | Whether the image pulls to the left or right | optional | left, right | right
title | The object title | required | Any text | none

__NOTE: media-object should contain an image, or linked image, inserted using the WordPress TinyMCE editor__
title | The title of the tab | required | any text | false

[Bootstrap panels documentation](http://getbootstrap.com/components/#panels)
[Bootstrap tabs documentation](http://getbootstrap.com/javascript/#tabs)

### Jumbotron
[jumbotron title="My Jumbotron"] … [/jumbotron]
### Tooltip
[tooltip title="I'm the title" placement="right"] … [/tooltip]

Parameter | Description | Required | Values | Default
--- | --- | --- | --- | ---
title | The jumbotron title | optional | Any text | none

[Bootstrap jumbotron documentation](http://getbootstrap.com/components/#jumbotron)

### Thumbnails
[thumbnail] … [/thumbnail]
[thumbnail] … [/thumbnail]
[thumbnail] … [/thumbnail]

[Bootstrap thumbnails documentation](http://getbootstrap.com/components/#thumbnails)
title | The text of the tooltip | required | any text | none
placement | The placement of the tooltip | optional | left, top, bottom, right | top
animation | apply a CSS fade transition to the tooltip | optional | any text | none
html | Insert HTML into the tooltip | optional | true, false | false

### Responsive Utilities
[responsive visible="sm xs" hidden="lg"] … [/responsive]
[Bootstrap tooltip documentation](http://getbootstrap.com/javascript/#tooltips)

### Collapse (Accordion)
[collapsibles]
[collapse title="Collapse 1" state="active"]
[/collapse]
[collapse title="Copllapse 2"]
[/collapse]
[collapse title="Copllapse 3"]
[/collapse]
[/collapsibles]

Parameter | Description | Required | Values | Default
--- | --- | --- | --- | ---
visible | Sizes at which this element is visible (separated by spaces) | optional | xs, sm, md, lg | false
hidden | Sizes at which this element is hidden (separated by spaces) | optional | xs, sm, md, lg | false
title | The title of the collapsible, visible when collapsed | required | any text | false
active | Whether the tab is expanded at load time | optional | active | false

[Bootstrap emphasis classes documentation](http://getbootstrap.com/css/#type-emphasis)
[Bootstrap collapse documentation](http://getbootstrap.com/javascript/#collapse)

### Modals
[modal text="This is my modal" title="Modal Title Goes Here" xclass="btn btn-primary btn-large"]
Expand Down
Loading

0 comments on commit 524cb25

Please sign in to comment.