From 91461472afdbb401c8cf7bd310a327750db8cb59 Mon Sep 17 00:00:00 2001 From: Felix Icaza Date: Fri, 25 Oct 2024 21:00:24 -0600 Subject: [PATCH 1/3] style(refactor): body styles --- src/layouts/Base.astro | 65 +++++++++++++++--------------------------- 1 file changed, 23 insertions(+), 42 deletions(-) diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro index 54778ef..78456ac 100644 --- a/src/layouts/Base.astro +++ b/src/layouts/Base.astro @@ -130,7 +130,29 @@ const ogURL = `${site}/og.png`; color: var(--text-color); background-color: var(--bg-color); font-family: var(--main-font-family); - cursor: url(/assets/images/cursor/cursor-auto.webp), auto; + + &::before { + content: ''; + pointer-events: none; + background-size: cover; + background-image: url('/assets/images/harley.webp'); + + width: 12rem; + z-index: 9999; + position: fixed; + aspect-ratio: 0.9; + inset-block-end: -20rem; + inset-inline-end: -15rem; + + transition-duration: 0.3s; + transition-timing-function: ease-in-out; + transition-property: inset-block-end, inset-inline-end; + } + + &.woof::before { + inset-block-end: -1rem; + inset-inline-end: -1rem; + } &::-webkit-scrollbar { width: var(--scrollbar-size); @@ -178,45 +200,4 @@ const ogURL = `${site}/og.png`; p { text-wrap: pretty; } - - a, - a *, - button, - button * { - cursor: url(/assets/images/cursor/cursor-pointer.webp), pointer; - } - - a:active, - a:active *, - button:active, - button:active * { - cursor: url(/assets/images/cursor/cursor-pointer-clicked.webp), pointer; - } - - - From 7bd9f90b490f84df0537a32a32a5929a3cbb2d78 Mon Sep 17 00:00:00 2001 From: Felix Icaza Date: Fri, 25 Oct 2024 21:23:28 -0600 Subject: [PATCH 2/3] chore: add prefetch option in astro config --- astro.config.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/astro.config.mjs b/astro.config.mjs index 8336388..ce2e902 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -5,6 +5,9 @@ import icon from 'astro-icon'; // https://astro.build/config export default defineConfig({ site: 'https://uxcorprangel.github.io', + prefetch: { + defaultStrategy: 'viewport' + }, trailingSlash: 'never', integrations: [icon()], vite: { From c18e32a80d0c423e179cef97ac927eb26ddcccd5 Mon Sep 17 00:00:00 2001 From: Felix Icaza Date: Fri, 25 Oct 2024 21:25:48 -0600 Subject: [PATCH 3/3] feat: add custom cursor images and preload for improved cursor styles in website --- src/layouts/Base.astro | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro index 78456ac..7638b80 100644 --- a/src/layouts/Base.astro +++ b/src/layouts/Base.astro @@ -18,6 +18,15 @@ const { title, description } = Astro.props; const site = import.meta.env.SITE; const ogURL = `${site}/og.png`; + +const CURSOR_AUTO = + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAABRUExURUdwTAAAAAAAAFhYWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRkZAAAAENDQyoqKm1tbQAAAAAAAAAAAP///9/f33BwcPz8/ISEhJiYmNvb277qo8AAAAATdFJOUwDuKf0U0+GQDMU3HfyI+/79obAIDL66AAAAoElEQVQ4y5XTzQKCIBAEYCRT+1Gr3TR9/wcNiAw3d6g5cJnvxqwxLjXdGoNCRIcmA7CgnKCccG3nRQnAvHPPvtTBfUTCAx7PugiA2YvqBIAu3oAvilgAD15YABSRAH5siRQEUVgAtsQavMQRAJ6kkOBLLGAaYvq1iCB8aJJCANlTJb47DKL+pLV/DWbuMpPrUR9nr/e/HU7u9PDxtnRV+yd7ERxSGWD4qwAAAABJRU5ErkJggg=='; + +const CURSOR_POINTER = + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAACEUExURUdwTAAAAAAAAD8/Py4uLgAAAAAAAE1NTQMDAwAAAAAAAAAAAAoKCgAAAAAAAAAAAAAAAAAAAAAAABAQEAAAAAAAAAAA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IkMZyXgGjFFzJloCBh0C2At6ler0PmPIB0XViF+CtK1gD3BXwqwUk/nxTP9Zn0k3f/b6g5Zysqx59YLBvsqAda09AE45OYqX7jrT1xApOQQND4Q6wBUHQ0IGcFj+tFpUbKROJfHwYi1YmM8xPXZPPGeifc1hQr7NdVFgqzf7+PWMWzaG22r/nNS2b6FpMtAAAAABJRU5ErkJggg=='; --- @@ -27,6 +36,34 @@ const ogURL = `${site}/og.png`; {description && } + + + + + + + {title}