bs5 0.0.23 → 0.0.28

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/app/components/bs5/alert_component.html.erb +1 -1
  3. data/app/components/bs5/alert_component.rb +1 -0
  4. data/app/components/bs5/button_tag_component.rb +10 -1
  5. data/app/components/bs5/carousel/caption_component.html.erb +3 -0
  6. data/app/components/bs5/carousel/caption_component.rb +8 -0
  7. data/app/components/bs5/carousel/item_component.html.erb +4 -0
  8. data/app/components/bs5/carousel/item_component.rb +74 -0
  9. data/app/components/bs5/carousel_component.html.erb +30 -0
  10. data/app/components/bs5/carousel_component.rb +60 -0
  11. data/app/components/bs5/close_button_component.rb +14 -6
  12. data/app/components/bs5/dropdown/item_component.html.erb +1 -0
  13. data/app/components/bs5/dropdown/item_component.rb +39 -0
  14. data/app/components/bs5/dropdown_component.html.erb +22 -0
  15. data/app/components/bs5/dropdown_component.rb +154 -0
  16. data/app/components/bs5/modal/body_component.html.erb +3 -0
  17. data/app/components/bs5/modal/body_component.rb +8 -0
  18. data/app/components/bs5/modal/controller_component.html.erb +1 -0
  19. data/app/components/bs5/modal/controller_component.rb +40 -0
  20. data/app/components/bs5/modal/footer_component.html.erb +4 -0
  21. data/app/components/bs5/modal/footer_component.rb +8 -0
  22. data/app/components/bs5/modal/header_component.html.erb +4 -0
  23. data/app/components/bs5/modal/header_component.rb +18 -0
  24. data/app/components/bs5/modal_component.html.erb +11 -0
  25. data/app/components/bs5/modal_component.rb +80 -0
  26. data/app/components/bs5/toast/body_component.html.erb +3 -0
  27. data/app/components/bs5/toast/body_component.rb +8 -0
  28. data/app/components/bs5/toast/header_component.html.erb +4 -0
  29. data/app/components/bs5/toast/header_component.rb +9 -0
  30. data/app/components/bs5/toast_component.html.erb +8 -0
  31. data/app/components/bs5/toast_component.rb +72 -0
  32. data/app/components/bs5/toast_container_component.html.erb +3 -0
  33. data/app/components/bs5/toast_container_component.rb +19 -0
  34. data/app/helpers/bs5/components_helper.rb +3 -2
  35. data/app/views/bs5/examples/alert/color/snippet.html.erb +8 -24
  36. data/app/views/bs5/examples/alert/default/snippet.html.erb +1 -3
  37. data/app/views/bs5/examples/carousel/_dark_variant.html.erb +2 -0
  38. data/app/views/bs5/examples/carousel/_examples.html.erb +13 -0
  39. data/app/views/bs5/examples/carousel/dark_variant/snippet1.html.erb +25 -0
  40. data/app/views/bs5/examples/carousel/examples/snippet1.html.erb +13 -0
  41. data/app/views/bs5/examples/carousel/examples/snippet2.html.erb +13 -0
  42. data/app/views/bs5/examples/carousel/examples/snippet3.html.erb +13 -0
  43. data/app/views/bs5/examples/carousel/examples/snippet4.html.erb +25 -0
  44. data/app/views/bs5/examples/carousel/examples/snippet5.html.erb +13 -0
  45. data/app/views/bs5/examples/carousel/examples/snippet6.html.erb +13 -0
  46. data/app/views/bs5/examples/dropdowns/dark/_example.html.erb +2 -0
  47. data/app/views/bs5/examples/dropdowns/dark/snippet.html.erb +7 -0
  48. data/app/views/bs5/examples/dropdowns/directions/_example.html.erb +7 -0
  49. data/app/views/bs5/examples/dropdowns/directions/snippet1.html.erb +17 -0
  50. data/app/views/bs5/examples/dropdowns/directions/snippet2.html.erb +17 -0
  51. data/app/views/bs5/examples/dropdowns/directions/snippet3.html.erb +17 -0
  52. data/app/views/bs5/examples/dropdowns/menu_alignment/_example.html.erb +5 -0
  53. data/app/views/bs5/examples/dropdowns/menu_alignment/snippet1.html.erb +5 -0
  54. data/app/views/bs5/examples/dropdowns/menu_alignment/snippet2.html.erb +7 -0
  55. data/app/views/bs5/examples/dropdowns/menu_alignment/snippet3.html.erb +7 -0
  56. data/app/views/bs5/examples/dropdowns/menu_content/_example.html.erb +9 -0
  57. data/app/views/bs5/examples/dropdowns/menu_content/snippet1.html.erb +5 -0
  58. data/app/views/bs5/examples/dropdowns/menu_content/snippet2.html.erb +7 -0
  59. data/app/views/bs5/examples/dropdowns/menu_content/snippet3.html.erb +10 -0
  60. data/app/views/bs5/examples/dropdowns/menu_content/snippet4.html.erb +24 -0
  61. data/app/views/bs5/examples/dropdowns/menu_items/_example.html.erb +7 -0
  62. data/app/views/bs5/examples/dropdowns/menu_items/snippet1.html.erb +5 -0
  63. data/app/views/bs5/examples/dropdowns/menu_items/snippet2.html.erb +6 -0
  64. data/app/views/bs5/examples/dropdowns/menu_items/snippet3.html.erb +5 -0
  65. data/app/views/bs5/examples/dropdowns/menu_items/snippet4.html.erb +5 -0
  66. data/app/views/bs5/examples/dropdowns/single/_example.html.erb +4 -0
  67. data/app/views/bs5/examples/dropdowns/single/snippet1.html.erb +5 -0
  68. data/app/views/bs5/examples/dropdowns/single/snippet2.html.erb +47 -0
  69. data/app/views/bs5/examples/dropdowns/single/snippet3.html.erb +47 -0
  70. data/app/views/bs5/examples/dropdowns/sizing/_example.html.erb +3 -0
  71. data/app/views/bs5/examples/dropdowns/sizing/snippet1.html.erb +17 -0
  72. data/app/views/bs5/examples/dropdowns/sizing/snippet2.html.erb +17 -0
  73. data/app/views/bs5/examples/dropdowns/split/_example.html.erb +3 -0
  74. data/app/views/bs5/examples/dropdowns/split/snippet1.html.erb +35 -0
  75. data/app/views/bs5/examples/dropdowns/split/snippet2.html.erb +47 -0
  76. data/app/views/bs5/examples/list_group/active/snippet.html.erb +5 -5
  77. data/app/views/bs5/examples/list_group/default/snippet.html.erb +5 -5
  78. data/app/views/bs5/examples/list_group/disabled/snippet.html.erb +5 -5
  79. data/app/views/bs5/examples/list_group/flush/snippet.html.erb +5 -5
  80. data/app/views/bs5/examples/list_group/horizontal/snippet.html.erb +18 -18
  81. data/app/views/bs5/examples/list_group/style/default.html.erb +8 -8
  82. data/app/views/bs5/examples/modal/_examples.html.erb +9 -0
  83. data/app/views/bs5/examples/modal/_fullscreen.html.erb +2 -0
  84. data/app/views/bs5/examples/modal/_optional_sizes.html.erb +2 -0
  85. data/app/views/bs5/examples/modal/examples/snippet1.html.erb +12 -0
  86. data/app/views/bs5/examples/modal/examples/snippet2.html.erb +12 -0
  87. data/app/views/bs5/examples/modal/examples/snippet3.html.erb +14 -0
  88. data/app/views/bs5/examples/modal/examples/snippet4.html.erb +12 -0
  89. data/app/views/bs5/examples/modal/fullscreen/snippet1.html.erb +55 -0
  90. data/app/views/bs5/examples/modal/optional_sizes/snippet1.html.erb +23 -0
  91. data/app/views/bs5/examples/toasts/color_schemes/_example.html.erb +2 -0
  92. data/app/views/bs5/examples/toasts/color_schemes/snippet.html.erb +33 -0
  93. data/app/views/bs5/examples/toasts/custom_content/_example.html.erb +3 -0
  94. data/app/views/bs5/examples/toasts/custom_content/snippet1.html.erb +3 -0
  95. data/app/views/bs5/examples/toasts/custom_content/snippet2.html.erb +9 -0
  96. data/app/views/bs5/examples/toasts/default/_example.html.erb +2 -0
  97. data/app/views/bs5/examples/toasts/default/snippet.html.erb +17 -0
  98. data/app/views/bs5/examples/toasts/js_options/_example.html.erb +2 -0
  99. data/app/views/bs5/examples/toasts/js_options/snippet.html.erb +23 -0
  100. data/app/views/bs5/examples/toasts/placement/_example.html.erb +3 -0
  101. data/app/views/bs5/examples/toasts/placement/snippet1.html.erb +44 -0
  102. data/app/views/bs5/examples/toasts/placement/snippet2.html.erb +24 -0
  103. data/app/views/bs5/examples/toasts/stacking/_example.html.erb +2 -0
  104. data/app/views/bs5/examples/toasts/stacking/snippet.html.erb +37 -0
  105. data/app/views/bs5/pages/carousel.html.erb +3 -0
  106. data/app/views/bs5/pages/dropdowns.html.erb +10 -0
  107. data/app/views/bs5/pages/modal.html.erb +4 -0
  108. data/app/views/bs5/pages/toasts.html.erb +7 -0
  109. data/app/views/layouts/bs5/pages.html.erb +4 -0
  110. data/lib/bs5/version.rb +1 -1
  111. data/lib/generators/bs5/install/templates/bs5.js +24 -13
  112. data/lib/tasks/rubocop.rake +2 -0
  113. metadata +96 -2
