padrino-admin 0.11.2 → 0.11.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. data/lib/padrino-admin/bootstrap-less/accordion.less +6 -9
  2. data/lib/padrino-admin/bootstrap-less/alerts.less +46 -51
  3. data/lib/padrino-admin/bootstrap-less/badges.less +2 -7
  4. data/lib/padrino-admin/bootstrap-less/bootstrap.less +0 -1
  5. data/lib/padrino-admin/bootstrap-less/breadcrumbs.less +3 -3
  6. data/lib/padrino-admin/bootstrap-less/button-groups.less +37 -37
  7. data/lib/padrino-admin/bootstrap-less/buttons.less +52 -67
  8. data/lib/padrino-admin/bootstrap-less/carousel.less +24 -35
  9. data/lib/padrino-admin/bootstrap-less/close.less +14 -13
  10. data/lib/padrino-admin/bootstrap-less/code.less +4 -7
  11. data/lib/padrino-admin/bootstrap-less/component-animations.less +2 -11
  12. data/lib/padrino-admin/bootstrap-less/dropdowns.less +26 -82
  13. data/lib/padrino-admin/bootstrap-less/font-awesome-ie7.less +1895 -292
  14. data/lib/padrino-admin/bootstrap-less/font-awesome.less +26 -530
  15. data/lib/padrino-admin/bootstrap-less/font-awesome/bootstrap.less +84 -0
  16. data/lib/padrino-admin/bootstrap-less/font-awesome/core.less +129 -0
  17. data/lib/padrino-admin/bootstrap-less/font-awesome/extras.less +93 -0
  18. data/lib/padrino-admin/bootstrap-less/font-awesome/font-awesome-ie7.less +1953 -0
  19. data/lib/padrino-admin/bootstrap-less/font-awesome/font-awesome.less +33 -0
  20. data/lib/padrino-admin/bootstrap-less/font-awesome/icons.less +381 -0
  21. data/lib/padrino-admin/bootstrap-less/font-awesome/mixins.less +48 -0
  22. data/lib/padrino-admin/bootstrap-less/font-awesome/path.less +14 -0
  23. data/lib/padrino-admin/bootstrap-less/font-awesome/variables.less +735 -0
  24. data/lib/padrino-admin/bootstrap-less/forms.less +123 -227
  25. data/lib/padrino-admin/bootstrap-less/grid.less +174 -19
  26. data/lib/padrino-admin/bootstrap-less/jumbotron.less +4 -4
  27. data/lib/padrino-admin/bootstrap-less/labels.less +52 -28
  28. data/lib/padrino-admin/bootstrap-less/list-group.less +37 -44
  29. data/lib/padrino-admin/bootstrap-less/media.less +1 -1
  30. data/lib/padrino-admin/bootstrap-less/mixins.less +97 -120
  31. data/lib/padrino-admin/bootstrap-less/modals.less +5 -4
  32. data/lib/padrino-admin/bootstrap-less/navbar.less +148 -174
  33. data/lib/padrino-admin/bootstrap-less/navs.less +145 -164
  34. data/lib/padrino-admin/bootstrap-less/padrino-admin.less +2 -2
  35. data/lib/padrino-admin/bootstrap-less/pager.less +45 -33
  36. data/lib/padrino-admin/bootstrap-less/pagination.less +11 -23
  37. data/lib/padrino-admin/bootstrap-less/panels.less +11 -1
  38. data/lib/padrino-admin/bootstrap-less/popovers.less +6 -6
  39. data/lib/padrino-admin/bootstrap-less/print.less +13 -2
  40. data/lib/padrino-admin/bootstrap-less/progress-bars.less +3 -3
  41. data/lib/padrino-admin/bootstrap-less/responsive-utilities.less +92 -32
  42. data/lib/padrino-admin/bootstrap-less/scaffolding.less +9 -18
  43. data/lib/padrino-admin/bootstrap-less/tables.less +70 -67
  44. data/lib/padrino-admin/bootstrap-less/thumbnails.less +6 -6
  45. data/lib/padrino-admin/bootstrap-less/tooltip.less +25 -1
  46. data/lib/padrino-admin/bootstrap-less/type.less +39 -46
  47. data/lib/padrino-admin/bootstrap-less/variables.less +135 -63
  48. data/lib/padrino-admin/generators/admin_app.rb +9 -0
  49. data/lib/padrino-admin/generators/admin_page.rb +9 -0
  50. data/lib/padrino-admin/generators/orm.rb +1 -10
  51. data/lib/padrino-admin/generators/templates/account/activerecord.rb.tt +1 -1
  52. data/lib/padrino-admin/generators/templates/account/datamapper.rb.tt +1 -1
  53. data/lib/padrino-admin/generators/templates/account/minirecord.rb.tt +1 -1
  54. data/lib/padrino-admin/generators/templates/account/mongoid.rb.tt +1 -1
  55. data/lib/padrino-admin/generators/templates/account/mongomapper.rb.tt +1 -1
  56. data/lib/padrino-admin/generators/templates/account/sequel.rb.tt +1 -1
  57. data/lib/padrino-admin/generators/templates/assets/images/font/FontAwesome.otf +0 -0
  58. data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.eot +0 -0
  59. data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.svg +153 -38
  60. data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.ttf +0 -0
  61. data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.woff +0 -0
  62. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/affix.js +120 -0
  63. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/{bootstrap-alert.js → alert.js} +32 -35
  64. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap.min.js +1 -1
  65. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/{bootstrap-button.js → button.js} +37 -37
  66. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/carousel.js +210 -0
  67. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/collapse.js +156 -0
  68. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/dropdown.js +155 -0
  69. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/modal.js +243 -0
  70. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/popover.js +111 -0
  71. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/scrollspy.js +156 -0
  72. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/tab.js +133 -0
  73. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/tooltip.js +356 -0
  74. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/transition.js +47 -0
  75. data/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap.css +406 -452
  76. data/lib/padrino-admin/generators/templates/erb/app/layouts/application.erb.tt +3 -3
  77. data/lib/padrino-admin/generators/templates/erb/app/sessions/new.erb.tt +1 -1
  78. data/lib/padrino-admin/generators/templates/haml/app/layouts/application.haml.tt +3 -3
  79. data/lib/padrino-admin/generators/templates/haml/app/sessions/new.haml.tt +1 -1
  80. data/lib/padrino-admin/generators/templates/page/controller.rb.tt +1 -1
  81. data/lib/padrino-admin/generators/templates/slim/app/layouts/application.slim.tt +3 -3
  82. data/lib/padrino-admin/generators/templates/slim/app/sessions/new.slim.tt +1 -1
  83. data/lib/padrino-admin/helpers/view_helpers.rb +1 -1
  84. data/test/generators/test_admin_app_generator.rb +9 -0
  85. data/test/generators/test_admin_page_generator.rb +11 -0
  86. metadata +27 -23
  87. data/lib/padrino-admin/bootstrap-less/glyphicons.less +0 -200
  88. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-affix.js +0 -117
  89. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-carousel.js +0 -207
  90. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-collapse.js +0 -167
  91. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-dropdown.js +0 -165
  92. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-modal.js +0 -251
  93. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-popover.js +0 -114
  94. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-scrollspy.js +0 -162
  95. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-tab.js +0 -144
  96. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-tooltip.js +0 -361
  97. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-transition.js +0 -60
  98. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-typeahead.js +0 -335
