mb672038 commited on
Commit
1fca5b4
·
verified ·
1 Parent(s): 35ed81e

پلتفرم آموزش حرفه‌ای پایتون

Browse files

با سیستم ثبت‌نام، ورود امن، داشبورد کاربری و دوره‌های آموزشی واقعی

🧱 معماری کلی

Full-Stack Web Application

Frontend: React + Vite + TailwindCSS

Backend: Node.js + Express

Database: MongoDB

Auth: JWT + Email Verification + Google Login

UI Style: Modern Dashboard (Professional)

🌐 زبان‌ها

🇮🇷 فارسی

🇬🇧 انگلیسی
(قابلیت تغییر زبان در سایت)

🔐 سیستم احراز هویت (Login / Register)
1️⃣ ثبت‌نام (Register)

کاربر:

ایمیل سایت

رمز عبور سایت

سپس:

ارسال کد تأیید به ایمیل

وارد کردن کد

فعال شدن حساب

⚠️ نکته امنیتی مهم
❌ سایت هرگز رمز ایمیل واقعی کاربر را نمی‌گیرد
✔️ فقط رمز مخصوص همین سایت

2️⃣ ورود (Login)

روش‌ها:

ورود با ایمیل + رمز سایت

ورود با Google Login (OAuth حرفه‌ای)

3️⃣ امنیت

رمزها هش شده (bcrypt)

توکن ورود: JWT

محافظت از مسیرها (Protected Routes)

🧑‍💻 داشبورد کاربری (Dashboard)

بعد از ورود، کاربر وارد داشبورد می‌شود که شامل:

پروفایل کاربر

کارت‌های دوره‌ها

درصد پیشرفت هر دوره

آخرین درس دیده‌شده

تغییر زبان

Dark / Light Mode

خروج از حساب

📚 بخش آموزش پایتون
ساختار آموزشی:

Python Basics

Variables & Data Types

Conditions & Loops

Functions

OOP

File Handling

Libraries

Mini Projects

Final Project

هر درس شامل:

توضیح مفهومی

مثال کدنویسی

تمرین

پروژه کوچک

🖥️ طراحی UI / UX

طراحی مدرن، تمیز، حرفه‌ای

Dashboard Style

Responsive (موبایل / لپ‌تاپ)

کارت‌ها (Cards)

Sidebar حرفه‌ای

فونت مناسب فارسی و انگلیسی

