locomotivecms_wagon 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/generators/foundation5/public/stylesheets/foundation/_functions.scss +3 -2
  3. data/generators/foundation5/public/stylesheets/foundation/_settings.scss +419 -274
  4. data/generators/foundation5/public/stylesheets/foundation/components/_accordion.scss +110 -6
  5. data/generators/foundation5/public/stylesheets/foundation/components/_alert-boxes.scss +4 -2
  6. data/generators/foundation5/public/stylesheets/foundation/components/_block-grid.scss +2 -2
  7. data/generators/foundation5/public/stylesheets/foundation/components/_breadcrumbs.scss +8 -3
  8. data/generators/foundation5/public/stylesheets/foundation/components/_button-groups.scss +98 -9
  9. data/generators/foundation5/public/stylesheets/foundation/components/_buttons.scss +66 -29
  10. data/generators/foundation5/public/stylesheets/foundation/components/_clearing.scss +5 -5
  11. data/generators/foundation5/public/stylesheets/foundation/components/_dropdown-buttons.scss +11 -10
  12. data/generators/foundation5/public/stylesheets/foundation/components/_dropdown.scss +49 -35
  13. data/generators/foundation5/public/stylesheets/foundation/components/_forms.scss +125 -38
  14. data/generators/foundation5/public/stylesheets/foundation/components/_global.scss +64 -38
  15. data/generators/foundation5/public/stylesheets/foundation/components/_grid.scss +19 -4
  16. data/generators/foundation5/public/stylesheets/foundation/components/_icon-bar.scss +293 -0
  17. data/generators/foundation5/public/stylesheets/foundation/components/_joyride.scss +11 -9
  18. data/generators/foundation5/public/stylesheets/foundation/components/_keystrokes.scss +4 -4
  19. data/generators/foundation5/public/stylesheets/foundation/components/_labels.scss +5 -3
  20. data/generators/foundation5/public/stylesheets/foundation/components/_magellan.scss +1 -1
  21. data/generators/foundation5/public/stylesheets/foundation/components/_offcanvas.scss +190 -33
  22. data/generators/foundation5/public/stylesheets/foundation/components/_orbit.scss +92 -147
  23. data/generators/foundation5/public/stylesheets/foundation/components/_pagination.scss +22 -10
  24. data/generators/foundation5/public/stylesheets/foundation/components/_panels.scss +12 -7
  25. data/generators/foundation5/public/stylesheets/foundation/components/_pricing-tables.scss +11 -11
  26. data/generators/foundation5/public/stylesheets/foundation/components/_progress-bars.scss +2 -2
  27. data/generators/foundation5/public/stylesheets/foundation/components/_range-slider.scss +29 -9
  28. data/generators/foundation5/public/stylesheets/foundation/components/_reveal.scss +62 -56
  29. data/generators/foundation5/public/stylesheets/foundation/components/_side-nav.scss +3 -2
  30. data/generators/foundation5/public/stylesheets/foundation/components/_split-buttons.scss +2 -2
  31. data/generators/foundation5/public/stylesheets/foundation/components/_sub-nav.scss +4 -6
  32. data/generators/foundation5/public/stylesheets/foundation/components/_switches.scss +230 -0
  33. data/generators/foundation5/public/stylesheets/foundation/components/_tables.scss +13 -7
  34. data/generators/foundation5/public/stylesheets/foundation/components/_tabs.scss +22 -8
  35. data/generators/foundation5/public/stylesheets/foundation/components/_thumbs.scss +2 -4
  36. data/generators/foundation5/public/stylesheets/foundation/components/_toolbar.scss +70 -0
  37. data/generators/foundation5/public/stylesheets/foundation/components/_tooltips.scss +9 -7
  38. data/generators/foundation5/public/stylesheets/foundation/components/_top-bar.scss +82 -56
  39. data/generators/foundation5/public/stylesheets/foundation/components/_type.scss +23 -11
  40. data/generators/foundation5/public/stylesheets/foundation/components/_visibility.scss +7 -7
  41. data/generators/foundation5/public/stylesheets/foundation.css +4327 -3587
  42. data/generators/foundation5/public/stylesheets/foundation.css.scss +38 -38
  43. data/generators/foundation5/public/stylesheets/normalize.css +71 -139
  44. data/generators/foundation5/public/stylesheets/normalize.css.scss +5 -3
  45. data/lib/locomotive/wagon/cli.rb +24 -1
  46. data/lib/locomotive/wagon/generators/content_type.rb +4 -1
  47. data/lib/locomotive/wagon/generators/page.rb +10 -5
  48. data/lib/locomotive/wagon/generators/relationship.rb +100 -0
  49. data/lib/locomotive/wagon/generators/site/foundation5.rb +2 -2
  50. data/lib/locomotive/wagon/generators/snippet.rb +3 -3
  51. data/lib/locomotive/wagon/liquid/tags/locale_switcher.rb +2 -2
  52. data/lib/locomotive/wagon/version.rb +1 -1
  53. data/lib/locomotive/wagon.rb +1 -0
  54. data/locomotivecms_wagon.gemspec +1 -1
  55. data/spec/fixtures/blog/app/content_types/comments.yml +20 -0
  56. data/spec/fixtures/blog/app/content_types/posts.yml +19 -0
  57. data/spec/fixtures/blog/app/views/pages/404.liquid +11 -0
  58. data/spec/fixtures/blog/app/views/pages/about-us.liquid.haml +29 -0
  59. data/spec/fixtures/blog/app/views/pages/index.liquid +25 -0
  60. data/spec/fixtures/blog/app/views/pages/posts/content_type_template.fr.liquid +14 -0
  61. data/spec/fixtures/blog/app/views/pages/posts/content_type_template.liquid +15 -0
  62. data/spec/fixtures/blog/app/views/pages/posts.fr.liquid +13 -0
  63. data/spec/fixtures/blog/app/views/pages/posts.liquid +13 -0
  64. data/spec/fixtures/blog/config/deploy.yml +4 -0
  65. data/spec/fixtures/blog/config/site.yml +16 -0
  66. data/spec/fixtures/blog/data/comments.yml +16 -0
  67. data/spec/fixtures/blog/data/posts.yml +7 -0
  68. data/spec/integration/generators/page_spec.rb +87 -0
  69. data/spec/integration/generators/relationship_spec.rb +102 -0
  70. data/spec/support/helpers.rb +19 -1
  71. metadata +38 -6
  72. data/generators/foundation5/public/stylesheets/foundation/components/_reveal-new.scss +0 -0
  73. data/generators/foundation5/public/stylesheets/foundation/components/_switch.scss +0 -294
