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.
- checksums.yaml +4 -4
- data/.rspec +1 -0
- data/.rubocop.yml +23 -0
- data/.rubocop_todo.yml +12 -0
- data/.ruby-gemset +1 -1
- data/.ruby-version +1 -1
- data/.travis.yml +5 -0
- data/Gemfile +40 -7
- data/LICENSE.txt +1 -1
- data/README.md +260 -0
- data/Rakefile +35 -20
- data/VERSION +1 -1
- data/app/helpers/bootstrap_leather/alerts_helper.rb +36 -0
- data/app/helpers/bootstrap_leather/application_helper.rb +21 -0
- data/app/helpers/bootstrap_leather/badges_helper.rb +21 -0
- data/app/helpers/bootstrap_leather/carousels_helper.rb +32 -0
- data/app/helpers/bootstrap_leather/foot_helper.rb +14 -0
- data/app/helpers/bootstrap_leather/grid_helper.rb +10 -0
- data/app/helpers/bootstrap_leather/head_helper.rb +67 -0
- data/app/helpers/bootstrap_leather/hero_unit_helper.rb +14 -0
- data/app/helpers/bootstrap_leather/icons_helper.rb +33 -0
- data/app/helpers/bootstrap_leather/modals_helper.rb +20 -0
- data/app/helpers/bootstrap_leather/navigation_helper.rb +71 -0
- data/app/helpers/bootstrap_leather/tabs_helper.rb +28 -0
- data/app/helpers/bootstrap_leather/thumbnails_helper.rb +13 -0
- data/app/helpers/bootstrap_leather/typography_helper.rb +38 -0
- data/app/helpers/bootstrap_leather/widgets_helper.rb +29 -0
- data/app/views/bootstrap_leather/{_alert.html.haml → alerts/_alert.html.haml} +1 -1
- data/app/views/bootstrap_leather/{_alert_flash_messages.html.haml → alerts/_alert_flash_messages.html.haml} +0 -0
- data/app/views/bootstrap_leather/{_badge.html.haml → badges/_badge.html.haml} +1 -1
- data/app/views/bootstrap_leather/badges/_badge_to.html.haml +3 -0
- data/app/views/bootstrap_leather/{_carousel.html.haml → carousels/_carousel.html.haml} +0 -0
- data/app/views/bootstrap_leather/{_carousel_with_thumbnails.html.haml → carousels/_carousel_with_thumbnails.html.haml} +0 -0
- data/app/views/bootstrap_leather/{_footer_javascript.html.haml → foot/_footer_javascript.html.haml} +0 -0
- data/app/views/bootstrap_leather/{_head_css.html.haml → head/_head_css.html.haml} +0 -0
- data/app/views/bootstrap_leather/{_hero_unit.html.haml → hero_unit/_hero_unit.html.haml} +0 -0
- data/app/views/bootstrap_leather/{_icon.html.haml → icons/_icon.html.haml} +0 -0
- data/app/views/bootstrap_leather/{_icon_button_to.html.haml → icons/_icon_button_to.html.haml} +0 -0
- data/app/views/bootstrap_leather/{_icon_link_to.html.haml → icons/_icon_link_to.html.haml} +0 -0
- data/app/views/bootstrap_leather/{_modal.html.haml → modals/_modal.html.haml} +2 -2
- data/app/views/bootstrap_leather/navigation/_dropdown_nav_item.html.haml +6 -0
- data/app/views/bootstrap_leather/navigation/_hamburger_menu.html.haml +6 -0
- data/app/views/bootstrap_leather/{_logo_and_title.html.haml → navigation/_logo_and_title.html.haml} +0 -0
- data/app/views/bootstrap_leather/{_nav_heading.html.haml → navigation/_nav_heading.html.haml} +0 -0
- data/app/views/bootstrap_leather/{_nav_item.html.haml → navigation/_nav_item.html.haml} +0 -0
- data/app/views/bootstrap_leather/{_nav_list.html.haml → navigation/_nav_list.html.haml} +0 -0
- data/app/views/bootstrap_leather/navigation/_navbar.html.haml +14 -0
- data/app/views/bootstrap_leather/navigation/_navbar_contents.html.haml +5 -0
- data/app/views/bootstrap_leather/tabs/_tabs.html.haml +10 -0
- data/app/views/bootstrap_leather/{_thumbnail.html.haml → thumbnails/_thumbnail.html.haml} +0 -0
- data/app/views/bootstrap_leather/{_definition_list.html.haml → typography/_dl.html.haml} +0 -0
- data/app/views/bootstrap_leather/{_page_header.html.haml → typography/_page_header.html.haml} +1 -1
- data/app/views/bootstrap_leather/widgets/_widgets.html.haml +10 -0
- data/bin/rails +15 -0
- data/bootstrap_leather.gemspec +219 -57
- data/config/locales/en.yml +9 -0
- data/lib/bootstrap_leather/configuration.rb +16 -12
- data/lib/bootstrap_leather/engine.rb +19 -4
- data/lib/bootstrap_leather/localization.rb +20 -18
- data/lib/bootstrap_leather/version.rb +4 -1
- data/lib/bootstrap_leather.rb +6 -2
- data/lib/generators/bootstrap_leather/install/install_generator.rb +21 -19
- data/lib/generators/bootstrap_leather/install/templates/initializer.rb +3 -1
- data/lib/generators/bootstrap_leather/utils.rb +13 -4
- data/lib/templates/erb/scaffold/_form.html.erb +11 -0
- data/lib/templates/erb/scaffold/edit.html.erb +9 -0
- data/lib/templates/erb/scaffold/index.html.erb +29 -0
- data/lib/templates/erb/scaffold/new.html.erb +7 -0
- data/lib/templates/erb/scaffold/show.html.erb +12 -0
- data/lib/templates/haml/scaffold/_form.html.haml +10 -0
- data/lib/templates/haml/scaffold/edit.html.haml +8 -0
- data/lib/templates/haml/scaffold/index.html.haml +21 -0
- data/lib/templates/haml/scaffold/new.html.haml +6 -0
- data/lib/templates/haml/scaffold/show.html.haml +10 -0
- data/spec/dummy/Rakefile +9 -0
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +16 -0
- data/spec/dummy/app/assets/stylesheets/application.scss +19 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap-everything.scss +54 -0
- data/spec/dummy/app/controllers/application_controller.rb +6 -0
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/controllers/doo_dads_controller.rb +58 -0
- data/spec/dummy/app/controllers/erbits_controller.rb +58 -0
- data/spec/dummy/app/controllers/whatzits_controller.rb +58 -0
- data/spec/dummy/app/helpers/application_helper.rb +4 -0
- data/spec/dummy/app/mailers/application_mailer.rb +6 -0
- data/spec/dummy/app/models/application_record.rb +5 -0
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/models/doo_dad.rb +3 -0
- data/spec/dummy/app/models/erbit.rb +2 -0
- data/spec/dummy/app/models/whatzit.rb +2 -0
- data/spec/dummy/app/views/doo_dads/_form.html.haml +16 -0
- data/spec/dummy/app/views/doo_dads/edit.html.haml +7 -0
- data/spec/dummy/app/views/doo_dads/index.html.haml +23 -0
- data/spec/dummy/app/views/doo_dads/new.html.haml +5 -0
- data/spec/dummy/app/views/doo_dads/show.html.haml +12 -0
- data/spec/dummy/app/views/erbits/_form.html.erb +5 -0
- data/spec/dummy/app/views/erbits/edit.html.erb +9 -0
- data/spec/dummy/app/views/erbits/index.html.erb +27 -0
- data/spec/dummy/app/views/erbits/new.html.erb +7 -0
- data/spec/dummy/app/views/erbits/show.html.erb +12 -0
- data/spec/dummy/app/views/layouts/application.html.haml +22 -0
- data/spec/dummy/app/views/pages/index.html.haml +1 -0
- data/spec/dummy/app/views/pages/style_guide.html.haml +801 -0
- data/spec/dummy/app/views/whatzits/_form.html.haml +4 -0
- data/spec/dummy/app/views/whatzits/edit.html.haml +8 -0
- data/spec/dummy/app/views/whatzits/index.html.haml +19 -0
- data/spec/dummy/app/views/whatzits/new.html.haml +6 -0
- data/spec/dummy/app/views/whatzits/show.html.haml +10 -0
- data/spec/dummy/bin/bundle +5 -0
- data/spec/dummy/bin/rails +6 -0
- data/spec/dummy/bin/rake +6 -0
- data/spec/dummy/bin/setup +36 -0
- data/spec/dummy/bin/update +31 -0
- data/spec/dummy/config/application.rb +36 -0
- data/spec/dummy/config/boot.rb +7 -0
- data/spec/dummy/config/cable.yml +9 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +7 -0
- data/spec/dummy/config/environments/development.rb +57 -0
- data/spec/dummy/config/environments/test.rb +45 -0
- data/spec/dummy/config/initializers/application_controller_renderer.rb +7 -0
- data/spec/dummy/config/initializers/assets.rb +14 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +10 -0
- data/spec/dummy/config/initializers/bootstrap_leather.rb +9 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +7 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +6 -0
- data/spec/dummy/config/initializers/high_voltage.rb +5 -0
- data/spec/dummy/config/initializers/inflections.rb +17 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/new_framework_defaults.rb +29 -0
- data/spec/dummy/config/initializers/session_store.rb +5 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +17 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/puma.rb +49 -0
- data/spec/dummy/config/routes.rb +8 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config/spring.rb +8 -0
- data/spec/dummy/config.ru +7 -0
- data/spec/dummy/db/migrate/20170407151055_create_doo_dads.rb +10 -0
- data/spec/dummy/db/migrate/20170408145839_create_whatzits.rb +10 -0
- data/spec/dummy/db/migrate/20170408161201_create_erbits.rb +10 -0
- data/spec/dummy/db/schema.rb +36 -0
- data/spec/dummy/db/seeds.rb +7 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/factories/doo_dad.rb +6 -0
- data/spec/factories/erbit.rb +6 -0
- data/spec/factories/whatzit.rb +6 -0
- data/spec/helpers/bootstrap_leather/alerts_helper_spec.rb +62 -0
- data/spec/helpers/bootstrap_leather/badges_helper_spec.rb +41 -0
- data/spec/helpers/bootstrap_leather/carousels_helper_spec.rb +44 -0
- data/spec/helpers/bootstrap_leather/foot_helper_spec.rb +20 -0
- data/spec/helpers/bootstrap_leather/grid_helper_spec.rb +10 -0
- data/spec/helpers/bootstrap_leather/head_helper_spec.rb +82 -0
- data/spec/helpers/bootstrap_leather/hero_unit_helper_spec.rb +20 -0
- data/spec/helpers/bootstrap_leather/icon_helper_spec.rb +48 -0
- data/spec/helpers/bootstrap_leather/modals_helper_spec.rb +22 -0
- data/spec/helpers/bootstrap_leather/navigation_helper_spec.rb +110 -0
- data/spec/helpers/bootstrap_leather/tabs_helper_spec.rb +39 -0
- data/spec/helpers/bootstrap_leather/thumbnails_helper_spec.rb +20 -0
- data/spec/helpers/bootstrap_leather/typography_helper_spec.rb +43 -0
- data/spec/helpers/bootstrap_leather/widgets_helper_spec.rb +22 -0
- data/spec/rails_helper.rb +88 -0
- data/spec/spec_helper.rb +102 -0
- metadata +360 -44
- data/.document +0 -5
- data/README.rdoc +0 -194
- data/app/helpers/bootstrap_leather_helper.rb +0 -232
- data/app/views/bootstrap_leather/_badge_to.html.haml +0 -4
- data/app/views/bootstrap_leather/_dropdown_nav_item.html.haml +0 -11
- data/app/views/bootstrap_leather/_navbar.html.haml +0 -39
- data/app/views/bootstrap_leather/_tabs.html.haml +0 -10
- data/app/views/bootstrap_leather/_widgets.html.haml +0 -9
- 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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/app/views/bootstrap_leather/{_footer_javascript.html.haml → foot/_footer_javascript.html.haml}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/app/views/bootstrap_leather/{_icon_button_to.html.haml → icons/_icon_button_to.html.haml}
RENAMED
|
File without changes
|
|
File without changes
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
.modal.fade{:id => id, :tabindex => -1, :role => 'dialog', :aria => {:labelledby => '
|
|
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#
|
|
6
|
+
%h3.modal-title#modal-label= title
|
|
7
7
|
#modal-body.modal-body
|
|
8
8
|
= block
|
|
9
9
|
.modal-footer
|
data/app/views/bootstrap_leather/{_logo_and_title.html.haml → navigation/_logo_and_title.html.haml}
RENAMED
|
File without changes
|
data/app/views/bootstrap_leather/{_nav_heading.html.haml → navigation/_nav_heading.html.haml}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -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,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
|
|
File without changes
|
|
File without changes
|
|
@@ -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'
|