staple 0.3.0 → 0.4.1

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 (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +56 -10
  3. data/lib/staple/buttons_generator.rb +99 -0
  4. data/lib/staple/forms_generator.rb +84 -0
  5. data/lib/staple/theme_generator.rb +8 -3
  6. data/lib/staple.rb +2 -4
  7. data/source/styles/buttons/themes/plastic.theme +2 -1
  8. data/source/styles/colors/blue.scss +1 -0
  9. data/source/styles/colors/themes/flatland.theme +5 -0
  10. data/source/styles/colors/themes/plastic.theme +3 -0
  11. data/source/styles/forms/2px-border-focus.scss +1 -0
  12. data/source/styles/forms/2px-border.scss +1 -0
  13. data/source/styles/forms/bubble-error.scss +20 -0
  14. data/source/styles/forms/margin-bottom.scss +1 -0
  15. data/source/styles/forms/plastic-bubble-error.scss +36 -0
  16. data/source/styles/forms/plastic-bubble-focus.scss +2 -0
  17. data/source/styles/forms/plastic-bubble.scss +3 -0
  18. data/source/styles/forms/radius.scss +1 -0
  19. data/source/styles/forms/round.scss +1 -0
  20. data/source/styles/forms/shaded-error.scss +10 -0
  21. data/source/styles/forms/shaded-focus.scss +1 -0
  22. data/source/styles/forms/shaded.scss +1 -0
  23. data/source/styles/forms/themes/flat.theme +5 -0
  24. data/source/styles/forms/themes/gradient.theme +1 -0
  25. data/source/styles/forms/themes/plastic.theme +3 -0
  26. data/source/styles/forms/themes/pro.theme +1 -0
  27. data/source/styles/forms/tight-error.scss +3 -0
  28. data/source/styles/forms/tight.scss +3 -0
  29. data/source/styles/forms/transparent-error.scss +7 -0
  30. data/source/styles/staple/builders/build_forms.scss +0 -0
  31. data/source/styles/staple/builders/build_tables.scss +0 -0
  32. data/source/styles/staple/forms.scss +40 -8
  33. data/source/styles/typography/roboto.scss +2 -0
  34. data/staple.gemspec +1 -1
  35. metadata +29 -6
  36. data/lib/staple/amputate_generator.rb +0 -46
  37. data/lib/staple/append_generator.rb +0 -46
  38. data/lib/staple/import_generator.rb +0 -46
  39. data/lib/staple/remove_generator.rb +0 -47
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 057f797ed605504ea708276b4f4175a8b712a256
4
- data.tar.gz: ccb5106661e47df2dc983c5de6897784d8182e91
3
+ metadata.gz: cdae37d53047398c261f9f1ce6e67b6090812fe3
4
+ data.tar.gz: fd6a7bb935dd778e853f7b745ddd57ef8c84e92d
5
5
  SHA512:
6
- metadata.gz: 766448cca2e64d415e2040ee1dc0f5f815a54c7ea429c17483f64e96412c8b97632fd19254f773f63086a46a47c5f137c23af7a6c5ac4e71992edde2ec86d35c
7
- data.tar.gz: 2d1a75a36b52c1f3c0f051cac1898717dad7949972f10ac7107dc8c179f79add5f887d877196c5b27700e826744607cd0031cef72fdd4c4e16676d8752833cf6
6
+ metadata.gz: ead6d5cf343270544f9dd8c4fbdbc6b62a0a30b87d402953550d68bcea0fb37648345458e873f12171dbeda8f1c4bb326880c073967e11f9a72debb0f20bab89
7
+ data.tar.gz: db4f288e2da1be547392f25652f457dbb3b90a4638b13e0c659e58d785e4e132f6601f04a036ac286387e9509a77c562083cb8439a5b7e1b44a3d7ff28bef91b
data/README.md CHANGED
@@ -2,24 +2,30 @@
2
2
 
3
3
  a modular ui framework for rails built on top of foundation and sass.
4
4
 
5
+ ##goals
6
+
7
+ * favor presets over explicit declaration
8
+ * convention over configuration
9
+ * keep it simple
10
+
5
11
  ##todo
6
12
 
7
- * placement of triggers
8
- * create patterns and themes
13
+ * component based generators
14
+ * fix plastic, flat theme selectors. Focus color.
9
15
 
10
16
  ##lower priority todo
11
- * declaring as dependency does not load it? vs don't require other gems
17
+ * don't require other gems
12
18
  * integration with existing projects
13
19
  * reinstall places foundation again then does replace, separate generator for update?
14
- * bring repeated generator code into mixin
15
- * Set variables with generator: default
20
+ * variables generator:
16
21
  * radius
17
22
  * font
18
23
  * primary-color
19
24
  * border-size
20
- * change ammount (color dif, hover dif)
25
+ * change amount (color dif, hover dif)
21
26
  * create executables
22
- * Demarcate each pattern (atom) with comment
27
+ * Demarcate each pattern in scss (atom) with comment
28
+ * Make errors verbose. Print full command on low level.
23
29
 
24
30
  ##Install
25
31
 
@@ -38,11 +44,51 @@ spring stop
38
44
  rails g staple:install
39
45
  ```
40
46
 
41
- #how to use
47
+ ##intended use
48
+
49
+ * special cases - seperate generators?
50
+
51
+ ###themes
52
+ * rails g staple:theme buttons plastic
53
+ * rails g staple:theme colors flatland // see flatland.theme
54
+ * rails g staple:theme global medium
55
+ * rails g staple:theme typography plastic // see flatland.theme
56
+
57
+ ###buttons
58
+ * rails g staple:buttons import shadow
59
+ * rails g staple:buttons remove shadow
60
+ * rails g staple:buttons append gradient
61
+ * rails g staple:buttons amputate gradient
62
+
63
+ ###forms
64
+ * rails g staple:forms import inner-shadow
65
+ * rails g staple:forms remove inner-shadow
66
+ * rails g staple:forms append inverse
67
+ * rails g staple:forms amputate inverse
68
+
69
+ ###colors*
70
+ * rails g staple:colors import secondary:blue
71
+ * rails g staple:colors append fave:aqua //adds new color and generate class: button, accent?
72
+ * rails g staple:colors remove fave // removes color declaration
73
+
74
+ ###typography*
75
+ * rails g staple:typography import typeface-primary:Roboto
76
+ * rails g staple:typography remove typeface-primary:Roboto
77
+ * rails g staple:typography append cool-typeface:Roboto //create var and generate
78
+
79
+ ###tables
80
+ * rails g staple:tables import borders
81
+ * rails g staple:tables remove zebra-stripe
82
+ * rails g staple:tables append inverse
83
+ * rails g staple:tables amputate small
42
84
 
43
- rails g staple:{import|remove||append|amputate} buttons round
85
+ ###sizes
86
+ * rails g staple:sizes import big
87
+ * rails g staple:sizes remove medium
88
+ * rails g staple:sizes append xl
89
+ * rails g staple:sizes amputate xxl
44
90
 
45
- #staple command
91
+ #staple command - coming soon
46
92
  staple {button-style|button-theme} {pattern} (append)
47
93
  staple buttons round
48
94
  staple buttons-theme plastic
@@ -0,0 +1,99 @@
1
+ require 'rails/generators'
2
+
3
+ module Staple
4
+ class ButtonsGenerator < 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
+ gsub_file "app/assets/stylesheets/staple/#{component}.scss", "//&*default", "\n\t#{contents}//&*default" if contents
31
+ gsub_file "app/assets/stylesheets/staple/builders/build_#{component}.scss", "//&*default", "\n\t\t#{contents}//&*default" if contents
32
+ gsub_file "app/assets/stylesheets/staple/#{component}.scss", "//&*hover", "\n\t#{hover}//&*hover" if hover
33
+ gsub_file "app/assets/stylesheets/staple/builders/build_#{component}.scss", "//&*hover", "\n\t\t#{hover}//&*hover" if hover
34
+ puts "invalid operation: : #{component} import #{pattern}. for available actions: rails g staple:list [option]" if !contents
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/builders/build_#{component}.scss", "\n\t\t#{contents}", "" if contents
41
+ gsub_file "app/assets/stylesheets/staple/#{component}.scss", "\n\t#{hover}", "" if hover
42
+ gsub_file "app/assets/stylesheets/staple/builders/build_#{component}.scss", "\n\t\t#{hover}", "" if hover
43
+ puts "invalid operation. for available actions: rails g staple:list [option]" if !contents
44
+ end
45
+
46
+ def append
47
+ puts "append"
48
+ gsub_file "app/assets/stylesheets/staple/#{component}.scss", "//&*append", "\n.#{component.singularize}.#{pattern}{\n\t#{contents}\n}//&*append" if contents
49
+ gsub_file "app/assets/stylesheets/staple/builders/build_#{component}.scss", "//&*append", "\n.#{component.singularize}.\#{$class}.#{pattern}{\n\t#{contents}\n}//&*append" if contents
50
+ gsub_file "app/assets/stylesheets/staple/#{component}.scss", "//&*append", "\n.#{component.singularize}.#{pattern}:hover{\n\t#{hover}\n}//&*append" if hover
51
+ gsub_file "app/assets/stylesheets/staple/builders/build_#{component}.scss", "//&*append", "\n.#{component.singularize}.\#{$class}.#{pattern}:hover{\n\t#{hover}\n}//&*append" if hover
52
+ puts "invalid operation. for available actions: rails g staple:list [option]" if !contents
53
+ end
54
+
55
+ def amputate
56
+ puts "amp"
57
+ gsub_file "app/assets/stylesheets/staple/#{component}.scss", "\n.#{component.singularize}.#{pattern}{\n\t#{contents}\n}", "" if contents
58
+ gsub_file "app/assets/stylesheets/staple/builders/build_#{component}.scss", "\n.#{component.singularize}.\#{$class}.#{pattern}{\n\t#{contents}\n}", "" if contents
59
+ gsub_file "app/assets/stylesheets/staple/#{component}.scss", "\n.#{component.singularize}.#{pattern}:hover{\n\t#{hover}\n}", "" if hover
60
+ gsub_file "app/assets/stylesheets/staple/builders/build_#{component}.scss", "\n.#{component.singularize}.\#{$class}.#{pattern}:hover{\n\t#{hover}\n}", "" if hover
61
+ puts "invalid operation. for available actions: rails g staple:list [option]" if !contents
62
+ end
63
+
64
+ #HELPER METHODS
65
+
66
+ def contents
67
+ file = File.join(self.class.source_root, 'source', 'styles', "#{component}", "#{pattern.dasherize}.scss")
68
+ get_file(file)
69
+ end
70
+
71
+ def hover
72
+ file = File.join(self.class.source_root, 'source', 'styles', "#{component}", "#{pattern.dasherize}-hover.scss")
73
+ get_file(file)
74
+ end
75
+
76
+ def get_file(file)
77
+ if File.file?(file)
78
+ return File.read(file)
79
+ else
80
+ return false
81
+ end
82
+ end
83
+
84
+ #DEFINE
85
+
86
+ def action
87
+ actions[0]
88
+ end
89
+
90
+ def pattern
91
+ actions[1]
92
+ end
93
+
94
+ def component
95
+ "buttons"
96
+ end
97
+
98
+ end
99
+ end
@@ -0,0 +1,84 @@
1
+ require 'rails/generators'
2
+
3
+ module Staple
4
+ class FormsGenerator < 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
+ else
16
+ puts "unknown command"
17
+ end
18
+ end
19
+
20
+ private
21
+
22
+ #ACTIONS
23
+
24
+ def import
25
+ puts "#{component} import #{pattern}"
26
+ gsub_file "app/assets/stylesheets/staple/#{component}.scss", "//&*default", "\n\t#{contents}//&*default" if contents
27
+ gsub_file "app/assets/stylesheets/staple/#{component}.scss", "//&*focus", "\n\t#{focus}//&*focus" if focus
28
+ gsub_file "app/assets/stylesheets/staple/#{component}.scss", "//&*error", "\n\t#{error}//&*error" if error
29
+
30
+ puts "invalid operation: #{component} import #{pattern}. for available actions: rails g staple:list [option]" if not_valid?
31
+ end
32
+
33
+ def remove
34
+ puts "#{component} remove #{pattern}"
35
+ gsub_file "app/assets/stylesheets/staple/#{component}.scss", "\n\t#{contents}", "" if contents
36
+ gsub_file "app/assets/stylesheets/staple/#{component}.scss", "\n\t#{focus}", "" if focus
37
+ gsub_file "app/assets/stylesheets/staple/#{component}.scss", "\n\t#{error}", "" if error
38
+ end
39
+
40
+ #HELPER METHODS
41
+
42
+ def contents
43
+ file = File.join(self.class.source_root, 'source', 'styles', "#{component}", "#{pattern.dasherize}.scss")
44
+ get_file(file)
45
+ end
46
+
47
+ def focus
48
+ file = File.join(self.class.source_root, 'source', 'styles', "#{component}", "#{pattern.dasherize}-focus.scss")
49
+ get_file(file)
50
+ end
51
+
52
+ def error
53
+ file = File.join(self.class.source_root, 'source', 'styles', "#{component}", "#{pattern.dasherize}-error.scss")
54
+ get_file(file)
55
+ end
56
+
57
+ def get_file(file)
58
+ if File.file?(file)
59
+ return File.read(file)
60
+ else
61
+ return false
62
+ end
63
+ end
64
+
65
+ def not_valid
66
+ !contents || !focus || !error
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
+ "forms"
81
+ end
82
+
83
+ end
84
+ end
@@ -15,9 +15,14 @@ module Staple
15
15
  end
16
16
  else
17
17
  if theme_definition
18
- patterns = theme_definition.split("\n")
19
- patterns.each do |pattern|
20
- generate "staple:import", "#{component}", "#{pattern}"
18
+ if yes? "Any changes you have made to staple/#{component}.scss or builders will be overwritten. Continue? (Y/N)"
19
+ #tear down previous styles
20
+ copy_file "source/styles/staple/#{component}.scss", "app/assets/stylesheets/staple/#{component}.scss", :force => true
21
+ copy_file "source/styles/staple/builders/build_#{component}.scss", "app/assets/stylesheets/staple/builders/build_#{component}.scss", :force => true
22
+ patterns = theme_definition.split("\n")
23
+ patterns.each do |pattern|
24
+ generate "staple:#{component}", "import", "#{pattern}"
25
+ end
21
26
  end
22
27
  end
23
28
  end
data/lib/staple.rb CHANGED
@@ -1,6 +1,4 @@
1
- require 'staple/import_generator'
2
- require 'staple/append_generator'
3
- require 'staple/remove_generator'
4
- require 'staple/amputate_generator'
1
+ require 'staple/buttons_generator'
2
+ require 'staple/forms_generator'
5
3
  require 'staple/theme_generator'
6
4
  require 'staple/install_generator'
@@ -1,3 +1,4 @@
1
1
  border
2
2
  big-bottom-border
3
- shiny
3
+ shiny
4
+ radius
@@ -0,0 +1 @@
1
+ #3498db
@@ -0,0 +1,5 @@
1
+ secondary:green
2
+ tertiary:yellow
3
+ background:rgba(25,228,20,0.5) //set more vars than just primary
4
+ primary:#477
5
+ paragraph:red//if available, import file, else, use explicit declaration
@@ -0,0 +1,3 @@
1
+ background:rgba(25,228,20,0.5) //set more vars than just primary
2
+ primary:#477
3
+ paragraph:red//if available, import file, else, use explicit declaration
@@ -0,0 +1 @@
1
+ border: 2px solid #d4d9dd;
@@ -0,0 +1 @@
1
+ border: 2px solid #e8ebed;
@@ -0,0 +1,20 @@
1
+ small.error{
2
+ padding: 0.56rem 0.5625rem 0.5625rem;
3
+ padding-left: -30px;
4
+ margin-bottom: 1rem;
5
+ font-size: 0.75rem;
6
+ font-weight: normal;
7
+ border-radius: $global-radius;
8
+ font-weight: 200;
9
+ }
10
+ small.error:before{
11
+ position: relative;
12
+ display: inline-block;
13
+ border-left: 7px solid transparent;
14
+ border-right: 7px solid transparent;
15
+ border-bottom: 7px solid $alert-color;
16
+ left: 2px;
17
+ top: -19px;
18
+ margin-right:-14px;
19
+ content: '';
20
+ }
@@ -0,0 +1 @@
1
+ margin-bottom: 15px;
@@ -0,0 +1,36 @@
1
+ div.error{
2
+ *{
3
+ background: lighten($alert-color, 40%);
4
+ border: 2px solid lighten($alert-color, 40%);
5
+ border-top: 2px solid $alert-color;
6
+ }
7
+ *:focus{
8
+ background: white;
9
+ border-color: 2px solid $alert-color;
10
+ }
11
+ }
12
+ small.error{
13
+ padding: 3px 0px 3px -30px;
14
+ margin-bottom: 1rem;
15
+ font-size: 0.75rem;
16
+ font-weight: normal;
17
+ border-radius: $global-radius;
18
+ font-weight: 200;
19
+
20
+ border: 1px solid $alert-color, 6%;
21
+ border-bottom: 4px solid darken($alert-color, 6%);
22
+ box-shadow: 0 -1px 0 rgba(255,255,255,0.05) inset;
23
+ -moz-box-shadow: 0 -1px 0 rgba(255,255,255,0.05) inset;
24
+ -webkit-box-shadow: 0 -1px 0 rgba(255,255,255,0.05) inset;
25
+ }
26
+ small.error:before{
27
+ position: relative;
28
+ display: inline-block;
29
+ border-left: 7px solid transparent;
30
+ border-right: 7px solid transparent;
31
+ border-bottom: 7px solid $alert-color;
32
+ left: 2px;
33
+ top: -19px;
34
+ margin-right:-14px;
35
+ content: '';
36
+ }
@@ -0,0 +1,2 @@
1
+ background: #fff;
2
+ border: 2px solid $primary-color;
@@ -0,0 +1,3 @@
1
+ background: #ebf0f2;
2
+ border: 2px solid #ebf0f2;
3
+ border-top: 2px solid #dbe3e7;
@@ -0,0 +1 @@
1
+ border-radius: $global-radius;
@@ -0,0 +1 @@
1
+ border-radius: $global-rounded;
@@ -0,0 +1,10 @@
1
+ div.error{
2
+ *{
3
+ background-color: lighten($alert-color, 40%);
4
+ border-color: lighten($alert-color, 40%);
5
+ }
6
+ *:focus{
7
+ background: white;
8
+ border-color: $alert-color;
9
+ }
10
+ }
@@ -0,0 +1 @@
1
+ background: #fff;
@@ -0,0 +1 @@
1
+ background: #e8ebed;
@@ -0,0 +1,5 @@
1
+ radius
2
+ shaded
3
+ bubble
4
+ 2px-border
5
+ margin-bottom
@@ -0,0 +1 @@
1
+ transparent
@@ -0,0 +1,3 @@
1
+ radius
2
+ plastic-bubble
3
+ margin-bottom
@@ -0,0 +1 @@
1
+ tight
@@ -0,0 +1,3 @@
1
+ small.error{
2
+ font-weight: 200;
3
+ }
@@ -0,0 +1,3 @@
1
+ padding: 0.3rem;
2
+ height: 1.7rem;
3
+ line-height: 1rem;
@@ -0,0 +1,7 @@
1
+ [data-abide] .error small.error{
2
+ background: white;
3
+ border-color: white;
4
+ color: $alert-color;
5
+ font-weight: 200;
6
+ margin: 0;
7
+ }
File without changes
File without changes
@@ -1,9 +1,37 @@
1
1
  //STYLE OVERRIDES
2
- //take away asterix
3
- div.required{
4
- abbr{
5
- display: none;
6
- }
2
+ input[type="text"],
3
+ input[type="password"],
4
+ input[type="date"],
5
+ input[type="datetime"],
6
+ input[type="datetime-local"],
7
+ input[type="month"],
8
+ input[type="week"],
9
+ input[type="email"],
10
+ input[type="number"],
11
+ input[type="search"],
12
+ input[type="tel"],
13
+ input[type="time"],
14
+ input[type="url"],
15
+ input[type="color"],
16
+ textarea {
17
+ //&*default
18
+ }
19
+ input[type="text"]:focus,
20
+ input[type="password"]:focus,
21
+ input[type="date"]:focus,
22
+ input[type="datetime"]:focus,
23
+ input[type="datetime-local"]:focus,
24
+ input[type="month"]:focus,
25
+ input[type="week"]:focus,
26
+ input[type="email"]:focus,
27
+ input[type="number"]:focus,
28
+ input[type="search"]:focus,
29
+ input[type="tel"]:focus,
30
+ input[type="time"]:focus,
31
+ input[type="url"]:focus,
32
+ input[type="color"]:focus,
33
+ textarea:focus {
34
+ //&*focus
7
35
  }
8
36
 
9
37
  div.error{
@@ -13,8 +41,12 @@ div.error{
13
41
  *:focus{
14
42
  border-color: $alert-color;
15
43
  }
16
- }
44
+ }//&*error
17
45
 
18
- //VARIABLES TO GENERATE
19
46
 
20
- //BUILDER
47
+ //take away asterix
48
+ div.required{
49
+ abbr{
50
+ display: none;
51
+ }
52
+ }
@@ -0,0 +1,2 @@
1
+ //@import
2
+ //font
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.3.0"
7
+ spec.version = "0.4.1"
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.3.0
4
+ version: 0.4.1
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-17 00:00:00.000000000 Z
11
+ date: 2014-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: foundation-rails
@@ -79,11 +79,9 @@ files:
79
79
  - README.md
80
80
  - Rakefile
81
81
  - lib/staple.rb
82
- - lib/staple/amputate_generator.rb
83
- - lib/staple/append_generator.rb
84
- - lib/staple/import_generator.rb
82
+ - lib/staple/buttons_generator.rb
83
+ - lib/staple/forms_generator.rb
85
84
  - lib/staple/install_generator.rb
86
- - lib/staple/remove_generator.rb
87
85
  - lib/staple/theme_generator.rb
88
86
  - source/simple_form/_form.html.slim
89
87
  - source/styles/buttons/big-bottom-border.scss
@@ -100,10 +98,34 @@ files:
100
98
  - source/styles/buttons/text-shadow.scss
101
99
  - source/styles/buttons/themes/plastic.theme
102
100
  - source/styles/buttons/transparent.scss
101
+ - source/styles/colors/blue.scss
102
+ - source/styles/colors/themes/flatland.theme
103
+ - source/styles/colors/themes/plastic.theme
104
+ - source/styles/forms/2px-border-focus.scss
105
+ - source/styles/forms/2px-border.scss
106
+ - source/styles/forms/bubble-error.scss
107
+ - source/styles/forms/margin-bottom.scss
108
+ - source/styles/forms/plastic-bubble-error.scss
109
+ - source/styles/forms/plastic-bubble-focus.scss
110
+ - source/styles/forms/plastic-bubble.scss
111
+ - source/styles/forms/radius.scss
112
+ - source/styles/forms/round.scss
113
+ - source/styles/forms/shaded-error.scss
114
+ - source/styles/forms/shaded-focus.scss
115
+ - source/styles/forms/shaded.scss
116
+ - source/styles/forms/themes/flat.theme
117
+ - source/styles/forms/themes/gradient.theme
118
+ - source/styles/forms/themes/plastic.theme
119
+ - source/styles/forms/themes/pro.theme
120
+ - source/styles/forms/tight-error.scss
121
+ - source/styles/forms/tight.scss
122
+ - source/styles/forms/transparent-error.scss
103
123
  - source/styles/foundation_and_overrides.scss
104
124
  - source/styles/staple/builders/build_buttons.scss
105
125
  - source/styles/staple/builders/build_colors.scss
126
+ - source/styles/staple/builders/build_forms.scss
106
127
  - source/styles/staple/builders/build_sizes.scss
128
+ - source/styles/staple/builders/build_tables.scss
107
129
  - source/styles/staple/builders/build_typography.scss
108
130
  - source/styles/staple/buttons.scss
109
131
  - source/styles/staple/colors.scss
@@ -116,6 +138,7 @@ files:
116
138
  - source/styles/staple/tables.scss
117
139
  - source/styles/staple/typography.scss
118
140
  - source/styles/staple/utilities.scss
141
+ - source/styles/typography/roboto.scss
119
142
  - staple.gemspec
120
143
  homepage: https://github.com/rhelsing/staple
121
144
  licenses:
@@ -1,46 +0,0 @@
1
- require 'rails/generators'
2
-
3
- module Staple
4
- class AmputateGenerator < Rails::Generators::Base
5
- desc 'remove styles from default'
6
- source_root File.join(File.dirname(__FILE__), '..', '..')
7
- argument :actions, :type => :array, :default => []
8
-
9
- def amputate_styles
10
- gsub_file "app/assets/stylesheets/staple/#{component}.scss", "\n.#{component.singularize}.#{pattern}{\n\t#{contents}\n}", "" if contents
11
- gsub_file "app/assets/stylesheets/staple/builders/build_#{component}.scss", "\n.#{component.singularize}.\#{$class}.#{pattern}{\n\t#{contents}\n}", "" if contents
12
- gsub_file "app/assets/stylesheets/staple/#{component}.scss", "\n.#{component.singularize}.#{pattern}:hover{\n\t#{hover}\n}", "" if hover
13
- gsub_file "app/assets/stylesheets/staple/builders/build_#{component}.scss", "\n.#{component.singularize}.\#{$class}.#{pattern}:hover{\n\t#{hover}\n}", "" if hover
14
- puts "invalid operation. for available actions: rails g staple:list [option]" if !contents
15
- end
16
-
17
- private
18
-
19
- def contents
20
- file = File.join(self.class.source_root, 'source', 'styles', "#{component}", "#{pattern.dasherize}.scss")
21
- get_file(file)
22
- end
23
-
24
- def hover
25
- file = File.join(self.class.source_root, 'source', 'styles', "#{component}", "#{pattern.dasherize}-hover.scss")
26
- get_file(file)
27
- end
28
-
29
- def get_file(file)
30
- if File.file?(file)
31
- return File.read(file)
32
- else
33
- return false
34
- end
35
- end
36
-
37
- def component
38
- actions[0]
39
- end
40
-
41
- def pattern
42
- actions[1]
43
- end
44
-
45
- end
46
- end
@@ -1,46 +0,0 @@
1
- require 'rails/generators'
2
-
3
- module Staple
4
- class AppendGenerator < Rails::Generators::Base
5
- desc 'append the staple'
6
- source_root File.join(File.dirname(__FILE__), '..', '..')
7
- argument :actions, :type => :array, :default => []
8
-
9
- def append_styles
10
- gsub_file "app/assets/stylesheets/staple/#{component}.scss", "//&*append", "\n.#{component.singularize}.#{pattern}{\n\t#{contents}\n}//&*append" if contents
11
- gsub_file "app/assets/stylesheets/staple/builders/build_#{component}.scss", "//&*append", "\n.#{component.singularize}.\#{$class}.#{pattern}{\n\t#{contents}\n}//&*append" if contents
12
- gsub_file "app/assets/stylesheets/staple/#{component}.scss", "//&*append", "\n.#{component.singularize}.#{pattern}:hover{\n\t#{hover}\n}//&*append" if hover
13
- gsub_file "app/assets/stylesheets/staple/builders/build_#{component}.scss", "//&*append", "\n.#{component.singularize}.\#{$class}.#{pattern}:hover{\n\t#{hover}\n}//&*append" if hover
14
- puts "invalid operation. for available actions: rails g staple:list [option]" if !contents
15
- end
16
-
17
- private
18
-
19
- def contents
20
- file = File.join(self.class.source_root, 'source', 'styles', "#{component}", "#{pattern.dasherize}.scss")
21
- get_file(file)
22
- end
23
-
24
- def hover
25
- file = File.join(self.class.source_root, 'source', 'styles', "#{component}", "#{pattern.dasherize}-hover.scss")
26
- get_file(file)
27
- end
28
-
29
- def get_file(file)
30
- if File.file?(file)
31
- return File.read(file)
32
- else
33
- return false
34
- end
35
- end
36
-
37
- def component
38
- actions[0]
39
- end
40
-
41
- def pattern
42
- actions[1]
43
- end
44
-
45
- end
46
- end
@@ -1,46 +0,0 @@
1
- require 'rails/generators'
2
-
3
- module Staple
4
- class ImportGenerator < Rails::Generators::Base
5
- desc 'bring in the staple'
6
- source_root File.join(File.dirname(__FILE__), '..', '..')
7
- argument :actions, :type => :array, :default => []
8
-
9
- def import_styles
10
- gsub_file "app/assets/stylesheets/staple/#{component}.scss", "//&*default", "\n\t#{contents}//&*default" if contents
11
- gsub_file "app/assets/stylesheets/staple/builders/build_#{component}.scss", "//&*default", "\n\t\t#{contents}//&*default" if contents
12
- gsub_file "app/assets/stylesheets/staple/#{component}.scss", "//&*hover", "\n\t#{hover}//&*hover" if hover
13
- gsub_file "app/assets/stylesheets/staple/builders/build_#{component}.scss", "//&*hover", "\n\t\t#{hover}//&*hover" if hover
14
- puts "invalid operation. for available actions: rails g staple:list [option]" if !contents
15
- end
16
-
17
- private
18
-
19
- def contents
20
- file = File.join(self.class.source_root, 'source', 'styles', "#{component}", "#{pattern.dasherize}.scss")
21
- get_file(file)
22
- end
23
-
24
- def hover
25
- file = File.join(self.class.source_root, 'source', 'styles', "#{component}", "#{pattern.dasherize}-hover.scss")
26
- get_file(file)
27
- end
28
-
29
- def get_file(file)
30
- if File.file?(file)
31
- return File.read(file)
32
- else
33
- return false
34
- end
35
- end
36
-
37
- def component
38
- actions[0]
39
- end
40
-
41
- def pattern
42
- actions[1]
43
- end
44
-
45
- end
46
- end
@@ -1,47 +0,0 @@
1
- require 'rails/generators'
2
-
3
- module Staple
4
- class RemoveGenerator < Rails::Generators::Base
5
- desc 'remove styles from default'
6
- source_root File.join(File.dirname(__FILE__), '..', '..')
7
- argument :actions, :type => :array, :default => []
8
-
9
- def remove_styles
10
- puts "remove from default"
11
- gsub_file "app/assets/stylesheets/staple/#{component}.scss", "\n\t#{contents}", "" if contents
12
- gsub_file "app/assets/stylesheets/staple/builders/build_#{component}.scss", "\n\t\t#{contents}", "" if contents
13
- gsub_file "app/assets/stylesheets/staple/#{component}.scss", "\n\t#{hover}", "" if hover
14
- gsub_file "app/assets/stylesheets/staple/builders/build_#{component}.scss", "\n\t\t#{hover}", "" if hover
15
- puts "invalid operation. for available actions: rails g staple:list [option]" if !contents
16
- end
17
-
18
- private
19
-
20
- def contents
21
- file = File.join(self.class.source_root, 'source', 'styles', "#{component}", "#{pattern.dasherize}.scss")
22
- get_file(file)
23
- end
24
-
25
- def hover
26
- file = File.join(self.class.source_root, 'source', 'styles', "#{component}", "#{pattern.dasherize}-hover.scss")
27
- get_file(file)
28
- end
29
-
30
- def get_file(file)
31
- if File.file?(file)
32
- return File.read(file)
33
- else
34
- return false
35
- end
36
- end
37
-
38
- def component
39
- actions[0]
40
- end
41
-
42
- def pattern
43
- actions[1]
44
- end
45
-
46
- end
47
- end