From 8f1698852a1c12ab718fdf613b254143235870db Mon Sep 17 00:00:00 2001 From: Nadeem sheikh Date: Wed, 11 Feb 2026 03:46:55 +0530 Subject: [PATCH 01/11] Create fun facts in simulations and component --- app/(core)/components/FunFactSlider.jsx | 41 +++++++++++++++++++++ app/(core)/components/TopSim.tsx | 47 +++++++++++++++--------- app/(core)/constants/Config.js | 2 +- app/(core)/data/chapters.js | 49 +++++++++++++++++++------ app/(core)/styles/index.css | 1 + next.config.mjs | 14 +++++++ next.config.ts | 14 ------- package-lock.json | 33 ++++++++++++----- package.json | 6 +-- tsconfig.json | 17 +++++++-- 10 files changed, 164 insertions(+), 60 deletions(-) create mode 100644 app/(core)/components/FunFactSlider.jsx create mode 100644 next.config.mjs delete mode 100644 next.config.ts diff --git a/app/(core)/components/FunFactSlider.jsx b/app/(core)/components/FunFactSlider.jsx new file mode 100644 index 00000000..58800e40 --- /dev/null +++ b/app/(core)/components/FunFactSlider.jsx @@ -0,0 +1,41 @@ +import { useEffect, useState } from "react"; + +export default function FunFactSlider({ chapterName, fact }) { + const [open, setOpen] = useState(false); + + useEffect(() => { + if (!fact) return; + setOpen(true); + + const timer = setTimeout(() => setOpen(false), 4500); + return () => clearTimeout(timer); + }, [fact]); + + if (!fact) return null; + + return ( +
+
+
+ πŸ’‘ +
+

+ {chapterName} +

+

+ {fact} +

+
+
+
+
+ ); +} diff --git a/app/(core)/components/TopSim.tsx b/app/(core)/components/TopSim.tsx index e71f975c..6a139e6f 100644 --- a/app/(core)/components/TopSim.tsx +++ b/app/(core)/components/TopSim.tsx @@ -2,22 +2,29 @@ import Back from "./Back"; import simulations from "../data/chapters"; import { usePathname } from "next/navigation"; import useMobile from "../hooks/useMobile"; +import { useEffect, useState } from "react"; +import FunFactSlider from "../components/FunFactSlider"; export default function TopSim() { const location = usePathname(); const idx = simulations.findIndex((sim) => sim.link === location); const isMobile = useMobile(); + const [showFact, setShowFact] = useState(true); + + useEffect(() => { + setShowFact(true); + const timer = setTimeout(() => setShowFact(false), 7000); + return () => clearTimeout(timer); + }, [location]); function getPrevious() { if (idx === -1) return "/"; - const prevIndex = (idx - 1 + simulations.length) % simulations.length; - return simulations[prevIndex].link; + return simulations[(idx - 1 + simulations.length) % simulations.length].link; } function getNext() { if (idx === -1) return "/"; - const nextIndex = (idx + 1) % simulations.length; - return simulations[nextIndex].link; + return simulations[(idx + 1) % simulations.length].link; } function getCurrentName() { @@ -25,31 +32,37 @@ export default function TopSim() { return `${simulations[idx].id} - ${simulations[idx].name}`; } + const funFacts = simulations[idx]?.funFacts || []; + const fact = + funFacts.length > 0 + ? funFacts[Math.floor(Math.random() * funFacts.length)] + : null; + return ( -
+
{!isMobile && (
)} +
- +

{getCurrentName()}

- +
+ + {/* βœ… RIGHT SIDE SLIDING FUN FACT */} + {showFact && ( + + )} + {!isMobile &&
}
); diff --git a/app/(core)/constants/Config.js b/app/(core)/constants/Config.js index 50eea5d4..492c0d41 100644 --- a/app/(core)/constants/Config.js +++ b/app/(core)/constants/Config.js @@ -1,4 +1,4 @@ -// constants/Config.js +// constants/ // Conversione metri ↔ pixel export const SCALE = 100; // 1 m = 100 px diff --git a/app/(core)/data/chapters.js b/app/(core)/data/chapters.js index afb525b7..44c45279 100644 --- a/app/(core)/data/chapters.js +++ b/app/(core)/data/chapters.js @@ -9,16 +9,26 @@ const chapters = [ tags: [TAGS.EASY, TAGS.KINEMATICS, TAGS.COLLISION], icon: "/icons/bouncingBall.png", relatedBlogSlug: "physics-bouncing-ball-comprehensive-educational-guide", + funFacts: [ + "No real ball bounces forever because energy is lost as heat and sound.", + "Perfectly elastic collisions exist only in theory." + ], }, + { id: 2, name: "Vector Operations Calculator", - desc: "Interactive 2D vector operations tool. Visualize vector addition, subtraction, and dot products in real-time with our physics calculator.", + desc: "Interactive 2D vector operations tool.", link: "/simulations/VectorsOperations", tags: [TAGS.EASY, TAGS.MATH, TAGS.VECTORS, TAGS.TRIGONOMETRY], icon: "/icons/vector.png", relatedBlogSlug: "operations-with-vectors", + funFacts: [ + "Vector addition is commutative.", + "Dot product helps determine the angle between two vectors." + ], }, + { id: 3, name: "Ball Acceleration", @@ -27,7 +37,11 @@ const chapters = [ tags: [TAGS.MEDIUM, TAGS.KINEMATICS, TAGS.ACCELERATION, TAGS.INTERACTIVE], icon: "/icons/acceleration.png", relatedBlogSlug: "ball-uniformly-accelerated-motion", + funFacts: [ + "Acceleration happens whenever velocity changes.", + ], }, + { id: 4, name: "Ball Gravity", @@ -36,34 +50,50 @@ const chapters = [ tags: [TAGS.MEDIUM, TAGS.DYNAMICS, TAGS.GRAVITY, TAGS.COLLISION], icon: "/icons/gravity.png", relatedBlogSlug: "ball-free-fall-comprehensive-guide", + funFacts: [ + "All objects fall at the same rate in a vacuum, regardless of mass.", + ], }, + { id: 5, name: "Spring Mass System Simulator", - desc: "Explore Hooke's Law and Simple Harmonic Motion. Adjust mass and spring constants to visualize oscillations and energy conservation.", + desc: "Explore Hooke's Law and Simple Harmonic Motion.", link: "/simulations/SpringConnection", tags: [TAGS.ADVANCED, TAGS.DYNAMICS, TAGS.SPRINGS, TAGS.OSCILLATIONS], icon: "/icons/spring.png", relatedBlogSlug: "spring-connection", + funFacts: [ + "Hooke’s Law is valid only within the elastic limit of a spring.", + ], }, + { id: 6, name: "Simple Pendulum Simulation", - desc: "Calculate the period and frequency of a pendulum. Visualize the relationship between length, gravity, and kinetic energy in real-time.", + desc: "Calculate the period and frequency of a pendulum.", link: "/simulations/SimplePendulum", tags: [TAGS.MEDIUM, TAGS.DYNAMICS, TAGS.OSCILLATIONS, TAGS.ENERGY], icon: "/icons/pendulam.png", relatedBlogSlug: "pendulum-motion", + funFacts: [ + "For small angles, a pendulum’s period does not depend on mass.", + ], }, + { id: 7, name: "Projectile & Parabolic Motion", - desc: "Simulate projectile motion under gravity. Predict trajectories, range, and maximum height with our interactive physics calculator.", + desc: "Simulate projectile motion under gravity.", link: "/simulations/ParabolicMotion", tags: [TAGS.MEDIUM, TAGS.KINEMATICS, TAGS.GRAVITY, TAGS.MATH], icon: "/icons/parabola.png", relatedBlogSlug: "projectile-parabolic-motion", + funFacts: [ + "Maximum range occurs at a 45Β° launch angle without air resistance.", + ], }, + { id: 8, name: "Inclined Plane", @@ -71,14 +101,9 @@ const chapters = [ link: "/simulations/InclinedPlane", tags: [TAGS.MEDIUM, TAGS.DYNAMICS, TAGS.FORCES, TAGS.FRICTION], icon: "/icons/inclined.png", - }, - { - id: 0, - name: "Test for benchmarks", - desc: "This is a simulation created specifically for performance testing.", - link: "/simulations/test", - tags: [TAGS.EXPERIMENTAL, TAGS.BENCHMARK, TAGS.PERFORMANCE], - icon: "/icons/test.png", + funFacts: [ + "Inclined planes reduce the force needed to lift heavy objects.", + ], }, ]; diff --git a/app/(core)/styles/index.css b/app/(core)/styles/index.css index 1f58b8d7..09b83613 100644 --- a/app/(core)/styles/index.css +++ b/app/(core)/styles/index.css @@ -1,6 +1,7 @@ /* Stile globale */ @import "tailwindcss"; + :root { --bg-color: #0b0f19; --text-color: #e8eefb; diff --git a/next.config.mjs b/next.config.mjs new file mode 100644 index 00000000..c83314b6 --- /dev/null +++ b/next.config.mjs @@ -0,0 +1,14 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + output: "export", + env: { + NEXT_PUBLIC_APP_VERSION: "0.0.0", + }, + images: { + unoptimized: true, + }, +}; + +export default nextConfig; + + diff --git a/next.config.ts b/next.config.ts deleted file mode 100644 index 0d9aea6b..00000000 --- a/next.config.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { NextConfig } from "next"; -import packageJson from "./package.json" assert { type: "json" }; - -const nextConfig: NextConfig = { - output: "export", - env: { - NEXT_PUBLIC_APP_VERSION: packageJson.version, - }, - images: { - unoptimized: true, - }, -}; - -export default nextConfig; diff --git a/package-lock.json b/package-lock.json index a33dda26..1cbb1635 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,9 +36,9 @@ "@eslint/js": "^9.39.2", "@semantic-release/exec": "^7.1.0", "@tailwindcss/postcss": "^4", - "@types/node": "^25.0.9", + "@types/node": "25.2.2", "@types/p5": "^1.7.6", - "@types/react": "^19.2.7", + "@types/react": "19.2.13", "@types/react-dom": "^19.2.3", "@types/react-katex": "^3.0.4", "@types/react-syntax-highlighter": "^15.5.13", @@ -61,7 +61,7 @@ "sitemap": "^9.0.0", "tailwindcss": "^4", "ts-node": "^10.9.2", - "typescript": "^5.9.3" + "typescript": "5.9.3" } }, "node_modules/@actions/core": { @@ -2604,9 +2604,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "25.1.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.1.0.tgz", - "integrity": "sha512-t7frlewr6+cbx+9Ohpl0NOTKXZNV9xHRmNOvql47BFJKcEG1CxtxlPEEe+gR9uhVWM4DwhnvTF110mIL4yP9RA==", + "version": "25.2.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.2.2.tgz", + "integrity": "sha512-BkmoP5/FhRYek5izySdkOneRyXYN35I860MFAGupTdebyE66uZaR+bXLHq8k4DirE5DwQi3NuhvRU1jqTVwUrQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2635,9 +2635,9 @@ "license": "MIT" }, "node_modules/@types/react": { - "version": "19.2.10", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.10.tgz", - "integrity": "sha512-WPigyYuGhgZ/cTPRXB2EwUw+XvsRA3GqHlsP4qteqrnnjDrApbS7MxcGr/hke5iUoeB7E/gQtrs9I37zAJ0Vjw==", + "version": "19.2.13", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.13.tgz", + "integrity": "sha512-KkiJeU6VbYbUOp5ITMIc7kBfqlYkKA5KhEHVrGMmUUMt7NeaZg65ojdPk+FtNrBAOXNVM5QM72jnADjM+XVRAQ==", "dev": true, "license": "MIT", "dependencies": { @@ -15570,6 +15570,21 @@ "peerDependencies": { "zod": "^3.25.0 || ^4.0.0" } + }, + "node_modules/@next/swc-win32-ia32-msvc": { + "version": "14.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.4.tgz", + "integrity": "sha512-twrmN753hjXRdcrZmZttb/m5xaCBFa48Dt3FbeEItpJArxriYDunWxJn+QFXdJ3hPkm4u7CKxncVvnmgQMY1ag==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } } } } diff --git a/package.json b/package.json index 0f1c3637..b5fe9626 100644 --- a/package.json +++ b/package.json @@ -46,9 +46,9 @@ "@eslint/js": "^9.39.2", "@semantic-release/exec": "^7.1.0", "@tailwindcss/postcss": "^4", - "@types/node": "^25.0.9", + "@types/node": "25.2.2", "@types/p5": "^1.7.6", - "@types/react": "^19.2.7", + "@types/react": "19.2.13", "@types/react-dom": "^19.2.3", "@types/react-katex": "^3.0.4", "@types/react-syntax-highlighter": "^15.5.13", @@ -71,7 +71,7 @@ "sitemap": "^9.0.0", "tailwindcss": "^4", "ts-node": "^10.9.2", - "typescript": "^5.9.3" + "typescript": "5.9.3" }, "lint-staged": { "**/*.{js,jsx,ts,tsx}": [ diff --git a/tsconfig.json b/tsconfig.json index 3abda2f7..94815eee 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,11 @@ { "compilerOptions": { "target": "ES2017", - "lib": ["dom", "dom.iterable", "esnext"], + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], "allowJs": true, "skipLibCheck": true, "strict": true, @@ -20,7 +24,9 @@ } ], "paths": { - "@/*": ["./*"] + "@/*": [ + "./*" + ] } }, "include": [ @@ -32,7 +38,10 @@ "**/*.mts", "app/hooks/useSimInfo.ts", "app/components/LandingPart.jsx", - "app/(pages)/blog/[slug]/page.jsx" + "app/(pages)/blog/[slug]/page.jsx", + "next.config.mjs" ], - "exclude": ["node_modules"] + "exclude": [ + "node_modules" + ] } From 474dd4c9d09a236580ed0e79ea9fe91a79d08767 Mon Sep 17 00:00:00 2001 From: Nadeem sheikh Date: Wed, 11 Feb 2026 15:43:36 +0530 Subject: [PATCH 02/11] improve ui of fun fact component and use timer --- app/(core)/components/FunFactSlider.jsx | 133 ++++++++++++++++++++---- app/(core)/components/TopSim.tsx | 3 +- app/(core)/data/chapters.js | 4 +- app/(core)/styles/index.css | 1 + components.json | 23 ++++ components/ui/button.tsx | 57 ++++++++++ lib/utils.ts | 6 ++ package-lock.json | 123 ++++++++++++++++------ package.json | 8 +- 9 files changed, 300 insertions(+), 58 deletions(-) create mode 100644 components.json create mode 100644 components/ui/button.tsx create mode 100644 lib/utils.ts diff --git a/app/(core)/components/FunFactSlider.jsx b/app/(core)/components/FunFactSlider.jsx index 58800e40..88dbfa64 100644 --- a/app/(core)/components/FunFactSlider.jsx +++ b/app/(core)/components/FunFactSlider.jsx @@ -1,41 +1,130 @@ -import { useEffect, useState } from "react"; +import { useEffect, useState, useCallback } from "react"; +import { Lightbulb, X } from "lucide-react"; -export default function FunFactSlider({ chapterName, fact }) { +const DISPLAY_DURATION = 4500; + +export default function FunFactSlider({ fact }) { const [open, setOpen] = useState(false); + const [progress, setProgress] = useState(100); + + const dismiss = useCallback(() => setOpen(false), []); useEffect(() => { if (!fact) return; + setOpen(true); + setProgress(100); + + const start = Date.now(); + + + const interval = setInterval(() => { + const elapsed = Date.now() - start; + const remaining = Math.max( + 0, + 100 - (elapsed / DISPLAY_DURATION) * 100 + ); + setProgress(remaining); + if (remaining <= 0) clearInterval(interval); + }, 50); + + const timer = setTimeout(() => setOpen(false), DISPLAY_DURATION); - const timer = setTimeout(() => setOpen(false), 4500); - return () => clearTimeout(timer); + return () => { + clearTimeout(timer); + clearInterval(interval); + }; }, [fact]); if (!fact) return null; return (
+
+ {/* Close button */} + + +
+ {/* Glowing bulb */} +
+
+
+ + {/* Text */} +
+

+ Fun Fact +

+ +

+ {fact} +

+
+
+
+ + ); } diff --git a/app/(core)/components/TopSim.tsx b/app/(core)/components/TopSim.tsx index 6a139e6f..ace87387 100644 --- a/app/(core)/components/TopSim.tsx +++ b/app/(core)/components/TopSim.tsx @@ -56,9 +56,8 @@ export default function TopSim() {
{/* βœ… RIGHT SIDE SLIDING FUN FACT */} - {showFact && ( + { !isMobile && showFact && ( )} diff --git a/app/(core)/data/chapters.js b/app/(core)/data/chapters.js index 44c45279..2ed43e85 100644 --- a/app/(core)/data/chapters.js +++ b/app/(core)/data/chapters.js @@ -10,8 +10,7 @@ const chapters = [ icon: "/icons/bouncingBall.png", relatedBlogSlug: "physics-bouncing-ball-comprehensive-educational-guide", funFacts: [ - "No real ball bounces forever because energy is lost as heat and sound.", - "Perfectly elastic collisions exist only in theory." + "No real ball bounces forever because energy is lost as heat and sound." ], }, @@ -24,7 +23,6 @@ const chapters = [ icon: "/icons/vector.png", relatedBlogSlug: "operations-with-vectors", funFacts: [ - "Vector addition is commutative.", "Dot product helps determine the angle between two vectors." ], }, diff --git a/app/(core)/styles/index.css b/app/(core)/styles/index.css index 09b83613..642206ca 100644 --- a/app/(core)/styles/index.css +++ b/app/(core)/styles/index.css @@ -2,6 +2,7 @@ @import "tailwindcss"; + :root { --bg-color: #0b0f19; --text-color: #e8eefb; diff --git a/components.json b/components.json new file mode 100644 index 00000000..3ce9e88d --- /dev/null +++ b/components.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": true, + "tsx": true, + "tailwind": { + "config": "tailwind.config.ts", + "css": "app/(core)/styles/index.css", + "baseColor": "neutral", + "cssVariables": true, + "prefix": "" + }, + "iconLibrary": "lucide", + "rtl": false, + "aliases": { + "components": "@/components", + "utils": "@/lib/utils", + "ui": "@/components/ui", + "lib": "@/lib", + "hooks": "@/hooks" + }, + "registries": {} +} diff --git a/components/ui/button.tsx b/components/ui/button.tsx new file mode 100644 index 00000000..65d4fcd9 --- /dev/null +++ b/components/ui/button.tsx @@ -0,0 +1,57 @@ +import * as React from "react" +import { Slot } from "@radix-ui/react-slot" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const buttonVariants = cva( + "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", + { + variants: { + variant: { + default: + "bg-primary text-primary-foreground shadow hover:bg-primary/90", + destructive: + "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90", + outline: + "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground", + secondary: + "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80", + ghost: "hover:bg-accent hover:text-accent-foreground", + link: "text-primary underline-offset-4 hover:underline", + }, + size: { + default: "h-9 px-4 py-2", + sm: "h-8 rounded-md px-3 text-xs", + lg: "h-10 rounded-md px-8", + icon: "h-9 w-9", + }, + }, + defaultVariants: { + variant: "default", + size: "default", + }, + } +) + +export interface ButtonProps + extends React.ButtonHTMLAttributes, + VariantProps { + asChild?: boolean +} + +const Button = React.forwardRef( + ({ className, variant, size, asChild = false, ...props }, ref) => { + const Comp = asChild ? Slot : "button" + return ( + + ) + } +) +Button.displayName = "Button" + +export { Button, buttonVariants } diff --git a/lib/utils.ts b/lib/utils.ts new file mode 100644 index 00000000..bd0c391d --- /dev/null +++ b/lib/utils.ts @@ -0,0 +1,6 @@ +import { clsx, type ClassValue } from "clsx" +import { twMerge } from "tailwind-merge" + +export function cn(...inputs: ClassValue[]) { + return twMerge(clsx(inputs)) +} diff --git a/package-lock.json b/package-lock.json index 1cbb1635..28b1183e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,11 +16,15 @@ "@fortawesome/free-solid-svg-icons": "^7.1.0", "@fortawesome/react-fontawesome": "^3.1.0", "@octokit/rest": "^22.0.1", + "@radix-ui/react-slot": "^1.2.4", "ace-builds": "^1.43.5", + "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", + "framer-motion": "^12.34.0", "katex": "^0.16.25", "koalaz": "^1.1.3", - "motion": "^12.23.24", + "lucide-react": "^0.563.0", + "motion": "^12.34.0", "next": "16.1.5", "p5": "^2.1.2", "planck": "^1.4.2", @@ -30,6 +34,8 @@ "react-katex": "^3.1.0", "react-router-hash-link": "^2.4.3", "react-syntax-highlighter": "^16.1.0", + "tailwind-merge": "^3.4.0", + "tailwindcss-animate": "^1.0.7", "xml-formatter": "^3.6.7" }, "devDependencies": { @@ -1829,6 +1835,39 @@ "node": ">=18" } }, + "node_modules/@radix-ui/react-compose-refs": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz", + "integrity": "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-slot": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.4.tgz", + "integrity": "sha512-Jl+bCv8HxKnlTLVrcDE8zTMJ09R9/ukw4qBs/oZClOfoQk/cOTbDn+NceXfV7j09YPVQUryJPHurafcSg6EVKA==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@rtsao/scc": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", @@ -2638,7 +2677,7 @@ "version": "19.2.13", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.13.tgz", "integrity": "sha512-KkiJeU6VbYbUOp5ITMIc7kBfqlYkKA5KhEHVrGMmUUMt7NeaZg65ojdPk+FtNrBAOXNVM5QM72jnADjM+XVRAQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "csstype": "^3.2.2" @@ -4085,6 +4124,18 @@ "url": "https://github.com/sponsors/colinhacks" } }, + "node_modules/class-variance-authority": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.1.tgz", + "integrity": "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==", + "license": "Apache-2.0", + "dependencies": { + "clsx": "^2.1.1" + }, + "funding": { + "url": "https://polar.sh/cva" + } + }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -4766,7 +4817,7 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/damerau-levenshtein": { @@ -6541,12 +6592,12 @@ } }, "node_modules/framer-motion": { - "version": "12.29.2", - "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.29.2.tgz", - "integrity": "sha512-lSNRzBJk4wuIy0emYQ/nfZ7eWhqud2umPKw2QAQki6uKhZPKm2hRQHeQoHTG9MIvfobb+A/LbEWPJU794ZUKrg==", + "version": "12.34.0", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.34.0.tgz", + "integrity": "sha512-+/H49owhzkzQyxtn7nZeF4kdH++I2FWrESQ184Zbcw5cEqNHYkE5yxWxcTLSj5lNx3NWdbIRy5FHqUvetD8FWg==", "license": "MIT", "dependencies": { - "motion-dom": "^12.29.2", + "motion-dom": "^12.34.0", "motion-utils": "^12.29.2", "tslib": "^2.4.0" }, @@ -8678,6 +8729,15 @@ "yallist": "^3.0.2" } }, + "node_modules/lucide-react": { + "version": "0.563.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.563.0.tgz", + "integrity": "sha512-8dXPB2GI4dI8jV4MgUDGBeLdGk8ekfqVZ0BdLcrRzocGgG75ltNEmWS+gE7uokKF/0oSUuczNDT+g9hFJ23FkA==", + "license": "ISC", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/magic-string": { "version": "0.30.21", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", @@ -8948,12 +9008,12 @@ "license": "MIT" }, "node_modules/motion": { - "version": "12.29.2", - "resolved": "https://registry.npmjs.org/motion/-/motion-12.29.2.tgz", - "integrity": "sha512-jMpHdAzEDF1QQ055cB+1lOBLdJ6ialVWl6QQzpJI2OvmHequ7zFVHM2mx0HNAy+Tu4omUlApfC+4vnkX0geEOg==", + "version": "12.34.0", + "resolved": "https://registry.npmjs.org/motion/-/motion-12.34.0.tgz", + "integrity": "sha512-01Sfa/zgsD/di8zA/uFW5Eb7/SPXoGyUfy+uMRMW5Spa8j0z/UbfQewAYvPMYFCXRlyD6e5aLHh76TxeeJD+RA==", "license": "MIT", "dependencies": { - "framer-motion": "^12.29.2", + "framer-motion": "^12.34.0", "tslib": "^2.4.0" }, "peerDependencies": { @@ -8974,9 +9034,9 @@ } }, "node_modules/motion-dom": { - "version": "12.29.2", - "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-12.29.2.tgz", - "integrity": "sha512-/k+NuycVV8pykxyiTCoFzIVLA95Nb1BFIVvfSu9L50/6K6qNeAYtkxXILy/LRutt7AzaYDc2myj0wkCVVYAPPA==", + "version": "12.34.0", + "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-12.34.0.tgz", + "integrity": "sha512-Lql3NuEcScRDxTAO6GgUsRHBZOWI/3fnMlkMcH5NftzcN37zJta+bpbMAV9px4Nj057TuvRooMK7QrzMCgtz6Q==", "license": "MIT", "dependencies": { "motion-utils": "^12.29.2" @@ -14364,13 +14424,31 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/tailwind-merge": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.4.0.tgz", + "integrity": "sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/dcastil" + } + }, "node_modules/tailwindcss": { "version": "4.1.18", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.18.tgz", "integrity": "sha512-4+Z+0yiYyEtUVCScyfHCxOYP06L5Ne+JiHhY2IjR2KWMIWhJOYZKLSGZaP5HkZ8+bY0cxfzwDE5uOmzFXyIwxw==", - "dev": true, "license": "MIT" }, + "node_modules/tailwindcss-animate": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/tailwindcss-animate/-/tailwindcss-animate-1.0.7.tgz", + "integrity": "sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==", + "license": "MIT", + "peerDependencies": { + "tailwindcss": ">=3.0.0 || insiders" + } + }, "node_modules/tapable": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz", @@ -15570,21 +15648,6 @@ "peerDependencies": { "zod": "^3.25.0 || ^4.0.0" } - }, - "node_modules/@next/swc-win32-ia32-msvc": { - "version": "14.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.4.tgz", - "integrity": "sha512-twrmN753hjXRdcrZmZttb/m5xaCBFa48Dt3FbeEItpJArxriYDunWxJn+QFXdJ3hPkm4u7CKxncVvnmgQMY1ag==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } } } } diff --git a/package.json b/package.json index b5fe9626..bef16ee0 100644 --- a/package.json +++ b/package.json @@ -26,11 +26,15 @@ "@fortawesome/free-solid-svg-icons": "^7.1.0", "@fortawesome/react-fontawesome": "^3.1.0", "@octokit/rest": "^22.0.1", + "@radix-ui/react-slot": "^1.2.4", "ace-builds": "^1.43.5", + "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", + "framer-motion": "^12.34.0", "katex": "^0.16.25", "koalaz": "^1.1.3", - "motion": "^12.23.24", + "lucide-react": "^0.563.0", + "motion": "^12.34.0", "next": "16.1.5", "p5": "^2.1.2", "planck": "^1.4.2", @@ -40,6 +44,8 @@ "react-katex": "^3.1.0", "react-router-hash-link": "^2.4.3", "react-syntax-highlighter": "^16.1.0", + "tailwind-merge": "^3.4.0", + "tailwindcss-animate": "^1.0.7", "xml-formatter": "^3.6.7" }, "devDependencies": { From b7559754b02945cc68f94456b12f27f6c8884699 Mon Sep 17 00:00:00 2001 From: Nadeem sheikh Date: Sat, 14 Feb 2026 15:34:17 +0530 Subject: [PATCH 03/11] improve ui of fun fact slider --- app/(core)/components/FunFactSlider.jsx | 176 ++++++++++-------------- app/(core)/components/TopSim.tsx | 28 ++-- app/(core)/styles/index.css | 5 +- tailwind.config.ts | 23 ++++ 4 files changed, 108 insertions(+), 124 deletions(-) diff --git a/app/(core)/components/FunFactSlider.jsx b/app/(core)/components/FunFactSlider.jsx index 88dbfa64..e96350ca 100644 --- a/app/(core)/components/FunFactSlider.jsx +++ b/app/(core)/components/FunFactSlider.jsx @@ -1,130 +1,100 @@ -import { useEffect, useState, useCallback } from "react"; +import { useEffect, useState } from "react"; import { Lightbulb, X } from "lucide-react"; -const DISPLAY_DURATION = 4500; - export default function FunFactSlider({ fact }) { - const [open, setOpen] = useState(false); - const [progress, setProgress] = useState(100); - - const dismiss = useCallback(() => setOpen(false), []); + const [visible, setVisible] = useState(false); + const [render, setRender] = useState(false); useEffect(() => { if (!fact) return; - setOpen(true); - setProgress(100); - - const start = Date.now(); - + setRender(true); + setTimeout(() => setVisible(true), 50); - const interval = setInterval(() => { - const elapsed = Date.now() - start; - const remaining = Math.max( - 0, - 100 - (elapsed / DISPLAY_DURATION) * 100 - ); - setProgress(remaining); - if (remaining <= 0) clearInterval(interval); - }, 50); + const hideTimer = setTimeout(() => { + setVisible(false); + }, 5000); - const timer = setTimeout(() => setOpen(false), DISPLAY_DURATION); + const removeTimer = setTimeout(() => { + setRender(false); + }, 5800); return () => { - clearTimeout(timer); - clearInterval(interval); + clearTimeout(hideTimer); + clearTimeout(removeTimer); }; }, [fact]); - if (!fact) return null; + if (!render) return null; return (
-
- {/* Close button */} - - -
- {/* Glowing bulb */} -
-
- + {/* Cyber-Grid Background Detail */} +
+ + {/* Top Glow/Reflection */} +
+ + {/* Corner Accent Decor */} +
+ +
+ {/* Icon Container with Layered Glow */} +
+
+
+ +
-
- {/* Text */} -
-

- Fun Fact -

+ {/* Text Content */} +
+
+
+

+ Do you know? +

+
+

+ β€œ + {fact} + ” +

+
-

setVisible(false)} + className={` + flex-shrink-0 -mt-1 -mr-1 p-2 + rounded-lg border border-transparent + hover:border-cyan-400/30 hover:bg-cyan-400/10 + hover:shadow-[0_0_15px_rgba(34,211,238,0.2)] + transition-all duration-300 group/btn + `} > - {fact} -

+ +
-
-
- - ); } diff --git a/app/(core)/components/TopSim.tsx b/app/(core)/components/TopSim.tsx index ace87387..067f37f2 100644 --- a/app/(core)/components/TopSim.tsx +++ b/app/(core)/components/TopSim.tsx @@ -9,14 +9,7 @@ export default function TopSim() { const location = usePathname(); const idx = simulations.findIndex((sim) => sim.link === location); const isMobile = useMobile(); - const [showFact, setShowFact] = useState(true); - - useEffect(() => { - setShowFact(true); - const timer = setTimeout(() => setShowFact(false), 7000); - return () => clearTimeout(timer); - }, [location]); - + function getPrevious() { if (idx === -1) return "/"; return simulations[(idx - 1 + simulations.length) % simulations.length].link; @@ -39,30 +32,25 @@ export default function TopSim() { : null; return ( -
+
{!isMobile && (
)} -
+

{getCurrentName()}

- {/* βœ… RIGHT SIDE SLIDING FUN FACT */} - { !isMobile && showFact && ( - + {/* βœ… THIRD DIV MOVED TO RIGHT */} + {!isMobile && ( +
+ +
)} - - {!isMobile &&
}
); } diff --git a/app/(core)/styles/index.css b/app/(core)/styles/index.css index 642206ca..01f674c4 100644 --- a/app/(core)/styles/index.css +++ b/app/(core)/styles/index.css @@ -1588,8 +1588,11 @@ footer { width: 20%; } -.top-nav-sim-filler { +.fun-fact-slider-wrapper { width: 20%; + justify-content: center ; + margin-left: auto; + margin-top: 20px; } /* Wind icon for Ball Gravity Simulation*/ diff --git a/tailwind.config.ts b/tailwind.config.ts index bfb53710..95ea5797 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -8,6 +8,29 @@ const config: Config = { "./components/**/*.{js,ts,jsx,tsx,mdx}", "./app/**/*.{js,ts,jsx,tsx,mdx}", ], + theme: { + extend: { + keyframes: { + float: { + "0%, 100%": { transform: "translateY(0px)" }, + "50%": { transform: "translateY(-8px)" }, + }, + fadeSlide: { + "0%": { opacity: "0", transform: "translateY(20px)" }, + "100%": { opacity: "1", transform: "translateY(0px)" }, + }, + glowPulse: { + "0%, 100%": { boxShadow: "0 0 15px rgba(0,255,255,0.2)" }, + "50%": { boxShadow: "0 0 35px rgba(0,255,255,0.5)" }, + }, + }, + animation: { + float: "float 6s ease-in-out infinite", + fadeSlide: "fadeSlide 5s ease-in-out forwards", + glowPulse: "glowPulse 5s ease-in-out infinite", + }, + }, + }, plugins: [], }; From 21e70c67792bfc53083aecf79e99de1b397c52c5 Mon Sep 17 00:00:00 2001 From: Nadeem sheikh Date: Sat, 14 Feb 2026 15:39:35 +0530 Subject: [PATCH 04/11] Add padding to fun fact toast and format code --- app/(core)/components/FunFactSlider.jsx | 5 ++++- app/(core)/components/TopSim.tsx | 19 +++++++++++++++---- app/(core)/data/chapters.js | 10 +++------- app/(core)/styles/index.css | 8 +++----- components/ui/button.tsx | 25 +++++++++++++------------ lib/utils.ts | 6 +++--- next.config.mjs | 2 -- tsconfig.json | 14 +++----------- 8 files changed, 44 insertions(+), 45 deletions(-) diff --git a/app/(core)/components/FunFactSlider.jsx b/app/(core)/components/FunFactSlider.jsx index e96350ca..b2d15062 100644 --- a/app/(core)/components/FunFactSlider.jsx +++ b/app/(core)/components/FunFactSlider.jsx @@ -53,7 +53,10 @@ export default function FunFactSlider({ fact }) {
- +
diff --git a/app/(core)/components/TopSim.tsx b/app/(core)/components/TopSim.tsx index 067f37f2..62107ef2 100644 --- a/app/(core)/components/TopSim.tsx +++ b/app/(core)/components/TopSim.tsx @@ -9,10 +9,11 @@ export default function TopSim() { const location = usePathname(); const idx = simulations.findIndex((sim) => sim.link === location); const isMobile = useMobile(); - + function getPrevious() { if (idx === -1) return "/"; - return simulations[(idx - 1 + simulations.length) % simulations.length].link; + return simulations[(idx - 1 + simulations.length) % simulations.length] + .link; } function getNext() { @@ -40,9 +41,19 @@ export default function TopSim() { )}
- +

{getCurrentName()}

- +
{/* βœ… THIRD DIV MOVED TO RIGHT */} diff --git a/app/(core)/data/chapters.js b/app/(core)/data/chapters.js index 2ed43e85..7beb51e3 100644 --- a/app/(core)/data/chapters.js +++ b/app/(core)/data/chapters.js @@ -10,7 +10,7 @@ const chapters = [ icon: "/icons/bouncingBall.png", relatedBlogSlug: "physics-bouncing-ball-comprehensive-educational-guide", funFacts: [ - "No real ball bounces forever because energy is lost as heat and sound." + "No real ball bounces forever because energy is lost as heat and sound.", ], }, @@ -22,9 +22,7 @@ const chapters = [ tags: [TAGS.EASY, TAGS.MATH, TAGS.VECTORS, TAGS.TRIGONOMETRY], icon: "/icons/vector.png", relatedBlogSlug: "operations-with-vectors", - funFacts: [ - "Dot product helps determine the angle between two vectors." - ], + funFacts: ["Dot product helps determine the angle between two vectors."], }, { @@ -35,9 +33,7 @@ const chapters = [ tags: [TAGS.MEDIUM, TAGS.KINEMATICS, TAGS.ACCELERATION, TAGS.INTERACTIVE], icon: "/icons/acceleration.png", relatedBlogSlug: "ball-uniformly-accelerated-motion", - funFacts: [ - "Acceleration happens whenever velocity changes.", - ], + funFacts: ["Acceleration happens whenever velocity changes."], }, { diff --git a/app/(core)/styles/index.css b/app/(core)/styles/index.css index 01f674c4..13379016 100644 --- a/app/(core)/styles/index.css +++ b/app/(core)/styles/index.css @@ -1,8 +1,6 @@ /* Stile globale */ @import "tailwindcss"; - - :root { --bg-color: #0b0f19; --text-color: #e8eefb; @@ -1590,9 +1588,9 @@ footer { .fun-fact-slider-wrapper { width: 20%; - justify-content: center ; - margin-left: auto; - margin-top: 20px; + justify-content: center; + margin-left: auto; + margin-top: 20px; } /* Wind icon for Ball Gravity Simulation*/ diff --git a/components/ui/button.tsx b/components/ui/button.tsx index 65d4fcd9..900bdf9e 100644 --- a/components/ui/button.tsx +++ b/components/ui/button.tsx @@ -1,8 +1,8 @@ -import * as React from "react" -import { Slot } from "@radix-ui/react-slot" -import { cva, type VariantProps } from "class-variance-authority" +import * as React from "react"; +import { Slot } from "@radix-ui/react-slot"; +import { cva, type VariantProps } from "class-variance-authority"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const buttonVariants = cva( "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", @@ -32,26 +32,27 @@ const buttonVariants = cva( size: "default", }, } -) +); export interface ButtonProps - extends React.ButtonHTMLAttributes, + extends + React.ButtonHTMLAttributes, VariantProps { - asChild?: boolean + asChild?: boolean; } const Button = React.forwardRef( ({ className, variant, size, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : "button" + const Comp = asChild ? Slot : "button"; return ( - ) + ); } -) -Button.displayName = "Button" +); +Button.displayName = "Button"; -export { Button, buttonVariants } +export { Button, buttonVariants }; diff --git a/lib/utils.ts b/lib/utils.ts index bd0c391d..a5ef1935 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -1,6 +1,6 @@ -import { clsx, type ClassValue } from "clsx" -import { twMerge } from "tailwind-merge" +import { clsx, type ClassValue } from "clsx"; +import { twMerge } from "tailwind-merge"; export function cn(...inputs: ClassValue[]) { - return twMerge(clsx(inputs)) + return twMerge(clsx(inputs)); } diff --git a/next.config.mjs b/next.config.mjs index c83314b6..f8a052d5 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -10,5 +10,3 @@ const nextConfig = { }; export default nextConfig; - - diff --git a/tsconfig.json b/tsconfig.json index 94815eee..394807fa 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,11 +1,7 @@ { "compilerOptions": { "target": "ES2017", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, @@ -24,9 +20,7 @@ } ], "paths": { - "@/*": [ - "./*" - ] + "@/*": ["./*"] } }, "include": [ @@ -41,7 +35,5 @@ "app/(pages)/blog/[slug]/page.jsx", "next.config.mjs" ], - "exclude": [ - "node_modules" - ] + "exclude": ["node_modules"] } From 5a8724edd8df387fddce33a83ea395918ca950c3 Mon Sep 17 00:00:00 2001 From: Nadeem sheikh Date: Sat, 14 Feb 2026 15:55:53 +0530 Subject: [PATCH 05/11] Fix React hook purity issues for fun fact selection --- app/(core)/components/FunFactSlider.jsx | 11 +++++++++-- app/(core)/components/TopSim.tsx | 25 ++++++++++++++++++------- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/app/(core)/components/FunFactSlider.jsx b/app/(core)/components/FunFactSlider.jsx index b2d15062..32ba1558 100644 --- a/app/(core)/components/FunFactSlider.jsx +++ b/app/(core)/components/FunFactSlider.jsx @@ -8,8 +8,13 @@ export default function FunFactSlider({ fact }) { useEffect(() => { if (!fact) return; - setRender(true); - setTimeout(() => setVisible(true), 50); + const renderTimer = setTimeout(() => { + setRender(true); + }, 0); + + const showTimer = setTimeout(() => { + setVisible(true); + }, 50); const hideTimer = setTimeout(() => { setVisible(false); @@ -20,6 +25,8 @@ export default function FunFactSlider({ fact }) { }, 5800); return () => { + clearTimeout(renderTimer); + clearTimeout(showTimer); clearTimeout(hideTimer); clearTimeout(removeTimer); }; diff --git a/app/(core)/components/TopSim.tsx b/app/(core)/components/TopSim.tsx index 62107ef2..4685a33e 100644 --- a/app/(core)/components/TopSim.tsx +++ b/app/(core)/components/TopSim.tsx @@ -10,6 +10,8 @@ export default function TopSim() { const idx = simulations.findIndex((sim) => sim.link === location); const isMobile = useMobile(); + const [fact, setFact] = useState(null); + function getPrevious() { if (idx === -1) return "/"; return simulations[(idx - 1 + simulations.length) % simulations.length] @@ -26,11 +28,21 @@ export default function TopSim() { return `${simulations[idx].id} - ${simulations[idx].name}`; } - const funFacts = simulations[idx]?.funFacts || []; - const fact = - funFacts.length > 0 - ? funFacts[Math.floor(Math.random() * funFacts.length)] - : null; + useEffect(() => { + const funFacts = simulations[idx]?.funFacts ?? []; + + const timer = setTimeout(() => { + if (funFacts.length === 0) { + setFact(null); + return; + } + + const randomIndex = Math.floor(Math.random() * funFacts.length); + setFact(funFacts[randomIndex]); + }, 0); + + return () => clearTimeout(timer); + }, [idx]); return (
@@ -56,9 +68,8 @@ export default function TopSim() { />
- {/* βœ… THIRD DIV MOVED TO RIGHT */} {!isMobile && ( -
+
)} From 47cee20208165e1a4bcaf5e0c04ed584efda9e2d Mon Sep 17 00:00:00 2001 From: physicshub Date: Tue, 17 Feb 2026 22:12:37 +0100 Subject: [PATCH 06/11] Update Config.js --- app/(core)/constants/Config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/(core)/constants/Config.js b/app/(core)/constants/Config.js index 492c0d41..50eea5d4 100644 --- a/app/(core)/constants/Config.js +++ b/app/(core)/constants/Config.js @@ -1,4 +1,4 @@ -// constants/ +// constants/Config.js // Conversione metri ↔ pixel export const SCALE = 100; // 1 m = 100 px From a854c49bcc0877c7c51ec4ef64376556ad3bedc6 Mon Sep 17 00:00:00 2001 From: Nadeem sheikh Date: Fri, 20 Feb 2026 00:08:59 +0530 Subject: [PATCH 07/11] update the css for fun fact component --- app/(core)/components/FunFactSlider.jsx | 13 ++++++++----- app/(core)/styles/index.css | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/(core)/components/FunFactSlider.jsx b/app/(core)/components/FunFactSlider.jsx index 32ba1558..1ae4a08c 100644 --- a/app/(core)/components/FunFactSlider.jsx +++ b/app/(core)/components/FunFactSlider.jsx @@ -36,6 +36,7 @@ export default function FunFactSlider({ fact }) { return (
-

- β€œ - {fact} - ” -

+
+

+ β€œ + {fact} + ” +

+
{/* Close Button */} diff --git a/app/(core)/styles/index.css b/app/(core)/styles/index.css index 13379016..b3db8f1a 100644 --- a/app/(core)/styles/index.css +++ b/app/(core)/styles/index.css @@ -1591,6 +1591,7 @@ footer { justify-content: center; margin-left: auto; margin-top: 20px; + margin-right: 55px; } /* Wind icon for Ball Gravity Simulation*/ From eaf5f533a045a98eb3d55c1cadfe508af6094df2 Mon Sep 17 00:00:00 2001 From: Nadeem sheikh Date: Mon, 2 Mar 2026 16:29:00 +0530 Subject: [PATCH 08/11] fix: update sitemap generator formatting --- scripts/sitemap-generator.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/sitemap-generator.js b/scripts/sitemap-generator.js index 375478be..9e97e5b9 100644 --- a/scripts/sitemap-generator.js +++ b/scripts/sitemap-generator.js @@ -75,6 +75,10 @@ async function generateSitemap() { console.log(`βœ… Robots.txt copied to ./out!`); } } catch (e) { +<<<<<<< Updated upstream +======= + /* ignore */ +>>>>>>> Stashed changes console.error("Error writing robots.txt to out directory:", e); } From 03f1118f7d59929f393b2fcc39cb6db6925948b7 Mon Sep 17 00:00:00 2001 From: Nadeem sheikh Date: Mon, 2 Mar 2026 16:37:34 +0530 Subject: [PATCH 09/11] fix(ci): resolve npm peer dependency conflict From 8a63a6c936fb442eb37ddf3f29e66ea574efe3a9 Mon Sep 17 00:00:00 2001 From: Nadeem sheikh Date: Mon, 2 Mar 2026 16:50:29 +0530 Subject: [PATCH 10/11] fix: resolve eslint peer dependency conflict From adfe03b528a293368996e8cf213feccfe51218f3 Mon Sep 17 00:00:00 2001 From: Nadeem sheikh Date: Mon, 2 Mar 2026 16:59:49 +0530 Subject: [PATCH 11/11] fix: resolve merge conflict in sitemap generator --- package.json | 4 ---- scripts/sitemap-generator.js | 4 ---- 2 files changed, 8 deletions(-) diff --git a/package.json b/package.json index 71d764dd..92f98a9a 100644 --- a/package.json +++ b/package.json @@ -35,8 +35,6 @@ "katex": "^0.16.25", "koalaz": "^1.1.3", "lucide-react": "^0.563.0", - "motion": "^12.34.0", - "next": "16.1.5", "motion": "^12.23.24", "next": "16.1.6", "p5": "^2.1.2", @@ -52,7 +50,6 @@ "xml-formatter": "^3.6.7" }, "devDependencies": { - "@eslint/js": "^10.0.1", "@semantic-release/exec": "^7.1.0", "@tailwindcss/postcss": "^4", "@types/node": "25.2.2", @@ -65,7 +62,6 @@ "@typescript-eslint/parser": "^8.53.0", "axios": "^1.13.2", "dotenv": "^17.2.3", - "eslint": "^9.39.1", "eslint-config-next": "16.1.6", "eslint-plugin-react-hooks": "^7.0.1", "eslint-plugin-react-refresh": "^0.4.24", diff --git a/scripts/sitemap-generator.js b/scripts/sitemap-generator.js index 9e97e5b9..375478be 100644 --- a/scripts/sitemap-generator.js +++ b/scripts/sitemap-generator.js @@ -75,10 +75,6 @@ async function generateSitemap() { console.log(`βœ… Robots.txt copied to ./out!`); } } catch (e) { -<<<<<<< Updated upstream -======= - /* ignore */ ->>>>>>> Stashed changes console.error("Error writing robots.txt to out directory:", e); }