@@ -0,0 +1,3 @@
1
+ <h3>Split button</h3>
2
+ <%= bs5_example(snippet: 'dropdowns/split/snippet1') %>
3
+ <%= bs5_example(snippet: 'dropdowns/split/snippet2') %>
@@ -0,0 +1,35 @@
1
+ <%= bs5_dropdown('Primary', split: true, color: :primary) do |d| %>
2
+ <%= d.item do %><%= link_to 'Action', '#' %><% end %>
3
+ <%= d.item do %><%= link_to 'Another action', '#' %><% end %>
4
+ <%= d.item do %><%= link_to 'Something else here', '#' %><% end %>
5
+ <% end %>
6
+
7
+ <%= bs5_dropdown('Secondary', split: true, color: :secondary) do |d| %>
8
+ <%= d.item do %><%= link_to 'Action', '#' %><% end %>
9
+ <%= d.item do %><%= link_to 'Another action', '#' %><% end %>
10
+ <%= d.item do %><%= link_to 'Something else here', '#' %><% end %>
11
+ <% end %>
12
+
13
+ <%= bs5_dropdown('Success', split: true, color: :success) do |d| %>
14
+ <%= d.item do %><%= link_to 'Action', '#' %><% end %>
15
+ <%= d.item do %><%= link_to 'Another action', '#' %><% end %>
16
+ <%= d.item do %><%= link_to 'Something else here', '#' %><% end %>
17
+ <% end %>
18
+
19
+ <%= bs5_dropdown('Info', split: true, color: :info) do |d| %>
20
+ <%= d.item do %><%= link_to 'Action', '#' %><% end %>
21
+ <%= d.item do %><%= link_to 'Another action', '#' %><% end %>
22
+ <%= d.item do %><%= link_to 'Something else here', '#' %><% end %>
23
+ <% end %>
24
+
25
+ <%= bs5_dropdown('Warning', split: true, color: :warning) do |d| %>
26
+ <%= d.item do %><%= link_to 'Action', '#' %><% end %>
27
+ <%= d.item do %><%= link_to 'Another action', '#' %><% end %>
28
+ <%= d.item do %><%= link_to 'Something else here', '#' %><% end %>
29
+ <% end %>
30
+
31
+ <%= bs5_dropdown('Danger', split: true, color: :danger) do |d| %>
32
+ <%= d.item do %><%= link_to 'Action', '#' %><% end %>
33
+ <%= d.item do %><%= link_to 'Another action', '#' %><% end %>
34
+ <%= d.item do %><%= link_to 'Something else here', '#' %><% end %>
35
+ <% end %>
@@ -0,0 +1,47 @@
1
+ <%= bs5_dropdown('Primary', split: true, color: :primary, outline: true) do |d| %>
2
+ <%= d.item do %><%= link_to 'Action', '#' %><% end %>
3
+ <%= d.item do %><%= link_to 'Another action', '#' %><% end %>
4
+ <%= d.item do %><%= link_to 'Something else here', '#' %><% end %>
5
+ <%= d.item %>
6
+ <%= d.item do %><%= link_to 'Separated link', '#' %><% end %>
7
+ <% end %>
8
+
9
+ <%= bs5_dropdown('Secondary', split: true, color: :secondary, outline: true) do |d| %>
10
+ <%= d.item do %><%= link_to 'Action', '#' %><% end %>
11
+ <%= d.item do %><%= link_to 'Another action', '#' %><% end %>
12
+ <%= d.item do %><%= link_to 'Something else here', '#' %><% end %>
13
+ <%= d.item %>
14
+ <%= d.item do %><%= link_to 'Separated link', '#' %><% end %>
15
+ <% end %>
16
+
17
+ <%= bs5_dropdown('Success', split: true, color: :success, outline: true) do |d| %>
18
+ <%= d.item do %><%= link_to 'Action', '#' %><% end %>
19
+ <%= d.item do %><%= link_to 'Another action', '#' %><% end %>
20
+ <%= d.item do %><%= link_to 'Something else here', '#' %><% end %>
21
+ <%= d.item %>
22
+ <%= d.item do %><%= link_to 'Separated link', '#' %><% end %>
23
+ <% end %>
24
+
25
+ <%= bs5_dropdown('Info', split: true, color: :info, outline: true) do |d| %>
26
+ <%= d.item do %><%= link_to 'Action', '#' %><% end %>
27
+ <%= d.item do %><%= link_to 'Another action', '#' %><% end %>
28
+ <%= d.item do %><%= link_to 'Something else here', '#' %><% end %>
29
+ <%= d.item %>
30
+ <%= d.item do %><%= link_to 'Separated link', '#' %><% end %>
31
+ <% end %>
32
+
33
+ <%= bs5_dropdown('Warning', split: true, color: :warning, outline: true) do |d| %>
34
+ <%= d.item do %><%= link_to 'Action', '#' %><% end %>
35
+ <%= d.item do %><%= link_to 'Another action', '#' %><% end %>
36
+ <%= d.item do %><%= link_to 'Something else here', '#' %><% end %>
37
+ <%= d.item %>
38
+ <%= d.item do %><%= link_to 'Separated link', '#' %><% end %>
39
+ <% end %>
40
+
41
+ <%= bs5_dropdown('Danger', split: true, color: :danger, outline: true) do |d| %>
42
+ <%= d.item do %><%= link_to 'Action', '#' %><% end %>
43
+ <%= d.item do %><%= link_to 'Another action', '#' %><% end %>
44
+ <%= d.item do %><%= link_to 'Something else here', '#' %><% end %>
45
+ <%= d.item %>
46
+ <%= d.item do %><%= link_to 'Separated link', '#' %><% end %>
47
+ <% end %>
@@ -1,7 +1,7 @@
1
1
  <%= bs5_list_group do |lg| %>
