bootstrap_styleguide 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +31 -0
  4. data/Rakefile +18 -0
  5. data/app/assets/config/bootstrap_styleguide_manifest.js +1 -0
  6. data/app/assets/stylesheets/bootstrap_styleguide/application.css +15 -0
  7. data/app/controllers/bootstrap_styleguide/application_controller.rb +5 -0
  8. data/app/controllers/bootstrap_styleguide/components_controller.rb +5 -0
  9. data/app/controllers/bootstrap_styleguide/content_controller.rb +5 -0
  10. data/app/controllers/bootstrap_styleguide/forms_controller.rb +5 -0
  11. data/app/controllers/bootstrap_styleguide/layout_controller.rb +5 -0
  12. data/app/controllers/bootstrap_styleguide/styleguide_controller.rb +6 -0
  13. data/app/controllers/bootstrap_styleguide/utilities_controller.rb +5 -0
  14. data/app/helpers/bootstrap_styleguide/application_helper.rb +37 -0
  15. data/app/jobs/bootstrap_styleguide/application_job.rb +4 -0
  16. data/app/mailers/bootstrap_styleguide/application_mailer.rb +6 -0
  17. data/app/models/bootstrap_styleguide/application_record.rb +5 -0
  18. data/app/views/bootstrap_styleguide/components/accordion.html.erb +47 -0
  19. data/app/views/bootstrap_styleguide/components/alerts.html.erb +33 -0
  20. data/app/views/bootstrap_styleguide/components/badge.html.erb +41 -0
  21. data/app/views/bootstrap_styleguide/components/breadcrumbs.html.erb +42 -0
  22. data/app/views/bootstrap_styleguide/components/button_group.html.erb +67 -0
  23. data/app/views/bootstrap_styleguide/components/buttons.html.erb +43 -0
  24. data/app/views/bootstrap_styleguide/components/cards.html.erb +72 -0
  25. data/app/views/bootstrap_styleguide/components/carousel.html.erb +5 -0
  26. data/app/views/bootstrap_styleguide/components/close_button.html.erb +10 -0
  27. data/app/views/bootstrap_styleguide/components/collapse.html.erb +59 -0
  28. data/app/views/bootstrap_styleguide/components/dropdowns.html.erb +44 -0
  29. data/app/views/bootstrap_styleguide/components/modal.html.erb +63 -0
  30. data/app/views/bootstrap_styleguide/components/navbar.html.erb +44 -0
  31. data/app/views/bootstrap_styleguide/components/navs_and_tabs.html.erb +65 -0
  32. data/app/views/bootstrap_styleguide/components/offcanvas.html.erb +69 -0
  33. data/app/views/bootstrap_styleguide/components/pagination.html.erb +46 -0
  34. data/app/views/bootstrap_styleguide/components/popovers.html.erb +26 -0
  35. data/app/views/bootstrap_styleguide/components/progress.html.erb +61 -0
  36. data/app/views/bootstrap_styleguide/components/spinners.html.erb +62 -0
  37. data/app/views/bootstrap_styleguide/components/toasts.html.erb +58 -0
  38. data/app/views/bootstrap_styleguide/components/tooltips.html.erb +20 -0
  39. data/app/views/bootstrap_styleguide/content/images.html.erb +5 -0
  40. data/app/views/bootstrap_styleguide/content/tables.html.erb +74 -0
  41. data/app/views/bootstrap_styleguide/content/typography.html.erb +68 -0
  42. data/app/views/bootstrap_styleguide/forms/checks_and_radios.html.erb +58 -0
  43. data/app/views/bootstrap_styleguide/forms/floating_labels.html.erb +60 -0
  44. data/app/views/bootstrap_styleguide/forms/input_group.html.erb +30 -0
  45. data/app/views/bootstrap_styleguide/forms/range.html.erb +11 -0
  46. data/app/views/bootstrap_styleguide/forms/select.html.erb +34 -0
  47. data/app/views/bootstrap_styleguide/layout/breakpoints.html.erb +49 -0
  48. data/app/views/bootstrap_styleguide/layout/containers.html.erb +111 -0
  49. data/app/views/bootstrap_styleguide/layout/grid.html.erb +51 -0
  50. data/app/views/bootstrap_styleguide/styleguide/index.html.erb +24 -0
  51. data/app/views/bootstrap_styleguide/utilities/background.html.erb +38 -0
  52. data/app/views/bootstrap_styleguide/utilities/borders.html.erb +67 -0
  53. data/app/views/bootstrap_styleguide/utilities/colors.html.erb +26 -0
  54. data/app/views/bootstrap_styleguide/utilities/shadows.html.erb +13 -0
  55. data/app/views/bootstrap_styleguide/utilities/spacing.html.erb +37 -0
  56. data/app/views/bootstrap_styleguide/utilities/text.html.erb +25 -0
  57. data/app/views/layouts/_styleguide_header.html.erb +71 -0
  58. data/app/views/layouts/styleguide.html.erb +19 -0
  59. data/config/routes.rb +47 -0
  60. data/lib/bootstrap_styleguide/engine.rb +5 -0
  61. data/lib/bootstrap_styleguide/version.rb +3 -0
  62. data/lib/bootstrap_styleguide.rb +6 -0
  63. data/lib/generators/bootstrap_styleguide/install_generator.rb +22 -0
  64. data/lib/tasks/bootstrap_styleguide_tasks.rake +4 -0
  65. metadata +123 -0
