Agniv1 commited on
Commit
86a3569
·
verified ·
1 Parent(s): 71f3abf

Can you add react components to this website and make it more responsive.

Browse files
Files changed (8) hide show
  1. README.md +8 -5
  2. components/Features.js +61 -0
  3. components/Footer.js +69 -0
  4. components/Hero.js +42 -0
  5. components/Navbar.js +88 -0
  6. index.html +28 -19
  7. script.js +15 -0
  8. style.css +40 -19
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Pixelpulse Reactor
3
- emoji: 📊
4
- colorFrom: blue
5
- colorTo: green
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: PixelPulse Reactor
3
+ colorFrom: purple
4
+ colorTo: pink
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://huggingface.co/deepsite).
components/Features.js ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const Features = () => {
2
+ const features = [
3
+ {
4
+ icon: "cpu",
5
+ title: "Blazing Fast Performance",
6
+ description: "Optimized with modern React and Tailwind for lightning-fast load times and smooth animations."
7
+ },
8
+ {
9
+ icon: "smartphone",
10
+ title: "Fully Responsive",
11
+ description: "Looks great on any device, from mobile phones to large desktop displays."
12
+ },
13
+ {
14
+ icon: "moon",
15
+ title: "Dark Mode Ready",
16
+ description: "Automatic dark mode detection with toggle option for user preference."
17
+ },
18
+ {
19
+ icon: "code",
20
+ title: "Clean Code",
21
+ description: "Modular components with proper separation of concerns for easy maintenance."
22
+ }
23
+ ];
24
+
25
+ return (
26
+ <section className="py-16 bg-gray-50 dark:bg-gray-800 transition-colors duration-300">
27
+ <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
28
+ <div className="text-center mb-16">
29
+ <h2 className="text-3xl md:text-4xl font-bold text-gray-900 dark:text-white mb-4">
30
+ Why Choose PixelPulse?
31
+ </h2>
32
+ <p className="text-gray-600 dark:text-gray-300 max-w-2xl mx-auto">
33
+ We combine cutting-edge technology with elegant design to deliver exceptional digital experiences.
34
+ </p>
35
+ </div>
36
+
37
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8">
38
+ {features.map((feature, index) => (
39
+ <div
40
+ key={index}
41
+ className="bg-white dark:bg-gray-700 p-8 rounded-xl shadow-lg hover:shadow-xl transition-shadow duration-300 group"
42
+ >
43
+ <div className="w-14 h-14 bg-indigo-100 dark:bg-pink-900 rounded-lg flex items-center justify-center mb-6 group-hover:bg-indigo-500 dark:group-hover:bg-pink-500 transition-colors">
44
+ <i
45
+ data-feather={feature.icon}
46
+ className="text-indigo-500 dark:text-pink-500 w-6 h-6 group-hover:text-white transition-colors"
47
+ ></i>
48
+ </div>
49
+ <h3 className="text-xl font-semibold text-gray-900 dark:text-white mb-3">
50
+ {feature.title}
51
+ </h3>
52
+ <p className="text-gray-600 dark:text-gray-300">
53
+ {feature.description}
54
+ </p>
55
+ </div>
56
+ ))}
57
+ </div>
58
+ </div>
59
+ </section>
60
+ );
61
+ }
components/Footer.js ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const Footer = () => {
2
+ const currentYear = new Date().getFullYear();
3
+ const socialLinks = [
4
+ { icon: "github", url: "#" },
5
+ { icon: "twitter", url: "#" },
6
+ { icon: "instagram", url: "#" },
7
+ { icon: "linkedin", url: "#" }
8
+ ];
9
+
10
+ return (
11
+ <footer className="bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 transition-colors duration-300">
12
+ <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
13
+ <div className="grid grid-cols-1 md:grid-cols-4 gap-8">
14
+ <div className="md:col-span-2">
15
+ <div className="flex items-center mb-4">
16
+ <i data-feather="zap" className="text-indigo-500 dark:text-pink-500 w-6 h-6"></i>
17
+ <span className="ml-2 text-xl font-bold text-gray-900 dark:text-white">
18
+ PixelPulse
19
+ </span>
20
+ </div>
21
+ <p className="text-gray-600 dark:text-gray-300 mb-4">
22
+ Elevating digital experiences with cutting-edge technology and elegant design.
23
+ </p>
24
+ <div className="flex space-x-4">
25
+ {socialLinks.map((social, index) => (
26
+ <a
27
+ key={index}
28
+ href={social.url}
29
+ className="text-gray-500 dark:text-gray-400 hover:text-indigo-500 dark:hover:text-pink-500 transition-colors"
30
+ >
31
+ <i data-feather={social.icon} className="w-5 h-5"></i>
32
+ </a>
33
+ ))}
34
+ </div>
35
+ </div>
36
+
37
+ <div>
38
+ <h3 className="text-lg font-semibold text-gray-900 dark:text-white mb-4">
39
+ Quick Links
40
+ </h3>
41
+ <ul className="space-y-2">
42
+ <li><a href="#" className="text-gray-600 dark:text-gray-300 hover:text-indigo-500 dark:hover:text-pink-500 transition-colors">Home</a></li>
43
+ <li><a href="#" className="text-gray-600 dark:text-gray-300 hover:text-indigo-500 dark:hover:text-pink-500 transition-colors">Features</a></li>
44
+ <li><a href="#" className="text-gray-600 dark:text-gray-300 hover:text-indigo-500 dark:hover:text-pink-500 transition-colors">Pricing</a></li>
45
+ <li><a href="#" className="text-gray-600 dark:text-gray-300 hover:text-indigo-500 dark:hover:text-pink-500 transition-colors">Contact</a></li>
46
+ </ul>
47
+ </div>
48
+
49
+ <div>
50
+ <h3 className="text-lg font-semibold text-gray-900 dark:text-white mb-4">
51
+ Legal
52
+ </h3>
53
+ <ul className="space-y-2">
54
+ <li><a href="#" className="text-gray-600 dark:text-gray-300 hover:text-indigo-500 dark:hover:text-pink-500 transition-colors">Privacy Policy</a></li>
55
+ <li><a href="#" className="text-gray-600 dark:text-gray-300 hover:text-indigo-500 dark:hover:text-pink-500 transition-colors">Terms of Service</a></li>
56
+ <li><a href="#" className="text-gray-600 dark:text-gray-300 hover:text-indigo-500 dark:hover:text-pink-500 transition-colors">Cookie Policy</a></li>
57
+ </ul>
58
+ </div>
59
+ </div>
60
+
61
+ <div className="mt-12 pt-8 border-t border-gray-200 dark:border-gray-700">
62
+ <p className="text-center text-gray-500 dark:text-gray-400">
63
+ &copy; {currentYear} PixelPulse Reactor. All rights reserved.
64
+ </p>
65
+ </div>
66
+ </div>
67
+ </footer>
68
+ );
69
+ }
components/Hero.js ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const Hero = () => {
2
+ return (
3
+ <section className="relative overflow-hidden">
4
+ <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-20 md:py-28">
5
+ <div className="relative z-10 text-center">
6
+ <h1 className="text-4xl md:text-6xl font-bold text-gray-900 dark:text-white mb-6">
7
+ Power Up Your <span className="text-indigo-500 dark:text-pink-500">Digital Presence</span>
8
+ </h1>
9
+ <p className="text-lg md:text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto mb-10">
10
+ PixelPulse Reactor delivers cutting-edge solutions to elevate your online experience with responsive design and modern tech.
11
+ </p>
12
+ <div className="flex flex-col sm:flex-row justify-center gap-4">
13
+ <a
14
+ href="#"
15
+ className="px-8 py-3 bg-indigo-500 hover:bg-indigo-600 dark:bg-pink-500 dark:hover:bg-pink-600 text-white font-medium rounded-lg shadow-lg transition-all transform hover:-translate-y-1"
16
+ >
17
+ Get Started
18
+ </a>
19
+ <a
20
+ href="#"
21
+ className="px-8 py-3 border-2 border-indigo-500 dark:border-pink-500 text-indigo-500 dark:text-pink-500 font-medium rounded-lg hover:bg-indigo-50 dark:hover:bg-gray-800 transition-colors"
22
+ >
23
+ Learn More
24
+ </a>
25
+ </div>
26
+ </div>
27
+ <div className="mt-16 relative">
28
+ <div className="absolute inset-0 flex items-center justify-center">
29
+ <div className="w-96 h-96 rounded-full bg-indigo-100 dark:bg-pink-900 opacity-20 blur-3xl animate-pulse-slow"></div>
30
+ </div>
31
+ <div className="relative z-10 max-w-4xl mx-auto">
32
+ <img
33
+ src="http://static.photos/technology/1200x630/42"
34
+ alt="Hero illustration"
35
+ className="rounded-2xl shadow-xl border-8 border-white dark:border-gray-800 w-full object-cover"
36
+ />
37
+ </div>
38
+ </div>
39
+ </div>
40
+ </section>
41
+ );
42
+ }
components/Navbar.js ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const Navbar = () => {
2
+ const [darkMode, setDarkMode] = React.useState(false);
3
+ const [mobileMenuOpen, setMobileMenuOpen] = React.useState(false);
4
+
5
+ React.useEffect(() => {
6
+ if (darkMode) {
7
+ document.documentElement.classList.add('dark');
8
+ } else {
9
+ document.documentElement.classList.remove('dark');
10
+ }
11
+ }, [darkMode]);
12
+
13
+ const toggleDarkMode = () => {
14
+ setDarkMode(!darkMode);
15
+ };
16
+
17
+ return (
18
+ <nav className="bg-white dark:bg-gray-800 shadow-sm sticky top-0 z-50 transition-colors duration-300">
19
+ <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
20
+ <div className="flex justify-between h-16">
21
+ <div className="flex items-center">
22
+ <a href="#" className="flex items-center">
23
+ <i data-feather="zap" className="text-indigo-500 dark:text-pink-500 w-6 h-6"></i>
24
+ <span className="ml-2 text-xl font-bold text-gray-900 dark:text-white">
25
+ PixelPulse
26
+ </span>
27
+ </a>
28
+ </div>
29
+
30
+ <div className="hidden md:flex items-center space-x-8">
31
+ <a href="#" className="text-gray-900 dark:text-white hover:text-indigo-500 dark:hover:text-pink-500 transition-colors">
32
+ Home
33
+ </a>
34
+ <a href="#" className="text-gray-900 dark:text-white hover:text-indigo-500 dark:hover:text-pink-500 transition-colors">
35
+ Features
36
+ </a>
37
+ <a href="#" className="text-gray-900 dark:text-white hover:text-indigo-500 dark:hover:text-pink-500 transition-colors">
38
+ Pricing
39
+ </a>
40
+ <a href="#" className="text-gray-900 dark:text-white hover:text-indigo-500 dark:hover:text-pink-500 transition-colors">
41
+ Contact
42
+ </a>
43
+ <button
44
+ onClick={toggleDarkMode}
45
+ className="p-2 rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-pink-500"
46
+ >
47
+ <i data-feather={darkMode ? "sun" : "moon"} className="text-gray-900 dark:text-white w-5 h-5"></i>
48
+ </button>
49
+ </div>
50
+
51
+ <div className="md:hidden flex items-center">
52
+ <button
53
+ onClick={() => setMobileMenuOpen(!mobileMenuOpen)}
54
+ className="p-2 rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-pink-500"
55
+ >
56
+ <i data-feather={mobileMenuOpen ? "x" : "menu"} className="text-gray-900 dark:text-white w-5 h-5"></i>
57
+ </button>
58
+ </div>
59
+ </div>
60
+ </div>
61
+
62
+ {mobileMenuOpen && (
63
+ <div className="md:hidden bg-white dark:bg-gray-800 transition-colors duration-300">
64
+ <div className="pt-2 pb-3 space-y-1 px-4">
65
+ <a href="#" className="block px-3 py-2 rounded-md text-base font-medium text-gray-900 dark:text-white hover:text-indigo-500 dark:hover:text-pink-500">
66
+ Home
67
+ </a>
68
+ <a href="#" className="block px-3 py-2 rounded-md text-base font-medium text-gray-900 dark:text-white hover:text-indigo-500 dark:hover:text-pink-500">
69
+ Features
70
+ </a>
71
+ <a href="#" className="block px-3 py-2 rounded-md text-base font-medium text-gray-900 dark:text-white hover:text-indigo-500 dark:hover:text-pink-500">
72
+ Pricing
73
+ </a>
74
+ <a href="#" className="block px-3 py-2 rounded-md text-base font-medium text-gray-900 dark:text-white hover:text-indigo-500 dark:hover:text-pink-500">
75
+ Contact
76
+ </a>
77
+ <button
78
+ onClick={toggleDarkMode}
79
+ className="block w-full text-left px-3 py-2 rounded-md text-base font-medium text-gray-900 dark:text-white hover:text-indigo-500 dark:hover:text-pink-500"
80
+ >
81
+ {darkMode ? 'Light Mode' : 'Dark Mode'}
82
+ </button>
83
+ </div>
84
+ </div>
85
+ )}
86
+ </nav>
87
+ );
88
+ }
index.html CHANGED
@@ -1,19 +1,28 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>PixelPulse Reactor</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <script src="https://unpkg.com/feather-icons"></script>
11
+ <script src="https://unpkg.com/react@18/umd/react.development.js" crossorigin></script>
12
+ <script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js" crossorigin></script>
13
+ <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
14
+ </head>
15
+ <body class="bg-gray-50 dark:bg-gray-900 transition-colors duration-300">
16
+ <div id="root"></div>
17
+
18
+ <script type="text/babel" src="components/Navbar.js"></script>
19
+ <script type="text/babel" src="components/Hero.js"></script>
20
+ <script type="text/babel" src="components/Features.js"></script>
21
+ <script type="text/babel" src="components/Footer.js"></script>
22
+ <script type="text/babel" src="script.js"></script>
23
+ <script>
24
+ feather.replace();
25
+ </script>
26
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
27
+ </body>
28
+ </html>
script.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const App = () => {
2
+ return (
3
+ <div className="min-h-screen flex flex-col">
4
+ <Navbar />
5
+ <main className="flex-grow">
6
+ <Hero />
7
+ <Features />
8
+ </main>
9
+ <Footer />
10
+ </div>
11
+ );
12
+ }
13
+
14
+ const root = ReactDOM.createRoot(document.getElementById('root'));
15
+ root.render(<App />);
style.css CHANGED
@@ -1,28 +1,49 @@
1
- body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
 
 
 
 
 
 
 
 
 
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
 
 
 
 
 
