ish_rails 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +34 -0
- data/app/assets/javascripts/ish/init.js +417 -0
- data/app/assets/javascripts/ish/url-handler.js +182 -0
- data/app/assets/javascripts/jquery.js +8829 -0
- data/app/assets/javascripts/view_ports.js +3 -0
- data/app/assets/stylesheets/ish/styles.css +536 -0
- data/app/assets/stylesheets/view_ports.css +3 -0
- data/app/controllers/view_ports_controller.rb +5 -0
- data/app/helpers/view_ports_helper.rb +2 -0
- data/app/views/view_ports/index.html.erb +61 -0
- data/config/initializers/assets.rb +1 -0
- data/config/routes.rb +4 -0
- data/lib/ish_rails/engine.rb +4 -0
- data/lib/ish_rails/version.rb +3 -0
- data/lib/ish_rails.rb +4 -0
- data/lib/tasks/ish_rails_tasks.rake +4 -0
- data/test/controllers/view_ports_controller_test.rb +9 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config/application.rb +23 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +82 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/assets.rb +8 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +56 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/log/development.log +1029 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/25d2cd8d8ae6f0728b89fa77b51317f1 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/260734de5561e387a22ab1fd48fc5ae1 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2a234d7303a062a6f022c9c3febe52d6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/387970b760f48061daed7db47449c36b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3bb58493d395fafd3039183446159cd6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4a4d5eafead33783d4e864bb2a94f867 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/535879350ff819a6f56edc3a5a333db5 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/57e5a4adfe291c00682250b0dc736072 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/758a95016420bcca11057ecbffc0b51a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7ef971d02e44ca633b54e54ed7b6be35 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a42b7971588b5308589ac4a43e420c65 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a623b62b39a46544f9925b0bb9a44222 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ae375e7fc51b4dfcdd33d42d0fdbc7d3 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/b7a2e82279ca753cf7e0d4e97cbb9b24 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c1dcfc7f616a918fc38b2a6dff3f548a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d9470b25008173c44a98f637c10158e3 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/dd19119f2ba280d054b6d293ae16dcea +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f9ded07ffc25c24046e0fde8a3986ea6 +0 -0
- data/test/dummy/tmp/pids/server.pid +1 -0
- data/test/helpers/view_ports_helper_test.rb +4 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/ish_rails_test.rb +7 -0
- data/test/test_helper.rb +15 -0
- metadata +222 -0
@@ -0,0 +1,536 @@
|
|
1
|
+
body {
|
2
|
+
background: #ddd;
|
3
|
+
}
|
4
|
+
|
5
|
+
/* Header */
|
6
|
+
.sg-header {
|
7
|
+
height: 33px;
|
8
|
+
background: #222222;
|
9
|
+
color: white;
|
10
|
+
font-family: "HelveticaNeue", "Helvetica", "Arial", sans-serif;
|
11
|
+
text-transform: uppercase;
|
12
|
+
position: fixed;
|
13
|
+
top: 0;
|
14
|
+
left: 0;
|
15
|
+
z-index: 2;
|
16
|
+
width: 100%;
|
17
|
+
-webkit-box-shadow: inset 0 1px 0 #5f6164, inset 0 -1px 0 #2e2f2f, 0 1px 3px rgba(0, 0, 0, 0.3);
|
18
|
+
-moz-box-shadow: inset 0 1px 0 #5f6164, inset 0 -1px 0 #2e2f2f, 0 1px 3px rgba(0, 0, 0, 0.3);
|
19
|
+
box-shadow: inset 0 1px 0 #5f6164, inset 0 -1px 0 #2e2f2f, 0 1px 3px rgba(0, 0, 0, 0.3); }
|
20
|
+
.sg-header * {
|
21
|
+
-moz-box-sizing: border-box;
|
22
|
+
-webkit-box-sizing: border-box;
|
23
|
+
box-sizing: border-box; }
|
24
|
+
.sg-header ul, .sg-header ol {
|
25
|
+
padding: 0;
|
26
|
+
margin: 0; }
|
27
|
+
.sg-header li {
|
28
|
+
list-style: none;
|
29
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
|
30
|
+
.sg-header a {
|
31
|
+
font-size: 70%;
|
32
|
+
color: gray;
|
33
|
+
text-decoration: none;
|
34
|
+
display: block;
|
35
|
+
line-height: 1;
|
36
|
+
padding: 1em;
|
37
|
+
-webkit-transition: background 0.15s ease-out;
|
38
|
+
-moz-transition: background 0.15s ease-out;
|
39
|
+
-ms-transition: background 0.15s ease-out;
|
40
|
+
-o-transition: background 0.15s ease-out;
|
41
|
+
transition: background 0.15s ease-out;
|
42
|
+
-webkit-transition: color 0.15s ease-out;
|
43
|
+
-moz-transition: color 0.15s ease-out;
|
44
|
+
-ms-transition: color 0.15s ease-out;
|
45
|
+
-o-transition: color 0.15s ease-out;
|
46
|
+
transition: color 0.15s ease-out; }
|
47
|
+
.sg-header a:hover, .sg-header a:focus, .sg-header a.active {
|
48
|
+
color: white;
|
49
|
+
background: rgba(255, 255, 255, 0.05); }
|
50
|
+
.sg-header ol li ol li ol li a {
|
51
|
+
padding-left: 2em;
|
52
|
+
text-transform: none; }
|
53
|
+
|
54
|
+
/* URL Form */
|
55
|
+
#url-toggle {
|
56
|
+
display: none;
|
57
|
+
}
|
58
|
+
|
59
|
+
#url {
|
60
|
+
height: 33px;
|
61
|
+
padding: 0 0.5em;
|
62
|
+
border: 0;
|
63
|
+
background: #444;
|
64
|
+
color: #fff;
|
65
|
+
-webkit-transition: background 0.15s ease-out;
|
66
|
+
-moz-transition: background 0.15s ease-out;
|
67
|
+
-ms-transition: background 0.15s ease-out;
|
68
|
+
-o-transition: background 0.15s ease-out;
|
69
|
+
transition: background 0.15s ease-out;
|
70
|
+
}
|
71
|
+
|
72
|
+
#url:hover {
|
73
|
+
background: #454545;
|
74
|
+
}
|
75
|
+
|
76
|
+
#url:focus {
|
77
|
+
outline: 0;
|
78
|
+
background: #555;
|
79
|
+
color: #fff;
|
80
|
+
}
|
81
|
+
|
82
|
+
@media all and (min-width: 46.75em) {
|
83
|
+
#url {
|
84
|
+
width: 20em;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
#url-submit {
|
89
|
+
background: none;
|
90
|
+
color: gray;
|
91
|
+
text-transform: uppercase;
|
92
|
+
border: 0;
|
93
|
+
cursor: pointer;
|
94
|
+
-webkit-transition: background 0.15s ease-out;
|
95
|
+
-moz-transition: background 0.15s ease-out;
|
96
|
+
-ms-transition: background 0.15s ease-out;
|
97
|
+
-o-transition: background 0.15s ease-out;
|
98
|
+
transition: background 0.15s ease-out;
|
99
|
+
-webkit-transition: color 0.15s ease-out;
|
100
|
+
-moz-transition: color 0.15s ease-out;
|
101
|
+
-ms-transition: color 0.15s ease-out;
|
102
|
+
-o-transition: color 0.15s ease-out;
|
103
|
+
transition: color 0.15s ease-out;
|
104
|
+
}
|
105
|
+
|
106
|
+
#url-submit:hover, #url-submit:focus {
|
107
|
+
background: rgba(255, 255, 255, 0.05);
|
108
|
+
color: #fff;
|
109
|
+
}
|
110
|
+
|
111
|
+
/* Accordion */
|
112
|
+
.sg-acc-handle:after {
|
113
|
+
content: ' +';
|
114
|
+
float: right;
|
115
|
+
font-size: 70%; }
|
116
|
+
@media all and (min-width: 44em) {
|
117
|
+
.sg-acc-handle:after {
|
118
|
+
float: none; } }
|
119
|
+
.sg-acc-handle.active {
|
120
|
+
color: white;
|
121
|
+
background: rgba(255, 255, 255, 0.05); }
|
122
|
+
.sg-acc-handle.active:after {
|
123
|
+
content: ' -'; }
|
124
|
+
.sg-acc-handle.sg-icon:after {
|
125
|
+
content: ""; }
|
126
|
+
|
127
|
+
.sg-acc-panel {
|
128
|
+
overflow: hidden;
|
129
|
+
max-height: 0;
|
130
|
+
min-width: 10em;
|
131
|
+
background: #222222;
|
132
|
+
-webkit-transition: max-height 0.5s ease-out;
|
133
|
+
-moz-transition: max-height 0.5s ease-out;
|
134
|
+
-ms-transition: max-height 0.5s ease-out;
|
135
|
+
-o-transition: max-height 0.5s ease-out;
|
136
|
+
transition: max-height 0.5s ease-out; }
|
137
|
+
.sg-acc-panel.active {
|
138
|
+
max-height: 50em; }
|
139
|
+
.sg-acc-panel.sg-right {
|
140
|
+
position: absolute;
|
141
|
+
left: auto;
|
142
|
+
right: 0; }
|
143
|
+
|
144
|
+
/* Controls (sizing, view mode) */
|
145
|
+
.sg-controls {
|
146
|
+
border: 0;
|
147
|
+
position: absolute;
|
148
|
+
top: 0;
|
149
|
+
right: 0;
|
150
|
+
z-index: 2; }
|
151
|
+
.sg-controls .sg-acc-panel.active {
|
152
|
+
max-height: 17em; }
|
153
|
+
.sg-controls .sg-nav-phases .sg-acc-panel {
|
154
|
+
min-width: 0; }
|
155
|
+
.sg-controls .sg-nav-phases .sg-acc-panel.active {
|
156
|
+
max-height: none; }
|
157
|
+
|
158
|
+
.sg-control-trigger {
|
159
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
|
160
|
+
@media all and (min-width: 44em) {
|
161
|
+
.sg-control-trigger {
|
162
|
+
border: 0; } }
|
163
|
+
@media all and (min-width: 45em) {
|
164
|
+
.sg-control-trigger {
|
165
|
+
float: left;
|
166
|
+
width: 6em; } }
|
167
|
+
|
168
|
+
@media all and (min-width: 44em) {
|
169
|
+
.sg-control > li {
|
170
|
+
float: left;
|
171
|
+
width: 31em;
|
172
|
+
border-bottom: 0;
|
173
|
+
border-left: 1px solid rgba(255, 255, 255, 0.05); } }
|
174
|
+
|
175
|
+
.sg-control > li {
|
176
|
+
float: left; }
|
177
|
+
.sg-control .sg-input {
|
178
|
+
padding: 0.1em;
|
179
|
+
-webkit-transition: all 0.2s ease-out;
|
180
|
+
-moz-transition: all 0.2s ease-out;
|
181
|
+
-ms-transition: all 0.2s ease-out;
|
182
|
+
-o-transition: all 0.2s ease-out;
|
183
|
+
transition: all 0.2s ease-out; }
|
184
|
+
.sg-control .sg-input:active, .sg-control .sg-input:focus {
|
185
|
+
outline: 0;
|
186
|
+
background: #f7f7f7;
|
187
|
+
color: #000; }
|
188
|
+
|
189
|
+
@media all and (max-width: 45em) {
|
190
|
+
.sg-quarter {
|
191
|
+
float: left;
|
192
|
+
width: 25%;
|
193
|
+
border-left: 1px solid rgba(255, 255, 255, 0.05);
|
194
|
+
text-align: center; }
|
195
|
+
.sg-quarter:first-child {
|
196
|
+
border-left: 0; } }
|
197
|
+
|
198
|
+
@media all and (max-width: 45em) {
|
199
|
+
.sg-half {
|
200
|
+
float: left;
|
201
|
+
width: 50%;
|
202
|
+
border-left: 1px solid rgba(255, 255, 255, 0.05);
|
203
|
+
text-align: center; }
|
204
|
+
.sg-half:nth-child(odd) {
|
205
|
+
border-left: 0; } }
|
206
|
+
|
207
|
+
.sg-current-size {
|
208
|
+
font-size: 70%;
|
209
|
+
color: gray;
|
210
|
+
padding: 0.8em 0.95em; }
|
211
|
+
.sg-current-size:hover .sg-input {
|
212
|
+
background: #f7f7f7;
|
213
|
+
color: #000; }
|
214
|
+
@media all and (min-width: 45em) {
|
215
|
+
.sg-current-size {
|
216
|
+
float: left; } }
|
217
|
+
|
218
|
+
.sg-size-options {
|
219
|
+
max-width: 10em; }
|
220
|
+
@media all and (min-width: 45em) {
|
221
|
+
.sg-size-options {
|
222
|
+
position: static;
|
223
|
+
max-height: none;
|
224
|
+
max-width: none; }
|
225
|
+
.sg-size-options > li {
|
226
|
+
float: left;
|
227
|
+
border: 0;
|
228
|
+
border-left: 1px solid rgba(255, 255, 255, 0.05); } }
|
229
|
+
|
230
|
+
#sg-form {
|
231
|
+
margin: 0;
|
232
|
+
border: 0;
|
233
|
+
padding: 0; }
|
234
|
+
|
235
|
+
.sg-input {
|
236
|
+
margin: -2px 0 0 0;
|
237
|
+
padding: 0;
|
238
|
+
border: 1px solid #222;
|
239
|
+
background-color: #222;
|
240
|
+
color: gray;
|
241
|
+
width: 35px;
|
242
|
+
text-align: right; }
|
243
|
+
|
244
|
+
.sg-input-active {
|
245
|
+
background-color: #fff;
|
246
|
+
color: #000; }
|
247
|
+
|
248
|
+
.sg-view {
|
249
|
+
position: relative; }
|
250
|
+
.sg-view > ul {
|
251
|
+
position: absolute;
|
252
|
+
top: 2em;
|
253
|
+
left: 0; }
|
254
|
+
|
255
|
+
.sg-checkbox:before {
|
256
|
+
display: inline-block;
|
257
|
+
margin-right: 0.4em; }
|
258
|
+
|
259
|
+
/*------------------------------------*\
|
260
|
+
$STYLE GUIDE VIEWPORT
|
261
|
+
\*------------------------------------*/
|
262
|
+
/* Viewport */
|
263
|
+
#sg-vp-wrap {
|
264
|
+
text-align: center;
|
265
|
+
width: 100%; }
|
266
|
+
@media all and (min-width: 44em) {
|
267
|
+
#sg-vp-wrap {
|
268
|
+
position: fixed;
|
269
|
+
top: 2em;
|
270
|
+
bottom: 0;
|
271
|
+
left: 0;
|
272
|
+
right: 0;
|
273
|
+
z-index: 0; } }
|
274
|
+
#sg-vp-wrap.wrap-animate {
|
275
|
+
-webkit-transition: left 0.3s ease-out;
|
276
|
+
-moz-transition: left 0.3s ease-out;
|
277
|
+
-ms-transition: left 0.3s ease-out;
|
278
|
+
-o-transition: left 0.3s ease-out;
|
279
|
+
transition: left 0.3s ease-out; }
|
280
|
+
|
281
|
+
#sg-viewport {
|
282
|
+
border: 0;
|
283
|
+
x-margin: 0 auto;
|
284
|
+
height: 100%;
|
285
|
+
width: 100%; }
|
286
|
+
#sg-viewport.hay-mode {
|
287
|
+
-webkit-transition: all 40s linear;
|
288
|
+
-moz-transition: all 40s linear;
|
289
|
+
-ms-transition: all 40s linear;
|
290
|
+
-o-transition: all 40s linear;
|
291
|
+
transition: all 40s linear; }
|
292
|
+
|
293
|
+
#sg-cover {
|
294
|
+
width: 100%;
|
295
|
+
height: 100%;
|
296
|
+
display: none;
|
297
|
+
position: absolute;
|
298
|
+
z-index: 20;
|
299
|
+
cursor: col-resize; }
|
300
|
+
|
301
|
+
#sg-gen-container {
|
302
|
+
height: 100%;
|
303
|
+
text-align: center;
|
304
|
+
margin: 0 auto; }
|
305
|
+
#sg-gen-container.hay-mode {
|
306
|
+
-webkit-transition: all 40s linear;
|
307
|
+
-moz-transition: all 40s linear;
|
308
|
+
-ms-transition: all 40s linear;
|
309
|
+
-o-transition: all 40s linear;
|
310
|
+
transition: all 40s linear; }
|
311
|
+
|
312
|
+
#sg-rightpull-container {
|
313
|
+
width: 10px;
|
314
|
+
float: right;
|
315
|
+
margin: 0;
|
316
|
+
height: 100%;
|
317
|
+
cursor: col-resize; }
|
318
|
+
|
319
|
+
#sg-rightpull {
|
320
|
+
margin: 0;
|
321
|
+
width: 10px;
|
322
|
+
height: 100%;
|
323
|
+
background: #999;
|
324
|
+
-webkit-transition: background 0.2s ease-out;
|
325
|
+
-moz-transition: background 0.2s ease-out;
|
326
|
+
-ms-transition: background 0.2s ease-out;
|
327
|
+
-o-transition: background 0.2s ease-out;
|
328
|
+
transition: background 0.2s ease-out; }
|
329
|
+
#sg-rightpull:hover {
|
330
|
+
background: #666; }
|
331
|
+
#sg-rightpull:active {
|
332
|
+
cursor: col-resize;
|
333
|
+
background: #444; }
|
334
|
+
|
335
|
+
.vp-animate {
|
336
|
+
-webkit-transition: width 0.8s ease-out;
|
337
|
+
-moz-transition: width 0.8s ease-out;
|
338
|
+
-ms-transition: width 0.8s ease-out;
|
339
|
+
-o-transition: width 0.8s ease-out;
|
340
|
+
transition: width 0.8s ease-out; }
|
341
|
+
|
342
|
+
/*------------------------------------*\
|
343
|
+
$STYLE GUIDE CONTENT
|
344
|
+
\*------------------------------------*/
|
345
|
+
/* Section Pattern */
|
346
|
+
.sg-pattern {
|
347
|
+
margin-bottom: 2em;
|
348
|
+
overflow: hidden; }
|
349
|
+
|
350
|
+
/* Section Head */
|
351
|
+
.sg-pattern-head {
|
352
|
+
margin: 2em 0;
|
353
|
+
font-family: "HelveticaNeue", "Helvetica", "Arial", sans-serif;
|
354
|
+
font-size: 70%;
|
355
|
+
font-weight: normal;
|
356
|
+
padding: 1em 0;
|
357
|
+
border-bottom: 1px solid gray; }
|
358
|
+
.sg-pattern-head a {
|
359
|
+
display: block;
|
360
|
+
color: gray;
|
361
|
+
text-decoration: none;
|
362
|
+
cursor: pointer; }
|
363
|
+
.sg-pattern-head a:hover {
|
364
|
+
color: #222222; }
|
365
|
+
|
366
|
+
/* Clean View */
|
367
|
+
.sg-clean .sg-main {
|
368
|
+
padding: 0; }
|
369
|
+
|
370
|
+
.sg-code, .sg-annotations {
|
371
|
+
clear: both;
|
372
|
+
background: #dddddd;
|
373
|
+
color: #222222;
|
374
|
+
padding: 1em 0.5em;
|
375
|
+
margin: 1em 0; }
|
376
|
+
.sg-code a, .sg-annotations a {
|
377
|
+
text-decoration: underline; }
|
378
|
+
|
379
|
+
.sg-code pre {
|
380
|
+
white-space: -moz-pre-line;
|
381
|
+
white-space: -pre-line;
|
382
|
+
white-space: -o-pre-line;
|
383
|
+
word-wrap: break-word;
|
384
|
+
white-space: pre-line;
|
385
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
386
|
+
padding: 0.5em; }
|
387
|
+
|
388
|
+
.sg-code-contains {
|
389
|
+
margin-bottom: 1rem;
|
390
|
+
font-size: 85%;
|
391
|
+
color: gray; }
|
392
|
+
.sg-code-contains code {
|
393
|
+
padding: 0.2em;
|
394
|
+
background: rgba(0, 0, 0, 0.3);
|
395
|
+
color: #f7f7f7;
|
396
|
+
position: relative;
|
397
|
+
top: -2px; }
|
398
|
+
|
399
|
+
.sg-code-head {
|
400
|
+
color: gray;
|
401
|
+
font-size: 1em; }
|
402
|
+
|
403
|
+
.demo {
|
404
|
+
overflow: hidden;
|
405
|
+
margin-bottom: 1rem; }
|
406
|
+
|
407
|
+
.demo .gi, .demo .demo-block {
|
408
|
+
background: #dddddd;
|
409
|
+
color: gray;
|
410
|
+
text-align: center;
|
411
|
+
margin-bottom: 0.5em;
|
412
|
+
padding: 1em !important; }
|
413
|
+
.demo .gi:nth-of-type(2n), .demo .demo-block:nth-of-type(2n) {
|
414
|
+
color: #dddddd;
|
415
|
+
background: gray; }
|
416
|
+
.demo .gi .gi, .demo .demo-block .gi {
|
417
|
+
background: rgba(0, 0, 0, 0.1);
|
418
|
+
color: #dddddd; }
|
419
|
+
.demo .gi .gi:nth-of-type(2n), .demo .demo-block .gi:nth-of-type(2n) {
|
420
|
+
background: rgba(0, 0, 0, 0.3); }
|
421
|
+
|
422
|
+
.demo-animate {
|
423
|
+
background: #dddddd;
|
424
|
+
padding: 1em;
|
425
|
+
margin-bottom: 1em;
|
426
|
+
text-align: center; }
|
427
|
+
|
428
|
+
.animate-move {
|
429
|
+
position: relative; }
|
430
|
+
.animate-move .demo-shape {
|
431
|
+
position: absolute;
|
432
|
+
top: 0;
|
433
|
+
left: 0;
|
434
|
+
bottom: 0;
|
435
|
+
width: 20px;
|
436
|
+
background: gray; }
|
437
|
+
.animate-move:hover > .demo-shape {
|
438
|
+
left: 100%;
|
439
|
+
margin-left: -20px; }
|
440
|
+
|
441
|
+
.demo-icons {
|
442
|
+
font-size: 2em; }
|
443
|
+
.demo-icons li {
|
444
|
+
padding: 0.2em; }
|
445
|
+
|
446
|
+
.sg-colors {
|
447
|
+
overflow: hidden; }
|
448
|
+
.sg-colors li {
|
449
|
+
overflow: hidden;
|
450
|
+
border: 1px solid #dddddd;
|
451
|
+
padding: 0.3em;
|
452
|
+
margin: 0 0.2em 0.2em 0; }
|
453
|
+
@media all and (min-width: 30em) {
|
454
|
+
.sg-colors li {
|
455
|
+
float: left;
|
456
|
+
width: 5em; } }
|
457
|
+
|
458
|
+
.sg-swatch {
|
459
|
+
display: block;
|
460
|
+
height: 1.5em;
|
461
|
+
width: 50%; }
|
462
|
+
@media all and (max-width: 30em) {
|
463
|
+
.sg-swatch {
|
464
|
+
float: left;
|
465
|
+
margin-right: 0.3em; } }
|
466
|
+
@media all and (min-width: 30em) {
|
467
|
+
.sg-swatch {
|
468
|
+
width: 100%;
|
469
|
+
height: 4em;
|
470
|
+
margin-bottom: 0.2em; } }
|
471
|
+
|
472
|
+
.sg-label {
|
473
|
+
line-height: 1; }
|
474
|
+
|
475
|
+
#sg-annotation-container {
|
476
|
+
position: fixed;
|
477
|
+
bottom: 0;
|
478
|
+
left: 0;
|
479
|
+
z-index: 99;
|
480
|
+
width: 100%;
|
481
|
+
padding: 1em; }
|
482
|
+
|
483
|
+
/* Annotations */
|
484
|
+
#sg-annotation-container {
|
485
|
+
-moz-box-sizing: border-box;
|
486
|
+
-webkit-box-sizing: border-box;
|
487
|
+
box-sizing: border-box;
|
488
|
+
font-family: "HelveticaNeue", "Helvetica", "Arial", sans-serif;
|
489
|
+
font-size: 90%;
|
490
|
+
background: #222222;
|
491
|
+
color: gray;
|
492
|
+
position: fixed;
|
493
|
+
top: auto;
|
494
|
+
padding: 1rem 1rem 4rem;
|
495
|
+
bottom: 0;
|
496
|
+
left: 0;
|
497
|
+
width: 100%;
|
498
|
+
z-index: 2;
|
499
|
+
-webkit-transition: bottom 0.3s ease-out;
|
500
|
+
-moz-transition: bottom 0.3s ease-out;
|
501
|
+
-webkit-transition: bottom 0.3s ease-out;
|
502
|
+
-ms-transition: bottom 0.3s ease-out;
|
503
|
+
-o-transition: bottom 0.3s ease-out;
|
504
|
+
transition: bottom 0.3s ease-out; }
|
505
|
+
#sg-annotation-container a {
|
506
|
+
color: #dddddd; }
|
507
|
+
|
508
|
+
#sg-annotation-close-btn {
|
509
|
+
color: #fff;
|
510
|
+
position: absolute;
|
511
|
+
top: 1em;
|
512
|
+
right: 1em;
|
513
|
+
text-transform: uppercase;
|
514
|
+
text-decoration: none;
|
515
|
+
text-align: right; }
|
516
|
+
|
517
|
+
.has-comment, .has-comment a {
|
518
|
+
cursor: help !important; }
|
519
|
+
|
520
|
+
@font-face {
|
521
|
+
font-family: 'icons';
|
522
|
+
src: url("../assets/icons.eot");
|
523
|
+
src: url("../assets/icons.eot?#iefix") format("embedded-opentype"), url("../assets/icons.woff") format("woff"), url("../assets/icons.ttf") format("truetype"), url("../assets/icons.svg#icons") format("svg");
|
524
|
+
font-weight: normal;
|
525
|
+
font-style: normal; }
|
526
|
+
|
527
|
+
/* Pattern Lab icon fonts */
|
528
|
+
.icon-reload, .icon-cog, .icon-minus, .icon-plus, .icon-menu, .sg-header .sg-nav-toggle, .icon-checkbox-unchecked, .sg-checkbox, .icon-checkbox-checked, .sg-checkbox.active, .icon-eye {
|
529
|
+
font-family: 'icons';
|
530
|
+
speak: none;
|
531
|
+
font-style: normal;
|
532
|
+
font-weight: normal;
|
533
|
+
font-variant: normal;
|
534
|
+
text-transform: none;
|
535
|
+
line-height: 1;
|
536
|
+
-webkit-font-smoothing: antialiased; }
|
@@ -0,0 +1,61 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>ish. yet another viewport resizer.</title>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
<meta name="viewport" content="width=device-width" />
|
7
|
+
<%= stylesheet_link_tag "view_ports", media: "all" %>
|
8
|
+
<%= javascript_include_tag "view_ports" %>
|
9
|
+
</head>
|
10
|
+
<body>
|
11
|
+
<%
|
12
|
+
src = !params['url'].present? ? 'http://localhost:3000' : params['url']
|
13
|
+
%>
|
14
|
+
<header class="sg-header" role="banner">
|
15
|
+
<div class="nav url-change">
|
16
|
+
<form method="get" action="" id="url-form">
|
17
|
+
<label for="url" id="url-toggle" class="url-toggle">URL</label>
|
18
|
+
<input id="url" type="text" name="url" placeholder="Enter any URL" value="<%= src %>" />
|
19
|
+
<button id="url-submit">Go</button>
|
20
|
+
</form>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<div class="sg-controls" id="sg-controls">
|
24
|
+
<div class="sg-control-content">
|
25
|
+
<ul class="sg-control">
|
26
|
+
<li class="sg-size">
|
27
|
+
<div class="sg-current-size">
|
28
|
+
<form id="sg-form">
|
29
|
+
Size <input type="text" class="sg-input sg-size-px" value="320">px /
|
30
|
+
<input type="text" class="sg-input sg-size-em" value="20">em
|
31
|
+
</form><!--end #sg-form-->
|
32
|
+
</div><!--end #sg-current-size-->
|
33
|
+
<ul class="sg-acc-panel sg-size-options">
|
34
|
+
<li class="sg-quarter"><a href="#" id="sg-size-s">S</a></li>
|
35
|
+
<li class="sg-quarter"><a href="#" id="sg-size-m">M</a></li>
|
36
|
+
<li class="sg-quarter"><a href="#" id="sg-size-l">L</a></li>
|
37
|
+
<li class="sg-half"><a href="#" id="sg-size-full">Full</a></li>
|
38
|
+
<li class="sg-half"><a href="#" id="sg-size-random">Random</a></li>
|
39
|
+
<li class="sg-half"><a href="#" class="mode-link" id="sg-size-disco">Disco</a></li>
|
40
|
+
<li class="sg-half"><a href="#" class="mode-link" id="sg-size-hay">Hay!</a></li>
|
41
|
+
</ul>
|
42
|
+
</li>
|
43
|
+
</ul>
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
</header>
|
47
|
+
|
48
|
+
<!-- Iframe -->
|
49
|
+
<div id="sg-vp-wrap">
|
50
|
+
<div id="sg-cover"></div>
|
51
|
+
<div id="sg-gen-container">
|
52
|
+
<iframe id="sg-viewport" src="<%= src %>" sandbox="allow-same-origin allow-scripts"></iframe>
|
53
|
+
<div id="sg-rightpull-container">
|
54
|
+
<div id="sg-rightpull"></div>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
<!--end iFrame-->
|
59
|
+
|
60
|
+
</body>
|
61
|
+
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
Rails.application.config.assets.precompile += %w( view_ports.css view_ports.js )
|
data/config/routes.rb
ADDED
data/lib/ish_rails.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
== README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
data/test/dummy/Rakefile
ADDED