padrino-admin 0.11.3 → 0.11.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +7 -0
  2. data/README.rdoc +3 -3
  3. data/lib/padrino-admin/access_control.rb +46 -47
  4. data/lib/padrino-admin/bootstrap-less/alerts.less +29 -55
  5. data/lib/padrino-admin/bootstrap-less/badges.less +13 -15
  6. data/lib/padrino-admin/bootstrap-less/bootstrap.less +17 -21
  7. data/lib/padrino-admin/bootstrap-less/breadcrumbs.less +6 -11
  8. data/lib/padrino-admin/bootstrap-less/button-groups.less +114 -32
  9. data/lib/padrino-admin/bootstrap-less/buttons.less +41 -41
  10. data/lib/padrino-admin/bootstrap-less/carousel.less +43 -18
  11. data/lib/padrino-admin/bootstrap-less/close.less +4 -4
  12. data/lib/padrino-admin/bootstrap-less/code.less +8 -10
  13. data/lib/padrino-admin/bootstrap-less/component-animations.less +10 -4
  14. data/lib/padrino-admin/bootstrap-less/dropdowns.less +78 -51
  15. data/lib/padrino-admin/bootstrap-less/forms.less +183 -274
  16. data/lib/padrino-admin/bootstrap-less/glyphicons.less +232 -0
  17. data/lib/padrino-admin/bootstrap-less/grid.less +230 -88
  18. data/lib/padrino-admin/bootstrap-less/input-groups.less +127 -0
  19. data/lib/padrino-admin/bootstrap-less/jumbotron.less +16 -8
  20. data/lib/padrino-admin/bootstrap-less/labels.less +25 -37
  21. data/lib/padrino-admin/bootstrap-less/list-group.less +34 -35
  22. data/lib/padrino-admin/bootstrap-less/media.less +7 -5
  23. data/lib/padrino-admin/bootstrap-less/mixins.less +321 -108
  24. data/lib/padrino-admin/bootstrap-less/modals.less +24 -20
  25. data/lib/padrino-admin/bootstrap-less/navbar.less +474 -216
  26. data/lib/padrino-admin/bootstrap-less/navs.less +67 -85
  27. data/lib/padrino-admin/bootstrap-less/pager.less +4 -4
  28. data/lib/padrino-admin/bootstrap-less/pagination.less +64 -69
  29. data/lib/padrino-admin/bootstrap-less/panels.less +114 -62
  30. data/lib/padrino-admin/bootstrap-less/popovers.less +18 -18
  31. data/lib/padrino-admin/bootstrap-less/print.less +22 -7
  32. data/lib/padrino-admin/bootstrap-less/progress-bars.less +10 -33
  33. data/lib/padrino-admin/bootstrap-less/responsive-utilities.less +141 -40
  34. data/lib/padrino-admin/bootstrap-less/scaffolding.less +66 -19
  35. data/lib/padrino-admin/bootstrap-less/tables.less +154 -158
  36. data/lib/padrino-admin/bootstrap-less/theme.less +232 -0
  37. data/lib/padrino-admin/bootstrap-less/thumbnails.less +9 -20
  38. data/lib/padrino-admin/bootstrap-less/tooltip.less +3 -3
  39. data/lib/padrino-admin/bootstrap-less/type.less +47 -55
  40. data/lib/padrino-admin/bootstrap-less/utilities.less +2 -2
  41. data/lib/padrino-admin/bootstrap-less/variables.less +289 -93
  42. data/lib/padrino-admin/bootstrap-less/wells.less +2 -2
  43. data/lib/padrino-admin/generators/actions.rb +11 -10
  44. data/lib/padrino-admin/generators/admin_app.rb +11 -11
  45. data/lib/padrino-admin/generators/admin_page.rb +9 -9
  46. data/lib/padrino-admin/generators/orm.rb +6 -7
  47. data/lib/padrino-admin/generators/templates/account/activerecord.rb.tt +7 -7
  48. data/lib/padrino-admin/generators/templates/account/couchrest.rb.tt +16 -16
  49. data/lib/padrino-admin/generators/templates/account/datamapper.rb.tt +7 -7
  50. data/lib/padrino-admin/generators/templates/account/minirecord.rb.tt +7 -7
  51. data/lib/padrino-admin/generators/templates/account/mongoid.rb.tt +8 -8
  52. data/lib/padrino-admin/generators/templates/account/mongomapper.rb.tt +7 -7
  53. data/lib/padrino-admin/generators/templates/account/ohm.rb.tt +9 -9
  54. data/lib/padrino-admin/generators/templates/account/sequel.rb.tt +8 -8
  55. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/affix.js +9 -3
  56. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/alert.js +4 -2
  57. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap.min.js +4 -4
  58. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/button.js +9 -5
  59. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/carousel.js +19 -12
  60. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/collapse.js +68 -45
  61. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/dropdown.js +6 -7
  62. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/modal.js +43 -40
  63. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/popover.js +16 -10
  64. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/scrollspy.js +6 -4
  65. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/tab.js +4 -2
  66. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/tooltip.js +78 -48
  67. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/transition.js +10 -1
  68. data/lib/padrino-admin/generators/templates/assets/stylesheets/application.css +1 -0
  69. data/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap.css +622 -334
  70. data/lib/padrino-admin/generators/templates/erb/app/layouts/error.erb.tt +2 -2
  71. data/lib/padrino-admin/generators/templates/erb/app/sessions/new.erb.tt +9 -9
  72. data/lib/padrino-admin/generators/templates/erb/page/_form.erb.tt +3 -3
  73. data/lib/padrino-admin/generators/templates/erb/page/index.erb.tt +3 -3
  74. data/lib/padrino-admin/generators/templates/haml/app/layouts/error.haml.tt +1 -1
  75. data/lib/padrino-admin/generators/templates/haml/app/sessions/new.haml.tt +9 -7
  76. data/lib/padrino-admin/generators/templates/haml/page/_form.haml.tt +2 -2
  77. data/lib/padrino-admin/generators/templates/haml/page/index.haml.tt +2 -2
  78. data/lib/padrino-admin/generators/templates/page/controller.rb.tt +3 -3
  79. data/lib/padrino-admin/generators/templates/slim/app/layouts/error.slim.tt +1 -1
  80. data/lib/padrino-admin/generators/templates/slim/app/sessions/new.slim.tt +9 -7
  81. data/lib/padrino-admin/generators/templates/slim/page/_form.slim.tt +2 -2
  82. data/lib/padrino-admin/generators/templates/slim/page/index.slim.tt +2 -2
  83. data/lib/padrino-admin/helpers/authentication_helpers.rb +35 -35
  84. data/lib/padrino-admin/helpers/view_helpers.rb +12 -19
  85. data/lib/padrino-admin/utils/crypt.rb +10 -9
  86. data/lib/padrino-admin.rb +4 -5
  87. data/test/fixtures/data_mapper.rb +10 -9
  88. data/test/generators/test_account_model_generator.rb +2 -2
  89. metadata +14 -21
