edge_framework 0.9.0 → 0.9.9

Sign up to get free protection for your applications and to get access to all the features.
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
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Welcome to Edge Framework
2
2
  ==========================
3
3
 
4
- Edge is a light-weight responsive SASS framework. It is built for developers that are working with dedicated designer. Edge offers non-intrusive and easily overriden style.
4
+ Edge is a unobtrusive Sass framework.
5
5
 
6
6
  It is based on [Foundation by ZURB](http://www.zurb.com).
7
7
 
@@ -10,30 +10,26 @@ Edge is MIT-licensed and absolutely free to use.
10
10
  Installation
11
11
  =============
12
12
 
13
- We distribute Edge using Rubygems, just type in the following commands on your `terminal`:
14
-
15
13
  gem install edge_framework
16
14
 
17
15
  Windows PC doesn't come with Ruby pre-installed, so you can follow [this Ruby installation guide](https://docs.google.com/document/d/155e-Dx4SnQj_bMrM24kI4_ZEmBp-TQ_tuinhMvZsIhM/edit?usp=sharing) we wrote. After you installed Ruby, type in the command above on `cmd` (command prompt).
18
16
 
19
- We assume that you know how to use Sass and Compass. If not, you can find a lot of decent tutorial on YouTube or other site.
20
-
21
- Template Generator
17
+ CLI - Template Generator
22
18
  ====================
23
19
 
24
20
  Edge can generate basic template for your project. Open `cmd` or `terminal` in your project directory and type in one of these commands:
25
21
 
26
- 1. Standard HTML
22
+ 1. Static HTML
27
23
 
28
- `edge create html <project_name>`
24
+ `edge create html`
29
25
 
30
26
  2. Standard PHP
31
27
 
32
- `edge create php <project_name>`
28
+ `edge create php`
33
29
 
34
30
  3. Wordpress
35
31
 
36
- `edge create wordpress <project_name>`
32
+ `edge create wordpress`
37
33
 
38
34
  4. Coming soon: Rails, Sinatra, Django, Flask
39
35
 
File without changes
@@ -16,19 +16,15 @@ $experimental-support-for-khtml : false;
16
16
 
17
17
  // -------------------------------------------------------
18
18
  // OUTPUT CONFIG
19
- // DEBUG:
20
- // Set to true for useful functionality during
21
- // development
22
- // RESPONSIVE:
23
- // Add responsiveness to the output
24
- // EXTERNAL CALL:
25
- // Add extra feature if calling Component's mixin exter-
26
- // -nally
27
- // INCLUDE:
28
- // Set to false if you want to import the mixins only
19
+ // Debug : if true - add useful functionality for development
20
+ // Responsive : add responsiveness to the output
21
+ // Vertical-rhythm : vertically-align all header, paragraph, and list
22
+ // External call : Add extra feature if calling Component's mixin externally
23
+ // Include : if false - no CSS output
29
24
  // -------------------------------------------------------
30
- $debug : false !default;
25
+ $debug : false !default;
31
26
  $responsive : true !default;
27
+ $vertical-rhythm : false !default;
32
28
 
33
29
  $external-call : false !default; // user shouldn't modify this
34
30
 
@@ -41,9 +37,10 @@ $include-visibility : true !default;
41
37
 
42
38
  $include-button : true !default;
43
39
  $include-form : true !default;
40
+ $include-animate : true !default;
44
41
 
45
42
  $include-print : false !default;
46
- $include-code : true !default;
43
+ $include-code : false !default;
47
44
 
48
45
  // ----------
49
46
  // COLOR
@@ -267,6 +264,15 @@ $retina-screen : 192dpi !default;
267
264
  user-select: none;
268
265
  }
269
266
 
267
+ @mixin user-select($value) {
268
+ -webkit-touch-callout: $value;
269
+ -webkit-user-select: $value;
270
+ -khtml-user-select: $value;
271
+ -moz-user-select: $value;
272
+ -ms-user-select: $value;
273
+ user-select: $value;
274
+ }
275
+
270
276
  // ---------------------
