edge_framework 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +8 -8
  2. data/README.md +16 -2
  3. data/assets/kitchensink.html +8 -9
  4. data/assets/sass/_edge.scss +3 -2
  5. data/assets/sass/_edgemail.scss +1 -1
  6. data/assets/sass/edge/_base.scss +71 -280
  7. data/assets/sass/edge/_component.scss +12 -0
  8. data/assets/sass/edge/_helpers.scss +1 -7
  9. data/assets/sass/edge/_user.scss +5 -0
  10. data/assets/sass/edge/_utility.scss +7 -0
  11. data/assets/sass/edge/{components → component}/_animate.scss +0 -0
  12. data/assets/sass/edge/{components → component}/_button.scss +0 -0
  13. data/assets/sass/edge/{components → component}/_code.scss +0 -0
  14. data/assets/sass/edge/{components → component}/_form.scss +0 -0
  15. data/assets/sass/edge/{components → component}/_grid.scss +26 -34
  16. data/assets/sass/edge/{components → component}/_normalize.scss +0 -11
  17. data/assets/sass/edge/{components → component}/_print.scss +26 -12
  18. data/assets/sass/edge/{components → component}/_tile.scss +6 -6
  19. data/assets/sass/edge/component/_typography.scss +98 -0
  20. data/assets/sass/edge/utility/_em.scss +35 -0
  21. data/assets/sass/edge/utility/_media.scss +70 -0
  22. data/assets/sass/edge/utility/_other.scss +44 -0
  23. data/assets/sass/edge/{helpers → utility}/_sprites.scss +3 -3
  24. data/assets/sass/edge/{helpers → utility}/_sticky-footer.scss +0 -0
  25. data/assets/sass/edge/utility/_triangle.scss +83 -0
  26. data/assets/sass/edgemail/_base.scss +5 -5
  27. data/assets/sass/edgemail/_component.scss +2 -0
  28. data/assets/sass/edgemail/{_helpers.scss → _user.scss} +0 -0
  29. data/assets/sass/edgemail/{components → component}/_generic.scss +0 -0
  30. data/assets/sass/edgemail/{components → component}/_normalize.scss +0 -0
  31. data/assets/test/kitchensink-email.scss +1 -1
  32. data/assets/test/kitchensink.scss +1 -2
  33. data/lib/edge/message.rb +17 -7
  34. data/lib/edge/version.rb +1 -1
  35. data/template/base/assets/js/vendor/edge.js +1 -1
  36. data/template/base/assets/sass/_setting.scss +19 -17
  37. data/template/base/assets/sass/app.scss +1 -1
  38. data/template/base/config.rb +1 -1
  39. data/template/email/assets/sass/app.scss +1 -1
  40. data/template/wordpress/views/layout.twig +1 -0
  41. metadata +24 -18
  42. data/assets/sass/edge/_components.scss +0 -12
  43. data/assets/sass/edge/components/_typography.scss +0 -171
  44. data/assets/sass/edgemail/_components.scss +0 -2
@@ -0,0 +1,44 @@
1
+ // ----------------------------------------------
2
+ // CLEARING FLOAT
3
+ // Make a container wraps floated element
4
+ // ----------------------------------------------
5
+ @mixin clearfix {
6
+ &::before, &::after {
7
+ content: " ";
8
+ display: table;
9
+ }
10
+ &::after {
11
+ clear: both;
12
+ }
13
+ }
14
+
15
+ // --------------------------------
16
+ // SELECTION
17
+ // Change the text highlight color
18
+ // --------------------------------
19
+
20
+ @mixin selection($background-color:lighten($main-color, 35%), $color:white) {
21
+ ::-moz-selection {
22
+ background: $background-color;
23
+ text-shadow: none !important;
24
+ color: $color !important;
25
+ }
26
+
27
+ ::selection {
28
+ background: $background-color;
29
+ text-shadow: none !important;
30
+ color: $color !important;
31
+ }
32
+ }
33
+
34
+ // -------------------------------
35
+ // DISABLE SELECTION
36
+ // Prevents highlighting
37
+ // -------------------------------
38
+
39
+ @mixin user-select($value) {
40
+ -webkit-touch-callout: $value;
41
+ -webkit-user-select: $value;
42
+ -moz-user-select: $value;
43
+ user-select: $value;
44
+ }
@@ -12,7 +12,7 @@
12
12
  // --------------------------