2
- <% lg.item(active: true) do %>Cras justo odio<% end %>
3
- <% lg.item do %>Dapibus ac facilisis in<% end %>
4
- <% lg.item do %>Morbi leo risus<% end %>
5
- <% lg.item do %>Porta ac consectetur ac<% end %>
6
- <% lg.item do %>Vestibulum at eros<% end %>
2
+ <% lg.item(active: true) { "Cras justo odio" } %>
3
+ <% lg.item { "Dapibus ac facilisis in" } %>
4
+ <% lg.item { "Morbi leo risus" } %>
5
+ <% lg.item { "Porta ac consectetur ac" } %>
6
+ <% lg.item { "Vestibulum at eros" } %>
7
7
  <%- end %>
@@ -1,7 +1,7 @@
1
1
  <%= bs5_list_group do |lg| %>
2
- <% lg.item do %>Cras justo odio<% end %>
3
- <% lg.item do %>Dapibus ac facilisis in<% end %>
4
- <% lg.item do %>Morbi leo risus<% end %>
5
- <% lg.item do %>Porta ac consectetur ac<% end %>
6
- <% lg.item do %>Vestibulum at eros<% end %>
2
+ <% lg.item { "Cras justo odio" } %>
3
+ <% lg.item { "Dapibus ac facilisis in" } %>
4
+ <% lg.item { "Morbi leo risus" } %>
5
+ <% lg.item { "Porta ac consectetur ac" } %>
6
+ <% lg.item { "Vestibulum at eros" } %>
7
7
  <%- end %>
