core-generators 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/Gemfile +4 -0
- data/README.textile +51 -0
- data/Rakefile +2 -0
- data/core-generators.gemspec +21 -0
- data/lib/core-generators.rb +6 -0
- data/lib/core/inherited_resource_controller.rb +10 -0
- data/lib/core/paginated_controller.rb +12 -0
- data/lib/core/version.rb +3 -0
- data/lib/generators/core/install/install_generator.rb +132 -0
- data/lib/generators/core/install/templates/bootstrap.rake +43 -0
- data/lib/generators/core/install/templates/locales/core.en.yml +20 -0
- data/lib/generators/core/install/templates/locales/core.es.yml +17 -0
- data/lib/generators/core/install/templates/settings.yml +17 -0
- data/lib/generators/core/install/templates/simple_form_custom.rb +58 -0
- data/lib/generators/core/layout/layout_generator.rb +42 -0
- data/lib/generators/core/layout/templates/core.js +113 -0
- data/lib/generators/core/layout/templates/core_helper.rb +114 -0
- data/lib/generators/core/layout/templates/images/arrow.png +0 -0
- data/lib/generators/core/layout/templates/images/boxbar-background.png +0 -0
- data/lib/generators/core/layout/templates/images/button-background-active.png +0 -0
- data/lib/generators/core/layout/templates/images/button-background.png +0 -0
- data/lib/generators/core/layout/templates/images/buttons/cross.png +0 -0
- data/lib/generators/core/layout/templates/images/buttons/edit.png +0 -0
- data/lib/generators/core/layout/templates/images/buttons/key.png +0 -0
- data/lib/generators/core/layout/templates/images/buttons/tick.png +0 -0
- data/lib/generators/core/layout/templates/images/menubar-background.png +0 -0
- data/lib/generators/core/layout/templates/stylesheets/base.sass +366 -0
- data/lib/generators/core/layout/templates/stylesheets/override.sass +1 -0
- data/lib/generators/core/layout/templates/stylesheets/style.sass +434 -0
- data/lib/generators/core/layout/templates/views/haml/_sidebar.html.haml +14 -0
- data/lib/generators/core/layout/templates/views/haml/layout.html.haml +38 -0
- data/lib/generators/core/scaffold/scaffold_generator.rb +125 -0
- data/lib/generators/core/scaffold/templates/controller.rb +10 -0
- data/lib/generators/core/scaffold/templates/helper.rb +3 -0
- data/lib/generators/core/scaffold/templates/migration.rb +16 -0
- data/lib/generators/core/scaffold/templates/model.rb +5 -0
- data/lib/generators/core/scaffold/templates/views/haml/_collection.html.haml +25 -0
- data/lib/generators/core/scaffold/templates/views/haml/_form.html.haml +13 -0
- data/lib/generators/core/scaffold/templates/views/haml/_search.html.haml +7 -0
- data/lib/generators/core/scaffold/templates/views/haml/edit.html.haml +11 -0
- data/lib/generators/core/scaffold/templates/views/haml/index.html.haml +8 -0
- data/lib/generators/core/scaffold/templates/views/haml/index.js.haml +1 -0
- data/lib/generators/core/scaffold/templates/views/haml/new.html.haml +12 -0
- data/lib/generators/core/scaffold/templates/views/haml/show.html.haml +19 -0
- metadata +112 -0
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,434 @@
|
|
1
|
+
/*
|
2
|
+
* activo
|
3
|
+
* by David Francisco (dmfrancisc[at]gmail.com)
|
4
|
+
*
|
5
|
+
* based on "Drastic Dark" by Juan Maria Martinez Arce (juan[at]insignia4u.com) */
|
6
|
+
|
7
|
+
.small
|
8
|
+
font-size: 11px
|
9
|
+
font-style: normal
|
10
|
+
font-weight: normal
|
11
|
+
text-transform: none
|
12
|
+
letter-spacing: normal
|
13
|
+
line-height: 1.4em
|
14
|
+
|
15
|
+
.gray
|
16
|
+
color: #999999
|
17
|
+
font-family: Georgia, serif
|
18
|
+
font-size: 13px
|
19
|
+
font-style: italic
|
20
|
+
font-weight: normal
|
21
|
+
text-transform: none
|
22
|
+
letter-spacing: normal
|
23
|
+
line-height: 1.6em
|
24
|
+
|
25
|
+
.hightlight
|
26
|
+
background-color: #ffff88
|
27
|
+
font-weight: bold
|
28
|
+
color: #36393d
|
29
|
+
|
30
|
+
a
|
31
|
+
&:link, &:visited, &:hover, &:active
|
32
|
+
color: #111
|
33
|
+
|
34
|
+
h1, h2, h3
|
35
|
+
color: #111
|
36
|
+
|
37
|
+
a
|
38
|
+
-moz-outline: none
|
39
|
+
|
40
|
+
body
|
41
|
+
color: #111
|
42
|
+
background: #E5E5E5
|
43
|
+
font-family: helvetica, arial, sans-serif
|
44
|
+
|
45
|
+
hr
|
46
|
+
background: #e2e2e2
|
47
|
+
color: #e2e2e2
|
48
|
+
|
49
|
+
#header
|
50
|
+
background: #002134
|
51
|
+
h1
|
52
|
+
padding: 15px 0
|
53
|
+
font-size: 32px
|
54
|
+
font-style: normal
|
55
|
+
font-weight: bold
|
56
|
+
text-transform: none
|
57
|
+
letter-spacing: -1px
|
58
|
+
line-height: 1.2em
|
59
|
+
color: #fff
|
60
|
+
text-shadow: #000 1px 1px 2px
|
61
|
+
a
|
62
|
+
&:link, &:active, &:hover, &:visited
|
63
|
+
color: #fff
|
64
|
+
|
65
|
+
#user-navigation
|
66
|
+
top: auto
|
67
|
+
bottom: 5px
|
68
|
+
right: 25px
|
69
|
+
a.logout
|
70
|
+
background: #ccc
|
71
|
+
padding: 1px 4px
|
72
|
+
|
73
|
+
#main
|
74
|
+
width: 71%
|
75
|
+
.block
|
76
|
+
padding-top: 0px
|
77
|
+
background: #fff
|
78
|
+
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4)
|
79
|
+
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4)
|
80
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4)
|
81
|
+
.content
|
82
|
+
padding-top: 1px
|
83
|
+
h2
|
84
|
+
margin-left: 15px
|
85
|
+
font-size: 22px
|
86
|
+
font-style: normal
|
87
|
+
font-weight: bold
|
88
|
+
text-transform: none
|
89
|
+
letter-spacing: -1px
|
90
|
+
line-height: 1.2em
|
91
|
+
p
|
92
|
+
font-size: 13px
|
93
|
+
font-style: normal
|
94
|
+
font-weight: normal
|
95
|
+
text-transform: none
|
96
|
+
letter-spacing: normal
|
97
|
+
line-height: 1.45em
|
98
|
+
|
99
|
+
#sidebar
|
100
|
+
.block h4
|
101
|
+
font-weight: bold
|
102
|
+
.notice
|
103
|
+
background: #fff
|
104
|
+
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4)
|
105
|
+
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4)
|
106
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4)
|
107
|
+
h3
|
108
|
+
color: #111
|
109
|
+
border-bottom: 1px solid #c0c0c0
|
110
|
+
|
111
|
+
#main-navigation ul li
|
112
|
+
padding-left: 15px
|
113
|
+
a
|
114
|
+
padding: 8px 0
|
115
|
+
&.active
|
116
|
+
padding: 0
|
117
|
+
margin-left: 15px
|
118
|
+
background: #E5E5E5
|
119
|
+
margin-left: 15px
|
120
|
+
a
|
121
|
+
padding: 8px 15px
|
122
|
+
|
123
|
+
#sidebar ul li
|
124
|
+
background-position: 15px 11px
|
125
|
+
background-repeat: no-repeat
|
126
|
+
background-image: url("/images/arrow.png")
|
127
|
+
border-bottom: 1px solid #e2e2e2
|
128
|
+
a
|
129
|
+
text-decoration: none
|
130
|
+
margin-left: 20px
|
131
|
+
&:link, &:visited
|
132
|
+
text-decoration: none
|
133
|
+
|
134
|
+
#main-navigation
|
135
|
+
background-color: #f4f4f4
|
136
|
+
background-image: url("/images/menubar-background.png")
|
137
|
+
background-repeat: repeat-x
|
138
|
+
ul li
|
139
|
+
margin-right: 0
|
140
|
+
padding-left: 15px
|
141
|
+
padding-right: 5px
|
142
|
+
a
|
143
|
+
&:link, &:visited, &:hover, &:active
|
144
|
+
text-decoration: none
|
145
|
+
color: #111
|
146
|
+
|
147
|
+
.secondary-navigation ul li a
|
148
|
+
&:link, &:visited, &:hover, &:active
|
149
|
+
text-decoration: none
|
150
|
+
color: #111
|
151
|
+
|
152
|
+
#user-navigation ul li a
|
153
|
+
&:link, &:visited, &:hover, &:active
|
154
|
+
text-decoration: none
|
155
|
+
color: #111
|
156
|
+
|
157
|
+
.secondary-navigation
|
158
|
+
background-color: #f2f1ee
|
159
|
+
border-bottom: none
|
160
|
+
border-bottom-width: 5px
|
161
|
+
background-image: url("/images/boxbar-background.png")
|
162
|
+
ul li.active
|
163
|
+
background-color: #fff
|
164
|
+
a:hover
|
165
|
+
background-color: #fff
|
166
|
+
|
167
|
+
#footer .block
|
168
|
+
text-align: center
|
169
|
+
color: #111
|
170
|
+
background: #fff
|
171
|
+
-webkit-box-shadow: none
|
172
|
+
-moz-box-shadow: none
|
173
|
+
box-shadow: none
|
174
|
+
p
|
175
|
+
margin: 0
|
176
|
+
padding: 4px
|
177
|
+
|
178
|
+
/* pagination */
|
179
|
+
|
180
|
+
.pagination
|
181
|
+
a, span
|
182
|
+
background-color: #f4f4f4
|
183
|
+
background-image: url("/images/button-background.png")
|
184
|
+
color: #111
|
185
|
+
text-align: center
|
186
|
+
min-width: 15px
|
187
|
+
margin-right: 5px
|
188
|
+
padding: 6px
|
189
|
+
border: 1px solid #c3c4ba
|
190
|
+
em
|
191
|
+
background: #002134
|
192
|
+
color: #fff
|
193
|
+
border: 1px solid #002134
|
194
|
+
a
|
195
|
+
color: #1a1a1a
|
196
|
+
&:hover
|
197
|
+
border: 1px solid #818171
|
198
|
+
-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.3)
|
199
|
+
-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.3)
|
200
|
+
box-shadow: 0 0 4px rgba(0, 0, 0, 0.3)
|
201
|
+
&:active
|
202
|
+
background-image: url("/images/button-background-active.png")
|
203
|
+
outline: none
|
204
|
+
|
205
|
+
/* tables */
|
206
|
+
|
207
|
+
.table
|
208
|
+
th
|
209
|
+
background: #eaeaea
|
210
|
+
color: #222
|
211
|
+
font-weight: normal
|
212
|
+
td
|
213
|
+
border-bottom: 1px solid #eaeaea
|
214
|
+
tr.even
|
215
|
+
background: #f8f8f8
|
216
|
+
|
217
|
+
/* forms */
|
218
|
+
|
219
|
+
.form
|
220
|
+
label.label
|
221
|
+
color: #666666
|
222
|
+
input.text_field, textarea.text_area
|
223
|
+
width: 100%
|
224
|
+
border: 1px solid #e2e2e2
|
225
|
+
input:hover, textarea:hover
|
226
|
+
-webkit-box-shadow: rgba(0, 0, 0, 0.3) 0 0 3px
|
227
|
+
-moz-box-shadow: rgba(0, 0, 0, 0.3) 0 0 3px
|
228
|
+
box-shadow: 0 0 3px rgba(0, 0, 0, 0.3)
|
229
|
+
border: 1px solid #a2a294
|
230
|
+
input:focus, textarea:focus
|
231
|
+
border: 1px solid #a2a294
|
232
|
+
input.button
|
233
|
+
background: #e2e2e2
|
234
|
+
border: 1px solid #c1c1c1
|
235
|
+
padding: 2px 5px
|
236
|
+
cursor: pointer
|
237
|
+
color: #111
|
238
|
+
font-weight: bold
|
239
|
+
font-size: 11px
|
240
|
+
&:hover
|
241
|
+
border: 1px solid #666
|
242
|
+
.description
|
243
|
+
font-style: italic
|
244
|
+
color: #8C8C8C
|
245
|
+
font-size: .9em
|
246
|
+
.navform a
|
247
|
+
color: #cc0000
|
248
|
+
|
249
|
+
/* buttons */
|
250
|
+
|
251
|
+
a.button, button.button
|
252
|
+
background-color: #f4f4f4
|
253
|
+
background-image: url("/images/button-background.png")
|
254
|
+
border: 1px solid #c3c4ba
|
255
|
+
font-family: helvetica, arial, sans-serif
|
256
|
+
font-weight: normal
|
257
|
+
|
258
|
+
a.button
|
259
|
+
&:link, &:visited, &:hover, &:active
|
260
|
+
font-weight: normal
|
261
|
+
background-color: #f4f4f4
|
262
|
+
|
263
|
+
button.button
|
264
|
+
&:link, &:visited, &:hover, &:active
|
265
|
+
font-weight: normal
|
266
|
+
background-color: #f4f4f4
|
267
|
+
|
268
|
+
a.button:hover, button.button:hover
|
269
|
+
background-color: #eee
|
270
|
+
border: 1px solid #818171
|
271
|
+
-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.3)
|
272
|
+
-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.3)
|
273
|
+
box-shadow: 0 0 4px rgba(0, 0, 0, 0.3)
|
274
|
+
|
275
|
+
a.button:active, button.button:active
|
276
|
+
outline: none
|
277
|
+
background-color: #ddd
|
278
|
+
background-image: url("/images/button-background-active.png")
|
279
|
+
|
280
|
+
/* flash-messages */
|
281
|
+
|
282
|
+
.flash
|
283
|
+
.message
|
284
|
+
text-align: center
|
285
|
+
margin: 0 auto 15px
|
286
|
+
p
|
287
|
+
margin: 8px
|
288
|
+
.error
|
289
|
+
border: 1px solid #ffbbbb
|
290
|
+
background-color: #ffdddd
|
291
|
+
.warning
|
292
|
+
border: 1px solid #ffff88
|
293
|
+
background-color: #ffffcc
|
294
|
+
.notice
|
295
|
+
border: 1px solid #1fdf00
|
296
|
+
background-color: #bbffb6
|
297
|
+
|
298
|
+
/* lists */
|
299
|
+
|
300
|
+
ul.list li
|
301
|
+
border-bottom-color: #e2e2e2
|
302
|
+
border-bottom-width: 1px
|
303
|
+
border-bottom-style: solid
|
304
|
+
.item .avatar
|
305
|
+
border-color: #e2e2e2
|
306
|
+
border-width: 1px
|
307
|
+
border-style: solid
|
308
|
+
padding: 2px
|
309
|
+
|
310
|
+
/* box */
|
311
|
+
|
312
|
+
#box .block
|
313
|
+
background: #fff
|
314
|
+
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4)
|
315
|
+
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4)
|
316
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4)
|
317
|
+
h2
|
318
|
+
background: #002134
|
319
|
+
color: #fff
|
320
|
+
|
321
|
+
/* rounded borders */
|
322
|
+
|
323
|
+
#main
|
324
|
+
-moz-border-radius-topleft: 9px
|
325
|
+
-webkit-border-top-left-radius: 9px
|
326
|
+
-moz-border-radius-topright: 9px
|
327
|
+
-webkit-border-top-right-radius: 9px
|
328
|
+
|
329
|
+
#main-navigation
|
330
|
+
-moz-border-radius-topleft: 9px
|
331
|
+
-webkit-border-top-left-radius: 9px
|
332
|
+
-moz-border-radius-topright: 9px
|
333
|
+
-webkit-border-top-right-radius: 9px
|
334
|
+
li
|
335
|
+
-moz-border-radius-topleft: 9px
|
336
|
+
-webkit-border-top-left-radius: 9px
|
337
|
+
-moz-border-radius-topright: 9px
|
338
|
+
-webkit-border-top-right-radius: 9px
|
339
|
+
|
340
|
+
.secondary-navigation, #main .block
|
341
|
+
-moz-border-radius-topleft: 9px
|
342
|
+
-webkit-border-top-left-radius: 9px
|
343
|
+
-moz-border-radius-topright: 9px
|
344
|
+
-webkit-border-top-right-radius: 9px
|
345
|
+
|
346
|
+
#sidebar
|
347
|
+
.block, h3
|
348
|
+
-moz-border-radius-topleft: 9px
|
349
|
+
-webkit-border-top-left-radius: 9px
|
350
|
+
-moz-border-radius-topright: 9px
|
351
|
+
-webkit-border-top-right-radius: 9px
|
352
|
+
|
353
|
+
ul.list li, #footer .block, .form input.button
|
354
|
+
-moz-border-radius-topleft: 9px
|
355
|
+
-webkit-border-top-left-radius: 9px
|
356
|
+
-moz-border-radius-topright: 9px
|
357
|
+
-webkit-border-top-right-radius: 9px
|
358
|
+
|
359
|
+
#box .block
|
360
|
+
-moz-border-radius-topleft: 9px
|
361
|
+
-webkit-border-top-left-radius: 9px
|
362
|
+
-moz-border-radius-topright: 9px
|
363
|
+
-webkit-border-top-right-radius: 9px
|
364
|
+
h2
|
365
|
+
-moz-border-radius-topleft: 9px
|
366
|
+
-webkit-border-top-left-radius: 9px
|
367
|
+
-moz-border-radius-topright: 9px
|
368
|
+
-webkit-border-top-right-radius: 9px
|
369
|
+
|
370
|
+
.secondary-navigation
|
371
|
+
li.first a
|
372
|
+
-moz-border-radius-topleft: 9px
|
373
|
+
-webkit-border-top-left-radius: 9px
|
374
|
+
ul li.first
|
375
|
+
-moz-border-radius-topleft: 9px
|
376
|
+
-webkit-border-top-left-radius: 9px
|
377
|
+
-moz-border-radius-topleft: 9px
|
378
|
+
-webkit-border-top-left-radius: 9px
|
379
|
+
|
380
|
+
#sidebar
|
381
|
+
-moz-border-radius-bottomleft: 9px
|
382
|
+
-webkit-border-bottom-left-radius: 9px
|
383
|
+
-moz-border-radius-bottomright: 9px
|
384
|
+
-webkit-border-bottom-right-radius: 9px
|
385
|
+
.block
|
386
|
+
-moz-border-radius-bottomleft: 9px
|
387
|
+
-webkit-border-bottom-left-radius: 9px
|
388
|
+
-moz-border-radius-bottomright: 9px
|
389
|
+
-webkit-border-bottom-right-radius: 9px
|
390
|
+
|
391
|
+
#main .block, #sidebar ul.navigation, ul.list li, #footer .block, .form input.button, #box .block
|
392
|
+
-moz-border-radius-bottomleft: 9px
|
393
|
+
-webkit-border-bottom-left-radius: 9px
|
394
|
+
-moz-border-radius-bottomright: 9px
|
395
|
+
-webkit-border-bottom-right-radius: 9px
|
396
|
+
|
397
|
+
#main .block
|
398
|
+
-moz-border-radius: 9px
|
399
|
+
-webkit-border-radius: 9px
|
400
|
+
border-radius: 9px
|
401
|
+
|
402
|
+
#main-navigation, .secondary-navigation
|
403
|
+
-moz-border-radius-topleft: 9px
|
404
|
+
-webkit-border-top-left-radius: 9px
|
405
|
+
border-top-left-radius: 9px
|
406
|
+
-moz-border-radius-topright: 9px
|
407
|
+
-webkit-border-top-right-radius: 9px
|
408
|
+
border-top-right-radius: 9px
|
409
|
+
|
410
|
+
a.button, button.button
|
411
|
+
-moz-border-radius: 2px
|
412
|
+
-webkit-border-radius: 2px
|
413
|
+
border-radius: 2px
|
414
|
+
|
415
|
+
.pagination
|
416
|
+
a, span
|
417
|
+
-moz-border-radius: 2px
|
418
|
+
-webkit-border-radius: 2px
|
419
|
+
border-radius: 2px
|
420
|
+
|
421
|
+
.flash .message
|
422
|
+
-moz-border-radius: 6px
|
423
|
+
-webkit-border-radius: 6px
|
424
|
+
border-radius: 6px
|
425
|
+
|
426
|
+
.form input.button
|
427
|
+
-moz-border-radius: 5px
|
428
|
+
-webkit-border-radius: 5px
|
429
|
+
border-radius: 5px
|
430
|
+
|
431
|
+
#user-navigation a.logout
|
432
|
+
-moz-border-radius: 4px
|
433
|
+
-webkit-border-radius: 4px
|
434
|
+
border-radius: 4px
|