13
13
  // Loop through sprite-map
14
14
  // --------------------------
15
- @mixin loop-sprite-map(
15
+ @mixin _loop-sprite(
16
16
  $map,
17
17
  $is-retina : false ,
18
18
  $prefix : "") {
@@ -58,7 +58,7 @@
58
58
  .#{$class} {
59
59
  background: $sprites;
60
60
  display: inline-block;
61
- @include loop-sprite-map($sprites, false, $prefix);
61
+ @include _loop-sprite($sprites, false, $prefix);
62
62
 
63
63
  @content; // placeholder for retina sprites
64
64
  }
@@ -88,7 +88,7 @@
88
88
  }
89
89
  // If there's missing images in retina folder
90
90
  @else {
91
- @include loop-sprite-map($sprites-2x, true, $prefix);
91
+ @include _loop-sprite($sprites-2x, true, $prefix);
92
92
  }
93
93
  }
94
94
  }
@@ -0,0 +1,83 @@
1
+
2
+ // -------------
3
+ // TRIANGLE
4
+ // -------------
5
+ @mixin triangle(
6
+ $width,
7
+ $direction : top,
8
+ $color : $main-color,
9
+ $height : false) {
10
+ // If height is not specified, make the triangle equalateral
11
+ @if not $height {
12
+ // If normal triangle, `height` must follow the formula
13
+ @if $direction == top or
14
+ $direction == up or
15
+ $direction == right or
16
+ $direction == left or
17
+ $direction == bottom or
18
+ $direction == down {
19
+ $height : ($width / 2) * 1.732;
20
+ }
21
+ // Else if cornered triangle, `heigth` is the same as `width`
22
+ @else if $direction == top-right or
23
+ $direction == top-left or
24
+ $direction == bottom-right or
25
+ $direction == bottom-left {
26
+ $height : $width;
27
+ }
28
+ }
29
+ width: 0;
30
+ height: 0;
31
+ font-size: 0;
32
+ line-height: 0%;
33
+ border-style: solid;
34
+ border-color: transparent;
35
+ // Top /\
36
+ @if $direction == top or $direction == up {
37
+ border-width : 0 $width/2 $height $width/2;
38
+ border-bottom-color : $color;
39
+ }
40
+ // Right |>
41
+ @else if $direction == right {
42
+ border-width : $width/2 0 $width/2 $height;
43
+ border-left-color : $color;
44
+ }
45
+ // Bottom \/
46
+ @else if $direction == bottom or $direction == down {
47
+ border-width : $height $width/2 0 $width/2;
48
+ border-top-color : $color;
49
+ }
50
+ // Left <|
51
+ @else if $direction == left {
52
+ border-width : $width/2 $height $width/2 0;
53
+ border-right-color : $color;
54
+ }
55
+
56
+ // __
57
+ // Top-right \ |
58
+ // \|
59
+ @else if $direction == top-right {
60
+ border-width : 0 $width $height 0;
61
+ border-right-color : $color;
62
+ }
63
+
64
+ // Bottom-right /|
65
+ // /_|
66
+ @else if $direction == bottom-right {
67
+ border-width : 0 0 $height $width;
68
+ border-bottom-color : $color;
69
+ }
70
+ // Bottom-left |\
71
+ // |_\
72
+ @else if $direction == bottom-left {
73
+ border-width : $height 0 0 $width;
74
+ border-left-color : $color;
75
+ }
76
+ // __
77
+ // Top-left | /
78
+ // |/
79
+ @else if $direction == top-left {
80
+ border-width : $height $width 0 0;
81
+ border-top-color : $color;
82
+ }
83
+ }
@@ -13,7 +13,7 @@ $link-color : $main-color !default;
13
13
 
