0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-13 01:08:58 +01:00
Bootstrap/docs/templates/pages/getting-started.mustache

245 lines
12 KiB
Plaintext
Raw Normal View History

<!-- Subhead
================================================== -->
<header class="bs-docs-jumbotron subhead">
<div class="container">
<h1>Getting started</h1>
<p class="lead">Overview of the project, its contents, and how to get started with a simple template.</p>
</div>
</header>
<div class="container">
<!-- Docs nav
================================================== -->
<div class="row">
<div class="span3 bs-docs-sidebar">
2012-08-19 21:04:41 +02:00
<ul class="nav nav-list bs-docs-sidenav">
<li><a href="#download-bootstrap"><i class="glyphicon-chevron-right"></i> Download</a></li>
<li><a href="#file-structure"><i class="glyphicon-chevron-right"></i> File structure</a></li>
<li><a href="#contents"><i class="glyphicon-chevron-right"></i> What's included</a></li>
<li><a href="#html-template"><i class="glyphicon-chevron-right"></i> HTML template</a></li>
<li><a href="#examples"><i class="glyphicon-chevron-right"></i> Examples</a></li>
<li><a href="#what-next"><i class="glyphicon-chevron-right"></i> What next?</a></li>
</ul>
</div>
<div class="span9">
<!-- Download
================================================== -->
<section id="download-bootstrap">
<div class="page-header">
<h1>1. Download</h1>
</div>
<p class="lead">Before downloading, be sure to have a code editor (we recommend <a href="http://sublimetext.com/2">Sublime Text 2</a>) and some working knowledge of HTML and CSS. We won't walk through the source files here, but they are available for download. We'll focus on getting started with the compiled Bootstrap files.</p>
<div class="row">
2012-08-19 21:04:41 +02:00
<div class="span6">
<h2>Download compiled</h2>
<p><strong>Fastest way to get started:</strong> get the compiled and minified versions of our CSS, JS, and images. No docs or original source files.</p>
<p><a class="btn btn-large btn-primary" href="assets/bootstrap.zip" {{#production}}onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download compiled']);"{{/production}}>Download Bootstrap</a></p>
</div>
2012-08-19 21:04:41 +02:00
<div class="span6">
2012-07-27 06:45:19 +02:00
<h2>Download source</h2>
2012-08-22 18:51:41 +02:00
<p>Get the original files for all CSS and JavaScript, along with a local copy of the docs by downloading the latest version directly from GitHub.</p>
<p><a class="btn btn-large" href="https://github.com/twitter/bootstrap/zipball/master" {{#production}}onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download source']);"{{/production}}>Download Bootstrap source</a></p>
</div>
</div>
</section>
<!-- File structure
================================================== -->
<section id="file-structure">
<div class="page-header">
<h1>2. File structure</h1>
</div>
<p class="lead">Within the download you'll find the following file structure and contents, logically grouping common assets and providing both compiled and minified variations.</p>
<p>Once downloaded, unzip the compressed folder to see the structure of (the compiled) Bootstrap. You'll see something like this:</p>
2012-09-14 19:30:55 +02:00
<pre class="prettyprint">
bootstrap/
├── css/
│ ├── bootstrap.css
│ ├── bootstrap.min.css
├── js/
│ ├── bootstrap.js
│ ├── bootstrap.min.js
└── fonts/
├── glyphiconshalflings-regular.eot
├── glyphiconshalflings-regular.otf
├── glyphiconshalflings-regular.svg
├── glyphiconshalflings-regular.ttf
└── glyphiconshalflings-regular.woff
</pre>
<p>This is the most basic form of Bootstrap: compiled 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>). The image files are compressed using <a href="http://imageoptim.com/">ImageOptim</a>, a Mac app for compressing PNGs.</p>
<p>Please note that <strong>all JavaScript plugins require jQuery</strong> to be included.</p>
</section>
<!-- Contents
================================================== -->
<section id="contents">
<div class="page-header">
<h1>3. What's included</h1>
</div>
<p class="lead">Bootstrap comes equipped with HTML, CSS, and JS for all sorts of things, but they can be summarized with a handful of categories visible at the top of the <a href="http://getbootstrap.com">Bootstrap documentation</a>.</p>
<h2>Docs sections</h2>
<p>In addition to the getting started documentation you're reading now, the Bootstrap docs are broken into a few key pages.</p>
<h4><a href="http://twitter.github.com/bootstrap/css.html">Core CSS</a></h4>
<p>Global styles for the body, Normalize, links, grid system, tables, forms, buttons, icons, and more.</p>
<h4><a href="http://twitter.github.com/bootstrap/components.html">Components</a></h4>
<p>Basic styles for common interface components like tabs and pills, navbar, alerts, page headers, and more. Head here to see what kind of custom components Bootstrap has to offer beyond basic HTML elements.</p>
<h4><a href="http://twitter.github.com/bootstrap/javascript.html">JavaScript plugins</a></h4>
<p>Similar to Components, these JavaScript plugins are interactive components for things like tooltips, popovers, modals, and more.</p>
</section>
<!-- HTML template
================================================== -->
<section id="html-template">
<div class="page-header">
<h1>4. Basic HTML template</h1>
</div>
Merge branch '2.3.0-wip' into 3.0.0-wip Conflicts: Makefile README.md component.json docs/assets/css/bootstrap-responsive.css docs/assets/css/bootstrap.css docs/assets/js/bootstrap-affix.js docs/assets/js/bootstrap-alert.js docs/assets/js/bootstrap-button.js docs/assets/js/bootstrap-carousel.js docs/assets/js/bootstrap-collapse.js docs/assets/js/bootstrap-dropdown.js docs/assets/js/bootstrap-modal.js docs/assets/js/bootstrap-popover.js docs/assets/js/bootstrap-scrollspy.js docs/assets/js/bootstrap-tab.js docs/assets/js/bootstrap-tooltip.js docs/assets/js/bootstrap-transition.js docs/assets/js/bootstrap-typeahead.js docs/assets/js/bootstrap.js docs/components.html docs/css.html docs/examples/fluid.html docs/extend.html docs/getting-started.html docs/index.html docs/templates/pages/base-css.mustache docs/templates/pages/components.mustache docs/templates/pages/extend.mustache docs/templates/pages/getting-started.mustache docs/templates/pages/index.mustache docs/templates/pages/javascript.mustache js/bootstrap-affix.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-tooltip.js js/bootstrap-transition.js js/bootstrap-typeahead.js less/bootstrap.less less/buttons.less less/forms.less less/navbar.less less/popovers.less less/responsive-767px-max.less less/responsive.less less/tables.less less/tooltip.less less/type.less less/variables.less package.json
2013-01-13 13:26:52 +01:00
<p class="lead">With a brief intro into the contents out of the way, we can focus on putting Bootstrap to use. To do that, we'll utilize a basic HTML template that includes everything we mentioned in the <a href="./getting-started.html#file-structure">File structure</a>.</p>
<p>Now, here's a look at a <strong>typical HTML file</strong>:</p>
2012-07-13 09:56:18 +02:00
<pre class="prettyprint linenums">
&lt;!DOCTYPE html&gt;
2012-07-13 09:56:18 +02:00
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Bootstrap 101 Template&lt;/title&gt;
&lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
2012-07-13 09:56:18 +02:00
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Hello, world!&lt;/h1&gt;
&lt;script src="http://code.jquery.com/jquery.js"&gt;&lt;/script&gt;
2012-07-13 09:56:18 +02:00
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>To make this <strong>a Bootstrapped template</strong>, just include the appropriate CSS and JS files:</p>
2012-07-13 09:56:18 +02:00
<pre class="prettyprint linenums">
&lt;!DOCTYPE html&gt;
2012-07-13 09:56:18 +02:00
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Bootstrap 101 Template&lt;/title&gt;
2013-01-31 02:46:18 +01:00
&lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
2012-07-13 09:56:18 +02:00
&lt;!-- Bootstrap --&gt;
&lt;link href="css/bootstrap.min.css" rel="stylesheet" media="screen"&gt;
2012-07-13 09:56:18 +02:00
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Hello, world!&lt;/h1&gt;
&lt;script src="http://code.jquery.com/jquery.js"&gt;&lt;/script&gt;
&lt;script src="js/bootstrap.min.js"&gt;&lt;/script&gt;
2012-07-13 09:56:18 +02:00
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><strong>And you're set!</strong> With those two files added, you can begin to develop any site or application with Bootstrap.</p>
<hr>
<h4>Responsive features in IE8</h4>
<p>Internet Explorer 8 lacks support for media queries, the method by which we deliver responsive CSS to folks. To enable that, you need to include a third party tool (which we include in the project repository) called <a href="https://github.com/scottjehl/Respond">Respond.js</a>.</p>
<pre class="prettyprint linenums">
&lt;!--[if lt IE 9]&gt;
&lt;script src="assets/js/respond/respond.js"&gt;&lt;/script&gt;
&lt;![endif]--&gt;
</pre>
</section>
<!-- Examples
================================================== -->
<section id="examples">
<div class="page-header">
<h1>5. Examples</h1>
</div>
<p class="lead">Move beyond the base template with a few example layouts. We encourage folks to iterate on these examples and not simply use them as an end result.</p>
2013-01-18 00:00:49 +01:00
<div class="row bs-docs-examples">
<div class="span4">
<a class="thumbnail" href="examples/starter-template.html">
<img src="assets/img/examples/bootstrap-example-starter.png" alt="">
</a>
<h4>Starter template</h4>
<p>A barebones HTML document with all the Bootstrap CSS and JavaScript included.</p>
</div>
<div class="span4">
2013-01-18 05:32:07 +01:00
<a class="thumbnail" href="examples/jumbotron.html">
<img src="assets/img/examples/bootstrap-example-marketing.png" alt="">
</a>
<h4>Basic marketing site</h4>
<p>Featuring a hero unit for a primary message and three supporting elements.</p>
2012-09-26 08:01:18 +02:00
</div>
<div class="span4">
<a class="thumbnail" href="examples/marketing-narrow.html">
<img src="assets/img/examples/bootstrap-example-marketing-narrow.png" alt="">
</a>
<h4>Narrow marketing</h4>
<p>Slim, lightweight marketing template for small projects or teams.</p>
2012-09-26 08:01:18 +02:00
</div>
Merge branch '2.3.0-wip' into 3.0.0-wip Conflicts: Makefile README.md component.json docs/assets/css/bootstrap-responsive.css docs/assets/css/bootstrap.css docs/assets/js/bootstrap-affix.js docs/assets/js/bootstrap-alert.js docs/assets/js/bootstrap-button.js docs/assets/js/bootstrap-carousel.js docs/assets/js/bootstrap-collapse.js docs/assets/js/bootstrap-dropdown.js docs/assets/js/bootstrap-modal.js docs/assets/js/bootstrap-popover.js docs/assets/js/bootstrap-scrollspy.js docs/assets/js/bootstrap-tab.js docs/assets/js/bootstrap-tooltip.js docs/assets/js/bootstrap-transition.js docs/assets/js/bootstrap-typeahead.js docs/assets/js/bootstrap.js docs/components.html docs/css.html docs/examples/fluid.html docs/extend.html docs/getting-started.html docs/index.html docs/templates/pages/base-css.mustache docs/templates/pages/components.mustache docs/templates/pages/extend.mustache docs/templates/pages/getting-started.mustache docs/templates/pages/index.mustache docs/templates/pages/javascript.mustache js/bootstrap-affix.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-tooltip.js js/bootstrap-transition.js js/bootstrap-typeahead.js less/bootstrap.less less/buttons.less less/forms.less less/navbar.less less/popovers.less less/responsive-767px-max.less less/responsive.less less/tables.less less/tooltip.less less/type.less less/variables.less package.json
2013-01-13 13:26:52 +01:00
<div class="span4">
<a class="thumbnail" href="examples/justified-nav.html">
<img src="assets/img/examples/bootstrap-example-justified-nav.png" alt="">
</a>
<h4>{{_i}}Justified nav{{/i}}</h4>
<p>{{_i}}Marketing page with equal-width navigation links in a modified navbar.{{/i}}</p>
Merge branch '2.3.0-wip' into 3.0.0-wip Conflicts: Makefile README.md component.json docs/assets/css/bootstrap-responsive.css docs/assets/css/bootstrap.css docs/assets/js/bootstrap-affix.js docs/assets/js/bootstrap-alert.js docs/assets/js/bootstrap-button.js docs/assets/js/bootstrap-carousel.js docs/assets/js/bootstrap-collapse.js docs/assets/js/bootstrap-dropdown.js docs/assets/js/bootstrap-modal.js docs/assets/js/bootstrap-popover.js docs/assets/js/bootstrap-scrollspy.js docs/assets/js/bootstrap-tab.js docs/assets/js/bootstrap-tooltip.js docs/assets/js/bootstrap-transition.js docs/assets/js/bootstrap-typeahead.js docs/assets/js/bootstrap.js docs/components.html docs/css.html docs/examples/fluid.html docs/extend.html docs/getting-started.html docs/index.html docs/templates/pages/base-css.mustache docs/templates/pages/components.mustache docs/templates/pages/extend.mustache docs/templates/pages/getting-started.mustache docs/templates/pages/index.mustache docs/templates/pages/javascript.mustache js/bootstrap-affix.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-tooltip.js js/bootstrap-transition.js js/bootstrap-typeahead.js less/bootstrap.less less/buttons.less less/forms.less less/navbar.less less/popovers.less less/responsive-767px-max.less less/responsive.less less/tables.less less/tooltip.less less/type.less less/variables.less package.json
2013-01-13 13:26:52 +01:00
</div>
<div class="span4">
<a class="thumbnail" href="examples/signin.html">
<img src="assets/img/examples/bootstrap-example-signin.png" alt="">
</a>
<h4>Sign in</h4>
<p>Barebones sign in form with custom, larger form controls and a flexible layout.</p>
2012-09-26 08:01:18 +02:00
</div>
<div class="span4">
<a class="thumbnail" href="examples/sticky-footer.html">
<img src="assets/img/examples/bootstrap-example-sticky-footer.png" alt="">
</a>
<h4>Sticky footer</h4>
<p>Pin a fixed-height footer to the bottom of the user's viewport.</p>
</div>
<div class="span4">
<a class="thumbnail" href="examples/sticky-footer.html">
<img src="assets/img/examples/bootstrap-example-sticky-footer.png" alt="">
</a>
<h4>Sticky footer w/ navbar</h4>
<p>Add a fixed navbar to the default sticky footer template.</p>
</div>
<div class="span4">
<a class="thumbnail" href="examples/carousel.html">
<img src="assets/img/examples/bootstrap-example-carousel.png" alt="">
</a>
<h4>Carousel jumbotron</h4>
<p>An interactive riff on the basic marketing site featuring a prominent carousel.</p>
2012-09-26 08:01:18 +02:00
</div>
</div>
</section>
<!-- Next
================================================== -->
<section id="what-next">
<div class="page-header">
<h1>What next?</h1>
</div>
<p class="lead">Head to the docs for information, examples, and code snippets, or take the next leap and customize Bootstrap for any upcoming project.</p>
<a class="btn btn-large btn-primary" href="./css.html" {{#production}}onclick="_gaq.push(['_trackEvent', 'Getting started', 'Next steps', 'Visit docs']);"{{/production}}>Visit the Bootstrap docs</a>
<a class="btn btn-large" href="./customize.html" style="margin-left: 5px;" {{#production}}onclick="_gaq.push(['_trackEvent', 'Getting started', 'Next steps', 'Customize']);"{{/production}}>Customize Bootstrap</a>
</section>
</div>{{! /span9 }}
</div>{{! row}}
</div>{{! /.container }}