From 27824fe2dd2fd6bb297dc23e185cc072d20b75cc Mon Sep 17 00:00:00 2001 From: "Ng Wing Tat, David" Date: Fri, 20 Dec 2024 00:15:41 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20Rewrite=20=20wit?= =?UTF-8?q?h=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/css/_transitions.scss | 19 +++ src/components/SiteTopBanner.vue | 171 +++++++++++-------- src/components/SiteTopBannerForChristmas.vue | 15 ++ src/layouts/default.vue | 2 +- src/layouts/index.vue | 2 +- 5 files changed, 140 insertions(+), 69 deletions(-) create mode 100644 src/components/SiteTopBannerForChristmas.vue diff --git a/src/assets/css/_transitions.scss b/src/assets/css/_transitions.scss index 72a8bf06c..0bf1b6c91 100644 --- a/src/assets/css/_transitions.scss +++ b/src/assets/css/_transitions.scss @@ -18,3 +18,22 @@ transition-timing-function: ease-in; } } + +.scroll-up- { + &enter { + transform: translateY(100%); + } + &leave-to { + transform: translateY(-100%); + } + + &enter-active, + &leave-active { + transition-property: opacity, transform !important; + transition-duration: 2s; + } + &enter-active, + &leave-active { + transition-timing-function: cubic-bezier(0.7, 0, 0.25, 1); + } +} diff --git a/src/components/SiteTopBanner.vue b/src/components/SiteTopBanner.vue index c2c25197c..4cd3748bf 100644 --- a/src/components/SiteTopBanner.vue +++ b/src/components/SiteTopBanner.vue @@ -1,93 +1,130 @@ - - diff --git a/src/components/SiteTopBannerForChristmas.vue b/src/components/SiteTopBannerForChristmas.vue new file mode 100644 index 000000000..7a3f24e94 --- /dev/null +++ b/src/components/SiteTopBannerForChristmas.vue @@ -0,0 +1,15 @@ + + + diff --git a/src/layouts/default.vue b/src/layouts/default.vue index 46271d6fe..d35d3fbdf 100644 --- a/src/layouts/default.vue +++ b/src/layouts/default.vue @@ -1,6 +1,6 @@