@@ -1,45 +1,45 @@
1
+ @charset "UTF-8";
1
2
  // Foundation by ZURB
2
3
  // foundation.zurb.com
3
4
  // Licensed under MIT Open Source
4
5
 
5
6
  // Make sure the charset is set appropriately
6
- @charset "UTF-8";
7
7
 
8
8
  // Behold, here are all the Foundation components.
9
- @import
10
- "foundation/components/grid",
11
- "foundation/components/accordion",
12
- "foundation/components/alert-boxes",
13
- "foundation/components/block-grid",
14
- "foundation/components/breadcrumbs",
15
- "foundation/components/button-groups",
16
- "foundation/components/buttons",
17
- "foundation/components/clearing",
18
- "foundation/components/dropdown",
19
- "foundation/components/dropdown-buttons",
20
- "foundation/components/flex-video",
21
- "foundation/components/forms",
22
- "foundation/components/inline-lists",
23
- "foundation/components/joyride",
24
- "foundation/components/keystrokes",
25
- "foundation/components/labels",
26
- "foundation/components/magellan",
27
- "foundation/components/orbit",
28
- "foundation/components/pagination",
29
- "foundation/components/panels",
30
- "foundation/components/pricing-tables",
31
- "foundation/components/progress-bars",
32
- "foundation/components/range-slider",
33
- "foundation/components/reveal",
34
- "foundation/components/side-nav",
35
- "foundation/components/split-buttons",
36
- "foundation/components/sub-nav",
37
- "foundation/components/switch",
38
- "foundation/components/tables",
39
- "foundation/components/tabs",
40
- "foundation/components/thumbs",
41
- "foundation/components/tooltips",
42
- "foundation/components/top-bar",
43
- "foundation/components/type",
44
- "foundation/components/offcanvas",
45
- "foundation/components/visibility";
9
+ @import "foundation/components/grid";
10
+ @import "foundation/components/accordion";
11
+ @import "foundation/components/alert-boxes";
12
+ @import "foundation/components/block-grid";
13
+ @import "foundation/components/breadcrumbs";
14
+ @import "foundation/components/button-groups";
15
+ @import "foundation/components/buttons";
16
+ @import "foundation/components/clearing";
17
+ @import "foundation/components/dropdown";
18
+ @import "foundation/components/dropdown-buttons";
19
+ @import "foundation/components/flex-video";
20
+ @import "foundation/components/forms";
21
+ @import "foundation/components/icon-bar";
22
+ @import "foundation/components/inline-lists";
23
+ @import "foundation/components/joyride";
24
+ @import "foundation/components/keystrokes";
25
+ @import "foundation/components/labels";
26
+ @import "foundation/components/magellan";
27
+ @import "foundation/components/orbit";
28
+ @import "foundation/components/pagination";
29
+ @import "foundation/components/panels";
30
+ @import "foundation/components/pricing-tables";
31
+ @import "foundation/components/progress-bars";
32
+ @import "foundation/components/range-slider";
33
+ @import "foundation/components/reveal";
34
+ @import "foundation/components/side-nav";
35
+ @import "foundation/components/split-buttons";
36
+ @import "foundation/components/sub-nav";
37
+ @import "foundation/components/switches";
38
+ @import "foundation/components/tables";
39
+ @import "foundation/components/tabs";
40
+ @import "foundation/components/thumbs";
41
+ @import "foundation/components/tooltips";
42
+ @import "foundation/components/top-bar";
43
+ @import "foundation/components/type";
44
+ @import "foundation/components/offcanvas";
45
+ @import "foundation/components/visibility";
@@ -1,34 +1,31 @@
1
- /*! normalize.css v3.0.1 | MIT License | git.io/normalize */
2
-
1
+ /*! normalize.css v3.0.2 | MIT License | git.io/normalize */
3
2
  /**
4
3
  * 1. Set default font family to sans-serif.
5
4
  * 2. Prevent iOS text size adjust after orientation change, without disabling
6
5
  * user zoom.
7
6
  */