@@ -1,7 +1,7 @@
1
1
  <%= bs5_list_group do |lg| %>
2
- <% lg.item(disabled: true) do %>Cras justo odio<% end %>
3
- <% lg.item do %>Dapibus ac facilisis in<% end %>
4
- <% lg.item do %>Morbi leo risus<% end %>
5
- <% lg.item do %>Porta ac consectetur ac<% end %>
6
- <% lg.item do %>Vestibulum at eros<% end %>
2
+ <% lg.item(disabled: true) { "Cras justo odio" } %>
3
+ <% lg.item { "Dapibus ac facilisis in" } %>
4
+ <% lg.item { "Morbi leo risus" } %>
5
+ <% lg.item { "Porta ac consectetur ac" } %>
6
+ <% lg.item { "Vestibulum at eros" } %>
7
7
  <%- end %>
@@ -1,7 +1,7 @@
1
1
  <%= bs5_list_group(flush: true) do |lg| %>
2
- <% lg.item do %>Cras justo odio<% end %>
3
- <% lg.item do %>Dapibus ac facilisis in<% end %>
4
- <% lg.item do %>Morbi leo risus<% end %>
5
- <% lg.item do %>Porta ac consectetur ac<% end %>
6
- <% lg.item do %>Vestibulum at eros<% end %>
2
+ <% lg.item { "Cras justo odio" } %>
3
+ <% lg.item { "Dapibus ac facilisis in" } %>
4
+ <% lg.item { "Morbi leo risus" } %>
5
+ <% lg.item { "Porta ac consectetur ac" } %>
6
+ <% lg.item { "Vestibulum at eros" } %>
7
7
  <%- end %>