@@ -12,25 +12,63 @@
12
12
  padding-left: 0; // Override default ul/ol
13
13
  list-style: none;
14
14
  .clearfix();
15
- }
16
- .nav > li {
17
- display: block;
18
- }
19
- .nav > li > a {
20
- position: relative;
21
- display: block;
22
- padding: 10px 15px;
23
- }
24
- .nav > li > a:hover,
25
- .nav > li > a:focus {
26
- text-decoration: none;
27
- background-color: @grayLighter;
28
- }
29
15
 
30
- // Redeclare pull classes because of specifity
31
- // Todo: consider making these utilities !important to avoid this bullshit
32
- .nav > .pull-right {
33
- float: right;
16
+ > li {
17
+ position: relative;
18
+ display: block;
19
+
20
+ > a {
21
+ position: relative;
22
+ display: block;
23
+ padding: 10px 15px;
24
+ &:hover,
25
+ &:focus {
26
+ text-decoration: none;
27
+ background-color: @gray-lighter;
28
+ }
29
+ }
30
+
31
+ // Disabled state sets text to gray and nukes hover/tab effects
32
+ &.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
+ }
42
+
43
+ // Space the headers out when they follow another list item (link)
44
+ + .nav-header {
45
+ margin-top: 9px;
46
+ }
47
+ }
48
+
49
+ // 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;
59
+ }
60
+ }
61
+
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
+ // Dividers (basically an hr) within the dropdown
69
+ .nav-divider {
70
+ .nav-divider();
71
+ }
34
72
  }
