bootstrap_leather 0.9.4 → 0.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +1 -0
  3. data/.rubocop.yml +23 -0
  4. data/.rubocop_todo.yml +12 -0
  5. data/.ruby-gemset +1 -1
  6. data/.ruby-version +1 -1
  7. data/.travis.yml +5 -0
  8. data/Gemfile +40 -7
  9. data/LICENSE.txt +1 -1
  10. data/README.md +260 -0
  11. data/Rakefile +35 -20
  12. data/VERSION +1 -1
  13. data/app/helpers/bootstrap_leather/alerts_helper.rb +36 -0
  14. data/app/helpers/bootstrap_leather/application_helper.rb +21 -0
  15. data/app/helpers/bootstrap_leather/badges_helper.rb +21 -0
  16. data/app/helpers/bootstrap_leather/carousels_helper.rb +32 -0
  17. data/app/helpers/bootstrap_leather/foot_helper.rb +14 -0
  18. data/app/helpers/bootstrap_leather/grid_helper.rb +10 -0
  19. data/app/helpers/bootstrap_leather/head_helper.rb +67 -0
  20. data/app/helpers/bootstrap_leather/hero_unit_helper.rb +14 -0
  21. data/app/helpers/bootstrap_leather/icons_helper.rb +33 -0
  22. data/app/helpers/bootstrap_leather/modals_helper.rb +20 -0
  23. data/app/helpers/bootstrap_leather/navigation_helper.rb +71 -0
  24. data/app/helpers/bootstrap_leather/tabs_helper.rb +28 -0
  25. data/app/helpers/bootstrap_leather/thumbnails_helper.rb +13 -0
  26. data/app/helpers/bootstrap_leather/typography_helper.rb +38 -0
  27. data/app/helpers/bootstrap_leather/widgets_helper.rb +29 -0
  28. data/app/views/bootstrap_leather/{_alert.html.haml → alerts/_alert.html.haml} +1 -1
  29. data/app/views/bootstrap_leather/{_alert_flash_messages.html.haml → alerts/_alert_flash_messages.html.haml} +0 -0
  30. data/app/views/bootstrap_leather/{_badge.html.haml → badges/_badge.html.haml} +1 -1
  31. data/app/views/bootstrap_leather/badges/_badge_to.html.haml +3 -0
  32. data/app/views/bootstrap_leather/{_carousel.html.haml → carousels/_carousel.html.haml} +0 -0
  33. data/app/views/bootstrap_leather/{_carousel_with_thumbnails.html.haml → carousels/_carousel_with_thumbnails.html.haml} +0 -0
  34. data/app/views/bootstrap_leather/{_footer_javascript.html.haml → foot/_footer_javascript.html.haml} +0 -0
  35. data/app/views/bootstrap_leather/{_head_css.html.haml → head/_head_css.html.haml} +0 -0
  36. data/app/views/bootstrap_leather/{_hero_unit.html.haml → hero_unit/_hero_unit.html.haml} +0 -0
  37. data/app/views/bootstrap_leather/{_icon.html.haml → icons/_icon.html.haml} +0 -0
  38. data/app/views/bootstrap_leather/{_icon_button_to.html.haml → icons/_icon_button_to.html.haml} +0 -0
  39. data/app/views/bootstrap_leather/{_icon_link_to.html.haml → icons/_icon_link_to.html.haml} +0 -0
  40. data/app/views/bootstrap_leather/{_modal.html.haml → modals/_modal.html.haml} +2 -2
  41. data/app/views/bootstrap_leather/navigation/_dropdown_nav_item.html.haml +6 -0
  42. data/app/views/bootstrap_leather/navigation/_hamburger_menu.html.haml +6 -0
  43. data/app/views/bootstrap_leather/{_logo_and_title.html.haml → navigation/_logo_and_title.html.haml} +0 -0
  44. data/app/views/bootstrap_leather/{_nav_heading.html.haml → navigation/_nav_heading.html.haml} +0 -0
  45. data/app/views/bootstrap_leather/{_nav_item.html.haml → navigation/_nav_item.html.haml} +0 -0
  46. data/app/views/bootstrap_leather/{_nav_list.html.haml → navigation/_nav_list.html.haml} +0 -0
  47. data/app/views/bootstrap_leather/navigation/_navbar.html.haml +14 -0
  48. data/app/views/bootstrap_leather/navigation/_navbar_contents.html.haml +5 -0
  49. data/app/views/bootstrap_leather/tabs/_tabs.html.haml +10 -0
  50. data/app/views/bootstrap_leather/{_thumbnail.html.haml → thumbnails/_thumbnail.html.haml} +0 -0
  51. data/app/views/bootstrap_leather/{_definition_list.html.haml → typography/_dl.html.haml} +0 -0
  52. data/app/views/bootstrap_leather/{_page_header.html.haml → typography/_page_header.html.haml} +1 -1
  53. data/app/views/bootstrap_leather/widgets/_widgets.html.haml +10 -0
  54. data/bin/rails +15 -0
  55. data/bootstrap_leather.gemspec +219 -57
  56. data/config/locales/en.yml +9 -0
  57. data/lib/bootstrap_leather/configuration.rb +16 -12
  58. data/lib/bootstrap_leather/engine.rb +19 -4
  59. data/lib/bootstrap_leather/localization.rb +20 -18
  60. data/lib/bootstrap_leather/version.rb +4 -1
  61. data/lib/bootstrap_leather.rb +6 -2
  62. data/lib/generators/bootstrap_leather/install/install_generator.rb +21 -19
  63. data/lib/generators/bootstrap_leather/install/templates/initializer.rb +3 -1
  64. data/lib/generators/bootstrap_leather/utils.rb +13 -4
  65. data/lib/templates/erb/scaffold/_form.html.erb +11 -0
  66. data/lib/templates/erb/scaffold/edit.html.erb +9 -0
  67. data/lib/templates/erb/scaffold/index.html.erb +29 -0
  68. data/lib/templates/erb/scaffold/new.html.erb +7 -0
  69. data/lib/templates/erb/scaffold/show.html.erb +12 -0
  70. data/lib/templates/haml/scaffold/_form.html.haml +10 -0
  71. data/lib/templates/haml/scaffold/edit.html.haml +8 -0
  72. data/lib/templates/haml/scaffold/index.html.haml +21 -0
  73. data/lib/templates/haml/scaffold/new.html.haml +6 -0
  74. data/lib/templates/haml/scaffold/show.html.haml +10 -0
  75. data/spec/dummy/Rakefile +9 -0
  76. data/spec/dummy/app/assets/images/.keep +0 -0
  77. data/spec/dummy/app/assets/javascripts/application.js +16 -0
  78. data/spec/dummy/app/assets/stylesheets/application.scss +19 -0
  79. data/spec/dummy/app/assets/stylesheets/bootstrap-everything.scss +54 -0
  80. data/spec/dummy/app/controllers/application_controller.rb +6 -0
  81. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  82. data/spec/dummy/app/controllers/doo_dads_controller.rb +58 -0
  83. data/spec/dummy/app/controllers/erbits_controller.rb +58 -0
  84. data/spec/dummy/app/controllers/whatzits_controller.rb +58 -0
  85. data/spec/dummy/app/helpers/application_helper.rb +4 -0
  86. data/spec/dummy/app/mailers/application_mailer.rb +6 -0
  87. data/spec/dummy/app/models/application_record.rb +5 -0
  88. data/spec/dummy/app/models/concerns/.keep +0 -0
  89. data/spec/dummy/app/models/doo_dad.rb +3 -0
  90. data/spec/dummy/app/models/erbit.rb +2 -0
  91. data/spec/dummy/app/models/whatzit.rb +2 -0
  92. data/spec/dummy/app/views/doo_dads/_form.html.haml +16 -0
  93. data/spec/dummy/app/views/doo_dads/edit.html.haml +7 -0
  94. data/spec/dummy/app/views/doo_dads/index.html.haml +23 -0
  95. data/spec/dummy/app/views/doo_dads/new.html.haml +5 -0
  96. data/spec/dummy/app/views/doo_dads/show.html.haml +12 -0
  97. data/spec/dummy/app/views/erbits/_form.html.erb +5 -0
  98. data/spec/dummy/app/views/erbits/edit.html.erb +9 -0
  99. data/spec/dummy/app/views/erbits/index.html.erb +27 -0
  100. data/spec/dummy/app/views/erbits/new.html.erb +7 -0
  101. data/spec/dummy/app/views/erbits/show.html.erb +12 -0
  102. data/spec/dummy/app/views/layouts/application.html.haml +22 -0
  103. data/spec/dummy/app/views/pages/index.html.haml +1 -0
  104. data/spec/dummy/app/views/pages/style_guide.html.haml +801 -0
  105. data/spec/dummy/app/views/whatzits/_form.html.haml +4 -0
  106. data/spec/dummy/app/views/whatzits/edit.html.haml +8 -0
  107. data/spec/dummy/app/views/whatzits/index.html.haml +19 -0
  108. data/spec/dummy/app/views/whatzits/new.html.haml +6 -0
  109. data/spec/dummy/app/views/whatzits/show.html.haml +10 -0
  110. data/spec/dummy/bin/bundle +5 -0
  111. data/spec/dummy/bin/rails +6 -0
  112. data/spec/dummy/bin/rake +6 -0
  113. data/spec/dummy/bin/setup +36 -0
  114. data/spec/dummy/bin/update +31 -0
  115. data/spec/dummy/config/application.rb +36 -0
  116. data/spec/dummy/config/boot.rb +7 -0
  117. data/spec/dummy/config/cable.yml +9 -0
  118. data/spec/dummy/config/database.yml +25 -0
  119. data/spec/dummy/config/environment.rb +7 -0
  120. data/spec/dummy/config/environments/development.rb +57 -0
  121. data/spec/dummy/config/environments/test.rb +45 -0
  122. data/spec/dummy/config/initializers/application_controller_renderer.rb +7 -0
  123. data/spec/dummy/config/initializers/assets.rb +14 -0
  124. data/spec/dummy/config/initializers/backtrace_silencers.rb +10 -0
  125. data/spec/dummy/config/initializers/bootstrap_leather.rb +9 -0
  126. data/spec/dummy/config/initializers/cookies_serializer.rb +7 -0
  127. data/spec/dummy/config/initializers/filter_parameter_logging.rb +6 -0
  128. data/spec/dummy/config/initializers/high_voltage.rb +5 -0
  129. data/spec/dummy/config/initializers/inflections.rb +17 -0
  130. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  131. data/spec/dummy/config/initializers/new_framework_defaults.rb +29 -0
  132. data/spec/dummy/config/initializers/session_store.rb +5 -0
  133. data/spec/dummy/config/initializers/wrap_parameters.rb +17 -0
  134. data/spec/dummy/config/locales/en.yml +23 -0
  135. data/spec/dummy/config/puma.rb +49 -0
  136. data/spec/dummy/config/routes.rb +8 -0
  137. data/spec/dummy/config/secrets.yml +22 -0
  138. data/spec/dummy/config/spring.rb +8 -0
  139. data/spec/dummy/config.ru +7 -0
  140. data/spec/dummy/db/migrate/20170407151055_create_doo_dads.rb +10 -0
  141. data/spec/dummy/db/migrate/20170408145839_create_whatzits.rb +10 -0
  142. data/spec/dummy/db/migrate/20170408161201_create_erbits.rb +10 -0
  143. data/spec/dummy/db/schema.rb +36 -0
  144. data/spec/dummy/db/seeds.rb +7 -0
  145. data/spec/dummy/db/test.sqlite3 +0 -0
  146. data/spec/factories/doo_dad.rb +6 -0
  147. data/spec/factories/erbit.rb +6 -0
  148. data/spec/factories/whatzit.rb +6 -0
  149. data/spec/helpers/bootstrap_leather/alerts_helper_spec.rb +62 -0
  150. data/spec/helpers/bootstrap_leather/badges_helper_spec.rb +41 -0
  151. data/spec/helpers/bootstrap_leather/carousels_helper_spec.rb +44 -0
  152. data/spec/helpers/bootstrap_leather/foot_helper_spec.rb +20 -0
  153. data/spec/helpers/bootstrap_leather/grid_helper_spec.rb +10 -0
  154. data/spec/helpers/bootstrap_leather/head_helper_spec.rb +82 -0
  155. data/spec/helpers/bootstrap_leather/hero_unit_helper_spec.rb +20 -0
  156. data/spec/helpers/bootstrap_leather/icon_helper_spec.rb +48 -0
  157. data/spec/helpers/bootstrap_leather/modals_helper_spec.rb +22 -0
  158. data/spec/helpers/bootstrap_leather/navigation_helper_spec.rb +110 -0
  159. data/spec/helpers/bootstrap_leather/tabs_helper_spec.rb +39 -0
  160. data/spec/helpers/bootstrap_leather/thumbnails_helper_spec.rb +20 -0
  161. data/spec/helpers/bootstrap_leather/typography_helper_spec.rb +43 -0
  162. data/spec/helpers/bootstrap_leather/widgets_helper_spec.rb +22 -0
  163. data/spec/rails_helper.rb +88 -0
  164. data/spec/spec_helper.rb +102 -0
  165. metadata +360 -44
  166. data/.document +0 -5
  167. data/README.rdoc +0 -194
  168. data/app/helpers/bootstrap_leather_helper.rb +0 -232
  169. data/app/views/bootstrap_leather/_badge_to.html.haml +0 -4
  170. data/app/views/bootstrap_leather/_dropdown_nav_item.html.haml +0 -11
  171. data/app/views/bootstrap_leather/_navbar.html.haml +0 -39
  172. data/app/views/bootstrap_leather/_tabs.html.haml +0 -10
  173. data/app/views/bootstrap_leather/_widgets.html.haml +0 -9
  174. data/lib/bootstrap_leather/railtie.rb +0 -9
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BootstrapLeather
4
+ # Icons, i.e. tiny images from fonts
5
+ module IconsHelper
6
+ def icon(type)
7
+ render(partial: 'bootstrap_leather/icons/icon', locals: { type: type })
8
+ end
9
+
10
+ def icon_button_to(button_class, icon_type, text, link, html_options = {})
11
+ html_options[:class] = 'btn btn-' + button_class
12
+ render(
13
+ partial: 'bootstrap_leather/icons/icon_button_to',
14
+ locals: {
15
+ button_class: button_class, icon_type: icon_type, text: text,
16
+ link: link, html_options: html_options
17
+ }
18
+ )
19
+ end
20
+
21
+ def icon_link_to(icon_type, text, link, html_options = {})
22
+ render(
23
+ partial: 'bootstrap_leather/icons/icon_link_to',
24
+ locals: {
25
+ icon_type: icon_type,
26
+ text: text,
27
+ link: link,
28
+ html_options: html_options
29
+ }
30
+ )
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BootstrapLeather
4
+ # Modals, i.e. content box that pops up over main document, shading out the
5
+ # background
6
+ module ModalsHelper
7
+ def modal(id, title = '', close_text = 'Close', html_options = {}, &block)
8
+ render(
9
+ partial: 'bootstrap_leather/modals/modal',
10
+ locals: {
11
+ id: id,
12
+ close_text: close_text,
13
+ title: title,
14
+ block: capture(&block),
15
+ html_options: html_options
16
+ }
17
+ )
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BootstrapLeather
4
+ # Navigation
5
+ module NavigationHelper
6
+ def nav_item(text, href, options = {})
7
+ render(
8
+ partial: 'bootstrap_leather/navigation/nav_item',
9
+ locals: { text: text, href: href, options: options }
10
+ )
11
+ end
12
+
13
+ def nav_heading(text, options = {})
14
+ render(
15
+ partial: 'bootstrap_leather/navigation/nav_heading',
16
+ locals: { text: text, options: options }
17
+ )
18
+ end
19
+
20
+ def nav_list(html_options = {}, &block)
21
+ render(
22
+ partial: 'bootstrap_leather/navigation/nav_list',
23
+ locals: { block: capture(&block), html_options: html_options }
24
+ )
25
+ end
26
+
27
+ def navbar(html_options = {}, &block)
28
+ container_mode = html_options[:container_mode]
29
+ html_options[:container_mode] = nil
30
+ render(
31
+ partial: 'bootstrap_leather/navigation/navbar',
32
+ locals: {
33
+ block: capture(&block),
34
+ html_options: html_options,
35
+ container_mode: container_mode
36
+ }
37
+ )
38
+ end
39
+
40
+ def navbar_with_container(html_options = {}, &block)
41
+ html_options[:container_mode] = :with
42
+ navbar(html_options, &block)
43
+ end
44
+
45
+ def navbar_in_container(html_options = {}, &block)
46
+ html_options[:container_mode] = :in
47
+ navbar(html_options, &block)
48
+ end
49
+
50
+ def dropdown_nav_item(text, href, active = false, &block)
51
+ id = Time.now.to_f # Just to generate a unique id
52
+ css_class = active ? 'active' : ''
53
+ render(
54
+ partial: 'bootstrap_leather/navigation/dropdown_nav_item',
55
+ locals: {
56
+ id: id, css_class: css_class, text: text, href: href,
57
+ block: capture(&block)
58
+ }
59
+ )
60
+ end
61
+
62
+ def logo_and_title
63
+ render(partial: 'bootstrap_leather/navigation/logo_and_title')
64
+ end
65
+
66
+ alias nav_bar navbar
67
+ alias nav_bar_in_container navbar_in_container
68
+ alias nav_bar_with_container navbar_with_container
69
+ alias nav_header nav_heading
70
+ end
71
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BootstrapLeather
4
+ # Tabs, like the tabs of a folder
5
+ module TabsHelper
6
+ def add_tab(label, id, args = {}, &block)
7
+ active = false
8
+ if @tabs.nil?
9
+ @tabs = []
10
+ active = true
11
+ end
12
+ before_link = args[:before_link] ? args[:before_link] : ''
13
+ @tabs << {
14
+ id: id, label: label, active: active, before_link: before_link,
15
+ content: capture(&block)
16
+ }
17
+ end
18
+
19
+ def render_tabs(orientation = 'top')
20
+ tabs = @tabs
21
+ @tabs = nil
22
+ render(
23
+ partial: 'bootstrap_leather/tabs/tabs',
24
+ locals: { tabs: tabs, orientation: orientation }
25
+ )
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BootstrapLeather
4
+ # Thumbnails and other images can have a consistent frame.
5
+ module ThumbnailsHelper
6
+ def thumbnail(content = '', &block)
7
+ render(
8
+ partial: 'bootstrap_leather/thumbnails/thumbnail',
9
+ locals: { content: content ? content : capture(&block) }
10
+ )
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BootstrapLeather
4
+ # Typography
5
+ module TypographyHelper
6
+ def render_h1(html_options = {})
7
+ page_title = []
8
+ page_title << content_for(:title)
9
+ if content_for(:subtitle)
10
+ page_title << content_tag(:small, content_for(:subtitle))
11
+ end
12
+ content_tag :h1, page_title.compact.join(' ').html_safe, html_options
13
+ end
14
+
15
+ def render_page_header(html_options = {})
16
+ render(
17
+ partial: 'bootstrap_leather/typography/page_header',
18
+ locals: {
19
+ title: content_for(:title),
20
+ subtitle: content_for(:subtitle),
21
+ html_options: html_options
22
+ }
23
+ )
24
+ end
25
+
26
+ def dl(list, html_options = {})
27
+ render(
28
+ partial: 'bootstrap_leather/typography/dl',
29
+ locals: {
30
+ list: list,
31
+ html_options: html_options
32
+ }
33
+ )
34
+ end
35
+ alias description_list dl
36
+ alias definition_list dl
37
+ end
38
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BootstrapLeather
4
+ # Widgets (my term, not bootstrap's), such as a right sidebar with separate
5
+ # sections
6
+ module WidgetsHelper
7
+ def add_widget(html_options = {}, &block)
8
+ @widgets ||= []
9
+ @widgets << { html_options: html_options, body: capture(&block) }
10
+ end
11
+
12
+ def widgets
13
+ mine = @widgets
14
+ @widgets = nil
15
+ mine
16
+ end
17
+
18
+ def render_widgets(device_class = 'md', column_width = 3)
19
+ render(
20
+ partial: 'bootstrap_leather/widgets/widgets',
21
+ locals: {
22
+ widgets: widgets,
23
+ column_width: column_width,
24
+ device_class: device_class
25
+ }
26
+ )
27
+ end
28
+ end
29
+ end
@@ -2,4 +2,4 @@
2
2
  %button.close{:type => 'button', data: { dismiss: 'alert'}, aria: { hidden: 'true'}}
