From 98a77f641007ae5fe878f7da98b50e7650231e8d Mon Sep 17 00:00:00 2001 From: grandeljay Date: Tue, 14 Jun 2022 18:24:56 +0200 Subject: [PATCH] Add logo animation to home --- src/assets/css/home.css | 34 ++++++ src/assets/img/logo-animation.svg | 193 ++++++++++++++++++++++++++++++ src/classes/page.php | 4 + 3 files changed, 231 insertions(+) create mode 100644 src/assets/img/logo-animation.svg diff --git a/src/assets/css/home.css b/src/assets/css/home.css index 4b302109..5374030b 100644 --- a/src/assets/css/home.css +++ b/src/assets/css/home.css @@ -10,3 +10,37 @@ .ui.statistics .statistic > .value { font-variant-numeric: tabular-nums lining-nums slashed-zero; } + +#text-list { + animation: 0.8s 1s ease text-list; +} +@keyframes text-list { + 0% { + position: relative; + + opacity: 1; + bottom: 0; + } + + 100% { + opacity: 0; + bottom: calc(1em * 1.4285 + 0.91666667em * 2 + 2px); + } +} + +#text-this { + animation: 0.8s 1s ease text-this; +} +@keyframes text-this { + 0% { + position: relative; + + opacity: 0; + bottom: 0; + } + + 100% { + opacity: 1; + bottom: calc(1em * 1.4285 + 0.91666667em * 2 + 2px); + } +} diff --git a/src/assets/img/logo-animation.svg b/src/assets/img/logo-animation.svg new file mode 100644 index 00000000..e375fa86 --- /dev/null +++ b/src/assets/img/logo-animation.svg @@ -0,0 +1,193 @@ + + + + diff --git a/src/classes/page.php b/src/classes/page.php index 8115a48b..ad864b32 100644 --- a/src/classes/page.php +++ b/src/classes/page.php @@ -568,7 +568,11 @@ class Page ksort($pages); + if ('home' === $this->name) { + $logo = file_get_contents(ROOT . '/src/assets/img/logo-animation.svg'); + } else { $logo = file_get_contents(ROOT . '/src/assets/img/logo.svg'); + } ?>