view react_games/public/landing_page.js @ 262:0f45474c1b1a

Add cyberpunk JRPG blog browser Show the latest posts in the JRPG preview and render the full blog archive and sanitized post details in the Inspect modal. Co-authored-by: Copilot <[email protected]>
author MrJuneJune <mrjunejune@users.noreply.github.com>
date Thu, 06 Aug 2026 04:08:45 -0700
parents fb9bcd3145cb
children
line wrap: on
line source

const createStars = (x, y) => {
  const star = document.createElement("div");

  star.style.position = 'fixed';
  star.style.left = x + 'px';
  star.style.top = y + 'px';
  star.style.width = '4px';
  star.style.height = '4px';
  star.style.background = 'white';
  star.style.borderRadius = '50%';
  star.style.pointerEvents = 'none';
  star.style.zIndex = '1000';
  star.style.animation = 'sparkleAnim 1s ease-out forwards';

  document.body.appendChild(star);

  setTimeout(() => {
    star.remove();
  }, 1000);
}

document.addEventListener('mousemove', (e) => {
  if (Math.random() > 0.99) {
    createStars(e.clientX, e.clientY);
  }
});