Commit 4993ab6e authored by Mark Otto's avatar Mark Otto
Browse files

start markdowning getting started and moving things to separate pages

parent 57c709be
main cleanup-floating-forms cssvar-function dependabot/npm_and_yarn/stylelint-and-stylelint-config-twbs-bootstrap-15.3.0 extend-snippets feat/data-target floating-always-visible floating-labels-icons fod-main-banner form-controls-with-icons github/fork/719media/patch-13 github/fork/719media/patch-14 github/fork/719media/patch-9 github/fork/ChellyAhmed/fix-typo-reboot.md github/fork/ChellyAhmed/offcanvas-scroll-back github/fork/CtrlAltLilith/main github/fork/Elysiome/offcanvas-optional-window-resizing github/fork/JanSargsyan/main github/fork/LunicLynx/support-different-line-height-for-buttons github/fork/Psixodelik/main github/fork/Ronid1/ronid1/offcanvas_static_backdrop github/fork/RyanBerliner/tooltip-accessibility github/fork/SantiagoPVazquez/Feature-default-border-bottom-to-dropdown-item github/fork/Sir-Genius/utils github/fork/Sumit-Singh-8/main github/fork/Viktor-VERA2020/offcanvas-slide github/fork/Zivangu9/input-group-for-form-control-plaintext github/fork/alpadev/alpadev/call-dispose-on-component-reinstantiation github/fork/astagi/fix/tree-shake-modules github/fork/compnerd/dark-accordion-icon github/fork/derSascha/dropdown-dont-close-on-input-click github/fork/dev-ph1l/main github/fork/donquixote/issue-33861-utl-mixin github/fork/florianlacreuse/mixin-make-row-gutter-y github/fork/gregorw/main github/fork/iteggmbh/transitionend-dispose-race github/fork/jdelStrother/patch-1 github/fork/jonnysp/form-floating github/fork/jonnysp/independent-offcanvas github/fork/jonnysp/theme-dark-on-card-and-modal-fix github/fork/josefdlange/floating-label-placeholder-opacity github/fork/julien-deramond/enhance-change-version.js github/fork/julien-deramond/main-jd-fix-offset-content github/fork/julien-deramond/main-jd-issue-with-utitlies github/fork/julien-deramond/main-xmr-pa11y-ci-jd-add-hideElements github/fork/kyletsang/fix-tooltip-padding github/fork/lacutah/CheckboxCenteringDocumentation github/fork/lekoala/patch-3 github/fork/louismaximepiton/main-kld-lmp-collapse-proposal github/fork/louismaximepiton/main-lmp-card-inner-border-radius-fix github/fork/louismaximepiton/main-lmp-carousel-multiple-images github/fork/louismaximepiton/main-lmp-css-var-init github/fork/louismaximepiton/main-lmp-disabled-floating-label-fix github/fork/louismaximepiton/main-lmp-input-range-fix github/fork/louismaximepiton/main-lmp-shift-color github/fork/louismaximepiton/main-lmp-table-active-tr-fix github/fork/maciek-szn/switch github/fork/michael-roth/feature/19964-multiple-tab-targets github/fork/mistic100/dom-utils github/fork/nkdas91/accordion github/fork/nstungcom/fix-missing-modal-open-class github/fork/oraliahdz/animation-utilities github/fork/pine3ree/patch-7 github/fork/pouwerkerk/unindent-scss-docs-shortcode github/fork/smares/smares-no-scolling-on-modal-close github/fork/tgm-git/patch-1 gs-forms gs-toasts-with-animated-progress-bar gs/add-history-helper gs/change-version-dir-on-docs gs/data-must-set-onlu-one-instance gs/docs/fix-drop-down-error gs/event-handler-2 gs/make-docs-js-build gs/make-simple-attribute-toggler gs/popover-fix-doc gs/provide-steConfig-method gs/scrollspy-smoothscroll-option-use-browser-history gs/streamline-jqueryInterface gs/support-drop-down-in-navbar gs/test-js-generic-trigger gs/try-web-components gs/tweak-collapse-js-selector gs/use-event-handler-in-cocmponent gs/use-rollup-replace-for-version jo-docs-thanks-page jo-ssr-friendly logical-props-spacing-utils main-fod-disabled-form-check-label main-fod-nested-accordion main-fod-simpler-table-structure main-fod-table-separator main-fod-utilities-contrast main-jd-abbr-title main-jd-add-chips main-jd-add-doc-for-sass-custom-colors main-jd-add-enable-host-to-handle-web-components main-jd-browserstack-fine-tune main-jd-browserstack-updates main-jd-docs-consistent-usage-of-css-sections-step-2 main-jd-fix-docs-headers-in-white main-jd-fix-highlight-docs-border-radius main-jd-fix-placeholder-color-background-params-for-img-markup main-jd-glossary-experiment main-jd-postcss-drop-empty-css-vars main-jd-proto-doc-astro main-jd-skip-navigation-component main-jd-stackblitz-for-examples main-jd-upgrade-browserlistrc main-jd-use-host main-lmp-dark-theme-customization main-lmp-handle-scroll-target main-lmp-tab-fix main-mc-opensearch main-xmr-bundlewatch-action main-xmr-eslint-plugin-compat main-xmr-hugo-docs-vendor main-xmr-hugo-rm-ver main-xmr-linkinator-prod main-xmr-min-mangle main-xmr-pa11y-ci more-darkmode-examples nested-dropdowns patrickhlauke-issue37428 patrickhlauke-use-of-color-tweaks pr/34102 pr/37590 previous-next-docs-links sticky-thead utilities-functions-mixin v4-dev v4-dev-dropdown-hide-method v530-dev v6-postcss-custom-media v6-spinner-dots v6/gs/use-floating-ui-in-place-of-popper xmr/dev xmr/docs-png xmr/docs-svgs xmr/hugo-reorg-files xmr/js-2 xmr/markdownlint xmr/prepare-530-alpha2 xmr/xo v5.3.0-alpha1 v5.2.3 v5.2.2 v5.2.1 v5.2.0 v5.2.0-beta1 v5.1.3 v5.1.2 v5.1.1 v5.1.0 v5.0.2 v5.0.1 v5.0.0 v5.0.0-beta3 v5.0.0-beta2 v5.0.0-beta1 v5.0.0-alpha3 v5.0.0-alpha2 v5.0.0-alpha1 v4.6.2 v4.6.1 v4.6.0 v4.5.3 v4.5.2 v4.5.1 v4.5.0 v4.4.1 v4.4.0 v4.3.1 v4.3.0 v4.2.1 v4.2.0 v4.1.3 v4.1.2 v4.1.1 v4.1.0 v4.0.0 v4.0.0-beta.3 v4.0.0-beta.2 v4.0.0-beta v4.0.0-alpha.6 v4.0.0-alpha.5 v4.0.0-alpha.4 v4.0.0-alpha.3 v4.0.0-alpha.2 v4.0.0-alpha
48 merge requests!28721Hot test,!27561Adds font-weight-medium to font weight classes,!26437merge,!26197V4 dev xmr,!20778V4 dev,!20539Allow multiple modals,!18047#17986,!18988Blockquote border width,!20854Fixes 15534,!19272V4 dev xmr grunt html,!17218Issue 17066,!19581V4 fix popover,!18283Tether docs fix,!17229Include documentation for .navbar-static-top,!20493V4 dev display,!20636Fix docs for heading sizes,!19824blockquote-center,!22547Finished a new translation for bootstrap,!19534Docs 17264,!19533Npm deps,!22143Fix selectable disabled toggle radio buttons,!19084V4 rhythm,!18085Ie9 click comment,!22598test,!18829Add prefix to carousel classes,!18581Check getting started files for broken links - Issue 18568,!18067replace grunt-autoprefixer with gruntpostcss + autoprefixer,!20099V4.0.0 alpha.3,!20438V4 grid classes,!17307Vertical alignment on Bootstrap columns with equal height,!18477add utility color-contrast function,!18864Feature/navbar toggler support color schemes,!19602V4 palettes arun,!18311V4 dev xmr,!19448New pull request for testing,!19358XXL grid size,!19825.blockquote-center,!17508Fix usage of “its” and “it’s” (v4 docs),!25326Adjust examples,!23995Add back cursor: pointer for .btn-link,!23178Spinner,!19754Issue template,!19753Card img overlay padding,!19747Blockquote border width,!19580ExitStars,!18684Docs: change "Button" to "Go somewhere",!18661Docs: accessibility fix-up of collapsible content navbar, change site-wide main navbar,!17021v4
Showing with 290 additions and 201 deletions
+290 -201
......@@ -2,6 +2,9 @@
markdown: kramdown
highlighter: rouge
kramdown:
auto_ids: true
# Permalinks
permalink: pretty
......
- title: Getting started
pages:
- title: Quick start
- title: Download
sections:
- title: Precompiled
- title: Source
- title: Bower
- title: npm
- title: Contents
- title: Compiling
- title: Browser and device support
- title: Third aprty support
- title: Accessibility
- title: License FAQs
- title: Translations
- title: Examples
- title: Components
pages:
- title: Scaffolding
- title: Grid
sections:
- title: Overview
- title: Typography
sections:
- title: Scale
- title: Body copy
- title: Headings
- title: Images
- title: Code
sections:
- title: Inline code
- title: Preformatted text
- title: Variables
- title: User input
- title: Sample output
- title: Tables
- title: Forms
- title: Buttons
- title: Button groups
# - title: Button dropdowns
- title: Input groups
# - title: Dropdowns
- title: Navigation
- title: Navbar
- title: Breadcrumb
- title: Pagination
- title: Alert
- title: Progress
- title: Media
- title: List
- title: Responsive embed
- title: Helpers
- title: Responsive utilities
sections:
- title: Viewports
- title: Print
- title: Test cases
- title: JavaScript
pages:
- title: Overview
- title: Transititons
- title: Modal
- title: Dropdown
- title: Scrollspy
- title: Tab
- title: Tooltip
- title: Popover
- title: Alert
- title: Button
- title: Collapse
- title: Carousel
- title: Affix
- title: Learn & Extend
pages:
- title: Approach
......@@ -32,19 +32,19 @@
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
{% if site.github %}
<script src="../dist/js/bootstrap.min.js"></script>
<script src="{{ site.baseurl }}dist/js/bootstrap.min.js"></script>
{% else %}
<script src="../dist/js/bootstrap.js"></script>
<script src="{{ site.baseurl }}dist/js/bootstrap.js"></script>
{% endif %}
{% if site.github %}
<script src="../assets/js/docs.min.js"></script>
<script src="{{ site.baseurl }}assets/js/docs.min.js"></script>
{% else %}
<script src="../assets/js/vendor/holder.js"></script>
<script src="../assets/js/vendor/ZeroClipboard.min.js"></script>
<script src="../assets/js/src/application.js"></script>
<script src="{{ site.baseurl }}assets/js/vendor/holder.js"></script>
<script src="{{ site.baseurl }}assets/js/vendor/ZeroClipboard.min.js"></script>
<script src="{{ site.baseurl }}assets/js/src/application.js"></script>
{% endif %}
{% if page.slug == "customize" %}
<script src="../assets/js/customize.min.js"></script>
<script src="{{ site.baseurl }}assets/js/customize.min.js"></script>
{% endif %}
{% comment %}
......
<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>
<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>
......@@ -15,29 +15,29 @@
<!-- Bootstrap core CSS -->
{% if site.github %}
<link href="../dist/css/bootstrap.min.css" rel="stylesheet">
<link href="{{ site.baseurl }}dist/css/bootstrap.min.css" rel="stylesheet">
{% else %}
<link href="../dist/css/bootstrap.css" rel="stylesheet">
<link href="{{ site.baseurl }}dist/css/bootstrap.css" rel="stylesheet">
{% endif %}
{% if page.slug == "css" or page.slug == "components" or page.slug == "js" %}
<!-- Optional Bootstrap Theme -->
{% if site.github %}
<link href="data:text/css;charset=utf-8," data-href="../dist/css/bootstrap-theme.min.css" rel="stylesheet" id="bs-theme-stylesheet">
<link href="data:text/css;charset=utf-8," data-href="{{ site.baseurl }}dist/css/bootstrap-theme.min.css" rel="stylesheet" id="bs-theme-stylesheet">
{% else %}
<link href="data:text/css;charset=utf-8," data-href="../dist/css/bootstrap-theme.css" rel="stylesheet" id="bs-theme-stylesheet">
<link href="data:text/css;charset=utf-8," data-href="{{ site.baseurl }}dist/css/bootstrap-theme.css" rel="stylesheet" id="bs-theme-stylesheet">
{% endif %}
{% endif %}
<!-- Documentation extras -->
<link href="../assets/css/docs.min.css" rel="stylesheet">
<link href="{{ site.baseurl }}assets/css/docs.min.css" rel="stylesheet">
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../assets/js/ie10-viewport-bug-workaround.js"></script>
<script src="../assets/js/ie-emulation-modes-warning.js"></script>
<script src="{{ site.baseurl }}assets/js/ie10-viewport-bug-workaround.js"></script>
<script src="{{ site.baseurl }}assets/js/ie-emulation-modes-warning.js"></script>
<!-- Favicons -->
<link rel="apple-touch-icon-precomposed" href="/apple-touch-icon-precomposed.png">
<link rel="icon" href="/favicon.ico">
<link rel="apple-touch-icon-precomposed" href="{{ site.baseurl }}apple-touch-icon-precomposed.png">
<link rel="icon" href="{{ site.baseurl }}favicon.ico">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
......
......@@ -7,64 +7,55 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="../" class="navbar-brand">
<a href="{{ site.baseurl }}" class="navbar-brand">
Bootstrap
</a>
</div>
<nav class="collapse navbar-collapse bs-sidenav-collapse" role="navigation">
<div class="bs-docs-toc-item{% if page.slug == "getting-started" %} active{% endif %}">
<a class="bs-docs-toc-link" href="../getting-started">Getting started</a>
{% if page.slug == "getting-started" %}
<ul class="nav bs-docs-sidenav">
{% include nav/getting-started.html %}
</ul>
{% endif %}
</div>
{% for group in site.data.nav %}
{% assign link = group.pages | first %}
{% assign slug = group.title | downcase | replace: ' ', '-' || page.title | downcase | replace: ' ', '-' %}
{% assign active = nil %}
<div class="bs-docs-toc-item{% if page.slug == "css" %} active{% endif %}">
<a class="bs-docs-toc-link" href="../css">CSS</a>
{% if page.slug == "css" %}
<ul class="nav bs-docs-sidenav">
{% include nav/css.html %}
</ul>
{% if page.url contains slug %}
{% assign active = 'active' %}
{% endif %}
</div>
<div class="bs-docs-toc-item{% if page.slug == "components" %} active{% endif %}">
<a class="bs-docs-toc-link" href="../components">Components</a>
{% if page.slug == "components" %}
<ul class="nav bs-docs-sidenav">
{% include nav/components.html %}
</ul>
{% endif %}
</div>
<div class="bs-docs-toc-item {{ active }}">
<a class="bs-docs-toc-link" href="{{ site.baseurl }}{{ group.title | downcase | replace: ' ', '-' }}/{{ link.title | downcase | replace: ' ', '-' || page.title | downcase | replace: ' ', '-' }}">
{{ group.title }}
</a>
<div class="bs-docs-toc-item{% if page.slug == "js" %} active{% endif %}">
<a class="bs-docs-toc-link" href="../javascript">JavaScript</a>
{% if page.slug == "js" %}
<ul class="nav bs-docs-sidenav">
{% include nav/javascript.html %}
</ul>
{% endif %}
</div>
<ul class="nav bs-docs-sidenav">
{% for doc in group.pages %}
{% assign slug = doc.title | downcase | replace: ' ', '-' %}
{% assign active = nil %}
<div class="bs-docs-toc-item{% if page.slug == "customize" %} active{% endif %}">
<a class="bs-docs-toc-link" href="../customize">Customize</a>
{% if page.slug == "customize" %}
<ul class="nav bs-docs-sidenav">
{% include nav/customize.html %}
</ul>
{% endif %}
</div>
{% if page.url contains slug %}
{% assign active = 'active' %}
{% endif %}
<div class="bs-docs-toc-item{% if page.slug == "about" %} active{% endif %}">
<a class="bs-docs-toc-link" href="../about">About</a>
{% if page.slug == "js" %}
<ul class="nav bs-docs-sidenav">
{% include nav/about.html %}
</ul>
{% endif %}
</div>
<li class="{{ active }}">
<a href="{{ site.baseurl }}{{ group.title | downcase | replace: ' ', '-' }}/{{ doc.title | downcase | replace: ' ', '-' }}">
{{ doc.title }}
</a>
{% unless doc.sections == nil %}
<ul class="nav">
{% for section in doc.sections %}
<li>
<a href="{{ site.baseurl }}{{ group.title | downcase | replace: ' ', '-' }}/{{ doc.title | downcase | replace: ' ', '-' }}#{{ section.title | downcase | replace: ' ', '-' }}">
{{ section.title }}
</a>
</li>
{% endfor %}
</ul>
{% endunless %}
</li>
{% endfor %}
</ul>
</div>
{% endfor %}
</nav>
</div>
</header>
......@@ -9,6 +9,18 @@
{% include nav/docs.html %}
<div class="bs-docs-header" id="content">
<div class="bs-docs-container">
{% if page.url contains "getting-started" %}
<h1>Getting started</h1>
<p class="lead">Learn how to quickly start a new project with Bootstrap with downloads, basic templates and examples, and more.</p>
{% endif %}
{% include ads.html %}
</div>
</div>
<!--
<div class="bs-docs-header" id="content">
<div class="bs-docs-container">
<h1>{{ page.title }}</h1>
......@@ -16,7 +28,7 @@
{% include ads.html %}
</div>
</div>
-->
<div class="bs-docs-container bs-docs-content">
{{ content }}
</div>
......
---
layout: default
---
{{ content }}
This diff is collapsed.
......@@ -21,4 +21,4 @@ var Holder=Holder||{};!function(a,b){function c(a,b,c){b=parseInt(b,10),a=parseI
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/.
*/
!function(a){"use strict";a(function(){var b=a(window),c=a(document.body);c.scrollspy({target:".active .bs-docs-sidenav"}),b.on("load",function(){c.scrollspy("refresh")}),a("[href=#]").click(function(a){a.preventDefault()})(function(){var b=a("#bs-theme-stylesheet"),c=a(".bs-docs-theme-toggle"),d=function(){b.attr("href",b.attr("data-href")),c.text("Disable theme preview"),localStorage.setItem("previewTheme",!0)};localStorage.getItem("previewTheme")&&d(),c.click(function(){var a=b.attr("href");a&&0!==a.indexOf("data")?(b.attr("href",""),c.text("Preview theme"),localStorage.removeItem("previewTheme")):d()})}),a(".tooltip-demo").tooltip({selector:'[data-toggle="tooltip"]',container:"body"}),a(".popover-demo").popover({selector:'[data-toggle="popover"]',container:"body"}),a(".tooltip-test").tooltip(),a(".popover-test").popover(),a(".bs-docs-popover").popover(),a(".bs-docs-popover-dismiss").popover({trigger:"focus"}),a("#loading-example-btn").click(function(){var b=a(this);b.button("loading"),setTimeout(function(){b.button("reset")},3e3)}),ZeroClipboard.config({moviePath:"/assets/flash/ZeroClipboard.swf",hoverClass:"btn-clipboard-hover"}),a(".highlight").each(function(){var b=a(this),c=b.prev(),d='<div class="zero-clipboard"><span class="btn-clipboard">Copy</span></div>';c.hasClass("bs-example")?c.before(d.replace(/btn-clipboard/,"btn-clipboard with-example")):b.before(d)});var d=new ZeroClipboard(a(".btn-clipboard")),e=a("#global-zeroclipboard-html-bridge");d.on("load",function(){e.data("placement","top").attr("title","Copy to clipboard").tooltip()}),d.on("dataRequested",function(b){var c=a(this).parent().nextAll(".highlight").first();b.setText(c.text())}),d.on("complete",function(){e.attr("title","Copied!").tooltip("fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("fixTitle")}),d.on("noflash wrongflash",function(){e.attr("title","Flash required").tooltip("fixTitle").tooltip("show")})})}(jQuery);
\ No newline at end of file
!function(a){"use strict";a(function(){var b=a(window),c=a(document.body);c.scrollspy({target:".active .bs-docs-sidenav"}),b.on("load",function(){c.scrollspy("refresh")})(function(){var b=a("#bs-theme-stylesheet"),c=a(".bs-docs-theme-toggle"),d=function(){b.attr("href",b.attr("data-href")),c.text("Disable theme preview"),localStorage.setItem("previewTheme",!0)};localStorage.getItem("previewTheme")&&d(),c.click(function(){var a=b.attr("href");a&&0!==a.indexOf("data")?(b.attr("href",""),c.text("Preview theme"),localStorage.removeItem("previewTheme")):d()})}),a(".tooltip-demo").tooltip({selector:'[data-toggle="tooltip"]',container:"body"}),a(".popover-demo").popover({selector:'[data-toggle="popover"]',container:"body"}),a(".tooltip-test").tooltip(),a(".popover-test").popover(),a(".bs-docs-popover").popover(),a(".bs-docs-popover-dismiss").popover({trigger:"focus"}),a("#loading-example-btn").click(function(){var b=a(this);b.button("loading"),setTimeout(function(){b.button("reset")},3e3)}),ZeroClipboard.config({moviePath:"/assets/flash/ZeroClipboard.swf",hoverClass:"btn-clipboard-hover"}),a(".highlight").each(function(){var b=a(this),c=b.prev(),d='<div class="zero-clipboard"><span class="btn-clipboard">Copy</span></div>';c.hasClass("bs-example")?c.before(d.replace(/btn-clipboard/,"btn-clipboard with-example")):b.before(d)});var d=new ZeroClipboard(a(".btn-clipboard")),e=a("#global-zeroclipboard-html-bridge");d.on("load",function(){e.data("placement","top").attr("title","Copy to clipboard").tooltip()}),d.on("dataRequested",function(b){var c=a(this).parent().nextAll(".highlight").first();b.setText(c.text())}),d.on("complete",function(){e.attr("title","Copied!").tooltip("fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("fixTitle")}),d.on("noflash wrongflash",function(){e.attr("title","Flash required").tooltip("fixTitle").tooltip("show")})})}(jQuery);
\ No newline at end of file
......@@ -16,21 +16,21 @@
$(function () {
// Scrollspy
var $window = $(window)
var $body = $(document.body)
// // Scrollspy
// var $window = $(window)
// var $body = $(document.body)
$body.scrollspy({
target: '.active .bs-docs-sidenav'
})
$window.on('load', function () {
$body.scrollspy('refresh')
})
// $body.scrollspy({
// target: '.active .bs-docs-sidenav'
// })
// $window.on('load', function () {
// $body.scrollspy('refresh')
// })
// Kill links
$('[href=#]').click(function (e) {
e.preventDefault()
})
// $('[href=#]').click(function (e) {
// e.preventDefault()
// })
// theme toggler
(function () {
......
......@@ -673,7 +673,7 @@ body {
// Nav: second level (shown on .active)
.bs-docs-sidebar .nav .nav {
display: none; // Hide by default, but at >768px, show it
/*display: none; // Hide by default, but at >768px, show it*/
padding-bottom: 10px;
}
.bs-docs-sidebar .nav .nav > li > a {
......
......@@ -6,11 +6,8 @@ lead: "Learn how to quickly start a new project with Bootstrap with downloads, b
---
{% markdown %}
{% include getting-started/download.md %}
{% endmarkdown %}
{% include getting-started/whats-included.html %}
{% include getting-started/grunt.html %}
{% include getting-started/template.html %}
{% include getting-started/examples.html %}
{% include getting-started/community.html %}
......
---
layout: page
title: Compiling with Grunt
---
Bootstrap uses [Grunt](http://gruntjs.com) for its build system, with convenient methods for working with the framework. It's how we compile our code, run tests, and more.
### Install Grunt
**To install Grunt, you must first [download and install node.js](http://nodejs.org/download/)** (which includes npm). npm stands for [node packaged modules](http://npmjs.org/) and is a way to manage development dependencies through node.js.
From the command line:
1. Install `grunt-cli` globally with `npm install -g grunt-cli`.
2. Navigate to the root `/bootstrap` directory, then run `npm install`. npm will look at [package.json](https://github.com/twbs/bootstrap/blob/master/package.json) and automatically install the necessary local dependencies listed there.
When completed, you'll be able to run the various Grunt commands provided from the command line.
**Unfamiliar with npm? Don't have node installed?** That's a-okay. npm stands for [node packaged modules](http://npmjs.org/) and is a way to manage development dependencies through node.js. [Download and install node.js](http://nodejs.org/download/) before proceeding.
### Available Grunt commands
#### Build - `grunt`
Run `grunt` to run tests locally and compile the CSS and JavaScript into `/dist`. **Uses [Less](http://lesscss.org/) and [UglifyJS](http://lisperator.net/uglifyjs/).**
#### Only compile CSS and JavaScript - `grunt dist`
`grunt dist` creates the `/dist` directory with compiled files. **Uses [Less](http://lesscss.org/) and [UglifyJS](http://lisperator.net/uglifyjs/).**
#### Tests - `grunt test`
Runs [JSHint](http://jshint.com) and [QUnit](http://qunitjs.com/) tests headlessly in [PhantomJS](http://phantomjs.org/) (used for CI).
#### Watch - `grunt watch`
This is a convenience method for watching just Less files and automatically building them whenever you save.
### Troubleshooting dependencies
Should you encounter problems with installing dependencies or running Grunt commands, uninstall all previous dependency versions (global and local). Then, rerun `npm install`.
---
layout: page
title: Contents
---
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.
<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>
### Precompiled Bootstrap
Once downloaded, unzip the compressed folder to see the structure of (the compiled) Bootstrap. You'll see something like this:
<!-- 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 %}
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 (`bootstrap.*`), as well as compiled and minified CSS and JS (1bootstrap.min.*1). Also included is the optional Bootstrap theme.
### Bootstrap source code
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:
{% highlight bash %}
bootstrap/
├── less/
├── js/
├── dist/
│ ├── css/
│ └── js/
└── docs/
└── examples/
{% endhighlight %}
The `less/` and `js/` are the source code for our CSS and JavaScript. The `dist/` folder includes everything listed in the precompiled download section above. The `docs/` folder includes the source code for our documentation, and `examples/` of Bootstrap usage. Beyond that, any other included file provides support for packages, license information, and development.
---
layout: page
title: Download
---
Bootstrap is available for download via ZIP file in two flavors: precompiled CSS and Javascript, and the complete source code with documentation.
### 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>
### Download source 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>
### Bower
Install and manage Bootstrap's Less, CSS, and JavaScript using [Bower](http://bower.io).
{% highlight bash %}$ bower install bootstrap{% endhighlight %}
### 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 %}
<a id="quick-start"></a>
# Quick start
---
layout: page
title: 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.
......@@ -41,44 +42,3 @@ Put it all together and your pages should look like this:
{% 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 %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment