From bbb76eaa31f16a5043736aabfcf09146a0a94b43 Mon Sep 17 00:00:00 2001 From: spaghet Date: Wed, 4 Nov 2026 14:25:02 -0500 Subject: [PATCH] feat(theme): replace meteor and star visuals with Italian night sky - Update star background colors to warmer cream tones matching the food palette - Convert meteors into meatballs with randomized sauce variants, trail/ball/splatter layers, and responsive sizing via CSS variables - Rename and restyle twinkling stars as parmesan flecks, updating IDs and docs for visual consistency --- public/js/bg.js | 4 +- src/components/MeatballShower.astro | 61 ++++++++---- src/components/ParmesanFlecks.astro | 66 ++++++------- src/pages/index.astro | 10 +- src/styles/global.css | 145 ++++++++++++++++++++++++---- 5 files changed, 207 insertions(+), 79 deletions(-) diff --git a/public/js/bg.js b/public/js/bg.js index 2b9f6ad..1978c91 100644 --- a/public/js/bg.js +++ b/public/js/bg.js @@ -8,9 +8,9 @@ } function generateStars(n) { - let value = `${getRandom(2560)}px ${getRandom(2560)}px #fff`; + let value = `${getRandom(2560)}px ${getRandom(2560)}px #FFF6E5`; for (let i = 2; i <= n; i++) { - value += `, ${getRandom(2560)}px ${getRandom(2560)}px #fff`; + value += `, ${getRandom(2560)}px ${getRandom(2560)}px #F5E6D3`; } return value; } diff --git a/src/components/MeatballShower.astro b/src/components/MeatballShower.astro index 2a59e40..090609b 100644 --- a/src/components/MeatballShower.astro +++ b/src/components/MeatballShower.astro @@ -1,14 +1,15 @@ --- /** - * Meteors.astro - * This component creates meteors that are appended to the galaxy on interval. - * Meteors are removed from the document after the animation is completed. - * There are four (4) meteor shower containers, one for each diagonal direction. + * MeatballShower.astro + * This component creates shooting meatballs that are appended to the galaxy on interval. + * Each streak is a trail of marinara with a meatball at the head. Meatballs are removed from + * the document after the animation is completed. + * There are four (4) shower containers, one for each diagonal direction. */ --- -
- +
+
@@ -16,27 +17,47 @@
\ No newline at end of file diff --git a/src/components/ParmesanFlecks.astro b/src/components/ParmesanFlecks.astro index 5366334..663f73a 100644 --- a/src/components/ParmesanFlecks.astro +++ b/src/components/ParmesanFlecks.astro @@ -1,14 +1,14 @@ --- /** - * TwinkleStars.astro - * This component creates twinkling stars that are appended to the galaxy on interval. - * Twinkle stars are removed from the document after the animation is completed. + * ParmesanFlecks.astro + * This component creates flecks of parmesan that twinkle in the night sky and are appended to + * the galaxy on interval. Flecks are removed from the document after the animation is completed. * The svg below is just a template for the script to clone and append to the galaxy. */ --- - - - - - - - - - - - - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/src/pages/index.astro b/src/pages/index.astro index 139e6a9..1094d5c 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -5,8 +5,8 @@ import ArrowCard from "@components/ArrowCard" import StackCard from "@components/StackCard.astro" import { SITE, SOCIALS } from "@consts" import { byDateDesc, toSearchEntry } from "@lib/content" -import TwinklingStars from "@components/TwinklingStars.astro" -import MeteorShower from "@components/MeteorShower.astro" +import ParmesanFlecks from "@components/ParmesanFlecks.astro" +import MeatballShower from "@components/MeatballShower.astro" const allBlogEntries = await getCollection("blog", ({ data }) => !data.draft) const posts = allBlogEntries @@ -60,11 +60,11 @@ const stack = [
- +
diff --git a/src/styles/global.css b/src/styles/global.css index 5a20010..c0e936a 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -15,8 +15,17 @@ --color-spaghetti-dark-red: #FCA5A5; --color-spaghetti-dark-yellow: #FCD34D; + /* Sauce, meat and parmesan for the dark-mode sky. */ + --color-marinara: #E23B2C; + --color-marinara-dark: #B3261E; + --color-meatball: #A05A2E; + --color-meatball-mid: #6B3418; + --color-meatball-dark: #34190C; + --color-parmesan: #FFF6E5; + --animate-twinkle: twinkle 2s ease-in-out forwards; - --animate-meteor: meteor 3s ease-in-out forwards; + --animate-meatball: meatball 3s ease-in-out forwards; + --animate-tumble: meatball-tumble 1.4s linear infinite; @keyframes twinkle { 0% { opacity: 0; transform: rotate(0deg); } @@ -24,11 +33,17 @@ 100% { opacity: 0; transform: rotate(360deg); } } - @keyframes meteor { + /* Streak travels up its own length (head of the meatball leads, sauce trails). */ + @keyframes meatball { 0% { opacity: 0; transform: translateY(200%); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateY(0); } } + + @keyframes meatball-tumble { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(200deg); } + } } :root{ @@ -313,47 +328,143 @@ article img { } /** - * TWINKLE STARS + * PARMESAN FLECKS */ - #twinkle-star.template { + #parmesan-fleck.template { @apply absolute -left-full; /* hide offscreen */ } -#twinkle-star.twinkle { - @apply animate-twinkle; /* defined in tailwind.config */ +#parmesan-fleck.fleck { + @apply animate-twinkle; /* defined in @theme above */ + filter: drop-shadow(0 0 3px color-mix(in srgb, var(--color-parmesan) 55%, transparent)); } /** - * Meteors + * Meatballs — shooting meatballs on trails of marinara + * The wrapper is the streak: its head (top edge) is the meatball, the sauce trails below it. */ -#meteors .shower { - @apply absolute inset-0 top-0;; +#meatballs .shower { + @apply absolute inset-0 top-0; @apply left-1/2 -translate-x-1/2; @apply w-screen aspect-square; } -#meteors .meteor { - @apply animate-meteor; /* defined in tailwind.config */ - @apply absolute top-1/2 left-1/2 w-px h-[75vh]; - @apply bg-gradient-to-b from-white to-transparent; +#meatballs .meatball { + @apply animate-meatball; /* defined in @theme above */ + @apply absolute top-1/2 left-1/2; + /* --trail-length / --trail-width / --ball-size are set per instance by the script. */ + width: var(--trail-width, 16px); + height: var(--trail-length, 40vh); } -#meteors .shower.ur { +#meatballs .trail { + @apply absolute left-1/2 top-0; + width: var(--trail-width, 16px); + height: 100%; + transform: translateX(-50%); + background: linear-gradient(to bottom, + var(--color-marinara) 0%, + var(--color-marinara-dark) 45%, + transparent 100%); + clip-path: polygon(0 0, 100% 0, 62% 100%, 38% 100%); + filter: blur(1.2px); + opacity: .85; +} + +/* Bright, freshly sauced core right under the meatball. */ +#meatballs .trail::after { + content: ""; + @apply absolute inset-0; + background: linear-gradient(to bottom, + rgba(255, 112, 86, .85) 0%, + rgba(226, 59, 44, .3) 30%, + transparent 62%); + clip-path: polygon(32% 0, 68% 0, 55% 100%, 45% 100%); +} + +/* Anchor for the sphere; keeps the lighting fixed while the texture tumbles. */ +#meatballs .ball { + @apply absolute left-1/2 top-0; + width: var(--ball-size, 12px); + height: var(--ball-size, 12px); + transform: translate(-50%, -50%); + overflow: hidden; + border-radius: 46% 54% 51% 49% / 53% 47% 55% 45%; /* hand-rolled, never a perfect sphere */ + background: + radial-gradient(circle at 31% 27%, color-mix(in srgb, var(--color-meatball) 15%, #FFD6AA) 0 9%, transparent 44%), + radial-gradient(circle at 72% 76%, rgba(0, 0, 0, .42) 0 26%, transparent 60%), + radial-gradient(circle at 50% 45%, var(--color-meatball) 0 40%, var(--color-meatball-mid) 72%, var(--color-meatball-dark) 100%); + box-shadow: + inset -1px -2px 3px rgba(20, 8, 4, .8), + inset 2px 2px 3px rgba(255, 200, 150, .16), + 0 0 7px color-mix(in srgb, var(--color-marinara) 50%, transparent); +} + +/* Seared crumb texture, rotating so the meatball looks like it tumbles in flight. */ +#meatballs .ball::after { + content: ""; + @apply absolute inset-0; + border-radius: inherit; + background: + radial-gradient(circle at 62% 34%, rgba(35, 16, 8, .75) 0 7%, transparent 8%), + radial-gradient(circle at 34% 62%, rgba(35, 16, 8, .65) 0 6%, transparent 7%), + radial-gradient(circle at 55% 70%, rgba(140, 88, 52, .55) 0 5%, transparent 6%), + radial-gradient(circle at 22% 38%, rgba(140, 88, 52, .5) 0 4%, transparent 5%); + animation: var(--animate-tumble); +} + +/* Sauce droplets flung to the sides of the stream. Offsets are fractions of the trail, so they + stay put however long or wide a streak is. The dot itself is invisible; only shadows are drawn. */ +#meatballs .splatter { + @apply absolute left-1/2 top-0 rounded-full; + --spray: max(11px, calc(var(--trail-width, 16px) * 1.1)); + width: 3px; + height: 3px; + background: transparent; + opacity: .8; + filter: blur(.35px); +} + +#meatballs .meatball.v1 .splatter { + box-shadow: + calc(var(--spray) * -1) calc(var(--trail-length, 40vh) * .3) 0 -1px var(--color-marinara), + var(--spray) calc(var(--trail-length, 40vh) * .48) 0 -.5px var(--color-marinara-dark), + calc(var(--spray) * -1.5) calc(var(--trail-length, 40vh) * .66) 0 -.5px rgba(179, 38, 30, .7), + calc(var(--spray) * 1.2) calc(var(--trail-length, 40vh) * .84) 0 -1px rgba(226, 59, 44, .5); +} + +#meatballs .meatball.v2 .splatter { + box-shadow: + var(--spray) calc(var(--trail-length, 40vh) * .26) 0 -.5px var(--color-marinara-dark), + calc(var(--spray) * -1.3) calc(var(--trail-length, 40vh) * .44) 0 -1px var(--color-marinara), + calc(var(--spray) * 1.6) calc(var(--trail-length, 40vh) * .62) 0 -.5px rgba(179, 38, 30, .65), + calc(var(--spray) * -1.1) calc(var(--trail-length, 40vh) * .86) 0 -.5px rgba(226, 59, 44, .45); +} + +#meatballs .meatball.v3 .splatter { + box-shadow: + calc(var(--spray) * -1.6) calc(var(--trail-length, 40vh) * .34) 0 -1px var(--color-marinara-dark), + calc(var(--spray) * 1.2) calc(var(--trail-length, 40vh) * .5) 0 -.5px var(--color-marinara), + calc(var(--spray) * 1.05) calc(var(--trail-length, 40vh) * .7) 0 -1px rgba(179, 38, 30, .6), + calc(var(--spray) * -1.35) calc(var(--trail-length, 40vh) * .9) 0 -1.5px rgba(226, 59, 44, .4); +} + +#meatballs .shower.ur { @apply rotate-45; } -#meteors .shower.dr { +#meatballs .shower.dr { @apply rotate-135; } -#meteors .shower.dl { +#meatballs .shower.dl { @apply rotate-225; } -#meteors .shower.ul { +#meatballs .shower.ul { @apply rotate-315; }