staple 0.2.1 → 0.3.0
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.
- checksums.yaml +4 -4
- data/README.md +4 -5
- data/lib/staple/theme_generator.rb +61 -0
- data/lib/staple.rb +1 -0
- data/source/styles/buttons/big-bottom-border.scss +1 -0
- data/source/styles/buttons/{plastic.scss → shiny.scss} +0 -2
- data/source/styles/buttons/themes/plastic.theme +3 -0
- data/staple.gemspec +3 -3
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 057f797ed605504ea708276b4f4175a8b712a256
|
4
|
+
data.tar.gz: ccb5106661e47df2dc983c5de6897784d8182e91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 766448cca2e64d415e2040ee1dc0f5f815a54c7ea429c17483f64e96412c8b97632fd19254f773f63086a46a47c5f137c23af7a6c5ac4e71992edde2ec86d35c
|
7
|
+
data.tar.gz: 2d1a75a36b52c1f3c0f051cac1898717dad7949972f10ac7107dc8c179f79add5f887d877196c5b27700e826744607cd0031cef72fdd4c4e16676d8752833cf6
|
data/README.md
CHANGED
@@ -1,13 +1,11 @@
|
|
1
1
|
#staple
|
2
2
|
|
3
|
-
|
3
|
+
a modular ui framework for rails built on top of foundation and sass.
|
4
4
|
|
5
5
|
##todo
|
6
6
|
|
7
|
-
*
|
8
|
-
|
9
|
-
* seperate generator? Yes. will call lower level generators in order specified
|
10
|
-
* theme generator will call each component generator
|
7
|
+
* placement of triggers
|
8
|
+
* create patterns and themes
|
11
9
|
|
12
10
|
##lower priority todo
|
13
11
|
* declaring as dependency does not load it? vs don't require other gems
|
@@ -21,6 +19,7 @@ Modular UI framework for rails built on top of foundation and sass.
|
|
21
19
|
* border-size
|
22
20
|
* change ammount (color dif, hover dif)
|
23
21
|
* create executables
|
22
|
+
* Demarcate each pattern (atom) with comment
|
24
23
|
|
25
24
|
##Install
|
26
25
|
|
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module Staple
|
4
|
+
class ThemeGenerator < 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 call_generators
|
10
|
+
if global?
|
11
|
+
#call self with each
|
12
|
+
components = %w(buttons colors forms sizes tables typography)
|
13
|
+
components.each do |c|
|
14
|
+
generate "staple:theme", "#{c}", "#{theme}"
|
15
|
+
end
|
16
|
+
else
|
17
|
+
if theme_definition
|
18
|
+
patterns = theme_definition.split("\n")
|
19
|
+
patterns.each do |pattern|
|
20
|
+
generate "staple:import", "#{component}", "#{pattern}"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def theme_definition
|
29
|
+
file = File.join(self.class.source_root, 'source', 'styles', "#{component}", "themes", "#{theme.dasherize}.theme")
|
30
|
+
get_file(file)
|
31
|
+
end
|
32
|
+
|
33
|
+
def get_file(file)
|
34
|
+
if File.file?(file)
|
35
|
+
File.read(file)
|
36
|
+
else
|
37
|
+
false
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def global?
|
42
|
+
if component=="global"
|
43
|
+
true
|
44
|
+
else
|
45
|
+
false
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def component
|
50
|
+
actions[0]
|
51
|
+
end
|
52
|
+
|
53
|
+
def theme
|
54
|
+
actions[1]
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
#rails g staple:theme buttons plastic
|
61
|
+
#rails g staple:theme global plastic
|
data/lib/staple.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
border-bottom: 4px solid darken($primary-color, 6%);//big border bottom
|
@@ -1,5 +1,3 @@
|
|
1
|
-
border: 1px solid darken($primary-color, 6%);//border
|
2
|
-
border-bottom: 4px solid darken($primary-color, 6%);//big border bottom
|
3
1
|
box-shadow: 0 -1px 0 rgba(255,255,255,0.05) inset;//shiny
|
4
2
|
-moz-box-shadow: 0 -1px 0 rgba(255,255,255,0.05) inset;//shiny
|
5
3
|
-webkit-box-shadow: 0 -1px 0 rgba(255,255,255,0.05) inset;//shiny
|
data/staple.gemspec
CHANGED
@@ -4,9 +4,9 @@ $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.
|
8
|
-
spec.summary = "Modular UI framework for rails built on top of foundation and sass
|
9
|
-
spec.description = "
|
7
|
+
spec.version = "0.3.0"
|
8
|
+
spec.summary = "Modular UI framework for rails built on top of foundation and sass"
|
9
|
+
spec.description = "a modular ui framework for rails built on top of foundation and sass."
|
10
10
|
spec.authors = ["Ryan Helsing"]
|
11
11
|
spec.email = ["ryan.helsing@centerian.com"]
|
12
12
|
spec.homepage = "https://github.com/rhelsing/staple"
|
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
|
+
version: 0.3.0
|
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-
|
11
|
+
date: 2014-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foundation-rails
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '2.1'
|
69
|
-
description:
|
69
|
+
description: a modular ui framework for rails built on top of foundation and sass.
|
70
70
|
email:
|
71
71
|
- ryan.helsing@centerian.com
|
72
72
|
executables: []
|
@@ -84,18 +84,21 @@ files:
|
|
84
84
|
- lib/staple/import_generator.rb
|
85
85
|
- lib/staple/install_generator.rb
|
86
86
|
- lib/staple/remove_generator.rb
|
87
|
+
- lib/staple/theme_generator.rb
|
87
88
|
- source/simple_form/_form.html.slim
|
89
|
+
- source/styles/buttons/big-bottom-border.scss
|
88
90
|
- source/styles/buttons/border.scss
|
89
91
|
- source/styles/buttons/gradient-hover.scss
|
90
92
|
- source/styles/buttons/gradient.scss
|
91
93
|
- source/styles/buttons/inverse-transparent.scss
|
92
94
|
- source/styles/buttons/inverse.scss
|
93
|
-
- source/styles/buttons/plastic.scss
|
94
95
|
- source/styles/buttons/radius.scss
|
95
96
|
- source/styles/buttons/round.scss
|
96
97
|
- source/styles/buttons/shadow.scss
|
98
|
+
- source/styles/buttons/shiny.scss
|
97
99
|
- source/styles/buttons/text-shadow-inner.scss
|
98
100
|
- source/styles/buttons/text-shadow.scss
|
101
|
+
- source/styles/buttons/themes/plastic.theme
|
99
102
|
- source/styles/buttons/transparent.scss
|
100
103
|
- source/styles/foundation_and_overrides.scss
|
101
104
|
- source/styles/staple/builders/build_buttons.scss
|
@@ -137,5 +140,5 @@ rubyforge_project:
|
|
137
140
|
rubygems_version: 2.4.2
|
138
141
|
signing_key:
|
139
142
|
specification_version: 4
|
140
|
-
summary: Modular UI framework for rails built on top of foundation and sass
|
143
|
+
summary: Modular UI framework for rails built on top of foundation and sass
|
141
144
|
test_files: []
|