sb-styleguide 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +21 -16
- data/.rvmrc +1 -0
- data/Gemfile +45 -3
- data/Gemfile.lock +195 -0
- data/Guardfile +9 -0
- data/LICENSE +2 -2
- data/README.md +53 -3
- data/Rakefile +30 -0
- data/app/assets/images/rails.png +0 -0
- data/app/assets/javascripts/application.js +17 -0
- data/app/assets/javascripts/lib/modernizr.js +4 -0
- data/app/assets/stylesheets/application.css.scss +72 -0
- data/app/assets/stylesheets/coderay_githubish.css.scss +131 -0
- data/app/controllers/application_controller.rb +3 -0
- data/app/controllers/javascripts_controller.rb +4 -0
- data/app/controllers/ui_controller.rb +2 -0
- data/app/helpers/application_helper.rb +13 -0
- data/app/helpers/javascripts_helper.rb +2 -0
- data/app/helpers/ui_helper.rb +2 -0
- data/app/mailers/.gitkeep +0 -0
- data/app/models/.gitkeep +0 -0
- data/app/views/javascripts/_js_nav.html.haml +5 -0
- data/app/views/javascripts/index.html.haml +45 -0
- data/app/views/layouts/_main_nav.html.haml +15 -0
- data/app/views/layouts/application.html.haml +41 -0
- data/app/views/shared/_placeholder_text.html.haml +1 -0
- data/app/views/type/_headings.haml +6 -0
- data/app/views/type/_paragraphs.haml +4 -0
- data/app/views/ui/_ui_nav.html.haml +13 -0
- data/app/views/ui/alert.html.haml +35 -0
- data/app/views/ui/buttons.html.haml +116 -0
- data/app/views/ui/footer.html.haml +69 -0
- data/app/views/ui/forms.html.haml +59 -0
- data/app/views/ui/forms/_vertical_form.haml +7 -0
- data/app/views/ui/grids.html.haml +18 -0
- data/app/views/ui/index.html.haml +5 -0
- data/app/views/ui/labels.html.haml +15 -0
- data/app/views/ui/modules/panel.html.haml +3 -0
- data/app/views/ui/nav.html.haml +48 -0
- data/app/views/ui/tabs.html.haml +171 -0
- data/app/views/ui/typography.html.haml +128 -0
- data/db/development.sqlite3 +0 -0
- data/db/seeds.rb +7 -0
- data/doc/README_FOR_APP +2 -0
- data/lib/assets/.gitkeep +0 -0
- data/lib/sb-styleguide.rb +5 -1
- data/lib/sb-styleguide/version.rb +1 -1
- data/lib/tasks/.gitkeep +0 -0
- data/log/.gitkeep +0 -0
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +25 -0
- data/public/favicon.ico +0 -0
- data/public/robots.txt +5 -0
- data/sb-styleguide.gemspec +15 -2
- data/script/rails +6 -0
- data/spec/javascripts/fixtures/plugins/tbg-close_fixture.html.haml +4 -0
- data/spec/javascripts/fixtures/plugins/tbg-forms_fixture.html.haml +12 -0
- data/spec/javascripts/fixtures/plugins/tbg-switch_fixture.html.haml +11 -0
- data/spec/javascripts/plugins/tbg-close_spec.js.coffee +54 -0
- data/spec/javascripts/plugins/tbg-forms_spec.js.coffee +61 -0
- data/spec/javascripts/plugins/tbg-switch_spec.js.coffee +96 -0
- data/spec/javascripts/spec.js.coffee +2 -0
- data/vendor/assets/fonts/ss-social-circle.eot +0 -0
- data/vendor/assets/fonts/ss-social-circle.svg +139 -0
- data/vendor/assets/fonts/ss-social-circle.ttf +0 -0
- data/vendor/assets/fonts/ss-social-circle.woff +0 -0
- data/vendor/assets/fonts/ss-social-regular.eot +0 -0
- data/vendor/assets/fonts/ss-social-regular.svg +133 -0
- data/vendor/assets/fonts/ss-social-regular.ttf +0 -0
- data/vendor/assets/fonts/ss-social-regular.woff +0 -0
- data/vendor/assets/fonts/ss-social.js +75 -0
- data/vendor/assets/fonts/ss-standard.eot +0 -0
- data/vendor/assets/fonts/ss-standard.js +75 -0
- data/vendor/assets/fonts/ss-standard.svg +316 -0
- data/vendor/assets/fonts/ss-standard.ttf +0 -0
- data/vendor/assets/fonts/ss-standard.woff +0 -0
- data/vendor/assets/images/background.png +0 -0
- data/vendor/assets/images/logos/sb-logo-white.png +0 -0
- data/vendor/assets/images/logos/sb-logo-white.svg +5 -0
- data/vendor/assets/images/middleman.png +0 -0
- data/vendor/assets/index.html.haml +8 -0
- data/vendor/assets/javascripts/.gitkeep +0 -0
- data/vendor/assets/javascripts/styleguide/plugins/tbg-close.js.coffee +73 -0
- data/vendor/assets/javascripts/styleguide/plugins/tbg-forms.js.coffee +96 -0
- data/vendor/assets/javascripts/styleguide/plugins/tbg-switch.js.coffee +85 -0
- data/vendor/assets/stylesheets/.gitkeep +0 -0
- data/vendor/assets/stylesheets/_functions.scss +28 -0
- data/vendor/assets/stylesheets/_mixins.css.scss +163 -0
- data/vendor/assets/stylesheets/_settings.css.scss +116 -0
- data/vendor/assets/stylesheets/styleguide.css.scss +15 -0
- data/vendor/assets/stylesheets/styleguide/base/_all.css.scss +7 -0
- data/vendor/assets/stylesheets/styleguide/base/_buttons.css.scss +166 -0
- data/vendor/assets/stylesheets/styleguide/base/_form.css.scss +152 -0
- data/vendor/assets/stylesheets/styleguide/base/_labels.css.scss +42 -0
- data/vendor/assets/stylesheets/styleguide/base/_lists.css.scss +52 -0
- data/vendor/assets/stylesheets/styleguide/base/_reset.css.scss +258 -0
- data/vendor/assets/stylesheets/styleguide/base/_type.css.scss +306 -0
- data/vendor/assets/stylesheets/styleguide/base/webfonts/_all.css.scss +2 -0
- data/vendor/assets/stylesheets/styleguide/base/webfonts/ss-social.scss.css +56 -0
- data/vendor/assets/stylesheets/styleguide/base/webfonts/ss-standard.css.scss +47 -0
- data/vendor/assets/stylesheets/styleguide/grid/_grid.css.scss +106 -0
- data/vendor/assets/stylesheets/styleguide/layout/_all.css.scss +5 -0
- data/vendor/assets/stylesheets/styleguide/modules/_alert.css.scss +71 -0
- data/vendor/assets/stylesheets/styleguide/modules/_all-grid.css.scss +1 -0
- data/vendor/assets/stylesheets/styleguide/modules/_all-no-grid.css.scss +4 -0
- data/vendor/assets/stylesheets/styleguide/modules/_footer.css.scss +93 -0
- data/vendor/assets/stylesheets/styleguide/modules/_nav.css.scss +106 -0
- data/vendor/assets/stylesheets/styleguide/modules/_panel.css.scss +28 -0
- data/vendor/assets/stylesheets/styleguide/modules/_switch.css.scss +72 -0
- data/vendor/assets/views/buttons/_buttons.haml +9 -0
- data/vendor/assets/views/forms/_vertical_form.haml +7 -0
- data/vendor/assets/views/type/_headings.haml +6 -0
- data/vendor/assets/views/type/_paragraphs.haml +4 -0
- data/vendor/plugins/.gitkeep +0 -0
- metadata +280 -5
data/.gitignore
CHANGED
@@ -1,17 +1,22 @@
|
|
1
|
-
|
1
|
+
# Ignore the build directory
|
2
|
+
/build
|
3
|
+
|
4
|
+
# Ignore packages
|
5
|
+
/pkg
|
6
|
+
|
2
7
|
*.rbc
|
3
|
-
|
4
|
-
.
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
spec/
|
15
|
-
|
16
|
-
|
17
|
-
|
8
|
+
*.sassc
|
9
|
+
.sass-cache
|
10
|
+
capybara-*.html
|
11
|
+
.rspec
|
12
|
+
/.bundle
|
13
|
+
/vendor/bundle
|
14
|
+
/log/*
|
15
|
+
/tmp/*
|
16
|
+
/db/*.sqlite3
|
17
|
+
/public/system/*
|
18
|
+
/coverage/
|
19
|
+
/spec/tmp/*
|
20
|
+
**.orig
|
21
|
+
rerun.txt
|
22
|
+
pickle-email-*.html
|
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use 1.9.3-p194
|
data/Gemfile
CHANGED
@@ -1,4 +1,46 @@
|
|
1
|
-
source
|
1
|
+
source :rubygems
|
2
2
|
|
3
|
-
#
|
4
|
-
|
3
|
+
# Declare your gem's dependencies in sb-styleguide.gemspec.
|
4
|
+
# Bundler will treat runtime dependencies like base dependencies, and
|
5
|
+
# development dependencies will be added by default to the :development group.
|
6
|
+
gemspec :development_group => :dev
|
7
|
+
|
8
|
+
|
9
|
+
#
|
10
|
+
# Gems used only for assets and not required in production environments by default.
|
11
|
+
#
|
12
|
+
|
13
|
+
group :assets do
|
14
|
+
gem 'sass-rails', '~> 3.2.3'
|
15
|
+
gem 'coffee-rails', '~> 3.2.1'
|
16
|
+
gem 'compass-rails'
|
17
|
+
gem 'uglifier', '>= 1.0.3'
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
#
|
22
|
+
# Use haml for templates & generators
|
23
|
+
#
|
24
|
+
|
25
|
+
gem "haml"
|
26
|
+
gem "haml-rails"
|
27
|
+
gem "haml-coderay"
|
28
|
+
gem "maruku"
|
29
|
+
|
30
|
+
#
|
31
|
+
# Jquery rails - @TODO Is this needed?
|
32
|
+
#
|
33
|
+
|
34
|
+
gem 'jquery-rails'
|
35
|
+
|
36
|
+
|
37
|
+
#
|
38
|
+
# Javascript Testing
|
39
|
+
#
|
40
|
+
|
41
|
+
group :development, :test do
|
42
|
+
gem 'growl'
|
43
|
+
gem 'jasminerice', :git => "https://github.com/bradphelan/jasminerice"
|
44
|
+
gem "guard-jasmine"
|
45
|
+
gem 'jsPercolator', :git => "git@github.com:adtaylor/jsPercolator.git"
|
46
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,195 @@
|
|
1
|
+
GIT
|
2
|
+
remote: git@github.com:adtaylor/jsPercolator.git
|
3
|
+
revision: 7686a924d74cae9edd1b1ce1f5346c0b17b09142
|
4
|
+
specs:
|
5
|
+
jsPercolator (0.0.1)
|
6
|
+
|
7
|
+
GIT
|
8
|
+
remote: https://github.com/bradphelan/jasminerice
|
9
|
+
revision: ee4681169096fb15913b90cf15832e6b15e15a22
|
10
|
+
specs:
|
11
|
+
jasminerice (0.0.9)
|
12
|
+
coffee-rails
|
13
|
+
haml
|
14
|
+
|
15
|
+
PATH
|
16
|
+
remote: .
|
17
|
+
specs:
|
18
|
+
sb-styleguide (0.0.2)
|
19
|
+
actionpack (~> 3.1)
|
20
|
+
activesupport (~> 3.1)
|
21
|
+
compass-rails
|
22
|
+
haml (~> 3.1)
|
23
|
+
modular-scale (~> 1.0)
|
24
|
+
railties (~> 3.1)
|
25
|
+
sass-rails
|
26
|
+
|
27
|
+
GEM
|
28
|
+
remote: http://rubygems.org/
|
29
|
+
specs:
|
30
|
+
actionmailer (3.2.8)
|
31
|
+
actionpack (= 3.2.8)
|
32
|
+
mail (~> 2.4.4)
|
33
|
+
actionpack (3.2.8)
|
34
|
+
activemodel (= 3.2.8)
|
35
|
+
activesupport (= 3.2.8)
|
36
|
+
builder (~> 3.0.0)
|
37
|
+
erubis (~> 2.7.0)
|
38
|
+
journey (~> 1.0.4)
|
39
|
+
rack (~> 1.4.0)
|
40
|
+
rack-cache (~> 1.2)
|
41
|
+
rack-test (~> 0.6.1)
|
42
|
+
sprockets (~> 2.1.3)
|
43
|
+
activemodel (3.2.8)
|
44
|
+
activesupport (= 3.2.8)
|
45
|
+
builder (~> 3.0.0)
|
46
|
+
activerecord (3.2.8)
|
47
|
+
activemodel (= 3.2.8)
|
48
|
+
activesupport (= 3.2.8)
|
49
|
+
arel (~> 3.0.2)
|
50
|
+
tzinfo (~> 0.3.29)
|
51
|
+
activeresource (3.2.8)
|
52
|
+
activemodel (= 3.2.8)
|
53
|
+
activesupport (= 3.2.8)
|
54
|
+
activesupport (3.2.8)
|
55
|
+
i18n (~> 0.6)
|
56
|
+
multi_json (~> 1.0)
|
57
|
+
arel (3.0.2)
|
58
|
+
builder (3.0.0)
|
59
|
+
childprocess (0.3.5)
|
60
|
+
ffi (~> 1.0, >= 1.0.6)
|
61
|
+
chunky_png (1.2.6)
|
62
|
+
coderay (1.0.7)
|
63
|
+
coffee-rails (3.2.2)
|
64
|
+
coffee-script (>= 2.2.0)
|
65
|
+
railties (~> 3.2.0)
|
66
|
+
coffee-script (2.2.0)
|
67
|
+
coffee-script-source
|
68
|
+
execjs
|
69
|
+
coffee-script-source (1.3.3)
|
70
|
+
compass (0.12.2)
|
71
|
+
chunky_png (~> 1.2)
|
72
|
+
fssm (>= 0.2.7)
|
73
|
+
sass (~> 3.1)
|
74
|
+
compass-rails (1.0.2)
|
75
|
+
compass (>= 0.12.0, < 0.14)
|
76
|
+
erubis (2.7.0)
|
77
|
+
execjs (1.4.0)
|
78
|
+
multi_json (~> 1.0)
|
79
|
+
ffi (1.1.5)
|
80
|
+
fssm (0.2.9)
|
81
|
+
growl (1.0.3)
|
82
|
+
guard (1.3.2)
|
83
|
+
listen (>= 0.4.2)
|
84
|
+
thor (>= 0.14.6)
|
85
|
+
guard-jasmine (1.7.0)
|
86
|
+
childprocess
|
87
|
+
guard (>= 1.1.0)
|
88
|
+
multi_json
|
89
|
+
thor
|
90
|
+
haml (3.1.7)
|
91
|
+
haml-coderay (0.1.2)
|
92
|
+
coderay
|
93
|
+
haml
|
94
|
+
haml-rails (0.3.4)
|
95
|
+
actionpack (~> 3.0)
|
96
|
+
activesupport (~> 3.0)
|
97
|
+
haml (~> 3.0)
|
98
|
+
railties (~> 3.0)
|
99
|
+
hike (1.2.1)
|
100
|
+
i18n (0.6.0)
|
101
|
+
journey (1.0.4)
|
102
|
+
jquery-rails (2.1.1)
|
103
|
+
railties (>= 3.1.0, < 5.0)
|
104
|
+
thor (~> 0.14)
|
105
|
+
json (1.7.4)
|
106
|
+
listen (0.4.7)
|
107
|
+
rb-fchange (~> 0.0.5)
|
108
|
+
rb-fsevent (~> 0.9.1)
|
109
|
+
rb-inotify (~> 0.8.8)
|
110
|
+
mail (2.4.4)
|
111
|
+
i18n (>= 0.4.0)
|
112
|
+
mime-types (~> 1.16)
|
113
|
+
treetop (~> 1.4.8)
|
114
|
+
maruku (0.6.0)
|
115
|
+
syntax (>= 1.0.0)
|
116
|
+
mime-types (1.19)
|
117
|
+
modular-scale (1.0.2)
|
118
|
+
compass (>= 0.11.5)
|
119
|
+
sassy-math (>= 1.2)
|
120
|
+
multi_json (1.3.6)
|
121
|
+
polyglot (0.3.3)
|
122
|
+
rack (1.4.1)
|
123
|
+
rack-cache (1.2)
|
124
|
+
rack (>= 0.4)
|
125
|
+
rack-ssl (1.3.2)
|
126
|
+
rack
|
127
|
+
rack-test (0.6.1)
|
128
|
+
rack (>= 1.0)
|
129
|
+
rails (3.2.8)
|
130
|
+
actionmailer (= 3.2.8)
|
131
|
+
actionpack (= 3.2.8)
|
132
|
+
activerecord (= 3.2.8)
|
133
|
+
activeresource (= 3.2.8)
|
134
|
+
activesupport (= 3.2.8)
|
135
|
+
bundler (~> 1.0)
|
136
|
+
railties (= 3.2.8)
|
137
|
+
railties (3.2.8)
|
138
|
+
actionpack (= 3.2.8)
|
139
|
+
activesupport (= 3.2.8)
|
140
|
+
rack-ssl (~> 1.3.2)
|
141
|
+
rake (>= 0.8.7)
|
142
|
+
rdoc (~> 3.4)
|
143
|
+
thor (>= 0.14.6, < 2.0)
|
144
|
+
rake (0.9.2.2)
|
145
|
+
rb-fchange (0.0.5)
|
146
|
+
ffi
|
147
|
+
rb-fsevent (0.9.1)
|
148
|
+
rb-inotify (0.8.8)
|
149
|
+
ffi (>= 0.5.0)
|
150
|
+
rdoc (3.12)
|
151
|
+
json (~> 1.4)
|
152
|
+
sass (3.2.1)
|
153
|
+
sass-rails (3.2.5)
|
154
|
+
railties (~> 3.2.0)
|
155
|
+
sass (>= 3.1.10)
|
156
|
+
tilt (~> 1.3)
|
157
|
+
sassy-math (1.2)
|
158
|
+
compass (~> 0.11)
|
159
|
+
sprockets (2.1.3)
|
160
|
+
hike (~> 1.2)
|
161
|
+
rack (~> 1.0)
|
162
|
+
tilt (~> 1.1, != 1.3.0)
|
163
|
+
sqlite3 (1.3.6)
|
164
|
+
syntax (1.0.0)
|
165
|
+
thor (0.15.4)
|
166
|
+
tilt (1.3.3)
|
167
|
+
treetop (1.4.10)
|
168
|
+
polyglot
|
169
|
+
polyglot (>= 0.3.1)
|
170
|
+
tzinfo (0.3.33)
|
171
|
+
uglifier (1.2.7)
|
172
|
+
execjs (>= 0.3.0)
|
173
|
+
multi_json (~> 1.3)
|
174
|
+
|
175
|
+
PLATFORMS
|
176
|
+
ruby
|
177
|
+
|
178
|
+
DEPENDENCIES
|
179
|
+
bundler (~> 1.1.0)
|
180
|
+
coffee-rails (~> 3.2.1)
|
181
|
+
compass-rails
|
182
|
+
growl
|
183
|
+
guard-jasmine
|
184
|
+
haml
|
185
|
+
haml-coderay
|
186
|
+
haml-rails
|
187
|
+
jasminerice!
|
188
|
+
jquery-rails
|
189
|
+
jsPercolator!
|
190
|
+
maruku
|
191
|
+
rails (~> 3.1)
|
192
|
+
sass-rails (~> 3.2.3)
|
193
|
+
sb-styleguide!
|
194
|
+
sqlite3
|
195
|
+
uglifier (>= 1.0.3)
|
data/Guardfile
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
guard 'jasmine' do
|
4
|
+
watch(%r{spec/javascripts/spec\.(js\.coffee|js|coffee)$}) { "spec/javascripts" }
|
5
|
+
watch(%r{spec/javascripts/.+_spec\.(js\.coffee|js|coffee)$})
|
6
|
+
watch(%r{spec/javascripts/fixtures/(.+?)\.html\.haml})
|
7
|
+
watch(%r{vendor/assets/javascripts/plugins/(.+?)\.(js\.coffee|js|coffee)$}) { |m| "spec/javascripts/#{m[1]}_spec.#{m[2]}" }
|
8
|
+
end
|
9
|
+
|
data/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2012 TODO:
|
1
|
+
Copyright (c) 2012 TODO: The Beans Group LTD
|
2
2
|
|
3
3
|
MIT License
|
4
4
|
|
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
19
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
20
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
21
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -2,6 +2,29 @@
|
|
2
2
|
|
3
3
|
TODO: Write a gem description
|
4
4
|
|
5
|
+
## Development Workflow
|
6
|
+
|
7
|
+
Clone the repository:
|
8
|
+
|
9
|
+
git clone https://github.com/thebeansgroup/sb-styleguide.git
|
10
|
+
|
11
|
+
Checkout the develop branch
|
12
|
+
|
13
|
+
git checkout develop
|
14
|
+
|
15
|
+
Create a new branch for the feature you want to work on:
|
16
|
+
|
17
|
+
git checkout -b feature/[name-of-feature]
|
18
|
+
|
19
|
+
To run the site, use the middleman server:
|
20
|
+
|
21
|
+
middleman server
|
22
|
+
|
23
|
+
# Or use the alias
|
24
|
+
mms
|
25
|
+
|
26
|
+
**NB: ** Ensure that you are _adding_ and _committing_ files into your branch as you go along. It is also good practive to _push_ the branch to github at the end of your development session, this enusres global access to the markup you have changed.
|
27
|
+
|
5
28
|
## Installation
|
6
29
|
|
7
30
|
Add this line to your application's Gemfile:
|
@@ -18,12 +41,39 @@ Or install it yourself as:
|
|
18
41
|
|
19
42
|
## Usage
|
20
43
|
|
21
|
-
|
44
|
+
### Javascript
|
45
|
+
All javascripts provided by this styleguide can be pulled into the asset pipeline
|
46
|
+
with the normal require command:
|
47
|
+
|
48
|
+
//= require test
|
49
|
+
|
50
|
+
### Stylesheets
|
51
|
+
All stylesheets provided by this styleguide can be pulled into the asset pipeline
|
52
|
+
with the normal require command:
|
53
|
+
|
54
|
+
//= require test
|
55
|
+
|
56
|
+
### Views/Partials
|
57
|
+
In order to include partials defined by the styleguide you will have to add the
|
58
|
+
styleguid's view path to your apps view path. The quickest way is by creating
|
59
|
+
a before filter in either the action where you want the views to be accessible
|
60
|
+
or, if you will be using the views often, you can define the filter in the
|
61
|
+
application controller.
|
62
|
+
|
63
|
+
before_filter :styleguide_view_path
|
64
|
+
|
65
|
+
private
|
66
|
+
def styleguide_view_path
|
67
|
+
gem = Gem.loaded_specs['sb-styleguide']
|
68
|
+
if gem
|
69
|
+
prepend_view_path "#{gem.full_gem_path}/vendor/assets/views"
|
70
|
+
end
|
71
|
+
end
|
22
72
|
|
23
73
|
## Contributing
|
24
74
|
|
25
75
|
1. Fork it
|
26
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
76
|
+
2. Create your feature branch (`git checkout -b my-new-feature develop`)
|
27
77
|
3. Commit your changes (`git commit -am 'Added some feature'`)
|
28
78
|
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
-
5. Create new Pull Request
|
79
|
+
5. Create new Pull Request, make sure your pull request target is the develop branch, not the master
|
data/Rakefile
CHANGED
@@ -1,2 +1,32 @@
|
|
1
1
|
#!/usr/bin/env rake
|
2
2
|
require "bundler/gem_tasks"
|
3
|
+
|
4
|
+
desc "Push Style Guide"
|
5
|
+
task :push_it do
|
6
|
+
abort "This feature has been disbaled for now."
|
7
|
+
end
|
8
|
+
|
9
|
+
#
|
10
|
+
# Start server
|
11
|
+
#
|
12
|
+
|
13
|
+
desc "Start Styleguide Server \[port 3001\]"
|
14
|
+
task :start do
|
15
|
+
puts ''
|
16
|
+
puts ''
|
17
|
+
puts '=============================='
|
18
|
+
puts ' STARTING THE STYLEGUIDE'
|
19
|
+
puts '=============================='
|
20
|
+
puts ''
|
21
|
+
system 'bundle exec rails s -p 3001'
|
22
|
+
end
|
23
|
+
|
24
|
+
|
25
|
+
begin
|
26
|
+
require 'jasmine'
|
27
|
+
load 'jasmine/tasks/jasmine.rake'
|
28
|
+
rescue LoadError
|
29
|
+
task :jasmine do
|
30
|
+
abort "Jasmine is not available. In order to run jasmine, you must: (sudo) gem install jasmine"
|
31
|
+
end
|
32
|
+
end
|
Binary file
|
@@ -0,0 +1,17 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require styleguide/plugins/tbg-switch
|
16
|
+
//= require styleguide/plugins/tbg-close
|
17
|
+
//= require_tree .
|
@@ -0,0 +1,4 @@
|
|
1
|
+
/* Modernizr 2.6.2 (Custom Build) | MIT & BSD
|
2
|
+
* Build: http://modernizr.com/download/#-cssanimations-csstransforms-csstransitions-hashchange-history-video-geolocation-svg-shiv-cssclasses-testprop-testallprops-hasevent-domprefixes-load
|
3
|
+
*/
|
4
|
+
;window.Modernizr=function(a,b,c){function z(a){j.cssText=a}function A(a,b){return z(prefixes.join(a+";")+(b||""))}function B(a,b){return typeof a===b}function C(a,b){return!!~(""+a).indexOf(b)}function D(a,b){for(var d in a){var e=a[d];if(!C(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function E(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:B(f,"function")?f.bind(d||b):f}return!1}function F(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+n.join(d+" ")+d).split(" ");return B(b,"string")||B(b,"undefined")?D(e,b):(e=(a+" "+o.join(d+" ")+d).split(" "),E(e,b,c))}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m="Webkit Moz O ms",n=m.split(" "),o=m.toLowerCase().split(" "),p={svg:"http://www.w3.org/2000/svg"},q={},r={},s={},t=[],u=t.slice,v,w=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=B(e[d],"function"),B(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),x={}.hasOwnProperty,y;!B(x,"undefined")&&!B(x.call,"undefined")?y=function(a,b){return x.call(a,b)}:y=function(a,b){return b in a&&B(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=u.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e}),q.geolocation=function(){return"geolocation"in navigator},q.hashchange=function(){return w("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},q.history=function(){return!!a.history&&!!history.pushState},q.cssanimations=function(){return F("animationName")},q.csstransforms=function(){return!!F("transform")},q.csstransitions=function(){return F("transition")},q.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},q.svg=function(){return!!b.createElementNS&&!!b.createElementNS(p.svg,"svg").createSVGRect};for(var G in q)y(q,G)&&(v=G.toLowerCase(),e[v]=q[G](),t.push((e[v]?"":"no-")+v));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)y(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},z(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function p(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return r.shivMethods?n(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(r,b.frag)}function q(a){a||(a=b);var c=m(a);return r.shivCSS&&!f&&!c.hasCSS&&(c.hasCSS=!!k(a,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),j||p(a,c),a}var c=a.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,e=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,f,g="_html5shiv",h=0,i={},j;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._domPrefixes=o,e._cssomPrefixes=n,e.hasEvent=w,e.testProp=function(a){return D([a])},e.testAllProps=F,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
|
@@ -0,0 +1,72 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
@import "styleguide";
|
4
|
+
|
5
|
+
// ======================================================
|
6
|
+
// Settings grids
|
7
|
+
// ======================================================
|
8
|
+
|
9
|
+
$baby: 'baby-', 2, 10px, "max-width: 655px";
|
10
|
+
$sister: 'sister-', 4, 15px, "max-width: 785px";
|
11
|
+
$mother: 'mother-', 12, 20px;
|
12
|
+
// Declare grid
|
13
|
+
$grids : $mother, $sister, $baby;
|
14
|
+
|
15
|
+
// Max container width
|
16
|
+
$container-width: 980px;
|
17
|
+
|
18
|
+
// ======================================================
|
19
|
+
// Stylguide
|
20
|
+
// ======================================================
|
21
|
+
|
22
|
+
@import "styleguide/base/_all";
|
23
|
+
@import "styleguide/modules/_all-grid";
|
24
|
+
@import "styleguide/modules/_all-no-grid";
|
25
|
+
|
26
|
+
|
27
|
+
// ======================================================
|
28
|
+
// Default grids
|
29
|
+
// ======================================================
|
30
|
+
|
31
|
+
@import "styleguide/grid/_grid";
|
32
|
+
|
33
|
+
|
34
|
+
// ======================================================
|
35
|
+
// Build grid sizes
|
36
|
+
// ======================================================
|
37
|
+
|
38
|
+
@include create-column-sizes($grids);
|
39
|
+
|
40
|
+
// ======================================================
|
41
|
+
// Styleguide only styles
|
42
|
+
// ======================================================
|
43
|
+
|
44
|
+
@import 'coderay_githubish';
|
45
|
+
|
46
|
+
|
47
|
+
//
|
48
|
+
// Preview display list
|
49
|
+
//
|
50
|
+
|
51
|
+
.sg-example, .CodeRay {
|
52
|
+
margin: $base-line-height-px 0;
|
53
|
+
}
|
54
|
+
|
55
|
+
.CodeRay {
|
56
|
+
background-color: #F8F8F7;
|
57
|
+
border-bottom: 3px solid $main-color;
|
58
|
+
|
59
|
+
.line-numbers {
|
60
|
+
margin-right: $column-gutter*2;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
|
65
|
+
hr {
|
66
|
+
margin: $base-line-height-px*2 0 $base-line-height-px;
|
67
|
+
height: 1px;
|
68
|
+
border: none;
|
69
|
+
color: mono(4);
|
70
|
+
background-color: mono(4);
|
71
|
+
}
|
72
|
+
|