3
3
  \x
4
4
  %h4.alert-heading= title
5
- = message
5
+ %p= message
@@ -1,3 +1,3 @@
1
1
  - if content.present?
2
2
  %span{:class => 'badge ' + (type ? 'badge-' + type : '')}
3
- = content.html_safe
3
+ = content.to_s
@@ -0,0 +1,3 @@
1
+ %a{html_options}
2
+ = text
3
+ = badge value
@@ -1,9 +1,9 @@
1
- .modal.fade{:id => id, :tabindex => -1, :role => 'dialog', :aria => {:labelledby => 'modalLabel'}}
1
+ .modal.fade{:id => id, :tabindex => -1, :role => 'dialog', :aria => {:labelledby => 'modal-label'}}
2
2
  .modal-dialog{:role => 'document'}
3
3
  .modal-content
4
4
  .modal-header
5
5
  %button.close{:type => 'button', :data => {:dismiss => 'modal'}, :aria => {:hidden => true}}= 'x'
6
- %h3.modal-title#modalLabel= title
6
+ %h3.modal-title#modal-label= title
7
7
  #modal-body.modal-body
8
8
  = block
9
9
  .modal-footer
@@ -0,0 +1,6 @@
1
+ %li{class: 'dropdown ' + css_class}
2
+ %a.dropdown-toggle{ id: id, href: href, data: { toggle: 'dropdown' }, role: 'button', aria: { expanded: false } }
3
+ = text
4
+ %b.caret
5
+ %ul.dropdown-menu{ role: 'menu', aria: { labelledby: id } }
6
+ = block
@@ -0,0 +1,6 @@
1
+ %button.navbar-toggle.collapsed{data:{toggle:'collapse', target:'#navbar-to-collapse'},type:'button'}
2
+ %span.sr-only
3
+ Toggle navigation
4
+ %span.icon-bar
5
+ %span.icon-bar
6
+ %span.icon-bar
@@ -0,0 +1,14 @@
1
+ - case container_mode
2
+ - when :with, :inside
3
+ %nav.navbar.navbar-default{ html_options }
4
+ .container
5
+ %nav.navbar.navbar-default{ html_options }
6
+ = render partial: 'bootstrap_leather/navigation/navbar_contents', locals: { block: block }
7
+ - when :in, :outside
8
+ .container
9
+ %nav.navbar.navbar-default{ html_options }
10
+ %nav.navbar.navbar-default{ html_options }
11
+ = render partial: 'bootstrap_leather/navigation/navbar_contents', locals: { block: block }
12
+ - else
13
+ %nav.navbar.navbar-default{ html_options }
14
+ = render partial: 'bootstrap_leather/navigation/navbar_contents', locals: { block: block }
@@ -0,0 +1,5 @@
1
+ .navbar-header
2
+ = render partial: 'bootstrap_leather/navigation/hamburger_menu'
3
+ = link_to logo_and_title, BootstrapLeather.configuration.application_path, class: 'navbar-brand'
4
+ .collapse.navbar-collapse#navbar-to-collapse
5
+ = block
@@ -0,0 +1,10 @@
1
+ %div{class: 'tabbable tabs-' + orientation}
2
+ %ul.nav.nav-tabs
3
+ - for tab in tabs
4
+ %li{class: tab[:active] ? 'active' : ''}
5
+ = tab[:before_link]
6
+ = link_to tab[:label].html_safe, '#' + tab[:id], data: { toggle: 'tab' }
7
+ .tab-content
8
+ - for tab in tabs
9
+ %div{id: tab[:id], class: tab[:active] ? 'tab-pane active' : 'tab-pane'}
10
+ =tab[:content].html_safe
@@ -1,4 +1,4 @@
1
- .page_header
1
+ .page-header
2
2
  %h1
3
3
  = title
4
4
  %small
@@ -0,0 +1,10 @@
1
+ - if widgets.any?
2
+ - widgets.each do |widget|
3
+ :ruby
4
+ html_options = widget[:html_options]
5
+ content_class = html_options[:content_class]
6
+ html_options[:content_class] = nil
7
+ html_options[:class] = 'column ' + column_class(device_class, column_width)
8
+ %div{ html_options }
9
+ %div{:class => "well #{content_class}"}
10
+ =widget[:body]
data/bin/rails ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ # This command will automatically be run when you run "rails" with Rails gems
5
+ # installed from the root of your application.
6
+
7
+ ENGINE_ROOT = File.expand_path('../..', __FILE__)
8
+ ENGINE_PATH = File.expand_path('../../lib/bootstrap_leather/engine', __FILE__)
9
+
10
+ # Set up gems listed in the Gemfile.
11
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
12
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
13
+
14
+ require 'rails/all'
15
+ require 'rails/engine/commands'