staple 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/staple/images_generator.rb +84 -0
- data/lib/staple/reset_generator.rb +6 -4
- data/lib/staple/theme_generator.rb +1 -1
- data/lib/staple.rb +1 -0
- data/source/styles/buttons/themes/kmc.theme +5 -0
- data/source/styles/images/blur.scss +1 -0
- data/source/styles/images/blurhover-hover.scss +1 -0
- data/source/styles/images/bw.scss +1 -0
- data/source/styles/images/bwhover-hover.scss +1 -0
- data/source/styles/images/gradient-bg.scss +6 -0
- data/source/styles/images/material-round.scss +1 -0
- data/source/styles/images/padding.scss +1 -0
- data/source/styles/images/photograph.scss +1 -0
- data/source/styles/images/radius.scss +1 -0
- data/source/styles/images/round.scss +1 -0
- data/source/styles/images/shadow.scss +3 -0
- data/source/styles/images/smooth-transition.scss +5 -0
- data/source/styles/images/tilthover-hover.scss +4 -0
- data/source/styles/images/trendy-bg.scss +6 -0
- data/source/styles/staple/builders/build_images.scss +11 -0
- data/source/styles/staple/buttons.scss +1 -0
- data/source/styles/staple/custom.scss +1 -0
- data/source/styles/staple/images.scss +11 -0
- data/source/styles/staple/init/after.scss +2 -0
- data/source/styles/typography/pt-sans-import.scss +1 -0
- data/source/styles/typography/pt-sans.typeface +1 -0
- data/source/styles/typography/themes/kmc.theme +2 -0
- data/staple.gemspec +1 -1
- metadata +24 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53a69af5323ce35cecb784339c0baf0ece6e637d
|
4
|
+
data.tar.gz: ef47841273a14628524ca6b9dbc8ef9e43c57e3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 065d5d4043650d281f3c40e68242dd4b8344c90473b82aa5c9f1e8e3207794041e6cbcf3515372ec2ab820ed2fc2e27ed4103630371401b0fff68bfa3ade17df
|
7
|
+
data.tar.gz: b0e202226e063b06a0104804f1182836b1a14a39d59fd87810cd9bd9c53de03dc216a94218bc34ae7147786f6da5569fccc96658187db5622fd0a826ec229b0c
|
data/README.md
CHANGED
@@ -8,8 +8,9 @@ a modular ui framework for rails built on top of foundation and sass.
|
|
8
8
|
* keep it simple
|
9
9
|
|
10
10
|
##todo
|
11
|
-
* integrate
|
11
|
+
* integrate navs, etc? (as elements?)
|
12
12
|
* import web components
|
13
|
+
* define custom themes and patterns per project
|
13
14
|
|
14
15
|
##lower priority todo
|
15
16
|
* don't require other gems
|
@@ -0,0 +1,84 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module Staple
|
4
|
+
class ImagesGenerator < Rails::Generators::Base
|
5
|
+
desc 'pending'
|
6
|
+
source_root File.join(File.dirname(__FILE__), '..', '..')
|
7
|
+
argument :actions, :type => :array, :default => []
|
8
|
+
|
9
|
+
def delegate
|
10
|
+
case "#{action}"
|
11
|
+
when "import"
|
12
|
+
import
|
13
|
+
when "remove"
|
14
|
+
remove
|
15
|
+
when "append"
|
16
|
+
append
|
17
|
+
when "amputate"
|
18
|
+
amputate
|
19
|
+
else
|
20
|
+
puts "unknown command"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
#ACTIONS
|
27
|
+
|
28
|
+
def import
|
29
|
+
puts "#{component} import #{pattern}"
|
30
|
+
#remove if there
|
31
|
+
gsub_file "app/assets/stylesheets/staple/#{component}.scss", "\n\t#{contents}", "" if contents
|
32
|
+
gsub_file "app/assets/stylesheets/staple/#{component}.scss", "//&*default", "\n\t#{contents}//&*default" if contents
|
33
|
+
gsub_file "app/assets/stylesheets/staple/#{component}.scss", "//&*hover", "\n\t#{hover}//&*hover" if hover
|
34
|
+
gsub_file "app/assets/stylesheets/staple/builders/build_#{component}.scss", "//&*bg", "\n\t\t#{bg}//&*bg" if bg
|
35
|
+
end
|
36
|
+
|
37
|
+
def remove
|
38
|
+
puts "#{component} remove #{pattern}"
|
39
|
+
gsub_file "app/assets/stylesheets/staple/#{component}.scss", "\n\t#{contents}", "" if contents
|
40
|
+
gsub_file "app/assets/stylesheets/staple/#{component}.scss", "\n\t#{hover}", "" if hover
|
41
|
+
gsub_file "app/assets/stylesheets/staple/builders/build_#{component}.scss", "\n\t\t#{bg}", "" if bg
|
42
|
+
end
|
43
|
+
|
44
|
+
#HELPER METHODS
|
45
|
+
|
46
|
+
def contents
|
47
|
+
file = File.join(self.class.source_root, 'source', 'styles', "#{component}", "#{pattern.dasherize}.scss")
|
48
|
+
get_file(file)
|
49
|
+
end
|
50
|
+
|
51
|
+
def hover
|
52
|
+
file = File.join(self.class.source_root, 'source', 'styles', "#{component}", "#{pattern.dasherize}-hover.scss")
|
53
|
+
get_file(file)
|
54
|
+
end
|
55
|
+
|
56
|
+
def bg
|
57
|
+
file = File.join(self.class.source_root, 'source', 'styles', "#{component}", "#{pattern.dasherize}-bg.scss")
|
58
|
+
get_file(file)
|
59
|
+
end
|
60
|
+
|
61
|
+
def get_file(file)
|
62
|
+
if File.file?(file)
|
63
|
+
return File.read(file)
|
64
|
+
else
|
65
|
+
return false
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
#DEFINE
|
70
|
+
|
71
|
+
def action
|
72
|
+
actions[0]
|
73
|
+
end
|
74
|
+
|
75
|
+
def pattern
|
76
|
+
actions[1]
|
77
|
+
end
|
78
|
+
|
79
|
+
def component
|
80
|
+
"images"
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
84
|
+
end
|
@@ -7,10 +7,12 @@ module Staple
|
|
7
7
|
argument :actions, :type => :array, :default => []
|
8
8
|
|
9
9
|
def reset
|
10
|
-
components = %w(buttons colors forms tables typography sizes)
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
components = %w(buttons colors forms tables typography sizes images)
|
11
|
+
if yes? "All css changes will be overwritten. Continue? (Y/N)"
|
12
|
+
components.each do |c|
|
13
|
+
copy_file "source/styles/staple/#{c}.scss", "app/assets/stylesheets/staple/#{c}.scss", :force => true
|
14
|
+
copy_file "source/styles/staple/builders/build_#{c}.scss", "app/assets/stylesheets/staple/builders/build_#{c}.scss", :force => true
|
15
|
+
end
|
14
16
|
end
|
15
17
|
end
|
16
18
|
|
@@ -9,7 +9,7 @@ module Staple
|
|
9
9
|
def call_generators
|
10
10
|
if global?
|
11
11
|
#call self with each
|
12
|
-
components = %w(buttons colors forms tables typography)
|
12
|
+
components = %w(buttons colors forms tables typography images)
|
13
13
|
components.each do |c|
|
14
14
|
generate "staple:theme", "#{c}", "#{theme}"
|
15
15
|
end
|
data/lib/staple.rb
CHANGED
@@ -3,6 +3,7 @@ require 'staple/forms_generator'
|
|
3
3
|
require 'staple/colors_generator'
|
4
4
|
require 'staple/typography_generator'
|
5
5
|
require 'staple/tables_generator'
|
6
|
+
require 'staple/images_generator'
|
6
7
|
require 'staple/theme_generator'
|
7
8
|
require 'staple/install_generator'
|
8
9
|
require 'staple/reset_generator'
|
@@ -0,0 +1 @@
|
|
1
|
+
-webkit-filter: blur(5px);
|
@@ -0,0 +1 @@
|
|
1
|
+
-webkit-filter: blur(5px);
|
@@ -0,0 +1 @@
|
|
1
|
+
-webkit-filter: grayscale(100%);
|
@@ -0,0 +1 @@
|
|
1
|
+
-webkit-filter: grayscale(100%);
|
@@ -0,0 +1,6 @@
|
|
1
|
+
background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 59%, rgba(0,0,0,0.65) 100%), url("#{$image}") no-repeat center center;
|
2
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(59%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0.65))), url("#{$image}") no-repeat center center;
|
3
|
+
background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 59%,rgba(0,0,0,0.65) 100%), url("#{$image}") no-repeat center center;
|
4
|
+
background: -o-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 59%,rgba(0,0,0,0.65) 100%), url("#{$image}") no-repeat center center;
|
5
|
+
background: -ms-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 59%,rgba(0,0,0,0.65) 100%), url("#{$image}") no-repeat center center;
|
6
|
+
background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 59%,rgba(0,0,0,0.65) 100%), url("#{$image}") no-repeat center center;
|
@@ -0,0 +1 @@
|
|
1
|
+
border-radius: 2px;
|
@@ -0,0 +1 @@
|
|
1
|
+
padding: 2em;
|
@@ -0,0 +1 @@
|
|
1
|
+
border: 10px solid $white;
|
@@ -0,0 +1 @@
|
|
1
|
+
border-radius: $global-radius;
|
@@ -0,0 +1 @@
|
|
1
|
+
border-radius: $global-rounded;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
background: -moz-linear-gradient(-45deg, rgba(163,45,226,0.66) 0%, rgba(14,209,179,0.53) 100%), url("#{$image}") no-repeat center center; /* FF3.6+ */
|
2
|
+
background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,rgba(163,45,226,0.66)), color-stop(100%,rgba(14,209,179,0.53))), url("#{$image}") no-repeat center center; /* Chrome,Safari4+ */
|
3
|
+
background: -webkit-linear-gradient(-45deg, rgba(163,45,226,0.66) 0%,rgba(14,209,179,0.53) 100%), url("#{$image}") no-repeat center center; /* Chrome10+,Safari5.1+ */
|
4
|
+
background: -o-linear-gradient(-45deg, rgba(163,45,226,0.66) 0%,rgba(14,209,179,0.53) 100%), url("#{$image}") no-repeat center center; /* Opera 11.10+ */
|
5
|
+
background: -ms-linear-gradient(-45deg, rgba(163,45,226,0.66) 0%,rgba(14,209,179,0.53) 100%), url("#{$image}") no-repeat center center; /* IE10+ */
|
6
|
+
background: linear-gradient(135deg, rgba(163,45,226,0.66) 0%,rgba(14,209,179,0.53) 100%), url("#{$image}") no-repeat center center; /* W3C */
|
@@ -0,0 +1,11 @@
|
|
1
|
+
@each $class in $background-image-classes {
|
2
|
+
$i: index($background-image-classes, $class);
|
3
|
+
$image: nth($background-image-define, $i);
|
4
|
+
|
5
|
+
.#{$class}{
|
6
|
+
background: url("#{$image}") no-repeat;//&*bg
|
7
|
+
background-size: cover;
|
8
|
+
background-attachment:fixed;
|
9
|
+
background-position:center bottom;
|
10
|
+
}
|
11
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
//define custom styles here
|
@@ -0,0 +1 @@
|
|
1
|
+
@import url(http://fonts.googleapis.com/css?family=PT+Sans:400,700);
|
@@ -0,0 +1 @@
|
|
1
|
+
"PT Sans", "Helvetica Neue", Helvetica, Arial, sans-serif
|
data/staple.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "staple"
|
7
|
-
spec.version = "0.4.
|
7
|
+
spec.version = "0.4.4"
|
8
8
|
spec.summary = "Modular UI framework for rails built on top of foundation and sass"
|
9
9
|
spec.description = "a modular ui framework for rails built on top of foundation and sass."
|
10
10
|
spec.authors = ["Ryan Helsing"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: staple
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Helsing
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foundation-rails
|
@@ -82,6 +82,7 @@ files:
|
|
82
82
|
- lib/staple/buttons_generator.rb
|
83
83
|
- lib/staple/colors_generator.rb
|
84
84
|
- lib/staple/forms_generator.rb
|
85
|
+
- lib/staple/images_generator.rb
|
85
86
|
- lib/staple/install_generator.rb
|
86
87
|
- lib/staple/reset_generator.rb
|
87
88
|
- lib/staple/tables_generator.rb
|
@@ -100,6 +101,7 @@ files:
|
|
100
101
|
- source/styles/buttons/shiny.scss
|
101
102
|
- source/styles/buttons/text-shadow-inner.scss
|
102
103
|
- source/styles/buttons/text-shadow.scss
|
104
|
+
- source/styles/buttons/themes/kmc.theme
|
103
105
|
- source/styles/buttons/themes/plastic.theme
|
104
106
|
- source/styles/buttons/transparent.scss
|
105
107
|
- source/styles/colors/blue.color
|
@@ -127,16 +129,33 @@ files:
|
|
127
129
|
- source/styles/forms/tight.scss
|
128
130
|
- source/styles/forms/transparent-error.scss
|
129
131
|
- source/styles/foundation_and_overrides.scss
|
132
|
+
- source/styles/images/blur.scss
|
133
|
+
- source/styles/images/blurhover-hover.scss
|
134
|
+
- source/styles/images/bw.scss
|
135
|
+
- source/styles/images/bwhover-hover.scss
|
136
|
+
- source/styles/images/gradient-bg.scss
|
137
|
+
- source/styles/images/material-round.scss
|
138
|
+
- source/styles/images/padding.scss
|
139
|
+
- source/styles/images/photograph.scss
|
140
|
+
- source/styles/images/radius.scss
|
141
|
+
- source/styles/images/round.scss
|
142
|
+
- source/styles/images/shadow.scss
|
143
|
+
- source/styles/images/smooth-transition.scss
|
144
|
+
- source/styles/images/tilthover-hover.scss
|
145
|
+
- source/styles/images/trendy-bg.scss
|
130
146
|
- source/styles/staple/builders/build_buttons.scss
|
131
147
|
- source/styles/staple/builders/build_colors.scss
|
132
148
|
- source/styles/staple/builders/build_forms.scss
|
149
|
+
- source/styles/staple/builders/build_images.scss
|
133
150
|
- source/styles/staple/builders/build_sizes.scss
|
134
151
|
- source/styles/staple/builders/build_tables.scss
|
135
152
|
- source/styles/staple/builders/build_typography.scss
|
136
153
|
- source/styles/staple/buttons.scss
|
137
154
|
- source/styles/staple/colors.scss
|
155
|
+
- source/styles/staple/custom.scss
|
138
156
|
- source/styles/staple/forms.scss
|
139
157
|
- source/styles/staple/helpers/color_functions.scss
|
158
|
+
- source/styles/staple/images.scss
|
140
159
|
- source/styles/staple/init/after.scss
|
141
160
|
- source/styles/staple/init/before.scss
|
142
161
|
- source/styles/staple/init/overrides.scss
|
@@ -165,12 +184,15 @@ files:
|
|
165
184
|
- source/styles/typography/oxygen.typeface
|
166
185
|
- source/styles/typography/pacifico-import.scss
|
167
186
|
- source/styles/typography/pacifico.typeface
|
187
|
+
- source/styles/typography/pt-sans-import.scss
|
188
|
+
- source/styles/typography/pt-sans.typeface
|
168
189
|
- source/styles/typography/roboto-import.scss
|
169
190
|
- source/styles/typography/roboto-slab-import.scss
|
170
191
|
- source/styles/typography/roboto-slab.typeface
|
171
192
|
- source/styles/typography/roboto.typeface
|
172
193
|
- source/styles/typography/themes/default.theme
|
173
194
|
- source/styles/typography/themes/flatland.theme
|
195
|
+
- source/styles/typography/themes/kmc.theme
|
174
196
|
- source/styles/typography/themes/peace.theme
|
175
197
|
- source/styles/typography/themes/plastic.theme
|
176
198
|
- staple.gemspec
|