@@ -1,30 +1,30 @@
1
1
  <%= bs5_list_group(horizontal: true) do |lg| %>
2
- <% lg.item do %>Cras justo odio<% end %>
3
- <% lg.item do %>Dapibus ac facilisis in<% end %>
4
- <% lg.item do %>Morbi leo risus<% end %>
2
+ <% lg.item { "Cras justo odio" } %>
3
+ <% lg.item { "Dapibus ac facilisis in" } %>
4
+ <% lg.item { "Morbi leo risus" } %>
5
5
  <%- end %>
6
6
  <%= bs5_list_group(horizontal: :sm) do |lg| %>
7
- <% lg.item do %>Cras justo odio<% end %>
8
- <% lg.item do %>Dapibus ac facilisis in<% end %>
9
- <% lg.item do %>Morbi leo risus<% end %>
7
+ <% lg.item { "Cras justo odio" } %>
8
+ <% lg.item { "Dapibus ac facilisis in" } %>
9
+ <% lg.item { "Morbi leo risus" } %>
10
10
  <%- end %>
11
11
  <%= bs5_list_group(horizontal: :md) do |lg| %>
12
- <% lg.item do %>Cras justo odio<% end %>
13
- <% lg.item do %>Dapibus ac facilisis in<% end %>
14
- <% lg.item do %>Morbi leo risus<% end %>
12
+ <% lg.item { "Cras justo odio" } %>
13
+ <% lg.item { "Dapibus ac facilisis in" } %>
14
+ <% lg.item { "Morbi leo risus" } %>
15
15
  <%- end %>
16
16
  <%= bs5_list_group(horizontal: :lg) do |lg| %>
17
- <% lg.item do %>Cras justo odio<% end %>
18
- <% lg.item do %>Dapibus ac facilisis in<% end %>
19
- <% lg.item do %>Morbi leo risus<% end %>
17
+ <% lg.item { "Cras justo odio" } %>
18
+ <% lg.item { "Dapibus ac facilisis in" } %>
19
+ <% lg.item { "Morbi leo risus" } %>
20
20
  <%- end %>
21
21
  <%= bs5_list_group(horizontal: :xl) do |lg| %>
22
- <% lg.item do %>Cras justo odio<% end %>
23
- <% lg.item do %>Dapibus ac facilisis in<% end %>
24
- <% lg.item do %>Morbi leo risus<% end %>
22
+ <% lg.item { "Cras justo odio" } %>
23
+ <% lg.item { "Dapibus ac facilisis in" } %>
24
+ <% lg.item { "Morbi leo risus" } %>
25
25
  <%- end %>
