wd_sinatra 1.0.6 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +1 -4
  3. data/CHANGELOG.md +20 -0
  4. data/Gemfile +0 -2
  5. data/LICENSE +4 -2
  6. data/README.md +28 -19
  7. data/bin/wd_sinatra +7 -25
  8. data/lib/wd_sinatra/app_loader.rb +12 -20
  9. data/lib/wd_sinatra/sinatra_ext.rb +8 -7
  10. data/lib/wd_sinatra/test_helpers.rb +1 -1
  11. data/lib/wd_sinatra/version.rb +2 -4
  12. data/templates/Gemfile +16 -11
  13. data/templates/{Rakefile → Rakefile.tt} +4 -4
  14. data/templates/Thorfile +14 -8
  15. data/templates/api/hello_world.rb +17 -10
  16. data/templates/bin/console +1 -1
  17. data/templates/config.ru.tt +6 -0
  18. data/templates/config/sinatra_config.rb.tt +50 -0
  19. data/templates/lib/{app.rb → app.rb.tt} +4 -1
  20. data/templates/lib/hooks.rb +25 -15
  21. data/templates/test/{test_helpers.rb → test_helpers.rb.tt} +8 -6
  22. data/test/test_helper.rb +0 -4
  23. data/test/ws_list_ext_test.rb +6 -6
  24. data/wd-sinatra.gemspec +11 -7
  25. metadata +72 -104
  26. data/templates/config.ru +0 -5
  27. data/templates/config/middleware.rb +0 -16
  28. data/templates/config/sinatra_config.rb +0 -18
  29. data/templates/lib/body_parser.rb +0 -24
  30. data/templates/lib/tasks/doc.rake +0 -39
  31. data/templates/lib/tasks/doc_generator/bootstrap/.gitignore +0 -4
  32. data/templates/lib/tasks/doc_generator/bootstrap/LICENSE +0 -176
  33. data/templates/lib/tasks/doc_generator/bootstrap/Makefile +0 -47
  34. data/templates/lib/tasks/doc_generator/bootstrap/README.md +0 -105
  35. data/templates/lib/tasks/doc_generator/bootstrap/bootstrap.css +0 -2467
  36. data/templates/lib/tasks/doc_generator/bootstrap/bootstrap.min.css +0 -356
  37. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/css/docs.css +0 -317
  38. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/ico/bootstrap-apple-114x114.png +0 -0
  39. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/ico/bootstrap-apple-57x57.png +0 -0
  40. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/ico/bootstrap-apple-72x72.png +0 -0
  41. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/ico/favicon.ico +0 -0
  42. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/bird.png +0 -0
  43. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/browsers.png +0 -0
  44. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/example-diagram-01.png +0 -0
  45. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/example-diagram-02.png +0 -0
  46. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/example-diagram-03.png +0 -0
  47. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/grid-18px.png +0 -0
  48. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/twitter-logo-no-bird.png +0 -0
  49. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/js/application.js +0 -52
  50. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/js/google-code-prettify/prettify.css +0 -94
  51. data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/js/google-code-prettify/prettify.js +0 -28
  52. data/templates/lib/tasks/doc_generator/bootstrap/docs/index.html +0 -2037
  53. data/templates/lib/tasks/doc_generator/bootstrap/docs/javascript.html +0 -798
  54. data/templates/lib/tasks/doc_generator/bootstrap/examples/container-app.html +0 -119
  55. data/templates/lib/tasks/doc_generator/bootstrap/examples/fluid.html +0 -122
  56. data/templates/lib/tasks/doc_generator/bootstrap/examples/hero.html +0 -79
  57. data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-alerts.js +0 -124
  58. data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-buttons.js +0 -64
  59. data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-dropdown.js +0 -55
  60. data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-modal.js +0 -260
  61. data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-popover.js +0 -90
  62. data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-scrollspy.js +0 -107
  63. data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-tabs.js +0 -80
  64. data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-twipsy.js +0 -321
  65. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/index.html +0 -40
  66. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-alerts.js +0 -41
  67. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-buttons.js +0 -42
  68. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-dropdown.js +0 -52
  69. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-modal.js +0 -151
  70. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-popover.js +0 -76
  71. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-scrollspy.js +0 -31
  72. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-tabs.js +0 -77
  73. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-twipsy.js +0 -81
  74. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/vendor/qunit.css +0 -232
  75. data/templates/lib/tasks/doc_generator/bootstrap/js/tests/vendor/qunit.js +0 -1510
  76. data/templates/lib/tasks/doc_generator/bootstrap/lib/bootstrap.less +0 -26
  77. data/templates/lib/tasks/doc_generator/bootstrap/lib/forms.less +0 -479
  78. data/templates/lib/tasks/doc_generator/bootstrap/lib/mixins.less +0 -222
  79. data/templates/lib/tasks/doc_generator/bootstrap/lib/patterns.less +0 -1060
  80. data/templates/lib/tasks/doc_generator/bootstrap/lib/reset.less +0 -141
  81. data/templates/lib/tasks/doc_generator/bootstrap/lib/scaffolding.less +0 -139
  82. data/templates/lib/tasks/doc_generator/bootstrap/lib/tables.less +0 -224
  83. data/templates/lib/tasks/doc_generator/bootstrap/lib/type.less +0 -187
  84. data/templates/lib/tasks/doc_generator/bootstrap/lib/variables.less +0 -60
  85. data/templates/lib/tasks/doc_generator/template.erb +0 -156
