Joey889 commited on
Commit
e750cc9
·
verified ·
1 Parent(s): 1f494c9

Upload 3 files

Browse files
src/components/layout/Footer.tsx ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export default function Footer() {
2
+ return (
3
+ <footer className="bg-gray-900 text-white py-6">
4
+ <div className="container mx-auto px-4">
5
+ <div className="flex flex-col md:flex-row justify-between items-center">
6
+ <div className="mb-4 md:mb-0">
7
+ <h3 className="text-xl font-bold bg-gradient-to-r from-blue-400 to-purple-500 bg-clip-text text-transparent">
8
+ Roblox 基礎入門教學
9
+ </h3>
10
+ <p className="text-gray-400 mt-2">
11
+ 學習 Roblox Studio 開發,打造屬於你的遊戲世界
12
+ </p>
13
+ </div>
14
+ <div className="flex space-x-4">
15
+ <a href="#" className="hover:text-blue-400 transition-colors">
16
+ 關於我們
17
+ </a>
18
+ <a href="#" className="hover:text-blue-400 transition-colors">
19
+ 聯絡資訊
20
+ </a>
21
+ <a href="#" className="hover:text-blue-400 transition-colors">
22
+ 資源下載
23
+ </a>
24
+ </div>
25
+ </div>
26
+ <div className="mt-6 border-t border-gray-800 pt-6 text-center text-gray-400">
27
+ <p>© {new Date().getFullYear()} Roblox 基礎入門教學. 版權所有.</p>
28
+ </div>
29
+ </div>
30
+ </footer>
31
+ );
32
+ }
src/components/layout/Layout.tsx ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Outlet } from 'react-router-dom';
2
+ import Navbar from './Navbar';
3
+ import Footer from './Footer';
4
+
5
+ export default function Layout() {
6
+ return (
7
+ <div className="flex flex-col min-h-screen bg-gray-50">
8
+ <Navbar />
9
+ <main className="flex-grow container mx-auto px-4 py-8 max-w-7xl">
10
+ <Outlet />
11
+ </main>
12
+ <Footer />
13
+ </div>
14
+ );
15
+ }
src/components/layout/Navbar.tsx ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useState } from 'react';
2
+ import { Link } from 'react-router-dom';
3
+
4
+ export default function Navbar() {
5
+ const [isMenuOpen, setIsMenuOpen] = useState(false);
6
+
7
+ return (
8
+ <nav className="bg-gray-900 text-white shadow-lg">
9
+ <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
10
+ <div className="flex items-center justify-between h-16">
11
+ <div className="flex items-center">
12
+ <div className="flex-shrink-0">
13
+ <Link to="/" className="flex items-center">
14
+ <img
15
+ className="h-8 w-8 mr-2"
16
+ src="/roblox-logo.png"
17
+ alt="Roblox Logo"
18
+ />
19
+ <span className="text-xl font-bold bg-gradient-to-r from-blue-400 to-purple-500 bg-clip-text text-transparent">
20
+ Roblox 基礎入門
21
+ </span>
22
+ </Link>
23
+ </div>
24
+ </div>
25
+
26
+ {/* Desktop menu */}
27
+ <div className="hidden md:block">
28
+ <div className="ml-10 flex items-baseline space-x-4">
29
+ <Link to="/" className="px-3 py-2 rounded-md text-sm font-medium hover:bg-gray-800 hover:text-white">
30
+ 首頁
31
+ </Link>
32
+ <Link to="/lesson1" className="px-3 py-2 rounded-md text-sm font-medium hover:bg-gray-800 hover:text-white">
33
+ 第一課:基礎入門
34
+ </Link>
35
+ <Link to="/lesson2" className="px-3 py-2 rounded-md text-sm font-medium hover:bg-gray-800 hover:text-white">
36
+ 第二課:賽車遊戲
37
+ </Link>
38
+ <Link to="/lesson3" className="px-3 py-2 rounded-md text-sm font-medium hover:bg-gray-800 hover:text-white">
39
+ 第三課:互動機關
40
+ </Link>
41
+ <Link to="/lesson4" className="px-3 py-2 rounded-md text-sm font-medium hover:bg-gray-800 hover:text-white">
42
+ 第四課:視覺化設計
43
+ </Link>
44
+ </div>
45
+ </div>
46
+
47
+ {/* Mobile menu button */}
48
+ <div className="md:hidden flex items-center">
49
+ <button
50
+ onClick={() => setIsMenuOpen(!isMenuOpen)}
51
+ className="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-white hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white"
52
+ >
53
+ <span className="sr-only">Open main menu</span>
54
+ {isMenuOpen ? (
55
+ <svg className="block h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
56
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M6 18L18 6M6 6l12 12" />
57
+ </svg>
58
+ ) : (
59
+ <svg className="block h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
60
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M4 6h16M4 12h16M4 18h16" />
61
+ </svg>
62
+ )}
63
+ </button>
64
+ </div>
65
+ </div>
66
+ </div>
67
+
68
+ {/* Mobile menu */}
69
+ {isMenuOpen && (
70
+ <div className="md:hidden">
71
+ <div className="px-2 pt-2 pb-3 space-y-1 sm:px-3">
72
+ <Link
73
+ to="/"
74
+ className="block px-3 py-2 rounded-md text-base font-medium hover:bg-gray-800 hover:text-white"
75
+ onClick={() => setIsMenuOpen(false)}
76
+ >
77
+ 首頁
78
+ </Link>
79
+ <Link
80
+ to="/lesson1"
81
+ className="block px-3 py-2 rounded-md text-base font-medium hover:bg-gray-800 hover:text-white"
82
+ onClick={() => setIsMenuOpen(false)}
83
+ >
84
+ 第一課:基礎入門
85
+ </Link>
86
+ <Link
87
+ to="/lesson2"
88
+ className="block px-3 py-2 rounded-md text-base font-medium hover:bg-gray-800 hover:text-white"
89
+ onClick={() => setIsMenuOpen(false)}
90
+ >
91
+ 第二課:賽車遊戲
92
+ </Link>
93
+ <Link
94
+ to="/lesson3"
95
+ className="block px-3 py-2 rounded-md text-base font-medium hover:bg-gray-800 hover:text-white"
96
+ onClick={() => setIsMenuOpen(false)}
97
+ >
98
+ 第三課:互動機關
99
+ </Link>
100
+ <Link
101
+ to="/lesson4"
102
+ className="block px-3 py-2 rounded-md text-base font-medium hover:bg-gray-800 hover:text-white"
103
+ onClick={() => setIsMenuOpen(false)}
104
+ >
105
+ 第四課:視覺化設計
106
+ </Link>
107
+ </div>
108
+ </div>
109
+ )}
110
+ </nav>
111
+ );
112
+ }