26
26
  <%= bs5_list_group(horizontal: :xxl) do |lg| %>
27
- <% lg.item do %>Cras justo odio<% end %>
28
- <% lg.item do %>Dapibus ac facilisis in<% end %>
29
- <% lg.item do %>Morbi leo risus<% end %>
27
+ <% lg.item { "Cras justo odio" } %>
28
+ <% lg.item { "Dapibus ac facilisis in" } %>
29
+ <% lg.item { "Morbi leo risus" } %>
30
30
  <%- end %>
@@ -1,11 +1,11 @@
1
1
  <%= bs5_list_group do |lg| %>
2
2
  <% lg.item do %>Dapibus ac facilisis in<% end %>
3
- <% lg.item(color: :primary) do %>A simple primary list group item<% end %>
4
- <% lg.item(color: :secondary) do %>A simple secondary list group item<% end %>
5
- <% lg.item(color: :success) do %>A simple success list group item<% end %>
6
- <% lg.item(color: :danger) do %>A simple danger list group item<% end %>
7
- <% lg.item(color: :warning) do %>A simple warning list group item<% end %>
8
- <% lg.item(color: :info) do %>A simple info list group item<% end %>
9
- <% lg.item(color: :light) do %>A simple light list group item<% end %>
10
- <% lg.item(color: :dark) do %>A simple dark list group item<% end %>
3
+ <% lg.item(color: :primary) { "A simple primary list group item" } %>
4
+ <% lg.item(color: :secondary) { "A simple secondary list group item" } %>
5
+ <% lg.item(color: :success) { "A simple success list group item" } %>
6
+ <% lg.item(color: :danger) { "A simple danger list group item" } %>
7
+ <% lg.item(color: :warning) { "A simple warning list group item" } %>
8
+ <% lg.item(color: :info) { "A simple info list group item" } %>
9
+ <% lg.item(color: :light) { "A simple light list group item" } %>
10
+ <% lg.item(color: :dark) { "A simple dark list group item" } %>
11
11
  <%- end %>
