]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Rewrite quick start JS sections in getting started page so things are more clearly...
authorMark Otto <markdotto@gmail.com>
Mon, 14 Sep 2020 22:19:29 +0000 (15:19 -0700)
committerXhmikosR <xhmikosr@gmail.com>
Tue, 15 Sep 2020 05:57:19 +0000 (08:57 +0300)
site/content/docs/5.0/getting-started/introduction.md

index e1199c7e80039c825b1bb95b1acd36ea763b2e2e..5e93872965b27497d518465f6bf0f4e65c7a17eb 100644 (file)
@@ -24,22 +24,32 @@ Copy-paste the stylesheet `<link>` into your `<head>` before all other styleshee
 
 ### JS
 
-Many of our components require the use of JavaScript to function. Specifically, they require our own JavaScript plugins and [Popper.js](https://popper.js.org/). Place **one of following `<script>`s** near the end of your pages, right before the closing `</body>` tag, to enable them. If you decide to go with the separate scripts solution, Popper.js must come first, and then our JavaScript plugins.
+Many of our components require the use of JavaScript to function. Specifically, they require our own JavaScript plugins and [Popper.js](https://popper.js.org/). Place **one of following `<script>`s** near the end of your pages, right before the closing `</body>` tag, to enable them.
+
+#### Bundle
+
+Include everything you need in one script with our bundle. Our `bootstrap.bundle.js` and `bootstrap.bundle.min.js` include [Popper](https://popper.js.org/). For more information about what's included in Bootstrap, please see our [contents]({{< docsref "/getting-started/contents#precompiled-bootstrap" >}}) section.
 
 {{< highlight html >}}
 <script src="{{< param "cdn.js_bundle" >}}" integrity="{{< param "cdn.js_bundle_hash" >}}" crossorigin="anonymous"></script>
 {{< /highlight >}}
 
+#### Separate
+
+If you decide to go with the separate scripts solution, Popper.js must come first, and then our JavaScript plugins.
+
 {{< highlight html >}}
 <script src="{{< param "cdn.popper" >}}" integrity="{{< param "cdn.popper_hash" >}}" crossorigin="anonymous"></script>
 <script src="{{< param "cdn.js" >}}" integrity="{{< param "cdn.js_hash" >}}" crossorigin="anonymous"></script>
 {{< /highlight >}}
 
+#### Modules
+
 If you use `<script type="module">`, please refer to our [using Bootstrap as a module]({{< docsref "/getting-started/javascript#using-bootstrap-as-a-module" >}}) section.
 
-Curious which components explicitly require our JavaScript and Popper.js? Click the show components link below. If you're at all unsure about the general page structure, keep reading for an example page template.
+#### Components
 
-Our `bootstrap.bundle.js` and `bootstrap.bundle.min.js` include [Popper](https://popper.js.org/). For more information about what's included in Bootstrap, please see our [contents]({{< docsref "/getting-started/contents#precompiled-bootstrap" >}}) section.
+Curious which components explicitly require our JavaScript and Popper.js? Click the show components link below. If you're at all unsure about the general page structure, keep reading for an example page template.
 
 {{< partial "getting-started/components-requiring-javascript" >}}
 
@@ -64,12 +74,14 @@ Be sure to have your pages set up with the latest design and development standar
     <h1>Hello, world!</h1>
 
     <!-- Optional JavaScript; choose one of the two! -->
-    <!-- Bootstrap Bundle with Popper.js -->
+
+    <!-- Option 1: Bootstrap Bundle with Popper.js -->
     <script src="{{< param "cdn.js_bundle" >}}" integrity="{{< param "cdn.js_bundle_hash" >}}" crossorigin="anonymous"></script>
 
-    <!-- Or Popper.js first, then Bootstrap JS -->
+    <!-- Option 2: Separate Popper.js and Bootstrap JS
     <script src="{{< param "cdn.popper" >}}" integrity="{{< param "cdn.popper_hash" >}}" crossorigin="anonymous"></script>
     <script src="{{< param "cdn.js" >}}" integrity="{{< param "cdn.js_hash" >}}" crossorigin="anonymous"></script>
+    -->
   </body>
 </html>
 {{< /highlight >}}