8
-
9
7
  html {
10
- font-family: sans-serif; /* 1 */
11
- -ms-text-size-adjust: 100%; /* 2 */
12
- -webkit-text-size-adjust: 100%; /* 2 */
13
- }
8
+ font-family: sans-serif;
9
+ /* 1 */
10
+ -ms-text-size-adjust: 100%;
11
+ /* 2 */
12
+ -webkit-text-size-adjust: 100%;
13
+ /* 2 */ }
14
14
 
15
15
  /**
16
16
  * Remove default margin.
17
17
  */
18
-
19
18
  body {
20
- margin: 0;
21
- }
19
+ margin: 0; }
22
20
 
23
21
  /* HTML5 display definitions
24
22
  ========================================================================== */
25
-
26
23
  /**
27
24
  * Correct `block` display not defined for any HTML5 element in IE 8/9.
28
- * Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox.
25
+ * Correct `block` display not defined for `details` or `summary` in IE 10/11
26
+ * and Firefox.
29
27
  * Correct `block` display not defined for `main` in IE 11.
30
28
  */
31
-
32
29
  article,
33
30
  aside,
34
31
  details,
@@ -38,232 +35,189 @@ footer,
38
35
  header,
39
36
  hgroup,
40
37
  main,
38
+ menu,
41
39
  nav,
42
40
  section,
43
41
  summary {
44
- display: block;
45
- }
42
+ display: block; }
46
43
 
47
44
  /**
48
45
  * 1. Correct `inline-block` display not defined in IE 8/9.
49
46
  * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
50
47
  */
51
-
52
48
  audio,
53
49
  canvas,
54
50
  progress,
55
51
  video {
56
- display: inline-block; /* 1 */
57
- vertical-align: baseline; /* 2 */
58
- }
52
+ display: inline-block;
53
+ /* 1 */
54
+ vertical-align: baseline;
55
+ /* 2 */ }
59
56
 