@@ -0,0 +1,44 @@
1
+ <h1 id="content">Dropdowns</h1>
2
+ <p class="bd-lead">Toggle contextual overlays for displaying lists of links and more with the Bootstrap dropdown plugin.</p>
3
+
4
+ <h2>Example</h2>
5
+
6
+ <p>Wrap the dropdown’s toggle (your button or link) and the dropdown menu within <code>.dropdown</code>, or another element that declares <code>position: relative;</code>. Dropdowns can be triggered from <code>&lt;a&gt;</code> or <code>&lt;button&gt;</code> elements to better fit your potential needs. The examples shown here use semantic <code>&lt;ul&gt;</code> elements where appropriate, but custom markup is supported.</p>
7
+
8
+ <h2>Single button</h2>
9
+ <p>Any single <code>.btn</code> can be turned into a dropdown toggle with some markup changes. Here’s how you can put them to work with either <code>&lt;button&gt;</code> elements:</p>
10
+
11
+ <%= example_with_code do %>
12
+ <div class="dropdown">
13
+ <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
14
+ Dropdown button
15
+ </button>
16
+ <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
17
+ <li><a class="dropdown-item" href="#">Action</a></li>
18
+ <li><a class="dropdown-item" href="#">Another action</a></li>
19
+ <li><a class="dropdown-item" href="#">Something else here</a></li>
20
+ </ul>
21
+ </div>
22
+ <% end %>
23
+
24
+ <h2>Split button</h2>
25
+
26
+ <p>Similarly, create split button dropdowns with virtually the same markup as single button dropdowns, but with the addition of <code>.dropdown-toggle-split</code> for proper spacing around the dropdown caret.</p>
27
+ <p>We use this extra class to reduce the horizontal <code>padding</code> on either side of the caret by 25% and remove the <code>margin-left</code> that’s added for regular button dropdowns. Those extra changes keep the caret centered in the split button and provide a more appropriately sized hit area next to the main button.</p>
28
+
29
+ <%= example_with_code do %>
30
+ <!-- Example split danger button -->
31
+ <div class="btn-group">
32
+ <button type="button" class="btn btn-danger">Action</button>
33
+ <button type="button" class="btn btn-danger dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
34
+ <span class="visually-hidden">Toggle Dropdown</span>
35
+ </button>
36
+ <ul class="dropdown-menu">
37
+ <li><a class="dropdown-item" href="#">Action</a></li>
38
+ <li><a class="dropdown-item" href="#">Another action</a></li>
39
+ <li><a class="dropdown-item" href="#">Something else here</a></li>
40
+ <li><hr class="dropdown-divider"></li>
41
+ <li><a class="dropdown-item" href="#">Separated link</a></li>
42
+ </ul>
43
+ </div>
44
+ <% end %>
@@ -0,0 +1,63 @@
1
+ <h1 id="content">Modal</h1>
2
+ <p>Use Bootstrap’s JavaScript modal plugin to add dialogs to your site for lightboxes, user notifications, or completely custom content.</p>
3
+
4
+ <h2 id="examples" class="mt-4">Examples</h2>
5
+ <p>Toggle a working modal demo by clicking the button below. It will slide down and fade in from the top of the page.</p>
6
+
7
+ <%= example_with_code do %>
8
+ <button type="button" class="btn btn-primary d-block" data-bs-toggle="modal" data-bs-target="#exampleModal">
9
+ Launch modal
10
+ </button>
11
+
12
+ <div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
13
+ <div class="modal-dialog">
14
+ <div class="modal-content">
15
+ <div class="modal-header">
16
+ <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
17
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
18
+ </div>
19
+ <div class="modal-body">
20
+ ...
21
+ </div>
22
+ <div class="modal-footer">
23
+ <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
24
+ <button type="button" class="btn btn-primary">Save changes</button>
25
+ </div>
26
+ </div>
27
+ </div>
28
+ </div>
29
+ <% end %>
30
+
31
+ <h2 id="optional-sizes" class="mt-4">Optional sizes</h2>
32
+ <p>Modals have three optional sizes, available via modifier classes to be placed on a <code>.modal-dialog</code>. These sizes kick in at certain breakpoints to avoid horizontal scrollbars on narrower viewports.</p>
33
+ <table class="table">
34
+ <thead>
35
+ <tr>
36
+ <th>Size</th>
37
+ <th>Class</th>
38
+ <th>Modal max-width</th>
39
+ </tr>
40
+ </thead>
41
+ <tbody>
42
+ <tr>
43
+ <td>Small</td>
44
+ <td><code>.modal-sm</code></td>
45
+ <td><code>300px</code></td>
46
+ </tr>
47
+ <tr>
48
+ <td>Default</td>
49
+ <td class="text-muted">None</td>
50
+ <td><code>500px</code></td>
51
+ </tr>
52
+ <tr>
53
+ <td>Large</td>
54
+ <td><code>.modal-lg</code></td>
55
+ <td><code>800px</code></td>
56
+ </tr>
57
+ <tr>
58
+ <td>Extra large</td>
59
+ <td><code>.modal-xl</code></td>
60
+ <td><code>1140px</code></td>
61
+ </tr>
62
+ </tbody>
63
+ </table>
@@ -0,0 +1,44 @@
1
+ <h1 id="content">Navbar</h1>
2
+ <p>Documentation and examples for Bootstrap’s powerful, responsive navigation header, the navbar. Includes support for branding, navigation, and more, including support for our collapse plugin.</p>
3
+
4
+ <h2 id="examples" class="mt-4">Examples</h2>
5
+ <p>Here’s an example of all the sub-components included in a responsive light-themed navbar that automatically collapses at the lg (large) breakpoint.</p>
6
+
7
+ <%= example_with_code do %>
8
+ <nav class="navbar navbar-expand-lg navbar-light bg-light">
9
+ <div class="container-fluid">
10
+ <a class="navbar-brand" href="#">Navbar</a>
11
+ <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
12
+ <span class="navbar-toggler-icon"></span>
13
+ </button>
14
+ <div class="collapse navbar-collapse" id="navbarSupportedContent">
15
+ <ul class="navbar-nav me-auto mb-2 mb-lg-0">
16
+ <li class="nav-item">
17
+ <a class="nav-link active" aria-current="page" href="#">Home</a>
18
+ </li>
19
+ <li class="nav-item">
20
+ <a class="nav-link" href="#">Link</a>
21
+ </li>
22
+ <li class="nav-item dropdown">
23
+ <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
24
+ Dropdown
25
+ </a>
26
+ <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
27
+ <li><a class="dropdown-item" href="#">Action</a></li>
28
+ <li><a class="dropdown-item" href="#">Another action</a></li>
29
+ <li><hr class="dropdown-divider"></li>
30
+ <li><a class="dropdown-item" href="#">Something else here</a></li>
31
+ </ul>
32
+ </li>
33
+ <li class="nav-item">
34
+ <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
35
+ </li>
36
+ </ul>
37
+ <form class="d-flex">
38
+ <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
39
+ <button class="btn btn-outline-success" type="submit">Search</button>
40
+ </form>
41
+ </div>
42
+ </div>
43
+ </nav>
44
+ <% end %>
@@ -0,0 +1,65 @@
1
+ <h1 id="content">Navs and tabs</h1>
2
+ <p class="bd-lead">Documentation and examples for how to use Bootstrap’s included navigation components.</p>
3
+
4
+ <h2>Base nav</h2>
5
+
6
+ <p>Navigation available in Bootstrap share general markup and styles, from the base .nav class to the active and disabled states. Swap modifier classes to switch between each style.</p>
7
+
8
+ <p>The base .nav component is built with flexbox and provide a strong foundation for building all types of navigation components. It includes some style overrides (for working with lists), some link padding for larger hit areas, and basic disabled styling.</p>
9
+
10
+ <%= example_with_code do %>
11
+ <ul class="nav">
12
+ <li class="nav-item">
13
+ <a class="nav-link active" aria-current="page" href="#">Active</a>
14
+ </li>
15
+ <li class="nav-item">
16
+ <a class="nav-link" href="#">Link</a>
17
+ </li>
18
+ <li class="nav-item">
19
+ <a class="nav-link" href="#">Link</a>
20
+ </li>
21
+ <li class="nav-item">
22
+ <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
23
+ </li>
24
+ </ul>
25
+ <% end %>
26
+
27
+ <h2>Tabs</h2>
28
+ <p>Takes the basic nav from above and adds the <code>.nav-tabs</code> class to generate a tabbed interface. Use them to create tabbable regions with our <a href="#javascript-behavior">tab JavaScript plugin</a>.</p>
29
+
30
+ <%= example_with_code do %>
31
+ <ul class="nav nav-tabs">
32
+ <li class="nav-item">
33
+ <a class="nav-link active" aria-current="page" href="#">Active</a>
34
+ </li>
35
+ <li class="nav-item">
36
+ <a class="nav-link" href="#">Link</a>
37
+ </li>
38
+ <li class="nav-item">
39
+ <a class="nav-link" href="#">Link</a>
40
+ </li>
41
+ <li class="nav-item">
42
+ <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
43
+ </li>
44
+ </ul>
45
+ <% end %>
46
+
47
+ <h2>Pills</h2>
48
+ <p>Take that same HTML, but use <code>.nav-pills</code> instead:</p>
49
+
50
+ <%= example_with_code do %>
51
+ <ul class="nav nav-pills">
52
+ <li class="nav-item">
53
+ <a class="nav-link active" aria-current="page" href="#">Active</a>
54
+ </li>
55
+ <li class="nav-item">
56
+ <a class="nav-link" href="#">Link</a>
57
+ </li>
58
+ <li class="nav-item">
59
+ <a class="nav-link" href="#">Link</a>
60
+ </li>
61
+ <li class="nav-item">
62
+ <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
63
+ </li>
64
+ </ul>
65
+ <% end %>
@@ -0,0 +1,69 @@
1
+ <h1 id="content">Offcanvas</h1>
2
+ <p class="bd-lead">Build hidden sidebars into your project for navigation, shopping carts, and more with a few classes and our JavaScript plugin.</p>
3
+
4
+ <h2>Example</h2>
5
+ <p>Below is an offcanvas example that is shown by default (via <code>.show</code> on <code>.offcanvas</code>). Offcanvas includes support for a header with a close button and an optional body class for some initial <code>padding</code>. We suggest that you include offcanvas headers with dismiss actions whenever possible, or provide an explicit dismiss action.</p>
6
+
7
+ <%= example_with_code do %>
8
+ <div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvas" aria-labelledby="offcanvasLabel">
9
+ <div class="offcanvas-header">
10
+ <h5 class="offcanvas-title" id="offcanvasLabel">Offcanvas</h5>
11
+ <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
12
+ </div>
13
+ <div class="offcanvas-body">
14
+ Content for the offcanvas goes here. You can place just about any Bootstrap component or custom elements here.
15
+ </div>
16
+ </div>
17
+ <% end %>
18
+
19
+ <h2>Live demo</h2>
20
+
21
+ <p>Use the buttons below to show and hide an offcanvas element via JavaScript that toggles the <code>.show</code> class on an element with the <code>.offcanvas</code> class.</p>
22
+
23
+ <ul>
24
+ <li><code>.offcanvas</code> hides content (default)</li>
25
+ <li><code>.offcanvas.show</code> shows content</li>
26
+ </ul>
27
+
28
+ <p>You can use a link with the <code>href</code> attribute, or a button with the <code>data-bs-target</code> attribute. In both cases, the <code>data-bs-toggle="offcanvas"</code> is required.</p>
29
+
30
+ <%= example_with_code do %>
31
+ <a class="btn btn-primary" data-bs-toggle="offcanvas" href="#offcanvasExample" role="button" aria-controls="offcanvasExample">
32
+ Link with href
33
+ </a>
34
+ <button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasExample" aria-controls="offcanvasExample">
35
+ Button with data-bs-target
36
+ </button>
37
+
38
+ <div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvasExample" aria-labelledby="offcanvasExampleLabel">
39
+ <div class="offcanvas-header">
40
+ <h5 class="offcanvas-title" id="offcanvasExampleLabel">Offcanvas</h5>
41
+ <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
42
+ </div>
43
+ <div class="offcanvas-body">
44
+ <div>
45
+ Some text as placeholder. In real life you can have the elements you have chosen. Like, text, images, lists, etc.
46
+ </div>
47
+ <div class="dropdown mt-3">
48
+ <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown">
49
+ Dropdown button
50
+ </button>
51
+ <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
52
+ <li><a class="dropdown-item" href="#">Action</a></li>
53
+ <li><a class="dropdown-item" href="#">Another action</a></li>
54
+ <li><a class="dropdown-item" href="#">Something else here</a></li>
55
+ </ul>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ <% end %>
60
+
61
+ <h2>Placement</h2>
62
+
63
+ <p>There’s no default placement for offcanvas components, so you must add one of the modifier classes below;</p>
64
+ <ul>
65
+ <li><code>.offcanvas-start</code> places offcanvas on the left of the viewport (shown above)</li>
66
+ <li><code>.offcanvas-end</code> places offcanvas on the right of the viewport</li>
67
+ <li><code>.offcanvas-top</code> places offcanvas on the top of the viewport</li>
68
+ <li><code>.offcanvas-bottom</code> places offcanvas on the bottom of the viewport</li>
69
+ </ul>
@@ -0,0 +1,46 @@
1
+ <h1 id="content">Pagination</h1>
2
+ <p class="bd-lead">Documentation and examples for showing pagination to indicate a series of related content exists across multiple pages.</p>
3
+
4
+ <h2>Overview</h2>
5
+
6
+ <p>We use a large block of connected links for our pagination, making links hard to miss and easily scalable—all while providing large hit areas. Pagination is built with list HTML elements so screen readers can announce the number of available links. Use a wrapping <code>&lt;nav&gt;</code> element to identify it as a navigation section to screen readers and other assistive technologies.</p>
7
+
8
+ <p>In addition, as pages likely have more than one such navigation section, it’s advisable to provide a descriptive <code>aria-label</code> for the <code>&lt;nav&gt;</code> to reflect its purpose. For example, if the pagination component is used to navigate between a set of search results, an appropriate label could be <code>aria-label="Search results pages"</code>.</p>
9
+
10
+ <%= example_with_code do %>
11
+ <nav aria-label="Page navigation example">
12
+ <ul class="pagination">
13
+ <li class="page-item"><a class="page-link" href="#">Previous</a></li>
14
+ <li class="page-item"><a class="page-link" href="#">1</a></li>
15
+ <li class="page-item"><a class="page-link" href="#">2</a></li>
16
+ <li class="page-item"><a class="page-link" href="#">3</a></li>
17
+ <li class="page-item"><a class="page-link" href="#">Next</a></li>
18
+ </ul>
19
+ </nav>
20
+ <% end %>
21
+
22
+ <h2>Overview</h2>
23
+
24
+ <p>Fancy larger or smaller pagination? Add .pagination-lg or .pagination-sm for additional sizes.</p>
25
+
26
+ <%= example_with_code do %>
27
+ <nav aria-label="...">
28
+ <ul class="pagination pagination-lg">
29
+ <li class="page-item active" aria-current="page">
30
+ <span class="page-link">1</span>
31
+ </li>
32
+ <li class="page-item"><a class="page-link" href="#">2</a></li>
33
+ <li class="page-item"><a class="page-link" href="#">3</a></li>
34
+ </ul>
35
+ </nav>
36
+
37
+ <nav class="mt-2" aria-label="...">
38
+ <ul class="pagination pagination-sm">
39
+ <li class="page-item active" aria-current="page">
40
+ <span class="page-link">1</span>
41
+ </li>
42
+ <li class="page-item"><a class="page-link" href="#">2</a></li>
43
+ <li class="page-item"><a class="page-link" href="#">3</a></li>
44
+ </ul>
45
+ </nav>
46
+ <% end %>
@@ -0,0 +1,26 @@
1
+ <h1 id="content">Popovers</h1>
2
+ <p class="bd-lead">Documentation and examples for adding Bootstrap popovers, like those found in iOS, to any element on your site.</p>
3
+
4
+ <h2>Example</h2>
5
+
6
+ <%= example_with_code do %>
7
+ <button type="button" class="btn btn-lg btn-danger" data-bs-toggle="popover" title="Popover title" data-bs-content="And here's some amazing content. It's very engaging. Right?">Click to toggle popover</button>
8
+ <% end %>
9
+
10
+ <h2>Four directions</h2>
11
+ <p>Four options are available: top, right, bottom, and left aligned. Directions are mirrored when using Bootstrap in RTL.</p>
12
+
13
+ <%= example_with_code do %>
14
+ <button type="button" class="btn btn-secondary" data-bs-container="body" data-bs-toggle="popover" data-bs-placement="top" data-bs-content="Top popover">
15
+ Popover on top
16
+ </button>
17
+ <button type="button" class="btn btn-secondary" data-bs-container="body" data-bs-toggle="popover" data-bs-placement="right" data-bs-content="Right popover">
18
+ Popover on right
19
+ </button>
20
+ <button type="button" class="btn btn-secondary" data-bs-container="body" data-bs-toggle="popover" data-bs-placement="bottom" data-bs-content="Bottom popover">
21
+ Popover on bottom
22
+ </button>
23
+ <button type="button" class="btn btn-secondary" data-bs-container="body" data-bs-toggle="popover" data-bs-placement="left" data-bs-content="Left popover">
24
+ Popover on left
25
+ </button>
26
+ <% end %>
@@ -0,0 +1,61 @@
1
+ <h1 id="content">Progress</h1>
2
+ <p class="bd-lead">Documentation and examples for using Bootstrap custom progress bars featuring support for stacked bars, animated backgrounds, and text labels.</p>
3
+
4
+ <h2>Example</h2>
5
+
6
+ <p>Progress components are built with two HTML elements, some CSS to set the width, and a few attributes. We don’t use <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress">the HTML5 <code>&lt;progress&gt;</code> element</a>, ensuring you can stack progress bars, animate them, and place text labels over them.</p>
7
+
8
+ <ul>
9
+ <li>We use the <code>.progress</code> as a wrapper to indicate the max value of the progress bar.</li>
10
+ <li>We use the inner <code>.progress-bar</code> to indicate the progress so far.</li>
11
+ <li>The <code>.progress-bar</code> requires an inline style, utility class, or custom CSS to set their width.</li>
12
+ <li>The <code>.progress-bar</code> also requires some <code>role</code> and <code>aria</code> attributes to make it accessible.</li>
13
+ </ul>
14
+
15
+ <%= example_with_code do %>
16
+ <div class="progress">
17
+ <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
18
+ </div>
19
+ <div class="progress mt-2">
20
+ <div class="progress-bar" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
21
+ </div>
22
+ <div class="progress mt-2">
23
+ <div class="progress-bar" role="progressbar" style="width: 50%" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
24
+ </div>
25
+ <div class="progress mt-2">
26
+ <div class="progress-bar" role="progressbar" style="width: 75%" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
27
+ </div>
28
+ <div class="progress mt-2">
29
+ <div class="progress-bar" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
30
+ </div>
31
+ <% end %>
32
+
33
+ <h2>Labels</h2>
34
+ <p>Add labels to your progress bars by placing text within the .progress-bar.</p>
35
+
36
+ <%= example_with_code do %>
37
+ <div class="progress">
38
+ <div class="progress-bar" role="progressbar" style="width: 25%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">25%</div>
39
+ </div>
40
+ <% end %>
41
+
42
+ <h2>Striped</h2>
43
+ <p>Add <code>.progress-bar-striped</code> to any <code>.progress-bar</code> to apply a stripe via CSS gradient over the progress bar’s background color.</p>
44
+
45
+ <%= example_with_code do %>
46
+ <div class="progress">
47
+ <div class="progress-bar progress-bar-striped" role="progressbar" style="width: 10%" aria-valuenow="10" aria-valuemin="0" aria-valuemax="100"></div>
48
+ </div>
49
+ <div class="progress mt-2">
50
+ <div class="progress-bar progress-bar-striped bg-success" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
51
+ </div>
52
+ <div class="progress mt-2">
53
+ <div class="progress-bar progress-bar-striped bg-info" role="progressbar" style="width: 50%" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
54
+ </div>
55
+ <div class="progress mt-2">
56
+ <div class="progress-bar progress-bar-striped bg-warning" role="progressbar" style="width: 75%" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
57
+ </div>
58
+ <div class="progress mt-2">
59
+ <div class="progress-bar progress-bar-striped bg-danger" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
60
+ </div>
61
+ <% end %>
@@ -0,0 +1,62 @@
1
+ <h1 id="content">Spinners</h1>
2
+ <p class="bd-lead">Indicate the loading state of a component or page with Bootstrap spinners, built entirely with HTML, CSS, and no JavaScript.</p>
3
+
4
+ <h2>Border spinner</h2>
5
+ <p>Use the border spinners for a lightweight loading indicator.</p>
6
+
7
+ <%= example_with_code do %>
8
+ <div class="spinner-border text-primary" role="status">
9
+ <span class="visually-hidden">Loading...</span>
10
+ </div>
11
+ <div class="spinner-border text-secondary" role="status">
12
+ <span class="visually-hidden">Loading...</span>
13
+ </div>
14
+ <div class="spinner-border text-success" role="status">
15
+ <span class="visually-hidden">Loading...</span>
16
+ </div>
17
+ <div class="spinner-border text-danger" role="status">
18
+ <span class="visually-hidden">Loading...</span>
19
+ </div>
20
+ <div class="spinner-border text-warning" role="status">
21
+ <span class="visually-hidden">Loading...</span>
22
+ </div>
23
+ <div class="spinner-border text-info" role="status">
24
+ <span class="visually-hidden">Loading...</span>
25
+ </div>
26
+ <div class="spinner-border text-light" role="status">
27
+ <span class="visually-hidden">Loading...</span>
28
+ </div>
29
+ <div class="spinner-border text-dark" role="status">
30
+ <span class="visually-hidden">Loading...</span>
31
+ </div>
32
+ <% end %>
33
+
34
+ <h2>Growing spinner</h2>
35
+ <p>If you don’t fancy a border spinner, switch to the grow spinner. While it doesn’t technically spin, it does repeatedly grow!</p>
36
+
37
+ <%= example_with_code do %>
38
+ <div class="spinner-grow text-primary" role="status">
39
+ <span class="visually-hidden">Loading...</span>
40
+ </div>
41
+ <div class="spinner-grow text-secondary" role="status">
42
+ <span class="visually-hidden">Loading...</span>
43
+ </div>
44
+ <div class="spinner-grow text-success" role="status">
45
+ <span class="visually-hidden">Loading...</span>
46
+ </div>
47
+ <div class="spinner-grow text-danger" role="status">
48
+ <span class="visually-hidden">Loading...</span>
49
+ </div>
50
+ <div class="spinner-grow text-warning" role="status">
51
+ <span class="visually-hidden">Loading...</span>
52
+ </div>
53
+ <div class="spinner-grow text-info" role="status">
54
+ <span class="visually-hidden">Loading...</span>
55
+ </div>
56
+ <div class="spinner-grow text-light" role="status">
57
+ <span class="visually-hidden">Loading...</span>
58
+ </div>
59
+ <div class="spinner-grow text-dark" role="status">
60
+ <span class="visually-hidden">Loading...</span>
61
+ </div>
62
+ <% end %>
@@ -0,0 +1,58 @@
1
+ <h1 id="content">Toasts</h1>
2
+ <p class="bd-lead">Push notifications to your visitors with a toast, a lightweight and easily customizable alert message.</p>
3
+
4
+ <h2>Example</h2>
5
+
6
+ <p>To encourage extensible and predictable toasts, we recommend a header and body. Toast headers use display: flex, allowing easy alignment of content thanks to our margin and flexbox utilities.</p>
7
+
8
+ <p>Toasts are as flexible as you need and have very little required markup. At a minimum, we require a single element to contain your “toasted” content and strongly encourage a dismiss button.</p>
9
+
10
+ <%= example_with_code do %>
11
+ <button type="button" class="btn btn-primary" id="liveToastBtn">Show live toast</button>
12
+
13
+ <div class="position-fixed bottom-0 end-0 p-3" style="z-index: 11">
14
+ <div id="liveToast" class="toast hide" role="alert" aria-live="assertive" aria-atomic="true">
15
+ <div class="toast-header">
16
+ <img src="..." class="rounded me-2" alt="...">
17
+ <strong class="me-auto">Bootstrap</strong>
18
+ <small>11 mins ago</small>
19
+ <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
20
+ </div>
21
+ <div class="toast-body">
22
+ Hello, world! This is a toast message.
23
+ </div>
24
+ </div>
25
+ </div>
26
+ <% end %>
27
+
28
+ <h2>Stacking</h2>
29
+
30
+ <p>You can stack toasts by wrapping them in a toast container, which will vertically add some spacing.</p>
31
+
32
+ <%= example_with_code do %>
33
+ <div class="toast-container">
34
+ <div class="toast" role="alert" aria-live="assertive" aria-atomic="true">
35
+ <div class="toast-header">
36
+ <img src="..." class="rounded me-2" alt="...">
37
+ <strong class="me-auto">Bootstrap</strong>
38
+ <small class="text-muted">just now</small>
39
+ <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
40
+ </div>
41
+ <div class="toast-body">
42
+ See? Just like this.
43
+ </div>
44
+ </div>
45
+
46
+ <div class="toast" role="alert" aria-live="assertive" aria-atomic="true">
47
+ <div class="toast-header">
48
+ <img src="..." class="rounded me-2" alt="...">
49
+ <strong class="me-auto">Bootstrap</strong>
50
+ <small class="text-muted">2 seconds ago</small>
51
+ <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
52
+ </div>
53
+ <div class="toast-body">
54
+ Heads up, toasts will stack automatically
55
+ </div>
56
+ </div>
57
+ </div>
58
+ <% end %>
@@ -0,0 +1,20 @@
1
+ <h1 id="content">Tooltips</h1>
2
+ <p class="bd-lead">Documentation and examples for adding custom Bootstrap tooltips with CSS and JavaScript using CSS3 for animations and data-bs-attributes for local title storage.</p>
3
+
4
+ <h2>Examples</h2>
5
+ <p>Hover over the links below to see tooltips:</p>
6
+
7
+ <%= example_with_code do %>
8
+ <button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="top" title="Tooltip on top">
9
+ Tooltip on top
10
+ </button>
11
+ <button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="right" title="Tooltip on right">
12
+ Tooltip on right
13
+ </button>
14
+ <button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Tooltip on bottom">
15
+ Tooltip on bottom
16
+ </button>
17
+ <button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="left" title="Tooltip on left">
18
+ Tooltip on left
19
+ </button>
20
+ <% end %>
@@ -0,0 +1,5 @@
1
+ <h1 id="content">Images</h1>
2
+ <p>Documentation and examples for opting images into responsive behavior (so they never become larger than their parent elements) and add lightweight styles to them—all via classes.</p>
3
+
4
+ <h2>Responsive images</h2>
5
+ <p>Images in Bootstrap are made responsive with <code>.img-fluid</code>. This applies <code>max-width: 100%;</code> and <code>height: auto;</code> to the image so that it scales with the parent element.</p>