35
73
 
36
74
 
@@ -44,63 +82,79 @@
44
82
  // Give the tabs something to sit on
45
83
  .nav-tabs {
46
84
  border-bottom: 1px solid #ddd;
47
- }
48
- .nav-tabs > li {
49
- float: left;
50
- // Make the list-items overlay the bottom border
51
- margin-bottom: -1px;
52
- }
53
- // Actual tabs (as links)
54
- .nav-tabs > li > a {
55
- margin-right: 2px;
56
- line-height: @line-height-base;
57
- border: 1px solid transparent;
58
- border-radius: @border-radius-base @border-radius-base 0 0;
59
- &:hover {
60
- border-color: @grayLighter @grayLighter #ddd;
85
+ > li {
86
+ float: left;
87
+ // Make the list-items overlay the bottom border
88
+ margin-bottom: -1px;
89
+
90
+ // Actual tabs (as links)
91
+ > a {
92
+ margin-right: 2px;
93
+ line-height: @line-height-base;
94
+ border: 1px solid transparent;
95
+ border-radius: @border-radius-base @border-radius-base 0 0;
96
+ &:hover {
97
+ border-color: @gray-lighter @gray-lighter #ddd;
98
+ }
99
+ }
100
+
101
+ // 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;
110
+ }
111
+ }
112
+ // pulling this in mainly for less shorthand
113
+ &.nav-justified {
114
+ .nav-justified;
115
+ .nav-tabs-justified;
61
116
  }
62
117
  }
63
- // Active state, and it's :hover to override normal :hover
64
- .nav-tabs > .active > a,
65
- .nav-tabs > .active > a:hover,
66
- .nav-tabs > .active > a:focus {
67
- color: @gray;
68
- background-color: @body-bg;
69
- border: 1px solid #ddd;
70
- border-bottom-color: transparent;
71
- cursor: default;
72
- }
118
+
73
119
 
74
120
  // Pills
75
121
  // -------------------------
