CarbonO2 commited on
Commit
100befc
·
verified ·
1 Parent(s): 5046b98

Upload components/Navbar.jsx with huggingface_hub

Browse files
Files changed (1) hide show
  1. components/Navbar.jsx +61 -0
components/Navbar.jsx ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React from 'react';
2
+ import { Star, Info, Settings } from 'lucide-react';
3
+
4
+ const Navbar = ({ setView, setSpeed, speed }) => {
5
+ return (
6
+ <nav className="fixed top-0 left-0 right-0 z-50 bg-black/30 backdrop-blur-md border-b border-white/10">
7
+ <div className="container mx-auto px-4 py-3">
8
+ <div className="flex items-center justify-between">
9
+ <div className="flex items-center gap-2">
10
+ <Star className="text-cyan-400 h-6 w-6" />
11
+ <h1 className="text-xl font-bold bg-gradient-to-r from-cyan-400 to-purple-500 bg-clip-text text-transparent">
12
+ Solar System 3D
13
+ </h1>
14
+ </div>
15
+
16
+ <div className="flex items-center gap-4">
17
+ <button
18
+ onClick={() => setView('solar-system')}
19
+ className={`px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${
20
+ view === 'solar-system'
21
+ ? 'bg-cyan-500/20 text-cyan-400'
22
+ : 'text-gray-300 hover:bg-white/5'
23
+ }`}
24
+ >
25
+ Solar System
26
+ </button>
27
+ <button
28
+ onClick={() => setView('planet-details')}
29
+ className={`px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${
30
+ view === 'planet-details'
31
+ ? 'bg-cyan-500/20 text-cyan-400'
32
+ : 'text-gray-300 hover:bg-white/5'
33
+ }`}
34
+ >
35
+ Planet Details
36
+ </button>
37
+
38
+ <div className="flex items-center gap-2 ml-4">
39
+ <Settings className="h-4 w-4 text-gray-400" />
40
+ <span className="text-xs text-gray-400">Speed:</span>
41
+ <input
42
+ type="range"
43
+ min="0.1"
44
+ max="2"
45
+ step="0.1"
46
+ value={speed}
47
+ onChange={(e) => setSpeed(parseFloat(e.target.value))}
48
+ className="w-24 h-1 bg-gray-700 rounded-lg appearance-none cursor-pointer accent-cyan-500"
49
+ />
50
+ </div>
51
+ </div>
52
+ </div>
53
+ </div>
54
+ </nav>
55
+ );
56
+ };
57
+
58
+ // Fix: Define view outside the component
59
+ const view = 'solar-system';
60
+
61
+ export default Navbar;