@@ -7,7 +7,6 @@
7
7
  // --------------------------------------------------
8
8
 
9
9
  .nav {
10
- margin-left: 0;
11
10
  margin-bottom: 0;
12
11
  padding-left: 0; // Override default ul/ol
13
12
  list-style: none;
@@ -20,68 +19,57 @@
20
19
  > a {
21
20
  position: relative;
22
21
  display: block;
23
- padding: 10px 15px;
22
+ padding: @nav-link-padding;
24
23
  &:hover,
25
24
  &:focus {
26
25
  text-decoration: none;
27
- background-color: @gray-lighter;
26
+ background-color: @nav-link-hover-bg;
28
27
  }
29
28
  }
30
29
 
31
30
  // Disabled state sets text to gray and nukes hover/tab effects
32
31
  &.disabled > a {
33
- color: @gray-light;
34
- }
35
- &.disabled > a:hover,
36
- &.disabled > a:focus {
37
- color: @gray-light;
38
- text-decoration: none;
39
- background-color: transparent;
40
- cursor: default;
41
- }
32
+ color: @nav-disabled-link-color;
42
33
 
43
- // Space the headers out when they follow another list item (link)
44
- + .nav-header {
45
- margin-top: 9px;
34
+ &:hover,
35
+ &:focus {
36
+ color: @nav-disabled-link-hover-color;
37
+ text-decoration: none;
38
+ background-color: transparent;
39
+ cursor: not-allowed;
40
+ }
46
41
  }
47
42
  }
48
43
 
49
44
  // Open dropdowns
