Skip to content

Commit e04d7ac

Browse files
committed
Merge branch 'master' of github.com:HubSpot/pace
Conflicts: pace.min.js
2 parents 7e7a319 + bf93a25 commit e04d7ac

148 files changed

Lines changed: 11379 additions & 16 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Gruntfile.coffee

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,36 @@ fs = require('fs')
33

44
ThemeUtils = require('./docs/lib/themes.coffee')
55

6+
themeColors =
7+
black: '#000000'
8+
white: '#ffffff'
9+
silver: '#d6d6d6'
10+
red: '#ee3148'
11+
orange: '#eb7a55'
12+
yellow: '#fcd25a'
13+
green: '#22df80'
14+
blue: '#2299dd'
15+
pink: '#e90f92'
16+
purple: '#7c60e0'
17+
618
module.exports = (grunt) ->
719
grunt.registerTask 'themes', 'Compile the pace theme files', ->
820
done = @async()
921

1022
options = grunt.config('themes')
1123

1224
grunt.file.glob options.src, (err, files) ->
13-
for file in files
14-
body = ThemeUtils.compileTheme fs.readFileSync(file).toString()
25+
for colorName, color of themeColors
26+
for file in files
27+
body = ThemeUtils.compileTheme fs.readFileSync(file).toString(), {color}
1528

16-
body = "/* This is a compiled file, you should be editing the file in the templates directory */\n" + body
29+
body = "/* This is a compiled file, you should be editing the file in the templates directory */\n" + body
1730

18-
name = Path.basename file
19-
name = name.replace '.tmpl', ''
20-
path = Path.join options.dest, name
31+
name = Path.basename file
32+
name = name.replace '.tmpl', ''
33+
path = Path.join options.dest, colorName, name
2134

22-
fs.writeFileSync path, body
35+
fs.writeFileSync path, body
2336

2437
done()
2538

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pace
33

44
An automatic web page progress bar.
55

