edge_framework 0.9.0 → 0.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. data/README.md +6 -10
  2. data/assets/js/edge/edge.animate.js +0 -0
  3. data/assets/sass/edge/_base.scss +34 -22
  4. data/assets/sass/edge/_components.scss +5 -4
  5. data/assets/sass/edge/_helpers.scss +2 -14
  6. data/assets/sass/edge/components/_animate.scss +151 -0
  7. data/assets/sass/edge/components/_button.scss +98 -41
  8. data/assets/sass/edge/components/_code.scss +170 -166
  9. data/assets/sass/edge/components/_form.scss +77 -76
  10. data/assets/sass/edge/components/_grid.scss +15 -12
  11. data/assets/sass/edge/components/_normalize.scss +60 -59
  12. data/assets/sass/edge/components/_print.scss +73 -70
  13. data/assets/sass/edge/components/_tile.scss +24 -10
  14. data/assets/sass/edge/components/_typography.scss +127 -138
  15. data/assets/sass/edge/components/_visibility.scss +156 -44
  16. data/assets/sass/edge/helpers/_sprites.scss +75 -63
  17. data/assets/sass/edge/helpers/_sticky-footer.scss +26 -31
  18. data/assets/sass/edge.scss +1 -1
  19. data/assets/sass/for-test.scss +247 -151
  20. data/assets/test.html +323 -11
  21. data/edge.gemspec +17 -18
  22. data/lib/edge/engine.rb +19 -0
  23. data/lib/edge/message.rb +32 -29
  24. data/lib/edge/sprockets.rb +4 -0
  25. data/lib/edge/version.rb +2 -2
  26. data/lib/edge_framework.rb +63 -67
  27. data/template/base/assets/js/app.js +1 -1
  28. data/template/base/assets/sass/_setting.scss +35 -35
  29. data/template/base/config.rb +1 -1
  30. data/template/html/index.html +3 -3
  31. data/template/php/partials/footer.php +2 -2
  32. data/template/wordpress/footer.php +2 -3
  33. metadata +8 -24
  34. data/assets/sass/edge/components/_block-grid-margin.scss +0 -112
  35. data/assets/sass/edge/components/_grid-margin.scss +0 -309
  36. data/assets/sass/edge/components/_grid-old.scss +0 -287
  37. data/lib/edge/console.rb +0 -15
