0x0x230x

Untitled

Feb 10th, 2025
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. ```
  2. 'use client';
  3.  
  4. import React from 'react';
  5. import { ShootingStars } from '@/components/ui/shooting-stars';
  6.  
  7. interface BackgroundLayoutProps {
  8. children: React.ReactNode;
  9. }
  10.  
  11. export function BackgroundLayout({ children }: BackgroundLayoutProps) {
  12. return (
  13. <div className='relative min-h-screen w-full bg-black'>
  14. {/* Background with stars */}
  15. <div className='absolute inset-0'>
  16. <div className='absolute inset-0 bg-[radial-gradient(ellipse_at_center,rgba(255,255,255,0.15)_0%,rgba(0,0,0,0)_80%)]' />
  17. <div className='stars absolute inset-0' />
  18. </div>
  19.  
  20. {/* Multiple shooting star layers with different colors and speeds */}
  21. <ShootingStars
  22. starColor='#9E00FF'
  23. trailColor='#2EB9DF'
  24. minSpeed={15}
  25. maxSpeed={35}
  26. minDelay={1000}
  27. maxDelay={3000}
  28. />
  29. <ShootingStars
  30. starColor='#FF0099'
  31. trailColor='#FFB800'
  32. minSpeed={10}
  33. maxSpeed={25}
  34. minDelay={2000}
  35. maxDelay={4000}
  36. />
  37. <ShootingStars
  38. starColor='#00FF9E'
  39. trailColor='#00B8FF'
  40. minSpeed={20}
  41. maxSpeed={40}
  42. minDelay={1500}
  43. maxDelay={3500}
  44. />
  45.  
  46. {/* Content */}
  47. <div className='relative z-10'>{children}</div>
  48.  
  49. <style jsx>{`
  50. .stars {
  51. background-image:
  52. radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
  53. radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
  54. radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0,0,0,0)),
  55. radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
  56. radial-gradient(2px 2px at 130px 80px, #fff, rgba(0,0,0,0)),
  57. radial-gradient(2px 2px at 160px 120px, #ddd, rgba(0,0,0,0));
  58. background-repeat: repeat;
  59. background-size: 200px 200px;
  60. animation: twinkle 5s ease-in-out infinite;
  61. opacity: 0.5;
  62. }
  63.  
  64. @keyframes twinkle {
  65. 0% { opacity: 0.5; }
  66. 50% { opacity: 0.8; }
  67. 100% { opacity: 0.5; }
  68. }
  69. `}</style>
  70. </div>
  71. );
  72. }
  73.  
  74. ```
Advertisement
Add Comment
Please, Sign In to add comment