6-
Include [pace.js](https://raw.github.com/HubSpot/pace/v0.5.1/pace.min.js) and a [theme](http://github.hubspot.com/pace/docs/welcome/) of your choice to your page and you are done!
6+
Include [pace.js](https://raw.github.com/HubSpot/pace/v0.5.3/pace.min.js) and a [theme](http://github.hubspot.com/pace/docs/welcome/) of your choice to your page and you are done!
77

88
Pace will automatically monitor your Ajax requests, event loop lag, document ready state and elements on your page to decide on the progress.
99

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "PACE",
33
"main": "pace.js",
4-
"version": "0.5.1",
4+
"version": "0.5.3",
55
"homepage": "http://github.hubspot.com/pace/docs/welcome",
66
"authors": [
77
"Zack Bloom <zackbloom@gmail.com>",

docs/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pace
22
====
33

4-
Include [pace.js](https://raw.github.com/HubSpot/pace/v0.5.1/pace.min.js) and the
4+
Include [pace.js](https://raw.github.com/HubSpot/pace/v0.5.3/pace.min.js) and the
55
[theme](http://github.hubspot.com/pace/docs/welcome/) css of your choice on your page
66
(as early as is possible), and you're done!
77

docs/welcome/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ <h2>What is Pace?</h2>
433433
<p style="text-align: left">No need to hook into any of your code, progress is detected automatically.</p>
434434
<br/>
435435
<h2>Download</h2>
436-
<p><a class="button" href="https://raw.github.com/HubSpot/pace/v0.5.1/pace.min.js">Pace.js</a></p>
436+
<p><a class="button" href="https://raw.github.com/HubSpot/pace/v0.5.3/pace.min.js">Pace.js</a></p>
437437
<br/>
438438
<h2>Themes</h2>
439439
<label class="color-label" for="color-select">Enter a color:</label>

install.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
{
99
"type": "style",
10-
"src": "./themes/pace-theme-{{ options.theme }}.css"
10+
"src": "./themes/{{ options.color }}/pace-theme-{{ options.theme }}.css"
1111
}
1212
]
1313
},
@@ -16,8 +16,8 @@
1616
"color": {
1717
"title": "Color",
1818
"type": "string",
19-
"format": "color",
20-
"default": "auto"
19+
"enum": ["black", "white", "silver", "red", "orange", "yellow", "green", "blue", "pink", "purple"],
20+
"default": "blue"
2121
},
2222
"theme": {
2323
"title": "Theme",

pace.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pace",
3-
"version": "0.5.1",
3+
"version": "0.5.3",
44
"description": "Automatic page load progress bar",
55
"authors": [
66
"Zack Bloom <zackbloom@gmail.com>",
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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+
-webkit-user-select: none;
6+
-moz-user-select: none;
7+
user-select: none;
8+
}
9+
10+
.pace-inactive {
11+
display: none;
12+
}
13+
14+
.pace .pace-progress {
15+
background-color: #000000;
16+
position: fixed;
17+
z-index: 2000;
18+
top: 0;
19+
left: 0;
20+
height: 12px;
21+
overflow: hidden;
22+
23+
-webkit-transition: width 1s;
24+
-moz-transition: width 1s;
25+
-o-transition: width 1s;
26+
transition: width 1s;
27+
}
28+
29+
.pace .pace-progress-inner {
30+
position: absolute;
31+
top: 0;
32+
left: 0;
33+
right: -32px;
34+
bottom: 0;
35+
36+
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.2)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.2)), color-stop(0.75, rgba(255, 255, 255, 0.2)), color-stop(0.75, transparent), to(transparent));
37+
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
38+
background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
39+
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
40+
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
41+
-webkit-background-size: 32px 32px;
42+
-moz-background-size: 32px 32px;
43+
-o-background-size: 32px 32px;
44+
background-size: 32px 32px;
45+
46+
-webkit-animation: pace-stripe-animation 500ms linear infinite;
47+
-moz-animation: pace-stripe-animation 500ms linear infinite;
48+
-ms-animation: pace-stripe-animation 500ms linear infinite;
49+
-o-animation: pace-stripe-animation 500ms linear infinite;
50+
animation: pace-stripe-animation 500ms linear infinite;
51+
}
52+
53+
@-webkit-keyframes pace-stripe-animation {
54+
0% { -webkit-transform: none; transform: none; }
55+
100% { -webkit-transform: translate(-32px, 0); transform: translate(-32px, 0); }
56+
}
57+
@-moz-keyframes pace-stripe-animation {
58+
0% { -moz-transform: none; transform: none; }
59+
100% { -moz-transform: translate(-32px, 0); transform: translate(-32px, 0); }
60+
}
61+
@-o-keyframes pace-stripe-animation {
62+
0% { -o-transform: none; transform: none; }
63+
100% { -o-transform: translate(-32px, 0); transform: translate(-32px, 0); }
64+
}
65+
@-ms-keyframes pace-stripe-animation {
66+
0% { -ms-transform: none; transform: none; }
67+
100% { -ms-transform: translate(-32px, 0); transform: translate(-32px, 0); }
68+
}
69+
@keyframes pace-stripe-animation {
70+
0% { transform: none; transform: none; }
71+
100% { transform: translate(-32px, 0); transform: translate(-32px, 0); }
72+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
-webkit-user-select: none;
6+
-moz-user-select: none;
7+
user-select: none;
8+
}
9+
10+
.pace.pace-inactive .pace-progress {
11+
display: none;
12+
}
13+
14+
.pace .pace-progress {
15+
position: fixed;
16+
z-index: 2000;
17+
top: 0;
18+
right: 0;
19+
height: 5rem;
20+
width: 5rem;
21+
}
22+
23+
.pace .pace-progress:after {
24+
display: block;
25+
position: absolute;
26+
top: 0;
27+
right: .5rem;
28+
content: attr(data-progress-text);
29+
font-family: "Helvetica Neue", sans-serif;
30+
font-weight: 100;
31+
font-size: 5rem;
32+
line-height: 1;
33+
text-align: right;
34+
color: rgba(0, 0, 0, 0.19999999999999996);
35+
}

0 commit comments

Comments
 (0)