14
14
  // SIZING
15
15
  $row-max-width : 650px !default;
16
- $mini-screen : 480px !default;
16
+ $mini-size : 480px !default;
17
17
 
18
18
  // BODY
19
19
  $body-background : #ffffff !default;
@@ -24,10 +24,10 @@ $body-line-height : 1.5 !default;
24
24
 
25
25
  // TYPOGRAPHY
26
26
  $h1-font-size : 44px !default;
27
- $h2-font-size : 36px !default;
28
- $h3-font-size : 28px !default;
29
- $h4-font-size : 22px !default;
30
- $h5-font-size : 18px !default;
27
+ $h2-font-size : 38px !default;
28
+ $h3-font-size : 30px !default;
29
+ $h4-font-size : 24px !default;
30
+ $h5-font-size : 20px !default;
31
31
  $h6-font-size : 16px !default;
32
32
 
33
33
  $header-font-color : $body-font-color !default;
@@ -0,0 +1,2 @@
1
+ @import "component/normalize";
2
+ @import "component/generic";
File without changes
@@ -1,2 +1,2 @@
1
1
  @import "../sass/edgemail/base";
2
- @import "../sass/edgemail/helpers";
2
+ @import "../sass/edgemail/user";
@@ -1,5 +1,4 @@
1
- @import "../sass/edge/base";
2
- @import "../sass/edge/helpers";
1
+ @import "../sass/edge/user";
3
2
 
4
3
  .custom-grid {
5
4
  @include column(3);
data/lib/edge/message.rb CHANGED
@@ -4,23 +4,33 @@ module Edge
4
4
 
5
5
  available_template =
6
6
  %Q{Currently these are the available templates:
7
- html - Static HTML template
8
- php - Standard PHP template}
7
+ html - Static HTML
8
+ wordpress - Plain WordPress theme with Timber
9
+ ghost - Plain Ghost theme}
9
10
 
10
11
  syntax_create =
11
- %Q{edge create <project_type>}
12
+ %Q{> edge create <template>}
12
13
 
13
14
  help =
14
15
  %Q{--------------------------------------------------------
15
- Welcome to Edge Framework v-#{ Edge::VERSION } (#{ Edge::CODENAME })
16
+ Welcome to Edge Framework v#{ Edge::VERSION } (#{ Edge::CODENAME })
16
17
  --------------------------------------------------------
17
- Creating Template
18
- #{ syntax_create } }
18
+
19
+ List of available commands:
20
+
21
+ 1. Create Template
22
+ #{ syntax_create }
23
+
24
+ #{ available_template }
25
+
26
+ 2. Rails Template Generator
27
+ Run this command inside your Rails' directory:
28
+ > rails g edge:install }
19
29
 
20
30
  create_wrong_syntax =