271
277
  // TEXT DIRECTION
272
278
  // ---------------------
@@ -288,14 +294,20 @@ $default-opposite : right !default;
288
294
  //
289
295
  // Don't specify the `height` to create equalateral triangle
290
296
  // ----------------------------------------------------------
291
- @mixin triangle($width, $direction:top, $color:$main-color, $height:false) {
297
+ @mixin triangle(
298
+ $width,
299
+ $direction : top,
300
+ $color : $main-color,
301
+ $height : false) {
292
302
  // If height is not specified, make the triangle equalateral
293
303
  @if not $height {
294
304
  // If normal triangle, `height` is set to half `width`
295
305
  @if $direction == top or
306
+ $direction == up or
296
307
  $direction == right or
297
308
  $direction == left or
298
- $direction == bottom {
309
+ $direction == bottom or
310
+ $direction == down {
299
311
  $height : ($width / 2) * 1.732;
300
312
  }
301
313
  // Else if cornered triangle, `heigth` is the same as `width`
@@ -306,14 +318,14 @@ $default-opposite : right !default;
306
318
  $height : $width;
307
319
  }
308
320
  }
309
- width : 0;
310
- height : 0;
311
- font-size : 0;
312
- line-height : 0%;
313
- border-style : solid;
314
- border-color : transparent;
321
+ width: 0;
322
+ height: 0;
323
+ font-size: 0;
324
+ line-height: 0%;
325
+ border-style: solid;
326
+ border-color: transparent;
315
327
  // Top /\
316
- @if $direction == top {
328
+ @if $direction == top or $direction == up {
317
329
  border-width : 0 $width/2 $height $width/2;
318
330
  border-bottom-color : $color;
319
331
  }
@@ -323,7 +335,7 @@ $default-opposite : right !default;
323
335
  border-left-color : $color;
324
336
  }
325
337
  // Bottom \/
326
- @else if $direction == bottom {
338
+ @else if $direction == bottom or $direction == down {
327
339
  border-width : $height $width/2 0 $width/2;
328
340
  border-top-color : $color;
329
341
  }
@@ -1,12 +1,13 @@
1
1
  @import "components/normalize";
2
-
3
- @import "components/button";
4
2
  @import "components/typography";
5
- @import "components/form";
6
3
 
7
4
  @import "components/grid";
8
5
  @import "components/tile";
9
-
10
6
  @import "components/visibility";
7
+
8
+ @import "components/button";
9
+ @import "components/form";
10
+ @import "components/animate";
11
+
11
12
  @import "components/print";
12
13
  @import "components/code";
@@ -1,19 +1,7 @@
1
1
  @import "helpers/sprites";
2
2
  @import "helpers/sticky-footer";
3
3
 
4
- // Disable the output, because we only want to enable the mixin
5
- $include-grid : false;
6
- $include-tile : false;
7
- $include-visibility : false;
8
-
9
- $include-button : false;
10
- $include-form : false;
11
- $include-typography : false;
12
-
13
- $include-normalize : false;
14
- $include-print : false;
15
- $include-code : false;
16
-
17
- $external-call : true; // add extra feature to some Component's mixin
4
+ $disable-output : true;
5
+ $external-call : true; // add extra feature to some Component's mixin
18
6
 
19
7
  @import "components";
@@ -0,0 +1,151 @@
1
+ // ===============
2
+ // EDGE ANIMATE
3
+ // ===============
4
+ // Based on animate.css [http://daneden.me/animate]
5
+ // Copyright (c) 2013 Daniel Eden
6
+
7
+ // -----------
8
+ // KEYFRAMES
9
+ // Create keyframe animation
10
+ // ----------------------------
11
+ @mixin keyframes($name) {
12
+ @-webkit-keyframes #{$name} {
13
+ @content;
14
+ }
15
+ @keyframes #{$name} {
16
+ @content;
17
+ }
18
+ }
19
+
20
+ // ------------------------
21
+ // ANIMATION NAME
22
+ // Assign the animation
23
+ // ------------------------
24
+ @mixin animation-name($name) {
25
+ -webkit-animation-name: $name;
26
+ animation-name: $name;
27
+ }
28
+
29
+
30
+ // -----------------------------------
31
+ // ANIMATE
32
+ // Pair the animation and keyframes
33
+ // -----------------------------------
34
+ @mixin animate($name) {
35
+ .animated.#{$name} {
36
+ @include animation-name($name);
37
+ }
38
+ @include keyframes($name) {
39
+ @content;
40
+ }
41
+ }
42
+
43
+ @if $include-animate and not $external-call {
44
+ /* ---------------
45
+ EDGE Animate
46
+ --------------- */
47
+
48
+ [data-animate] {
49
+ visibility: hidden !important;
50
+ }
51
+
52
+ .animated {
53
+ visibility: visible !important;
54
+
55
+ -webkit-animation-duration: 1s;
56
+ animation-duration: 1s;
57
+ -webkit-animation-fill-mode: both;
58
+ animation-fill-mode: both;
59
+ }
60
+
61
+ // FADEIN
62
+
63
+ @include animate(fadein) {
64
+ 0% {
65
+ opacity: 0;
66
+ }
67
+
68
+ 100% {
69
+ opacity: 1;
70
+ }
71
+ }
72
+
73
+ @include animate(fadein-down) {
74
+ opacity: 0;
75
+ @include translateY(-20px);
76
+ }
77
+
78
+ @include animate(fadein-down-big) {
79
+ 0% {
80
+ opacity: 0;
81
+ @include translateY(-2000px);
82
+ }
83
+
84
+ 100% {
85
+ opacity: 1;
86
+ @include translateY(0);
87
+ }
88
+ }
89
+
90
+ @include animate(fadein-up) {
91
+ 0% {
92
+ opacity: 0;
93
+ @include translateY(-2000px);
94
+ }
95
+
96
+ 100% {
97
+ opacity: 1;
98
+ @include translateY(0);
99
+ }
100
+ }
101
+
102
+ @include animate(fadein-left) {
103
+ 0% {
104
+ opacity: 0;
105
+ @include translateX(-20px);
106
+ }
107
+
108
+ 100% {
109
+ opacity: 1;
110
+ @include translateX(0);
111
+ }
112
+ }
113
+
114
+ @include animate(fadein-left-big) {
115
+ 0% {
116
+ opacity: 0;
117
+ @include translateX(-2000px);
118
+ }
119
+
120
+ 100% {
121
+ opacity: 1;
122
+ @include translateX(0);
123
+ }
124
+ }
125
+
126
+ @include animate(fadein-right) {
127
+ 0% {
128
+ opacity: 0;
129
+ @include translateX(20px);
130
+ }
131
+
132
+ 100% {
133
+ opacity: 1;
134
+ @include translateX(0);
135
+ }
136
+ }
137
+
138
+ @include animate(fadein-right-big) {
139
+ 0% {
140
+ opacity: 0;
141
+ @include translateX(2000px);
142
+ }
143
+
144
+ 100% {
145
+ opacity: 1;
146
+ @include translateX(0);
147
+ }
148
+ }
149
+
150
+
151
+ } // include
@@ -1,50 +1,107 @@
1
- $button-padding : em(10px 20px);
2
-
3
- @mixin button($bg-color:$main-color, $for-base:false) {
4
- // Button Shadow
5
- $shadow-base : 0 1px 0 darken($bg-color, 20%);
6
- $shadow-hover : inset 1px 1px 5em rgba(black, 0.2);
7
-
8
- background : $bg-color;
9
- color : contrast-color($bg-color, #333, white, 70%);
10
- border : none;
11
-
12
- $shadow-base : 0 1px 0 darken($bg-color, 20%);
13
- @include box-shadow($shadow-base );
14
-
15
- @if $for-base {
16
- display : inline-block;
17
- position : relative;
18
- cursor : pointer;
19
- padding : $button-padding;
20
-
21
- &:hover {
22
- // background: darken($bg-color, 10%);
23
- @include box-shadow($shadow-base, $shadow-hover );
24
- }
25
-
26
- &:active {
27
- top: 1px;
28
- border: none;
29
- @include box-shadow($shadow-hover );
30
- }
31
- &:focus {
32
- outline: none;
33
- }
34
- }
1
+ // =============
2
+ // EDGE BUTTON
3
+ // =============
4
+
5
+ $button-full-style: true !default;
6
+ $button-color: $main-color !default;
7
+ $button-padding: 10px 20px !default;
8
+
9
+ // ------------------------------
10
+ // BUTTON Hover State
11
+ // - Button styling for :hover
12
+ // ------------------------------
13
+ @mixin h-button-hover($color, $full: $button-full-style) {
14
+
15
+ &:hover {
16
+ // Darken background if background is light
17
+ @if contrast-color($color, is_light, is_dark, 70%) == is_light {
18
+ background-color: darken($color, 7.5%);
19
+ }
20
+ // Lighten background if background is dark
21
+ @else {
22
+ background-color: lighten($color, 7.5%);
23
+ }
24
+ }
25
+ }
26
+
27
+ // ------------------------------
28
+ // BUTTON Active State
29
+ // - Button styling for :active
30
+ // ------------------------------
31
+ @mixin h-button-active(
32
+ $color,
33
+ $full : $button-full-style,
34
+ $for-base : false) {
35
+
36
+ &:active {
37
+ // Make it darker than hover state if background is light
38
+ @if contrast-color($color, is_light, is_dark, 70%) == is_light {
39
+ background-color: darken($color, 15%);
40
+ }
41
+ // Darken background if background is dark
42
+ @else {
43
+ background-color: darken($color, 7.5%);
44
+ }
45
+
46
+ @if $full and $for-base {
47
+ @include box-shadow(inset 1px 1px rgba(black, .1) );
48
+ }
49
+ }
50
+ }
51
+
52
+ // ------------------------------
53
+ // BUTTON Focus State
54
+ // Button styling for :focus
55
+ // ------------------------------
56
+ @mixin h-button-focus($for-base: false) {
57
+
58
+ @if $for-base {
59
+ &:focus {
60
+ outline: none;
61
+ }
62
+ }
63
+ }
64
+
65
+ // -----------------
66
+ // BUTTON
67
+ // Create button
68
+ // -----------------
69
+ @mixin button(
70
+ $color : $button-color,
71
+ $padding : $button-padding,
72
+ $full : $button-full-style,
73
+ $for-base : false) {
74
+
75
+ @if $for-base {
76
+ display: inline-block;
77
+ cursor: pointer;
78
+ position: relative;
79
+ border: 1px solid rgba(black, .3);
80
+ }
81
+
82
+ background-color: $color;
83
+ padding: $padding;
84
+ color: contrast-color($color, $body-font-color, white, 70%);
85
+
86
+ @if $full and $for-base {
87
+ @include background-image(linear-gradient(top, rgba(white, .1), transparent ) );
88
+ @include transition($g-transition);
89
+ @include box-shadow(inset 1px 1px rgba(white, .1) );
90
+ }
91
+
92
+ @include h-button-hover($color:$color);
93
+ @include h-button-active($color:$color, $for-base:$for-base);
94
+ @include h-button-focus($for-base:$for-base);
35
95
  }
36
96
 
37
- @if $include-button {
38
-
97
+ @if $include-button and not $external-call {
98
+
39
99
  /* ---------------
40
100
  EDGE Button
41
101
  --------------- */
42
102
  button,
43
- .button,
44
- input[type="button"],
45
- input[type="submit"],
46
- input[type="reset"] {
47
- @include button($for-base:true);
103
+ .button {
104
+ @include button($for-base:true);
48
105
  }
49
106
 
50
107
  } // $include-button