60
57
  /**
61
58
  * Prevent modern browsers from displaying `audio` without controls.
62
59
  * Remove excess height in iOS 5 devices.
63
60
  */
64
-
65
61
  audio:not([controls]) {
66
62
  display: none;
67
- height: 0;
68
- }
63
+ height: 0; }
69
64
 
70
65
  /**
71
66
  * Address `[hidden]` styling not present in IE 8/9/10.
72
67
  * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
73
68
  */
74
-
75
69
  [hidden],
76
70
  template {
77
- display: none;
78
- }
71
+ display: none; }
79
72
 
80
73
  /* Links
81
74
  ========================================================================== */
82
-
83
75
  /**
84
76
  * Remove the gray background color from active links in IE 10.
85
77
  */
86
-
87
78
  a {
88
- background: transparent;
89
- }
79
+ background-color: transparent; }
90
80
 
91
81
  /**
92
82
  * Improve readability when focused and also mouse hovered in all browsers.
93
83
  */
94
-
95
84
  a:active,
96
85
  a:hover {
97
- outline: 0;
98
- }
86
+ outline: 0; }
99
87
 
100
88
  /* Text-level semantics
101
89
  ========================================================================== */
102
-
103
90
  /**
104
91
  * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
105
92
  */
106
-
107
93
  abbr[title] {
108
- border-bottom: 1px dotted;
109
- }
94
+ border-bottom: 1px dotted; }
110
95
 
111
96
  /**
112
97
  * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
113
98
  */
114
-
115
99
  b,
116
100
  strong {
117
- font-weight: bold;
118
- }
101
+ font-weight: bold; }
119
102
 
120
103
  /**
121
104
  * Address styling not present in Safari and Chrome.
122
105
  */
123
-
124
106
  dfn {
125
- font-style: italic;
126
- }
107
+ font-style: italic; }
127
108
 
128
109
  /**
129
110
  * Address variable `h1` font-size and margin within `section` and `article`
130
111
  * contexts in Firefox 4+, Safari, and Chrome.
131
112
  */
132
-
133
113
  h1 {
134
114
  font-size: 2em;
135
- margin: 0.67em 0;
136
- }
115
+ margin: 0.67em 0; }
137
116
 
138
117
  /**
139
118
  * Address styling not present in IE 8/9.
140
119
  */
141
-
142
120
  mark {
143
121
  background: #ff0;
144
- color: #000;
145
- }
122
+ color: #000; }
146
123
 
147
124
  /**
148
125
  * Address inconsistent and variable font size in all browsers.
149
126
  */
150
-
151
127
  small {
152
- font-size: 80%;
153
- }
128
+ font-size: 80%; }
154
129
 
155
130
  /**
156
131
  * Prevent `sub` and `sup` affecting `line-height` in all browsers.
157
132
  */
158
-
159
133
  sub,
160
134
  sup {
161
135
  font-size: 75%;
162
136
  line-height: 0;
163
137
  position: relative;
164
- vertical-align: baseline;
165
- }
138
+ vertical-align: baseline; }
166
139
 
167
140
  sup {
168
- top: -0.5em;
169
- }
141
+ top: -0.5em; }
170
142
 
171
143
  sub {
172
- bottom: -0.25em;
173
- }
144
+ bottom: -0.25em; }
174
145
 
175
146
  /* Embedded content
176
147
  ========================================================================== */
177
-
178
148
  /**
179
149
  * Remove border when inside `a` element in IE 8/9/10.
180
150
  */
181
-
182
151
  img {
183
- border: 0;
184
- }
152
+ border: 0; }
185
153
 
186
154
  /**
187
155
  * Correct overflow not hidden in IE 9/10/11.
188
156
  */
189
-
190
157
  svg:not(:root) {
191
- overflow: hidden;
192
- }
158
+ overflow: hidden; }
193
159
 
194
160
  /* Grouping content
195
161
  ========================================================================== */
196
-
197
162
  /**
198
163
  * Address margin not present in IE 8/9 and Safari.
199
164
  */
