From 7c09a57610317f4133d91a2b2b02c8aa2cf1dda7 Mon Sep 17 00:00:00 2001 From: Hananoshika Yomaru Date: Tue, 19 May 2026 13:40:19 -0700 Subject: [PATCH] Enhance SVG illustrations with animations and improved designs: update multiple SVG files to include floating and pulsing effects, modify titles and structures for clarity, and ensure consistent styling across illustrations. Update SASS for animation handling in the why-sections. --- themes/openfreebooks/sass/_why-sections.scss | 38 +++++++++++++ .../partials/svg/icons/tabler-coin.html | 3 + .../partials/svg/icons/tabler-user.html | 2 + .../templates/partials/svg/why-craft.html | 54 +++++++++++++----- .../templates/partials/svg/why-html.html | 56 +++++++++++++----- .../templates/partials/svg/why-learning.html | 29 ++++++---- .../templates/partials/svg/why-not-ai.html | 57 +++++++++++++++---- .../templates/partials/svg/why-teachers.html | 28 ++++++--- .../partials/svg/why-textbook-costs.html | 30 ++++++---- 9 files changed, 229 insertions(+), 68 deletions(-) create mode 100644 themes/openfreebooks/templates/partials/svg/icons/tabler-coin.html create mode 100644 themes/openfreebooks/templates/partials/svg/icons/tabler-user.html diff --git a/themes/openfreebooks/sass/_why-sections.scss b/themes/openfreebooks/sass/_why-sections.scss index cf82fa9..8951606 100644 --- a/themes/openfreebooks/sass/_why-sections.scss +++ b/themes/openfreebooks/sass/_why-sections.scss @@ -36,6 +36,39 @@ width: min(100%, 280px); height: auto; display: block; + overflow: visible; +} + +.why-art.is-inview .why-illustration__float { + animation: why-illustration-float 4.5s ease-in-out infinite; + transform-origin: center; + transform-box: fill-box; +} + +.why-art.is-inview .why-illustration__pulse { + animation: why-illustration-pulse 2.8s ease-in-out infinite; +} + +@keyframes why-illustration-float { + 0%, + 100% { + transform: translateY(0); + } + + 50% { + transform: translateY(-5px); + } +} + +@keyframes why-illustration-pulse { + 0%, + 100% { + opacity: 1; + } + + 50% { + opacity: 0.45; + } } .why-copy { @@ -245,6 +278,11 @@ $university-colors: ( transition: none; } + .why-illustration__float, + .why-illustration__pulse { + animation: none !important; + } + .university-carousel-track { animation: none; flex-wrap: wrap; diff --git a/themes/openfreebooks/templates/partials/svg/icons/tabler-coin.html b/themes/openfreebooks/templates/partials/svg/icons/tabler-coin.html new file mode 100644 index 0000000..9e617e5 --- /dev/null +++ b/themes/openfreebooks/templates/partials/svg/icons/tabler-coin.html @@ -0,0 +1,3 @@ + + + diff --git a/themes/openfreebooks/templates/partials/svg/icons/tabler-user.html b/themes/openfreebooks/templates/partials/svg/icons/tabler-user.html new file mode 100644 index 0000000..8fb3fa2 --- /dev/null +++ b/themes/openfreebooks/templates/partials/svg/icons/tabler-user.html @@ -0,0 +1,2 @@ + + diff --git a/themes/openfreebooks/templates/partials/svg/why-craft.html b/themes/openfreebooks/templates/partials/svg/why-craft.html index 899b6d6..627491e 100644 --- a/themes/openfreebooks/templates/partials/svg/why-craft.html +++ b/themes/openfreebooks/templates/partials/svg/why-craft.html @@ -1,14 +1,42 @@ -