50
- &.open > a,
51
- &.open > a:hover,
52
- &.open > a:focus {
53
- color: #fff;
54
- background-color: @link-color;
55
- border-color: @link-color;
56
- .caret {
57
- border-top-color: #fff;
58
- border-bottom-color: #fff;
45
+ .open > a {
46
+ &,
47
+ &:hover,
48
+ &:focus {
49
+ background-color: @nav-link-hover-bg;
50
+ border-color: @link-color;
59
51
  }
60
52
  }
61
53
 
62
- // Redeclare pull classes because of specificity
63
- // Todo: consider making these utilities !important to avoid this bullshit
64
- > .pull-right {
65
- float: right;
66
- }
67
-
68
54
  // Dividers (basically an hr) within the dropdown
69
55
  .nav-divider {
70
56
  .nav-divider();
71
57
  }
72
- }
73
-
74
58
 
59
+ // Prevent IE8 from misplacing imgs
60
+ // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
61
+ > li > a > img {
62
+ max-width: none;
63
+ }
64
+ }
75
65
 
76
- // Nav variations
77
- // --------------------------------------------------
78
66
 
79
67
  // Tabs
80
68
  // -------------------------
81
69
 
82
70
  // Give the tabs something to sit on
83
71
  .nav-tabs {
84
- border-bottom: 1px solid #ddd;
72
+ border-bottom: 1px solid @nav-tabs-border-color;
85
73
  > li {
86
74
  float: left;
87
75
  // Make the list-items overlay the bottom border
@@ -94,25 +82,27 @@
94
82
  border: 1px solid transparent;
95
83
  border-radius: @border-radius-base @border-radius-base 0 0;
96
84
  &:hover {
97
- border-color: @gray-lighter @gray-lighter #ddd;
85
+ border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;
98
86
  }
99
87
  }
100
88
 
101
89
  // Active state, and it's :hover to override normal :hover
102
- &.active > a,
103
- &.active > a:hover,
104
- &.active > a:focus {
105
- color: @gray;
106
- background-color: @body-bg;
107
- border: 1px solid #ddd;
108
- border-bottom-color: transparent;
109
- cursor: default;
90
+ &.active > a {
91
+ &,
92
+ &:hover,
93
+ &:focus {
94
+ color: @nav-tabs-active-link-hover-color;
95
+ background-color: @nav-tabs-active-link-hover-bg;
96
+ border: 1px solid @nav-tabs-active-link-hover-border-color;
97
+ border-bottom-color: transparent;
98
+ cursor: default;
99
+ }
110
100
  }
111
101
  }
112
102
  // pulling this in mainly for less shorthand
113
103
  &.nav-justified {
114
- .nav-justified;
115
- .nav-tabs-justified;
104
+ .nav-justified();
105
+ .nav-tabs-justified();
116
106
  }
117
107
  }
118
108
 
@@ -128,17 +118,17 @@
128
118
  border-radius: 5px;
129
119
  }
130
120
  + li {
131
- > a {
132
- margin-left: 2px;
133
- }
121
+ margin-left: 2px;
134
122
  }
135
123
 
136
124
  // Active state
137
- &.active > a,
138
- &.active > a:hover,
139
- &.active > a:focus {
140
- color: #fff;
141
- background-color: @component-active-bg;
125
+ &.active > a {
126
+ &,
127
+ &:hover,
128
+ &:focus {
129
+ color: @nav-pills-active-link-hover-color;
130
+ background-color: @nav-pills-active-link-hover-bg;
131
+ }
142
132
  }
143
133
  }
144
134
  }
@@ -149,62 +139,52 @@
149
139
  > li {
150
140
  float: none;
151
141
  + li {
152
- > a {
153
- margin-top: 2px;
154
- margin-left: 0; // no need for this gap between nav items
155
- }
142
+ margin-top: 2px;
143
+ margin-left: 0; // no need for this gap between nav items
156
144
  }
157
145
  }
158
146
  }
159
147
 
148
+
149
+ // Nav variations
150
+ // --------------------------------------------------
151
+
160
152
  // Justified nav links
161
153
  // -------------------------
162
154
 
