booties 0.1.0 → 0.2.0
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 +5 -5
- data/README.md +172 -0
- data/Rakefile +5 -4
- data/app/controllers/booties/application_controller.rb +4 -1
- data/app/helpers/booties/application_helper.rb +3 -26
- data/app/helpers/booties/badge_helper.rb +6 -3
- data/app/helpers/booties/breadcrumb_helper.rb +29 -0
- data/app/helpers/booties/button_helper.rb +10 -8
- data/app/helpers/booties/dropdown_helper.rb +71 -0
- data/app/helpers/booties/flag_helper.rb +7 -4
- data/app/helpers/booties/modal_helper.rb +4 -1
- data/app/helpers/booties/panel_helper.rb +3 -1
- data/app/helpers/booties/popover_helper.rb +28 -19
- data/app/helpers/booties/tooltip_helper.rb +12 -8
- data/config/routes.rb +2 -0
- data/lib/booties.rb +3 -1
- data/lib/booties/engine.rb +7 -1
- data/lib/booties/modal.rb +13 -12
- data/lib/booties/panel.rb +21 -18
- data/lib/booties/utils.rb +8 -10
- data/lib/booties/version.rb +3 -1
- data/lib/tasks/booties_tasks.rake +2 -0
- data/test/dummy/Rakefile +1 -1
- data/test/dummy/app/assets/javascripts/application.js +0 -13
- data/test/dummy/app/assets/stylesheets/application.css +0 -15
- data/test/dummy/app/channels/application_cable/channel.rb +4 -0
- data/test/dummy/app/channels/application_cable/connection.rb +4 -0
- data/test/dummy/app/controllers/application_controller.rb +0 -4
- data/test/dummy/app/controllers/samples_controller.rb +28 -0
- data/test/dummy/app/jobs/application_job.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +9 -11
- data/test/dummy/app/views/samples/badges.html.erb +2 -0
- data/test/dummy/app/views/{home → samples}/breadcrumbs.html.erb +2 -1
- data/test/dummy/app/views/samples/buttons.html.erb +2 -0
- data/test/dummy/app/views/samples/dropdowns.html.erb +6 -0
- data/test/dummy/app/views/samples/flags.html.erb +2 -0
- data/test/dummy/app/views/samples/modals.html.erb +12 -0
- data/test/dummy/app/views/samples/panels.html.erb +14 -0
- data/test/dummy/app/views/samples/popovers.html.erb +9 -0
- data/test/dummy/app/views/samples/tooltips.html.erb +3 -0
- data/test/dummy/bin/bundle +1 -1
- data/test/dummy/bin/rails +1 -1
- data/test/dummy/bin/setup +17 -13
- data/test/dummy/bin/update +28 -0
- data/test/dummy/config.ru +2 -1
- data/test/dummy/config/application.rb +13 -12
- data/test/dummy/config/boot.rb +2 -2
- data/test/dummy/config/environment.rb +1 -1
- data/test/dummy/config/environments/development.rb +24 -16
- data/test/dummy/config/environments/production.rb +23 -28
- data/test/dummy/config/environments/test.rb +5 -11
- data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/test/dummy/config/initializers/content_security_policy.rb +25 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +2 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +6 -1
- data/test/dummy/config/locales/en.yml +10 -0
- data/test/dummy/config/puma.rb +34 -0
- data/test/dummy/config/routes.rb +16 -8
- data/test/dummy/config/spring.rb +6 -0
- data/test/dummy/log/test.log +11202 -19551
- data/test/dummy/public/404.html +6 -6
- data/test/dummy/public/422.html +6 -6
- data/test/dummy/public/500.html +6 -6
- data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/test/dummy/public/apple-touch-icon.png +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/33/33EUCQBNqL6TOaGyMFn9wz2v39pHMJ4LOUUFUteIHHM.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/3N/3NnKgR2TsTI1qCXKZpts0uJzp2dRJcoYp3nnFU6YE4o.cache +2 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/7Q/7Q2gtOOyCVPFrfYz4KjmXJsM_m8Yra4MjgsQmfVGxZY.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/8c/8cROjTzeZZQaOFNLPKGuMtXO7EHxNfiEa72qt65UoF4.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/F6/F6RhC2MbCvVanNZZe44hqlJNKAdIrH4NUzRxj5N2_EQ.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Fc/FcMeZRcfG4LrhIhl3xrAg3EhSZInU4efHmUrjIs4keE.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/H3/H3dfPRbxbWIB6dQXrQ6xA9nDJqy4dOq1ujslocGVY9U.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/LK/LKisVDbQmzgRQKdFoNH5tRbTr72CrlM_2q7MZczv2Pg.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Mj/MjwYGG9GkHD1fwwH2bg66EBYl3zCA_mqeDF9otey4-U.cache +3 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Pc/Pce9HMZhc6XmsNfLUN84Enw7mySJ7ZYzys9mXmCVXqA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Po/PoftKmjB8lzW06EMKeru1CsqVtULc0MsiTysT2JNqvU.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Su/SuILTE3Es0N_r-36Ddu2E6h49WcwH_-RsZyG4SPwKFQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/cJ/cJG59MHf0x4qJKYES0pa0nLpOFpFF7YwrrvIVKIixyA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/fw/fwPYklzExHPpgeuv53ew_8OIpJVRyaHj2Jtj2JP9j5A.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/jc/jc_TR7ZZTSFDDRKdgc-KnZskUESr2rLOqcYZej83LvU.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/rV/rVy4-idUuK0Va9FLw3G8pYeZFwJAwmvs_bQcbq6_Cd0.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/rY/rYyeRvy3oIuNfWeDhoriNlAlVjN4Wg4A3_9_OTDFin4.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/tY/tYFbDrMNElXwgmisit50aNXJvRU2zlIFk5g-EJ1CQTc.cache +0 -0
- data/test/helpers/booties/badge_helper_test.rb +7 -5
- data/test/helpers/booties/breadcrumb_helper_test.rb +13 -0
- data/test/helpers/booties/button_helper_test.rb +14 -12
- data/test/helpers/booties/dropdown_helper_test.rb +43 -0
- data/test/helpers/booties/flag_helper_test.rb +7 -5
- data/test/helpers/booties/modal_helper_test.rb +9 -7
- data/test/helpers/booties/panel_helper_test.rb +4 -2
- data/test/helpers/booties/popover_helper_test.rb +33 -42
- data/test/helpers/booties/tooltip_helper_test.rb +19 -40
- data/test/integration/samples_test.rb +103 -0
- data/test/lib/booties/modal_test.rb +193 -0
- data/test/{booties → lib/booties}/panel_test.rb +40 -22
- data/test/lib/booties/utils_test.rb +41 -0
- data/test/stub_view.rb +14 -7
- data/test/test_helper.rb +10 -11
- metadata +124 -98
- data/app/assets/javascripts/booties/application.js +0 -13
- data/app/assets/stylesheets/booties/application.css +0 -15
- data/test/booties/modal_test.rb +0 -170
- data/test/booties/utils_test.rb +0 -26
- data/test/dummy/README.rdoc +0 -28
- data/test/dummy/app/assets/javascripts/home.js +0 -2
- data/test/dummy/app/assets/stylesheets/home.css +0 -4
- data/test/dummy/app/controllers/home_controller.rb +0 -25
- data/test/dummy/app/helpers/home_helper.rb +0 -2
- data/test/dummy/app/views/home/badge.html.erb +0 -3
- data/test/dummy/app/views/home/button.html.erb +0 -2
- data/test/dummy/app/views/home/flag.html.erb +0 -5
- data/test/dummy/app/views/home/modal.html.erb +0 -16
- data/test/dummy/app/views/home/panel.html.erb +0 -25
- data/test/dummy/app/views/home/popover.html.erb +0 -7
- data/test/dummy/app/views/home/tooltip.html.erb +0 -7
- data/test/dummy/config/initializers/assets.rb +0 -11
- data/test/dummy/config/initializers/session_store.rb +0 -3
- data/test/dummy/config/locales/booties.yml +0 -4
- data/test/dummy/config/secrets.yml +0 -22
- data/test/dummy/log/development.log +0 -420
- data/test/dummy/test/controllers/home_controller_test.rb +0 -108
- data/test/helpers/booties/application_helper_test.rb +0 -11
- data/test/integration/navigation_test.rb +0 -9
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Booties
|
|
2
|
-
module PopoverHelper
|
|
4
|
+
module PopoverHelper # :nodoc:
|
|
3
5
|
include Utils
|
|
4
6
|
|
|
5
7
|
##
|
|
@@ -27,7 +29,7 @@ module Booties
|
|
|
27
29
|
# snippet on the page:
|
|
28
30
|
#
|
|
29
31
|
# $(function() {
|
|
30
|
-
# $('[data-
|
|
32
|
+
# $('[data-toggle="popover"]').popover();
|
|
31
33
|
# }
|
|
32
34
|
#
|
|
33
35
|
# Examples:
|
|
@@ -39,25 +41,32 @@ module Booties
|
|
|
39
41
|
# Link text
|
|
40
42
|
# <% end %>
|
|
41
43
|
# <button class="btn btn-default" type="button" data-toggle="popover" data-content="Lorem ipsum dolor sit amet." data-placement="top" data-container="body" data-trigger="focus" title="Lorem ipsum">Link text</button>
|
|
42
|
-
def popover(text = nil, tag: :a, content:, title: nil, placement: nil, trigger: nil, **html_options, &block)
|
|
43
|
-
data = { toggle: 'popover', content: content, }
|
|
44
|
-
|
|
45
|
-
if placement
|
|
46
|
-
validate_placement! placement
|
|
47
|
-
data[:placement] = placement
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
if trigger
|
|
51
|
-
data[:container] = 'body'
|
|
52
|
-
data[:trigger] = 'focus'
|
|
53
|
-
end
|
|
54
44
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
45
|
+
# rubocop:disable Metrics/MethodLength, Metrics/ParameterLists
|
|
46
|
+
def popover(text = nil,
|
|
47
|
+
tag: :a,
|
|
48
|
+
container: nil,
|
|
49
|
+
content:,
|
|
50
|
+
title: nil,
|
|
51
|
+
placement: nil,
|
|
52
|
+
trigger: nil,
|
|
53
|
+
**options,
|
|
54
|
+
&block)
|
|
55
|
+
data = {
|
|
56
|
+
toggle: 'popover',
|
|
57
|
+
content: content,
|
|
58
|
+
container: container,
|
|
59
|
+
placement: placement,
|
|
60
|
+
trigger: trigger,
|
|
61
|
+
}
|
|
62
|
+
options[tag == :button ? :type : :role] ||= 'button'
|
|
63
|
+
options[:title] = title
|
|
64
|
+
options[:tabindex] ||= 10 if trigger
|
|
65
|
+
options[:data] ||= {}
|
|
66
|
+
options[:data].update data
|
|
59
67
|
|
|
60
|
-
content_tag tag, text,
|
|
68
|
+
content_tag tag, text, options, &block
|
|
61
69
|
end
|
|
70
|
+
# rubocop:enable Metrics/MethodLength, Metrics/ParameterLists
|
|
62
71
|
end
|
|
63
72
|
end
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Booties
|
|
2
|
-
module TooltipHelper
|
|
4
|
+
module TooltipHelper # :nodoc:
|
|
3
5
|
include Utils
|
|
4
6
|
|
|
5
7
|
##
|
|
@@ -40,15 +42,17 @@ module Booties
|
|
|
40
42
|
# This has a tooltip.
|
|
41
43
|
# <% end %>
|
|
42
44
|
# <span data-toggle="tooltip" title="This is a tooltip" class="tooltip">This has a tooltip.</span>
|
|
43
|
-
def tooltip(
|
|
44
|
-
|
|
45
|
+
def tooltip(content = nil,
|
|
46
|
+
title:,
|
|
47
|
+
placement: nil,
|
|
48
|
+
wrapper_tag: :span,
|
|
49
|
+
**options,
|
|
50
|
+
&block)
|
|
45
51
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
data[:placement] = placement
|
|
49
|
-
end
|
|
52
|
+
data = { toggle: 'tooltip', placement: placement }
|
|
53
|
+
options = { data: data, title: title, **options }
|
|
50
54
|
|
|
51
|
-
content_tag wrapper_tag,
|
|
55
|
+
content_tag wrapper_tag, content, options, &block
|
|
52
56
|
end
|
|
53
57
|
end
|
|
54
58
|
end
|
data/config/routes.rb
CHANGED
data/lib/booties.rb
CHANGED
data/lib/booties/engine.rb
CHANGED
data/lib/booties/modal.rb
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'forwardable'
|
|
2
4
|
|
|
3
5
|
module Booties
|
|
4
|
-
class Modal
|
|
6
|
+
class Modal # :nodoc:
|
|
5
7
|
include Utils
|
|
6
8
|
extend Forwardable
|
|
7
9
|
|
|
8
|
-
DEFAULT_DISMISSAL = '×'.
|
|
10
|
+
DEFAULT_DISMISSAL = '×'.html_safe
|
|
9
11
|
MODAL_SIZE = { small: 'modal-sm', large: 'modal-lg' }.freeze
|
|
10
12
|
|
|
11
13
|
##
|
|
12
14
|
# Instantiates a new Modal. Several helper methods like #content_tag will
|
|
13
|
-
# be delegated to +
|
|
15
|
+
# be delegated to +template+. The required keyword +id+ will be used as
|
|
14
16
|
# the DOM ID of the modal element. By default, the modal will exhibit
|
|
15
17
|
# fading behavior, but this can be disabled by setting +fade+ to a falsey
|
|
16
18
|
# value.
|
|
17
|
-
def initialize(
|
|
18
|
-
@
|
|
19
|
-
@id
|
|
20
|
-
@fade
|
|
21
|
-
@size
|
|
19
|
+
def initialize(template, id:, fade: true, size: nil)
|
|
20
|
+
@template = template
|
|
21
|
+
@id = id
|
|
22
|
+
@fade = fade ? 'fade' : nil
|
|
23
|
+
@size = MODAL_SIZE[size]
|
|
22
24
|
end
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
:raw, :t, :translate
|
|
26
|
+
delegate %i[button_tag capture content_tag t] => :@template
|
|
26
27
|
|
|
27
28
|
##
|
|
28
29
|
# Renders the top-level div for the modal dialog. +block+ is passed to
|
|
@@ -70,8 +71,8 @@ module Booties
|
|
|
70
71
|
content_tag :div, class: 'modal-header' do
|
|
71
72
|
if close
|
|
72
73
|
dismissal = t :'booties.modal.dismiss_html',
|
|
73
|
-
|
|
74
|
-
dismiss(dismissal)
|
|
74
|
+
default: [:'booties.modal.dismiss', DEFAULT_DISMISSAL]
|
|
75
|
+
dismiss(dismissal) + title(&block)
|
|
75
76
|
else
|
|
76
77
|
title(&block)
|
|
77
78
|
end
|
data/lib/booties/panel.rb
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'forwardable'
|
|
2
4
|
|
|
3
5
|
module Booties
|
|
4
|
-
class Panel
|
|
6
|
+
class Panel # :nodoc:
|
|
5
7
|
include Utils
|
|
6
8
|
extend Forwardable
|
|
7
9
|
|
|
8
10
|
CSS_CLASSES = {
|
|
9
|
-
heading: 'panel-heading'
|
|
10
|
-
title:
|
|
11
|
-
body:
|
|
12
|
-
footer:
|
|
13
|
-
}
|
|
11
|
+
heading: 'panel-heading',
|
|
12
|
+
title: 'panel-title',
|
|
13
|
+
body: 'panel-body',
|
|
14
|
+
footer: 'panel-footer',
|
|
15
|
+
}.freeze
|
|
14
16
|
|
|
15
17
|
##
|
|
16
18
|
# Instantiates a new Panel. Several helper methods like #content_tag will
|
|
17
|
-
# be delegated to +
|
|
19
|
+
# be delegated to +template+.
|
|
18
20
|
#
|
|
19
21
|
# The optional +context+ argument can be passed in to specify the panel
|
|
20
22
|
# context; otherwise, the context +:default+ is used.
|
|
@@ -26,15 +28,15 @@ module Booties
|
|
|
26
28
|
#
|
|
27
29
|
# Any additional options will be included as attributes on the top-level
|
|
28
30
|
# panel container.
|
|
29
|
-
def initialize(
|
|
30
|
-
@
|
|
31
|
-
@wrapper_tag
|
|
32
|
-
@context
|
|
31
|
+
def initialize(template, context: :default, wrapper_tag: 'div', **options)
|
|
32
|
+
@template = template
|
|
33
|
+
@wrapper_tag = wrapper_tag
|
|
34
|
+
@context = context
|
|
33
35
|
# TODO: pass options to #render instead of constructor
|
|
34
|
-
@options
|
|
36
|
+
@options = options
|
|
35
37
|
end
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
delegate %i[capture content_tag] => :@template
|
|
38
40
|
|
|
39
41
|
##
|
|
40
42
|
# Renders the top-level div for the panel. +@context+ is used to specify
|
|
@@ -42,7 +44,8 @@ module Booties
|
|
|
42
44
|
# object will be passed as a parameter to +block+.
|
|
43
45
|
def render(&block)
|
|
44
46
|
options = @options.dup
|
|
45
|
-
classes = merge_classes %W[panel panel
|
|
47
|
+
classes = merge_classes %W[panel panel-#{@context}],
|
|
48
|
+
options.delete(:class)
|
|
46
49
|
content_tag @wrapper_tag, class: classes, **options do
|
|
47
50
|
capture self, &block
|
|
48
51
|
end
|
|
@@ -56,7 +59,7 @@ module Booties
|
|
|
56
59
|
def heading(content = nil, class: nil, **options, &block)
|
|
57
60
|
content ||= capture(&block)
|
|
58
61
|
classes = merge_classes CSS_CLASSES[:heading],
|
|
59
|
-
|
|
62
|
+
binding.local_variable_get(:class)
|
|
60
63
|
content_tag :div, content, class: classes, **options
|
|
61
64
|
end
|
|
62
65
|
|
|
@@ -68,7 +71,7 @@ module Booties
|
|
|
68
71
|
def title(content = nil, class: nil, **options, &block)
|
|
69
72
|
content ||= capture(&block)
|
|
70
73
|
classes = merge_classes CSS_CLASSES[:title],
|
|
71
|
-
|
|
74
|
+
binding.local_variable_get(:class)
|
|
72
75
|
content_tag :h3, content, class: classes, **options
|
|
73
76
|
end
|
|
74
77
|
|
|
@@ -80,7 +83,7 @@ module Booties
|
|
|
80
83
|
def body(content = nil, class: nil, **options, &block)
|
|
81
84
|
content ||= capture(&block)
|
|
82
85
|
classes = merge_classes CSS_CLASSES[:body],
|
|
83
|
-
|
|
86
|
+
binding.local_variable_get(:class)
|
|
84
87
|
content_tag :div, content, class: classes, **options
|
|
85
88
|
end
|
|
86
89
|
|
|
@@ -92,7 +95,7 @@ module Booties
|
|
|
92
95
|
def footer(content = nil, class: nil, **options, &block)
|
|
93
96
|
content ||= capture(&block)
|
|
94
97
|
classes = merge_classes CSS_CLASSES[:footer],
|
|
95
|
-
|
|
98
|
+
binding.local_variable_get(:class)
|
|
96
99
|
content_tag :div, content, class: classes, **options
|
|
97
100
|
end
|
|
98
101
|
end
|
data/lib/booties/utils.rb
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
module Utils
|
|
3
|
-
PLACEMENTS = [:left, :right, :top, :bottom, ]
|
|
1
|
+
# frozen_string_literal: true
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
end
|
|
3
|
+
module Booties
|
|
4
|
+
module Utils # :nodoc:
|
|
5
|
+
def merge_classes(*sets)
|
|
6
|
+
return nil if sets.all?(&:nil?)
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
sets.reduce([]) do |superset, subset|
|
|
9
|
+
superset | Array(subset).compact.flat_map(&:split)
|
|
10
|
+
end
|
|
13
11
|
end
|
|
14
12
|
|
|
15
13
|
module_function :merge_classes
|
data/lib/booties/version.rb
CHANGED
data/test/dummy/Rakefile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
|
2
2
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
require_relative 'config/application'
|
|
5
5
|
|
|
6
6
|
Rails.application.load_tasks
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
|
2
|
-
// listed below.
|
|
3
|
-
//
|
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
|
5
|
-
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
|
6
|
-
//
|
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
|
8
|
-
// compiled file.
|
|
9
|
-
//
|
|
10
|
-
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
|
11
|
-
// about supported directives.
|
|
12
|
-
//
|
|
13
|
-
//= require_tree .
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
|
3
|
-
* listed below.
|
|
4
|
-
*
|
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
|
6
|
-
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
|
7
|
-
*
|
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any styles
|
|
10
|
-
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
|
11
|
-
* file per style scope.
|
|
12
|
-
*
|
|
13
|
-
*= require_tree .
|
|
14
|
-
*= require_self
|
|
15
|
-
*/
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
class SamplesController < ApplicationController
|
|
2
|
+
def badges
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
def breadcrumbs
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def buttons
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def dropdowns
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def flags
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def modals
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def panels
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def popovers
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def tooltips
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
|
-
<head>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
|
7
|
-
<%= csrf_meta_tags %>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
3
|
+
<head>
|
|
4
|
+
<title>Dummy</title>
|
|
5
|
+
<%= csrf_meta_tags %>
|
|
10
6
|
|
|
11
|
-
|
|
7
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
|
8
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
|
9
|
+
</head>
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
</body>
|
|
11
|
+
<body>
|
|
12
|
+
<%= yield %>
|
|
13
|
+
</body>
|
|
16
14
|
</html>
|