Class: LayoutStrategy::Bootstrap
- Inherits:
-
Base
- Object
- Base
- LayoutStrategy::Bootstrap
show all
- Defined in:
- lib/generators/hot_glue/layout_strategy/bootstrap.rb
Instance Attribute Summary
Attributes inherited from Base
#builder
Instance Method Summary
collapse
Methods inherited from Base
#button_column_style, #button_style, #col_width, #column_headings_col_style, #downnest_column_style, #downnest_style, #each_col, #initialize, #list_classes, #row_heading_classes, #style_with_flex_basis
Instance Method Details
6
7
8
|
# File 'lib/generators/hot_glue/layout_strategy/bootstrap.rb', line 6
def button_applied_classes
"btn btn-sm"
end
|
2
3
4
|
# File 'lib/generators/hot_glue/layout_strategy/bootstrap.rb', line 2
def button_classes " " + "col-sm-#{builder.layout_object[:columns][:button_columns]}"
end
|
15
16
17
|
# File 'lib/generators/hot_glue/layout_strategy/bootstrap.rb', line 15
def column_classes_for_button_column
"col-md-#{builder.layout_object[:buttons][:size]}"
end
|
#column_classes_for_column_headings(size = nil) ⇒ Object
24
25
26
|
# File 'lib/generators/hot_glue/layout_strategy/bootstrap.rb', line 24
def column_classes_for_column_headings(size = nil)
column_classes_for_line_fields(size)
end
|
20
21
22
|
# File 'lib/generators/hot_glue/layout_strategy/bootstrap.rb', line 20
def column_classes_for_form_fields(size = nil)
"col-md-#{size || builder.layout_object[:columns][:size_each]}"
end
|
#column_classes_for_line_fields(size = nil) ⇒ Object
32
33
34
|
# File 'lib/generators/hot_glue/layout_strategy/bootstrap.rb', line 32
def column_classes_for_line_fields(size = nil)
"col-sm-#{size || builder.layout_object[:columns][:size_each]}"
end
|
#column_width ⇒ Object
36
37
38
39
|
# File 'lib/generators/hot_glue/layout_strategy/bootstrap.rb', line 36
def column_width
builder.layout_object[:columns][:size_each]
end
|
#container_name ⇒ Object
28
29
30
|
# File 'lib/generators/hot_glue/layout_strategy/bootstrap.rb', line 28
def container_name
"container"
end
|
#downnest_portal_column_width(downnest) ⇒ Object
41
42
43
|
# File 'lib/generators/hot_glue/layout_strategy/bootstrap.rb', line 41
def downnest_portal_column_width(downnest)
"col-sm-#{ builder.layout_object[:portals][downnest][:size] }"
end
|
#downnest_portal_stacked_column_width ⇒ Object
45
46
47
|
# File 'lib/generators/hot_glue/layout_strategy/bootstrap.rb', line 45
def downnest_portal_stacked_column_width
"col-sm-4"
end
|
61
62
63
|
# File 'lib/generators/hot_glue/layout_strategy/bootstrap.rb', line 61
def form_checkbox_input_class
"form-check-input"
end
|
69
70
71
|
# File 'lib/generators/hot_glue/layout_strategy/bootstrap.rb', line 69
def form_checkbox_label_class
"form-check-label"
end
|
65
66
67
|
# File 'lib/generators/hot_glue/layout_strategy/bootstrap.rb', line 65
def form_checkbox_wrapper_class
"form-check"
end
|
73
74
75
|
# File 'lib/generators/hot_glue/layout_strategy/bootstrap.rb', line 73
def form_input_class
"form-control"
end
|
10
11
12
|
# File 'lib/generators/hot_glue/layout_strategy/bootstrap.rb', line 10
def magic_button_classes
"btn-secondary"
end
|
#page_begin ⇒ Object
49
50
51
|
# File 'lib/generators/hot_glue/layout_strategy/bootstrap.rb', line 49
def page_begin
'<div class="row"> <div class="col-md-12">'
end
|
#page_end ⇒ Object
57
58
59
|
# File 'lib/generators/hot_glue/layout_strategy/bootstrap.rb', line 57
def page_end
'</div> </div>'
end
|
#row_classes ⇒ Object
53
54
55
|
# File 'lib/generators/hot_glue/layout_strategy/bootstrap.rb', line 53
def row_classes
"row hg-row"
end
|
#search_closing ⇒ Object
81
82
83
|
# File 'lib/generators/hot_glue/layout_strategy/bootstrap.rb', line 81
def search_closing
"</div></div></div>"
end
|
#search_opening ⇒ Object
77
78
79
|
# File 'lib/generators/hot_glue/layout_strategy/bootstrap.rb', line 77
def search_opening
'<div class="row"><div class="col-md-12 card"><div class="card-body">'
end
|