diff --git a/src/components/MeatballShower.astro b/src/components/MeatballShower.astro new file mode 100644 index 0000000..bfca199 --- /dev/null +++ b/src/components/MeatballShower.astro @@ -0,0 +1,42 @@ +--- +/** + * Meatballs.astro + * This component creates meatballs that are appended to the galaxy on interval. + * Meatballs are removed from the document after the animation is completed. + * There are four (4) meatball shower containers, one for each diagonal direction. + */ +--- + +
+ +
+
+
+
+
+ + diff --git a/src/components/NoodleTwinklingStars.astro b/src/components/NoodleTwinklingStars.astro new file mode 100644 index 0000000..18820c9 --- /dev/null +++ b/src/components/NoodleTwinklingStars.astro @@ -0,0 +1,61 @@ +--- +/** + * NoodleTwinklingStars.astro + * This component creates twinkling noodles that are appended to the galaxy on interval. + * Twinkling noodles 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. + */ +--- + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/pages/index.astro b/src/pages/index.astro index 2864bd2..558d842 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -4,8 +4,8 @@ import PageLayout from "@layouts/PageLayout.astro" import ArrowCard from "@components/ArrowCard" import StackCard from "@components/StackCard.astro" import { SITE, SOCIALS } from "@consts" -import TwinklingStars from "@components/TwinklingStars.astro" -import MeteorShower from "@components/MeteorShower.astro" +import NoodleTwinklingStars from "@components/NoodleTwinklingStars.astro" +import MeatballShower from "@components/MeatballShower.astro" // Fetch blog posts and projects from Appwrite const posts = (await getBlogPosts()) @@ -66,8 +66,8 @@ const stack = [
diff --git a/src/styles/global.css b/src/styles/global.css index ec5030d..d1bf7e5 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -280,6 +280,50 @@ article img { @apply rotate-315; } +/** + * TWINKLE NOODLES + */ + + #noodle.template { + @apply absolute -left-full; /* hide offscreen */ +} + +#noodle.twinkle { + @apply animate-twinkle; /* defined in tailwind.config */ +} + + +/** + * Meatballs + */ + +#meatballs .shower { + @apply absolute inset-0 top-0;; + @apply left-1/2 -translate-x-1/2; + @apply w-screen aspect-square; +} + +#meatballs .meatball { + @apply animate-meatball; /* 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 .shower.ur { + @apply rotate-45; +} + +#meatballs .shower.dr { + @apply rotate-135; +} + +#meatballs .shower.dl { + @apply rotate-225; +} + +#meatballs .shower.ul { + @apply rotate-315; +} .copy-cnt{ @apply absolute w-full; top:var(--copy-btn-margin); diff --git a/tailwind.config.mjs b/tailwind.config.mjs index 8e264fb..d925a5d 100644 --- a/tailwind.config.mjs +++ b/tailwind.config.mjs @@ -61,6 +61,7 @@ export default { animation: { twinkle: "twinkle 2s ease-in-out forwards", meteor: "meteor 3s ease-in-out forwards", + meatball: "meatball 3s ease-in-out forwards", }, keyframes: { twinkle: { @@ -90,6 +91,19 @@ export default { transform: "translateY(0)" }, }, + meatball: { + "0%": { + opacity: 0, + transform: "translateY(200%)" + }, + "50%": { + opacity: 1 + }, + "100%": { + opacity: 0, + transform: "translateY(0)" + }, + }, }, colors: { spaghetti: {