28
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ :root {
6
+ --primary: #6366f1;
7
+ --secondary: #f472b6;
8
+ }
9
+
10
+ /* Custom scrollbar */
11
+ ::-webkit-scrollbar {
12
+ width: 8px;
13
+ height: 8px;
14
  }
15
 
16
+ ::-webkit-scrollbar-track {
17
+ @apply bg-gray-200 dark:bg-gray-800;
 
18
  }
19
 
20
+ ::-webkit-scrollbar-thumb {
21
+ @apply bg-indigo-500 dark:bg-pink-500 rounded-full;
 
 
 
22
  }
23
 
24
+ /* Animation classes */
25
+ .animate-float {
26
+ animation: float 6s ease-in-out infinite;
 
 
 
27
  }
28
 
29
+ @keyframes float {
30
+ 0%, 100% {
31
+ transform: translateY(0);
32
+ }
33
+ 50% {
34
+ transform: translateY(-20px);
35
+ }
36
  }
37
+
38
+ .animate-pulse-slow {
39
+ animation: pulse-slow 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
40
+ }
41
+
42
+ @keyframes pulse-slow {
43
+ 0%, 100% {
44
+ opacity: 1;
45
+ }
46
+ 50% {
47
+ opacity: 0.5;
48
+ }
49
+ }