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.
- data/README.md +6 -10
- data/assets/js/edge/edge.animate.js +0 -0
- data/assets/sass/edge/_base.scss +34 -22
- data/assets/sass/edge/_components.scss +5 -4
- data/assets/sass/edge/_helpers.scss +2 -14
- data/assets/sass/edge/components/_animate.scss +151 -0
- data/assets/sass/edge/components/_button.scss +98 -41
- data/assets/sass/edge/components/_code.scss +170 -166
- data/assets/sass/edge/components/_form.scss +77 -76
- data/assets/sass/edge/components/_grid.scss +15 -12
- data/assets/sass/edge/components/_normalize.scss +60 -59
- data/assets/sass/edge/components/_print.scss +73 -70
- data/assets/sass/edge/components/_tile.scss +24 -10
- data/assets/sass/edge/components/_typography.scss +127 -138
- data/assets/sass/edge/components/_visibility.scss +156 -44
- data/assets/sass/edge/helpers/_sprites.scss +75 -63
- data/assets/sass/edge/helpers/_sticky-footer.scss +26 -31
- data/assets/sass/edge.scss +1 -1
- data/assets/sass/for-test.scss +247 -151
- data/assets/test.html +323 -11
- data/edge.gemspec +17 -18
- data/lib/edge/engine.rb +19 -0
- data/lib/edge/message.rb +32 -29
- data/lib/edge/sprockets.rb +4 -0
- data/lib/edge/version.rb +2 -2
- data/lib/edge_framework.rb +63 -67
- data/template/base/assets/js/app.js +1 -1
- data/template/base/assets/sass/_setting.scss +35 -35
- data/template/base/config.rb +1 -1
- data/template/html/index.html +3 -3
- data/template/php/partials/footer.php +2 -2
- data/template/wordpress/footer.php +2 -3
- metadata +8 -24
- data/assets/sass/edge/components/_block-grid-margin.scss +0 -112
- data/assets/sass/edge/components/_grid-margin.scss +0 -309
- data/assets/sass/edge/components/_grid-old.scss +0 -287
- data/lib/edge/console.rb +0 -15
data/lib/edge_framework.rb
CHANGED
@@ -1,86 +1,82 @@
|
|
1
1
|
root = File.join(File.dirname(__FILE__), "..")
|
2
|
-
|
3
|
-
require "win32console" # Command line color for Windows
|
2
|
+
|
4
3
|
require "fileutils" # Copy files
|
5
4
|
|
6
5
|
module Edge
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
require "edge/message"
|
7
|
+
|
8
|
+
@message = Edge::Message.new
|
10
9
|
|
11
|
-
|
10
|
+
def self.message(key)
|
11
|
+
return @message.get_message(key);
|
12
|
+
end
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
# Create project
|
15
|
+
def self.create(type, name)
|
16
|
+
# If name is specified, create new directory
|
17
|
+
if name
|
18
|
+
FileUtils.mkdir( name )
|
19
|
+
destination = File.join( Dir.pwd, name )
|
20
|
+
# If type is specified, create new file in the current directory
|
21
|
+
elsif type
|
22
|
+
puts "[create] \t #{type} template"
|
23
|
+
destination = Dir.pwd
|
24
|
+
else
|
25
|
+
puts message(:create_wrong_syntax)
|
26
|
+
return false
|
27
|
+
end
|
18
28
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
elsif type
|
23
|
-
puts "Generating #{ @console.yellow(type) } template..."
|
24
|
-
destination = Dir.pwd
|
25
|
-
else
|
26
|
-
puts CREATE_WRONG_SYNTAX
|
27
|
-
return false
|
28
|
-
end
|
29
|
+
# Gem home directory
|
30
|
+
home = File.expand_path( "..", File.dirname(__FILE__) )
|
31
|
+
template = File.join( home, "template" )
|
29
32
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
+
# Copy template files
|
34
|
+
template_type = File.join( template, type )
|
35
|
+
# If directory doesn't exist
|
36
|
+
if !File.directory?(template_type)
|
37
|
+
puts "[error] \t Template not found"
|
38
|
+
puts message(:available_template)
|
39
|
+
return false
|
40
|
+
end
|
41
|
+
FileUtils.cp_r( Dir["#{template_type}/*"], destination )
|
33
42
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
if !File.directory?(template_type)
|
38
|
-
puts "#{ @console.red('Template not found') }"
|
39
|
-
puts AVAILABLE_TEMPLATE
|
40
|
-
return false
|
41
|
-
end
|
42
|
-
FileUtils.cp_r( Dir["#{template_type}/*"], destination )
|
43
|
+
# Copy base files
|
44
|
+
base = File.join( template, "base" )
|
45
|
+
FileUtils.cp_r( Dir["#{base}/*"], destination )
|
43
46
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
+
# Copy javascript files
|
48
|
+
js_source = File.join( home, "assets", "js" )
|
49
|
+
js_destination = File.join( destination, "assets", "js")
|
50
|
+
FileUtils.cp_r( Dir["#{js_source}/*"], js_destination )
|
47
51
|
|
48
|
-
|
49
|
-
|
50
|
-
js_destination = File.join( destination, "assets", "js")
|
51
|
-
FileUtils.cp_r( Dir["#{js_source}/*"], js_destination )
|
52
|
+
puts "[success] \t Run `compass watch` to generate the CSS"
|
53
|
+
end
|
52
54
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
elsif name
|
58
|
-
compass_command = "#{ @console.cyan('compass watch') } #{ @console.cyan(name) }"
|
59
|
-
else
|
60
|
-
compass_command = "#{ @console.cyan('compass watch') }"
|
61
|
-
end
|
62
|
-
puts "#{ @console.green('Done!') } For starter, you can run #{ @console.cyan(compass_command) } to generate the CSS"
|
63
|
-
end
|
55
|
+
# Help message
|
56
|
+
def self.help()
|
57
|
+
puts message(:help)
|
58
|
+
end
|
64
59
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
60
|
+
# Error message for non-existance command
|
61
|
+
def self.not_found(command)
|
62
|
+
puts "The command '#{command}' does not exist. Run #{ log("edge -h") } for help"
|
63
|
+
end
|
69
64
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
65
|
+
# Generic message for command that is too long
|
66
|
+
def self.command_too_long()
|
67
|
+
puts "Passed parameters exceed limits. If your #{ log('project_name') } contains space, enclose it with double-quote (\")"
|
68
|
+
end
|
74
69
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
70
|
+
if defined?(Rails::Engine)
|
71
|
+
require "edge/engine"
|
72
|
+
elsif defined?(Sprockets)
|
73
|
+
require "edge/sprockets"
|
74
|
+
end
|
79
75
|
end
|
80
76
|
|
81
77
|
if defined?(Compass)
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
78
|
+
Compass::Frameworks.register("edge",
|
79
|
+
:stylesheets_directory => File.join(root,"assets/sass"),
|
80
|
+
:templates_directory => File.join(root,"templates")
|
81
|
+
)
|
86
82
|
end
|
@@ -3,29 +3,24 @@
|
|
3
3
|
|
4
4
|
// Override EDGE variables here
|
5
5
|
// To override, uncomment the variable and set the new value
|
6
|
-
// Please keep the measurement unit (px or em) the same.
|
7
|
-
|
8
|
-
// The first thing to change is Font-family and Main color of your site
|
9
6
|
|
10
7
|
// -------
|
11
8
|
// FONT
|
12
9
|
// -------
|
13
|
-
|
14
|
-
|
10
|
+
$header-font-family : "Helvetica Neue", "Helvetica", Helvetica, Arial, "sans-serif";
|
11
|
+
$body-font-family : "Helvetica", Helvetica, Arial, "sans-serif";
|
15
12
|
// $code-font-family : "Consolas", Courier, "monospace";
|
16
13
|
|
17
14
|
// --------------------------------
|
18
15
|
// COLOR
|
19
16
|
// Two main colors of your site
|
20
17
|
// --------------------------------
|
21
|
-
|
18
|
+
$main-color : #0173bc;
|
22
19
|
// $sub-color : #e9e9e9;
|
23
20
|
|
24
|
-
//
|
21
|
+
// -------------------
|
25
22
|
// COLOR PALETTE
|
26
|
-
//
|
27
|
-
// set to another variable like $header-color: $blue-color;
|
28
|
-
// ----------------------------------------------------------
|
23
|
+
// -------------------
|
29
24
|
// $passive-color : #e9e9e9;
|
30
25
|
// $blue-color : #0173bc;
|
31
26
|
// $yellow-color : #dba924;
|
@@ -34,12 +29,15 @@
|
|
34
29
|
|
35
30
|
// ---------------------------
|
36
31
|
// OUTPUT CONFIG
|
37
|
-
// debug
|
38
|
-
// responsive
|
39
|
-
//
|
32
|
+
// debug : if true - add useful functionality for development
|
33
|
+
// responsive : add responsiveness to the output
|
34
|
+
// vertical-rhythm : vertically-align all header, paragraph, and list
|
35
|
+
|
36
|
+
// include : if false - no CSS output
|
40
37
|
// ------------------------------------------------------------------------------
|
41
38
|
// $debug : false;
|
42
39
|
// $responsive : true;
|
40
|
+
// $vertical-rhythm : false;
|
43
41
|
|
44
42
|
// $include-typography : true;
|
45
43
|
// $include-grid : true;
|
@@ -48,27 +46,25 @@
|
|
48
46
|
|
49
47
|
// $include-button : true;
|
50
48
|
// $include-form : true;
|
49
|
+
// $include-animate : true;
|
51
50
|
|
52
51
|
// $include-print : false;
|
53
52
|
// $include-code : false;
|
54
53
|
|
55
|
-
// ------
|
56
|
-
// BODY
|
57
|
-
// ------
|
58
|
-
// $body-background : #fff;
|
59
|
-
// $body-font-color : #222;
|
60
|
-
// $body-font-weight : normal;
|
61
|
-
// $body-font-style : normal;
|
62
|
-
|
63
|
-
// $body-font-size : 16px; // base-value for pixel->em converter
|
64
|
-
// $body-line-height : 1.5;
|
65
|
-
|
66
54
|
// ---------------
|
67
55
|
// GLOBAL VALUE
|
68
56
|
// ---------------
|
69
57
|
// $g-radius : 5px;
|
70
58
|
// $g-transition : all 0.2s ease-out;
|
71
59
|
|
60
|
+
// -------------------
|
61
|
+
// MEDIA QUERIES
|
62
|
+
// -------------------
|
63
|
+
// $mini-screen : 480px;
|
64
|
+
// $small-screen : 767px;
|
65
|
+
// $large-screen : 1440px;
|
66
|
+
// $retina-screen : 192dpi;
|
67
|
+
|
72
68
|
// --------
|
73
69
|
// GRID
|
74
70
|
// --------
|
@@ -82,6 +78,16 @@
|
|
82
78
|
// $max-tiles : 12;
|
83
79
|
// $tile-gutter : 15px;
|
84
80
|
|
81
|
+
// ------
|
82
|
+
// BODY
|
83
|
+
// ------
|
84
|
+
// $body-background : #fff;
|
85
|
+
// $body-font-color : #222;
|
86
|
+
// $body-font-weight : 400;
|
87
|
+
|
88
|
+
// $body-font-size : 16px;
|
89
|
+
// $body-line-height : 1.5;
|
90
|
+
|
85
91
|
// ---------------
|
86
92
|
// TYPOGRAPHY
|
87
93
|
// ---------------
|
@@ -100,22 +106,16 @@
|
|
100
106
|
// -----------------
|
101
107
|
// CODE Highlighter
|
102
108
|
// -----------------
|
103
|
-
// $code-theme : light;
|
104
|
-
|
105
|
-
// -------------------
|
106
|
-
// MEDIA QUERIES
|
107
|
-
// -------------------
|
108
|
-
// $mini-screen : 480px;
|
109
|
-
// $small-screen : 767px;
|
110
|
-
// $large-screen : 1440px;
|
111
|
-
// $retina-screen : 192dpi;
|
109
|
+
// $code-theme : light; // "light" or "dark"
|
112
110
|
|
113
111
|
// ----------
|
114
112
|
// BUTTON
|
115
113
|
// ----------
|
116
|
-
// $button-
|
114
|
+
// $button-full-style : true; // if false: remove all css3 styling
|
115
|
+
// $button-color : $main-color;
|
116
|
+
// $button-padding : 10px 20px;
|
117
117
|
|
118
118
|
// ------------------
|
119
119
|
// TEXT DIRECTION
|
120
120
|
// ------------------
|
121
|
-
// $text-direction : ltr;
|
121
|
+
// $text-direction : ltr; // Controls default global text direction, 'rtl' or 'ltr'
|
data/template/base/config.rb
CHANGED
data/template/html/index.html
CHANGED
@@ -23,12 +23,12 @@
|
|
23
23
|
|
24
24
|
<!-- Content goes here -->
|
25
25
|
|
26
|
-
<
|
26
|
+
<aside id="footer-push"></aside>
|
27
27
|
</div>
|
28
|
-
<footer
|
28
|
+
<footer class="main-footer"></footer>
|
29
29
|
|
30
30
|
<!-- Google's Hosted JQuery -->
|
31
|
-
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.
|
31
|
+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
|
32
32
|
<script type="text/javascript">
|
33
33
|
// Use local jquery, if Google's one fails to load
|
34
34
|
if (typeof jQuery == "undefined") {
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<
|
1
|
+
<aside id="footer-push"></aside>
|
2
2
|
</div>
|
3
|
-
<footer
|
3
|
+
<footer class="main-footer"></footer>
|
4
4
|
|
5
5
|
<!-- Google's Hosted JQuery -->
|
6
6
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
@@ -1,7 +1,6 @@
|
|
1
|
-
<
|
1
|
+
<aside id="footer-push"></aside>
|
2
2
|
</div>
|
3
|
-
<footer
|
4
|
-
</footer>
|
3
|
+
<footer class="main-footer"></footer>
|
5
4
|
|
6
5
|
<!-- Google's Hosted JQuery -->
|
7
6
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: edge_framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-03-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sass
|
@@ -43,22 +43,6 @@ dependencies:
|
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: 0.12.0
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: win32console
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - ! '>='
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
54
|
-
type: :runtime
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ! '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
46
|
- !ruby/object:Gem::Dependency
|
63
47
|
name: bundler
|
64
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,7 +91,7 @@ dependencies:
|
|
107
91
|
- - ! '>='
|
108
92
|
- !ruby/object:Gem::Version
|
109
93
|
version: '0'
|
110
|
-
description:
|
94
|
+
description: Minimalist SASS Framework
|
111
95
|
email:
|
112
96
|
- henner@setyono.net
|
113
97
|
executables:
|
@@ -124,6 +108,7 @@ files:
|
|
124
108
|
- Rakefile
|
125
109
|
- assets/js-docs/jquery.min.js
|
126
110
|
- assets/js/edge.js
|
111
|
+
- assets/js/edge/edge.animate.js
|
127
112
|
- assets/js/edge/edge.collect.js
|
128
113
|
- assets/js/edge/edge.handlebars.js
|
129
114
|
- assets/js/edge/edge.ie8.js
|
@@ -136,12 +121,10 @@ files:
|
|
136
121
|
- assets/sass/edge/_base.scss
|
137
122
|
- assets/sass/edge/_components.scss
|
138
123
|
- assets/sass/edge/_helpers.scss
|
139
|
-
- assets/sass/edge/components/
|
124
|
+
- assets/sass/edge/components/_animate.scss
|
140
125
|
- assets/sass/edge/components/_button.scss
|
141
126
|
- assets/sass/edge/components/_code.scss
|
142
127
|
- assets/sass/edge/components/_form.scss
|
143
|
-
- assets/sass/edge/components/_grid-margin.scss
|
144
|
-
- assets/sass/edge/components/_grid-old.scss
|
145
128
|
- assets/sass/edge/components/_grid.scss
|
146
129
|
- assets/sass/edge/components/_normalize.scss
|
147
130
|
- assets/sass/edge/components/_print.scss
|
@@ -155,8 +138,9 @@ files:
|
|
155
138
|
- assets/test2.html
|
156
139
|
- bin/edge
|
157
140
|
- edge.gemspec
|
158
|
-
- lib/edge/
|
141
|
+
- lib/edge/engine.rb
|
159
142
|
- lib/edge/message.rb
|
143
|
+
- lib/edge/sprockets.rb
|
160
144
|
- lib/edge/version.rb
|
161
145
|
- lib/edge_framework.rb
|
162
146
|
- template/base/.gitignore
|
@@ -210,5 +194,5 @@ rubyforge_project:
|
|
210
194
|
rubygems_version: 1.8.28
|
211
195
|
signing_key:
|
212
196
|
specification_version: 3
|
213
|
-
summary:
|
197
|
+
summary: Minimalist SASS Framework that utilize Compass to its full extend
|
214
198
|
test_files: []
|
@@ -1,112 +0,0 @@
|
|
1
|
-
// ------------------------------------------
|
2
|
-
// BLOCK GRID with MARGIN
|
3
|
-
// *Deprecated* since v 0.1, use block-grid instead
|
4
|
-
// Using margin for distance between block
|
5
|
-
// ------------------------------------------
|
6
|
-
$block-grid-max-width : em($content-width) !default;
|
7
|
-
$block-grid-total : 12 !default;
|
8
|
-
$block-grid-margin : em(25px) !default;
|
9
|
-
|
10
|
-
// Calculate percentages for block-grid
|
11
|
-
@function blockGridCalc($blockNum, $totalBlock:$block-grid-total, $collapse:false) {
|
12
|
-
$baseSize : 100% / $blockNum;
|
13
|
-
|
14
|
-
// Reduce size due to margin between grid.
|
15
|
-
$fillSize : 0 !default;
|
16
|
-
@if $collapse == false { // -2% / 4
|
17
|
-
$fillSize : ( gridMarginCalc() * ( $blockNum - 1 ) / $blockNum );
|
18
|
-
}
|
19
|
-
|
20
|
-
@return $baseSize - $fillSize;
|
21
|
-
}
|
22
|
-
|
23
|
-
// Calculate percentages for Margin between block-grid
|
24
|
-
@function blockGridMarginCalc($blockMargin: $block-grid-margin, $maxWidth: $block-grid-max-width) {
|
25
|
-
@return percentage( $blockMargin / $maxWidth );
|
26
|
-
}
|
27
|
-
|
28
|
-
@mixin block-grid($block-num : false,
|
29
|
-
$spacing : $block-grid-margin,
|
30
|
-
$base-style : true,
|
31
|
-
$collapse : false) {
|
32
|
-
|
33
|
-
@if $base-style {
|
34
|
-
display : block;
|
35
|
-
padding : 0;
|
36
|
-
@include clearfix;
|
37
|
-
|
38
|
-
&> li {
|
39
|
-
display : block;
|
40
|
-
height : auto;
|
41
|
-
float : $default-float;
|
42
|
-
@if $collapse == false {
|
43
|
-
margin-#{$default-opposite} : blockGridMarginCalc($spacing);
|
44
|
-
} @else {
|
45
|
-
margin-#{$default-opposite} : 0;
|
46
|
-
}
|
47
|
-
}
|
48
|
-
}
|
49
|
-
|
50
|
-
@if $block-num {
|
51
|
-
&>li {
|
52
|
-
width : blockGridCalc($block-num, $collapse: $collapse);
|
53
|
-
@if $collapse == false {
|
54
|
-
&:nth-of-type(#{$block-num}n) {
|
55
|
-
margin-#{$default-opposite} : 0;
|
56
|
-
}
|
57
|
-
}
|
58
|
-
|
59
|
-
// &:nth-of-type(#{$block-num}n+1) {
|
60
|
-
// clear: both;
|
61
|
-
// }
|
62
|
-
}
|
63
|
-
}
|
64
|
-
}
|
65
|
-
|
66
|
-
@if $include-block-grid {
|
67
|
-
|
68
|
-
/* ---------------
|
69
|
-
EDGE Block Grid
|
70
|
-
--------------- */
|
71
|
-
|
72
|
-
[class*="block-grid-"] { @include block-grid; }
|
73
|
-
|
74
|
-
// Large block grid
|
75
|
-
@for $i from 2 through $block-grid-total {
|
76
|
-
.large-block-grid-#{($i)} {
|
77
|
-
@include block-grid($i, $for-base: false);
|
78
|
-
|
79
|
-
&.collapse {
|
80
|
-
@include block-grid($i, $for-base: false, $collapse: true);
|
81
|
-
}
|
82
|
-
}
|
83
|
-
}
|
84
|
-
|
85
|
-
@include small {
|
86
|
-
[class*="small-block-grid-"] > li { clear: none !important; }
|
87
|
-
|
88
|
-
// Make large-block-grid 100% width
|
89
|
-
[class*="large-block-grid-"] > li {
|
90
|
-
width: 100%;
|
91
|
-
|
92
|
-
// Reset large-block-grid nth-child margin
|
93
|
-
&:nth-child(n+1) {
|
94
|
-
margin-#{$default-opposite} : blockGridMarginCalc($block-grid-margin);
|
95
|
-
}
|
96
|
-
}
|
97
|
-
|
98
|
-
// Small block grid
|
99
|
-
@for $i from 2 through $block-grid-total {
|
100
|
-
.small-block-grid-#{($i)} {
|
101
|
-
@include block-grid($i, $base-style: false);
|
102
|
-
&.collapse {
|
103
|
-
@include block-grid($i, $base-style: false, $collapse: true);
|
104
|
-
}
|
105
|
-
}
|
106
|
-
}
|
107
|
-
}
|
108
|
-
|
109
|
-
// Base style for collapsed block-grid, written below to override other style
|
110
|
-
[class*="block-grid-"].collapse { @include block-grid($collapse: true); }
|
111
|
-
|
112
|
-
}
|