21
31
  %Q{WRONG SYNTAX
22
32
  The correct syntax is:
23
- #{ syntax_create } }
33
+ #{ syntax_create } }
24
34
 
25
35
  MESSAGES = {
26
36
  :available_template => available_template,
data/lib/edge/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Edge
2
- VERSION = "2.0.0"
2
+ VERSION = "2.1.0"
3
3
  CODENAME = "Gondar"
4
4
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  var edgeFramework = {
7
7
  init: function() {
8
- webComponent();
8
+ this.webComponent();
9
9
  },
10
10
  webComponent: function() {
11
11
  if("registerElement" in document) {
@@ -19,22 +19,18 @@ $sub-color : #d7d7d7;
19
19
  // -------------------
20
20
  // MEDIA QUERIES
21
21
  // -------------------
22
- // $mini-screen : 480px;
23
- // $small-screen : 767px;
24
- // $medium-screen : 1120px;
25
- // $large-screen : 1440px;
26
- // $retina-screen : 192dpi;
22
+ // $mini-size : 480px;
23
+ // $small-size : 767px;
24
+ // $medium-size : 1120px;
25
+ // $large-size : 1440px;
26
+ // $retina-size : 192dpi;
27
27
 
28
28
  // ----------------
29
- // OUTPUT CONFIG
29
+ // RESPONSIVE
30
30
  // ----------------
31
31
  // $responsive : true;
32
32
  // $adaptive : false;
33
- // $adaptive-breakpoints : $medium-screen, $small-screen;
34
-
35
- // $include-animate : false;
36
- // $include-print : false;
37
- // $include-code : false;
33
+ // $adaptive-breakpoints : $medium-size, $small-size, $mini-size;
38
34
 
39
35
  // ---------------
40
36
  // GLOBAL VALUE
@@ -45,7 +41,7 @@ $sub-color : #d7d7d7;
45
41
  // --------
46
42
  // GRID
47
43
  // --------
48
- // $row-max-width : $medium-screen;
44
+ // $row-max-width : $medium-size;
49
45
  // $total-columns : 12;
50
46
  // $column-gutter : 20px;
51
47
 
@@ -69,17 +65,23 @@ $sub-color : #d7d7d7;
69
65
  // TYPOGRAPHY
70
66
  // ---------------
71
67
  // $h1-font-size : 44px;
72
- // $h2-font-size : 36px;
73
- // $h3-font-size : 28px;
74
- // $h4-font-size : 22px;
75
- // $h5-font-size : 18px;
68
+ // $h2-font-size : 38px;
69
+ // $h3-font-size : 30px;
70
+ // $h4-font-size : 24px;
71
+ // $h5-font-size : 20px;
76
72
  // $h6-font-size : 16px;
77
73
 
78
74
  // $header-font-color : $body-font-color;
79
75
  // $header-font-weight : 700;
80
76
  // $header-line-height : 1;
81
77
 
78
+ // ---------
79
+ // PRINT
80
+ // ---------
81
+ // $include-print : false;
82
+ // $override-color : true; // Override all text color to #000 black
83
+
82
84
  // ------------------
83
85
  // TEXT DIRECTION
84
86
  // ------------------
85
- // $text-direction : ltr; // Controls default global text direction, 'rtl' or 'ltr'
87
+ // $text-direction : ltr; // Global text direction, 'rtl' or 'ltr'
@@ -1,4 +1,4 @@
1
1
  @import "setting";
2
- @import "edge/helpers";
2
+ @import "edge/user";
3
3
 
4
4
  // Your app-specific style here
@@ -1,4 +1,4 @@
1
- gem "edge_framework", "~> 2.0"
1
+ gem "edge_framework", "~> 2.1"
2
2
  require "edge_framework"
3
3
 
4
4
  http_path = "/"
@@ -1,4 +1,4 @@
1
1
  @import "setting";
2
- @import "edgemail/helpers";
2
+ @import "edgemail/user";
3
3
 
4
4
  // Your app-specific style here
@@ -11,6 +11,7 @@
11
11
  <nav class="main-menu">
12
12
  {% for item in menu.get_items %}
13
13
  <div class="item">
14
+
14
15
  <a href="{{ item.get_link }}"
15
16
  {% if "current-menu-item" in item.classes %}
16
17
  class="active"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edge_framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henner Setyono
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-19 00:00:00.000000000 Z
11
+ date: 2015-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass
@@ -116,24 +116,30 @@ files:
116
116
  - assets/sass/_edge.scss
117
117
  - assets/sass/_edgemail.scss
118
118
  - assets/sass/edge/_base.scss
119
- - assets/sass/edge/_components.scss
119
+ - assets/sass/edge/_component.scss
120
120
  - assets/sass/edge/_helpers.scss
121
- - assets/sass/edge/components/_animate.scss
122
- - assets/sass/edge/components/_button.scss
123
- - assets/sass/edge/components/_code.scss
124
- - assets/sass/edge/components/_form.scss
125
- - assets/sass/edge/components/_grid.scss
126
- - assets/sass/edge/components/_normalize.scss
127
- - assets/sass/edge/components/_print.scss
128
- - assets/sass/edge/components/_tile.scss
129
- - assets/sass/edge/components/_typography.scss
130
- - assets/sass/edge/helpers/_sprites.scss
131
- - assets/sass/edge/helpers/_sticky-footer.scss
121
+ - assets/sass/edge/_user.scss
122
+ - assets/sass/edge/_utility.scss
123
+ - assets/sass/edge/component/_animate.scss
124
+ - assets/sass/edge/component/_button.scss
125
+ - assets/sass/edge/component/_code.scss
126
+ - assets/sass/edge/component/_form.scss
127
+ - assets/sass/edge/component/_grid.scss
128
+ - assets/sass/edge/component/_normalize.scss
129
+ - assets/sass/edge/component/_print.scss
130
+ - assets/sass/edge/component/_tile.scss
131
+ - assets/sass/edge/component/_typography.scss
132
+ - assets/sass/edge/utility/_em.scss
133
+ - assets/sass/edge/utility/_media.scss
134
+ - assets/sass/edge/utility/_other.scss
135
+ - assets/sass/edge/utility/_sprites.scss
136
+ - assets/sass/edge/utility/_sticky-footer.scss
137
+ - assets/sass/edge/utility/_triangle.scss
132
138
  - assets/sass/edgemail/_base.scss
133
- - assets/sass/edgemail/_components.scss
134
- - assets/sass/edgemail/_helpers.scss
135
- - assets/sass/edgemail/components/_generic.scss
136
- - assets/sass/edgemail/components/_normalize.scss
139
+ - assets/sass/edgemail/_component.scss
140
+ - assets/sass/edgemail/_user.scss
141
+ - assets/sass/edgemail/component/_generic.scss
142
+ - assets/sass/edgemail/component/_normalize.scss
137
143
  - assets/test/edge.scss
138
144
  - assets/test/edgemail.scss
139
145
  - assets/test/kitchensink-email.scss
@@ -1,12 +0,0 @@
1
- @import "components/normalize";
2
- @import "components/typography";
3
-
4
- @import "components/grid";
5
- @import "components/tile";
6
-
7
- @import "components/button";
8
- @import "components/form";
9
- @import "components/animate";
10
-
11
- @import "components/print";
12
- @import "components/code";
@@ -1,171 +0,0 @@
1
- // ==================
2
- // EDGE TYPOGRAPHY
3
- // ==================
4
-
5
- // BODY
6
- $body-background : #fff !default;
7
- $body-font-color : #222 !default;
8
- $body-font-weight : 400 !default;
9
-
10
- // Compass' VERTICAL RHYTM
11
- // note: variable for $body-font-size and $body-line-height is in _base.scss due to it being used in em conversion
12
- $base-font-size : $body-font-size;
13
- $base-line-height : $body-line-height;
14
-
15
- // FONT FAMILY
16
- $header-font-family : Helvetica, Arial, "sans-serif" !default;
17
- $body-font-family : Helvetica, Arial, "sans-serif" !default;
18
-
19
- // HEADER
20
- $h1-font-size : 44px !default;
21
- $h2-font-size : 36px !default;
22
- $h3-font-size : 28px !default;
23
- $h4-font-size : 22px !default;
24
- $h5-font-size : 18px !default;
25
- $h6-font-size : 16px !default;
26
-
27
- $header-font-color : $body-font-color !default;
28
- $header-font-weight : 700 !default;
29
- $header-line-height : 1 !default;
30
-
31
- // LIST
32
- $ul-parent-style : disc !default;
33
- $ul-child-style : circle !default;
34
-
35
- $ol-parent-style : decimal !default;
36
- $ol-child-style : lower-alpha !default;
37
-
38
- // ------------------------------------------------
39
- // VERTICAL RHYTHM
40
- // - Apply vertically-aligned paragraph and header
41
- // ------------------------------------------------
42
- @mixin vertical-rhythm(
43
- $font-size : $base-font-size,
44
- $line-height : $base-line-height,
45
- $for-base : false) {
46
-
47
- $base-font-size : $font-size;
48
- $base-line-height : $font-size * $line-height;
49
-
50
- @if not $for-base {
51
- font-size: em($font-size);
52
- line-height: $line-height;
53
- }
54
-
55
- h1 { @include adjust-font-size-to($h1-font-size); }
56
- h2 { @include adjust-font-size-to($h2-font-size); }
57
- h3 { @include adjust-font-size-to($h3-font-size); }
58
- h4 { @include adjust-font-size-to($h4-font-size); }
59
- h5 { @include adjust-font-size-to($h5-font-size); }
60
- h6 { @include adjust-font-size-to($h6-font-size); }
61
-
62
- p {
63
- @include trailer(1);
64
-
65
- &:last-child {
66
- @include trailer(0);
67
- }
68
- }
69
-
70
- ul,
71
- ol {
72
- @include trailer(1);
73
- }
74
- }
75
-
76
- // ------------------------------
77
- // BASELINE
78
- // - Create notebook-like row
79
- // ------------------------------
80
- @mixin baseline(
81
- $font-size : $base-font-size,
82
- $line-height : $base-line-height) {
83
-
84
- @include background(
85
- linear-gradient(to bottom, rgba(black, 0) 95%, rgba(black, .1) 100%)
86
- );
87
- background-size: 100% em($font-size * $line-height, $font-size);
88
- }
89
-
90
- // ----------------------
91
- // Create Inline List
92
- // ----------------------
93
- @mixin inline-list() {
94
- @include clearfix();
95
-
96
- > li {
97
- display: inline-block;
98
- float: left;
99
- vertical-align: top;
100
- }
101
- }
102
-
103
- @if $include-typography and not $user-mode {
104
-
105
- /* -----------------
106
- EDGE Typography
107
- ----------------- */
108
-
109
- body {
110
- position: relative;
111
- background: $body-background;
112
- font-size: $base-font-size;
113
- font-family: $body-font-family;
114
- font-weight: $body-font-weight;
115
- line-height: $base-line-height;
116
- color: $body-font-color;
117
- }
118
-
119
- h1, h2, h3, h4, h5, h6 {
120
- color: $header-font-color;
121
- font-family: $header-font-family;
122
- font-weight: $header-font-weight;
123
- line-height: $header-line-height;
124
- }
125
-
126
- a {
127
- color: $link-color;
128
- }
129
-
130
- h1 { font-size: em($h1-font-size); }
131
- h2 { font-size: em($h2-font-size); }
132
- h3 { font-size: em($h3-font-size); }
133
- h4 { font-size: em($h4-font-size); }
134
- h5 { font-size: em($h5-font-size); }
135
- h6 { font-size: em($h6-font-size); }
136
-
137
- p {
138
- margin-top: 0;
139
- margin-bottom: 0;
140
- }
141
-
142
- // -----------
143
- // LIST
144
- // -----------
145
-
146
- ul {
147
- list-style-type: $ul-parent-style;
148
- padding-left: 20px;
149
-
150
- ul {
151
- list-style-type: $ul-child-style;
152
- }
153
- }
154
-
155
- ol {
156
- list-style-type: $ol-parent-style;
157
- padding-left: 25px;
158
-
159
- ol {
160
- list-style-type: $ol-child-style;
161
- }
162
- }
163
-
164
- blockquote {
165
- cite {
166
- display: block;
167
- font-style: italic;
168
- }
169
- }
170
-
171
- } // include-typography