Files changed (6) hide show
  1. README.md +8 -5
  2. components/footer.js +176 -0
  3. components/navbar.js +133 -0
  4. index.html +215 -19
  5. script.js +65 -0
  6. style.css +50 -18
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Python Mastery Academy
3
- emoji: 🦀
4
- colorFrom: green
5
- colorTo: yellow
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: Python Mastery Academy 🐍
3
+ colorFrom: gray
4
+ colorTo: purple
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/footer.js ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomFooter extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ :host {
7
+ display: block;
8
+ background-color: #1F2937;
9
+ color: white;
10
+ padding: 3rem 1rem;
11
+ }
12
+
13
+ .footer-container {
14
+ max-width: 1200px;
15
+ margin: 0 auto;
16
+ display: grid;
17
+ grid-template-columns: repeat(1, 1fr);
18
+ gap: 2rem;
19
+ }
20
+
21
+ .footer-logo {
22
+ display: flex;
23
+ align-items: center;
24
+ gap: 0.5rem;
25
+ font-size: 1.5rem;
26
+ font-weight: 700;
27
+ margin-bottom: 1rem;
28
+ color: white;
29
+ text-decoration: none;
30
+ }
31
+
32
+ .footer-description {
33
+ color: #D1D5DB;
34
+ margin-bottom: 1.5rem;
35
+ line-height: 1.6;
36
+ }
37
+
38
+ .social-links {
39
+ display: flex;
40
+ gap: 1rem;
41
+ }
42
+
43
+ .social-link {
44
+ display: flex;
45
+ align-items: center;
46
+ justify-content: center;
47
+ width: 40px;
48
+ height: 40px;
49
+ border-radius: 50%;
50
+ background-color: #374151;
51
+ color: white;
52
+ transition: background-color 0.2s;
53
+ }
54
+
55
+ .social-link:hover {
56
+ background-color: #3B82F6;
57
+ }
58
+
59
+ .footer-section-title {
60
+ font-size: 1.125rem;
61
+ font-weight: 600;
62
+ margin-bottom: 1.5rem;
63
+ color: white;
64
+ }
65
+
66
+ .footer-links {
67
+ display: flex;
68
+ flex-direction: column;
69
+ gap: 0.75rem;
70
+ }
71
+
72
+ .footer-link {
73
+ color: #D1D5DB;
74
+ text-decoration: none;
75
+ transition: color 0.2s;
76
+ }
77
+
78
+ .footer-link:hover {
79
+ color: #3B82F6;
80
+ }
81
+
82
+ .footer-bottom {
83
+ margin-top: 3rem;
84
+ padding-top: 1.5rem;
85
+ border-top: 1px solid #374151;
86
+ text-align: center;
87
+ color: #9CA3AF;
88
+ }
89
+
90
+ @media (min-width: 640px) {
91
+ .footer-container {
92
+ grid-template-columns: repeat(2, 1fr);
93
+ }
94
+ }
95
+
96
+ @media (min-width: 1024px) {
97
+ .footer-container {
98
+ grid-template-columns: repeat(4, 1fr);
99
+ }
100
+ }
101
+ </style>
102
+
103
+ <div class="footer-container">
104
+ <div class="footer-about">
105
+ <a href="/" class="footer-logo">
106
+ <i data-feather="code"></i>
107
+ پایتون مستری
108
+ </a>
109
+ <p class="footer-description">
110
+ پلتفرم تخصصی آموزش برنامه‌نویسی پایتون با متدهای روز دنیا و مربیان حرفه‌ای
111
+ </p>
112
+ <div class="social-links">
113
+ <a href="#" class="social-link">
114
+ <i data-feather="instagram"></i>
115
+ </a>
116
+ <a href="#" class="social-link">
117
+ <i data-feather="twitter"></i>
118
+ </a>
119
+ <a href="#" class="social-link">
120
+ <i data-feather="linkedin"></i>
121
+ </a>
122
+ <a href="#" class="social-link">
123
+ <i data-feather="youtube"></i>
124
+ </a>
125
+ </div>
126
+ </div>
127
+
128
+ <div class="footer-links-section">
129
+ <h3 class="footer-section-title">لینک‌های سریع</h3>
130
+ <div class="footer-links">
131
+ <a href="/" class="footer-link">صفحه اصلی</a>
132
+ <a href="/courses" class="footer-link">دوره‌ها</a>
133
+ <a href="/about" class="footer-link">درباره ما</a>
134
+ <a href="/blog" class="footer-link">بلاگ</a>
135
+ <a href="/contact" class="footer-link">تماس با ما</a>
136
+ </div>
137
+ </div>
138
+
139
+ <div class="footer-links-section">
140
+ <h3 class="footer-section-title">دوره‌ها</h3>
141
+ <div class="footer-links">
142
+ <a href="/course/python-basics" class="footer-link">پایتون مقدماتی</a>
143
+ <a href="/course/python-oop" class="footer-link">برنامه‌نویسی شی‌گرا</a>
144
+ <a href="/course/python-web" class="footer-link">توسعه وب با پایتون</a>
145
+ <a href="/course/data-science" class="footer-link">علم داده با پایتون</a>
146
+ <a href="/course/automation" class="footer-link">اتوماسیون با پایتون</a>
147
+ </div>
148
+ </div>
149
+
150
+ <div class="footer-contact">
151
+ <h3 class="footer-section-title">تماس با ما</h3>
152
+ <div class="footer-links">
153
+ <a href="mailto:info@pythonmastery.com" class="footer-link flex items-center gap-2">
154
+ <i data-feather="mail" class="w-4 h-4"></i>
155
+ info@pythonmastery.com
156
+ </a>
157
+ <a href="tel:+982122345678" class="footer-link flex items-center gap-2">
158
+ <i data-feather="phone" class="w-4 h-4"></i>
159
+ 021-22345678
160
+ </a>
161
+ <div class="flex items-center gap-2 text-gray-300">
162
+ <i data-feather="map-pin" class="w-4 h-4"></i>
163
+ تهران، خیابان آزادی، دانشگاه صنعتی شریف
164
+ </div>
165
+ </div>
166
+ </div>
167
+ </div>
168
+
169
+ <div class="footer-bottom">
170
+ <p>© ۱۴۰۲ پایتون مستری. تمامی حقوق محفوظ است.</p>
171
+ </div>
172
+ `;
173
+ }
174
+ }
175
+
176
+ customElements.define('custom-footer', CustomFooter);
components/navbar.js ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomNavbar extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ :host {
7
+ display: block;
8
+ width: 100%;
9
+ position: sticky;
10
+ top: 0;
11
+ z-index: 50;
12
+ background-color: white;
13
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
14
+ }
15
+
16
+ .navbar-container {
17
+ display: flex;
18
+ justify-content: space-between;
19
+ align-items: center;
20
+ padding: 1rem 2rem;
21
+ max-width: 1400px;
22
+ margin: 0 auto;
23
+ }
24
+
25
+ .logo {
26
+ display: flex;
27
+ align-items: center;
28
+ gap: 0.5rem;
29
+ font-weight: 700;
30
+ font-size: 1.25rem;
31
+ color: #3B82F6;
32
+ text-decoration: none;
33
+ }
34
+
35
+ .nav-links {
36
+ display: flex;
37
+ gap: 1.5rem;
38
+ align-items: center;
39
+ }
40
+
41
+ .nav-link {
42
+ color: #4B5563;
43
+ font-weight: 500;
44
+ text-decoration: none;
45
+ transition: color 0.2s;
46
+ }
47
+
48
+ .nav-link:hover {
49
+ color: #3B82F6;
50
+ }
51
+
52
+ .auth-buttons {
53
+ display: flex;
54
+ gap: 1rem;
55
+ }
56
+
57
+ .login-btn {
58
+ padding: 0.5rem 1rem;
59
+ border-radius: 0.375rem;
60
+ font-weight: 500;
61
+ color: #3B82F6;
62
+ border: 1px solid #3B82F6;
63
+ text-decoration: none;
64
+ transition: all 0.2s;
65
+ }
66
+
67
+ .login-btn:hover {
68
+ background-color: #EFF6FF;
69
+ }
70
+
71
+ .register-btn {
72
+ padding: 0.5rem 1rem;
73
+ border-radius: 0.375rem;
74
+ font-weight: 500;
75
+ color: white;
76
+ background-color: #3B82F6;
77
+ text-decoration: none;
78
+ transition: background-color 0.2s;
79
+ }
80
+
81
+ .register-btn:hover {
82
+ background-color: #2563EB;
83
+ }
84
+
85
+ .mobile-menu-btn {
86
+ display: none;
87
+ background: none;
88
+ border: none;
89
+ cursor: pointer;
90
+ }
91
+
92
+ @media (max-width: 768px) {
93
+ .nav-links, .auth-buttons {
94
+ display: none;
95
+ }
96
+
97
+ .mobile-menu-btn {
98
+ display: block;
99
+ }
100
+
101
+ .navbar-container {
102
+ padding: 1rem;
103
+ }
104
+ }
105
+ </style>
106
+
107
+ <div class="navbar-container">
108
+ <a href="/" class="logo">
109
+ <i data-feather="code"></i>
110
+ پایتون مستری
111
+ </a>
112
+
113
+ <div class="nav-links">
114
+ <a href="/courses" class="nav-link">دوره‌ها</a>
115
+ <a href="/about" class="nav-link">درباره ما</a>
116
+ <a href="/blog" class="nav-link">بلاگ</a>
117
+ <a href="/contact" class="nav-link">تماس با ما</a>
118
+ </div>
119
+
120
+ <div class="auth-buttons">
121
+ <a href="/login" class="login-btn">ورود</a>
122
+ <a href="/register" class="register-btn">ثبت‌نام</a>
123
+ </div>
124
+
125
+ <button class="mobile-menu-btn">
126
+ <i data-feather="menu"></i>
127
+ </button>
128
+ </div>
129
+ `;
130
+ }
131
+ }
132
+
133
+ customElements.define('custom-navbar', CustomNavbar);
index.html CHANGED
@@ -1,19 +1,215 @@
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" dir="rtl">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Python Mastery Academy | یادگیری حرفه‌ای پایتون</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>
12
+ tailwind.config = {
13
+ theme: {
14
+ extend: {
15
+ colors: {
16
+ primary: '#3B82F6',
17
+ secondary: '#10B981',
18
+ }
19
+ }
20
+ }
21
+ }
22
+ </script>
23
+ </head>
24
+ <body class="bg-gray-50 font-sans">
25
+ <custom-navbar></custom-navbar>
26
+
27
+ <main class="container mx-auto px-4 py-8">
28
+ <!-- Hero Section -->
29
+ <section class="flex flex-col md:flex-row items-center justify-between gap-8 mb-16">
30
+ <div class="md:w-1/2">
31
+ <h1 class="text-4xl md:text-5xl font-bold text-gray-900 mb-6">
32
+ <span class="text-primary">پلتفرم آموزش حرفه‌ای</span> پایتون
33
+ </h1>
34
+ <p class="text-lg text-gray-600 mb-8">
35
+ یادگیری پایتون را با بهترین متدها و پروژه‌های واقعی شروع کنید. از مبتدی تا حرفه‌ای در کنار ما باشید.
36
+ </p>
37
+ <div class="flex flex-col sm:flex-row gap-4">
38
+ <a href="/register" class="bg-primary hover:bg-primary-600 text-white px-6 py-3 rounded-lg font-medium text-center transition">
39
+ شروع یادگیری
40
+ </a>
41
+ <a href="/courses" class="border border-primary text-primary px-6 py-3 rounded-lg font-medium text-center hover:bg-primary-50 transition">
42
+ مشاهده دوره‌ها
43
+ </a>
44
+ </div>
45
+ </div>
46
+ <div class="md:w-1/2">
47
+ <img src="http://static.photos/technology/1024x576/42" alt="Python Programming" class="rounded-xl shadow-lg w-full">
48
+ </div>
49
+ </section>
50
+
51
+ <!-- Features Section -->
52
+ <section class="mb-16">
53
+ <h2 class="text-3xl font-bold text-center text-gray-900 mb-12">چرا پایتون مستری؟</h2>
54
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
55
+ <div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition">
56
+ <div class="bg-primary-100 w-12 h-12 rounded-full flex items-center justify-center mb-4">
57
+ <i data-feather="code" class="text-primary w-6 h-6"></i>
58
+ </div>
59
+ <h3 class="text-xl font-semibold mb-2">آموزش پروژه‌محور</h3>
60
+ <p class="text-gray-600">یادگیری با انجام پروژه‌های واقعی و کاربردی در دنیای کار</p>
61
+ </div>
62
+ <div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition">
63
+ <div class="bg-secondary-100 w-12 h-12 rounded-full flex items-center justify-center mb-4">
64
+ <i data-feather="users" class="text-secondary w-6 h-6"></i>
65
+ </div>
66
+ <h3 class="text-xl font-semibold mb-2">مربیان حرفه‌ای</h3>
67
+ <p class="text-gray-600">همراهی با بهترین مربیان صنعت در طول مسیر یادگیری</p>
68
+ </div>
69
+ <div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition">
70
+ <div class="bg-primary-100 w-12 h-12 rounded-full flex items-center justify-center mb-4">
71
+ <i data-feather="award" class="text-primary w-6 h-6"></i>
72
+ </div>
73
+ <h3 class="text-xl font-semibold mb-2">گواهینامه معتبر</h3>
74
+ <p class="text-gray-600">دریافت مدرک معتبر پس از اتمام هر دوره</p>
75
+ </div>
76
+ </div>
77
+ </section>
78
+
79
+ <!-- Courses Preview -->
80
+ <section class="mb-16">
81
+ <div class="flex justify-between items-center mb-8">
82
+ <h2 class="text-3xl font-bold text-gray-900">دوره‌های آموزشی</h2>
83
+ <a href="/courses" class="text-primary hover:text-primary-600 font-medium flex items-center gap-2">
84
+ مشاهده همه
85
+ <i data-feather="arrow-left" class="w-4 h-4"></i>
86
+ </a>
87
+ </div>
88
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
89
+ <!-- Course Card 1 -->
90
+ <div class="bg-white rounded-xl shadow-md overflow-hidden hover:shadow-lg transition">
91
+ <img src="http://static.photos/technology/640x360/101" alt="Python Basics" class="w-full h-48 object-cover">
92
+ <div class="p-6">
93
+ <div class="flex justify-between items-start mb-2">
94
+ <h3 class="text-xl font-bold">پایتون مقدماتی</h3>
95
+ <span class="bg-primary-100 text-primary text-sm px-3 py-1 rounded-full">جدید</span>
96
+ </div>
97
+ <p class="text-gray-600 mb-4">آموزش اصول اولیه برنامه‌نویسی با پایتون برای شروع کار</p>
98
+ <div class="flex justify-between items-center">
99
+ <div class="flex items-center gap-1 text-yellow-500">
100
+ <i data-feather="star" class="w-4 h-4 fill-current"></i>
101
+ <span>4.9</span>
102
+ </div>
103
+ <a href="/course/python-basics" class="text-primary hover:text-primary-600 font-medium">مشاهده دوره</a>
104
+ </div>
105
+ </div>
106
+ </div>
107
+
108
+ <!-- Course Card 2 -->
109
+ <div class="bg-white rounded-xl shadow-md overflow-hidden hover:shadow-lg transition">
110
+ <img src="http://static.photos/technology/640x360/102" alt="Python OOP" class="w-full h-48 object-cover">
111
+ <div class="p-6">
112
+ <div class="flex justify-between items-start mb-2">
113
+ <h3 class="text-xl font-bold">برنامه‌نویسی شی‌گرا</h3>
114
+ <span class="bg-secondary-100 text-secondary text-sm px-3 py-1 rounded-full">پرفروش</span>
115
+ </div>
116
+ <p class="text-gray-600 mb-4">آموزش کامل مفاهیم شی‌گرایی در پایتون با مثال‌های عملی</p>
117
+ <div class="flex justify-between items-center">
118
+ <div class="flex items-center gap-1 text-yellow-500">
119
+ <i data-feather="star" class="w-4 h-4 fill-current"></i>
120
+ <span>4.8</span>
121
+ </div>
122
+ <a href="/course/python-oop" class="text-primary hover:text-primary-600 font-medium">مشاهده دوره</a>
123
+ </div>
124
+ </div>
125
+ </div>
126
+
127
+ <!-- Course Card 3 -->
128
+ <div class="bg-white rounded-xl shadow-md overflow-hidden hover:shadow-lg transition">
129
+ <img src="http://static.photos/technology/640x360/103" alt="Python Web" class="w-full h-48 object-cover">
130
+ <div class="p-6">
131
+ <div class="flex justify-between items-start mb-2">
132
+ <h3 class="text-xl font-bold">توسعه وب با پایتون</h3>
133
+ <span class="bg-primary-100 text-primary text-sm px-3 py-1 rounded-full">پرطرفدار</span>
134
+ </div>
135
+ <p class="text-gray-600 mb-4">یادگیری Django و Flask برای ساخت وب‌اپلیکیشن‌های حرفه‌ای</p>
136
+ <div class="flex justify-between items-center">
137
+ <div class="flex items-center gap-1 text-yellow-500">
138
+ <i data-feather="star" class="w-4 h-4 fill-current"></i>
139
+ <span>4.7</span>
140
+ </div>
141
+ <a href="/course/python-web" class="text-primary hover:text-primary-600 font-medium">مشاهده دوره</a>
142
+ </div>
143
+ </div>
144
+ </div>
145
+ </div>
146
+ </section>
147
+
148
+ <!-- Testimonials -->
149
+ <section class="mb-16">
150
+ <h2 class="text-3xl font-bold text-center text-gray-900 mb-12">نظرات دانشجویان</h2>
151
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
152
+ <div class="bg-white p-6 rounded-xl shadow-md">
153
+ <div class="flex items-center gap-4 mb-4">
154
+ <img src="http://static.photos/people/200x200/1" alt="User" class="w-12 h-12 rounded-full object-cover">
155
+ <div>
156
+ <h4 class="font-semibold">محمد رضایی</h4>
157
+ <div class="flex items-center gap-1 text-yellow-500">
158
+ <i data-feather="star" class="w-4 h-4 fill-current"></i>
159
+ <i data-feather="star" class="w-4 h-4 fill-current"></i>
160
+ <i data-feather="star" class="w-4 h-4 fill-current"></i>
161
+ <i data-feather="star" class="w-4 h-4 fill-current"></i>
162
+ <i data-feather="star" class="w-4 h-4 fill-current"></i>
163
+ </div>
164
+ </div>
165
+ </div>
166
+ <p class="text-gray-600">
167
+ بهترین پلتفرم برای یادگیری پایتون. دوره‌ها بسیار کامل و پروژه‌محور هستند. بعد از اتمام دوره مقدماتی توانستم در شرکت معتبری استخدام شوم.
168
+ </p>
169
+ </div>
170
+ <div class="bg-white p-6 rounded-xl shadow-md">
171
+ <div class="flex items-center gap-4 mb-4">
172
+ <img src="http://static.photos/people/200x200/2" alt="User" class="w-12 h-12 rounded-full object-cover">
173
+ <div>
174
+ <h4 class="font-semibold">فاطمه محمدی</h4>
175
+ <div class="flex items-center gap-1 text-yellow-500">
176
+ <i data-feather="star" class="w-4 h-4 fill-current"></i>
177
+ <i data-feather="star" class="w-4 h-4 fill-current"></i>
178
+ <i data-feather="star" class="w-4 h-4 fill-current"></i>
179
+ <i data-feather="star" class="w-4 h-4 fill-current"></i>
180
+ <i data-feather="star" class="w-4 h-4 fill-current"></i>
181
+ </div>
182
+ </div>
183
+ </div>
184
+ <p class="text-gray-600">
185
+ به عنوان کسی که هیچ پیشینه برنامه‌نویسی نداشتم، دوره‌های این سایت واقعا برای من مفید بود. پشتیبانی عالی و محتوای باکیفیت.
186
+ </p>
187
+ </div>
188
+ </div>
189
+ </section>
190
+
191
+ <!-- CTA Section -->
192
+ <section class="bg-gradient-to-r from-primary to-secondary text-white rounded-xl p-8 md:p-12 mb-16">
193
+ <div class="max-w-3xl mx-auto text-center">
194
+ <h2 class="text-3xl md:text-4xl font-bold mb-4">آماده شروع یادگیری هستید؟</h2>
195
+ <p class="text-lg mb-8 opacity-90">
196
+ همین حالا ثبت‌نام کنید و به جمع هزاران دانشجوی ما بپیوندید. اولین قدم برای تبدیل شدن به یک برنامه‌نویس حرفه‌ای را بردارید.
197
+ </p>
198
+ <a href="/register" class="bg-white text-primary hover:bg-gray-100 px-8 py-3 rounded-lg font-bold inline-block transition">
199
+ ثبت‌نام رایگان
200
+ </a>
201
+ </div>
202
+ </section>
203
+ </main>
204
+
205
+ <custom-footer></custom-footer>
206
+
207
+ <script src="components/navbar.js"></script>
208
+ <script src="components/footer.js"></script>
209
+ <script src="script.js"></script>
210
+ <script>
211
+ feather.replace();
212
+ </script>
213
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
214
+ </body>
215
+ </html>
script.js ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Main JavaScript File
2
+ document.addEventListener('DOMContentLoaded', function() {
3
+ // Initialize animations
4
+ const animateElements = document.querySelectorAll('.fade-in, .slide-up');
5
+
6
+ animateElements.forEach((el, index) => {
7
+ el.style.animationDelay = `${index * 0.1}s`;
8
+ });
9
+
10
+ // Language switcher functionality
11
+ const langSwitcher = document.getElementById('lang-switcher');
12
+ if (langSwitcher) {
13
+ langSwitcher.addEventListener('change', function() {
14
+ const selectedLang = this.value;
15
+ // In a real app, this would redirect to the selected language version
16
+ console.log(`Language changed to: ${selectedLang}`);
17
+ });
18
+ }
19
+
20
+ // Theme switcher functionality
21
+ const themeSwitcher = document.getElementById('theme-switcher');
22
+ if (themeSwitcher) {
23
+ themeSwitcher.addEventListener('change', function() {
24
+ const selectedTheme = this.value;
25
+ document.body.classList.toggle('dark', selectedTheme === 'dark');
26
+ localStorage.setItem('theme', selectedTheme);
27
+ });
28
+
29
+ // Check for saved theme preference
30
+ const savedTheme = localStorage.getItem('theme') || 'light';
31
+ themeSwitcher.value = savedTheme;
32
+ if (savedTheme === 'dark') {
33
+ document.body.classList.add('dark');
34
+ }
35
+ }
36
+ });
37
+
38
+ // API functions
39
+ async function fetchCourses() {
40
+ try {
41
+ const response = await fetch('/api/courses');
42
+ const data = await response.json();
43
+ return data;
44
+ } catch (error) {
45
+ console.error('Error fetching courses:', error);
46
+ return [];
47
+ }
48
+ }
49
+
50
+ // Form validation
51
+ function validateForm(form) {
52
+ let isValid = true;
53
+ const inputs = form.querySelectorAll('input[required], textarea[required]');
54
+
55
+ inputs.forEach(input => {
56
+ if (!input.value.trim()) {
57
+ isValid = false;
58
+ input.classList.add('border-red-500');
59
+ } else {
60
+ input.classList.remove('border-red-500');
61
+ }
62
+ });
63
+
64
+ return isValid;
65
+ }
style.css CHANGED
@@ -1,28 +1,60 @@
 
 
 
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
+ /* Custom Styles */
2
+ @import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');
3
+
4
  body {
5
+ font-family: 'Vazirmatn', sans-serif;
6
+ }
7
+
8
+ /* Custom Scrollbar */
9
+ ::-webkit-scrollbar {
10
+ width: 8px;
11
+ }
12
+
13
+ ::-webkit-scrollbar-track {
14
+ background: #f1f1f1;
15
  }
16
 
17
+ ::-webkit-scrollbar-thumb {
18
+ background: #3B82F6;
19
+ border-radius: 4px;
20
  }
21
 
22
+ ::-webkit-scrollbar-thumb:hover {
23
+ background: #2563EB;
 
 
 
24
  }
25
 
26
+ /* Animation Classes */
27
+ .fade-in {
28
+ animation: fadeIn 0.5s ease-in-out;
 
 
 
29
  }
30
 
31
+ @keyframes fadeIn {
32
+ from { opacity: 0; }
33
+ to { opacity: 1; }
34
  }
35
+
36
+ .slide-up {
37
+ animation: slideUp 0.5s ease-out;
38
+ }
39
+
40
+ @keyframes slideUp {
41
+ from {
42
+ opacity: 0;
43
+ transform: translateY(20px);
44
+ }
45
+ to {
46
+ opacity: 1;
47
+ transform: translateY(0);
48
+ }
49
+ }
50
+
51
+ /* Responsive Adjustments */
52
+ @media (max-width: 768px) {
53
+ .hero-text {
54
+ text-align: center;
55
+ }
56
+
57
+ .hero-buttons {
58
+ justify-content: center;
59
+ }
60
+ }