@@ -0,0 +1,9 @@
1
+ <h2>Examples</h2>
2
+ <h3>Live demo</h3>
3
+ <%= bs5_example(snippet: 'modal/examples/snippet1') %>
4
+ <h3>Static backdrop</h3>
5
+ <%= bs5_example(snippet: 'modal/examples/snippet2') %>
6
+ <h3>Scrolling long content</h3>
7
+ <%= bs5_example(snippet: 'modal/examples/snippet3') %>
8
+ <h3>Vertically centered</h3>
9
+ <%= bs5_example(snippet: 'modal/examples/snippet4') %>
@@ -0,0 +1,2 @@
1
+ <h2>Fullscreen Modal</h2>
2
+ <%= bs5_example(snippet: 'modal/fullscreen/snippet1') %>
@@ -0,0 +1,2 @@
1
+ <h2>Optional sizes</h2>
2
+ <%= bs5_example(snippet: 'modal/optional_sizes/snippet1') %>
@@ -0,0 +1,12 @@
1
+ <%= bs5_modal do |m| %>
2
+ <%= m.controller do %>
3
+ <%= bs5_button_tag('Launch demo modal', type: 'button') %>
4
+ <% end %>
5
+ <%= m.header { 'Modal title' } %>
6
+ <%= m.body do %>
7
+ <p>Modal body text goes here.</p>
8
+ <% end %>
9
+ <%= m.footer do %>
10
+ <%= bs5_button_tag('Save changes', type: 'button') %>
11
+ <% end %>
12
+ <% end %>
@@ -0,0 +1,12 @@
1
+ <%= bs5_modal(backdrop: :static, keyboard: false) do |m| %>
2
+ <%= m.controller do %>
3
+ <%= bs5_button_tag('Launch demo modal', type: 'button') %>
4
+ <% end %>
5
+ <%= m.header { 'Modal title' } %>
6
+ <%= m.body do %>
7
+ <p>I will not close if you click outside me. Don't even try to press escape key.</p>
8
+ <% end %>
9
+ <%= m.footer do %>
10
+ <%= bs5_button_tag('Understood', type: 'button') %>
11
+ <% end %>
12
+ <% end %>
@@ -0,0 +1,14 @@
1
+ <%= bs5_modal(scroll: true) do |m| %>
2
+ <%= m.controller do %>
3
+ <%= bs5_button_tag('Launch demo modal', type: 'button') %>
4
+ <% end %>
5
+ <%= m.header { 'Modal title' } %>
6
+ <%= m.body do %>
7
+ <% 15.times do %>
8
+ <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
9
+ <% end %>
10
+ <% end %>
11
+ <%= m.footer do %>
12
+ <%= bs5_button_tag('Save changes', type: 'button') %>
13
+ <% end %>
14
+ <% end %>
@@ -0,0 +1,12 @@
1
+ <%= bs5_modal(center: true) do |m| %>
2
+ <%= m.controller do %>
3
+ <%= bs5_button_tag('Launch demo modal', type: 'button') %>
4
+ <% end %>
5
+ <%= m.header { 'Modal title' } %>
6
+ <%= m.body do %>
7
+ <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
8
+ <% end %>
9
+ <%= m.footer do %>
10
+ <%= bs5_button_tag('Save changes', type: 'button') %>
11
+ <% end %>
12
+ <% end %>
@@ -0,0 +1,55 @@
1
+ <%= bs5_modal(fullscreen: true) do |m| %>
2
+ <%= m.controller do %>
3
+ <%= bs5_button_tag('Full screen', type: 'button') %>
4
+ <% end %>
5
+ <%= m.header { 'Full screen modal' } %>
6
+ <%= m.body do %>
7
+ <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
8
+ <% end %>
9
+ <%= m.footer {} %>
10
+ <% end %>
11
+
12
+ <%= bs5_modal(fullscreen: :sm) do |m| %>
13
+ <%= m.controller do %>
14
+ <%= bs5_button_tag('Full screen below sm', type: 'button') %>
15
+ <% end %>
16
+ <%= m.header { 'Full screen below sm' } %>
17
+ <%= m.body { '...'} %>
18
+ <%= m.footer {} %>
19
+ <% end %>
20
+
21
+ <%= bs5_modal(fullscreen: :md) do |m| %>
22
+ <%= m.controller do %>
23
+ <%= bs5_button_tag('Full screen below md', type: 'button') %>
24
+ <% end %>
25
+ <%= m.header { 'Full screen below md' } %>
26
+ <%= m.body { '...'} %>
27
+ <%= m.footer {} %>
28
+ <% end %>
29
+
30
+ <%= bs5_modal(fullscreen: :lg) do |m| %>
31
+ <%= m.controller do %>
32
+ <%= bs5_button_tag('Full screen below lg', type: 'button') %>
33
+ <% end %>
34
+ <%= m.header { 'Full screen below lg' } %>
35
+ <%= m.body { '...'} %>
36
+ <%= m.footer {} %>
37
+ <% end %>
38
+
39
+ <%= bs5_modal(fullscreen: :xl) do |m| %>
40
+ <%= m.controller do %>
41
+ <%= bs5_button_tag('Full screen below xl', type: 'button') %>
42
+ <% end %>
43
+ <%= m.header { 'Full screen below xl' } %>
44
+ <%= m.body { '...'} %>
45
+ <%= m.footer {} %>
46
+ <% end %>
47
+
48
+ <%= bs5_modal(fullscreen: :xxl) do |m| %>
49
+ <%= m.controller do %>
50
+ <%= bs5_button_tag('Full screen below xxl', type: 'button') %>
51
+ <% end %>
52
+ <%= m.header { 'Full screen below xxl' } %>
53
+ <%= m.body { '...'} %>
54
+ <%= m.footer {} %>
55
+ <% end %>
@@ -0,0 +1,23 @@
1
+ <%= bs5_modal(size: :xl) do |m| %>
2
+ <%= m.controller do %>
3
+ <%= bs5_button_tag('Extra large modal', type: 'button') %>
4
+ <% end %>
5
+ <%= m.header { 'Extra large modal' } %>
6
+ <%= m.body { '...' } %>
7
+ <% end %>
8
+
9
+ <%= bs5_modal(size: :lg) do |m| %>
10
+ <%= m.controller do %>
11
+ <%= bs5_button_tag('Large modal', type: 'button') %>
12
+ <% end %>
13
+ <%= m.header { 'Large modal' } %>
14
+ <%= m.body { '...' } %>
15
+ <% end %>
16
+
17
+ <%= bs5_modal(size: :sm) do |m| %>
18
+ <%= m.controller do %>
19
+ <%= bs5_button_tag('Small modal', type: 'button') %>
20
+ <% end %>
21
+ <%= m.header { 'Small modal' } %>
22
+ <%= m.body { '...' } %>
23
+ <% end %>
@@ -0,0 +1,2 @@
1
+ <h2>Color schemes</h2>
2
+ <%= bs5_example(snippet: 'toasts/color_schemes/snippet') %>
@@ -0,0 +1,33 @@
1
+ <%= bs5_toast_container do %>
2
+ <%= bs5_toast(color: :primary, class: 'd-flex align-items-center') do |t| %>
3
+ <%= t.body do %>Hello, world! This is a toast message.<% end %>
4
+ <% end %>
5
+
6
+ <%= bs5_toast(color: :secondary, class: 'd-flex align-items-center') do |t| %>
7
+ <%= t.body do %>Hello, world! This is a toast message.<% end %>
8
+ <% end %>
9
+
10
+ <%= bs5_toast(color: :success, class: 'd-flex align-items-center') do |t| %>
11
+ <%= t.body do %>Hello, world! This is a toast message.<% end %>
12
+ <% end %>
13
+
14
+ <%= bs5_toast(color: :danger, class: 'd-flex align-items-center') do |t| %>
15
+ <%= t.body do %>Hello, world! This is a toast message.<% end %>
16
+ <% end %>
17
+
18
+ <%= bs5_toast(color: :warning, class: 'd-flex align-items-center') do |t| %>
19
+ <%= t.body do %>Hello, world! This is a toast message.<% end %>
20
+ <% end %>
21
+
22
+ <%= bs5_toast(color: :info, class: 'd-flex align-items-center') do |t| %>
23
+ <%= t.body do %>Hello, world! This is a toast message.<% end %>
24
+ <% end %>
25
+
26
+ <%= bs5_toast(color: :light, class: 'd-flex align-items-center') do |t| %>
27
+ <%= t.body do %>Hello, world! This is a toast message.<% end %>
28
+ <% end %>
29
+
30
+ <%= bs5_toast(color: :dark, class: 'd-flex align-items-center') do |t| %>
31
+ <%= t.body do %>Hello, world! This is a toast message.<% end %>
32
+ <% end %>
33
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <h2>Custom content</h2>
2
+ <%= bs5_example(snippet: 'toasts/custom_content/snippet1') %>
3
+ <%= bs5_example(snippet: 'toasts/custom_content/snippet2') %>
@@ -0,0 +1,3 @@
1
+ <%= bs5_toast(class: 'd-flex align-items-center') do |t| %>
2
+ <%= t.body do %>Hello, world! This is a toast message.<% end %>
3
+ <% end %>
@@ -0,0 +1,9 @@
1
+ <%= bs5_toast(close_button: false) do |t| %>
2
+ <%= t.body do %>
3
+ Hello, world! This is a toast message.
4
+ <div class="mt-2 pt-2 border-top">
5
+ <%= bs5_button_tag('Take action', color: :primary, size: :small) %>
6
+ <%= bs5_button_tag('Close', color: :secondary, size: :small, dismiss: :toast) %>
7
+ </div>
8
+ <% end %>
9
+ <% end %>
@@ -0,0 +1,2 @@
1
+ <h2>Default</h2>
2
+ <%= bs5_example(snippet: 'toasts/default/snippet') %>
@@ -0,0 +1,17 @@
1
+ <%= bs5_toast do |t| %>
2
+ <%= t.header do %>
3
+ <svg
4
+ class="bd-placeholder-img rounded me-2"
5
+ width="20"
6
+ height="20"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ aria-hidden="true"
9
+ focusable="false"
10
+ >
11
+ <rect width="100%" height="100%" fill="#007aff"></rect>
12
+ </svg>
13
+ <strong class="me-auto">Bootstrap</strong>
14
+ <small>11 mins ago</small>
15
+ <% end %>
16
+ <%= t.body { "Hello, world! This is a toast message." } %>
17
+ <% end %>