Skip to content

Commit

Permalink
updated animation & donate loop
Browse files Browse the repository at this point in the history
  • Loading branch information
unbug committed Oct 25, 2017
1 parent 8af457d commit 7bce805
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 15 deletions.
2 changes: 1 addition & 1 deletion cache.manifest
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CACHE MANIFEST
# Build: 20171024084748
# Build: 20171025072741

CACHE:
resources/fonts/Dressedless_Three.svg
Expand Down
6 changes: 3 additions & 3 deletions index.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions static/app/resources/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ html, body {
width: 100%;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
-webkit-font-smoothing: antialiased;
transition: all 350ms ease-in-out; }
transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1); }

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

@-webkit-keyframes sk-rotateplane {
0% {
Expand Down Expand Up @@ -250,7 +250,7 @@ html, body {
transition-delay: 950ms; }
.main-title h5 {
max-height: 300px;
transition: all 250ms ease-in-out;
transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
overflow: hidden; }
.main-title h5 .label {
background-color: #71b7fd; }
Expand Down
4 changes: 2 additions & 2 deletions static/app/scss/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
/*https://github.com/tobiasahlin/SpinKit*/
/* spinner */
.spinner {
-webkit-animation: sk-rotateplane 1.2s infinite ease-in-out;
animation: sk-rotateplane 1.2s infinite ease-in-out;
-webkit-animation: sk-rotateplane 1.2s infinite cubic-bezier(0.4, 0, 0.2, 1);
animation: sk-rotateplane 1.2s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@-webkit-keyframes sk-rotateplane {
Expand Down
2 changes: 1 addition & 1 deletion static/app/scss/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}
h5 {
max-height: 300px;
transition: all 250ms ease-in-out;
transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
overflow: hidden;

.label {
Expand Down
2 changes: 1 addition & 1 deletion static/app/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ html, body {
width: 100%;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
-webkit-font-smoothing: antialiased;
transition: all 350ms ease-in-out;
transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
}
@import "util.scss";
@import "animate.scss";
Expand Down
7 changes: 6 additions & 1 deletion static/app/src/AppBundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ var els = {
donate: $('.donate'),
donateTitle: $('.donate .title'),
noticeLinks: $('.notice-link a'),
noticeIndex: 0,

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

function renderNotice() {
els.noticeIndex += 1;
if (els.noticeIndex >= els.noticeLinks.length) {
els.noticeIndex = 0;
}
els.noticeLinks.hide();
els.noticeLinks.eq(Math.floor(Math.random() * els.noticeLinks.length)).show();
els.noticeLinks.eq(els.noticeIndex).show();
setTimeout(renderNotice, 5 * 1000);
}

Expand Down
7 changes: 6 additions & 1 deletion static/app/src/view/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ var els = {
donate: $('.donate'),
donateTitle: $('.donate .title'),
noticeLinks: $('.notice-link a'),
noticeIndex: 0,

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

function renderNotice() {
els.noticeIndex += 1;
if (els.noticeIndex >= els.noticeLinks.length) {
els.noticeIndex = 0;
}
els.noticeLinks.hide();
els.noticeLinks.eq(Math.floor(Math.random() * els.noticeLinks.length)).show();
els.noticeLinks.eq(els.noticeIndex).show();
setTimeout(renderNotice, 5 * 1000);
}

Expand Down
2 changes: 1 addition & 1 deletion sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// cache, then increment the CACHE_VERSION value. It will kick off the service worker update
// flow and the old cache(s) will be purged as part of the activate event handler when the
// updated service worker is activated.
var CACHE_VERSION = 20171024084748;
var CACHE_VERSION = 20171025072741;
var CURRENT_CACHES = {
prefetch: 'prefetch-cache-v' + CACHE_VERSION
};
Expand Down

0 comments on commit 7bce805

Please sign in to comment.