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.
- checksums.yaml +7 -0
- data/README.rdoc +3 -3
- data/lib/padrino-admin/access_control.rb +46 -47
- data/lib/padrino-admin/bootstrap-less/alerts.less +29 -55
- data/lib/padrino-admin/bootstrap-less/badges.less +13 -15
- data/lib/padrino-admin/bootstrap-less/bootstrap.less +17 -21
- data/lib/padrino-admin/bootstrap-less/breadcrumbs.less +6 -11
- data/lib/padrino-admin/bootstrap-less/button-groups.less +114 -32
- data/lib/padrino-admin/bootstrap-less/buttons.less +41 -41
- data/lib/padrino-admin/bootstrap-less/carousel.less +43 -18
- data/lib/padrino-admin/bootstrap-less/close.less +4 -4
- data/lib/padrino-admin/bootstrap-less/code.less +8 -10
- data/lib/padrino-admin/bootstrap-less/component-animations.less +10 -4
- data/lib/padrino-admin/bootstrap-less/dropdowns.less +78 -51
- data/lib/padrino-admin/bootstrap-less/forms.less +183 -274
- data/lib/padrino-admin/bootstrap-less/glyphicons.less +232 -0
- data/lib/padrino-admin/bootstrap-less/grid.less +230 -88
- data/lib/padrino-admin/bootstrap-less/input-groups.less +127 -0
- data/lib/padrino-admin/bootstrap-less/jumbotron.less +16 -8
- data/lib/padrino-admin/bootstrap-less/labels.less +25 -37
- data/lib/padrino-admin/bootstrap-less/list-group.less +34 -35
- data/lib/padrino-admin/bootstrap-less/media.less +7 -5
- data/lib/padrino-admin/bootstrap-less/mixins.less +321 -108
- data/lib/padrino-admin/bootstrap-less/modals.less +24 -20
- data/lib/padrino-admin/bootstrap-less/navbar.less +474 -216
- data/lib/padrino-admin/bootstrap-less/navs.less +67 -85
- data/lib/padrino-admin/bootstrap-less/pager.less +4 -4
- data/lib/padrino-admin/bootstrap-less/pagination.less +64 -69
- data/lib/padrino-admin/bootstrap-less/panels.less +114 -62
- data/lib/padrino-admin/bootstrap-less/popovers.less +18 -18
- data/lib/padrino-admin/bootstrap-less/print.less +22 -7
- data/lib/padrino-admin/bootstrap-less/progress-bars.less +10 -33
- data/lib/padrino-admin/bootstrap-less/responsive-utilities.less +141 -40
- data/lib/padrino-admin/bootstrap-less/scaffolding.less +66 -19
- data/lib/padrino-admin/bootstrap-less/tables.less +154 -158
- data/lib/padrino-admin/bootstrap-less/theme.less +232 -0
- data/lib/padrino-admin/bootstrap-less/thumbnails.less +9 -20
- data/lib/padrino-admin/bootstrap-less/tooltip.less +3 -3
- data/lib/padrino-admin/bootstrap-less/type.less +47 -55
- data/lib/padrino-admin/bootstrap-less/utilities.less +2 -2
- data/lib/padrino-admin/bootstrap-less/variables.less +289 -93
- data/lib/padrino-admin/bootstrap-less/wells.less +2 -2
- data/lib/padrino-admin/generators/actions.rb +11 -10
- data/lib/padrino-admin/generators/admin_app.rb +11 -11
- data/lib/padrino-admin/generators/admin_page.rb +9 -9
- data/lib/padrino-admin/generators/orm.rb +6 -7
- data/lib/padrino-admin/generators/templates/account/activerecord.rb.tt +7 -7
- data/lib/padrino-admin/generators/templates/account/couchrest.rb.tt +16 -16
- data/lib/padrino-admin/generators/templates/account/datamapper.rb.tt +7 -7
- data/lib/padrino-admin/generators/templates/account/minirecord.rb.tt +7 -7
- data/lib/padrino-admin/generators/templates/account/mongoid.rb.tt +8 -8
- data/lib/padrino-admin/generators/templates/account/mongomapper.rb.tt +7 -7
- data/lib/padrino-admin/generators/templates/account/ohm.rb.tt +9 -9
- data/lib/padrino-admin/generators/templates/account/sequel.rb.tt +8 -8
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/affix.js +9 -3
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/alert.js +4 -2
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap.min.js +4 -4
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/button.js +9 -5
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/carousel.js +19 -12
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/collapse.js +68 -45
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/dropdown.js +6 -7
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/modal.js +43 -40
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/popover.js +16 -10
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/scrollspy.js +6 -4
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/tab.js +4 -2
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/tooltip.js +78 -48
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/transition.js +10 -1
- data/lib/padrino-admin/generators/templates/assets/stylesheets/application.css +1 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap.css +622 -334
- data/lib/padrino-admin/generators/templates/erb/app/layouts/error.erb.tt +2 -2
- data/lib/padrino-admin/generators/templates/erb/app/sessions/new.erb.tt +9 -9
- data/lib/padrino-admin/generators/templates/erb/page/_form.erb.tt +3 -3
- data/lib/padrino-admin/generators/templates/erb/page/index.erb.tt +3 -3
- data/lib/padrino-admin/generators/templates/haml/app/layouts/error.haml.tt +1 -1
- data/lib/padrino-admin/generators/templates/haml/app/sessions/new.haml.tt +9 -7
- data/lib/padrino-admin/generators/templates/haml/page/_form.haml.tt +2 -2
- data/lib/padrino-admin/generators/templates/haml/page/index.haml.tt +2 -2
- data/lib/padrino-admin/generators/templates/page/controller.rb.tt +3 -3
- data/lib/padrino-admin/generators/templates/slim/app/layouts/error.slim.tt +1 -1
- data/lib/padrino-admin/generators/templates/slim/app/sessions/new.slim.tt +9 -7
- data/lib/padrino-admin/generators/templates/slim/page/_form.slim.tt +2 -2
- data/lib/padrino-admin/generators/templates/slim/page/index.slim.tt +2 -2
- data/lib/padrino-admin/helpers/authentication_helpers.rb +35 -35
- data/lib/padrino-admin/helpers/view_helpers.rb +12 -19
- data/lib/padrino-admin/utils/crypt.rb +10 -9
- data/lib/padrino-admin.rb +4 -5
- data/test/fixtures/data_mapper.rb +10 -9
- data/test/generators/test_account_model_generator.rb +2 -2
- metadata +14 -21
@@ -12,34 +12,39 @@ th {
|
|
12
12
|
}
|
13
13
|
|
14
14
|
|
15
|
-
//
|
16
|
-
// ---------------
|
15
|
+
// Baseline styles
|
17
16
|
|
18
17
|
.table {
|
19
18
|
width: 100%;
|
20
19
|
margin-bottom: @line-height-computed;
|
21
20
|
// Cells
|
22
|
-
thead
|
23
|
-
tbody
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
21
|
+
thead,
|
22
|
+
tbody,
|
23
|
+
tfoot {
|
24
|
+
> tr {
|
25
|
+
> th,
|
26
|
+
> td {
|
27
|
+
padding: @table-cell-padding;
|
28
|
+
line-height: @line-height-base;
|
29
|
+
vertical-align: top;
|
30
|
+
border-top: 1px solid @table-border-color;
|
31
|
+
}
|
32
|
+
}
|
30
33
|
}
|
31
34
|
// Bottom align for column headings
|
32
35
|
thead > tr > th {
|
33
36
|
vertical-align: bottom;
|
37
|
+
border-bottom: 2px solid @table-border-color;
|
34
38
|
}
|
35
39
|
// Remove top border from thead by default
|
36
|
-
caption + thead
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
caption + thead,
|
41
|
+
colgroup + thead,
|
42
|
+
thead:first-child {
|
43
|
+
tr:first-child {
|
44
|
+
th, td {
|
45
|
+
border-top: 0;
|
46
|
+
}
|
47
|
+
}
|
43
48
|
}
|
44
49
|
// Account for multiple tbody instances
|
45
50
|
tbody + tbody {
|
@@ -53,188 +58,179 @@ th {
|
|
53
58
|
}
|
54
59
|
|
55
60
|
|
56
|
-
|
57
|
-
// CONDENSED TABLE W/ HALF PADDING
|
58
|
-
// -------------------------------
|
61
|
+
// Condensed table w/ half padding
|
59
62
|
|
60
63
|
.table-condensed {
|
61
|
-
thead
|
62
|
-
tbody
|
63
|
-
|
64
|
-
|
65
|
-
|
64
|
+
thead,
|
65
|
+
tbody,
|
66
|
+
tfoot {
|
67
|
+
> tr {
|
68
|
+
> th,
|
69
|
+
> td {
|
70
|
+
padding: @table-condensed-cell-padding;
|
71
|
+
}
|
72
|
+
}
|
66
73
|
}
|
67
74
|
}
|
68
75
|
|
69
76
|
|
70
|
-
|
71
|
-
//
|
72
|
-
//
|
77
|
+
// Bordered version
|
78
|
+
//
|
79
|
+
// Add borders all around the table and between all the columns.
|
73
80
|
|
74
81
|
.table-bordered {
|
75
82
|
border: 1px solid @table-border-color;
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
border-left: 1px solid @table-border-color;
|
85
|
-
}
|
86
|
-
// Prevent a double border
|
87
|
-
> caption + thead > tr:first-child th,
|
88
|
-
> caption + tbody > tr:first-child th,
|
89
|
-
> caption + tbody > tr:first-child td,
|
90
|
-
> colgroup + thead > tr:first-child th,
|
91
|
-
> colgroup + tbody > tr:first-child th,
|
92
|
-
> colgroup + tbody > tr:first-child td,
|
93
|
-
> thead:first-child > tr:first-child th,
|
94
|
-
> tbody:first-child > tr:first-child th,
|
95
|
-
> tbody:first-child > tr:first-child td {
|
96
|
-
border-top: 0;
|
97
|
-
}
|
98
|
-
> thead:first-child > tr:first-child > th,
|
99
|
-
> tbody:first-child > tr:first-child > td,
|
100
|
-
> tbody:first-child > tr:first-child > th {
|
101
|
-
// For first th/td in the first row in the first thead or tbody
|
102
|
-
&:first-child{
|
103
|
-
border-top-left-radius: @border-radius-base;
|
104
|
-
}
|
105
|
-
// For last th/td in the first row in the first thead or tbody
|
106
|
-
&:last-child{
|
107
|
-
border-top-right-radius: @border-radius-base;
|
83
|
+
> thead,
|
84
|
+
> tbody,
|
85
|
+
> tfoot {
|
86
|
+
> tr {
|
87
|
+
> th,
|
88
|
+
> td {
|
89
|
+
border: 1px solid @table-border-color;
|
90
|
+
}
|
108
91
|
}
|
109
92
|
}
|
110
|
-
> thead
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
&:first-child{
|
117
|
-
border-bottom-left-radius: @border-radius-base;
|
118
|
-
}
|
119
|
-
// For last th/td (can be either) in the last row in the last thead, tbody, and tfoot
|
120
|
-
&:last-child{
|
121
|
-
border-bottom-right-radius: @border-radius-base;
|
122
|
-
}
|
123
|
-
}
|
124
|
-
|
125
|
-
// Clear border-radius for first and last td in the last row in the last tbody for table with tfoot
|
126
|
-
> tfoot + tbody:last-child > tr:last-child > td:first-child {
|
127
|
-
border-bottom-left-radius: 0;
|
128
|
-
}
|
129
|
-
> tfoot + tbody:last-child > tr:last-child > td:last-child {
|
130
|
-
border-bottom-right-radius: 0;
|
131
|
-
}
|
132
|
-
|
133
|
-
// Special fixes to round the left border on the first td/th
|
134
|
-
> caption + thead > tr:first-child > th,
|
135
|
-
> caption + tbody > tr:first-child > td,
|
136
|
-
> colgroup + thead > tr:first-child > th,
|
137
|
-
> colgroup + tbody > tr:first-child > td {
|
138
|
-
&:first-child{
|
139
|
-
border-top-left-radius: @border-radius-base;
|
140
|
-
}
|
141
|
-
&:last-child{
|
142
|
-
border-top-right-radius: @border-radius-base;
|
93
|
+
> thead {
|
94
|
+
> tr {
|
95
|
+
> th,
|
96
|
+
> td {
|
97
|
+
border-bottom-width: 2px;
|
98
|
+
}
|
143
99
|
}
|
144
100
|
}
|
145
101
|
}
|
146
102
|
|
147
103
|
|
148
|
-
|
149
|
-
//
|
150
|
-
// --------------
|
151
|
-
|
104
|
+
// Zebra-striping
|
105
|
+
//
|
152
106
|
// Default zebra-stripe styles (alternating gray and transparent backgrounds)
|
107
|
+
|
153
108
|
.table-striped {
|
154
109
|
> tbody {
|
155
|
-
> tr:nth-child(odd)
|
156
|
-
|
157
|
-
|
110
|
+
> tr:nth-child(odd) {
|
111
|
+
> td,
|
112
|
+
> th {
|
113
|
+
background-color: @table-bg-accent;
|
114
|
+
}
|
158
115
|
}
|
159
116
|
}
|
160
117
|
}
|
161
118
|
|
162
119
|
|
163
|
-
|
164
|
-
//
|
165
|
-
// ------------
|
166
|
-
|
120
|
+
// Hover effect
|
121
|
+
//
|
167
122
|
// Placed here since it has to come after the potential zebra striping
|
123
|
+
|
168
124
|
.table-hover {
|
169
125
|
> tbody {
|
170
|
-
> tr:hover
|
171
|
-
|
172
|
-
|
126
|
+
> tr:hover {
|
127
|
+
> td,
|
128
|
+
> th {
|
129
|
+
background-color: @table-bg-hover;
|
130
|
+
}
|
173
131
|
}
|
174
132
|
}
|
175
133
|
}
|
176
134
|
|
177
135
|
|
178
|
-
|
179
|
-
//
|
180
|
-
// -----------------
|
181
|
-
|
136
|
+
// Table cell sizing
|
137
|
+
//
|
182
138
|
// Reset default table behavior
|
183
|
-
|
139
|
+
|
140
|
+
table col[class*="col-"] {
|
184
141
|
float: none;
|
185
142
|
display: table-column;
|
186
143
|
}
|
187
|
-
table
|
188
|
-
|
189
|
-
|
190
|
-
|
144
|
+
table {
|
145
|
+
td,
|
146
|
+
th {
|
147
|
+
&[class*="col-"] {
|
148
|
+
float: none;
|
149
|
+
display: table-cell;
|
150
|
+
}
|
151
|
+
}
|
191
152
|
}
|
192
153
|
|
193
154
|
|
194
|
-
|
195
|
-
//
|
196
|
-
//
|
197
|
-
//
|
198
|
-
|
199
|
-
.table >
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
> th.danger,
|
208
|
-
&.danger > td {
|
209
|
-
background-color: @state-danger-bg;
|
210
|
-
border-color: @state-danger-border;
|
211
|
-
}
|
212
|
-
> td.warning,
|
213
|
-
> th.warning,
|
214
|
-
&.warning > td {
|
215
|
-
background-color: @state-warning-bg;
|
216
|
-
border-color: @state-warning-border;
|
155
|
+
// Table backgrounds
|
156
|
+
//
|
157
|
+
// Exact selectors below required to override `.table-striped` and prevent
|
158
|
+
// inheritance to nested tables.
|
159
|
+
|
160
|
+
.table > thead > tr,
|
161
|
+
.table > tbody > tr,
|
162
|
+
.table > tfoot > tr {
|
163
|
+
> td.active,
|
164
|
+
> th.active,
|
165
|
+
&.active > td,
|
166
|
+
&.active > th {
|
167
|
+
background-color: @table-bg-active;
|
217
168
|
}
|
218
169
|
}
|
219
170
|
|
220
|
-
//
|
221
|
-
.table-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
border
|
171
|
+
// Generate the contextual variants
|
172
|
+
.table-row-variant(success; @state-success-bg; @state-success-border);
|
173
|
+
.table-row-variant(danger; @state-danger-bg; @state-danger-border);
|
174
|
+
.table-row-variant(warning; @state-warning-bg; @state-warning-border);
|
175
|
+
|
176
|
+
|
177
|
+
// Responsive tables
|
178
|
+
//
|
179
|
+
// Wrap your tables in `.table-scrollable` and we'll make them mobile friendly
|
180
|
+
// by enabling horizontal scrolling. Only applies <768px. Everything above that
|
181
|
+
// will display normally.
|
182
|
+
|
183
|
+
@media (max-width: @screen-sm) {
|
184
|
+
.table-responsive {
|
185
|
+
width: 100%;
|
186
|
+
margin-bottom: 15px;
|
187
|
+
overflow-y: hidden;
|
188
|
+
overflow-x: scroll;
|
189
|
+
border: 1px solid @table-border-color;
|
190
|
+
|
191
|
+
// Tighten up spacing and give a background color
|
192
|
+
> .table {
|
193
|
+
margin-bottom: 0;
|
194
|
+
background-color: #fff;
|
195
|
+
|
196
|
+
// Ensure the content doesn't wrap
|
197
|
+
> thead,
|
198
|
+
> tbody,
|
199
|
+
> tfoot {
|
200
|
+
> tr {
|
201
|
+
> th,
|
202
|
+
> td {
|
203
|
+
white-space: nowrap;
|
204
|
+
}
|
205
|
+
}
|
206
|
+
}
|
207
|
+
}
|
208
|
+
|
209
|
+
// Special overrides for the bordered tables
|
210
|
+
> .table-bordered {
|
211
|
+
border: 0;
|
212
|
+
|
213
|
+
// Nuke the appropriate borders so that the parent can handle them
|
214
|
+
> thead,
|
215
|
+
> tbody,
|
216
|
+
> tfoot {
|
217
|
+
> tr {
|
218
|
+
> th:first-child,
|
219
|
+
> td:first-child {
|
220
|
+
border-left: 0;
|
221
|
+
}
|
222
|
+
> th:last-child,
|
223
|
+
> td:last-child {
|
224
|
+
border-right: 0;
|
225
|
+
}
|
226
|
+
}
|
227
|
+
> tr:last-child {
|
228
|
+
> th,
|
229
|
+
> td {
|
230
|
+
border-bottom: 0;
|
231
|
+
}
|
232
|
+
}
|
233
|
+
}
|
234
|
+
}
|
239
235
|
}
|
240
236
|
}
|
@@ -0,0 +1,232 @@
|
|
1
|
+
|
2
|
+
//
|
3
|
+
// Load core variables and mixins
|
4
|
+
// --------------------------------------------------
|
5
|
+
|
6
|
+
@import "variables.less";
|
7
|
+
@import "mixins.less";
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
//
|
12
|
+
// Buttons
|
13
|
+
// --------------------------------------------------
|
14
|
+
|
15
|
+
// Common styles
|
16
|
+
.btn-default,
|
17
|
+
.btn-primary,
|
18
|
+
.btn-success,
|
19
|
+
.btn-info,
|
20
|
+
.btn-warning,
|
21
|
+
.btn-danger {
|
22
|
+
text-shadow: 0 -1px 0 rgba(0,0,0,.2);
|
23
|
+
@shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);
|
24
|
+
.box-shadow(@shadow);
|
25
|
+
|
26
|
+
// Reset the shadow
|
27
|
+
&:active,
|
28
|
+
&.active {
|
29
|
+
.box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
// Mixin for generating new styles
|
34
|
+
.btn-styles(@btn-color: #555;) {
|
35
|
+
#gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 10%));
|
36
|
+
border-color: darken(@btn-color, 12%);
|
37
|
+
|
38
|
+
&:active,
|
39
|
+
&.active {
|
40
|
+
background-color: darken(@btn-color, 10%);
|
41
|
+
border-color: darken(@btn-color, 12%);
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
// Common styles
|
46
|
+
.btn {
|
47
|
+
// Remove the gradient for the pressed/active state
|
48
|
+
&:active,
|
49
|
+
&.active {
|
50
|
+
background-image: none;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
// Apply the mixin to the buttons
|
55
|
+
.btn-default { .btn-styles(@btn-default-bg;); text-shadow: 0 1px 0 #fff; border-color: #ccc; }
|
56
|
+
.btn-primary { .btn-styles(@btn-primary-bg); }
|
57
|
+
.btn-success { .btn-styles(@btn-success-bg); }
|
58
|
+
.btn-warning { .btn-styles(@btn-warning-bg); }
|
59
|
+
.btn-danger { .btn-styles(@btn-danger-bg); }
|
60
|
+
.btn-info { .btn-styles(@btn-info-bg); }
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
//
|
65
|
+
// Images
|
66
|
+
// --------------------------------------------------
|
67
|
+
|
68
|
+
.thumbnail,
|
69
|
+
.img-thumbnail {
|
70
|
+
.box-shadow(0 1px 2px rgba(0,0,0,.075));
|
71
|
+
}
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
//
|
76
|
+
// Dropdowns
|
77
|
+
// --------------------------------------------------
|
78
|
+
|
79
|
+
.dropdown-menu > li > a:hover,
|
80
|
+
.dropdown-menu > li > a:focus,
|
81
|
+
.dropdown-menu > .active > a,
|
82
|
+
.dropdown-menu > .active > a:hover,
|
83
|
+
.dropdown-menu > .active > a:focus {
|
84
|
+
#gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));
|
85
|
+
background-color: darken(@dropdown-link-hover-bg, 5%);
|
86
|
+
}
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
//
|
91
|
+
// Navbar
|
92
|
+
// --------------------------------------------------
|
93
|
+
|
94
|
+
// Basic navbar
|
95
|
+
.navbar {
|
96
|
+
#gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg;);
|
97
|
+
border-radius: @navbar-border-radius;
|
98
|
+
@shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);
|
99
|
+
.box-shadow(@shadow);
|
100
|
+
|
101
|
+
.navbar-nav > .active > a {
|
102
|
+
background-color: @navbar-default-bg;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
.navbar-brand,
|
106
|
+
.navbar-nav > li > a {
|
107
|
+
text-shadow: 0 1px 0 rgba(255,255,255,.25);
|
108
|
+
}
|
109
|
+
|
110
|
+
// Inverted navbar
|
111
|
+
.navbar-inverse {
|
112
|
+
#gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg;);
|
113
|
+
|
114
|
+
.navbar-nav > .active > a {
|
115
|
+
background-color: @navbar-inverse-bg;
|
116
|
+
}
|
117
|
+
|
118
|
+
.navbar-brand,
|
119
|
+
.navbar-nav > li > a {
|
120
|
+
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
|
121
|
+
}
|
122
|
+
}
|
123
|
+
|
124
|
+
// Undo rounded corners in static and fixed navbars
|
125
|
+
.navbar-static-top,
|
126
|
+
.navbar-fixed-top,
|
127
|
+
.navbar-fixed-bottom {
|
128
|
+
border-radius: 0;
|
129
|
+
}
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
//
|
134
|
+
// Alerts
|
135
|
+
// --------------------------------------------------
|
136
|
+
|
137
|
+
// Common styles
|
138
|
+
.alert {
|
139
|
+
text-shadow: 0 1px 0 rgba(255,255,255,.2);
|
140
|
+
@shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);
|
141
|
+
.box-shadow(@shadow);
|
142
|
+
}
|
143
|
+
|
144
|
+
// Mixin for generating new styles
|
145
|
+
.alert-styles(@color) {
|
146
|
+
#gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));
|
147
|
+
border-color: darken(@color, 15%);
|
148
|
+
}
|
149
|
+
|
150
|
+
// Apply the mixin to the alerts
|
151
|
+
.alert-success { .alert-styles(@alert-success-bg); }
|
152
|
+
.alert-info { .alert-styles(@alert-info-bg); }
|
153
|
+
.alert-warning { .alert-styles(@alert-warning-bg); }
|
154
|
+
.alert-danger { .alert-styles(@alert-danger-bg); }
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
//
|
159
|
+
// Progress bars
|
160
|
+
// --------------------------------------------------
|
161
|
+
|
162
|
+
// Give the progress background some depth
|
163
|
+
.progress {
|
164
|
+
#gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg;)
|
165
|
+
}
|
166
|
+
|
167
|
+
// Mixin for generating new styles
|
168
|
+
.progress-bar-styles(@color) {
|
169
|
+
#gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));
|
170
|
+
}
|
171
|
+
|
172
|
+
// Apply the mixin to the progress bars
|
173
|
+
.progress-bar { .progress-bar-styles(@progress-bar-bg); }
|
174
|
+
.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }
|
175
|
+
.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }
|
176
|
+
.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }
|
177
|
+
.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
//
|
182
|
+
// List groups
|
183
|
+
// --------------------------------------------------
|
184
|
+
|
185
|
+
.list-group {
|
186
|
+
border-radius: @border-radius-base;
|
187
|
+
.box-shadow(0 1px 2px rgba(0,0,0,.075));
|
188
|
+
}
|
189
|
+
.list-group-item.active,
|
190
|
+
.list-group-item.active:hover,
|
191
|
+
.list-group-item.active:focus {
|
192
|
+
text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);
|
193
|
+
#gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));
|
194
|
+
border-color: darken(@list-group-active-border, 7.5%);
|
195
|
+
}
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
//
|
200
|
+
// Panels
|
201
|
+
// --------------------------------------------------
|
202
|
+
|
203
|
+
// Common styles
|
204
|
+
.panel {
|
205
|
+
.box-shadow(0 1px 2px rgba(0,0,0,.05));
|
206
|
+
}
|
207
|
+
|
208
|
+
// Mixin for generating new styles
|
209
|
+
.panel-heading-styles(@color) {
|
210
|
+
#gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));
|
211
|
+
}
|
212
|
+
|
213
|
+
// Apply the mixin to the panel headings only
|
214
|
+
.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }
|
215
|
+
.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }
|
216
|
+
.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }
|
217
|
+
.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }
|
218
|
+
.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }
|
219
|
+
.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
//
|
224
|
+
// Wells
|
225
|
+
// --------------------------------------------------
|
226
|
+
|
227
|
+
.well {
|
228
|
+
#gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg;);
|
229
|
+
border-color: darken(@well-bg, 10%);
|
230
|
+
@shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);
|
231
|
+
.box-shadow(@shadow);
|
232
|
+
}
|
@@ -3,28 +3,17 @@
|
|
3
3
|
// --------------------------------------------------
|
4
4
|
|
5
5
|
|
6
|
-
//
|
7
|
-
// For thumbnail block-level composite components and simple image styles
|
8
|
-
|
9
|
-
// The actual thumbnailed element
|
10
|
-
// Can be `a`, `div`, or `img`
|
11
|
-
.thumbnail,
|
12
|
-
.img-thumbnail {
|
13
|
-
padding: 4px;
|
14
|
-
line-height: @line-height-base;
|
15
|
-
background-color: @thumbnail-bg;
|
16
|
-
border: 1px solid @thumbnail-border;
|
17
|
-
border-radius: @thumbnail-border-radius;
|
18
|
-
.transition(all .2s ease-in-out);
|
19
|
-
}
|
6
|
+
// Mixin and adjust the regular image class
|
20
7
|
.thumbnail {
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
8
|
+
.img-thumbnail();
|
9
|
+
display: block; // Override the inline-block from `.img-thumbnail`
|
10
|
+
|
11
|
+
> img {
|
12
|
+
.img-responsive();
|
13
|
+
}
|
26
14
|
}
|
27
15
|
|
16
|
+
|
28
17
|
// Add a hover state for linked versions only
|
29
18
|
a.thumbnail:hover,
|
30
19
|
a.thumbnail:focus {
|
@@ -37,6 +26,6 @@ a.thumbnail:focus {
|
|
37
26
|
margin-right: auto;
|
38
27
|
}
|
39
28
|
.thumbnail .caption {
|
40
|
-
padding:
|
29
|
+
padding: @thumbnail-caption-padding;
|
41
30
|
color: @thumbnail-caption-color;
|
42
31
|
}
|
@@ -9,11 +9,11 @@
|
|
9
9
|
z-index: @zindex-tooltip;
|
10
10
|
display: block;
|
11
11
|
visibility: visible;
|
12
|
-
font-size: @font-size-
|
12
|
+
font-size: @font-size-small;
|
13
13
|
line-height: 1.4;
|
14
14
|
.opacity(0);
|
15
15
|
|
16
|
-
&.in { .opacity(
|
16
|
+
&.in { .opacity(.9); }
|
17
17
|
&.top { margin-top: -3px; padding: 5px 0; }
|
18
18
|
&.right { margin-left: 3px; padding: 0 5px; }
|
19
19
|
&.bottom { margin-top: 3px; padding: 5px 0; }
|
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
// Wrapper for the tooltip content
|
24
24
|
.tooltip-inner {
|
25
|
-
max-width:
|
25
|
+
max-width: @tooltip-max-width;
|
26
26
|
padding: 3px 8px;
|
27
27
|
color: @tooltip-color;
|
28
28
|
text-align: center;
|