From b49b0f95fc34d6aab12b89a6d660ba690ecb5c9c Mon Sep 17 00:00:00 2001 From: Stefan Imhoff Date: Fri, 5 Dec 2025 12:26:50 +0100 Subject: [PATCH] feat: add scroll animations --- src/components/JournalList.astro | 2 +- src/content/projects/bamboo-illustration.mdx | 2 +- src/content/projects/book-cover.mdx | 1 + src/content/projects/exploring-hamburg-v2.mdx | 1 + src/content/projects/font-ingo.mdx | 1 + src/content/projects/haiku.mdx | 1 + .../projects/ia-writer-template-nanzan.mdx | 1 + .../projects/ia-writer-template-shibui.mdx | 1 + src/content/projects/journal.mdx | 1 + src/content/projects/kogakure-v9.mdx | 1 + src/content/projects/koi-illustration.mdx | 1 + src/content/projects/osteopathie-hamburg.mdx | 1 + src/content/projects/sketchnotes.mdx | 1 + src/content/projects/stefanimhoff-v4.mdx | 1 + .../projects/thai-restaurants-hamburg.mdx | 1 + .../projects/traditional-colors-of-japan.mdx | 2 +- .../projects/xing-onboarding-illustrations.mdx | 1 + src/pages/ai-art.astro | 1 + src/pages/index.astro | 6 +++--- src/pages/sketchnotes.astro | 1 + src/pages/traditional-colors-of-japan.astro | 2 +- src/styles/global.css | 18 ++++++++++++++++++ 22 files changed, 41 insertions(+), 7 deletions(-) diff --git a/src/components/JournalList.astro b/src/components/JournalList.astro index 7514cd3..a2f5a15 100644 --- a/src/components/JournalList.astro +++ b/src/components/JournalList.astro @@ -18,7 +18,7 @@ const { entries } = Astro.props; > { entries.map(({ slug, data }) => ( -
  • +
  • diff --git a/src/pages/index.astro b/src/pages/index.astro index 0b0ee79..b42ad05 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -66,7 +66,7 @@ rssPosts.sort(sortMarkdownByDate);
    What I Do
    @@ -76,7 +76,7 @@ rssPosts.sort(sortMarkdownByDate);
    Journal @@ -84,7 +84,7 @@ rssPosts.sort(sortMarkdownByDate);
    diff --git a/src/pages/sketchnotes.astro b/src/pages/sketchnotes.astro index a859f7f..be538cc 100644 --- a/src/pages/sketchnotes.astro +++ b/src/pages/sketchnotes.astro @@ -55,6 +55,7 @@ const description = 'This is a collection of Sketchnotes I’ve drawn.'; 'md:col-span-5 md:row-span-6': data.images[0].aspectRatio < 1 && data.coverSize === 'large', }, + 'slide', ]} > diff --git a/src/pages/traditional-colors-of-japan.astro b/src/pages/traditional-colors-of-japan.astro index fb4f05e..736a952 100644 --- a/src/pages/traditional-colors-of-japan.astro +++ b/src/pages/traditional-colors-of-japan.astro @@ -39,7 +39,7 @@ const description = { colors.map(({ name, description, color }) => ( -
    +
    )) diff --git a/src/styles/global.css b/src/styles/global.css index 7ee0466..1a03aba 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -268,4 +268,22 @@ figure > .figure-content > lite-youtube { @apply mbe-0; } + + @keyframes slide-fade-in { + from { + opacity: 0; + box-shadow: none; + transform: scale(0.8) translateY(15vh); + } + } + + .slide { + @media (prefers-reduced-motion: no-preference) { + @supports (animation-timeline: view()) { + animation: slide-fade-in both; + animation-timeline: view(); + animation-range: contain -40% contain 50%; + } + } + } }