76
-
77
- .nav-pills > li {
78
- float: left;
79
- }
80
-
81
- // Links rendered as pills
82
- .nav-pills > li > a {
83
- border-radius: 5px;
84
- }
85
- .nav-pills > li + li > a {
86
- margin-left: 2px;
122
+ .nav-pills {
123
+ > li {
124
+ float: left;
125
+
126
+ // Links rendered as pills
127
+ > a {
128
+ border-radius: 5px;
129
+ }
130
+ + li {
131
+ > a {
132
+ margin-left: 2px;
133
+ }
134
+ }
135
+
136
+ // Active state
137
+ &.active > a,
138
+ &.active > a:hover,
139
+ &.active > a:focus {
140
+ color: #fff;
141
+ background-color: @component-active-bg;
142
+ }
143
+ }
87
144
  }
88
145
 
89
- // Active state
90
- .nav-pills > .active > a,
91
- .nav-pills > .active > a:hover,
92
- .nav-pills > .active > a:focus {
93
- color: #fff;
94
- background-color: @component-active-bg;
95
- }
96
146
 
97
147
  // Stacked pills
98
- .nav-stacked > li {
99
- float: none;
100
- }
101
- .nav-stacked > li + li > a {
102
- margin-top: 2px;
103
- margin-left: 0; // no need for this gap between nav items
148
+ .nav-stacked {
149
+ > li {
150
+ float: none;
151
+ + li {
152
+ > a {
153
+ margin-top: 2px;
154
+ margin-left: 0; // no need for this gap between nav items
155
+ }
156
+ }
157
+ }
104
158
  }
105
159
 
106
160
  // Justified nav links
@@ -108,48 +162,32 @@
108
162
 
109
163
  .nav-justified {
110
164
  width: 100%;
165
+ > li {
166
+ float: none;
167
+ display: table-cell;
168
+ width: 1%;
169
+ > a {
170
+ text-align: center;
171
+ }
172
+ }
111
173
  }
112
- .nav-justified > li {
113
- float: none;
114
- display: table-cell;
115
- width: 1%;
116
- text-align: center;
117
- }
174
+
118
175
  // Move borders to anchors instead of bottom of list
119
- .nav-justified.nav-tabs {
176
+ .nav-tabs-justified () {
120
177
  border-bottom: 0;
121
178
  > li > a {
122
179
  border-bottom: 1px solid #ddd;
180
+
181
+ // Override margin from .nav-tabs
182
+ margin-right: 0;
123
183
  }
124
184
  > .active > a {
125
185
  border-bottom-color: @body-bg;
126
186
  }
127
- }
128
- // Override margin from .nav-tabs
129
- .nav-justified > li > a {
130
- margin-right: 0;
131
- }
132
187
 
188
+ }
133
189
 
134
190
 
135
- // Nav states and addons
136
- // --------------------------------------------------
137
-
138
- // Disabled state
139
- // -------------------------
140
-
141
- // Gray out text
142
- .nav > .disabled > a {
143
- color: @grayLight;
144
- }
145
- // Nuke hover effects
146
- .nav > .disabled > a:hover,
147
- .nav > .disabled > a:focus {
148
- color: @grayLight;
149
- text-decoration: none;
150
- background-color: transparent;
151
- cursor: default;
152
- }
153
191
 
154
192
  // Nav headers (for dropdowns and lists)
155
193
  // -------------------------
@@ -157,22 +195,13 @@
157
195
  .nav-header {
158
196
  display: block;
159
197
  padding: 3px 15px;
160
- font-size: 11px;
198
+ font-size: @font-size-mini;
161
199
  font-weight: bold;
162
200
  line-height: @line-height-base;
163
- color: @grayLight;
201
+ color: @gray-light;
164
202
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
165
203
  text-transform: uppercase;
166
204
  }
167
- // Space them out when they follow another list item (link)
168
- .nav li + .nav-header {
169
- margin-top: 9px;
170
- }
171
-
172
- // Dividers (basically an hr) within the dropdown
173
- .nav .divider {
174
- .nav-divider();
175
- }
176
205
 
177
206
 
178
207
 
@@ -196,71 +225,23 @@
196
225
 
197
226
 
198
227
 
199
- /*
200
- // Prevent IE8 from misplacing imgs
201
- // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
202
- .nav > li > a > img {
203
- max-width: none;
204
- }
205
-
206
228
  // Dropdowns
207
229
  // -------------------------
208
230
 
209
- .nav-tabs .dropdown-menu {
210
- // Remove the top rounded corners here since there is a hard edge above the menu
211
- .border-top-radius(0);
212
- }
213
-
214
- // Default dropdown links
215
- // -------------------------
216
- // Make carets use linkColor to start
217
- .nav .dropdown-toggle .caret {
231
+ // Make dropdown carets use link color in navs
232
+ .nav .caret {
218
233
  border-top-color: @link-color;
219
234
  border-bottom-color: @link-color;
220
- margin-top: 8px;
221
235
  }
222
- .nav .dropdown-toggle:hover .caret {
236
+ .nav a:hover .caret {
223
237
  border-top-color: @link-hover-color;
224
238
  border-bottom-color: @link-hover-color;
225
239
  }
226
240
 
227
- // Active dropdown links
228
- // -------------------------
229
- .nav .active .dropdown-toggle .caret {
230
- border-top-color: #fff;
231
- border-bottom-color: #fff;
232
- }
233
- .nav-tabs .active .dropdown-toggle .caret {
234
- border-top-color: @gray;
235
- border-bottom-color: @gray;
236
- }
237
-
238
- // Active:hover dropdown links
239
- // -------------------------
240
- .nav > .dropdown.active > a:hover {
241
- cursor: pointer;
242
- }
243
-
244
- // Open dropdowns
245
- // -------------------------
246
- .nav-tabs .open .dropdown-toggle,
247
- .nav-pills .open .dropdown-toggle,
248
- .nav > li.dropdown.open.active > a:hover {
249
- color: #fff;
250
- background-color: @grayLight;
251
- border-color: @grayLight;
252
- }
253
- .nav li.dropdown.open .caret,
254
- .nav li.dropdown.open.active .caret,
255
- .nav li.dropdown.open a:hover .caret {
256
- border-top-color: #fff;
257
- border-bottom-color: #fff;
258
- .opacity(1);
259
- }
260
-
261
- // Dropdowns in stacked tabs
262
- .tabs-stacked .open > a:hover {
263
- border-color: @grayLight;
241
+ // Specific dropdowns
242
+ .nav-tabs .dropdown-menu {
243
+ // make dropdown border overlap tab border
244
+ margin-top: -1px;
245
+ // Remove the top rounded corners here since there is a hard edge above the menu
246
+ .border-top-radius(0);
264
247
  }
265
-
266
- */
@@ -12,5 +12,5 @@
12
12
  @media screen and (min-width: 1900px) { .container { max-width: 1870px; } }
13
13
 
14
14
  // Components: common
15
- @import "font-awesome.less";
16
- @FontAwesomePath: "../images/font";
15
+ @import "font-awesome/font-awesome.less";
16
+ @FontAwesomePath: "../../images/font";
@@ -4,40 +4,52 @@
4
4
 
5
5
 
6
6
  .pager {
7
- margin: @line-height-base 0;
7
+ padding-left: 0;
8
+ margin: @line-height-computed 0;
8
9
  list-style: none;
9
10
  text-align: center;
10
11
  .clearfix();
12
+ li {
13
+ display: inline;
14
+ > a,
15
+ > span {
16
+ display: inline-block;
17
+ padding: 5px 14px;
18
+ background-color: @pagination-bg;
19
+ border: 1px solid @pagination-border;
20
+ border-radius: 15px;
21
+ }
22
+
23
+ > a:hover,
24
+ > a:focus {
25
+ text-decoration: none;
26
+ background-color: @pagination-active-bg;
27
+ }
28
+ }
29
+
30
+ .next {
31
+ > a,
32
+ > span {
33
+ float: right;
34
+ }
35
+ }
36
+
37
+ .previous {
38
+ > a,
39
+ > span {
40
+ float: left;
41
+ }
42
+ }
43
+
44
+ .disabled {
45
+ > a,
46
+ > a:hover,
47
+ > a:focus,
48
+ > span {
49
+ color: @gray-light;
50
+ background-color: @pagination-bg;
51
+ cursor: default;
52
+ }
53
+ }
54
+
11
55
  }
12
- .pager li {
13
- display: inline;
14
- }
15
- .pager li > a,
16
- .pager li > span {
17
- display: inline-block;
18
- padding: 5px 14px;
19
- background-color: @pagination-bg;
20
- border: 1px solid @pagination-border;
21
- border-radius: 15px;
22
- }
23
- .pager li > a:hover,
24
- .pager li > a:focus {
25
- text-decoration: none;
26
- background-color: @pagination-active-bg;
27
- }
28
- .pager .next > a,
29
- .pager .next > span {
30
- float: right;
31
- }
32
- .pager .previous > a,
33
- .pager .previous > span {
34
- float: left;
35
- }
36
- .pager .disabled > a,
37
- .pager .disabled > a:hover,
38
- .pager .disabled > a:focus,
39
- .pager .disabled > span {
40
- color: @grayLight;
41
- background-color: #fff;
42
- cursor: default;
43
- }