200
-
201
165
  figure {
202
- margin: 1em 40px;
203
- }
166
+ margin: 1em 40px; }
204
167
 
205
168
  /**
206
169
  * Address differences between Firefox and other browsers.
207
170
  */
208
-
209
171
  hr {
210
172
  -moz-box-sizing: content-box;
211
173
  box-sizing: content-box;
212
- height: 0;
213
- }
174
+ height: 0; }
214
175
 
215
176
  /**
216
177
  * Contain overflow in all browsers.
217
178
  */
218
-
219
179
  pre {
220
- overflow: auto;
221
- }
180
+ overflow: auto; }
222
181
 
223
182
  /**
224
183
  * Address odd `em`-unit font size rendering in all browsers.
225
184
  */
226
-
227
185
  code,
228
186
  kbd,
229
187
  pre,
230
188
  samp {
231
189
  font-family: monospace, monospace;
232
- font-size: 1em;
233
- }
190
+ font-size: 1em; }
234
191
 
235
192
  /* Forms
236
193
  ========================================================================== */
237
-
238
194
  /**
239
195
  * Known limitation: by default, Chrome and Safari on OS X allow very limited
240
196
  * styling of `select`, unless a `border` property is set.
241
197
  */
242
-
243
198
  /**
244
199
  * 1. Correct color not being inherited.
245
200
  * Known issue: affects color of disabled elements.
246
201
  * 2. Correct font properties not being inherited.
247
202
  * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
248
203
  */
249
-
250
204
  button,
251
205
  input,
252
206
  optgroup,
253
207
  select,
254
208
  textarea {
255
- color: inherit; /* 1 */
256
- font: inherit; /* 2 */
257
- margin: 0; /* 3 */
258
- }
209
+ color: inherit;
210
+ /* 1 */
211
+ font: inherit;
212
+ /* 2 */
213
+ margin: 0;
214
+ /* 3 */ }
259
215
 
260
216
  /**
261
217
  * Address `overflow` set to `hidden` in IE 8/9/10/11.
262
218
  */
263
-
264
219
  button {
265
- overflow: visible;
266
- }
220
+ overflow: visible; }
267
221
 
268
222
  /**
269
223
  * Address inconsistent `text-transform` inheritance for `button` and `select`.
@@ -271,11 +225,9 @@ button {
271
225
  * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
272
226
  * Correct `select` style inheritance in Firefox.
273
227
  */
274
-
275
228
  button,
276
229
  select {
277
- text-transform: none;
278
- }
230
+ text-transform: none; }
279
231
 
280
232
  /**
281
233
  * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
@@ -284,42 +236,36 @@ select {
284
236
  * 3. Improve usability and consistency of cursor style between image-type
285
237
  * `input` and others.
286
238
  */
287
-
288
239
  button,
289
- html input[type="button"], /* 1 */
240
+ html input[type="button"],
290
241
  input[type="reset"],
291
242
  input[type="submit"] {
292
- -webkit-appearance: button; /* 2 */
293
- cursor: pointer; /* 3 */
294
- }
243
+ -webkit-appearance: button;
244
+ /* 2 */
245
+ cursor: pointer;
246
+ /* 3 */ }
295
247
 
296
248
  /**
297
249
  * Re-set default cursor for disabled elements.
298
250
  */
299
-
300
251
  button[disabled],
301
252
  html input[disabled] {
302
- cursor: default;
303
- }
253
+ cursor: default; }
304
254
 
305
255
  /**
306
256
  * Remove inner padding and border in Firefox 4+.
307
257
  */
308
-
309
258
  button::-moz-focus-inner,
310
259
  input::-moz-focus-inner {
311
260
  border: 0;
312
- padding: 0;
313
- }
261
+ padding: 0; }
314
262
 
315
263
  /**
316
264
  * Address Firefox 4+ setting `line-height` on `input` using `!important` in
317
265
  * the UA stylesheet.
318
266
  */
319
-
320
267
  input {
321
- line-height: normal;
322
- }
268
+ line-height: normal; }
323
269
 
