From eb8584a31e5bb555258fe824a82e7fcb41324bbc Mon Sep 17 00:00:00 2001 From: Florent Delerue Date: Tue, 22 Jun 2021 15:56:59 +0200 Subject: [PATCH] feat: home discover animation (#463) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :construction: (HomeDiscover) lottie animation * :fire: (lottie) remove json * fix: lottie ref * :sparkles: (HomeDiscover) anim * :recycle: (HomeDiscover) replace the 5 animations in one and add segments * :sparkles: (HomeDiscover) update json lottie path * :sparkles: (HomeDiscover) play/pause animation on scoll * :sparkles: (HomeDiscover) anim according color mode * :sparkles: (HomeDiscover) change threshold for anim visibility * :bug: (HomeDiscover) add any type on useContext to avoid lint error * :recycle: (HomeDiscover) change layout anim size Co-authored-by: Farnabaz Co-authored-by: Yaël GUILLOUX --- nuxtjs.org/components/HomeDiscover.vue | 203 ++++++++++++++---- .../static/img/home/discover/diamond.svg | 1 + package.json | 1 + yarn.lock | 5 + 4 files changed, 172 insertions(+), 38 deletions(-) create mode 100644 nuxtjs.org/static/img/home/discover/diamond.svg diff --git a/nuxtjs.org/components/HomeDiscover.vue b/nuxtjs.org/components/HomeDiscover.vue index 59f794202..74e4d932f 100644 --- a/nuxtjs.org/components/HomeDiscover.vue +++ b/nuxtjs.org/components/HomeDiscover.vue @@ -13,9 +13,9 @@ alt="A landscape image" /> - + - @@ -81,22 +102,128 @@ /> + + diff --git a/nuxtjs.org/static/img/home/discover/diamond.svg b/nuxtjs.org/static/img/home/discover/diamond.svg new file mode 100644 index 000000000..40b9b81c5 --- /dev/null +++ b/nuxtjs.org/static/img/home/discover/diamond.svg @@ -0,0 +1 @@ + diff --git a/package.json b/package.json index a7106d4fa..e29d8a45a 100755 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ "hasha": "^5.2.2", "hookable": "^4.4.1", "jiti": "^1.10.1", + "lottie-web": "^5.7.11", "mande": "^1.0.0", "marked": "^2.0.7", "mkdirp": "^1.0.4", diff --git a/yarn.lock b/yarn.lock index 31a79dcfc..78ffd0ef7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8284,6 +8284,11 @@ loose-envify@^1.0.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" +lottie-web@^5.7.11: + version "5.7.11" + resolved "https://registry.yarnpkg.com/lottie-web/-/lottie-web-5.7.11.tgz#4ba74e8a629f76d3c0a0062ddc37d2b96e13765c" + integrity sha512-Jvz3PQqwrDj1rXGqfeQtipH/WNtM/Y4l8t8NIQXe1xUI0nVooH2bTYJGef0UkdBcWUx1s3miKsRhyP196g9tvQ== + loud-rejection@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f"