163
155
  .nav-justified {
164
156
  width: 100%;
157
+
165
158
  > li {
166
159
  float: none;
167
- display: table-cell;
168
- width: 1%;
169
- > a {
160
+ > a {
170
161
  text-align: center;
171
162
  }
172
163
  }
164
+
165
+ @media (min-width: @screen-sm) {
166
+ > li {
167
+ display: table-cell;
168
+ width: 1%;
169
+ }
170
+ }
173
171
  }
174
172
 
175
173
  // Move borders to anchors instead of bottom of list
176
- .nav-tabs-justified () {
174
+ .nav-tabs-justified {
177
175
  border-bottom: 0;
178
176
  > li > a {
179
- border-bottom: 1px solid #ddd;
177
+ border-bottom: 1px solid @nav-tabs-justified-link-border-color;
180
178
 
181
179
  // Override margin from .nav-tabs
182
180
  margin-right: 0;
183
181
  }
184
182
  > .active > a {
185
- border-bottom-color: @body-bg;
183
+ border-bottom-color: @nav-tabs-justified-active-link-border-color;
186
184
  }
187
-
188
- }
189
-
190
-
191
-
192
- // Nav headers (for dropdowns and lists)
193
- // -------------------------
194
-
195
- .nav-header {
196
- display: block;
197
- padding: 3px 15px;
198
- font-size: @font-size-mini;
199
- font-weight: bold;
200
- line-height: @line-height-base;
201
- color: @gray-light;
202
- text-shadow: 0 1px 0 rgba(255,255,255,.5);
203
- text-transform: uppercase;
204
185
  }
205
186
 
206
187
 
207
-
208
188
  // Tabbable tabs
209
189
  // -------------------------
210
190
 
@@ -218,9 +198,11 @@
218
198
  .pill-content > .pill-pane {
219
199
  display: none;
220
200
  }
221
- .tab-content > .active,
222
- .pill-content > .active {
223
- display: block;
201
+ .tab-content,
202
+ .pill-content {
203
+ > .active {
204
+ display: block;
205
+ }
224
206
  }
225
207
 
226
208
 
@@ -17,13 +17,13 @@
17
17
  padding: 5px 14px;
18
18
  background-color: @pagination-bg;
19
19
  border: 1px solid @pagination-border;
20
- border-radius: 15px;
20
+ border-radius: @pager-border-radius;
21
21
  }
22
22
 
23
23
  > a:hover,
24
24
  > a:focus {
25
25
  text-decoration: none;
26
- background-color: @pagination-active-bg;
26
+ background-color: @pagination-hover-bg;
27
27
  }
28
28
  }
29
29
 
@@ -46,9 +46,9 @@
46
46
  > a:hover,
47
47
  > a:focus,
48
48
  > span {
49
- color: @gray-light;
49
+ color: @pager-disabled-color;
50
50
  background-color: @pagination-bg;
51
- cursor: default;
51
+ cursor: not-allowed;
52
52
  }
53
53
  }
54
54
 
@@ -6,83 +6,78 @@
6
6
  padding-left: 0;
7
7
  margin: @line-height-computed 0;
8
8
  border-radius: @border-radius-base;
9
- }
10
- .pagination > li {
11
- display: inline; // Remove list-style and block-level defaults
12
- }
13
- .pagination > li > a,
14
- .pagination > li > span {
15
- float: left; // Collapse white-space
16
- padding: 4px 12px;
17
- line-height: @line-height-base;
18
- text-decoration: none;
19
- background-color: @pagination-bg;
20
- border: 1px solid @pagination-border;
21
- border-left-width: 0;
22
- }
23
- .pagination > li > a:hover,
24
- .pagination > li > a:focus,
25
- .pagination > .active > a,
26
- .pagination > .active > span {
27
- background-color: @pagination-active-bg;
28
- }
29
- .pagination > .active > a,
30
- .pagination > .active > span {
31
- color: @gray-light;
32
- cursor: default;
33
- }
34
- .pagination > .disabled > span,
35
- .pagination > .disabled > a,
36
- .pagination > .disabled > a:hover,
37
- .pagination > .disabled > a:focus {
38
- color: @gray-light;
39
- background-color: @pagination-bg;
40
- cursor: default;
41
- }
42
- .pagination > li:first-child > a,
43
- .pagination > li:first-child > span {
44
- border-left-width: 1px;
45
- .border-left-radius(@border-radius-base);
46
- }
47
- .pagination > li:last-child > a,
48
- .pagination > li:last-child > span {
49
- .border-right-radius(@border-radius-base);
50
- }
51
-
52
9
 
53
- // Sizing
54
- // --------------------------------------------------
10
+ > li {
11
+ display: inline; // Remove list-style and block-level defaults
12
+ > a,
13
+ > span {
14
+ position: relative;
15
+ float: left; // Collapse white-space
16
+ padding: @padding-base-vertical @padding-base-horizontal;
17
+ line-height: @line-height-base;
18
+ text-decoration: none;
19
+ background-color: @pagination-bg;
20
+ border: 1px solid @pagination-border;
21
+ margin-left: -1px;
22
+ }
23
+ &:first-child {
24
+ > a,
25
+ > span {
26
+ margin-left: 0;
27
+ .border-left-radius(@border-radius-base);
28
+ }
29
+ }
30
+ &:last-child {
31
+ > a,
32
+ > span {
33
+ .border-right-radius(@border-radius-base);
34
+ }
35
+ }
36
+ }
55
37
 
