Skip to content

Commit 7bce805

Browse files
committed
updated animation & donate loop
1 parent 8af457d commit 7bce805

9 files changed

Lines changed: 25 additions & 15 deletions

File tree

‎cache.manifest‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CACHE MANIFEST
2-
# Build: 20171024084748
2+
# Build: 20171025072741
33

44
CACHE:
55
resources/fonts/Dressedless_Three.svg

‎index.html‎

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

‎static/app/resources/css/style.css‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ html, body {
22
width: 100%;
33
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
44
-webkit-font-smoothing: antialiased;
5-
transition: all 350ms ease-in-out; }
5+
transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1); }
66

77
.fix-break-word, p {
88
word-break: break-all;
@@ -122,8 +122,8 @@ html, body {
122122
/*https://github.com/tobiasahlin/SpinKit*/
123123
/* spinner */
124124
.spinner {
125-
-webkit-animation: sk-rotateplane 1.2s infinite ease-in-out;
126-
animation: sk-rotateplane 1.2s infinite ease-in-out; }
125+
-webkit-animation: sk-rotateplane 1.2s infinite cubic-bezier(0.4, 0, 0.2, 1);
126+
animation: sk-rotateplane 1.2s infinite cubic-bezier(0.4, 0, 0.2, 1); }
127127

128128
@-webkit-keyframes sk-rotateplane {
129129
0% {
@@ -250,7 +250,7 @@ html, body {
250250
transition-delay: 950ms; }
251251
.main-title h5 {
252252
max-height: 300px;
253-
transition: all 250ms ease-in-out;
253+
transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
254254
overflow: hidden; }
255255
.main-title h5 .label {
256256
background-color: #71b7fd; }

‎static/app/scss/_components.scss‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
/*https://github.com/tobiasahlin/SpinKit*/
1111
/* spinner */
1212
.spinner {
13-
-webkit-animation: sk-rotateplane 1.2s infinite ease-in-out;
14-
animation: sk-rotateplane 1.2s infinite ease-in-out;
13+
-webkit-animation: sk-rotateplane 1.2s infinite cubic-bezier(0.4, 0, 0.2, 1);
14+
animation: sk-rotateplane 1.2s infinite cubic-bezier(0.4, 0, 0.2, 1);
1515
}
1616

1717
@-webkit-keyframes sk-rotateplane {

‎static/app/scss/_main.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
}
5454
h5 {
5555
max-height: 300px;
56-
transition: all 250ms ease-in-out;
56+
transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
5757
overflow: hidden;
5858

5959
.label {

‎static/app/scss/style.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ html, body {
22
width: 100%;
33
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
44
-webkit-font-smoothing: antialiased;
5-
transition: all 350ms ease-in-out;
5+
transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
66
}
77
@import "util.scss";
88
@import "animate.scss";

‎static/app/src/AppBundle.js‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ var els = {
485485
donate: $('.donate'),
486486
donateTitle: $('.donate .title'),
487487
noticeLinks: $('.notice-link a'),
488+
noticeIndex: 0,
488489

489490
isGithub: /github\.io/g.test(location.href) || Util.localParam()['search']['debug']==1,
490491
lastVal: ''
@@ -953,8 +954,12 @@ function renderDonate(isZh) {
953954
}
954955

955956
function renderNotice() {
957+
els.noticeIndex += 1;
958+
if (els.noticeIndex >= els.noticeLinks.length) {
959+
els.noticeIndex = 0;
960+
}
956961
els.noticeLinks.hide();
957-
els.noticeLinks.eq(Math.floor(Math.random() * els.noticeLinks.length)).show();
962+
els.noticeLinks.eq(els.noticeIndex).show();
958963
setTimeout(renderNotice, 5 * 1000);
959964
}
960965

‎static/app/src/view/View.js‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ var els = {
3939
donate: $('.donate'),
4040
donateTitle: $('.donate .title'),
4141
noticeLinks: $('.notice-link a'),
42+
noticeIndex: 0,
4243

4344
isGithub: /github\.io/g.test(location.href) || Util.localParam()['search']['debug']==1,
4445
lastVal: ''
@@ -507,8 +508,12 @@ function renderDonate(isZh) {
507508
}
508509

509510
function renderNotice() {
511+
els.noticeIndex += 1;
512+
if (els.noticeIndex >= els.noticeLinks.length) {
513+
els.noticeIndex = 0;
514+
}
510515
els.noticeLinks.hide();
511-
els.noticeLinks.eq(Math.floor(Math.random() * els.noticeLinks.length)).show();
516+
els.noticeLinks.eq(els.noticeIndex).show();
512517
setTimeout(renderNotice, 5 * 1000);
513518
}
514519

‎sw.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// cache, then increment the CACHE_VERSION value. It will kick off the service worker update
2525
// flow and the old cache(s) will be purged as part of the activate event handler when the
2626
// updated service worker is activated.
27-
var CACHE_VERSION = 20171024084748;
27+
var CACHE_VERSION = 20171025072741;
2828
var CURRENT_CACHES = {
2929
prefetch: 'prefetch-cache-v' + CACHE_VERSION
3030
};

0 commit comments

Comments
 (0)