324
270
  /**
325
271
  * It's recommended that you don't attempt to style these elements.
@@ -328,98 +274,84 @@ input {
328
274
  * 1. Address box sizing set to `content-box` in IE 8/9/10.
329
275
  * 2. Remove excess padding in IE 8/9/10.
330
276
  */
331
-
332
277
  input[type="checkbox"],
333
278
  input[type="radio"] {
334
- box-sizing: border-box; /* 1 */
335
- padding: 0; /* 2 */
336
- }
279
+ box-sizing: border-box;
280
+ /* 1 */
281
+ padding: 0;
282
+ /* 2 */ }
337
283
 
338
284
  /**
339
285
  * Fix the cursor style for Chrome's increment/decrement buttons. For certain
340
286
  * `font-size` values of the `input`, it causes the cursor style of the
341
287
  * decrement button to change from `default` to `text`.
342
288
  */
343
-
344
289
  input[type="number"]::-webkit-inner-spin-button,
345
290
  input[type="number"]::-webkit-outer-spin-button {
346
- height: auto;
347
- }
291
+ height: auto; }
348
292
 
349
293
  /**
350
294
  * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
351
295
  * 2. Address `box-sizing` set to `border-box` in Safari and Chrome
352
296
  * (include `-moz` to future-proof).
353
297
  */
354
-
355
298
  input[type="search"] {
356
- -webkit-appearance: textfield; /* 1 */
299
+ -webkit-appearance: textfield;
300
+ /* 1 */
357
301
  -moz-box-sizing: content-box;
358
- -webkit-box-sizing: content-box; /* 2 */
359
- box-sizing: content-box;
360
- }
302
+ -webkit-box-sizing: content-box;
303
+ /* 2 */
304
+ box-sizing: content-box; }
361
305
 
362
306
  /**
363
307
  * Remove inner padding and search cancel button in Safari and Chrome on OS X.
364
308
  * Safari (but not Chrome) clips the cancel button when the search input has
365
309
  * padding (and `textfield` appearance).
366
310
  */
367
-
368
311
  input[type="search"]::-webkit-search-cancel-button,
369
312
  input[type="search"]::-webkit-search-decoration {
370
- -webkit-appearance: none;
371
- }
313
+ -webkit-appearance: none; }
372
314
 
373
315
  /**
374
316
  * Define consistent border, margin, and padding.
375
317
  */
376
-
377
318
  fieldset {
378
319
  border: 1px solid #c0c0c0;
379
320
  margin: 0 2px;
380
- padding: 0.35em 0.625em 0.75em;
381
- }
321
+ padding: 0.35em 0.625em 0.75em; }
382
322
 
383
323
  /**
384
324
  * 1. Correct `color` not being inherited in IE 8/9/10/11.
385
325
  * 2. Remove padding so people aren't caught out if they zero out fieldsets.
386
326
  */
387
-
388
327
  legend {
389
- border: 0; /* 1 */
390
- padding: 0; /* 2 */
391
- }
328
+ border: 0;
329
+ /* 1 */
330
+ padding: 0;
331
+ /* 2 */ }
392
332
 
393
333
  /**
394
334
  * Remove default vertical scrollbar in IE 8/9/10/11.
395
335
  */
396
-
397
336
  textarea {
398
- overflow: auto;
399
- }
337
+ overflow: auto; }
400
338
 
401
339
  /**
402
340
  * Don't inherit the `font-weight` (applied by a rule above).
403
341
  * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
404
342
  */
405
-
406
343
  optgroup {
407
- font-weight: bold;
408
- }
344
+ font-weight: bold; }
409
345
 
410
346
  /* Tables
411
347
  ========================================================================== */
412
-
413
348
  /**
414
349
  * Remove most spacing between table cells.
415
350
  */
416
-
417
351
  table {
418
352
  border-collapse: collapse;
419
- border-spacing: 0;
420
- }
353
+ border-spacing: 0; }
421
354
 
422
355
  td,
423
356
  th {
424
- padding: 0;
425
- }
357
+ padding: 0; }
@@ -1,4 +1,4 @@
1
- /*! normalize.css v3.0.1 | MIT License | git.io/normalize */
1
+ /*! normalize.css v3.0.2 | MIT License | git.io/normalize */
2
2
 