56
- // Large
57
- .pagination-large {
58
38
  > li > a,
59
39
  > li > span {
60
- padding: @padding-large-vertical @padding-large-horizontal;
61
- font-size: @font-size-large;
40
+ &:hover,
41
+ &:focus {
42
+ background-color: @pagination-hover-bg;
43
+ }
62
44
  }
63
- > li:first-child > a,
64
- > li:first-child > span {
65
- .border-left-radius(@border-radius-large);
45
+
46
+ > .active > a,
47
+ > .active > span {
48
+ &,
49
+ &:hover,
50
+ &:focus {
51
+ z-index: 2;
52
+ color: @pagination-active-color;
53
+ background-color: @pagination-active-bg;
54
+ border-color: @pagination-active-bg;
55
+ cursor: default;
56
+ }
66
57
  }
67
- > li:last-child > a,
68
- > li:last-child > span {
69
- .border-right-radius(@border-radius-large);
58
+
59
+ > .disabled {
60
+ > span,
61
+ > a,
62
+ > a:hover,
63
+ > a:focus {
64
+ color: @pagination-disabled-color;
65
+ background-color: @pagination-bg;
66
+ border-color: @pagination-border;
67
+ cursor: not-allowed;
68
+ }
70
69
  }
71
70
  }
72
71
 
72
+ // Sizing
73
+ // --------------------------------------------------
74
+
75
+ // Large
76
+ .pagination-lg {
77
+ .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large);
78
+ }
79
+
73
80
  // Small
74
- .pagination-small {
75
- > li > a,
76
- > li > span {
77
- padding: @padding-small-vertical @padding-small-horizontal;
78
- font-size: @font-size-small;
79
- }
80
- > li:first-child > a,
81
- > li:first-child > span {
82
- .border-left-radius(@border-radius-small);
83
- }
84
- > li:last-child > a,
85
- > li:last-child > span {
86
- .border-right-radius(@border-radius-small);
87
- }
81
+ .pagination-sm {
82
+ .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small);
88
83
  }
@@ -5,92 +5,144 @@
5
5
 
6
6
  // Base class
7
7
  .panel {
8
- padding: 15px;
9
- margin-bottom: 20px;
8
+ margin-bottom: @line-height-computed;
10
9
  background-color: @panel-bg;
11
- border: 1px solid @panel-border;
10
+ border: 1px solid transparent;
12
11
  border-radius: @panel-border-radius;
13
12
  .box-shadow(0 1px 1px rgba(0,0,0,.05));
14
13
  }
15
14
 
15
+ // Panel contents
16
+ .panel-body {
17
+ padding: 15px;
18
+ .clearfix();
19
+ }
20
+
21
+
22
+ // List groups in panels
23
+ //
24
+ // By default, space out list group content from panel headings to account for
25
+ // any kind of custom content between the two.
26
+
27
+ .panel {
28
+ > .list-group {
29
+ margin-bottom: 0;
30
+
31
+ .list-group-item {
32
+ border-width: 1px 0;
33
+
34
+ // Remove border radius for top one
35
+ &:first-child {
36
+ .border-top-radius(0);
37
+ }
38
+ // But keep it for the last one
39
+ &:last-child {
40
+ border-bottom: 0;
41
+ }
42
+ }
43
+ }
44
+ }
45
+ // Collapse space between when there's no additional content.
46
+ .panel-heading + .list-group {
47
+ .list-group-item:first-child {
48
+ border-top-width: 0;
49
+ }
50
+ }
51
+
52
+
53
+ // Tables in panels
54
+ //
55
+ // Place a non-bordered `.table` within a panel (not within a `.panel-body`) and
56
+ // watch it go full width.
57
+
58
+ .panel {
59
+ > .table {
60
+ margin-bottom: 0;
61
+ }
62
+ > .panel-body + .table {
63
+ border-top: 1px solid @table-border-color;
64
+ }
65
+ }
66
+
67
+
16
68
  // Optional heading
17
69
  .panel-heading {
18
- margin: -15px -15px 15px;
19
70
  padding: 10px 15px;
20
- font-size: (@font-size-base * 1.25);
21
- font-weight: 500;
22
- background-color: @panel-heading-bg;
23
- border-bottom: 1px solid @panel-border;
24
- border-top-left-radius: (@panel-border-radius - 1);
25
- border-top-right-radius: (@panel-border-radius - 1);
71
+ border-bottom: 1px solid transparent;
72
+ .border-top-radius(@panel-border-radius - 1);
73
+ }
74
+
75
+ // Within heading, strip any `h*` tag of it's default margins for spacing.
76
+ .panel-title {
77
+ margin-top: 0;
78
+ margin-bottom: 0;
79
+ font-size: ceil((@font-size-base * 1.125));
80
+ > a {
81
+ color: inherit;
82
+ }
26
83
  }
27
84
 
28
85
  // Optional footer (stays gray in every modifier class)
29
86
  .panel-footer {
30
- margin: 15px -15px -15px;
31
87
  padding: 10px 15px;
32
88
  background-color: @panel-footer-bg;
33
- border-top: 1px solid @panel-border;
34
- border-bottom-left-radius: (@panel-border-radius - 1);
35
- border-bottom-right-radius: (@panel-border-radius - 1);
89
+ border-top: 1px solid @panel-inner-border;
90
+ .border-bottom-radius(@panel-border-radius - 1);
36
91
  }
37
92
 
38
- // Contextual variations
39
- .panel-primary {
40
- border-color: @panel-primary-border;
93
+
94
+ // Collapsable panels (aka, accordion)
95
+ //
96
+ // Wrap a series of panels in `.panel-group` to turn them into an accordion with
97
+ // the help of our collapse JavaScript plugin.
98
+
99
+ .panel-group {
100
+ // Tighten up margin so it's only between panels
101
+ .panel {
102
+ margin-bottom: 0;
103
+ border-radius: @panel-border-radius;
104
+ overflow: hidden; // crop contents when collapsed
105
+ + .panel {
106
+ margin-top: 5px;
107
+ }
108
+ }
109
+
41
110
  .panel-heading {
42
- color: @panel-primary-text;
43
- background-color: @panel-primary-heading-bg;
44
- border-color: @panel-primary-border;
111
+ border-bottom: 0;
112
+ + .panel-collapse .panel-body {
113
+ border-top: 1px solid @panel-inner-border;
114
+ }
115
+ }
116
+ .panel-footer {
117
+ border-top: 0;
118
+ + .panel-collapse .panel-body {
119
+ border-bottom: 1px solid @panel-inner-border;
120
+ }
121
+ }
122
+
123
+ // New subcomponent for wrapping collapsable content for proper animations
124
+ .panel-collapse {
125
+
45
126
  }
46
127
  }
128
+
129
+
130
+ // Contextual variations
131
+ .panel-default {
132
+ .panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border);
133
+ }
134
+ .panel-primary {
135
+ .panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border);
136
+ }
47
137
  .panel-success {
48
- border-color: @panel-success-border;
49
- .panel-heading {
50
- color: @panel-success-text;
51
- background-color: @panel-success-heading-bg;
52
- border-color: @panel-success-border;
53
- }
138
+ .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border);
54
139
  }
55
140
  .panel-warning {
56
- border-color: @panel-warning-border;
57
- .panel-heading {
58
- color: @panel-warning-text;
59
- background-color: @panel-warning-heading-bg;
60
- border-color: @panel-warning-border;
61
- }
141
+ .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border);
62
142
  }
63
143
  .panel-danger {
64
- border-color: @panel-danger-border;
65
- .panel-heading {
66
- color: @panel-danger-text;
67
- background-color: @panel-danger-heading-bg;
68
- border-color: @panel-danger-border;
69
- }
144
+ .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border);
70
145
  }
71
146
  .panel-info {
72
- border-color: @panel-info-border;
73
- .panel-heading {
74
- color: @panel-info-text;
75
- background-color: @panel-info-heading-bg;
76
- border-color: @panel-info-border;
77
- }
78
- }
79
-
80
- // List groups in panels
81
- .list-group-flush {
82
- margin: 15px -15px -15px;
83
-
84
- .list-group-item {
85
- border-width: 1px 0;
86
-
87
- // Remove border radius for top one
88
- &:first-child {
89
- .border-top-radius(0);
90
- }
91
- // But keep it for the last one
92
- &:last-child {
93
- border-bottom: 0;
94
- }
95
- }
147
+ .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);
96
148
  }