@@ -1,798 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>Bootstrap, from Twitter</title>
6
- <meta name="description" content="">
7
- <meta name="author" content="">
8
-
9
- <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
10
- <!--[if lt IE 9]>
11
- <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
12
- <![endif]-->
13
-
14
- <!-- Le javascript -->
15
- <script src="http://code.jquery.com/jquery-1.7.min.js"></script>
16
- <script src="assets/js/google-code-prettify/prettify.js"></script>
17
- <script>$(function () { prettyPrint() })</script>
18
- <script src="../js/bootstrap-modal.js"></script>
19
- <script src="../js/bootstrap-alerts.js"></script>
20
- <script src="../js/bootstrap-twipsy.js"></script>
21
- <script src="../js/bootstrap-popover.js"></script>
22
- <script src="../js/bootstrap-dropdown.js"></script>
23
- <script src="../js/bootstrap-scrollspy.js"></script>
24
- <script src="../js/bootstrap-tabs.js"></script>
25
- <script src="../js/bootstrap-buttons.js"></script>
26
-
27
- <!-- Le styles -->
28
- <link href="../bootstrap.css" rel="stylesheet">
29
- <link href="assets/css/docs.css" rel="stylesheet">
30
- <link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet">
31
-
32
- <!-- Le fav and touch icons -->
33
- <link rel="shortcut icon" type="image/x-icon" href="assets/ico/favicon.ico">
34
- <link rel="apple-touch-icon" href="assets/ico/bootstrap-apple-57x57.png">
35
- <link rel="apple-touch-icon" sizes="72x72" href="assets/ico/bootstrap-apple-72x72.png">
36
- <link rel="apple-touch-icon" sizes="114x114" href="assets/ico/bootstrap-apple-114x114.png">
37
- </head>
38
-
39
- <body id="bootstrap-js">
40
-
41
- <!-- Topbar
42
- ================================================== -->
43
- <div class="topbar" data-scrollspy="scrollspy" >
44
- <div class="fill">
45
- <div class="container">
46
- <h3><a href="#">Bootstrap JS</a></h3>
47
- <ul>
48
- <li><a href="#overview">Overview</a></li>
49
- <li><a href="#modal">Modals</a></li>
50
- <li><a href="#dropdown">Dropdown</a></li>
51
- <li><a href="#scrollspy">ScrollSpy</a></li>
52
- <li><a href="#buttons">Buttons</a></li>
53
- <li><a href="#tabs">Tabs</a></li>
54
- <li><a href="#twipsy">Twipsy</a></li>
55
- <li><a href="#popover">Popover</a></li>
56
- <li><a href="#alerts">Alerts</a></li>
57
- </ul>
58
- </div>
59
- </div>
60
- </div>
61
-
62
- <!-- Masthead (blueprinty thing)
63
- ================================================== -->
64
- <header class="jumbotron subhead" id="overview">
65
- <div class="inner">
66
- <div class="container">
67
- <h1>Javascript for Bootstrap</h1>
68
- <p class="lead">
69
- Bring Bootstrap's components to life with new, custom plugins that work with <a href="http://jquery.com/" target="_blank">jQuery</a> and <a href="http://ender.no.de" target="_blank">Ender</a>.
70
- </p>
71
- <p><a href="./index.html">&larr; Back to Bootstrap home</a></p>
72
- </div><!-- /container -->
73
- </div>
74
- </header>
75
-
76
- <div class="container">
77
-
78
- <!-- Modal
79
- ================================================== -->
80
-
81
- <section id="modal">
82
- <div class="page-header">
83
- <h1>Modals <small>bootstrap-modal.js</small></h1>
84
- </div>
85
- <div class="row">
86
- <div class="span4 columns">
87
- <p>Our Modal plugin is a super slim take on the traditional modal js plugin, taking special care to include only the bare functionality that we require here at twitter.</p>
88
- <a href="../js/bootstrap-modal.js" target="_blank" class="btn primary">Download</a>
89
- </div>
90
- <div class="span12 columns">
91
- <h3>Using bootstrap-modal</h3>
92
- <pre class="prettyprint linenums">$('#my-modal').modal(options)</pre>
93
- <h3>Options</h3>
94
- <table class="zebra-striped">
95
- <thead>
96
- <tr>
97
- <th style="width: 100px;">Name</th>
98
- <th style="width: 50px;">type</th>
99
- <th style="width: 50px;">default</th>
100
- <th>description</th>
101
- </tr>
102
- </thead>
103
- <tbody>
104
- <tr>
105
- <td>backdrop</td>
106
- <td>boolean, string</td>
107
- <td>false</td>
108
- <td>Includes a modal-backdrop element. Set backdrop to <code>"static"</code> if you do not want the modal closed when the backdrop is clicked.</td>
109
- </tr>
110
- <tr>
111
- <td>keyboard</td>
112
- <td>boolean</td>
113
- <td>false</td>
114
- <td>Closes the modal when escape key is pressed</td>
115
- </tr>
116
- <tr>
117
- <td>show</td>
118
- <td>boolean</td>
119
- <td>false</td>
120
- <td>Opens modal on class initialization</td>
121
- </tr>
122
- </tbody>
123
- </table>
124
- <h3>Markup</h3>
125
- <p>You can activate modals on your page easily without having to write a single line of javascript. Just give an element a <code>data-controls-modal</code> attribute which corresponds to a modal element id, and when clicked, it will launch your modal. To add modal options, just include them as data attributes as well.</p>
126
- <pre class="prettyprint linenums">
127
- &lt;a class="btn" data-controls-modal="my-modal" data-backdrop="static" &gt;Launch Modal&lt;/a&gt;
128
- </pre>
129
- <p><span class="label notice">Notice</span> If you want your modal to animate in and out, just add a <code>.fade</code> class to your <code>.modal</code> element (refer to the demo to see this in action).</p>
130
- <h3>Methods</h3>
131
- <h4>.modal(options)</h4>
132
- <p>Activates your content as a modal. Accepts an optional options <code>object</code>.
133
- <pre class="prettyprint linenums">
134
- $('#my-modal').modal({
135
- keyboard: true
136
- })</pre>
137
- <h4>.modal('toggle')</h4>
138
- <p>Manually toggles a modal.</p>
139
- <pre class="prettyprint linenums">$('#my-modal').modal('toggle')</pre>
140
- <h4>.modal('show')</h4>
141
- <p>Manually opens a modal.</p>
142
- <pre class="prettyprint linenums">$('#my-modal').modal('show')</pre>
143
- <h4>.modal('hide')</h4>
144
- <p>Manually hides a modal.</p>
145
- <pre class="prettyprint linenums">$('#my-modal').modal('hide')</pre>
146
- <h4>.modal(true)</h4>
147
- <p>Returns an elements modal class instance.</p>
148
- <pre class="prettyprint linenums">$('#my-modal').modal(true)</pre>
149
- <p><span class="label notice">Notice</span> Alternatively, this can be retrieved with <code>$().data('modal')</code>.</p>
150
- <h3>Events</h3>
151
- <p>Bootstrap's modal class exposes a few events for hooking into modal functionality. </p>
152
- <table class="zebra-striped">
153
- <thead>
154
- <tr>
155
- <th style="width: 150px;">Event</th>
156
- <th>Description</th>
157
- </tr>
158
- </thead>
159
- <tbody>
160
- <tr>
161
- <td>show</td>
162
- <td>This event fires immediately when the <code>show</code> instance method is called.</td>
163
- </tr>
164
- <tr>
165
- <td>shown</td>
166
- <td>This event is fired when the modal has been made visible to the user (will wait for css transitions to complete).</td>
167
- </tr>
168
- <tr>
169
- <td>hide</td>
170
- <td>This event is fired immediately when the <code>hide</code> instance method has been called.</td>
171
- </tr>
172
- <tr>
173
- <td>hidden</td>
174
- <td>This event is fired when the modal has finished being hidden from the user (will wait for css transitions to complete).</td>
175
- </tr>
176
- </tbody>
177
- </table>
178
-
179
- <pre class="prettyprint linenums">
180
- $('#my-modal').bind('hidden', function () {
181
- // do something ...
182
- })</pre>
183
- <h3>Demo</h3>
184
- <!-- sample modal content -->
185
- <div id="modal-from-dom" class="modal hide fade">
186
- <div class="modal-header">
187
- <a href="#" class="close">&times;</a>
188
- <h3>Modal Heading</h3>
189
- </div>
190
- <div class="modal-body">
191
- <p>One fine body…</p>
192
- </div>
193
- <div class="modal-footer">
194
- <a href="#" class="btn primary">Primary</a>
195
- <a href="#" class="btn secondary">Secondary</a>
196
- </div>
197
- </div>
198
-
199
- <button data-controls-modal="modal-from-dom" data-backdrop="true" data-keyboard="true" class="btn danger">Launch Modal</button>
200
- </div>
201
- </div>
202
- </section>
203
-
204
-
205
- <!-- Dropdown
206
- ================================================== -->
207
-
208
- <section id="dropdown">
209
- <div class="page-header">
210
- <h1>Dropdown <small>bootstrap-dropdown.js</small></h1>
211
- </div>
212
- <div class="row">
213
- <div class="span4 columns">
214
- <p>This plugin is for adding dropdown interaction to the bootstrap topbar or tabbed navigations.</p>
215
- <a href="../js/bootstrap-dropdown.js" target="_blank" class="btn primary">Download</a>
216
- </div>
217
- <div class="span12 columns">
218
- <h3>Using bootstrap-dropdown.js</h3>
219
- <pre class="prettyprint linenums">$('#topbar').dropdown()</pre>
220
- <h3>Markup</h3>
221
- <p>To quickly add dropdown functionality to any nav element, use the <code>data-dropdown</code> attribute. Any valid bootstrap dropdown will automatically be activated.</p>
222
- <pre class="prettyprint linenums">
223
- &lt;ul class="tabs"&gt;
224
- &lt;li class="active"&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;
225
- &lt;li class="dropdown" data-dropdown="dropdown" &gt;
226
- &lt;a href="#" class="dropdown-toggle"&gt;Dropdown&lt;/a&gt;
227
- &lt;ul class="dropdown-menu"&gt;
228
- &lt;li&gt;&lt;a href="#"&gt;Secondary link&lt;/a&gt;&lt;/li&gt;
229
- &lt;li&gt;&lt;a href="#"&gt;Something else here&lt;/a&gt;&lt;/li&gt;
230
- &lt;li class="divider"&gt;&lt;/li&gt;
231
- &lt;li&gt;&lt;a href="#"&gt;Another link&lt;/a&gt;&lt;/li&gt;
232
- &lt;/ul&gt;
233
- &lt;/li&gt;
234
- &lt;/ul&gt;</pre>
235
- <p><span class="label notice">Notice</span> If your ui has several dropdowns, consider adding the <code>data-dropdown</code> attribute to a more significant container element like <code>.tabs</code> or <code>.topbar</code>.
236
- <h3>Methods</h3>
237
- <h4>$().dropdown()</h4>
238
- <p>
239
- A programatic api for activating menus for a given topbar or tabbed navigation.
240
- </p>
241
- <h3>Demo</h3>
242
- <div class="topbar-wrapper">
243
- <div id="topbar-example" class="topbar" data-dropdown="dropdown">
244
- <div class="topbar-inner">
245
- <div class="container">
246
- <h3><a href="#">Project Name</a></h3>
247
- <ul>
248
- <li><a href="#">Link</a></li>
249
- <li><a href="#">Link</a></li>
250
- </ul>
251
- <form action="">
252
- <input type="text" placeholder="Search" />
253
- </form>
254
- <ul class="nav secondary-nav">
255
- <li class="menu">
256
- <a href="#" class="menu">Dropdown 1</a>
257
- <ul class="menu-dropdown">
258
- <li><a href="#">Secondary link</a></li>
259
- <li><a href="#">Something else here</a></li>
260
- <li class="divider"></li>
261
- <li><a href="#">Another link</a></li>
262
- </ul>
263
- </li>
264
- <li class="menu">
265
- <a href="#" class="menu">Dropdown 2</a>
266
- <ul class="menu-dropdown">
267
- <li><a href="#">Secondary link</a></li>
268
- <li><a href="#">Something else here</a></li>
269
- <li class="divider"></li>
270
- <li><a href="#">Another link</a></li>
271
- </ul>
272
- </li>
273
- </ul>
274
- </div>
275
- </div>
276
- </div>
277
- </div>
278
- </div>
279
- </div>
280
- </section>
281
-
282
- <!-- ScrollSpy
283
- ================================================== -->
284
-
285
- <section id="scrollspy">
286
- <div class="page-header">
287
- <h1>ScrollSpy <small>bootstrap-scrollspy.js</small></h1>
288
- </div>
289
- <div class="row">
290
- <div class="span4 columns">
291
- <p>This plugin is for adding the scrollspy (auto updating nav) interaction to the bootstrap topbar.</p>
292
- <a href="../js/bootstrap-scrollspy.js" target="_blank" class="btn primary">Download</a>
293
- </div>
294
- <div class="span12 columns">
295
- <h2>Using bootstrap-scrollspy.js</h2>
296
- <pre class="prettyprint linenums">$('#topbar').scrollSpy()</pre>
297
- <h3>Markup</h3>
298
- <p>To easily add scrollspy behavior to your nav, just add the <code>data-scrollspy</code> attribute to the <code>.topbar</code>.
299
- <pre class="prettyprint linenums">&lt;div class="topbar" data-scrollspy="scrollspy" &gt;...&lt;/div&gt;</pre>
300
- <h3>Methods</h3>
301
- <h4>$().scrollSpy()</h4>
302
- <p>
303
- Auto activates navigation buttons by users scroll position.
304
- </p>
305
- <pre class="prettyprint linenums">$('body > .topbar').scrollSpy()</pre>
306
- <p><span class="label notice">Notice</span> Topbar anchor tags must have resolvable id targets. For example, a <code>&lt;a href="#home"&gt;home&lt;/a&gt;</code> must correspond to something in the dom like <code>&lt;div id="home"&gt;&lt;/div&gt;</code>.
307
- </p>
308
- <h4>.scrollSpy('refresh')</h4>
309
- <p>The scrollspy caches nav buttons and section coordinates for performance. If you need to update this cache (likely if you have dynamic content) just call this refresh method. If you used the data attribute to define your scrollspy, just call refresh on the body.</p>
310
- <pre class="prettyprint linenums">$('body').scrollSpy('refresh')</pre>
311
- <h3>Demo</h3>
312
- <p>Checkout the the topbar navigation on this page.</p>
313
- </div>
314
- </div>
315
- </section>
316
-
317
- <!-- Buttons
318
- ================================================== -->
319
-
320
- <section id="buttons">
321
- <div class="page-header">
322
- <h1>Buttons <small>bootstrap-buttons.js</small></h1>
323
- </div>
324
- <div class="row">
325
- <div class="span4 columns">
326
- <p>This plugin offers additional functionality for managing button state.</p>
327
- <a href="../js/bootstrap-buttons.js" target="_blank" class="btn primary">Download</a>
328
- </div>
329
- <div class="span12 columns">
330
- <h3>Using bootstrap-buttons.js</h3>
331
- <pre class="prettyprint linenums">$('.tabs').button()</pre>
332
- <h3>Methods</h3>
333
- <h4>$().button('toggle')</h4>
334
- <p>Toggles push state. Gives btn the look that it's been activated.</p>
335
- <p><span class="label notice">Notice</span> You can enable auto toggling of a button by using the <code>data-toggle</code> attribute.</p>
336
- <pre class="prettyprint linenums">&lt;button class="btn" data-toggle="toggle" &gt;...&lt;/button&gt;</pre>
337
- <h4>$().button('loading')</h4>
338
- <p>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 <code>data-loading-text</code>.
339
- </p>
340
- <pre class="prettyprint linenums">&lt;button class="btn" data-loading-text="loading stuff..." &gt;...&lt;/button&gt;</pre>
341
- <h4>$().button('reset')</h4>
342
- <p>Resets button state - swaps text to original text.</p>
343
- <h4>$().button(string)</h4>
344
- <p>Resets button state - swaps text to any data defined text state.</p>
345
- <pre class="prettyprint linenums">&lt;button class="btn" data-complete-text="finished!" &gt;...&lt;/button&gt;
346
- &lt;script&gt;
347
- $('.btn').button('complete')
348
- &lt;/scrip&gt;</pre>
349
- <h3>Demo</h3>
350
- <button id="fat-btn" data-loading-text="loading..." class="btn danger">Loading Demo</button>
351
- <button class="btn" data-toggle="toggle">Toggle Demo</button>
352
- <script>
353
- $(function() {
354
- var btn = $('#fat-btn').click(function () {
355
- btn.button('loading')
356
- setTimeout(function () {
357
- btn.button('reset')
358
- }, 3000)
359
- })
360
- })
361
- </script>
362
- </div>
363
- </div>
364
- </section>
365
-
366
-
367
- <!-- Tabs
368
- ================================================== -->
369
-
370
- <section id="tabs">
371
- <div class="page-header">
372
- <h1>Tabs <small>bootstrap-tabs.js</small></h1>
373
- </div>
374
- <div class="row">
375
- <div class="span4 columns">
376
- <p>This plugin adds quick, dynamic tab and pill functionality.</p>
377
- <a href="../js/bootstrap-tabs.js" target="_blank" class="btn primary">Download</a>
378
- </div>
379
- <div class="span12 columns">
380
- <h3>Using bootstrap-tabs.js</h3>
381
- <pre class="prettyprint linenums">$('.tabs').tabs()</pre>
382
- <h3>Markup</h3>
383
- <p>You can activate a tab or pill navigation without writing any javascript by simply giving them a <code>data-tabs</code> or <code>data-pills</code> attribute.</p>
384
- <pre class="prettyprint linenums"> &lt;ul class="tabs" data-tabs="tabs" &gt;...&lt;/ul&gt;</pre>
385
- <h3>Methods</h3>
386
- <h4>$().tabs or $().pills</h4>
387
- <p>
388
- Activates tab and pill functionality for a given container. Tab links should reference id's in the document.
389
- </p>
390
- <pre class="prettyprint linenums">
391
- &lt;ul class="tabs"&gt;
392
- &lt;li class="active"&gt;&lt;a href="#home"&gt;Home&lt;/a&gt;&lt;/li&gt;
393
- &lt;li&gt;&lt;a href="#profile"&gt;Profile&lt;/a&gt;&lt;/li&gt;
394
- &lt;li&gt;&lt;a href="#messages"&gt;Messages&lt;/a&gt;&lt;/li&gt;
395
- &lt;li&gt;&lt;a href="#settings"&gt;Settings&lt;/a&gt;&lt;/li&gt;
396
- &lt;/ul&gt;
397
-
398
- &lt;div class="pill-content"&gt;
399
- &lt;div class="active" id="home"&gt;...&lt;/div&gt;
400
- &lt;div id="profile"&gt;...&lt;/div&gt;
401
- &lt;div id="messages"&gt;...&lt;/div&gt;
402
- &lt;div id="settings"&gt;...&lt;/div&gt;
403
- &lt;/div&gt;
404
-
405
- &lt;script&gt;
406
- $(function () {
407
- $('.tabs').tabs()
408
- })
409
- &lt;/script&gt;</pre>
410
- </p>
411
- <h3>Events</h3>
412
- <table class="zebra-striped">
413
- <thead>
414
- <tr>
415
- <th style="width: 150px;">Event</th>
416
- <th>Description</th>
417
- </tr>
418
- </thead>
419
- <tbody>
420
- <tr>
421
- <td>change</td>
422
- <td>This event fires on tab change. Use <code>event.target</code> and <code>event.relatedTarget</code> to target the active tab and the previous active tab respectively.</td>
423
- </tr>
424
- </tbody>
425
- </table>
426
-
427
- <pre class="prettyprint linenums">
428
- $('.tabs a').bind('change', function (e) {
429
- e.target // activated tab
430
- e.relatedTarget // previous tab
431
- })</pre>
432
- <h3>Demo</h3>
433
- <ul class="tabs" data-tabs="tabs">
434
- <li class="active"><a href="#home">Home</a></li>
435
- <li><a href="#profile">Profile</a></li>
436
- <li><a href="#messages">Messages</a></li>
437
- <li><a href="#settings">Settings</a></li>
438
- <li class="dropdown" data-dropdown="dropdown">
439
- <a href="#" class="dropdown-toggle">Dropdown</a>
440
- <ul class="dropdown-menu">
441
- <li><a href="#fat">@fat</a></li>
442
- <li><a href="#mdo">@mdo</a></li>
443
- </ul>
444
- </li>
445
- </ul>
446
- <div id="my-tab-content" class="tab-content">
447
- <div class="active tab-pane" id="home">
448
- <p>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.</p>
449
- </div>
450
- <div class="tab-pane" id="profile">
451
- <p>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.</p>
452
- </div>
453
- <div class="tab-pane" id="messages">
454
- <p>Banksy do proident, brooklyn photo booth delectus sunt artisan sed organic exercitation eiusmod four loko. Quis tattooed iphone esse aliqua. Master cleanse vero fixie mcsweeney's. Ethical portland aute, irony food truck pitchfork lomo eu anim. Aesthetic blog DIY, ethical beard leggings tofu consequat whatever cardigan nostrud. Helvetica you probably haven't heard of them carles, marfa veniam occaecat lomo before they sold out in shoreditch scenester sustainable thundercats. Consectetur tofu craft beer, mollit brunch fap echo park pitchfork mustache dolor.</p>
455
- </div>
456
- <div class="tab-pane" id="settings">
457
- <p>Sunt qui biodiesel mollit officia, fanny pack put a bird on it thundercats seitan squid ad wolf bicycle rights blog. Et aute readymade farm-to-table carles 8-bit, nesciunt nulla etsy adipisicing organic ea. Master cleanse mollit high life, next level Austin nesciunt american apparel twee mustache adipisicing reprehenderit hoodie portland irony. Aliqua tofu quinoa +1 commodo eiusmod. High life williamsburg cupidatat twee homo leggings. Four loko vinyl DIY consectetur nisi, marfa retro keffiyeh vegan. Fanny pack viral retro consectetur gentrify fap.</p>
458
- </div>
459
- <div class="tab-pane" id="fat">
460
- <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p>
461
- </div>
462
- <div class="tab-pane" id="mdo">
463
- <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p>
464
- </div>
465
- </div>
466
- </div>
467
- </div>
468
- </section>
469
-
470
- <!-- Tips
471
- ================================================== -->
472
-
473
- <section id="twipsy">
474
- <div class="page-header">
475
- <h1>Twipsy <small>bootstrap-twipsy.js</small></h1>
476
- </div>
477
- <div class="row">
478
- <div class="span4 columns">
479
- <p>Based on the excellent jQuery.tipsy plugin written by Jason Frame; twipsy is an updated version, which doesn't rely on images, uses css3 for animations, and data-attributes for title storage!</p>
480
- <a href="../js/bootstrap-twipsy.js" target="_blank" class="btn primary">Download</a>
481
- </div>
482
- <div class="span12 columns">
483
- <h3>Using bootstrap-twipsy.js</h3>
484
- <pre class="prettyprint linenums">$('#example').twipsy(options)</pre>
485
- <h3>Options</h3>
486
- <table class="zebra-striped">
487
- <thead>
488
- <tr>
489
- <th style="width: 100px;">Name</th>
490
- <th style="width: 95px;">type</th>
491
- <th style="width: 95px;">default</th>
492
- <th>description</th>
493
- </tr>
494
- </thead>
495
- <tbody>
496
- <tr>
497
- <td>animate</td>
498
- <td>boolean</td>
499
- <td>true</td>
500
- <td>apply a css fade transition to the tooltip</td>
501
- </tr>
502
- <tr>
503
- <td>delayIn</td>
504
- <td>number</td>
505
- <td>0</td>
506
- <td>delay before showing tooltip (ms)</td>
507
- </tr>
508
- <tr>
509
- <td>delayOut</td>
510
- <td>number</td>
511
- <td>0</td>
512
- <td>delay before hiding tooltip (ms)</td>
513
- </tr>
514
- <tr>
515
- <td>fallback</td>
516
- <td>string</td>
517
- <td>''</td>
518
- <td>text to use when no tooltip title is present</td>
519
- </tr>
520
- <tr>
521
- <td>placement</td>
522
- <td>string</td>
523
- <td>'above'</td>
524
- <td>how to position the tooltip - above | below | left | right</td>
525
- </tr>
526
- <tr>
527
- <td>html</td>
528
- <td>boolean</td>
529
- <td>false</td>
530
- <td>allows html content within tooltip</td>
531
- </tr>
532
- <tr>
533
- <td>live</td>
534
- <td>boolean</td>
535
- <td>false</td>
536
- <td>use event delegation instead of individual event handlers</td>
537
- </tr>
538
- <tr>
539
- <td>offset</td>
540
- <td>number</td>
541
- <td>0</td>
542
- <td>pixel offset of tooltip from target element</td>
543
- </tr>
544
- <tr>
545
- <td>title</td>
546
- <td>string, function</td>
547
- <td>'title'</td>
548
- <td>attribute or method for retrieving title text</td>
549
- </tr>
550
- <tr>
551
- <td>trigger</td>
552
- <td>string</td>
553
- <td>'hover'</td>
554
- <td>how tooltip is triggered - hover | focus | manual</td>
555
- </tr>
556
- <tr>
557
- <td>template</td>
558
- <td>string</td>
559
- <td>[default markup]</td>
560
- <td>the html template used for rendering a twipsy</td>
561
- </tr>
562
- </tbody>
563
- </table>
564
- <p><span class="label notice">Notice</span> Individual twipsy instance options can alternatively be specified through the use of data attributes.</code></p>
565
- <pre class="prettyprint linenums">&lt;a href="#" data-placement="below" rel='twipsy' title='Some title text'&gt;text&lt;/a&gt;</pre>
566
- <h3>Methods</h3>
567
- <h4>$().twipsy(options)</h4>
568
- <p>Attaches a twipsy handler to an element collection.</p>
569
- <h4>.twipsy('show')</h4>
570
- <p>Reveals an elements twipsy.</p>
571
- <pre class="prettyprint linenums">$('#element').twipsy('show')</pre>
572
- <h4>.twipsy('hide')</h4>
573
- <p>Hides an elements twipsy.</p>
574
- <pre class="prettyprint linenums">$('#element').twipsy('hide')</pre>
575
- <h4>.twipsy(true)</h4>
576
- <p>Returns an elements twipsy class instance.</p>
577
- <pre class="prettyprint linenums">$('#element').twipsy(true)</pre>
578
- <p><span class="label notice">Notice</span> Alternatively, this can be retrieved with <code>$().data('twipsy')</code>.</p>
579
- <h3>Demo</h3>
580
- <div class="well">
581
- <p class="muted">Tight pants next level keffiyeh <a href="#" rel='twipsy' title='Some title text'>you probably</a> 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 <a href="#" rel='twipsy' title='Another twipsy'>have a</a> terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A <a href="#" rel='twipsy' title='Another one here too'>really ironic</a> artisan whatever keytar, scenester farm-to-table banksy Austin <a href="#" rel='twipsy' title='The last tip!'>twitter handle</a> freegan cred raw denim single-origin coffee viral.
582
- </p>
583
- </div>
584
- <script>
585
- $(function () {
586
- $("a[rel=twipsy]").twipsy({
587
- live: true
588
- })
589
- })
590
- </script>
591
- </div>
592
- </div>
593
- </section>
594
-
595
- <!-- Popovers
596
- ================================================== -->
597
-
598
- <section id="popover">
599
- <div class="page-header">
600
- <h1>Popovers <small>bootstrap-popover.js</small></h1>
601
- </div>
602
- <div class="row">
603
- <div class="span4 columns">
604
- <p>The popover plugin provides a simple interface for adding popovers to your application. It extends the <a href="#twipsy">bootstrap-twipsy.js</a> plugin, so be sure to grab that file as well when including popovers in your project!</p>
605
- <p><span class="label notice">Notice</span> You must include the bootstrap-twipsy.js file <strong>before</strong> bootstrap-popover.js.</p>
606
- <a href="../js/bootstrap-popover.js" target="_blank" class="btn primary">Download</a>
607
- </div>
608
- <div class="span12 columns">
609
- <h3>Using bootstrap-popover.js</h3>
610
- <pre class="prettyprint linenums">$('#example').popover(options)</pre>
611
- <h3>Options</h3>
612
- <table class="zebra-striped">
613
- <thead>
614
- <tr>
615
- <th style="width: 100px;">Name</th>
616
- <th style="width: 95px;">type</th>
617
- <th style="width: 95px;">default</th>
618
- <th>description</th>
619
- </tr>
620
- </thead>
621
- <tbody>
622
- <tr>
623
- <td>animate</td>
624
- <td>boolean</td>
625
- <td>true</td>
626
- <td>apply a css fade transition to the tooltip</td>
627
- </tr>
628
- <tr>
629
- <td>delayIn</td>
630
- <td>number</td>
631
- <td>0</td>
632
- <td>delay before showing tooltip (ms)</td>
633
- </tr>
634
- <tr>
635
- <td>delayOut</td>
636
- <td>number</td>
637
- <td>0</td>
638
- <td>delay before hiding tooltip (ms)</td>
639
- </tr>
640
- <tr>
641
- <td>fallback</td>
642
- <td>string</td>
643
- <td>''</td>
644
- <td>text to use when no tooltip title is present</td>
645
- </tr>
646
- <tr>
647
- <td>placement</td>
648
- <td>string</td>
649
- <td>'right'</td>
650
- <td>how to position the tooltip - above | below | left | right</td>
651
- </tr>
652
- <tr>
653
- <td>html</td>
654
- <td>boolean</td>
655
- <td>false</td>
656
- <td>allows html content within tooltip</td>
657
- </tr>
658
- <tr>
659
- <td>live</td>
660
- <td>boolean</td>
661
- <td>false</td>
662
- <td>use event delegation instead of individual event handlers</td>
663
- </tr>
664
- <tr>
665
- <td>offset</td>
666
- <td>number</td>
667
- <td>0</td>
668
- <td>pixel offset of tooltip from target element</td>
669
- </tr>
670
- <tr>
671
- <td>title</td>
672
- <td>string, function</td>
673
- <td>'title'</td>
674
- <td>attribute or method for retrieving title text</td>
675
- </tr>
676
- <tr>
677
- <td>content</td>
678
- <td>string, function</td>
679
- <td>'data-content'</td>
680
- <td>attribute or method for retrieving content text.</td>
681
- </tr>
682
- <tr>
683
- <td>trigger</td>
684
- <td>string</td>
685
- <td>'hover'</td>
686
- <td>how tooltip is triggered - hover | focus | manual</td>
687
- </tr>
688
- <tr>
689
- <td>template</td>
690
- <td>string</td>
691
- <td>[default markup]</td>
692
- <td>the html template used for rendering a popover</td>
693
- </tr>
694
- </tbody>
695
- </table>
696
- <p><span class="label notice">Notice</span> Individual popover instance options can alternatively be specified through the use of data attributes.</code></p>
697
- <pre class="prettyprint linenums">&lt;a data-placement="below" href="#" class="btn danger" rel="popover"&gt;text&lt;/a&gt;</pre>
698
- <h3>Methods</h3>
699
- <h4>$().popover(options)</h4>
700
- <p>Initializes popovers for an element collection.</p>
701
- <h4>.popover('show')</h4>
702
- <p>Reveals an elements popover.</p>
703
- <pre class="prettyprint linenums">$('#element').popover('show')</pre>
704
- <h4>.popover('hide')</h4>
705
- <p>Hides an elements popover.</p>
706
- <pre class="prettyprint linenums">$('#element').popover('hide')</pre>
707
- <h3>Demo</h3>
708
- <a href="#" class="btn danger" rel="popover" title="A title" data-content="And here's some amazing content. It's very engaging. right?">hover for popover</a>
709
- <script>
710
- $(function () {
711
- $("a[rel=popover]")
712
- .popover({
713
- offset: 10
714
- })
715
- .click(function(e) {
716
- e.preventDefault()
717
- })
718
- })
719
- </script>
720
- </div>
721
- </div>
722
- </section>
723
-
724
-
725
- <!-- Alerts
726
- ================================================== -->
727
-
728
- <section id="alerts">
729
- <div class="page-header">
730
- <h1>Alerts <small>bootstrap-alerts.js</small></h1>
731
- </div>
732
- <div class="row">
733
- <div class="span4 columns">
734
- <p>The alert plugin is a super tiny class for adding close functionality to alerts.</p>
735
- <a href="../js/bootstrap-alerts.js" target="_blank" class="btn primary">Download</a>
736
- </div>
737
- <div class="span12 columns">
738
- <h3>Using bootstrap-alerts.js</h3>
739
- <pre class="prettyprint linenums">$(".alert-message").alert()</pre>
740
- <h3>Markup</h3>
741
- <p>Just add a <code>data-alert</code> attribute to your alert messages to automatically give them close functionality.</p>
742
- <h3>Options</h3>
743
- <table class="zebra-striped">
744
- <thead>
745
- <tr>
746
- <th style="width: 100px;">Name</th>
747
- <th style="width: 100px;">type</th>
748
- <th style="width: 50px;">default</th>
749
- <th>description</th>
750
- </tr>
751
- </thead>
752
- <tbody>
753
- <tr>
754
- <td>selector</td>
755
- <td>string</td>
756
- <td>'.close'</td>
757
- <td>What selector to target for closing an alert.</td>
758
- </tr>
759
- </tbody>
760
- </table>
761
-
762
- <h3>Methods</h3>
763
- <h4>$().alert()</h4>
764
- <p>Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the <code>.fade</code> and <code>.in</code> class already applied to them.</p>
765
- <h4>.alert('close')</h4>
766
- <p>Closes an alert.</p>
767
- <pre class="prettyprint linenums">$(".alert-message").alert('close')</pre>
768
- <h3>Demo</h3>
769
- <div class="alert-message warning fade in" data-alert="alert" >
770
- <a class="close" href="#">&times;</a>
771
- <p><strong>Holy guacamole!</strong> Best check yo self, you’re not looking too good.</p>
772
- </div>
773
- <div class="alert-message block-message error fade in" data-alert="alert" >
774
- <a class="close" href="#">&times;</a>
775
- <p><strong>Oh snap! You got an error!</strong> 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.</p>
776
- <div class="alert-actions">
777
- <a class="btn small" href="#">Take this action</a> <a class="btn small" href="#">Or do this</a>
778
- </div>
779
- </div>
780
- </div>
781
- </div>
782
- </section>
783
-
784
-
785
- </div><!-- /container -->
786
-
787
- <footer class="footer">
788
- <div class="container">
789
- <p class="pull-right"><a href="#">Back to top</a></p>
790
- <p>
791
- Designed and built with all the love in the world <a href="http://twitter.com/twitter" target="_blank">@twitter</a> by <a href="http://twitter.com/mdo" target="_blank">@mdo</a> and <a href="http://twitter.com/fat" target="_blank">@fat</a>.<br />
792
- Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>.
793
- </p>
794
- </div>
795
- </footer>
796
-
797
- </body>
798
- </html>