diff --git a/assets/img/icons/fireworks.svg b/assets/img/icons/fireworks.svg new file mode 100644 index 0000000..75f72e0 --- /dev/null +++ b/assets/img/icons/fireworks.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/scss/global.scss b/assets/scss/global.scss index e69de29..021c34a 100644 --- a/assets/scss/global.scss +++ b/assets/scss/global.scss @@ -0,0 +1,40 @@ +img { + max-width: 100%; +} + +h1 { + font-size: 80px; +} +h2 { + font-size: 45px; +} + +.icon { + width: 32px; + height: auto; + &.icon-16 { + width: 16px; + } + &.icon-32 { + width: 32px; + } + &.icon-64 { + width: 64px; + } + &.icon-128 { + width: 128px; + } +} +#content { + color: $primary-boy; + padding: 50px 5px; + animation: fadein 1s; + text-align: center; +} + +@keyframes fadein { + from { opacity: 0; } + to { opacity: 1; } +} + + diff --git a/components/Fireworks.vue b/components/Fireworks.vue index 058b118..70311dd 100644 --- a/components/Fireworks.vue +++ b/components/Fireworks.vue @@ -144,6 +144,8 @@ } } +let requestId = null; + export default { data () { return { @@ -163,7 +165,7 @@ export default { document.ontouchstart = evt => birthday.onClick(evt) ;(function loop(){ - requestAnimationFrame(loop) + requestId = requestAnimationFrame(loop) let now = timestamp() let delta = now - then @@ -174,6 +176,10 @@ export default { }, beforeDestroy () { + if (requestId) { + window.cancelAnimationFrame(requestId); + requestId = undefined; + } }, } diff --git a/pages/girl.vue b/pages/girl.vue index 387aa02..9483f05 100644 --- a/pages/girl.vue +++ b/pages/girl.vue @@ -1,11 +1,11 @@