Skip to content

Commit

Permalink
nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
surmon-china committed Aug 4, 2017
2 parents 6e07189 + 59b7303 commit f55da7c
Show file tree
Hide file tree
Showing 14 changed files with 58 additions and 42 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ dist

sitemap.xml

*/barrages.json
data/barrages.json
/data/barrages.json
98 changes: 56 additions & 42 deletions components/layout/barrage.vue
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,14 @@
// 获取渲染容器高度
const innerHeight = document.documentElement.clientHeight - 63
const innerCount = innerHeight / 30
const randomCount = this.randomPer(innerCount) - 1
element.style.top = randomCount / innerCount * 100 + '%'
let randomCount = this.randomPer(innerCount) - 3
randomCount = randomCount < 0 ? 1 : randomCount
let topPre = randomCount / innerCount * 100
topPre = (topPre > 88) ? 86 : topPre
element.style.top = topPre + '%'
// 新消息不再添加左边距
if (!element.attributes.new) {
element.style.left = this.randomPer(4) * 10 + '%'
element.style.left = this.randomPer(6) * 10 + '%'
}
setTimeout(done, 28000)
},
Expand Down Expand Up @@ -214,48 +217,31 @@
0% { transform: translate3d(0, -100%, 0) }
25%, 50%, 75%, 100% { transform: translate3d(0, 0, 0) }
37% { transform: translate3d(0, -24%, 0) }
62% { transform: translate3d(0, -16.6%, 0) }
88% { transform: translate3d(0, -7%, 0) }
62% { transform: translate3d(0, -12%, 0) }
88% { transform: translate3d(0, -5%, 0) }
}
@keyframes barrage-out {
0% { transform: translate3d(0, 0, 0) }
100% { transform: translate3d(0, -100%, 0) }
}
@keyframes inputBg {
0% {
color: white;
background: chartreuse;
}
12% {
color: white;
background: green;
}
24% {
color: white;
background: red;
}
36% {
color: white;
background: darkviolet;
}
60% {
color: white;
background: pink;
}
72% {
color: $text;
background: yellow;
}
86% {
color: $text;
background: white;
}
100% {
color: white;
background: black;
}
@keyframes input-box-in {
0% { transform: translate3d(0, -2000%, 0) }
65% { transform: translate3d(0, 100%, 0) }
80% { transform: translate3d(0, -80%, 0) }
100% { transform: translate3d(0, 0, 0) }
}
@keyframes inputColor {
0% { color: chartreuse }
12% { color: green }
24% { color: red }
36% { color: darkviolet }
60% { color: pink }
72% { color: yellow }
86% { color: white }
100% { color: black }
}
.global-barrage {
Expand All @@ -268,18 +254,44 @@
opacity: 0;
visibility: hidden;
transform: translate3d(0, -100%, 0);
animation-duration: .666s;
animation-duration: .5s;
animation-fill-mode: both;
animation-name: barrage-out;
background-color: #b7b7b7c4;
background-color: rgba(183, 183, 183, 0.7);
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
perspective: 1000;
-webkit-perspective: 1000;
> .barrage-box {
> .input-box {
transition: transform 5s;
transform: translate3d(0, -2000%, 0);
}
}
&.active {
opacity: 1;
visibility: visible;
animation-duration: 1.111s;
animation-duration: 1.556s;
animation-fill-mode: both;
animation-name: barrage-in;
animation-timing-function: ease;
> .barrage-box {
> .input-box {
// transition: transform 5s;
animation-delay: 1.6s;
animation-duration: .5s;
animation-fill-mode: both;
animation-name: input-box-in;
animation-timing-function: ease;
// transform: translate3d(0, 0, 0);
}
}
}
> .barrage-box {
Expand Down Expand Up @@ -335,7 +347,7 @@
margin: 0 auto;
width: 42rem;
height: 4rem;
background-color: rgba($module-bg, .9);
background-color: rgba($module-bg, .7);
> .count {
width: auto;
Expand Down Expand Up @@ -400,10 +412,12 @@
margin: 0 auto;
flex-grow: 1;
padding: 1rem;
background-color: rgba($module-bg, .3);
&:hover,
&:focus {
animation: inputBg 10s infinite;
background-color: rgba($module-bg, .5);
animation: inputColor 10s infinite;
}
}
}
Expand Down
Empty file modified data/barrages.default.json
100644 → 100755
Empty file.
Empty file modified data/barrages.json
100644 → 100755
Empty file.
Empty file modified plugins/offline.js
100644 → 100755
Empty file.
Empty file modified plugins/socket.io.js
100644 → 100755
Empty file.
Empty file modified static/images/app-hot-optimize.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified static/images/app-hot.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified static/images/app-hot.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified static/images/app-logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified static/images/app-qrcode.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified static/images/gravatar.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified static/images/wechat.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified utils/debounce.js
100644 → 100755
Empty file.

0 comments on commit f55da7c

Please sign in to comment.