pace-rails 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/app/.DS_Store +0 -0
- data/app/assets/.DS_Store +0 -0
- data/app/assets/javascripts/pace/pace.js +144 -85
- data/app/assets/stylesheets/.DS_Store +0 -0
- data/app/assets/stylesheets/pace/pace-theme-big-counter.css +5 -1
- data/app/assets/stylesheets/pace/pace-theme-center-circle.css +110 -0
- data/lib/pace/rails/version.rb +1 -1
- metadata +8 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c71d9cd721245695de7544d6f08fa9bf9e1b8ac2
|
4
|
+
data.tar.gz: c1963ed9fa0bbd18b9b27edc67950a8cea5fa88e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8490d8465ebb2193ad36948385d96499335e0aa5ec39830856d5ed70502fcb139da96b658dcfc19663bcdcd8721979ffc8a002b12e65c33950bf72671c8c90e8
|
7
|
+
data.tar.gz: 2dc31189085cd887c9a4bc3767ebeb3a713db42937b46305b0b805859470627b5e8b78accb2410b3e49b8061824ed7c10882bcf685b1ccfc01263fb720a1ae45
|
data/.DS_Store
ADDED
Binary file
|
data/app/.DS_Store
ADDED
Binary file
|
Binary file
|
@@ -1,5 +1,5 @@
|
|
1
1
|
(function() {
|
2
|
-
var AjaxMonitor, Bar, DocumentMonitor, ElementMonitor, ElementTracker, EventLagMonitor, Events, RequestIntercept, SOURCE_KEYS, Scaler, SocketRequestTracker, XHRRequestTracker, animation, bar, cancelAnimation, cancelAnimationFrame, defaultOptions, extend, extendNative,
|
2
|
+
var AjaxMonitor, Bar, DocumentMonitor, ElementMonitor, ElementTracker, EventLagMonitor, Events, NoTargetError, RequestIntercept, SOURCE_KEYS, Scaler, SocketRequestTracker, XHRRequestTracker, animation, avgAmplitude, bar, cancelAnimation, cancelAnimationFrame, defaultOptions, extend, extendNative, getFromDOM, getIntercept, handlePushState, init, now, options, requestAnimationFrame, result, runAnimation, scalers, sources, uniScaler, _WebSocket, _XDomainRequest, _XMLHttpRequest, _intercept, _pushState, _ref, _replaceState,
|
3
3
|
__slice = [].slice,
|
4
4
|
__hasProp = {}.hasOwnProperty,
|
5
5
|
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
@@ -14,18 +14,20 @@
|
|
14
14
|
easeFactor: 1.25,
|
15
15
|
startOnPageLoad: true,
|
16
16
|
restartOnPushState: true,
|
17
|
-
|
17
|
+
restartOnRequestAfter: 500,
|
18
18
|
target: 'body',
|
19
19
|
elements: {
|
20
20
|
checkInterval: 100,
|
21
21
|
selectors: ['body']
|
22
22
|
},
|
23
23
|
eventLag: {
|
24
|
-
minSamples: 10
|
24
|
+
minSamples: 10,
|
25
|
+
sampleCount: 3,
|
26
|
+
lagThreshold: 3
|
25
27
|
},
|
26
28
|
ajax: {
|
27
29
|
trackMethods: ['GET'],
|
28
|
-
trackWebSockets:
|
30
|
+
trackWebSockets: false
|
29
31
|
}
|
30
32
|
};
|
31
33
|
|
@@ -91,6 +93,17 @@
|
|
91
93
|
return out;
|
92
94
|
};
|
93
95
|
|
96
|
+
avgAmplitude = function(arr) {
|
97
|
+
var count, sum, v, _i, _len;
|
98
|
+
sum = count = 0;
|
99
|
+
for (_i = 0, _len = arr.length; _i < _len; _i++) {
|
100
|
+
v = arr[_i];
|
101
|
+
sum += Math.abs(v);
|
102
|
+
count++;
|
103
|
+
}
|
104
|
+
return sum / count;
|
105
|
+
};
|
106
|
+
|
94
107
|
getFromDOM = function(key, json) {
|
95
108
|
var data, e, el;
|
96
109
|
if (key == null) {
|
@@ -121,6 +134,18 @@
|
|
121
134
|
|
122
135
|
options = Pace.options = extend(defaultOptions, window.paceOptions, getFromDOM());
|
123
136
|
|
137
|
+
NoTargetError = (function(_super) {
|
138
|
+
__extends(NoTargetError, _super);
|
139
|
+
|
140
|
+
function NoTargetError() {
|
141
|
+
_ref = NoTargetError.__super__.constructor.apply(this, arguments);
|
142
|
+
return _ref;
|
143
|
+
}
|
144
|
+
|
145
|
+
return NoTargetError;
|
146
|
+
|
147
|
+
})(Error);
|
148
|
+
|
124
149
|
Bar = (function() {
|
125
150
|
function Bar() {
|
126
151
|
this.progress = 0;
|
@@ -129,10 +154,15 @@
|
|
129
154
|
Bar.prototype.getElement = function() {
|
130
155
|
var targetElement;
|
131
156
|
if (this.el == null) {
|
157
|
+
targetElement = document.querySelector(options.target);
|
158
|
+
if (!targetElement) {
|
159
|
+
throw new NoTargetError;
|
160
|
+
}
|
132
161
|
this.el = document.createElement('div');
|
133
162
|
this.el.className = "pace pace-active";
|
163
|
+
document.body.className = document.body.className.replace('pace-done', '');
|
164
|
+
document.body.className += ' pace-running';
|
134
165
|
this.el.innerHTML = '<div class="pace-progress">\n <div class="pace-progress-inner"></div>\n</div>\n<div class="pace-activity"></div>';
|
135
|
-
targetElement = document.querySelector(options.target);
|
136
166
|
if (targetElement.firstChild != null) {
|
137
167
|
targetElement.insertBefore(this.el, targetElement.firstChild);
|
138
168
|
} else {
|
@@ -146,7 +176,9 @@
|
|
146
176
|
var el;
|
147
177
|
el = this.getElement();
|
148
178
|
el.className = el.className.replace('pace-active', '');
|
149
|
-
|
179
|
+
el.className += ' pace-inactive';
|
180
|
+
document.body.className = document.body.className.replace('pace-running', '');
|
181
|
+
return document.body.className += ' pace-done';
|
150
182
|
};
|
151
183
|
|
152
184
|
Bar.prototype.update = function(prog) {
|
@@ -155,7 +187,11 @@
|
|
155
187
|
};
|
156
188
|
|
157
189
|
Bar.prototype.destroy = function() {
|
158
|
-
|
190
|
+
try {
|
191
|
+
this.getElement().parentNode.removeChild(this.getElement());
|
192
|
+
} catch (_error) {
|
193
|
+
NoTargetError = _error;
|
194
|
+
}
|
159
195
|
return this.el = void 0;
|
160
196
|
};
|
161
197
|
|
@@ -167,14 +203,14 @@
|
|
167
203
|
el = this.getElement();
|
168
204
|
el.children[0].style.width = "" + this.progress + "%";
|
169
205
|
if (!this.lastRenderedProgress || this.lastRenderedProgress | 0 !== this.progress | 0) {
|
170
|
-
el.setAttribute('data-progress-text', "" + (this.progress | 0) + "%");
|
206
|
+
el.children[0].setAttribute('data-progress-text', "" + (this.progress | 0) + "%");
|
171
207
|
if (this.progress >= 100) {
|
172
208
|
progressStr = '99';
|
173
209
|
} else {
|
174
210
|
progressStr = this.progress < 10 ? "0" : "";
|
175
211
|
progressStr += this.progress | 0;
|
176
212
|
}
|
177
|
-
el.setAttribute('data-progress', "" + progressStr);
|
213
|
+
el.children[0].setAttribute('data-progress', "" + progressStr);
|
178
214
|
}
|
179
215
|
return this.lastRenderedProgress = this.progress;
|
180
216
|
};
|
@@ -193,12 +229,12 @@
|
|
193
229
|
}
|
194
230
|
|
195
231
|
Events.prototype.trigger = function(name, val) {
|
196
|
-
var binding, _i, _len,
|
232
|
+
var binding, _i, _len, _ref1, _results;
|
197
233
|
if (this.bindings[name] != null) {
|
198
|
-
|
234
|
+
_ref1 = this.bindings[name];
|
199
235
|
_results = [];
|
200
|
-
for (_i = 0, _len =
|
201
|
-
binding =
|
236
|
+
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
237
|
+
binding = _ref1[_i];
|
202
238
|
_results.push(binding.call(this, val));
|
203
239
|
}
|
204
240
|
return _results;
|
@@ -252,8 +288,8 @@
|
|
252
288
|
var _open;
|
253
289
|
_open = req.open;
|
254
290
|
return req.open = function(type, url, async) {
|
255
|
-
var
|
256
|
-
if (
|
291
|
+
var _ref1;
|
292
|
+
if (_ref1 = (type != null ? type : 'GET').toUpperCase(), __indexOf.call(options.ajax.trackMethods, _ref1) >= 0) {
|
257
293
|
_this.trigger('request', {
|
258
294
|
type: type,
|
259
295
|
url: url,
|
@@ -299,13 +335,53 @@
|
|
299
335
|
|
300
336
|
})(Events);
|
301
337
|
|
302
|
-
|
338
|
+
_intercept = null;
|
339
|
+
|
340
|
+
getIntercept = function() {
|
341
|
+
if (_intercept == null) {
|
342
|
+
_intercept = new RequestIntercept;
|
343
|
+
}
|
344
|
+
return _intercept;
|
345
|
+
};
|
346
|
+
|
347
|
+
if (options.restartOnRequestAfter !== false) {
|
348
|
+
getIntercept().on('request', function(_arg) {
|
349
|
+
var args, request, type;
|
350
|
+
type = _arg.type, request = _arg.request;
|
351
|
+
if (!Pace.running) {
|
352
|
+
args = arguments;
|
353
|
+
return setTimeout(function() {
|
354
|
+
var source, stillActive, _i, _len, _ref1, _ref2, _results;
|
355
|
+
if (type === 'socket') {
|
356
|
+
stillActive = request.readyState < 2;
|
357
|
+
} else {
|
358
|
+
stillActive = (0 < (_ref1 = request.readyState) && _ref1 < 4);
|
359
|
+
}
|
360
|
+
if (stillActive) {
|
361
|
+
Pace.restart();
|
362
|
+
_ref2 = Pace.sources;
|
363
|
+
_results = [];
|
364
|
+
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
|
365
|
+
source = _ref2[_i];
|
366
|
+
if (source instanceof AjaxMonitor) {
|
367
|
+
source.watch.apply(source, args);
|
368
|
+
break;
|
369
|
+
} else {
|
370
|
+
_results.push(void 0);
|
371
|
+
}
|
372
|
+
}
|
373
|
+
return _results;
|
374
|
+
}
|
375
|
+
}, options.restartOnRequestAfter);
|
376
|
+
}
|
377
|
+
});
|
378
|
+
}
|
303
379
|
|
304
380
|
AjaxMonitor = (function() {
|
305
381
|
function AjaxMonitor() {
|
306
382
|
var _this = this;
|
307
383
|
this.elements = [];
|
308
|
-
|
384
|
+
getIntercept().on('request', function() {
|
309
385
|
return _this.watch.apply(_this, arguments);
|
310
386
|
});
|
311
387
|
}
|
@@ -327,7 +403,7 @@
|
|
327
403
|
|
328
404
|
XHRRequestTracker = (function() {
|
329
405
|
function XHRRequestTracker(request) {
|
330
|
-
var event, size, _i, _len, _onreadystatechange,
|
406
|
+
var event, size, _i, _len, _onreadystatechange, _ref1,
|
331
407
|
_this = this;
|
332
408
|
this.progress = 0;
|
333
409
|
if (window.ProgressEvent != null) {
|
@@ -339,9 +415,9 @@
|
|
339
415
|
return _this.progress = _this.progress + (100 - _this.progress) / 2;
|
340
416
|
}
|
341
417
|
});
|
342
|
-
|
343
|
-
for (_i = 0, _len =
|
344
|
-
event =
|
418
|
+
_ref1 = ['load', 'abort', 'timeout', 'error'];
|
419
|
+
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
420
|
+
event = _ref1[_i];
|
345
421
|
request.addEventListener(event, function() {
|
346
422
|
return _this.progress = 100;
|
347
423
|
});
|
@@ -349,8 +425,8 @@
|
|
349
425
|
} else {
|
350
426
|
_onreadystatechange = request.onreadystatechange;
|
351
427
|
request.onreadystatechange = function() {
|
352
|
-
var
|
353
|
-
if ((
|
428
|
+
var _ref2;
|
429
|
+
if ((_ref2 = request.readyState) === 0 || _ref2 === 4) {
|
354
430
|
_this.progress = 100;
|
355
431
|
} else if (request.readyState === 3) {
|
356
432
|
_this.progress = 50;
|
@@ -366,12 +442,12 @@
|
|
366
442
|
|
367
443
|
SocketRequestTracker = (function() {
|
368
444
|
function SocketRequestTracker(request) {
|
369
|
-
var event, _i, _len,
|
445
|
+
var event, _i, _len, _ref1,
|
370
446
|
_this = this;
|
371
447
|
this.progress = 0;
|
372
|
-
|
373
|
-
for (_i = 0, _len =
|
374
|
-
event =
|
448
|
+
_ref1 = ['error', 'open'];
|
449
|
+
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
450
|
+
event = _ref1[_i];
|
375
451
|
request.addEventListener(event, function() {
|
376
452
|
return _this.progress = 100;
|
377
453
|
});
|
@@ -384,7 +460,7 @@
|
|
384
460
|
|
385
461
|
ElementMonitor = (function() {
|
386
462
|
function ElementMonitor(options) {
|
387
|
-
var selector, _i, _len,
|
463
|
+
var selector, _i, _len, _ref1;
|
388
464
|
if (options == null) {
|
389
465
|
options = {};
|
390
466
|
}
|
@@ -392,9 +468,9 @@
|
|
392
468
|
if (options.selectors == null) {
|
393
469
|
options.selectors = [];
|
394
470
|
}
|
395
|
-
|
396
|
-
for (_i = 0, _len =
|
397
|
-
selector =
|
471
|
+
_ref1 = options.selectors;
|
472
|
+
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
473
|
+
selector = _ref1[_i];
|
398
474
|
this.elements.push(new ElementTracker(selector));
|
399
475
|
}
|
400
476
|
}
|
@@ -437,9 +513,9 @@
|
|
437
513
|
};
|
438
514
|
|
439
515
|
function DocumentMonitor() {
|
440
|
-
var _onreadystatechange,
|
516
|
+
var _onreadystatechange, _ref1,
|
441
517
|
_this = this;
|
442
|
-
this.progress = (
|
518
|
+
this.progress = (_ref1 = this.states[document.readyState]) != null ? _ref1 : 100;
|
443
519
|
_onreadystatechange = document.onreadystatechange;
|
444
520
|
document.onreadystatechange = function() {
|
445
521
|
if (_this.states[document.readyState] != null) {
|
@@ -455,21 +531,28 @@
|
|
455
531
|
|
456
532
|
EventLagMonitor = (function() {
|
457
533
|
function EventLagMonitor() {
|
458
|
-
var avg, last, points,
|
534
|
+
var avg, interval, last, points, samples,
|
459
535
|
_this = this;
|
460
536
|
this.progress = 0;
|
461
537
|
avg = 0;
|
538
|
+
samples = [];
|
462
539
|
points = 0;
|
463
540
|
last = now();
|
464
|
-
setInterval(function() {
|
541
|
+
interval = setInterval(function() {
|
465
542
|
var diff;
|
466
543
|
diff = now() - last - 50;
|
467
544
|
last = now();
|
468
|
-
|
469
|
-
if (
|
470
|
-
|
545
|
+
samples.push(diff);
|
546
|
+
if (samples.length > options.eventLag.sampleCount) {
|
547
|
+
samples.shift();
|
548
|
+
}
|
549
|
+
avg = avgAmplitude(samples);
|
550
|
+
if (++points >= options.eventLag.minSamples && avg < options.eventLag.lagThreshold) {
|
551
|
+
_this.progress = 100;
|
552
|
+
return clearInterval(interval);
|
553
|
+
} else {
|
554
|
+
return _this.progress = 100 * (3 / (avg + 3));
|
471
555
|
}
|
472
|
-
return _this.progress = 100 * (3 / (avg + 3));
|
473
556
|
}, 50);
|
474
557
|
}
|
475
558
|
|
@@ -535,6 +618,8 @@
|
|
535
618
|
|
536
619
|
cancelAnimation = null;
|
537
620
|
|
621
|
+
Pace.running = false;
|
622
|
+
|
538
623
|
handlePushState = function() {
|
539
624
|
if (options.restartOnPushState) {
|
540
625
|
return Pace.restart();
|
@@ -557,40 +642,6 @@
|
|
557
642
|
};
|
558
643
|
}
|
559
644
|
|
560
|
-
firstLoad = true;
|
561
|
-
|
562
|
-
if (options.restartOnBackboneRoute) {
|
563
|
-
setTimeout(function() {
|
564
|
-
if (window.Backbone == null) {
|
565
|
-
return;
|
566
|
-
}
|
567
|
-
return Backbone.history.on('route', function(router, name) {
|
568
|
-
var routeName, rule, _i, _len, _results;
|
569
|
-
if (!(rule = options.restartOnBackboneRoute)) {
|
570
|
-
return;
|
571
|
-
}
|
572
|
-
if (firstLoad) {
|
573
|
-
firstLoad = false;
|
574
|
-
return;
|
575
|
-
}
|
576
|
-
if (typeof rule === 'object') {
|
577
|
-
_results = [];
|
578
|
-
for (_i = 0, _len = rule.length; _i < _len; _i++) {
|
579
|
-
routeName = rule[_i];
|
580
|
-
if (!(routeName === name)) {
|
581
|
-
continue;
|
582
|
-
}
|
583
|
-
Pace.restart();
|
584
|
-
break;
|
585
|
-
}
|
586
|
-
return _results;
|
587
|
-
} else {
|
588
|
-
return Pace.restart();
|
589
|
-
}
|
590
|
-
});
|
591
|
-
}, 0);
|
592
|
-
}
|
593
|
-
|
594
645
|
SOURCE_KEYS = {
|
595
646
|
ajax: AjaxMonitor,
|
596
647
|
elements: ElementMonitor,
|
@@ -599,18 +650,18 @@
|
|
599
650
|
};
|
600
651
|
|
601
652
|
(init = function() {
|
602
|
-
var source, type, _i, _j, _len, _len1,
|
653
|
+
var source, type, _i, _j, _len, _len1, _ref1, _ref2, _ref3;
|
603
654
|
Pace.sources = sources = [];
|
604
|
-
|
605
|
-
for (_i = 0, _len =
|
606
|
-
type =
|
655
|
+
_ref1 = ['ajax', 'elements', 'document', 'eventLag'];
|
656
|
+
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
657
|
+
type = _ref1[_i];
|
607
658
|
if (options[type] !== false) {
|
608
659
|
sources.push(new SOURCE_KEYS[type](options[type]));
|
609
660
|
}
|
610
661
|
}
|
611
|
-
|
612
|
-
for (_j = 0, _len1 =
|
613
|
-
source =
|
662
|
+
_ref3 = (_ref2 = options.extraSources) != null ? _ref2 : [];
|
663
|
+
for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) {
|
664
|
+
source = _ref3[_j];
|
614
665
|
sources.push(new source(options));
|
615
666
|
}
|
616
667
|
Pace.bar = bar = new Bar;
|
@@ -619,6 +670,7 @@
|
|
619
670
|
})();
|
620
671
|
|
621
672
|
Pace.stop = function() {
|
673
|
+
Pace.running = false;
|
622
674
|
bar.destroy();
|
623
675
|
cancelAnimation = true;
|
624
676
|
if (animation != null) {
|
@@ -632,21 +684,22 @@
|
|
632
684
|
|
633
685
|
Pace.restart = function() {
|
634
686
|
Pace.stop();
|
635
|
-
return Pace.
|
687
|
+
return Pace.start();
|
636
688
|
};
|
637
689
|
|
638
690
|
Pace.go = function() {
|
691
|
+
Pace.running = true;
|
639
692
|
bar.render();
|
640
693
|
cancelAnimation = false;
|
641
694
|
return animation = runAnimation(function(frameTime, enqueueNextFrame) {
|
642
|
-
var avg, count, done, element, elements, i, j, remaining, scaler, scalerList, source, start, sum, _i, _j, _len, _len1,
|
695
|
+
var avg, count, done, element, elements, i, j, remaining, scaler, scalerList, source, start, sum, _i, _j, _len, _len1, _ref1;
|
643
696
|
remaining = 100 - bar.progress;
|
644
697
|
count = sum = 0;
|
645
698
|
done = true;
|
646
699
|
for (i = _i = 0, _len = sources.length; _i < _len; i = ++_i) {
|
647
700
|
source = sources[i];
|
648
701
|
scalerList = scalers[i] != null ? scalers[i] : scalers[i] = [];
|
649
|
-
elements = (
|
702
|
+
elements = (_ref1 = source.elements) != null ? _ref1 : [source];
|
650
703
|
for (j = _j = 0, _len1 = elements.length; _j < _len1; j = ++_j) {
|
651
704
|
element = elements[j];
|
652
705
|
scaler = scalerList[j] != null ? scalerList[j] : scalerList[j] = new Scaler(element);
|
@@ -664,7 +717,8 @@
|
|
664
717
|
if (bar.done() || done || cancelAnimation) {
|
665
718
|
bar.update(100);
|
666
719
|
return setTimeout(function() {
|
667
|
-
|
720
|
+
bar.finish();
|
721
|
+
return Pace.running = false;
|
668
722
|
}, Math.max(options.ghostTime, Math.min(options.minTime, now() - start)));
|
669
723
|
} else {
|
670
724
|
return enqueueNextFrame();
|
@@ -674,7 +728,12 @@
|
|
674
728
|
|
675
729
|
Pace.start = function(_options) {
|
676
730
|
extend(options, _options);
|
677
|
-
|
731
|
+
Pace.running = true;
|
732
|
+
try {
|
733
|
+
bar.render();
|
734
|
+
} catch (_error) {
|
735
|
+
NoTargetError = _error;
|
736
|
+
}
|
678
737
|
if (!document.querySelector('.pace')) {
|
679
738
|
return setTimeout(Pace.start, 50);
|
680
739
|
} else {
|
Binary file
|
@@ -7,6 +7,10 @@
|
|
7
7
|
user-select: none;
|
8
8
|
}
|
9
9
|
|
10
|
+
.pace.pace-inactive .pace-progress {
|
11
|
+
display: none;
|
12
|
+
}
|
13
|
+
|
10
14
|
.pace .pace-progress {
|
11
15
|
position: fixed;
|
12
16
|
z-index: 2000;
|
@@ -21,7 +25,7 @@
|
|
21
25
|
position: absolute;
|
22
26
|
top: 0;
|
23
27
|
right: .5rem;
|
24
|
-
content: attr(data-progress);
|
28
|
+
content: attr(data-progress-text);
|
25
29
|
font-family: "Helvetica Neue", sans-serif;
|
26
30
|
font-weight: 100;
|
27
31
|
font-size: 5rem;
|
@@ -0,0 +1,110 @@
|
|
1
|
+
/* This is a compiled file, you should be editing the file in the templates directory */
|
2
|
+
.pace {
|
3
|
+
-webkit-pointer-events: none;
|
4
|
+
pointer-events: none;
|
5
|
+
|
6
|
+
-webkit-user-select: none;
|
7
|
+
-moz-user-select: none;
|
8
|
+
user-select: none;
|
9
|
+
|
10
|
+
-webkit-perspective: 12rem;
|
11
|
+
-moz-perspective: 12rem;
|
12
|
+
-ms-perspective: 12rem;
|
13
|
+
-o-perspective: 12rem;
|
14
|
+
perspective: 12rem;
|
15
|
+
|
16
|
+
z-index: 2000;
|
17
|
+
position: fixed;
|
18
|
+
height: 6rem;
|
19
|
+
width: 6rem;
|
20
|
+
margin: auto;
|
21
|
+
top: 0;
|
22
|
+
left: 0;
|
23
|
+
right: 0;
|
24
|
+
bottom: 0;
|
25
|
+
}
|
26
|
+
|
27
|
+
.pace.pace-inactive .pace-progress {
|
28
|
+
display: none;
|
29
|
+
}
|
30
|
+
|
31
|
+
.pace .pace-progress {
|
32
|
+
position: fixed;
|
33
|
+
z-index: 2000;
|
34
|
+
display: block;
|
35
|
+
position: absolute;
|
36
|
+
left: 0;
|
37
|
+
top: 0;
|
38
|
+
height: 6rem;
|
39
|
+
width: 6rem !important;
|
40
|
+
line-height: 6rem;
|
41
|
+
font-size: 2rem;
|
42
|
+
border-radius: 50%;
|
43
|
+
background: rgba(34, 153, 221, 0.8);
|
44
|
+
color: #fff;
|
45
|
+
font-family: "Helvetica Neue", sans-serif;
|
46
|
+
font-weight: 100;
|
47
|
+
text-align: center;
|
48
|
+
|
49
|
+
-webkit-animation: pace-3d-spinner linear infinite 2s;
|
50
|
+
-moz-animation: pace-3d-spinner linear infinite 2s;
|
51
|
+
-ms-animation: pace-3d-spinner linear infinite 2s;
|
52
|
+
-o-animation: pace-3d-spinner linear infinite 2s;
|
53
|
+
animation: pace-3d-spinner linear infinite 2s;
|
54
|
+
|
55
|
+
-webkit-transform-style: preserve-3d;
|
56
|
+
-moz-transform-style: preserve-3d;
|
57
|
+
-ms-transform-style: preserve-3d;
|
58
|
+
-o-transform-style: preserve-3d;
|
59
|
+
transform-style: preserve-3d;
|
60
|
+
}
|
61
|
+
|
62
|
+
.pace .pace-progress:after {
|
63
|
+
content: attr(data-progress-text);
|
64
|
+
display: block;
|
65
|
+
}
|
66
|
+
|
67
|
+
@-webkit-keyframes pace-3d-spinner {
|
68
|
+
from {
|
69
|
+
-webkit-transform: rotateY(0deg);
|
70
|
+
}
|
71
|
+
to {
|
72
|
+
-webkit-transform: rotateY(360deg);
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
@-moz-keyframes pace-3d-spinner {
|
77
|
+
from {
|
78
|
+
-moz-transform: rotateY(0deg);
|
79
|
+
}
|
80
|
+
to {
|
81
|
+
-moz-transform: rotateY(360deg);
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
@-ms-keyframes pace-3d-spinner {
|
86
|
+
from {
|
87
|
+
-ms-transform: rotateY(0deg);
|
88
|
+
}
|
89
|
+
to {
|
90
|
+
-ms-transform: rotateY(360deg);
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
@-o-keyframes pace-3d-spinner {
|
95
|
+
from {
|
96
|
+
-o-transform: rotateY(0deg);
|
97
|
+
}
|
98
|
+
to {
|
99
|
+
-o-transform: rotateY(360deg);
|
100
|
+
}
|
101
|
+
}
|
102
|
+
|
103
|
+
@keyframes pace-3d-spinner {
|
104
|
+
from {
|
105
|
+
transform: rotateY(0deg);
|
106
|
+
}
|
107
|
+
to {
|
108
|
+
transform: rotateY(360deg);
|
109
|
+
}
|
110
|
+
}
|
data/lib/pace/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pace-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Vera
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -73,15 +73,20 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
+
- .DS_Store
|
76
77
|
- .gitignore
|
77
78
|
- Gemfile
|
78
79
|
- LICENSE.txt
|
79
80
|
- README.md
|
80
81
|
- Rakefile
|
82
|
+
- app/.DS_Store
|
83
|
+
- app/assets/.DS_Store
|
81
84
|
- app/assets/javascripts/pace/pace.js
|
85
|
+
- app/assets/stylesheets/.DS_Store
|
82
86
|
- app/assets/stylesheets/pace/pace-theme-barber-shop.css
|
83
87
|
- app/assets/stylesheets/pace/pace-theme-big-counter.css
|
84
88
|
- app/assets/stylesheets/pace/pace-theme-bounce.css
|
89
|
+
- app/assets/stylesheets/pace/pace-theme-center-circle.css
|
85
90
|
- app/assets/stylesheets/pace/pace-theme-corner-indicator.css
|
86
91
|
- app/assets/stylesheets/pace/pace-theme-fill-left.css
|
87
92
|
- app/assets/stylesheets/pace/pace-theme-flash.css
|
@@ -111,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
116
|
version: '0'
|
112
117
|
requirements: []
|
113
118
|
rubyforge_project:
|
114
|
-
rubygems_version: 2.1.
|
119
|
+
rubygems_version: 2.1.5
|
115
120
|
signing_key:
|
116
121
|
specification_version: 4
|
117
122
|
summary: Pace automatic web page progress bar, integrated in Rails assets pipeline.
|