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
@@ -6,7 +6,6 @@
|
|
6
6
|
// Global values
|
7
7
|
// --------------------------------------------------
|
8
8
|
|
9
|
-
|
10
9
|
// Grays
|
11
10
|
// -------------------------
|
12
11
|
|
@@ -48,7 +47,6 @@
|
|
48
47
|
@font-size-base: 14px;
|
49
48
|
@font-size-large: ceil(@font-size-base * 1.25); // ~18px
|
50
49
|
@font-size-small: ceil(@font-size-base * 0.85); // ~12px
|
51
|
-
@font-size-mini: ceil(@font-size-base * 0.75); // ~11px
|
52
50
|
|
53
51
|
@line-height-base: 1.428571429; // 20/14
|
54
52
|
@line-height-computed: floor(@font-size-base * @line-height-base); // ~20px
|
@@ -57,33 +55,48 @@
|
|
57
55
|
@headings-font-weight: 500;
|
58
56
|
@headings-line-height: 1.1;
|
59
57
|
|
58
|
+
// Iconography
|
59
|
+
// -------------------------
|
60
|
+
|
61
|
+
@icon-font-path: "../fonts/";
|
62
|
+
@icon-font-name: "glyphicons-halflings-regular";
|
63
|
+
|
60
64
|
|
61
65
|
// Components
|
62
66
|
// -------------------------
|
63
67
|
// Based on 14px font-size and 1.428 line-height (~20px to start)
|
64
68
|
|
65
|
-
@padding-base-vertical:
|
69
|
+
@padding-base-vertical: 6px;
|
66
70
|
@padding-base-horizontal: 12px;
|
67
71
|
|
68
|
-
@padding-large-vertical:
|
72
|
+
@padding-large-vertical: 10px;
|
69
73
|
@padding-large-horizontal: 16px;
|
70
74
|
|
71
75
|
@padding-small-vertical: 5px;
|
72
76
|
@padding-small-horizontal: 10px;
|
73
77
|
|
78
|
+
@line-height-large: 1.33;
|
79
|
+
@line-height-small: 1.5;
|
80
|
+
|
74
81
|
@border-radius-base: 4px;
|
75
82
|
@border-radius-large: 6px;
|
76
83
|
@border-radius-small: 3px;
|
77
84
|
|
78
85
|
@component-active-bg: @brand-primary;
|
79
86
|
|
87
|
+
@caret-width-base: 4px;
|
88
|
+
@caret-width-large: 5px;
|
80
89
|
|
81
90
|
// Tables
|
82
91
|
// -------------------------
|
83
92
|
|
93
|
+
@table-cell-padding: 8px;
|
94
|
+
@table-condensed-cell-padding: 5px;
|
95
|
+
|
84
96
|
@table-bg: transparent; // overall background-color
|
85
97
|
@table-bg-accent: #f9f9f9; // for striping
|
86
|
-
@table-bg-hover: #f5f5f5;
|
98
|
+
@table-bg-hover: #f5f5f5;
|
99
|
+
@table-bg-active: @table-bg-hover;
|
87
100
|
|
88
101
|
@table-border-color: #ddd; // table and cell border
|
89
102
|
|
@@ -91,30 +104,33 @@
|
|
91
104
|
// Buttons
|
92
105
|
// -------------------------
|
93
106
|
|
94
|
-
@btn-
|
95
|
-
@btn-default-bg: #474949;
|
96
|
-
@btn-default-border: @btn-default-bg;
|
107
|
+
@btn-font-weight: normal;
|
97
108
|
|
98
|
-
@btn-
|
109
|
+
@btn-default-color: #333;
|
110
|
+
@btn-default-bg: #fff;
|
111
|
+
@btn-default-border: #ccc;
|
112
|
+
|
113
|
+
@btn-primary-color: #fff;
|
99
114
|
@btn-primary-bg: @brand-primary;
|
100
|
-
@btn-primary-border: @btn-primary-bg;
|
115
|
+
@btn-primary-border: darken(@btn-primary-bg, 5%);
|
101
116
|
|
102
|
-
@btn-success-color:
|
117
|
+
@btn-success-color: #fff;
|
103
118
|
@btn-success-bg: @brand-success;
|
104
|
-
@btn-success-border: @btn-success-bg;
|
119
|
+
@btn-success-border: darken(@btn-success-bg, 5%);
|
105
120
|
|
106
|
-
@btn-warning-color:
|
121
|
+
@btn-warning-color: #fff;
|
107
122
|
@btn-warning-bg: @brand-warning;
|
108
|
-
@btn-warning-border: @btn-warning-bg;
|
123
|
+
@btn-warning-border: darken(@btn-warning-bg, 5%);
|
109
124
|
|
110
|
-
@btn-danger-color:
|
125
|
+
@btn-danger-color: #fff;
|
111
126
|
@btn-danger-bg: @brand-danger;
|
112
|
-
@btn-danger-border: @btn-danger-bg;
|
127
|
+
@btn-danger-border: darken(@btn-danger-bg, 5%);
|
113
128
|
|
114
|
-
@btn-info-color:
|
129
|
+
@btn-info-color: #fff;
|
115
130
|
@btn-info-bg: @brand-info;
|
116
|
-
@btn-info-border: @btn-info-bg;
|
131
|
+
@btn-info-border: darken(@btn-info-bg, 5%);
|
117
132
|
|
133
|
+
@btn-link-disabled-color: @gray-light;
|
118
134
|
|
119
135
|
|
120
136
|
// Forms
|
@@ -123,14 +139,22 @@
|
|
123
139
|
@input-bg: #fff;
|
124
140
|
@input-bg-disabled: @gray-lighter;
|
125
141
|
|
142
|
+
@input-color: @gray;
|
126
143
|
@input-border: #ccc;
|
127
144
|
@input-border-radius: @border-radius-base;
|
145
|
+
@input-border-focus: #66afe9;
|
128
146
|
|
129
147
|
@input-color-placeholder: @gray-light;
|
130
148
|
|
131
149
|
@input-height-base: (@line-height-computed + (@padding-base-vertical * 2) + 2);
|
132
|
-
@input-height-large: (
|
133
|
-
@input-height-small: (
|
150
|
+
@input-height-large: (floor(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
|
151
|
+
@input-height-small: (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
|
152
|
+
|
153
|
+
@legend-color: @gray-dark;
|
154
|
+
@legend-border-color: #e5e5e5;
|
155
|
+
|
156
|
+
@input-group-addon-bg: @gray-lighter;
|
157
|
+
@input-group-addon-border-color: @input-border;
|
134
158
|
|
135
159
|
|
136
160
|
// Dropdowns
|
@@ -138,8 +162,8 @@
|
|
138
162
|
|
139
163
|
@dropdown-bg: #fff;
|
140
164
|
@dropdown-border: rgba(0,0,0,.15);
|
141
|
-
@dropdown-
|
142
|
-
@dropdown-divider-
|
165
|
+
@dropdown-fallback-border: #ccc;
|
166
|
+
@dropdown-divider-bg: #e5e5e5;
|
143
167
|
|
144
168
|
@dropdown-link-active-color: #fff;
|
145
169
|
@dropdown-link-active-bg: @component-active-bg;
|
@@ -148,6 +172,12 @@
|
|
148
172
|
@dropdown-link-hover-color: #fff;
|
149
173
|
@dropdown-link-hover-bg: @dropdown-link-active-bg;
|
150
174
|
|
175
|
+
@dropdown-link-disabled-color: @gray-light;
|
176
|
+
|
177
|
+
@dropdown-header-color: @gray-light;
|
178
|
+
|
179
|
+
@dropdown-caret-color: #000;
|
180
|
+
|
151
181
|
|
152
182
|
// COMPONENT VARIABLES
|
153
183
|
// --------------------------------------------------
|
@@ -158,6 +188,7 @@
|
|
158
188
|
// Used for a bird's eye view of components dependent on the z-axis
|
159
189
|
// Try to avoid customizing these :)
|
160
190
|
|
191
|
+
@zindex-navbar: 1000;
|
161
192
|
@zindex-dropdown: 1000;
|
162
193
|
@zindex-popover: 1010;
|
163
194
|
@zindex-tooltip: 1030;
|
@@ -165,33 +196,81 @@
|
|
165
196
|
@zindex-modal-background: 1040;
|
166
197
|
@zindex-modal: 1050;
|
167
198
|
|
199
|
+
// Media queries breakpoints
|
200
|
+
// --------------------------------------------------
|
201
|
+
|
202
|
+
// Extra small screen / phone
|
203
|
+
@screen-xs: 480px;
|
204
|
+
@screen-phone: @screen-xs;
|
205
|
+
|
206
|
+
// Small screen / tablet
|
207
|
+
@screen-sm: 768px;
|
208
|
+
@screen-tablet: @screen-sm;
|
209
|
+
|
210
|
+
// Medium screen / desktop
|
211
|
+
@screen-md: 992px;
|
212
|
+
@screen-desktop: @screen-md;
|
213
|
+
|
214
|
+
// Large screen / wide desktop
|
215
|
+
@screen-lg: 1200px;
|
216
|
+
@screen-lg-desktop: @screen-lg;
|
217
|
+
|
218
|
+
// So media queries don't overlap when required, provide a maximum
|
219
|
+
@screen-xs-max: (@screen-sm - 1);
|
220
|
+
@screen-sm-max: (@screen-md - 1);
|
221
|
+
@screen-md-max: (@screen-lg - 1);
|
222
|
+
|
223
|
+
|
224
|
+
// Grid system
|
225
|
+
// --------------------------------------------------
|
226
|
+
|
227
|
+
// Number of columns in the grid system
|
228
|
+
@grid-columns: 12;
|
229
|
+
// Padding, to be divided by two and applied to the left and right of all columns
|
230
|
+
@grid-gutter-width: 30px;
|
231
|
+
// Point at which the navbar stops collapsing
|
232
|
+
@grid-float-breakpoint: @screen-tablet;
|
233
|
+
|
168
234
|
|
169
235
|
// Navbar
|
170
236
|
// -------------------------
|
171
237
|
|
172
238
|
// Basics of a navbar
|
173
239
|
@navbar-height: 50px;
|
174
|
-
@navbar-
|
175
|
-
@navbar-
|
176
|
-
@navbar-
|
240
|
+
@navbar-margin-bottom: @line-height-computed;
|
241
|
+
@navbar-default-color: #777;
|
242
|
+
@navbar-default-bg: #f8f8f8;
|
243
|
+
@navbar-default-border: darken(@navbar-default-bg, 6.5%);
|
244
|
+
@navbar-border-radius: @border-radius-base;
|
245
|
+
@navbar-padding-horizontal: floor(@grid-gutter-width / 2);
|
246
|
+
@navbar-padding-vertical: ((@navbar-height - @line-height-computed) / 2);
|
177
247
|
|
178
248
|
// Navbar links
|
179
|
-
@navbar-link-color: #777;
|
180
|
-
@navbar-link-hover-color: #333;
|
181
|
-
@navbar-link-hover-bg: transparent;
|
182
|
-
@navbar-link-active-color: #555;
|
183
|
-
@navbar-link-active-bg: darken(@navbar-bg,
|
184
|
-
@navbar-link-disabled-color: #ccc;
|
185
|
-
@navbar-link-disabled-bg: transparent;
|
249
|
+
@navbar-default-link-color: #777;
|
250
|
+
@navbar-default-link-hover-color: #333;
|
251
|
+
@navbar-default-link-hover-bg: transparent;
|
252
|
+
@navbar-default-link-active-color: #555;
|
253
|
+
@navbar-default-link-active-bg: darken(@navbar-default-bg, 6.5%);
|
254
|
+
@navbar-default-link-disabled-color: #ccc;
|
255
|
+
@navbar-default-link-disabled-bg: transparent;
|
186
256
|
|
187
257
|
// Navbar brand label
|
188
|
-
@navbar-brand-color: @navbar-link-color;
|
189
|
-
@navbar-brand-hover-color: darken(@navbar-link-color, 10%);
|
190
|
-
@navbar-brand-hover-bg: transparent;
|
258
|
+
@navbar-default-brand-color: @navbar-default-link-color;
|
259
|
+
@navbar-default-brand-hover-color: darken(@navbar-default-link-color, 10%);
|
260
|
+
@navbar-default-brand-hover-bg: transparent;
|
261
|
+
|
262
|
+
// Navbar toggle
|
263
|
+
@navbar-default-toggle-hover-bg: #ddd;
|
264
|
+
@navbar-default-toggle-icon-bar-bg: #ccc;
|
265
|
+
@navbar-default-toggle-border-color: #ddd;
|
266
|
+
|
191
267
|
|
192
268
|
// Inverted navbar
|
193
|
-
|
269
|
+
//
|
270
|
+
// Reset inverted navbar basics
|
271
|
+
@navbar-inverse-color: @gray-light;
|
194
272
|
@navbar-inverse-bg: #222;
|
273
|
+
@navbar-inverse-border: darken(@navbar-inverse-bg, 10%);
|
195
274
|
|
196
275
|
// Inverted navbar links
|
197
276
|
@navbar-inverse-link-color: @gray-light;
|
@@ -214,21 +293,70 @@
|
|
214
293
|
@navbar-inverse-search-border: @navbar-inverse-bg;
|
215
294
|
@navbar-inverse-search-placeholder-color: #ccc;
|
216
295
|
|
296
|
+
// Inverted navbar toggle
|
297
|
+
@navbar-inverse-toggle-hover-bg: #333;
|
298
|
+
@navbar-inverse-toggle-icon-bar-bg: #fff;
|
299
|
+
@navbar-inverse-toggle-border-color: #333;
|
300
|
+
|
301
|
+
|
302
|
+
// Navs
|
303
|
+
// -------------------------
|
304
|
+
|
305
|
+
@nav-link-padding: 10px 15px;
|
306
|
+
@nav-link-hover-bg: @gray-lighter;
|
307
|
+
|
308
|
+
@nav-disabled-link-color: @gray-light;
|
309
|
+
@nav-disabled-link-hover-color: @gray-light;
|
310
|
+
|
311
|
+
@nav-open-link-hover-color: #fff;
|
312
|
+
@nav-open-caret-border-color: #fff;
|
313
|
+
|
314
|
+
// Tabs
|
315
|
+
@nav-tabs-border-color: #ddd;
|
316
|
+
|
317
|
+
@nav-tabs-link-hover-border-color: @gray-lighter;
|
318
|
+
|
319
|
+
@nav-tabs-active-link-hover-bg: @body-bg;
|
320
|
+
@nav-tabs-active-link-hover-color: @gray;
|
321
|
+
@nav-tabs-active-link-hover-border-color: #ddd;
|
322
|
+
|
323
|
+
@nav-tabs-justified-link-border-color: #ddd;
|
324
|
+
@nav-tabs-justified-active-link-border-color: @body-bg;
|
325
|
+
|
326
|
+
// Pills
|
327
|
+
@nav-pills-active-link-hover-bg: @component-active-bg;
|
328
|
+
@nav-pills-active-link-hover-color: #fff;
|
329
|
+
|
217
330
|
|
218
331
|
// Pagination
|
219
332
|
// -------------------------
|
220
333
|
|
221
334
|
@pagination-bg: #fff;
|
222
335
|
@pagination-border: #ddd;
|
223
|
-
|
336
|
+
|
337
|
+
@pagination-hover-bg: @gray-lighter;
|
338
|
+
|
339
|
+
@pagination-active-bg: @brand-primary;
|
340
|
+
@pagination-active-color: #fff;
|
341
|
+
|
342
|
+
@pagination-disabled-color: @gray-light;
|
343
|
+
|
344
|
+
|
345
|
+
// Pager
|
346
|
+
// -------------------------
|
347
|
+
|
348
|
+
@pager-border-radius: 15px;
|
349
|
+
@pager-disabled-color: @gray-light;
|
224
350
|
|
225
351
|
|
226
352
|
// Jumbotron
|
227
353
|
// -------------------------
|
228
354
|
|
355
|
+
@jumbotron-padding: 30px;
|
356
|
+
@jumbotron-color: inherit;
|
229
357
|
@jumbotron-bg: @gray-lighter;
|
358
|
+
|
230
359
|
@jumbotron-heading-color: inherit;
|
231
|
-
@jumbotron-lead-color: inherit;
|
232
360
|
|
233
361
|
|
234
362
|
// Form states and alerts
|
@@ -251,30 +379,46 @@
|
|
251
379
|
@state-info-border: darken(spin(@state-info-bg, -10), 7%);
|
252
380
|
|
253
381
|
|
254
|
-
// Tooltips
|
382
|
+
// Tooltips
|
255
383
|
// -------------------------
|
384
|
+
@tooltip-max-width: 200px;
|
256
385
|
@tooltip-color: #fff;
|
257
|
-
@tooltip-bg:
|
386
|
+
@tooltip-bg: #000;
|
387
|
+
|
258
388
|
@tooltip-arrow-width: 5px;
|
259
389
|
@tooltip-arrow-color: @tooltip-bg;
|
260
390
|
|
261
|
-
@popover-bg: #fff;
|
262
|
-
@popover-arrow-width: 10px;
|
263
|
-
@popover-arrow-color: #fff;
|
264
|
-
@popover-title-bg: darken(@popover-bg, 3%);
|
265
391
|
|
266
|
-
//
|
267
|
-
|
268
|
-
@popover-
|
392
|
+
// Popovers
|
393
|
+
// -------------------------
|
394
|
+
@popover-bg: #fff;
|
395
|
+
@popover-max-width: 276px;
|
396
|
+
@popover-border-color: rgba(0,0,0,.2);
|
397
|
+
@popover-fallback-border-color: #ccc;
|
398
|
+
|
399
|
+
@popover-title-bg: darken(@popover-bg, 3%);
|
400
|
+
|
401
|
+
@popover-arrow-width: 10px;
|
402
|
+
@popover-arrow-color: #fff;
|
403
|
+
|
404
|
+
@popover-arrow-outer-width: (@popover-arrow-width + 1);
|
405
|
+
@popover-arrow-outer-color: rgba(0,0,0,.25);
|
406
|
+
@popover-arrow-outer-fallback-color: #999;
|
269
407
|
|
270
408
|
|
271
409
|
// Labels
|
272
410
|
// -------------------------
|
411
|
+
|
412
|
+
@label-default-bg: @gray-light;
|
413
|
+
@label-primary-bg: @brand-primary;
|
273
414
|
@label-success-bg: @brand-success;
|
274
415
|
@label-info-bg: @brand-info;
|
275
416
|
@label-warning-bg: @brand-warning;
|
276
417
|
@label-danger-bg: @brand-danger;
|
277
418
|
|
419
|
+
@label-color: #fff;
|
420
|
+
@label-link-hover-color: #fff;
|
421
|
+
|
278
422
|
|
279
423
|
// Modals
|
280
424
|
// -------------------------
|
@@ -283,29 +427,43 @@
|
|
283
427
|
@modal-title-padding: 15px;
|
284
428
|
@modal-title-line-height: @line-height-base;
|
285
429
|
|
430
|
+
@modal-content-bg: #fff;
|
431
|
+
@modal-content-border-color: rgba(0,0,0,.2);
|
432
|
+
@modal-content-fallback-border-color: #999;
|
433
|
+
|
434
|
+
@modal-backdrop-bg: #000;
|
435
|
+
@modal-header-border-color: #e5e5e5;
|
436
|
+
@modal-footer-border-color: @modal-header-border-color;
|
437
|
+
|
438
|
+
|
286
439
|
// Alerts
|
287
440
|
// -------------------------
|
288
|
-
@alert-
|
289
|
-
@alert-text: @state-warning-text;
|
290
|
-
@alert-border: @state-warning-border;
|
441
|
+
@alert-padding: 15px;
|
291
442
|
@alert-border-radius: @border-radius-base;
|
443
|
+
@alert-link-font-weight: bold;
|
292
444
|
|
293
445
|
@alert-success-bg: @state-success-bg;
|
294
446
|
@alert-success-text: @state-success-text;
|
295
447
|
@alert-success-border: @state-success-border;
|
296
448
|
|
297
|
-
@alert-danger-bg: @state-danger-bg;
|
298
|
-
@alert-danger-text: @state-danger-text;
|
299
|
-
@alert-danger-border: @state-danger-border;
|
300
|
-
|
301
449
|
@alert-info-bg: @state-info-bg;
|
302
450
|
@alert-info-text: @state-info-text;
|
303
451
|
@alert-info-border: @state-info-border;
|
304
452
|
|
453
|
+
@alert-warning-bg: @state-warning-bg;
|
454
|
+
@alert-warning-text: @state-warning-text;
|
455
|
+
@alert-warning-border: @state-warning-border;
|
456
|
+
|
457
|
+
@alert-danger-bg: @state-danger-bg;
|
458
|
+
@alert-danger-text: @state-danger-text;
|
459
|
+
@alert-danger-border: @state-danger-border;
|
460
|
+
|
305
461
|
|
306
462
|
// Progress bars
|
307
463
|
// -------------------------
|
308
464
|
@progress-bg: #f5f5f5;
|
465
|
+
@progress-bar-color: #fff;
|
466
|
+
|
309
467
|
@progress-bar-bg: @brand-primary;
|
310
468
|
@progress-bar-success-bg: @brand-success;
|
311
469
|
@progress-bar-warning-bg: @brand-warning;
|
@@ -324,14 +482,21 @@
|
|
324
482
|
@list-group-active-bg: @component-active-bg;
|
325
483
|
@list-group-active-border: @list-group-active-bg;
|
326
484
|
|
485
|
+
@list-group-link-color: #555;
|
486
|
+
@list-group-link-heading-color: #333;
|
487
|
+
|
488
|
+
|
327
489
|
// Panels
|
328
490
|
// -------------------------
|
329
491
|
@panel-bg: #fff;
|
330
|
-
@panel-border:
|
492
|
+
@panel-inner-border: #ddd;
|
331
493
|
@panel-border-radius: @border-radius-base;
|
332
|
-
@panel-heading-bg: #f5f5f5;
|
333
494
|
@panel-footer-bg: #f5f5f5;
|
334
495
|
|
496
|
+
@panel-default-text: @gray-dark;
|
497
|
+
@panel-default-border: #ddd;
|
498
|
+
@panel-default-heading-bg: #f5f5f5;
|
499
|
+
|
335
500
|
@panel-primary-text: #fff;
|
336
501
|
@panel-primary-border: @brand-primary;
|
337
502
|
@panel-primary-heading-bg: @brand-primary;
|
@@ -355,70 +520,101 @@
|
|
355
520
|
|
356
521
|
// Thumbnails
|
357
522
|
// -------------------------
|
358
|
-
@thumbnail-
|
523
|
+
@thumbnail-padding: 4px;
|
359
524
|
@thumbnail-bg: @body-bg;
|
360
525
|
@thumbnail-border: #ddd;
|
361
526
|
@thumbnail-border-radius: @border-radius-base;
|
362
527
|
|
528
|
+
@thumbnail-caption-color: @text-color;
|
529
|
+
@thumbnail-caption-padding: 9px;
|
530
|
+
|
363
531
|
|
364
532
|
// Wells
|
365
533
|
// -------------------------
|
366
534
|
@well-bg: #f5f5f5;
|
367
535
|
|
368
536
|
|
369
|
-
//
|
537
|
+
// Badges
|
370
538
|
// -------------------------
|
539
|
+
@badge-color: #fff;
|
540
|
+
@badge-link-hover-color: #fff;
|
541
|
+
@badge-bg: @gray-light;
|
371
542
|
|
372
|
-
|
373
|
-
@
|
543
|
+
@badge-active-color: @link-color;
|
544
|
+
@badge-active-bg: #fff;
|
374
545
|
|
375
|
-
|
376
|
-
@
|
546
|
+
@badge-font-weight: bold;
|
547
|
+
@badge-line-height: 1;
|
548
|
+
@badge-border-radius: 10px;
|
377
549
|
|
378
550
|
|
379
|
-
//
|
380
|
-
//
|
551
|
+
// Breadcrumbs
|
552
|
+
// -------------------------
|
553
|
+
@breadcrumb-bg: #f5f5f5;
|
554
|
+
@breadcrumb-color: #ccc;
|
555
|
+
@breadcrumb-active-color: @gray-light;
|
381
556
|
|
382
|
-
// Tiny screen / phone
|
383
|
-
@screen-tiny: 480px;
|
384
|
-
@screen-phone: @screen-tiny;
|
385
557
|
|
386
|
-
//
|
387
|
-
|
388
|
-
@screen-tablet: @screen-small;
|
558
|
+
// Carousel
|
559
|
+
// ------------------------
|
389
560
|
|
390
|
-
|
391
|
-
@screen-medium: 992px;
|
392
|
-
@screen-desktop: @screen-medium;
|
561
|
+
@carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6);
|
393
562
|
|
394
|
-
|
395
|
-
@
|
396
|
-
@
|
563
|
+
@carousel-control-color: #fff;
|
564
|
+
@carousel-control-width: 15%;
|
565
|
+
@carousel-control-opacity: .5;
|
566
|
+
@carousel-control-font-size: 20px;
|
397
567
|
|
398
|
-
|
399
|
-
@
|
400
|
-
|
568
|
+
@carousel-indicator-active-bg: #fff;
|
569
|
+
@carousel-indicator-border-color: #fff;
|
570
|
+
|
571
|
+
@carousel-caption-color: #fff;
|
572
|
+
|
573
|
+
|
574
|
+
// Close
|
575
|
+
// ------------------------
|
576
|
+
@close-color: #000;
|
577
|
+
@close-font-weight: bold;
|
578
|
+
@close-text-shadow: 0 1px 0 #fff;
|
579
|
+
|
580
|
+
|
581
|
+
// Code
|
582
|
+
// ------------------------
|
583
|
+
@code-color: #c7254e;
|
584
|
+
@code-bg: #f9f2f4;
|
585
|
+
|
586
|
+
@pre-bg: #f5f5f5;
|
587
|
+
@pre-color: @gray-dark;
|
588
|
+
@pre-border-color: #ccc;
|
589
|
+
@pre-scrollable-max-height: 340px;
|
590
|
+
|
591
|
+
// Type
|
592
|
+
// ------------------------
|
593
|
+
@text-muted: @gray-light;
|
594
|
+
@abbr-border-color: @gray-light;
|
595
|
+
@headings-small-color: @gray-light;
|
596
|
+
@blockquote-small-color: @gray-light;
|
597
|
+
@blockquote-border-color: @gray-lighter;
|
598
|
+
@page-header-border-color: @gray-lighter;
|
599
|
+
|
600
|
+
// Miscellaneous
|
601
|
+
// -------------------------
|
602
|
+
|
603
|
+
// Hr border color
|
604
|
+
@hr-border: @gray-lighter;
|
605
|
+
|
606
|
+
// Horizontal forms & lists
|
607
|
+
@component-offset-horizontal: 180px;
|
401
608
|
|
402
609
|
|
403
610
|
// Container sizes
|
404
611
|
// --------------------------------------------------
|
405
612
|
|
406
613
|
// Small screen / tablet
|
407
|
-
@container-tablet:
|
614
|
+
@container-tablet: ((720px + @grid-gutter-width));
|
408
615
|
|
409
616
|
// Medium screen / desktop
|
410
|
-
@container-desktop:
|
617
|
+
@container-desktop: ((940px + @grid-gutter-width));
|
411
618
|
|
412
619
|
// Large screen / wide desktop
|
413
|
-
@container-
|
414
|
-
|
415
|
-
|
416
|
-
// Grid system
|
417
|
-
// --------------------------------------------------
|
418
|
-
|
419
|
-
// Number of columns in the grid system
|
420
|
-
@grid-columns: 12;
|
421
|
-
// Padding, to be divided by two and applied to the left and right of all columns
|
422
|
-
@grid-gutter-width: 30px;
|
423
|
-
// Point at which the navbar stops collapsing
|
424
|
-
@grid-float-breakpoint: @screen-tablet;
|
620
|
+
@container-lg-desktop: ((1140px + @grid-gutter-width));
|
@@ -9,7 +9,7 @@ module Padrino
|
|
9
9
|
#
|
10
10
|
module Actions
|
11
11
|
##
|
12
|
-
# Tell us which orm we are using
|
12
|
+
# Tell us which orm we are using.
|
13
13
|
#
|
14
14
|
def orm
|
15
15
|
fetch_component_choice(:orm).to_sym rescue :activerecord
|
@@ -17,28 +17,28 @@ module Padrino
|
|
17
17
|
alias :adapter :orm
|
18
18
|
|
19
19
|
##
|
20
|
-
# Tell us which rendering engine you are using
|
20
|
+
# Tell us which rendering engine you are using.
|
21
21
|
#
|
22
22
|
def ext
|
23
23
|
fetch_component_choice(:admin_renderer).to_sym rescue :haml
|
24
24
|
end
|
25
25
|
|
26
26
|
##
|
27
|
-
# Tell us for now
|
27
|
+
# Tell us for now which orm we support
|
28
28
|
#
|
29
29
|
def supported_orm
|
30
30
|
[:minirecord, :datamapper, :activerecord, :mongomapper, :mongoid, :couchrest, :sequel, :ohm]
|
31
31
|
end
|
32
32
|
|
33
33
|
##
|
34
|
-
# Tell us for now
|
34
|
+
# Tell us for now which rendering engine we support.
|
35
35
|
#
|
36
36
|
def supported_ext
|
37
37
|
[:haml, :slim, :erb]
|
38
38
|
end
|
39
39
|
|
40
40
|
##
|
41
|
-
# Add access_control permission in our app.rb
|
41
|
+
# Add access_control permission in our app.rb.
|
42
42
|
#
|
43
43
|
def add_project_module(controller)
|
44
44
|
permission = " role.project_module :#{controller}, '/#{controller}'\n"
|
@@ -46,7 +46,7 @@ module Padrino
|
|
46
46
|
end
|
47
47
|
|
48
48
|
##
|
49
|
-
# Remove from access_control permissions
|
49
|
+
# Remove from access_control permissions.
|
50
50
|
#
|
51
51
|
def remove_project_module(controller)
|
52
52
|
path = destination_root('/admin/app.rb')
|
@@ -56,6 +56,7 @@ module Padrino
|
|
56
56
|
File.open(path, 'wb') { |f| f.write content }
|
57
57
|
end
|
58
58
|
|
59
|
+
##
|
59
60
|
# Returns the app_name for the application at root.
|
60
61
|
#
|
61
62
|
# @param [String] app
|
@@ -71,7 +72,7 @@ module Padrino
|
|
71
72
|
app_path = destination_root(app, 'app.rb')
|
72
73
|
@app_name ||= File.read(app_path).scan(/module\s(.*?)\n/).flatten[0]
|
73
74
|
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|