From 7bc9ead815bfc73cfb44ae995568c2f4f9cf17a5 Mon Sep 17 00:00:00 2001 From: Alicia Date: Sat, 23 Feb 2019 17:52:00 +0000 Subject: [PATCH] animated bounce for donors --- static/ripple.css | 74 +++++++++++++++++++++++++++++++++++++++++++ templates/navbar.html | 2 +- 2 files changed, 75 insertions(+), 1 deletion(-) diff --git a/static/ripple.css b/static/ripple.css index 2455801..2805e35 100644 --- a/static/ripple.css +++ b/static/ripple.css @@ -466,4 +466,78 @@ img.locked-achievement:hover { -webkit-filter: brightness(0.5) drop-shadow(0 5px 5px #777); filter: brightness(0.5) drop-shadow(0 5px 5px #777); } +.animated.flipOutX, +.animated.flipOutY, +.animated.bounceIn, +.animated.bounceOut { + -webkit-animation-duration: .75s; + animation-duration: .75s; +} +@-webkit-keyframes bounce { + from, 20%, 53%, 80%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + -webkit-transform: translate3d(0,0,0); + transform: translate3d(0,0,0); + } + + 40%, 43% { + -webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + -webkit-transform: translate3d(0, -30px, 0); + transform: translate3d(0, -30px, 0); + } + + 70% { + -webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + -webkit-transform: translate3d(0, -15px, 0); + transform: translate3d(0, -15px, 0); + } + + 90% { + -webkit-transform: translate3d(0,-4px,0); + transform: translate3d(0,-4px,0); + } +} + +@keyframes bounce { + from, 20%, 53%, 80%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + -webkit-transform: translate3d(0,0,0); + transform: translate3d(0,0,0); + } + + 40%, 43% { + -webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + -webkit-transform: translate3d(0, -30px, 0); + transform: translate3d(0, -30px, 0); + } + + 70% { + -webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + -webkit-transform: translate3d(0, -15px, 0); + transform: translate3d(0, -15px, 0); + } + + 90% { + -webkit-transform: translate3d(0,-4px,0); + transform: translate3d(0,-4px,0); + } +} +#bouncy { + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; + -webkit-animation-iteration-count: infinite; + animation-iteration-count: infinite; + -webkit-animation-name: bounce; + animation-name: bounce; + -webkit-transform-origin: center bottom; + transform-origin: center bottom; +} \ No newline at end of file diff --git a/templates/navbar.html b/templates/navbar.html index 5de541c..9657acd 100644 --- a/templates/navbar.html +++ b/templates/navbar.html @@ -41,7 +41,7 @@ {{ end }} - {{ navbarItem .Path (.T "Donate" | printf "%s") "/donate" }} + {{ if .has_donor }}{{ navbarItem .Path (.T "Donate" | printf "%s") "/donate" }}{{else}}{{ navbarItem .Path (.T "Donate" | printf "%s") "/donate" }} {{ if $isAdmin }}{{ navbarItem .Path (.T "RAP" | printf "%s") "https://old.yozora.pw/p/100" }}{{ end }} {{ end }}