@@ -1,309 +0,0 @@
1
- // -----------------------------------------
2
- // GRID with MARGIN
3
- // *Deprecated* since v 0.1, use block-grid instead
4
- // Using margin for distance between grid
5
- // -----------------------------------------
6
- $row-width : em($content-width) !default;
7
- $column-padding : em(0px) !default;
8
- $column-margin : em(25px) !default; // Margin between column at maximum row's width
9
- $total-columns : 12 !default;
10
-
11
- // Calculate percentages for grid
12
- @function gridCalc($colNumber, $totalColumns: $total-columns, $collapse: false ) {
13
- $baseSize : percentage( $colNumber / $totalColumns );
14
-
15
- // Additional size due to margin between grid.
16
- $fillSize : 0 !default;
17
- @if $collapse == false {
18
- $fillSize : $colNumber * ( gridMarginCalc() / $totalColumns );
19
- }
20
-
21
- @return $baseSize + $fillSize;
22
- }
23
-
24
- // Calculate percentages for Margin between grid
25
- @function gridMarginCalc($colMargin: $column-margin, $rowWidth: $row-width) {
26
- @return percentage( $colMargin / $rowWidth );
27
- }
28
-
29
- // Create ROW
30
- @mixin grid-row($behavior: false, $minify: false) {
31
- @if $minify == false {
32
- @include clearfix;
33
- }
34
-
35
- // use @include grid-row(nest); to include a nested row
36
- @if $behavior == nest {
37
- width : auto;
38
- max-width : none;
39
- margin-#{$default-float} : -($column-padding);
40
- margin-#{$default-opposite} : -($column-padding);
41
- }
42
- // use @include grid-row(collapse); to collapse a container row margins
43
- @else if $behavior == collapse {
44
- width : 100%;
45
- max-width : $row-width;
46
- margin : 0;
47
- }
48
- // use @include grid-row(nest-in-non-collapse); to collapse outer margins of nested-row inside non-collapsed-row
49
- @else if $behavior == nest-in-non-collapse {
50
- width : auto;
51
- max-width : none;
52
- }
53
- // use @include grid-row(nest-in-collapse); to collapse outer margins of nested-row inside collapsed-row
54
- @else if $behavior == nest-in-collapse {
55
- width : auto;
56
- max-width : none;
57
- margin : 0;
58
- }
59
-
60
- // use @include grid-row; to use a container row
61
- @else {
62
- width : 100%;
63
- max-width : $row-width;
64
- margin : 0 auto;
65
- }
66
- }
67
-
68
- // Create COLUMN
69
- @mixin grid-column($columns : false,
70
- $last-column : false,
71
- $center : false,
72
- $offset : false,
73
- $push : false,
74
- $pull : false,
75
- $collapse : false,
76
- $minify : false, // Remove style redundancy
77
- $float : left ) {
78
-
79
- $not-for-columns : $push == false and $pull == false;
80
- // If column number not specified
81
- @if $columns == false and $minify and $not-for-columns {
82
- position : relative;
83
- margin-#{$default-opposite} : gridMarginCalc();
84
- &:last-child { margin-#{$default-opposite} : 0; }
85
- }
86
-
87
- // If not collapse, add padding
88
- @if $collapse == false and $minify == false {
89
- padding-left : $column-padding;
90
- padding-right : $column-padding;
91
- }
92
-
93
- // If collapsed, remove padding and margin
94
- @if $collapse and $minify == false {
95
- padding-left : 0;
96
- padding-right : 0;
97
- margin-#{$default-opposite} : 0;
98
- }
99
-
100
- // If collapsed and no column-number given, remove margin between grid
101
- @if $collapse and $columns == false and $minify == true {
102
- margin-#{$default-opposite} : 0;
103
- }
104
-
105
- // If a column number is given, calculate width
106
- @if $columns {
107
- @if $minify == false { position : relative; }
108
- // If collapsed, recalculate the width
109
- @if $collapse {
110
- width : gridCalc($columns, $collapse: true);
111
- }
112
- // Else, reduce the width with the margin
113
- @else {
114
- width : gridCalc($columns) - gridMarginCalc();
115
-
116
- @if $minify == false {
117
- margin-#{$default-opposite} : gridMarginCalc();
118
-
119
- // If last-column specified explicitly
120
- @if $last-column {
121
- margin-#{$default-opposite} : 0;
122
- } @else {
123
- &:last-child { margin-#{$default-opposite} : 0; }
124
- }
125
- }
126
- }
127
- }
128
-
129
- // If offset, calculate appropriate margins
130
- @if $offset {
131
- margin-#{$default-float}: gridCalc($offset, $collapse:$collapse);
132
- }
133
-
134
- // Source Ordering, adds left/right depending on which you use.
135
- @if $push {
136
- @if $minify == false { position : relative; }
137
- #{$default-float} : gridCalc($push, $collapse: $collapse);
138
- #{$default-opposite} : auto;
139
- }
140
- @if $pull {
141
- @if $minify == false { position : relative; }
142
- #{$default-opposite} : gridCalc($pull, $collapse: $collapse);
143
- #{$default-float} : auto;
144
- }
145
- // If centered, get rid of float and add appropriate margins
146
- @if $center {
147
- margin-left : auto !important;
148
- margin-right : auto !important;
149
- float : none !important;
150
- }
151
- @if $float {
152
- @if $float == left or true {
153
- float : $default-float;
154
- } @else if $float == right {
155
- float : $default-opposite;
156
- } @else {
157
- float : none;
158
- }
159
- }
160
- }
161
-
162
- @if $include-grid {
163
-
164
- /* ---------------
165
- EDGE Grid
166
- --------------- */
167
-
168
- body {
169
- &.not-responsive {
170
- min-width : $row-width;
171
- }
172
- &.only-responsive-below-small {
173
- min-width : $row-width;
174
- @include small {
175
- min-width : 0;
176
- }
177
- }
178
- }
179
- // For `normal-row`
180
- .row {
181
- @include grid-row;
182
-
183
- .column,
184
- .columns {
185
- @include grid-column($columns: false, $minify: true);
186
-
187
- &.last { margin-#{$default-opposite} : 0 !important; }
188
- }
189
-
190
- // Width for `normal-row`
191
- @for $i from 1 through $total-columns {
192
- .large-#{$i} {
193
- @include grid-column($columns:$i, $collapse:null, $float:false, $minify: true );
194
- }
195
- }
196
-
197
- // For `collapsed-row`
198
- &.collapse {
199
- .column,
200
- .columns {
201
- @include grid-column($collapse: true);
202
- }
203
-
204
- // For `nested-row inside collapsed-row`, it's automatically collapsed
205
- .row {
206
- @include grid-row($behavior: nest-in-collapse, $minify: true);
207
-
208
- .column,
209
- .columns {
210
- @include grid-column($columns: false, $collapse: true, $minify: true);
211
- }
212
- }
213
-
214
- @for $i from 1 through $total-columns {
215
- .large-#{$i} {
216
- @include grid-column($columns:$i, $collapse:true, $float:false, $minify: true );
217
- }
218
- }
219
- }
220
-
221
- // For `nested-row`
222
- .row {
223
- @include grid-row($behavior: nest, $minify: true);
224
- }
225
-
226
- // Offset for large columns
227
- @for $i from 1 through $total-columns - 2 {
228
- .large-offset-#{$i} {
229
- @include grid-column($offset:$i, $collapse:null, $float:false );
230
- }
231
- }
232
- }
233
-
234
- .column.large-centered,
235
- .columns.large-centered {
236
- @include grid-column($center:true, $collapse:null, $float:false );
237
- }
238
-
239
- // Push and pull for large-columns
240
- @for $i from 2 through $total-columns - 2 {
241
- .row {
242
- .push-#{$i} {
243
- @include grid-column($push:$i, $collapse:false, $float:false, $minify:true ); }
244
- .pull-#{$i} {
245
- @include grid-column($pull:$i, $collapse:false, $float:false, $minify:true ); }
246
- &.collapse {
247
- .push-#{$i} {
248
- @include grid-column($push:$i, $collapse:true, $float:false, $minify:true ); }
249
- .pull-#{$i} {
250
- @include grid-column($pull:$i, $collapse:true, $float:false, $minify:true ); }
251
- }
252
- }
253
- }
254
-
255
- @include medium-up {
256
- @for $i from 2 through $total-columns - 2 {
257
- .small-push-#{$i} {
258
- left: inherit;
259
- }
260
- .small-pull-#{$i} {
261
- right: inherit;
262
- }
263
- }
264
- }
265
-
266
- @include small {
267
- // Set all `large` columns to 100%
268
- .row .column,
269
- .row .columns,
270
- .row.collapse .column,
271
- .row.collapse .columns {
272
- @include grid-column($columns: $total-columns, $minify: true);
273
-
274
- // Reset push and pull
275
- &[class*="push"], &[class*="pull"] {
276
- left : auto;
277
- right : auto;
278
- }
279
- }
280
-
281
- // Reset large-offset
282
- .row {
283
- [class*="large-offset"] {
284
- margin-left : 0;
285
- }
286
- }
287
-
288
- // Small columns
289
- @for $i from 1 through $total-columns {
290
- .row .small-#{$i} {
291
- @include grid-column($columns:$i, $collapse:null, $float:false, $minify: true );
292
- }
293
- }
294
-
295
- // Small offset
296
- @for $i from 1 through $total-columns - 2 {
297
- .row {
298
- .small-offset-#{$i}, &.collapse .small-offset-#{$i} {
299
- @include grid-column($offset:$i, $collapse:null, $float:false );
300
- }
301
- }
302
- }
303
- .column.small-centered,
304
- .columns.small-centered {
305
- @include grid-column($center:true, $collapse:null, $float:false );
306
- }
307
- }
308
-
309
- }
@@ -1,287 +0,0 @@
1
- // -----------------------------------------
2
- // GRID
3
- // Based on ZURB's Foundation 4
4
- // -----------------------------------------
5
-
6
- $row-max-width : 1140px !default;
7
- $total-columns : 12 !default;
8
- $column-distance : 20px !default;
9
-
10
- // Calculate percentages for grid
11
- @function gridCalc($colNumber, $totalColumns:$total-columns) {
12
- @return percentage($colNumber / $totalColumns);
13
- }
14
-
15
- // For creating container, nested, and collapsed rows.
16
- @mixin grid-row(
17
- $nest : false,
18
- $collapse : false,
19
- $for-base : false, // Prevent style repetition, only for internal use
20
- $max-width : $row-max-width,
21
- $distance : $column-distance ) {
22
-
23
- $max-width : $max-width + $distance; // to make up for the padding
24
- $distance : em($distance);
25
-
26
- // prevent duplicate for base CSS class
27
- @if $for-base == false {
28
- @include clearfix;
29
- }
30
-
31
- @if $nest and $collapse {
32
- width : auto;
33
- max-width : none;
34
- margin : 0;
35
- padding-#{$default-float} : 0;
36
- padding-#{$default-opposite} : 0;
37
- }
38
-
39
- @else if $nest {
40
- width : auto;
41
- max-width : none;
42
- margin-#{$default-float} : -($distance / 2);
43
- margin-#{$default-opposite} : -($distance / 2);
44
- }
45
-
46
- @else if $collapse {
47
- width : 100%;
48
- max-width : $max-width;
49
- margin : 0 auto;
50
- padding-#{$default-float} : $distance / 2;
51
- padding-#{$default-opposite} : $distance / 2;
52
- }
53
-
54
- // use @include grid-row; to use a container row
55
- @else {
56
- width : 100%;
57
- max-width : $max-width;
58
- margin : 0 auto;
59
- }
60
- }
61
-
62
- // For creating columns - @include these inside a media query to control small vs. large grid layouts
63
- @mixin grid-column(
64
- $columns : false,
65
- $last-column : false,
66
- $center : false,
67
- $offset : 0,
68
- $push : 0,
69
- $pull : 0,
70
- $collapse : false,
71
- $float : true,
72
- $form : false, // Create form-columns
73
- $for-base : false, // Prevent style repetition, only for internal use
74
- $distance : em($column-distance),
75
- $total-columns : $total-columns,
76
- $external : $external-call, // Mixin used from external file
77
- $small : false // For external use, apply CSS for small-grid
78
- ) {
79
-
80
- @if $for-base == false {
81
- position: relative;
82
- }
83
-
84
- // If collapsed, get rid of distance padding
85
- @if $collapse {
86
- // If not for form-column
87
- @if $form == false {
88
- padding-left : 0;
89
- padding-right : 0;
90
- }
91
- }
92
-
93
- // Set distance between padding whenever a column isn't set to collapse
94
- // Form-column can't have distance
95
- // (use $collapse:null to do nothing)
96
- @else if $collapse == false and $form == false {
97
- padding-left : $distance / 2;
98
- padding-right : $distance / 2;
99
- }
100
-
101
- // If a column number is given, calculate width
102
- @if $columns {
103
- width : gridCalc($columns, $total-columns);
104
-
105
- // If last column, float naturally instead of to the right
106
- @if $last-column {
107
- float: $default-opposite;
108
- }
109
- }
110
-
111
- // If offset, calculate appropriate margins
112
- @if $offset > 0 {
113
- margin-#{$default-float}: gridCalc($offset, $total-columns);
114
- }
115
-
116
- // Source Ordering, adds left/right depending on which you use.
117
- @if $push > 0 {
118
- #{$default-float} : gridCalc($push, $total-columns);
119
- #{$default-opposite} : auto;
120
- }
121
- @if $pull > 0 {
122
- #{$default-opposite} : gridCalc($pull, $total-columns);
123
- #{$default-float} : auto;
124
- }
125
-
126
- // If centered, get rid of float and add appropriate margins
127
- @if $center {
128
- margin-#{$default-float} : auto !important;
129
- margin-#{$default-opposite} : auto !important;
130
- float : none !important;
131
-
132
- // If for form-column, change display to `block`
133
- @if $form {
134
- display: block;
135
- }
136
- }
137
-
138
- @if $float {
139
- @if $float == left or $float == true {
140
- float: $default-float;
141
- }
142
- @else if $float == right {
143
- float: $default-opposite;
144
- }
145
- @else {
146
- float: none;
147
- }
148
- }
149
-
150
- // If used from external file and size is not small
151
- @if $external {
152
- @if $small == false {
153
- @include small {
154
- width : 100%;
155
- }
156
- }
157
- }
158
- }
159
-
160
- @if $include-grid {
161
-
162
- /* ---------------
163
- EDGE Grid
164
- --------------- */
165
-
166
- body {
167
- &.not-responsive {
168
- min-width: em($row-max-width + $column-distance);
169
- }
170
- &.only-responsive-below-small {
171
- min-width : $row-max-width;
172
- .row {
173
- min-width: em($row-max-width);
174
-
175
- // Nested row
176
- .row {
177
- min-width: 0;
178
- }
179
- }
180
-
181
- @include small {
182
- min-width : 0;
183
- .row {
184
- min-width: 0;
185
- }
186
- }
187
- }
188
- }
189
-
190
- // Normal row
191
- .row {
192
- @include grid-row;
193
-
194
- // Collapsed row
195
- &.collapse {
196
- @include grid-row($collapse:true);
197
- .column,
198
- .columns {
199
- @include grid-column($collapse:true);
200
- }
201
- }
202
-
203
- // Nested-collapsed row
204
- .row {
205
- @include grid-row($nest:true);
206
- &.collapse {
207
- @include grid-row($nest:true, $collapse:true);
208
- }
209
- }
210
- }
211
-
212
- // Normal column
213
- .column,
214
- .columns {
215
- @include grid-column($columns:$total-columns);
216
- }
217
-
218
-
219
- // Normal form-row
220
- .form-row {
221
- @include grid-row($collapse:true, $nest:true);
222
-
223
- .form-column,
224
- .form-columns {
225
- @include grid-column($collapse:true, $form:true);
226
- }
227
- }
228
-
229
- @for $i from 1 through $total-columns {
230
- .large#{-$i} { @include grid-column($columns:$i, $collapse:null, $float:false, $for-base:true); }
231
- }
232
-
233
- // Centered column
234
- .column.large-centered,
235
- .columns.large-centered {
236
- @include grid-column($center:true, $collapse:null, $float:false);
237
- }
238
-
239
- // Centered form-column
240
- .form-column.large-centered,
241
- .form-columns.large-centered {
242
- @include grid-column($center:true, $collapse:null, $float:false, $form:true);
243
- }
244
-
245
- // Source Ordering
246
- @include medium-up {
247
- @for $i from 1 through $total-columns - 1 {
248
- .large-offset-#{$i} {
249
- @include grid-column($offset:$i, $collapse:null, $float:false, $for-base:true);
250
- }
251
- .push#{-$i} {
252
- @include grid-column($push:$i, $collapse:null, $float:false, $for-base:true);
253
- }
254
- .pull#{-$i} {
255
- @include grid-column($pull:$i, $collapse:null, $float:false, $for-base:true);
256
- }
257
- }
258
- }
259
-
260
- // Small screen and below
261
- @include small {
262
-
263
- body:not(.not-responsive) {
264
- .column,
265
- .columns {
266
- @include grid-column($columns:$total-columns);
267
- }
268
- @for $i from 1 through $total-columns {
269
- .small#{-$i} {
270
- @include grid-column($columns:$i, $collapse:null, $float:false, $for-base:true);
271
- }
272
- }
273
- }
274
-
275
- @for $i from 0 through $total-columns - 2 {
276
- .small-offset-#{$i} {
277
- @include grid-column($offset:$i, $collapse:null, $float:false, $for-base:true);
278
- }
279
- }
280
-
281
- .column.small-centered,
282
- .columns.small-centered {
283
- @include grid-column($center:true, $collapse:null, $float:false);
284
- }
285
- }
286
-
287
- } // $include-grid
data/lib/edge/console.rb DELETED
@@ -1,15 +0,0 @@
1
- module Edge
2
- class Console
3
- def colorize(text, color_code)
4
- "\e[#{color_code}m#{text}\e[0m"
5
- end
6
-
7
- def red(text); colorize(text, 31); end
8
- def green(text); colorize(text, 32); end
9
- def yellow(text); colorize(text, 33); end
10
- def blue(text); colorize(text, 34); end
11
- def magenta(text); colorize(text, 35); end
12
- def cyan(text); colorize(text, 36); end
13
-
14
- end
15
- end