refills 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.hound.yml +3 -2
- data/.ruby-version +1 -1
- data/.scss-lint.yml +97 -24
- data/CONTRIBUTING.md +4 -3
- data/Gemfile +13 -10
- data/README.md +31 -15
- data/circle.yml +7 -0
- data/config.rb +4 -13
- data/{lib → helpers}/snippet_helpers.rb +14 -6
- data/lib/refills/version.rb +1 -1
- data/refills.gemspec +2 -2
- data/sache.json +1 -1
- data/source/_badges.html.erb +1 -1
- data/source/_cards.html.erb +1 -1
- data/source/_centered_navigation.html.erb +5 -5
- data/source/_comment.html.erb +2 -2
- data/source/_device.html.erb +0 -1
- data/source/_expander.html.erb +2 -2
- data/source/_flex_boxes.html.erb +6 -6
- data/source/_footer.html.erb +1 -1
- data/source/_footer_2.html.erb +1 -1
- data/source/_grid_items.html.erb +7 -7
- data/source/_grid_items_lines.html.erb +8 -8
- data/source/_hero.html.erb +4 -9
- data/source/_icon_bullet_points.html.erb +6 -7
- data/source/_logo_section.html.erb +8 -0
- data/source/_modal.html.erb +2 -2
- data/source/_navigation.html.erb +2 -3
- data/source/_search_bar.html.erb +1 -1
- data/source/_search_tools.html.erb +54 -52
- data/source/_side_image.html.erb +0 -1
- data/source/_sliding_panel.html.erb +13 -0
- data/source/_type_system_geometric.html.erb +4 -3
- data/source/_type_system_rounded.html.erb +3 -3
- data/source/_type_system_sans.html.erb +3 -3
- data/source/_type_system_serif.html.erb +4 -4
- data/source/_type_system_slab.html.erb +3 -3
- data/source/_type_system_traditional.html.erb +3 -3
- data/source/components.html.erb +9 -5
- data/source/images/background-image.png +0 -0
- data/source/images/cosmin_capitanu_screen.jpg +0 -0
- data/source/images/new.svg +22 -0
- data/source/images/placeholder_square.png +0 -0
- data/source/images/placeholder_wide.png +0 -0
- data/source/images/placeholder_wider.png +0 -0
- data/source/index.html.erb +10 -3
- data/source/javascripts/jquery.erToc.js +1 -6
- data/source/javascripts/refills/accordion_base.js +5 -0
- data/source/javascripts/refills/accordion_tabs.js +1 -2
- data/source/javascripts/refills/accordion_tabs_minimal.js +1 -2
- data/source/javascripts/refills/base-accordion.js +5 -0
- data/source/javascripts/refills/centered_navigation.js +27 -9
- data/source/javascripts/refills/coffeescript/accordion.coffee +3 -4
- data/source/javascripts/refills/coffeescript/accordion_base.coffee +6 -0
- data/source/javascripts/refills/coffeescript/accordion_tabs.coffee +9 -12
- data/source/javascripts/refills/coffeescript/accordion_tabs_minimal.coffee +9 -12
- data/source/javascripts/refills/coffeescript/animate.coffee +4 -7
- data/source/javascripts/refills/coffeescript/base-accordion.coffee +5 -0
- data/source/javascripts/refills/coffeescript/centered_navigation.coffee +6 -8
- data/source/javascripts/refills/coffeescript/dropdown.coffee +6 -10
- data/source/javascripts/refills/coffeescript/expander.coffee +4 -6
- data/source/javascripts/refills/coffeescript/fade_in.coffee +6 -8
- data/source/javascripts/refills/coffeescript/modal.coffee +7 -11
- data/source/javascripts/refills/coffeescript/navigation.coffee +6 -8
- data/source/javascripts/refills/coffeescript/parallax.coffee +9 -8
- data/source/javascripts/refills/coffeescript/scroll_on_page.coffee +6 -11
- data/source/javascripts/refills/coffeescript/search_tools.coffee +0 -85
- data/source/javascripts/refills/coffeescript/sliding_panel.coffee +6 -0
- data/source/javascripts/refills/coffeescript/vertical_tabs.coffee +21 -21
- data/source/javascripts/refills/dropdown.js +8 -8
- data/source/javascripts/refills/expander.js +1 -4
- data/source/javascripts/refills/modal.js +1 -1
- data/source/javascripts/refills/navigation.js +26 -7
- data/source/javascripts/refills/navigation_centered.js +13 -0
- data/source/javascripts/refills/scroll_on_page.js +8 -5
- data/source/javascripts/refills/search_tools.js +2 -2
- data/source/javascripts/refills/sliding_panel.js +6 -0
- data/source/javascripts/refills/unstyled/accordion.js +5 -0
- data/source/javascripts/refills/unstyled/accordion_tabs.js +18 -0
- data/source/javascripts/refills/unstyled/dropdown.js +12 -0
- data/source/javascripts/refills/unstyled/expander.js +8 -0
- data/source/javascripts/refills/unstyled/modal.js +17 -0
- data/source/javascripts/refills/unstyled/navigation.js +13 -0
- data/source/javascripts/refills/unstyled/navigation_centered.js +13 -0
- data/source/javascripts/refills/unstyled/scroll_on_page.js +29 -0
- data/source/javascripts/refills/unstyled/sliding_panel.js +6 -0
- data/source/javascripts/refills/unstyled/vertical_tabs.js +32 -0
- data/source/layouts/layout.erb +3 -3
- data/source/refills-hero.html.erb +6 -3
- data/source/stylesheets/_bourbon-nav.scss +14 -7
- data/source/stylesheets/_refill.scss +215 -0
- data/source/stylesheets/_refills-footer.scss +62 -0
- data/source/stylesheets/_refills-header.scss +113 -0
- data/source/stylesheets/_refills-menu.scss +91 -0
- data/source/stylesheets/_refills-nav.scss +13 -13
- data/source/stylesheets/_refills-styles.scss +8 -644
- data/source/stylesheets/_refills-variables.scss +20 -0
- data/source/stylesheets/all.css.scss +78 -0
- data/source/stylesheets/refills/_accordion-tabs-minimal.scss +9 -14
- data/source/stylesheets/refills/_accordion-tabs.scss +11 -16
- data/source/stylesheets/refills/_accordion.scss +13 -29
- data/source/stylesheets/refills/_animate.scss +9 -10
- data/source/stylesheets/refills/_badges.scss +18 -35
- data/source/stylesheets/refills/_breadcrumbs.scss +15 -19
- data/source/stylesheets/refills/_button-group.scss +6 -12
- data/source/stylesheets/refills/_cards.scss +22 -31
- data/source/stylesheets/refills/_centered-navigation.scss +16 -13
- data/source/stylesheets/refills/_comment.scss +3 -6
- data/source/stylesheets/refills/_device.scss +29 -40
- data/source/stylesheets/refills/_dropdown.scss +17 -27
- data/source/stylesheets/refills/_expander.scss +14 -21
- data/source/stylesheets/refills/_fade-in.scss +7 -11
- data/source/stylesheets/refills/_flashes.scss +21 -33
- data/source/stylesheets/refills/_flex-boxes.scss +18 -26
- data/source/stylesheets/refills/_footer-2.scss +19 -33
- data/source/stylesheets/refills/_footer.scss +15 -38
- data/source/stylesheets/refills/_grid-items-lines.scss +12 -21
- data/source/stylesheets/refills/_grid-items.scss +31 -40
- data/source/stylesheets/refills/_hero.scss +22 -55
- data/source/stylesheets/refills/_hover-tile-animation.scss +8 -17
- data/source/stylesheets/refills/_icon-bullet-points.scss +26 -35
- data/source/stylesheets/refills/_image-gradient-dynamic.scss +31 -20
- data/source/stylesheets/refills/_logo-section.scss +25 -0
- data/source/stylesheets/refills/_maps.scss +2 -2
- data/source/stylesheets/refills/_modal.scss +32 -45
- data/source/stylesheets/refills/_navigation.scss +33 -39
- data/source/stylesheets/refills/_pagination.scss +10 -23
- data/source/stylesheets/refills/_progress-bar-indication.scss +8 -15
- data/source/stylesheets/refills/_progress-bar.scss +24 -26
- data/source/stylesheets/refills/_ribbon.scss +4 -5
- data/source/stylesheets/refills/_scroll-on-page.scss +12 -15
- data/source/stylesheets/refills/_search-bar.scss +6 -13
- data/source/stylesheets/refills/_search-tools.scss +41 -42
- data/source/stylesheets/refills/_side-image.scss +8 -20
- data/source/stylesheets/refills/_sliding-panel.scss +79 -0
- data/source/stylesheets/refills/_stats.scss +2 -3
- data/source/stylesheets/refills/_switch.scss +13 -16
- data/source/stylesheets/refills/_tables-minimal.scss +12 -24
- data/source/stylesheets/refills/_tables.scss +11 -20
- data/source/stylesheets/refills/_texture-legend.scss +17 -13
- data/source/stylesheets/refills/_textures.scss +13 -9
- data/source/stylesheets/refills/_tooltip.scss +9 -16
- data/source/stylesheets/refills/_type-system-geometric.scss +14 -17
- data/source/stylesheets/refills/_type-system-rounded.scss +19 -19
- data/source/stylesheets/refills/_type-system-sans.scss +26 -26
- data/source/stylesheets/refills/_type-system-serif.scss +17 -20
- data/source/stylesheets/refills/_type-system-slab.scss +14 -17
- data/source/stylesheets/refills/_type-system-traditional.scss +18 -21
- data/source/stylesheets/refills/_vertical-tabs.scss +26 -30
- data/source/stylesheets/refills/_video.scss +1 -1
- data/source/stylesheets/refills/unstyled/_accordion-tabs.scss +36 -0
- data/source/stylesheets/refills/unstyled/_accordion.scss +17 -0
- data/source/stylesheets/refills/unstyled/_button-group.scss +30 -0
- data/source/stylesheets/refills/unstyled/_cards.scss +20 -0
- data/source/stylesheets/refills/unstyled/_comment.scss +28 -0
- data/source/stylesheets/refills/unstyled/_dropdown.scss +42 -0
- data/source/stylesheets/refills/unstyled/_expander.scss +20 -0
- data/source/stylesheets/refills/unstyled/_footer.scss +64 -0
- data/source/stylesheets/refills/unstyled/_hover-menu.scss +60 -0
- data/source/stylesheets/refills/unstyled/_modal.scss +71 -0
- data/source/stylesheets/refills/unstyled/_navigation-centered.scss +92 -0
- data/source/stylesheets/refills/unstyled/_navigation.scss +82 -0
- data/source/stylesheets/refills/unstyled/_scroll-on-page.scss +22 -0
- data/source/stylesheets/refills/unstyled/_search-bar.scss +26 -0
- data/source/stylesheets/refills/unstyled/_sliding-panel.scss +36 -0
- data/source/stylesheets/refills/unstyled/_switch.scss +50 -0
- data/source/stylesheets/refills/unstyled/_tooltip.scss +36 -0
- data/source/stylesheets/refills/unstyled/_vertical-tabs.scss +53 -0
- data/source/stylesheets/vendor/prism.css +4 -4
- data/source/svgs/_menu_icon.html.erb +6 -0
- data/source/svgs/_refills_logo.html.erb +8 -0
- data/source/type-systems.html.erb +5 -1
- data/spec/refills/import_generator_spec.rb +1 -1
- metadata +59 -19
- data/.travis.yml +0 -8
- data/source/_sliding_menu.html.erb +0 -13
- data/source/images/placeholder_logo_1.png +0 -0
- data/source/images/placeholder_logo_1_dark.png +0 -0
- data/source/images/placeholder_logo_2.png +0 -0
- data/source/images/placeholder_logo_2_dark.png +0 -0
- data/source/images/placeholder_logo_3.png +0 -0
- data/source/images/placeholder_logo_3_dark.png +0 -0
- data/source/images/placeholder_logo_4.png +0 -0
- data/source/images/placeholder_logo_4_dark.png +0 -0
- data/source/javascripts/refills/sliding_menu.js +0 -6
- data/source/stylesheets/all.scss +0 -66
- data/source/stylesheets/refills/_sliding-menu.scss +0 -86
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbcf9786e52ff918c8307dfcb1710985f0c3ea4f
|
4
|
+
data.tar.gz: 43d5ef834a250929c73af2c3b1c544713797b503
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73b4a0e3c6e9d317b6b89605062924497900dc563ae620e14aff7570b4939283fbade375e460d74bf985996a9de26d077b78821948cb2f0950c4e6f0750a1bda
|
7
|
+
data.tar.gz: 208752ecfecc62e75f20c728402837047255a7fec3cd4cce1a8aa136f28abffafb2d5d22f5acb1e5faef057b24f19945002692a3a28aebd8d357c6fd3be3961b
|
data/.hound.yml
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3.0
|
data/.scss-lint.yml
CHANGED
@@ -1,18 +1,35 @@
|
|
1
|
+
# Up-to-date with SCSS-Lint v0.47
|
2
|
+
|
3
|
+
scss_files: "**/*.scss"
|
4
|
+
|
5
|
+
severity: warning
|
6
|
+
|
1
7
|
linters:
|
2
8
|
BangFormat:
|
3
9
|
enabled: true
|
4
10
|
space_before_bang: true
|
5
11
|
space_after_bang: false
|
6
12
|
|
13
|
+
BemDepth:
|
14
|
+
enabled: false
|
15
|
+
max_elements: 1
|
16
|
+
|
7
17
|
BorderZero:
|
18
|
+
enabled: true
|
19
|
+
convention: zero
|
20
|
+
|
21
|
+
ChainedClasses:
|
8
22
|
enabled: false
|
9
23
|
|
10
24
|
ColorKeyword:
|
11
|
-
enabled:
|
12
|
-
|
25
|
+
enabled: false
|
26
|
+
|
27
|
+
ColorVariable:
|
28
|
+
enabled: false
|
13
29
|
|
14
30
|
Comment:
|
15
31
|
enabled: true
|
32
|
+
style: silent
|
16
33
|
|
17
34
|
DebugStatement:
|
18
35
|
enabled: true
|
@@ -20,6 +37,9 @@ linters:
|
|
20
37
|
DeclarationOrder:
|
21
38
|
enabled: true
|
22
39
|
|
40
|
+
DisableLinterReason:
|
41
|
+
enabled: false
|
42
|
+
|
23
43
|
DuplicateProperty:
|
24
44
|
enabled: true
|
25
45
|
|
@@ -34,22 +54,28 @@ linters:
|
|
34
54
|
EmptyRule:
|
35
55
|
enabled: true
|
36
56
|
|
57
|
+
ExtendDirective:
|
58
|
+
enabled: true
|
59
|
+
|
37
60
|
FinalNewline:
|
38
61
|
enabled: true
|
39
62
|
present: true
|
40
63
|
|
41
64
|
HexLength:
|
42
|
-
enabled:
|
65
|
+
enabled: true
|
43
66
|
style: short
|
44
67
|
|
45
68
|
HexNotation:
|
46
|
-
enabled:
|
69
|
+
enabled: false
|
47
70
|
style: lowercase
|
48
71
|
|
49
72
|
HexValidation:
|
50
73
|
enabled: true
|
51
74
|
|
52
|
-
|
75
|
+
IdSelector:
|
76
|
+
enabled: true
|
77
|
+
|
78
|
+
ImportantRule:
|
53
79
|
enabled: true
|
54
80
|
|
55
81
|
ImportPath:
|
@@ -59,6 +85,7 @@ linters:
|
|
59
85
|
|
60
86
|
Indentation:
|
61
87
|
enabled: true
|
88
|
+
allow_non_nested_indentation: false
|
62
89
|
character: space
|
63
90
|
width: 2
|
64
91
|
|
@@ -72,44 +99,71 @@ linters:
|
|
72
99
|
|
73
100
|
NameFormat:
|
74
101
|
enabled: true
|
102
|
+
allow_leading_underscore: true
|
75
103
|
convention: hyphenated_lowercase
|
76
104
|
|
77
105
|
NestingDepth:
|
78
106
|
enabled: true
|
79
|
-
max_depth:
|
80
|
-
|
107
|
+
max_depth: 3
|
108
|
+
ignore_parent_selectors: false
|
81
109
|
|
82
110
|
PlaceholderInExtend:
|
111
|
+
enabled: true
|
112
|
+
|
113
|
+
PrivateNamingConvention:
|
83
114
|
enabled: false
|
115
|
+
prefix: _
|
116
|
+
|
117
|
+
PropertyCount:
|
118
|
+
enabled: false
|
119
|
+
include_nested: false
|
120
|
+
max_properties: 10
|
84
121
|
|
85
122
|
PropertySortOrder:
|
86
123
|
enabled: true
|
87
124
|
ignore_unspecified: false
|
88
|
-
|
125
|
+
min_properties: 2
|
126
|
+
separate_groups: false
|
89
127
|
|
90
128
|
PropertySpelling:
|
91
129
|
enabled: true
|
92
130
|
extra_properties: []
|
131
|
+
disabled_properties: []
|
132
|
+
|
133
|
+
PropertyUnits:
|
134
|
+
enabled: true
|
135
|
+
global: [
|
136
|
+
'ch', 'em', 'ex', 'rem',
|
137
|
+
'cm', 'in', 'mm', 'pc', 'pt', 'px', 'q',
|
138
|
+
'vh', 'vw', 'vmin', 'vmax',
|
139
|
+
'deg', 'grad', 'rad', 'turn',
|
140
|
+
'ms', 's',
|
141
|
+
'Hz', 'kHz',
|
142
|
+
'dpi', 'dpcm', 'dppx',
|
143
|
+
'%']
|
144
|
+
properties:
|
145
|
+
line-height: []
|
146
|
+
|
147
|
+
PseudoElement:
|
148
|
+
enabled: true
|
93
149
|
|
94
150
|
QualifyingElement:
|
95
151
|
enabled: true
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
severity: warning
|
152
|
+
allow_element_with_attribute: false
|
153
|
+
allow_element_with_class: false
|
154
|
+
allow_element_with_id: false
|
100
155
|
|
101
156
|
SelectorDepth:
|
102
157
|
enabled: true
|
103
|
-
max_depth:
|
104
|
-
severity: warning
|
158
|
+
max_depth: 3
|
105
159
|
|
106
160
|
SelectorFormat:
|
107
|
-
enabled:
|
108
|
-
convention:
|
161
|
+
enabled: false
|
162
|
+
convention: hyphenated_BEM
|
109
163
|
|
110
164
|
Shorthand:
|
111
165
|
enabled: true
|
112
|
-
|
166
|
+
allowed_shorthands: [1, 2, 3]
|
113
167
|
|
114
168
|
SingleLinePerProperty:
|
115
169
|
enabled: true
|
@@ -120,6 +174,7 @@ linters:
|
|
120
174
|
|
121
175
|
SpaceAfterComma:
|
122
176
|
enabled: true
|
177
|
+
style: one_space
|
123
178
|
|
124
179
|
SpaceAfterPropertyColon:
|
125
180
|
enabled: true
|
@@ -128,6 +183,17 @@ linters:
|
|
128
183
|
SpaceAfterPropertyName:
|
129
184
|
enabled: true
|
130
185
|
|
186
|
+
SpaceAfterVariableColon:
|
187
|
+
enabled: true
|
188
|
+
style: one_space
|
189
|
+
|
190
|
+
SpaceAfterVariableName:
|
191
|
+
enabled: true
|
192
|
+
|
193
|
+
SpaceAroundOperator:
|
194
|
+
enabled: true
|
195
|
+
style: one_space
|
196
|
+
|
131
197
|
SpaceBeforeBrace:
|
132
198
|
enabled: true
|
133
199
|
style: space
|
@@ -144,8 +210,14 @@ linters:
|
|
144
210
|
TrailingSemicolon:
|
145
211
|
enabled: true
|
146
212
|
|
213
|
+
TrailingWhitespace:
|
214
|
+
enabled: true
|
215
|
+
|
147
216
|
TrailingZero:
|
148
|
-
enabled:
|
217
|
+
enabled: true
|
218
|
+
|
219
|
+
TransitionAll:
|
220
|
+
enabled: true
|
149
221
|
|
150
222
|
UnnecessaryMantissa:
|
151
223
|
enabled: true
|
@@ -154,20 +226,21 @@ linters:
|
|
154
226
|
enabled: true
|
155
227
|
|
156
228
|
UrlFormat:
|
157
|
-
enabled:
|
229
|
+
enabled: false
|
158
230
|
|
159
231
|
UrlQuotes:
|
160
232
|
enabled: true
|
161
233
|
|
162
|
-
|
234
|
+
VariableForProperty:
|
235
|
+
enabled: false
|
236
|
+
properties: []
|
237
|
+
|
238
|
+
VendorPrefix:
|
163
239
|
enabled: true
|
164
|
-
identifier_list:
|
165
|
-
include: []
|
166
|
-
exclude: []
|
240
|
+
identifier_list: base
|
167
241
|
|
168
242
|
ZeroUnit:
|
169
243
|
enabled: true
|
170
|
-
severity: warning
|
171
244
|
|
172
245
|
Compass::*:
|
173
246
|
enabled: false
|
data/CONTRIBUTING.md
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
# Contributing
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
We love pull requests from everyone. By participating in this project, you
|
4
|
+
agree to abide by the thoughtbot [code of conduct]. Here’s a quick guide:
|
5
|
+
|
6
|
+
[code of conduct]: https://thoughtbot.com/open-source-code-of-conduct
|
6
7
|
|
7
8
|
## HTML.erb
|
8
9
|
|
data/Gemfile
CHANGED
@@ -1,15 +1,18 @@
|
|
1
|
-
source
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
|
-
|
3
|
+
ruby "2.3.0"
|
4
4
|
|
5
|
-
gem
|
6
|
-
gem
|
7
|
-
gem
|
8
|
-
gem
|
9
|
-
gem
|
5
|
+
gem "bourbon", "~> 5.0.0.beta.6"
|
6
|
+
gem "middleman", "~> 4.1"
|
7
|
+
gem "middleman-autoprefixer", "~> 2.7"
|
8
|
+
gem "middleman-gh-pages", "~> 0.3"
|
9
|
+
gem "middleman-livereload", "~> 3.4"
|
10
|
+
gem "middleman-sprockets", "= 4.0.0.rc.1"
|
11
|
+
gem "neat", "~> 1.7"
|
12
|
+
gem "sassc", "~> 1.8"
|
10
13
|
|
11
14
|
group :test do
|
12
|
-
gem
|
13
|
-
gem "
|
14
|
-
gem
|
15
|
+
gem "generator_spec", "~> 0.9.3"
|
16
|
+
gem "railties"
|
17
|
+
gem "rspec"
|
15
18
|
end
|
data/README.md
CHANGED
@@ -1,19 +1,27 @@
|
|
1
1
|
[![Refills](http://images.thoughtbot.com/bourbon/refills-logo.svg)](http://refills.bourbon.io)
|
2
2
|
|
3
|
-
|
4
|
-
[![Build Status](https://travis-ci.org/thoughtbot/refills.svg?branch=master)](https://travis-ci.org/thoughtbot/refills)
|
5
|
-
|
6
|
-
## Prepackaged patterns and components built with Bourbon and Neat
|
3
|
+
## Components and patterns built with Bourbon and Neat
|
7
4
|
|
8
5
|
- **[Examples & Code Snippets](http://refills.bourbon.io)**
|
9
6
|
- **[Changelog](https://github.com/thoughtbot/refills/releases)**
|
10
7
|
- **[Issues & Bugs](https://github.com/thoughtbot/refills/issues)**
|
11
8
|
|
9
|
+
Follow the [@bourbonsass](https://twitter.com/bourbonsass) Twitter account
|
10
|
+
for updates.
|
11
|
+
|
12
12
|
## Requirements
|
13
13
|
|
14
|
-
- [Sass]
|
15
|
-
- [Bourbon]
|
16
|
-
- [Neat]
|
14
|
+
- [Sass] 3.3+
|
15
|
+
- [Bourbon] 5.0+
|
16
|
+
- [Neat] 1.6+
|
17
|
+
|
18
|
+
It’s recommended that you use [Autoprefixer], as Refills do not come packaged
|
19
|
+
with vendor prefixes.
|
20
|
+
|
21
|
+
[Sass]: https://github.com/sass/sass
|
22
|
+
[Bourbon]: https://github.com/thoughtbot/bourbon
|
23
|
+
[Neat]: https://github.com/thoughtbot/neat
|
24
|
+
[Autoprefixer]: https://github.com/postcss/autoprefixer
|
17
25
|
|
18
26
|
## Installation
|
19
27
|
|
@@ -30,7 +38,7 @@ Alternative to copy-pasting manually, we also have a Refills gem that allows you
|
|
30
38
|
1. Add Refills to your Gemfile:
|
31
39
|
|
32
40
|
```ruby
|
33
|
-
gem
|
41
|
+
gem "refills", group: :development
|
34
42
|
```
|
35
43
|
|
36
44
|
2. Then run:
|
@@ -76,16 +84,24 @@ body {
|
|
76
84
|
- [Bourbon](https://github.com/thoughtbot/bourbon): A simple and lightweight mixin library for Sass
|
77
85
|
- [Neat](https://github.com/thoughtbot/neat): A lightweight semantic grid framework for Sass and Bourbon
|
78
86
|
- [Bitters](https://github.com/thoughtbot/bitters): Scaffold styles, variables and structure for Bourbon projects
|
79
|
-
- [Refills](https://github.com/thoughtbot/refills):
|
80
|
-
|
81
|
-
## Credits
|
87
|
+
- [Refills](https://github.com/thoughtbot/refills): Components and patterns built with Bourbon and Neat
|
82
88
|
|
83
|
-
|
89
|
+
## License
|
84
90
|
|
85
|
-
|
91
|
+
Copyright © 2014–2015 [thoughtbot, inc](http://thoughtbot.com). Refills is free software, and may be redistributed under the terms specified in the [license](LICENSE.md).
|
86
92
|
|
87
93
|
Whenever code for Refills is borrowed or inspired by existing code, we try to credit the original developer/designer in our source code. [Let us know](mailto:design+bourbon@thoughtbot.com) if you think any credit is absent.
|
88
94
|
|
89
|
-
##
|
95
|
+
## About thoughtbot
|
90
96
|
|
91
|
-
|
97
|
+
[<img src="http://thoughtbot.github.io/images/signature.svg" width="250" alt="thoughtbot logo">][hire]
|
98
|
+
|
99
|
+
Refills is maintained and funded by thoughtbot, inc.
|
100
|
+
The names and logos for thoughtbot are trademarks of thoughtbot, inc.
|
101
|
+
|
102
|
+
We love open source software!
|
103
|
+
See [our other projects][community]
|
104
|
+
or [hire us][hire] to design, develop, and grow your product.
|
105
|
+
|
106
|
+
[community]: https://thoughtbot.com/community?utm_source=github
|
107
|
+
[hire]: https://thoughtbot.com/hire-us?utm_source=github
|
data/circle.yml
ADDED
data/config.rb
CHANGED
@@ -1,18 +1,9 @@
|
|
1
|
-
|
2
|
-
require 'lib/snippet_helpers'
|
3
|
-
|
1
|
+
activate :autoprefixer
|
4
2
|
activate :directory_indexes
|
5
3
|
|
6
|
-
set :css_dir,
|
7
|
-
set :images_dir,
|
8
|
-
set :js_dir,
|
9
|
-
|
10
|
-
helpers SnippetHelpers
|
11
|
-
|
12
|
-
ready do
|
13
|
-
sprockets.append_path 'vendor/stylesheets'
|
14
|
-
sprockets.append_path 'vendor/javascripts'
|
15
|
-
end
|
4
|
+
set :css_dir, "stylesheets"
|
5
|
+
set :images_dir, "images"
|
6
|
+
set :js_dir, "javascripts"
|
16
7
|
|
17
8
|
configure :development do
|
18
9
|
activate :livereload
|
@@ -2,8 +2,9 @@ module SnippetHelpers
|
|
2
2
|
SOURCE_DIR = File.expand_path('../../source', __FILE__)
|
3
3
|
|
4
4
|
class Snippet
|
5
|
-
def initialize(name)
|
5
|
+
def initialize(name, namespace: "")
|
6
6
|
@name = name
|
7
|
+
@namespace = namespace
|
7
8
|
end
|
8
9
|
|
9
10
|
def path
|
@@ -12,12 +13,12 @@ module SnippetHelpers
|
|
12
13
|
|
13
14
|
private
|
14
15
|
|
15
|
-
attr_reader :name
|
16
|
+
attr_reader :name, :namespace
|
16
17
|
end
|
17
18
|
|
18
19
|
class HtmlSnippet < Snippet
|
19
20
|
def path_segments
|
20
|
-
[SOURCE_DIR, "_#{name.underscore}.html.erb"]
|
21
|
+
[SOURCE_DIR, namespace, "_#{name.underscore}.html.erb"]
|
21
22
|
end
|
22
23
|
|
23
24
|
def language
|
@@ -27,7 +28,7 @@ module SnippetHelpers
|
|
27
28
|
|
28
29
|
class ScssSnippet < Snippet
|
29
30
|
def path_segments
|
30
|
-
[SOURCE_DIR,
|
31
|
+
[SOURCE_DIR, "stylesheets", "refills", namespace, "_#{name.dasherize}.scss"]
|
31
32
|
end
|
32
33
|
|
33
34
|
def language
|
@@ -37,7 +38,7 @@ module SnippetHelpers
|
|
37
38
|
|
38
39
|
class JavaScriptSnippet < Snippet
|
39
40
|
def path_segments
|
40
|
-
[SOURCE_DIR,
|
41
|
+
[SOURCE_DIR, "javascripts", "refills", namespace, "#{name.underscore}.js"]
|
41
42
|
end
|
42
43
|
|
43
44
|
def language
|
@@ -52,6 +53,7 @@ module SnippetHelpers
|
|
52
53
|
"javascripts",
|
53
54
|
"refills",
|
54
55
|
"coffeescript",
|
56
|
+
namespace,
|
55
57
|
"#{name.underscore}.coffee"
|
56
58
|
]
|
57
59
|
end
|
@@ -74,7 +76,13 @@ module SnippetHelpers
|
|
74
76
|
JavaScriptSnippet,
|
75
77
|
CoffeeScriptSnippet,
|
76
78
|
].map do |snippet_factory|
|
77
|
-
|
79
|
+
if name.include?("/")
|
80
|
+
*namespace, file = name.split("/")
|
81
|
+
else
|
82
|
+
namespace = []
|
83
|
+
file = name
|
84
|
+
end
|
85
|
+
render_snippet snippet_factory.new(file, namespace: namespace)
|
78
86
|
end.join("\n")
|
79
87
|
end
|
80
88
|
|