bones-rails 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/{LICENSE.txt → LICENSE.md} +1 -1
- data/app/assets/stylesheets/bones.scss +61 -59
- data/app/assets/stylesheets/bones/config.scss +67 -0
- data/app/assets/stylesheets/bones/config/__default.scss +14 -0
- data/app/assets/stylesheets/bones/config/_buttons.scss +21 -0
- data/app/assets/stylesheets/bones/config/_colors.scss +93 -0
- data/app/assets/stylesheets/bones/config/_components.scss +4 -0
- data/app/assets/stylesheets/bones/config/_forms.scss +28 -0
- data/app/assets/stylesheets/bones/config/_helpers.scss +31 -0
- data/app/assets/stylesheets/bones/config/_images.scss +23 -0
- data/app/assets/stylesheets/bones/config/_nav.scss +117 -0
- data/app/assets/stylesheets/bones/config/_tables.scss +12 -0
- data/app/assets/stylesheets/bones/config/_typography.scss +83 -0
- data/app/assets/stylesheets/bones/config/_wireframe.scss +18 -0
- data/app/assets/stylesheets/bones/styles/__default.scss +27 -0
- data/app/assets/stylesheets/bones/styles/_buttons.scss +118 -0
- data/app/assets/stylesheets/bones/styles/_components.scss +24 -0
- data/app/assets/stylesheets/bones/{partials → styles}/_forms.scss +18 -2
- data/app/assets/stylesheets/bones/styles/_images.scss +69 -0
- data/app/assets/stylesheets/bones/styles/_nav.scss +210 -0
- data/app/assets/stylesheets/bones/{partials → styles}/_tables.scss +6 -4
- data/app/assets/stylesheets/bones/styles/_typography.scss +227 -0
- data/app/assets/stylesheets/bones/styles/_wireframe.scss +57 -0
- data/app/assets/stylesheets/bones/styles/helpers/_background.scss +201 -0
- data/app/assets/stylesheets/bones/styles/helpers/_border.scss +201 -0
- data/app/assets/stylesheets/bones/styles/helpers/_color.scss +201 -0
- data/app/assets/stylesheets/bones/styles/helpers/_margin.scss +82 -0
- data/app/assets/stylesheets/bones/styles/helpers/_padding.scss +82 -0
- data/app/assets/stylesheets/bones/{helpers → styles/helpers}/_positioning.scss +4 -3
- data/app/assets/stylesheets/bones/styles/helpers/_size.scss +11 -0
- data/app/assets/stylesheets/bones/styles/plugins/_syntax_highlighting.scss +273 -0
- data/app/assets/stylesheets/bones/vendor/_normalize.scss +1 -1
- data/lib/bones/generators/install_generator.rb +29 -5
- data/lib/bones/rails/version.rb +1 -1
- metadata +32 -39
- data/app/assets/javascripts/bones.js +0 -116
- data/app/assets/stylesheets/bones/config/bones_config.scss +0 -262
- data/app/assets/stylesheets/bones/helpers/_background.scss +0 -138
- data/app/assets/stylesheets/bones/helpers/_border.scss +0 -138
- data/app/assets/stylesheets/bones/helpers/_color.scss +0 -138
- data/app/assets/stylesheets/bones/helpers/_margin.scss +0 -82
- data/app/assets/stylesheets/bones/helpers/_padding.scss +0 -82
- data/app/assets/stylesheets/bones/helpers/_size.scss +0 -34
- data/app/assets/stylesheets/bones/mixins/_buttons.scss +0 -19
- data/app/assets/stylesheets/bones/mixins/_forms.scss +0 -15
- data/app/assets/stylesheets/bones/mixins/_globals.scss +0 -15
- data/app/assets/stylesheets/bones/mixins/_grid.scss +0 -4
- data/app/assets/stylesheets/bones/mixins/_nav.scss +0 -41
- data/app/assets/stylesheets/bones/mixins/_typography.scss +0 -15
- data/app/assets/stylesheets/bones/partials/_buttons.scss +0 -86
- data/app/assets/stylesheets/bones/partials/_code.scss +0 -99
- data/app/assets/stylesheets/bones/partials/_components.scss +0 -22
- data/app/assets/stylesheets/bones/partials/_globals.scss +0 -27
- data/app/assets/stylesheets/bones/partials/_grid.scss +0 -112
- data/app/assets/stylesheets/bones/partials/_images.scss +0 -52
- data/app/assets/stylesheets/bones/partials/_nav.scss +0 -111
- data/app/assets/stylesheets/bones/partials/_typography.scss +0 -174
- data/app/assets/stylesheets/bones/variables/_buttons.scss +0 -16
- data/app/assets/stylesheets/bones/variables/_code.scss +0 -15
- data/app/assets/stylesheets/bones/variables/_colors.scss +0 -122
- data/app/assets/stylesheets/bones/variables/_forms.scss +0 -12
- data/app/assets/stylesheets/bones/variables/_globals.scss +0 -12
- data/app/assets/stylesheets/bones/variables/_grid.scss +0 -8
- data/app/assets/stylesheets/bones/variables/_helpers.scss +0 -9
- data/app/assets/stylesheets/bones/variables/_images.scss +0 -13
- data/app/assets/stylesheets/bones/variables/_nav.scss +0 -40
- data/app/assets/stylesheets/bones/variables/_tables.scss +0 -7
- data/app/assets/stylesheets/bones/variables/_typography.scss +0 -61
@@ -0,0 +1,82 @@
|
|
1
|
+
// general
|
2
|
+
.padding-small {
|
3
|
+
padding: $helper-padding-small;
|
4
|
+
}
|
5
|
+
.padding-medium {
|
6
|
+
padding: $helper-padding-medium;
|
7
|
+
}
|
8
|
+
.padding-large {
|
9
|
+
padding: $helper-padding-large;
|
10
|
+
}
|
11
|
+
|
12
|
+
// vertical
|
13
|
+
.padding-v-small {
|
14
|
+
padding-top: $helper-padding-small;
|
15
|
+
padding-bottom: $helper-padding-small;
|
16
|
+
}
|
17
|
+
.padding-v-medium {
|
18
|
+
padding-top: $helper-padding-medium;
|
19
|
+
padding-bottom: $helper-padding-medium;
|
20
|
+
}
|
21
|
+
.padding-v-large {
|
22
|
+
padding-top: $helper-padding-large;
|
23
|
+
padding-bottom: $helper-padding-large;
|
24
|
+
}
|
25
|
+
|
26
|
+
// horizontal
|
27
|
+
.padding-h-small {
|
28
|
+
padding-right: $helper-padding-small;
|
29
|
+
padding-left: $helper-padding-small;
|
30
|
+
}
|
31
|
+
.padding-h-medium {
|
32
|
+
padding-right: $helper-padding-medium;
|
33
|
+
padding-left: $helper-padding-medium;
|
34
|
+
}
|
35
|
+
.padding-h-large {
|
36
|
+
padding-right: $helper-padding-large;
|
37
|
+
padding-left: $helper-padding-large;
|
38
|
+
}
|
39
|
+
|
40
|
+
// left
|
41
|
+
.padding-left-small {
|
42
|
+
padding-left: $helper-padding-small;
|
43
|
+
}
|
44
|
+
.padding-left-medium {
|
45
|
+
padding-left: $helper-padding-medium;
|
46
|
+
}
|
47
|
+
.padding-left-large {
|
48
|
+
padding-left: $helper-padding-large;
|
49
|
+
}
|
50
|
+
|
51
|
+
// right
|
52
|
+
.padding-right-small {
|
53
|
+
padding-right: $helper-padding-small;
|
54
|
+
}
|
55
|
+
.padding-right-medium {
|
56
|
+
padding-right: $helper-padding-medium;
|
57
|
+
}
|
58
|
+
.padding-right-large {
|
59
|
+
padding-right: $helper-padding-large;
|
60
|
+
}
|
61
|
+
|
62
|
+
// top
|
63
|
+
.padding-top-small {
|
64
|
+
padding-top: $helper-padding-small;
|
65
|
+
}
|
66
|
+
.padding-top-medium {
|
67
|
+
padding-top: $helper-padding-medium;
|
68
|
+
}
|
69
|
+
.padding-top-large {
|
70
|
+
padding-top: $helper-padding-large;
|
71
|
+
}
|
72
|
+
|
73
|
+
// bottom
|
74
|
+
.padding-bottom-small {
|
75
|
+
padding-bottom: $helper-padding-small;
|
76
|
+
}
|
77
|
+
.padding-bottom-medium {
|
78
|
+
padding-bottom: $helper-padding-medium;
|
79
|
+
}
|
80
|
+
.padding-bottom-large {
|
81
|
+
padding-bottom: $helper-padding-large;
|
82
|
+
}
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
/* Float
|
2
|
+
============================ */
|
2
3
|
.float-left {
|
3
4
|
float: left;
|
4
5
|
}
|
@@ -6,7 +7,8 @@
|
|
6
7
|
float: right;
|
7
8
|
}
|
8
9
|
|
9
|
-
|
10
|
+
/* Align
|
11
|
+
============================ */
|
10
12
|
.text-left {
|
11
13
|
text-align: left;
|
12
14
|
}
|
@@ -16,7 +18,6 @@
|
|
16
18
|
.text-right {
|
17
19
|
text-align: right;
|
18
20
|
}
|
19
|
-
|
20
21
|
.center {
|
21
22
|
display: block;
|
22
23
|
margin-right: auto;
|
@@ -0,0 +1,273 @@
|
|
1
|
+
/* Syntax Highlighting
|
2
|
+
============================ */
|
3
|
+
.hll {
|
4
|
+
background-color: #f8f8f8;
|
5
|
+
border: 1px solid #ccc;
|
6
|
+
padding: 6px 10px;
|
7
|
+
border-radius: 3px;
|
8
|
+
}
|
9
|
+
|
10
|
+
.c {
|
11
|
+
color: #999988;
|
12
|
+
font-style: italic;
|
13
|
+
}
|
14
|
+
|
15
|
+
.err {
|
16
|
+
color: #a61717;
|
17
|
+
background-color: #e3d2d2;
|
18
|
+
}
|
19
|
+
|
20
|
+
.k {
|
21
|
+
font-weight: bold;
|
22
|
+
}
|
23
|
+
|
24
|
+
.o {
|
25
|
+
font-weight: bold;
|
26
|
+
}
|
27
|
+
|
28
|
+
.cm {
|
29
|
+
color: #999988;
|
30
|
+
font-style: italic;
|
31
|
+
}
|
32
|
+
|
33
|
+
.cp {
|
34
|
+
color: #999999;
|
35
|
+
font-weight: bold;
|
36
|
+
}
|
37
|
+
|
38
|
+
.c1 {
|
39
|
+
color: #999988;
|
40
|
+
font-style: italic;
|
41
|
+
}
|
42
|
+
|
43
|
+
.cs {
|
44
|
+
color: #999999;
|
45
|
+
font-weight: bold;
|
46
|
+
font-style: italic;
|
47
|
+
}
|
48
|
+
|
49
|
+
.gd {
|
50
|
+
color: #000000;
|
51
|
+
background-color: #ffdddd;
|
52
|
+
}
|
53
|
+
|
54
|
+
.gd .x {
|
55
|
+
color: #000000;
|
56
|
+
background-color: #ffaaaa;
|
57
|
+
}
|
58
|
+
|
59
|
+
.ge {
|
60
|
+
font-style: italic;
|
61
|
+
}
|
62
|
+
|
63
|
+
.gr {
|
64
|
+
color: #aa0000;
|
65
|
+
}
|
66
|
+
|
67
|
+
.gh {
|
68
|
+
color: #999999;
|
69
|
+
}
|
70
|
+
|
71
|
+
.gi {
|
72
|
+
color: #000000;
|
73
|
+
background-color: #ddffdd;
|
74
|
+
}
|
75
|
+
|
76
|
+
.gi .x {
|
77
|
+
color: #000000;
|
78
|
+
background-color: #aaffaa;
|
79
|
+
}
|
80
|
+
|
81
|
+
.go {
|
82
|
+
color: #888888;
|
83
|
+
}
|
84
|
+
|
85
|
+
.gp {
|
86
|
+
color: #555555;
|
87
|
+
}
|
88
|
+
|
89
|
+
.gs {
|
90
|
+
font-weight: bold;
|
91
|
+
}
|
92
|
+
|
93
|
+
.gu {
|
94
|
+
color: #800080;
|
95
|
+
font-weight: bold;
|
96
|
+
}
|
97
|
+
|
98
|
+
.gt {
|
99
|
+
color: #aa0000;
|
100
|
+
}
|
101
|
+
|
102
|
+
.kc {
|
103
|
+
font-weight: bold;
|
104
|
+
}
|
105
|
+
|
106
|
+
.kd {
|
107
|
+
font-weight: bold;
|
108
|
+
}
|
109
|
+
|
110
|
+
.kn {
|
111
|
+
font-weight: bold;
|
112
|
+
}
|
113
|
+
|
114
|
+
.kp {
|
115
|
+
font-weight: bold;
|
116
|
+
}
|
117
|
+
|
118
|
+
.kr {
|
119
|
+
font-weight: bold;
|
120
|
+
}
|
121
|
+
|
122
|
+
.kt {
|
123
|
+
color: #445588;
|
124
|
+
font-weight: bold;
|
125
|
+
}
|
126
|
+
|
127
|
+
.m {
|
128
|
+
color: #009999;
|
129
|
+
}
|
130
|
+
|
131
|
+
.s {
|
132
|
+
color: #dd1144;
|
133
|
+
}
|
134
|
+
|
135
|
+
.n {
|
136
|
+
color: #333333;
|
137
|
+
}
|
138
|
+
|
139
|
+
.na {
|
140
|
+
color: teal;
|
141
|
+
}
|
142
|
+
|
143
|
+
.nb {
|
144
|
+
color: #0086b3;
|
145
|
+
}
|
146
|
+
|
147
|
+
.nc {
|
148
|
+
color: #445588;
|
149
|
+
font-weight: bold;
|
150
|
+
}
|
151
|
+
|
152
|
+
.no {
|
153
|
+
color: teal;
|
154
|
+
}
|
155
|
+
|
156
|
+
.ni {
|
157
|
+
color: purple;
|
158
|
+
}
|
159
|
+
|
160
|
+
.ne {
|
161
|
+
color: #990000;
|
162
|
+
font-weight: bold;
|
163
|
+
}
|
164
|
+
|
165
|
+
.nf {
|
166
|
+
color: #990000;
|
167
|
+
font-weight: bold;
|
168
|
+
}
|
169
|
+
|
170
|
+
.nn {
|
171
|
+
color: #555555;
|
172
|
+
}
|
173
|
+
|
174
|
+
.nt {
|
175
|
+
color: navy;
|
176
|
+
}
|
177
|
+
|
178
|
+
.nv {
|
179
|
+
color: teal;
|
180
|
+
}
|
181
|
+
|
182
|
+
.ow {
|
183
|
+
font-weight: bold;
|
184
|
+
}
|
185
|
+
|
186
|
+
.w {
|
187
|
+
color: #bbbbbb;
|
188
|
+
}
|
189
|
+
|
190
|
+
.mf {
|
191
|
+
color: #009999;
|
192
|
+
}
|
193
|
+
|
194
|
+
.mh {
|
195
|
+
color: #009999;
|
196
|
+
}
|
197
|
+
|
198
|
+
.mi {
|
199
|
+
color: #009999;
|
200
|
+
}
|
201
|
+
|
202
|
+
.mo {
|
203
|
+
color: #009999;
|
204
|
+
}
|
205
|
+
|
206
|
+
.sb {
|
207
|
+
color: #dd1144;
|
208
|
+
}
|
209
|
+
|
210
|
+
.sc {
|
211
|
+
color: #dd1144;
|
212
|
+
}
|
213
|
+
|
214
|
+
.sd {
|
215
|
+
color: #dd1144;
|
216
|
+
}
|
217
|
+
|
218
|
+
.s2 {
|
219
|
+
color: #dd1144;
|
220
|
+
}
|
221
|
+
|
222
|
+
.se {
|
223
|
+
color: #dd1144;
|
224
|
+
}
|
225
|
+
|
226
|
+
.sh {
|
227
|
+
color: #dd1144;
|
228
|
+
}
|
229
|
+
|
230
|
+
.si {
|
231
|
+
color: #dd1144;
|
232
|
+
}
|
233
|
+
|
234
|
+
.sx {
|
235
|
+
color: #dd1144;
|
236
|
+
}
|
237
|
+
|
238
|
+
.sr {
|
239
|
+
color: #009926;
|
240
|
+
}
|
241
|
+
|
242
|
+
.s1 {
|
243
|
+
color: #dd1144;
|
244
|
+
}
|
245
|
+
|
246
|
+
.ss {
|
247
|
+
color: #990073;
|
248
|
+
}
|
249
|
+
|
250
|
+
.bp {
|
251
|
+
color: #999999;
|
252
|
+
}
|
253
|
+
|
254
|
+
.vc {
|
255
|
+
color: teal;
|
256
|
+
}
|
257
|
+
|
258
|
+
.vg {
|
259
|
+
color: teal;
|
260
|
+
}
|
261
|
+
|
262
|
+
.vi {
|
263
|
+
color: teal;
|
264
|
+
}
|
265
|
+
|
266
|
+
.il {
|
267
|
+
color: #009999;
|
268
|
+
}
|
269
|
+
|
270
|
+
.gc {
|
271
|
+
color: #999;
|
272
|
+
background-color: #EAF2F5;
|
273
|
+
}
|
@@ -4,13 +4,37 @@ require 'rails/generators'
|
|
4
4
|
module Bones
|
5
5
|
module Generators
|
6
6
|
class InstallGenerator < Rails::Generators::Base
|
7
|
-
#source_root File.expand_path('../templates', __FILE__)
|
8
7
|
|
9
|
-
desc "
|
8
|
+
desc "Moves assets out of the gem directory and into the visible asset pipeline"
|
10
9
|
def add_assets
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
styles_dir = "#{Rails.root}/app/assets/stylesheets"
|
11
|
+
bones_dir = "#{File.dirname(__FILE__)}/../../../app/assets/stylesheets/bones"
|
12
|
+
|
13
|
+
# make sure application is scss file
|
14
|
+
if !File.exist?("#{styles_dir}/application.scss")
|
15
|
+
if File.exist?("#{styles_dir}/application.css")
|
16
|
+
`mv #{styles_dir}/application.css #{styles_dir}/application.scss`
|
17
|
+
elsif File.exist?("#{styles_dir}/application.css.scss")
|
18
|
+
`mv #{styles_dir}/application.css.scss #{styles_dir}/application.scss`
|
19
|
+
else
|
20
|
+
`touch #{styles_dir}/application.scss`
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# add "@import 'bones/bones'; to application.scss"
|
25
|
+
prepend_to_file "app/assets/stylesheets/application.scss", "@import 'bones/bones';\n"
|
26
|
+
# make directory for bones files
|
27
|
+
`mkdir #{styles_dir}/bones`
|
28
|
+
puts "--> created directory: app/assets/stylesheets/bones"
|
29
|
+
# copy config directory
|
30
|
+
`cp -R #{bones_dir}/config/ #{styles_dir}/bones/bones-config`
|
31
|
+
puts "--> copied Bones config files into app/assets/stylesheets/bones/bones-config"
|
32
|
+
# copy main config file
|
33
|
+
`cp #{bones_dir}/config.scss #{styles_dir}/bones/bones.scss`
|
34
|
+
puts "--> copied main Bones configuration file into app/assets/stylesheets/bones"
|
35
|
+
|
36
|
+
# success!
|
37
|
+
puts "\n--> Bones is ready.\n\nHooray! Edit files in app/assets/stylesheets/bones/bones-config to your liking and watch your app change on the fly!"
|
14
38
|
end
|
15
39
|
|
16
40
|
end
|
data/lib/bones/rails/version.rb
CHANGED