mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-26 13:29:06 +02:00
start markdowning getting started and moving things to separate pages
This commit is contained in:
@@ -1,84 +0,0 @@
|
||||
<a id="quick-start"></a>
|
||||
|
||||
# Quick start
|
||||
|
||||
Quickly add Bootstrap to your project via the [Bootstrap CDN](http://bootstrapcdn.com), graciously provided by the [MaxCDN](http://www.maxcdn.com/) folks. Copy-paste the stylesheet `<link>` into your `<head>` before all other stylesheets.
|
||||
|
||||
{% highlight html %}
|
||||
<link rel="stylesheet" href="{{ site.cdn.css }}">
|
||||
{% endhighlight %}
|
||||
|
||||
Then, add the Bootstrap JavaScript—and jQuery—near the end of your pages. It's best placed right before the closing `</body>` tag. Be sure to place jQuery first as our code depends on it.
|
||||
|
||||
{% highlight html %}
|
||||
<script src="{{ site.cdn.jquery }}"></script>
|
||||
<script src="{{ site.cdn.js }}"></script>
|
||||
{% endhighlight %}
|
||||
|
||||
Be sure to have your pages set up with the latest design and development standards. That means:
|
||||
|
||||
* Using an HTML5 doctype
|
||||
* Forcing Internet Explorer to use it's latest rendering mode ([read more]())
|
||||
* And, utilizing the viewport meta tag.
|
||||
|
||||
Put it all together and your pages should look like this:
|
||||
|
||||
{% highlight html %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="stylesheet" href="{{ site.cdn.css }}">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello, world!</h1>
|
||||
|
||||
<script src="{{ site.cdn.jquery }}"></script>
|
||||
<script src="{{ site.cdn.js }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
{% endhighlight %}
|
||||
|
||||
And that's it. Happy Bootstrapping!
|
||||
|
||||
|
||||
|
||||
<a id="download"></a>
|
||||
|
||||
# Download
|
||||
|
||||
Bootstrap is available for download via ZIP file in two flavors: precompiled CSS and Javascript, and the complete source code with documentation.
|
||||
|
||||
<a id="download-precompiled"></a>
|
||||
|
||||
### Precompiled
|
||||
|
||||
Compiled and minified CSS and JavaScript. No docs or original source files are included.
|
||||
|
||||
<a href="{{ site.download.dist }}" class="btn btn-lg btn-outline" role="button" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download compiled');">Download Bootstrap</a>
|
||||
|
||||
<a id="download-source"></a>
|
||||
|
||||
### Source code and docs
|
||||
|
||||
Source Less, JavaScript, and documentation. **Requires a Less compiler and [some setup](#grunt).**
|
||||
|
||||
<a href="{{ site.download.source }}" class="btn btn-lg btn-outline" role="button" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download source');">Download source</a>
|
||||
|
||||
<a id="download-bower"></a>
|
||||
|
||||
### Bower
|
||||
|
||||
Install and manage Bootstrap's Less, CSS, and JavaScript using [Bower](http://bower.io).
|
||||
|
||||
{% highlight bash %}$ bower install bootstrap{% endhighlight %}
|
||||
|
||||
|
||||
<a id="download-npm"></a>
|
||||
|
||||
### npm
|
||||
|
||||
Bootstrap is available as [an npm package](https://www.npmjs.org/package/bootstrap). Install it into your Node powered apps with:
|
||||
|
||||
{% highlight bash %}$ npm install bootstrap{% endhighlight %}
|
@@ -1,32 +0,0 @@
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="grunt" class="page-header">Compiling CSS and JavaScript</h1>
|
||||
|
||||
<p class="lead">Bootstrap uses <a href="http://gruntjs.com">Grunt</a> for its build system, with convenient methods for working with the framework. It's how we compile our code, run tests, and more.</p>
|
||||
|
||||
<h2 id="grunt-installing">Installing Grunt</h2>
|
||||
<p>To install Grunt, you must <strong>first <a href="http://nodejs.org/download/">download and install node.js</a></strong> (which includes npm). npm stands for <a href="http://npmjs.org/">node packaged modules</a> and is a way to manage development dependencies through node.js.</p>
|
||||
|
||||
Then, from the command line:
|
||||
<ol>
|
||||
<li>Install <code>grunt-cli</code> globally with <code>npm install -g grunt-cli</code>.</li>
|
||||
<li>Navigate to the root <code>/bootstrap/</code> directory, then run <code>npm install</code>. npm will look at the <a href="https://github.com/twbs/bootstrap/blob/master/package.json"><code>package.json</code></a> file and automatically install the necessary local dependencies listed there.</li>
|
||||
</ol>
|
||||
|
||||
<p>When completed, you'll be able to run the various Grunt commands provided from the command line.</p>
|
||||
|
||||
<h2 id="grunt-commands">Available Grunt commands</h2>
|
||||
<h3><code>grunt dist</code> (Just compile CSS and JavaScript)</h3>
|
||||
<p>Regenerates the <code>/dist/</code> directory with compiled and minified CSS and JavaScript files. As a Bootstrap user, this is normally the command you want.</p>
|
||||
|
||||
<h3><code>grunt watch</code> (Watch)</h3>
|
||||
<p>Watches the Less source files and automatically recompiles them to CSS whenever you save a change.</p>
|
||||
|
||||
<h3><code>grunt test</code> (Run tests)</h3>
|
||||
<p>Runs <a href="http://jshint.com">JSHint</a> and runs the <a href="http://qunitjs.com">QUnit</a> tests headlessly in <a href="http://phantomjs.org">PhantomJS</a>.</p>
|
||||
|
||||
<h3><code>grunt</code> (Build absolutely everything and run tests)</h3>
|
||||
<p>Compiles and minifies CSS and JavaScript, builds the documentation website, runs the HTML5 validator against the docs, regenerates the Customizer assets, and more. Usually only necessary if you're hacking on Bootstrap itself.</p>
|
||||
|
||||
<h2 id="grunt-troubleshooting">Troubleshooting</h2>
|
||||
<p>Should you encounter problems with installing dependencies or running Grunt commands, first delete the <code>/node_modules/</code> directory generated by npm. Then, rerun <code>npm install</code>.</p>
|
||||
</div>
|
@@ -1,42 +0,0 @@
|
||||
<div class="bs-docs-section">
|
||||
<h1 id="whats-included" class="page-header">What's included</h1>
|
||||
|
||||
<p class="lead">Bootstrap is downloadable in two forms, within which you'll find the following directories and files, logically grouping common resources and providing both compiled and minified variations.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-warning" id="jquery-required">
|
||||
<h4>jQuery required</h4>
|
||||
<p>Please note that <strong>all JavaScript plugins require jQuery</strong> to be included, as shown in the <a href="#template">starter template</a>. <a href="{{ site.repo }}/blob/v{{ site.current_version }}/bower.json">Consult our <code>bower.json</code></a> to see which versions of jQuery are supported.</p>
|
||||
</div>
|
||||
|
||||
<h2 id="whats-included-precompiled">Precompiled Bootstrap</h2>
|
||||
<p>Once downloaded, unzip the compressed folder to see the structure of (the compiled) Bootstrap. You'll see something like this:</p>
|
||||
<!-- NOTE: This info is intentionally duplicated in the README.
|
||||
Copy any changes made here over to the README too. -->
|
||||
{% highlight bash %}
|
||||
bootstrap/
|
||||
├── css/
|
||||
│ ├── bootstrap.css
|
||||
│ ├── bootstrap.min.css
|
||||
│ ├── bootstrap-theme.css
|
||||
│ └── bootstrap-theme.min.css
|
||||
└── js/
|
||||
├── bootstrap.js
|
||||
└── bootstrap.min.js
|
||||
{% endhighlight %}
|
||||
|
||||
<p>This is the most basic form of Bootstrap: precompiled files for quick drop-in usage in nearly any web project. We provide compiled CSS and JS (<code>bootstrap.*</code>), as well as compiled and minified CSS and JS (<code>bootstrap.min.*</code>). Also included is the optional Bootstrap theme.</p>
|
||||
|
||||
<h2 id="whats-included-source">Bootstrap source code</h2>
|
||||
<p>The Bootstrap source code download includes the precompiled CSS and JavaScript assets, along with source Less, JavaScript, and documentation. More specifically, it includes the following and more:</p>
|
||||
{% highlight bash %}
|
||||
bootstrap/
|
||||
├── less/
|
||||
├── js/
|
||||
├── dist/
|
||||
│ ├── css/
|
||||
│ └── js/
|
||||
└── docs/
|
||||
└── examples/
|
||||
{% endhighlight %}
|
||||
<p>The <code>less/</code> and <code>js/</code> are the source code for our CSS and JavaScript. The <code>dist/</code> folder includes everything listed in the precompiled download section above. The <code>docs/</code> folder includes the source code for our documentation, and <code>examples/</code> of Bootstrap usage. Beyond that, any other included file provides support for packages, license information, and development.</p>
|
||||
</div>
|
Reference in New Issue
Block a user