3
3
  /**
4
4
  * 1. Set default font family to sans-serif.
@@ -25,7 +25,8 @@ body {
25
25
 
26
26
  /**
27
27
  * Correct `block` display not defined for any HTML5 element in IE 8/9.
28
- * Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox.
28
+ * Correct `block` display not defined for `details` or `summary` in IE 10/11
29
+ * and Firefox.
29
30
  * Correct `block` display not defined for `main` in IE 11.
30
31
  */
31
32
 
@@ -38,6 +39,7 @@ footer,
38
39
  header,
39
40
  hgroup,
40
41
  main,
42
+ menu,
41
43
  nav,
42
44
  section,
43
45
  summary {
@@ -85,7 +87,7 @@ template {
85
87
  */
86
88
 
87
89
  a {
88
- background: transparent;
90
+ background-color: transparent;
89
91
  }
90
92
 
91
93
  /**
@@ -55,7 +55,7 @@ module Locomotive
55
55
  desc 'content_type SLUG FIELDS', 'Creates a content type with the specified slug and fields.'
56
56
  method_option :name, aliases: '-n', type: :string, default: nil, optional: true, desc: 'Name of the content type as it will be displayed in the back-office'
57
57
  long_desc <<-LONGDESC
58
- Creates a content type with the specified slug and fields.
58
+ Create a content type with the specified slug and fields.
59
59
 
60
60
  SLUG should be plural, lowercase, and underscored.
61
61
 
@@ -83,6 +83,29 @@ module Locomotive
83
83
  end
84
84
  end
85
85
 
86
+ desc 'relationship SOURCE TYPE TARGET', 'Relate 2 existing content types.'
87
+ long_desc <<-LONGDESC
88
+ Relate 2 existing content types.
89
+
90
+ SOURCE AND TARGET are the slugs of the content types.
91
+ There should be plural, lowercase, and underscored.
92
+
93
+ TYPE values: belongs_to, has_many, or many_to_many.
94
+
95
+ Examples:
96
+
97
+ * wagon generate relationship posts belongs_to categories
98
+
99
+ * wagon generate relationship projects many_to_many developers
100
+ LONGDESC
101
+ def relationship(source, type, target)
102
+ force_color_if_asked(options)
103
+
104
+ if check_path!
105
+ Locomotive::Wagon.generate :relationship, [source, type, target, self.options.delete('path')], self.options
106
+ end
107
+ end
108
+
86
109
  desc 'page FULLPATH', 'Create a page. No need to pass an extension to the FULLPATH arg'
87
110
  method_option :title, aliases: '-t', type: 'string', default: nil, desc: 'Title of the page'
88
111
  method_option :haml, aliases: '-h', type: 'boolean', default: nil, desc: 'add a HAML extension to the file'
@@ -4,6 +4,9 @@ require 'active_support'
4
4
  require 'active_support/core_ext'
5
5
  require 'faker'
6
6
 
7
+ # Remove I18n warnings (i18n lib is required by faker)
8
+ I18n.enforce_available_locales = false
9
+
7
10
  module Locomotive
8
11
  module Wagon
9
12
  module Generators
@@ -60,4 +63,4 @@ module Locomotive
60
63
 
61
64
  end
62
65
  end
63
- end
66
+ end
@@ -62,18 +62,23 @@ module Locomotive
62
62
  end
63
63
 
64
64
  def other_locales
65
- locales = options[:default_locales]
66
- locales.shift
67
-
65
+ # Rules:
68
66
  # #1 default: [fr, en, es], asked: [en, de], result => [en]
69
67
  # #2 default: [fr, en, de], asked: [es], result => []
70
68
  # #1 default: [fr, en, es], asked: [fr, en, es], result => [en, es]
71
69
 
72
- locales & (options[:locales] || [])
70
+ _locales = options[:locales] || ''
71
+ separator = _locales.include?(',') ? ',' : ' '
72
+
73
+ _locales = _locales.split(separator)
74
+ locales = options[:default_locales]
75
+ locales.shift
76
+
77
+ locales & (_locales || [])
73
78
  end
74
79
 
75
80
  end
76
81
 
77
82
  end
78
83
  end
79
- end
84
+ end