comparison 3rdparty/bootstrap/docs/extend.html @ 4854:c109f7c1e477

Add local copy of Bootstrap v2.2.2 (for packaging on Debian)
author Pradip Caulagi <caulagi@gmail.com>
date Thu, 30 Jan 2014 14:50:57 +0530
parents
children
comparison
equal deleted inserted replaced
4853:f211f5da0d74 4854:c109f7c1e477
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="utf-8">
5 <title>Extend ยท Bootstrap</title>
6 <meta name="viewport" content="width=device-width, initial-scale=1.0">
7 <meta name="description" content="">
8 <meta name="author" content="">
9
10 <!-- Le styles -->
11 <link href="assets/css/bootstrap.css" rel="stylesheet">
12 <link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
13 <link href="assets/css/docs.css" rel="stylesheet">
14 <link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet">
15
16 <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
17 <!--[if lt IE 9]>
18 <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
19 <![endif]-->
20
21 <!-- Le fav and touch icons -->
22 <link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png">
23 <link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png">
24 <link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png">
25 <link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png">
26 <link rel="shortcut icon" href="assets/ico/favicon.png">
27
28 </head>
29
30 <body data-spy="scroll" data-target=".bs-docs-sidebar">
31
32 <!-- Navbar
33 ================================================== -->
34 <div class="navbar navbar-inverse navbar-fixed-top">
35 <div class="navbar-inner">
36 <div class="container">
37 <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
38 <span class="icon-bar"></span>
39 <span class="icon-bar"></span>
40 <span class="icon-bar"></span>
41 </button>
42 <a class="brand" href="./index.html">Bootstrap</a>
43 <div class="nav-collapse collapse">
44 <ul class="nav">
45 <li class="">
46 <a href="./index.html">Home</a>
47 </li>
48 <li class="">
49 <a href="./getting-started.html">Get started</a>
50 </li>
51 <li class="">
52 <a href="./scaffolding.html">Scaffolding</a>
53 </li>
54 <li class="">
55 <a href="./base-css.html">Base CSS</a>
56 </li>
57 <li class="">
58 <a href="./components.html">Components</a>
59 </li>
60 <li class="">
61 <a href="./javascript.html">JavaScript</a>
62 </li>
63 <li class="">
64 <a href="./customize.html">Customize</a>
65 </li>
66 </ul>
67 </div>
68 </div>
69 </div>
70 </div>
71
72 <!-- Subhead
73 ================================================== -->
74 <header class="jumbotron subhead" id="overview">
75 <div class="container">
76 <h1>Extending Bootstrap</h1>
77 <p class="lead">Extend Bootstrap to take advantage of included styles and components, as well as LESS variables and mixins.</p>
78 <div>
79 </header>
80
81 <div class="container">
82
83 <!-- Docs nav
84 ================================================== -->
85 <div class="row">
86 <div class="span3 bs-docs-sidebar">
87 <ul class="nav nav-list bs-docs-sidenav">
88 <li><a href="#built-with-less"><i class="icon-chevron-right"></i> Built with LESS</a></li>
89 <li><a href="#compiling"><i class="icon-chevron-right"></i> Compiling Bootstrap</a></li>
90 <li><a href="#static-assets"><i class="icon-chevron-right"></i> Use as static assets</a></li>
91 </ul>
92 </div>
93 <div class="span9">
94
95
96
97 <!-- BUILT WITH LESS
98 ================================================== -->
99 <section id="built-with-less">
100 <div class="page-header">
101 <h1>Built with LESS</h1>
102 </div>
103
104 <img style="float: right; height: 36px; margin: 10px 20px 20px" src="assets/img/less-logo-large.png" alt="LESS CSS">
105 <p class="lead">Bootstrap is made with LESS at its core, a dynamic stylesheet language created by our good friend, <a href="http://cloudhead.io">Alexis Sellier</a>. It makes developing systems-based CSS faster, easier, and more fun.</p>
106
107 <h3>Why LESS?</h3>
108 <p>One of Bootstrap's creators wrote a quick <a href="http://www.wordsbyf.at/2012/03/08/why-less/">blog post about this</a>, summarized here:</p>
109 <ul>
110 <li>Bootstrap compiles faster ~6x faster with Less compared to Sass</li>
111 <li>Less is written in JavaScript, making it easier to us to dive in and patch compared to Ruby with Sass.</li>
112 <li>Less is more; we want to feel like we're writing CSS and making Bootstrap approachable to all.</li>
113 </ul>
114
115 <h3>What's included?</h3>
116 <p>As an extension of CSS, LESS includes variables, mixins for reusable snippets of code, operations for simple math, nesting, and even color functions.</p>
117
118 <h3>Learn more</h3>
119 <p>Visit the official website at <a href="http://lesscss.org">http://lesscss.org</a> to learn more.</p>
120 </section>
121
122
123
124 <!-- COMPILING LESS AND BOOTSTRAP
125 ================================================== -->
126 <section id="compiling">
127 <div class="page-header">
128 <h1>Compiling Bootstrap with Less</h1>
129 </div>
130
131 <p class="lead">Since our CSS is written with Less and utilizes variables and mixins, it needs to be compiled for final production implementation. Here's how.</p>
132
133 <div class="alert alert-info">
134 <strong>Note:</strong> If you're submitting a pull request to GitHub with modified CSS, you <strong>must</strong> recompile the CSS via any of these methods.
135 </div>
136
137 <h2>Tools for compiling</h2>
138
139 <h3>Node with makefile</h3>
140 <p>Install the LESS command line compiler, JSHint, Recess, and uglify-js globally with npm by running the following command:</p>
141 <pre>$ npm install -g less jshint recess uglify-js</pre>
142 <p>Once installed just run <code>make</code> from the root of your bootstrap directory and you're all set.</p>
143 <p>Additionally, if you have <a href="https://github.com/mynyml/watchr">watchr</a> installed, you may run <code>make watch</code> to have bootstrap automatically rebuilt every time you edit a file in the bootstrap lib (this isn't required, just a convenience method).</p>
144
145 <h3>Command line</h3>
146 <p>Install the LESS command line tool via Node and run the following command:</p>
147 <pre>$ lessc ./less/bootstrap.less > bootstrap.css</pre>
148 <p>Be sure to include <code>--compress</code> in that command if you're trying to save some bytes!</p>
149
150 <h3>JavaScript</h3>
151 <p><a href="http://lesscss.org/">Download the latest Less.js</a> and include the path to it (and Bootstrap) in the <code>&lt;head&gt;</code>.</p>
152 <pre class="prettyprint">
153 &lt;link rel="stylesheet/less" href="/path/to/bootstrap.less"&gt;
154 &lt;script src="/path/to/less.js"&gt;&lt;/script&gt;
155 </pre>
156 <p>To recompile the .less files, just save them and reload your page. Less.js compiles them and stores them in local storage.</p>
157
158 <h3>Unofficial Mac app</h3>
159 <p><a href="http://incident57.com/less/">The unofficial Mac app</a> 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.</p>
160
161 <h3>More apps</h3>
162 <h4><a href="http://crunchapp.net/" target="_blank">Crunch</a></h4>
163 <p>Crunch is a great looking LESS editor and compiler built on Adobe Air.</p>
164 <h4><a href="http://incident57.com/codekit/" target="_blank">CodeKit</a></h4>
165 <p>Created by the same guy as the unofficial Mac app, CodeKit is a Mac app that compiles LESS, SASS, Stylus, and CoffeeScript.</p>
166 <h4><a href="http://wearekiss.com/simpless" target="_blank">Simpless</a></h4>
167 <p>Mac, Linux, and Windows app for drag and drop compiling of LESS files. Plus, the <a href="https://github.com/Paratron/SimpLESS" target="_blank">source code is on GitHub</a>.</p>
168
169 </section>
170
171
172
173 <!-- Static assets
174 ================================================== -->
175 <section id="static-assets">
176 <div class="page-header">
177 <h1>Use as static assets</h1>
178 </div>
179 <p class="lead"><a href="./getting-started.html">Quickly start</a> any web project by dropping in the compiled or minified CSS and JS. Layer on custom styles separately for easy upgrades and maintenance moving forward.</p>
180
181 <h3>Setup file structure</h3>
182 <p>Download the latest compiled Bootstrap and place into your project. For example, you might have something like this:</p>
183 <pre>
184 <span class="icon-folder-open"></span> app/
185 <span class="icon-folder-open"></span> layouts/
186 <span class="icon-folder-open"></span> templates/
187 <span class="icon-folder-open"></span> public/
188 <span class="icon-folder-open"></span> css/
189 <span class="icon-file"></span> bootstrap.min.css
190 <span class="icon-folder-open"></span> js/
191 <span class="icon-file"></span> bootstrap.min.js
192 <span class="icon-folder-open"></span> img/
193 <span class="icon-file"></span> glyphicons-halflings.png
194 <span class="icon-file"></span> glyphicons-halflings-white.png
195 </pre>
196
197 <h3>Utilize starter template</h3>
198 <p>Copy the following base HTML to get started.</p>
199 <pre class="prettyprint linenums">
200 &lt;html&gt;
201 &lt;head&gt;
202 &lt;title&gt;Bootstrap 101 Template&lt;/title&gt;
203 &lt;!-- Bootstrap --&gt;
204 &lt;link href="public/css/bootstrap.min.css" rel="stylesheet"&gt;
205 &lt;/head&gt;
206 &lt;body&gt;
207 &lt;h1&gt;Hello, world!&lt;/h1&gt;
208 &lt;!-- Bootstrap --&gt;
209 &lt;script src="public/js/bootstrap.min.js"&gt;&lt;/script&gt;
210 &lt;/body&gt;
211 &lt;/html&gt;
212 </pre>
213
214 <h3>Layer on custom code</h3>
215 <p>Work in your custom CSS, JS, and more as necessary to make Bootstrap your own with your own separate CSS and JS files.</p>
216 <pre class="prettyprint linenums">
217 &lt;html&gt;
218 &lt;head&gt;
219 &lt;title&gt;Bootstrap 101 Template&lt;/title&gt;
220 &lt;!-- Bootstrap --&gt;
221 &lt;link href="public/css/bootstrap.min.css" rel="stylesheet"&gt;
222 &lt;!-- Project --&gt;
223 &lt;link href="public/css/application.css" rel="stylesheet"&gt;
224 &lt;/head&gt;
225 &lt;body&gt;
226 &lt;h1&gt;Hello, world!&lt;/h1&gt;
227 &lt;!-- Bootstrap --&gt;
228 &lt;script src="public/js/bootstrap.min.js"&gt;&lt;/script&gt;
229 &lt;!-- Project --&gt;
230 &lt;script src="public/js/application.js"&gt;&lt;/script&gt;
231 &lt;/body&gt;
232 &lt;/html&gt;
233 </pre>
234
235 </section>
236
237 </div>
238 </div>
239
240 </div>
241
242
243
244 <!-- Footer
245 ================================================== -->
246 <footer class="footer">
247 <div class="container">
248 <p>Designed and built with all the love in the world by <a href="http://twitter.com/mdo" target="_blank">@mdo</a> and <a href="http://twitter.com/fat" target="_blank">@fat</a>.</p>
249 <p>Code licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
250 <p><a href="http://glyphicons.com">Glyphicons Free</a> licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
251 <ul class="footer-links">
252 <li><a href="http://blog.getbootstrap.com">Blog</a></li>
253 <li class="muted">&middot;</li>
254 <li><a href="https://github.com/twitter/bootstrap/issues?state=open">Issues</a></li>
255 <li class="muted">&middot;</li>
256 <li><a href="https://github.com/twitter/bootstrap/wiki">Roadmap and changelog</a></li>
257 </ul>
258 </div>
259 </footer>
260
261
262
263 <!-- Le javascript
264 ================================================== -->
265 <!-- Placed at the end of the document so the pages load faster -->
266 <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
267 <script src="assets/js/jquery.js"></script>
268 <script src="assets/js/bootstrap-transition.js"></script>
269 <script src="assets/js/bootstrap-alert.js"></script>
270 <script src="assets/js/bootstrap-modal.js"></script>
271 <script src="assets/js/bootstrap-dropdown.js"></script>
272 <script src="assets/js/bootstrap-scrollspy.js"></script>
273 <script src="assets/js/bootstrap-tab.js"></script>
274 <script src="assets/js/bootstrap-tooltip.js"></script>
275 <script src="assets/js/bootstrap-popover.js"></script>
276 <script src="assets/js/bootstrap-button.js"></script>
277 <script src="assets/js/bootstrap-collapse.js"></script>
278 <script src="assets/js/bootstrap-carousel.js"></script>
279 <script src="assets/js/bootstrap-typeahead.js"></script>
280 <script src="assets/js/bootstrap-affix.js"></script>
281
282 <script src="assets/js/holder/holder.js"></script>
283 <script src="assets/js/google-code-prettify/prettify.js"></script>
284
285 <script src="assets/js/application.js"></script>
286
287
288
289 </body>
290 </html>

Roundup Issue Tracker: http://roundup-tracker.org/