diff --git a/docs/_includes/docs-nav.html b/docs/_includes/docs-nav.html new file mode 100644 index 0000000000..92674c4454 --- /dev/null +++ b/docs/_includes/docs-nav.html @@ -0,0 +1,55 @@ +
+ +
diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 11b78f3f92..8015c1587c 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -7,6 +7,9 @@ + + {% include docs-nav.html %} + {{ content }} diff --git a/docs/assets/css/docs.css b/docs/assets/css/docs.css index 9db62f2b6b..d5de257356 100644 --- a/docs/assets/css/docs.css +++ b/docs/assets/css/docs.css @@ -34,7 +34,9 @@ body { -------------------------------------------------- */ /* Padding for in-page bookmarks */ -section { +section, +.bs-docs-section { + padding-top: 30px; } /* Few stylistic typography tweaks */ @@ -52,10 +54,7 @@ section > ul li { -------------------------------------------------- */ .bs-docs-section-header { - margin: 60px 0; -} -.bs-docs-section-header h1, -.bs-docs-section-header .lead { + padding-top: 60px; color: #8a8a8a; } .bs-docs-section-header h1 { @@ -205,11 +204,12 @@ section > ul li { .bs-docs-sidenav > .active:focus > a { font-weight: 500; color: #428bca; + background-color: transparent; border-right: 1px solid #428bca; } .bs-docs-sidenav-heading { - margin: 0; + margin: 0 0 25px; } .bs-docs-sidenav-heading a { display: block; @@ -223,17 +223,22 @@ section > ul li { text-decoration: none; } -.bs-docs-sidenav .nav-header { - padding: 25px 20px 5px; +/* Section headings for groups of links */ +.bs-docs-sidenav > li > .nav-header { + margin-top: 20px; + margin-bottom: 5px; font-size: 14px; font-weight: 500; color: #333; } -.bs-docs-sidenav > li + .nav-header { - margin-top: 0; +.bs-docs-sidenav > .active > .nav-header, +.bs-docs-sidenav > .active > .nav-header:hover { + color: #333; + border-color: #333; } + /* Bootstrap code examples -------------------------------------------------- */ @@ -638,7 +643,6 @@ input.focused { /* Account for fixed navbar (which is static to start) */ .bs-docs-docs { padding-left: 260px; - padding-right: 20px; } /* Undo custom padding */ @@ -677,6 +681,10 @@ input.focused { /* Tablets/desktops and up */ @media screen and (min-width: 992px) { + .bs-docs-docs { + padding-left: 280px; + } + /* Icons */ .the-icons li { width: 12.5%; @@ -686,5 +694,8 @@ input.focused { /* Large desktops and up */ @media screen and (min-width: 1200px) { + .bs-docs-docs { + padding-left: 300px; + } } diff --git a/docs/docs.html b/docs/docs.html index eb5e1dac7b..10ce912898 100644 --- a/docs/docs.html +++ b/docs/docs.html @@ -4,109 +4,49 @@ title: Getting started description: Overview of the project, its contents, and how to get started with a simple template. --- -
- -
- -
- - - - - -
-

Getting started

-

Overview of the project, its contents, and how to get started with a simple template.

+ +
+

Welcome

+

Welcome to the Bootstrap documentation, the living, interactive style and code guide for all things Bootstrap. If you're new here, continue reading to learn how to get started. Otherwise, carry on you beautiful person you.

- -
+
-

Before downloading, be sure to have a code editor (we recommend Sublime Text 2) 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.

- +

There are three easy ways to quickly get started with Bootstrap, each one appealing to a different skill level and use case. Read through to see what suits your particular needs.

-

Compiled

-

Fastest way to get started: get the compiled and minified versions of our CSS, JS, and images. No docs or original source files.

+

Compiled CSS and JS

+

The fastest way to get started: get the compiled and minified versions of our CSS, JavaScript, and fonts. No documentation or original source files are included.

Download Bootstrap

-

Source

+

Project source code

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.

Download Bootstrap source

Bower

Install and manage the original files for all CSS and JavaScript, along with a local copy of the docs, using Bower.

- {% highlight bash %}bower install bootstrap{% endhighlight %} + {% highlight bash %}$ bower install bootstrap{% endhighlight %}
-
- +
-
+
-

Within the download you'll find the following file structure and contents, logically grouping common assets and providing both compiled and minified variations.

+

Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations.

Once downloaded, unzip the compressed folder to see the structure of (the compiled) Bootstrap. You'll see something like this:

{% highlight bash %} @@ -127,52 +67,17 @@ description: Overview of the project, its contents, and how to get started with

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 (bootstrap.*), as well as compiled and minified CSS and JS (bootstrap.min.*). The image files are compressed using ImageOptim, a Mac app for compressing PNGs.

Please note that all JavaScript plugins require jQuery to be included.

-
+
- -
+
-

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 Bootstrap documentation.

- -

Docs sections

-

In addition to the getting started documentation you're reading now, the Bootstrap docs are broken into a few key pages.

- -

Core CSS

-

Global styles for the body, Normalize, links, grid system, tables, forms, buttons, icons, and more.

-

Components

-

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.

-

JavaScript plugins

-

Similar to Components, these JavaScript plugins are interactive components for things like tooltips, popovers, modals, and more.

-
- - -
- -

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 File structure.

-

Now, here's a look at a typical HTML file:

- -{% highlight html linenos %} - - - - Bootstrap 101 Template - - - -

Hello, world!

- - - -{% endhighlight %} - -

To make this a Bootstrapped template, just include the appropriate CSS and JS files:

+

Make use of a super basic HTML template, or dive into a few examples we've started for you. We encourage folks to iterate on these examples and not simply use them as an end result.

+

HTML template

{% highlight html linenos %} @@ -186,30 +91,14 @@ description: Overview of the project, its contents, and how to get started with

Hello, world!

+ + + {% endhighlight %} -

And you're set! With those two files added, you can begin to develop any site or application with Bootstrap.

- -
- -

Responsive features in IE8

-

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 Respond.js.

-
-<!--[if lt IE 9]>
-  <script src="/assets/js/respond/respond.js"></script>
-<![endif]-->
-
-
- - -
- -

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.

+

Examples

-
-
+ -
+

CSS

Fundamental HTML elements styled and enhanced with extensible classes.

- -
- -

Get the lowdown on the key pieces of Bootstrap's infrastructure, including our approach to better, faster, stronger web development.

+ +
+ +

Get the lowdown on the key pieces of Bootstrap's infrastructure, including our approach to better, faster, stronger web development.

-

Requires HTML5 doctype

-

Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Include it at the beginning of all your projects.

+

HTML5 doctype required

+

Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Include it at the beginning of all your projects.

{% highlight html linenos %} @@ -327,34 +215,31 @@ description: Overview of the project, its contents, and how to get started with {% endhighlight %} -

Mobile first

-

With Bootstrap 2, we added optional mobile friendly styles for key aspects of the framework. With Bootstrap 3, we've rewritten the project to be mobile friendly from the start. Instead of adding on optional mobile styles, they're baked right into the core. In fact, Bootstrap is mobile first. Mobile first styles can be found throughout the entire library instead of in separate files.

-

To ensure proper rendering and touch zooming, add the viewport meta tag to your <head>.

+

Mobile first

+

With Bootstrap 2, we added optional mobile friendly styles for key aspects of the framework. With Bootstrap 3, we've rewritten the project to be mobile friendly from the start. Instead of adding on optional mobile styles, they're baked right into the core. In fact, Bootstrap is mobile first. Mobile first styles can be found throughout the entire library instead of in separate files.

+

To ensure proper rendering and touch zooming, add the viewport meta tag to your <head>.

{% highlight html linenos %} {% endhighlight %} -

Typography and links

-

Bootstrap sets basic global display, typography, and link styles. Specifically, we:

-
    -
  • Remove margin on the body
  • -
  • Set background-color: white; on the body
  • -
  • Use the @font-family-base, @font-size-base, and @line-height-base attributes as our typographic base
  • -
  • Set the global link color via @link-color and apply link underlines only on :hover
  • -
-

These styles can be found within scaffolding.less.

- -

Normalize reset

-

For improved cross-browser rendering, we use Normalize, a project by Nicolas Gallagher and Jonathan Neal.

- -
- +

Typography and links

+

Bootstrap sets basic global display, typography, and link styles. Specifically, we:

+ +

These styles can be found within scaffolding.less.

+

Normalize reset

+

For improved cross-browser rendering, we use Normalize, a project by Nicolas Gallagher and Jonathan Neal.

+
-
+
@@ -549,14 +434,14 @@ description: Overview of the project, its contents, and how to get started with -
+ -
+
@@ -596,15 +481,6 @@ description: Overview of the project, its contents, and how to get started with
-

Body copy

Bootstrap's global default font-size is 14px, with a line-height of 20px. This is applied to the <body> and all paragraphs. In addition, <p> (paragraphs) receive a bottom margin of half their line-height (10px by default).

@@ -936,7 +812,7 @@ description: Overview of the project, its contents, and how to get started with

Horizontal description lists will truncate terms that are too long to fit in the left column fix text-overflow. In narrower viewports, they will change to the default stacked layout.

-
+ @@ -944,7 +820,7 @@ description: Overview of the project, its contents, and how to get started with -
+
@@ -968,13 +844,13 @@ For example, <section> should be wrapped as inline. {% endhighlight %}

You may optionally add the .pre-scrollable class which will set a max-height of 350px and provide a y-axis scrollbar.

-
+ -
+
@@ -1365,13 +1241,13 @@ For example, <section> should be wrapped as inline. {% endhighlight %} -
+ -
+
@@ -2107,13 +1983,13 @@ For example, <section> should be wrapped as inline. A longer block of help text that breaks onto a new line and may extend beyond one line. {% endhighlight %} -
+ -
+
@@ -2253,13 +2129,13 @@ For example, <section> should be wrapped as inline. {% endhighlight %}

As a best practice, we highly recommend matching using the <button< element whenever possible to ensure matching cross-browser rendering.

-
+ -
+
@@ -2276,10 +2152,17 @@ For example, <section> should be wrapped as inline. {% endhighlight %} -
+ + + +
+

Components

+
+ +
@@ -4067,7 +3950,7 @@ For example, <section> should be wrapped as inline. -
+
@@ -4626,12 +4509,16 @@ For example, <section> should be wrapped as inline. +
+

JavaScript plugins

+
+ -
+

Individual or compiled