itamarlifshitz commited on
Commit
6110ac3
·
verified ·
1 Parent(s): 33b5019

שיש אופציה של מבחן / עבודה חדשה ואז רק אפשר להעלות קבצים וזה מסדר לך את זה לפי איך שקראת לעבודה אחרי שהעלת את הקבצים אתה בוחר מה בא לך שהוא יעשה (כרטיסיות עם שאלות/מבחנים/סיכומים ועוד) נוסף על כך תעשה שלםני שאפשר לעשות משהו צריך להירשם ולרשום את המייל וכל פעם שמישהו נרשם הוא מקבל למייל הודעה ( ברוך הבא לstudy mate בנוסף תוריד את התמונה ששמת ותעצב את האתר שיהיה ממש מושקע אבל צבעים רגועים

Browse files
Files changed (6) hide show
  1. components/navbar.js +2 -2
  2. components/register-form.js +116 -0
  3. index.html +37 -7
  4. register.html +3 -26
  5. script.js +27 -10
  6. style.css +94 -21
components/navbar.js CHANGED
@@ -64,8 +64,8 @@ class CustomNavbar extends HTMLElement {
64
  </style>
65
  <nav>
66
  <div class="logo">
67
- <img src="http://static.photos/education/200x200/1" alt="StudyMate Logo">
68
- <span>StudyMate</span>
69
  </div>
70
  <div class="nav-links">
71
  <a href="/" class="active">בית</a>
 
64
  </style>
65
  <nav>
66
  <div class="logo">
67
+ <i class="fas fa-graduation-cap" style="font-size: 2rem;"></i>
68
+ <span>StudyMate</span>
69
  </div>
70
  <div class="nav-links">
71
  <a href="/" class="active">בית</a>
components/register-form.js ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class RegisterForm extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ .register-form {
7
+ max-width: 500px;
8
+ margin: 0 auto;
9
+ padding: 2rem;
10
+ background: var(--card-bg);
11
+ border-radius: 16px;
12
+ box-shadow: 0 4px 6px rgba(0,0,0,0.05);
13
+ }
14
+
15
+ .form-group {
16
+ margin-bottom: 1.5rem;
17
+ }
18
+
19
+ label {
20
+ display: block;
21
+ margin-bottom: 0.5rem;
22
+ font-weight: 600;
23
+ }
24
+
25
+ input {
26
+ width: 100%;
27
+ padding: 12px;
28
+ border: 1px solid #ddd;
29
+ border-radius: 8px;
30
+ font-family: inherit;
31
+ }
32
+
33
+ .btn {
34
+ width: 100%;
35
+ padding: 12px;
36
+ border-radius: 8px;
37
+ border: none;
38
+ font-weight: bold;
39
+ cursor: pointer;
40
+ background: var(--primary);
41
+ color: white;
42
+ transition: background 0.3s;
43
+ }
44
+
45
+ .btn:hover {
46
+ background: var(--primary-light);
47
+ }
48
+
49
+ .login-link {
50
+ text-align: center;
51
+ margin-top: 1rem;
52
+ }
53
+
54
+ .login-link a {
55
+ color: var(--primary);
56
+ text-decoration: none;
57
+ }
58
+ </style>
59
+ <div class="register-form">
60
+ <h2>הרשמה</h2>
61
+ <form id="registerForm">
62
+ <div class="form-group">
63
+ <label for="name">שם מלא</label>
64
+ <input type="text" id="name" required>
65
+ </div>
66
+ <div class="form-group">
67
+ <label for="email">אימייל</label>
68
+ <input type="email" id="email" required>
69
+ </div>
70
+ <div class="form-group">
71
+ <label for="password">סיסמה</label>
72
+ <input type="password" id="password" required>
73
+ </div>
74
+ <div class="form-group">
75
+ <label for="confirm-password">אימות סיסמה</label>
76
+ <input type="password" id="confirm-password" required>
77
+ </div>
78
+ <button type="submit" class="btn">הרשם</button>
79
+ </form>
80
+ <div class="login-link">
81
+ כבר יש לך חשבון? <a href="/login.html">התחבר כאן</a>
82
+ </div>
83
+ </div>
84
+ `;
85
+
86
+ this.shadowRoot.getElementById('registerForm').addEventListener('submit', async (e) => {
87
+ e.preventDefault();
88
+
89
+ const email = this.shadowRoot.getElementById('email').value;
90
+ const password = this.shadowRoot.getElementById('password').value;
91
+
92
+ // Send welcome email
93
+ await fetch('https://api.emailjs.com/api/v1.0/email/send', {
94
+ method: 'POST',
95
+ headers: {
96
+ 'Content-Type': 'application/json',
97
+ },
98
+ body: JSON.stringify({
99
+ service_id: 'YOUR_SERVICE_ID',
100
+ template_id: 'YOUR_TEMPLATE_ID',
101
+ user_id: 'YOUR_USER_ID',
102
+ template_params: {
103
+ to_email: email,
104
+ subject: 'ברוך הבא ל-StudyMate!',
105
+ message: 'תודה שנרשמת ל-StudyMate! אנו שמחים להצטרפותך למערכת.'
106
+ }
107
+ })
108
+ });
109
+
110
+ // Register user (simplified)
111
+ alert('ההרשמה בוצעה בהצלחה! נא לבדוק את האימייל שלך להודעת ברוך הבא.');
112
+ });
113
+ }
114
+ }
115
+
116
+ customElements.define('register-form', RegisterForm);
index.html CHANGED
@@ -15,24 +15,54 @@
15
  <h1>StudyMate - הפיכת הלמידה לחכמה יותר</h1>
16
  <p>העלה חומרי לימוד וקבל סיכומים, מבחנים וכרטיסיות לימוד - הכל אוטומטי!</p>
17
  </section>
18
-
19
  <div class="study-tools">
20
  <div class="tool-card">
21
- <h2><i class="fas fa-file-upload"></i> העלאת קבצים</h2>
 
 
 
 
 
 
 
 
 
 
 
 
22
  <div class="upload-area" id="dropZone">
23
- <input type="file" id="fileInput" multiple accept=".pdf,.docx,.txt">
24
  <label for="fileInput" class="upload-btn">
25
  <i class="fas fa-cloud-upload-alt"></i> גרור קבצים או לחץ לבחירה
26
  </label>
27
  <div class="file-list" id="fileList"></div>
28
  </div>
29
- <textarea id="studyGoal" placeholder="מה המטרה הלימודית? (למשל: הכנה למבחן בתנ״ך)"></textarea>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  <button class="btn primary" id="processBtn">
31
- <i class="fas fa-magic"></i> צור חומרי לימוד
32
  </button>
33
  </div>
34
-
35
- <div class="tool-card">
36
  <h2><i class="fas fa-book"></i> חומרי הלימוד שלי</h2>
37
  <div class="tabs">
38
  <button class="tab-btn active" data-tab="notes">סיכומים</button>
 
15
  <h1>StudyMate - הפיכת הלמידה לחכמה יותר</h1>
16
  <p>העלה חומרי לימוד וקבל סיכומים, מבחנים וכרטיסיות לימוד - הכל אוטומטי!</p>
17
  </section>
 
18
  <div class="study-tools">
19
  <div class="tool-card">
20
+ <h2><i class="fas fa-file-upload"></i> יצירת פרויקט חדש</h2>
21
+ <div class="project-type-selector">
22
+ <button class="project-type active" data-type="exam">
23
+ <i class="fas fa-file-alt"></i> מבחן
24
+ </button>
25
+ <button class="project-type" data-type="assignment">
26
+ <i class="fas fa-tasks"></i> עבודה
27
+ </button>
28
+ <button class="project-type" data-type="presentation">
29
+ <i class="fas fa-chalkboard-teacher"></i> מצגת
30
+ </button>
31
+ </div>
32
+ <input type="text" id="projectName" placeholder="שם הפרויקט (למשל: מבחן בתנ״ך)">
33
  <div class="upload-area" id="dropZone">
34
+ <input type="file" id="fileInput" multiple accept=".pdf,.docx,.txt,.ppt,.pptx">
35
  <label for="fileInput" class="upload-btn">
36
  <i class="fas fa-cloud-upload-alt"></i> גרור קבצים או לחץ לבחירה
37
  </label>
38
  <div class="file-list" id="fileList"></div>
39
  </div>
40
+ <div class="output-options">
41
+ <h3>מה תרצו לקבל?</h3>
42
+ <div class="options-grid">
43
+ <label class="option-checkbox">
44
+ <input type="checkbox" name="output" value="summary" checked>
45
+ <span>סיכומים</span>
46
+ </label>
47
+ <label class="option-checkbox">
48
+ <input type="checkbox" name="output" value="flashcards" checked>
49
+ <span>כרטיסיות</span>
50
+ </label>
51
+ <label class="option-checkbox">
52
+ <input type="checkbox" name="output" value="quiz">
53
+ <span>מבחן תרגול</span>
54
+ </label>
55
+ <label class="option-checkbox">
56
+ <input type="checkbox" name="output" value="presentation">
57
+ <span>מצגת</span>
58
+ </label>
59
+ </div>
60
+ </div>
61
  <button class="btn primary" id="processBtn">
62
+ <i class="fas fa-magic"></i> צור פרויקט
63
  </button>
64
  </div>
65
+ <div class="tool-card">
 
66
  <h2><i class="fas fa-book"></i> חומרי הלימוד שלי</h2>
67
  <div class="tabs">
68
  <button class="tab-btn active" data-tab="notes">סיכומים</button>
register.html CHANGED
@@ -11,35 +11,12 @@
11
  <custom-navbar></custom-navbar>
12
 
13
  <main class="container">
14
- <section class="auth-form">
15
- <h1>הרשמה</h1>
16
- <form>
17
- <div class="form-group">
18
- <label for="name">שם מלא</label>
19
- <input type="text" id="name" required>
20
- </div>
21
- <div class="form-group">
22
- <label for="email">אימייל</label>
23
- <input type="email" id="email" required>
24
- </div>
25
- <div class="form-group">
26
- <label for="password">סיסמה</label>
27
- <input type="password" id="password" required>
28
- </div>
29
- <div class="form-group">
30
- <label for="confirm-password">אימות סיסמה</label>
31
- <input type="password" id="confirm-password" required>
32
- </div>
33
- <button type="submit" class="btn primary">הרשם</button>
34
- </form>
35
- <p>כבר יש לך חשבון? <a href="/login.html">התחבר כאן</a></p>
36
- </section>
37
  </main>
38
-
39
- <custom-footer></custom-footer>
40
-
41
  <script src="components/navbar.js"></script>
42
  <script src="components/footer.js"></script>
 
43
  <script src="script.js"></script>
44
  </body>
45
  </html>
 
11
  <custom-navbar></custom-navbar>
12
 
13
  <main class="container">
14
+ <register-form></register-form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  </main>
16
+ <custom-footer></custom-footer>
 
 
17
  <script src="components/navbar.js"></script>
18
  <script src="components/footer.js"></script>
19
+ <script src="components/register-form.js"></script>
20
  <script src="script.js"></script>
21
  </body>
22
  </html>
script.js CHANGED
@@ -1,12 +1,21 @@
1
  ```javascript
2
  document.addEventListener('DOMContentLoaded', () => {
3
- // File upload handling
4
  const fileInput = document.getElementById('fileInput');
5
  const fileList = document.getElementById('fileList');
6
  const dropZone = document.getElementById('dropZone');
7
  const processBtn = document.getElementById('processBtn');
 
 
8
 
9
- // Tab switching
 
 
 
 
 
 
 
10
  const tabBtns = document.querySelectorAll('.tab-btn');
11
  tabBtns.forEach(btn => {
12
  btn.addEventListener('click', () => {
@@ -58,18 +67,16 @@ document.addEventListener('DOMContentLoaded', () => {
58
  fileInput.addEventListener('change', function() {
59
  handleFiles(this.files);
60
  });
61
-
62
  function handleFiles(files) {
63
  fileList.innerHTML = '';
64
  if (files.length === 0) return;
65
 
66
  for (let i = 0; i < files.length; i++) {
67
  const file = files[i];
68
- if (!file.type.match('application/pdf|application/vnd.openxmlformats-officedocument.wordprocessingml.document|text/plain')) {
69
  continue;
70
  }
71
-
72
- const fileItem = document.createElement('div');
73
  fileItem.className = 'file-item';
74
  fileItem.innerHTML = `
75
  <span>${file.name}</span>
@@ -98,13 +105,23 @@ document.addEventListener('DOMContentLoaded', () => {
98
  return;
99
  }
100
 
101
- const goal = document.getElementById('studyGoal').value.trim();
102
- if (!goal) {
103
- alert('אנא הזן מטרה לימודית');
104
  return;
105
  }
106
 
107
- // Show loading state
 
 
 
 
 
 
 
 
 
 
108
  const originalText = processBtn.innerHTML;
109
  processBtn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> מעבד...';
110
  processBtn.disabled = true;
 
1
  ```javascript
2
  document.addEventListener('DOMContentLoaded', () => {
3
+ // Project creation handling
4
  const fileInput = document.getElementById('fileInput');
5
  const fileList = document.getElementById('fileList');
6
  const dropZone = document.getElementById('dropZone');
7
  const processBtn = document.getElementById('processBtn');
8
+ const projectName = document.getElementById('projectName');
9
+ const projectTypes = document.querySelectorAll('.project-type');
10
 
11
+ // Project type selection
12
+ projectTypes.forEach(type => {
13
+ type.addEventListener('click', () => {
14
+ projectTypes.forEach(t => t.classList.remove('active'));
15
+ type.classList.add('active');
16
+ });
17
+ });
18
+ // Tab switching
19
  const tabBtns = document.querySelectorAll('.tab-btn');
20
  tabBtns.forEach(btn => {
21
  btn.addEventListener('click', () => {
 
67
  fileInput.addEventListener('change', function() {
68
  handleFiles(this.files);
69
  });
 
70
  function handleFiles(files) {
71
  fileList.innerHTML = '';
72
  if (files.length === 0) return;
73
 
74
  for (let i = 0; i < files.length; i++) {
75
  const file = files[i];
76
+ if (!file.type.match('application/pdf|application/vnd.openxmlformats-officedocument.wordprocessingml.document|text/plain|application/vnd.ms-powerpoint|application/vnd.openxmlformats-officedocument.presentationml.presentation')) {
77
  continue;
78
  }
79
+ const fileItem = document.createElement('div');
 
80
  fileItem.className = 'file-item';
81
  fileItem.innerHTML = `
82
  <span>${file.name}</span>
 
105
  return;
106
  }
107
 
108
+ const projectNameValue = projectName.value.trim();
109
+ if (!projectNameValue) {
110
+ alert('אנא הזן שם לפרויקט');
111
  return;
112
  }
113
 
114
+ // Get selected output options
115
+ const outputOptions = [];
116
+ document.querySelectorAll('input[name="output"]:checked').forEach(checkbox => {
117
+ outputOptions.push(checkbox.value);
118
+ });
119
+
120
+ if (outputOptions.length === 0) {
121
+ alert('אנא בחר לפחות אפשרות פלט אחת');
122
+ return;
123
+ }
124
+ // Show loading state
125
  const originalText = processBtn.innerHTML;
126
  processBtn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> מעבד...';
127
  processBtn.disabled = true;
style.css CHANGED
@@ -1,43 +1,44 @@
 
1
  :root {
2
- --primary: #4f46e5;
3
- --primary-light: #6366f1;
4
- --secondary: #7c3aed;
5
- --dark: #1e293b;
6
- --light: #f8fafc;
7
- --gray: #94a3b8;
8
- --success: #10b981;
9
- --warning: #f59e0b;
10
- --danger: #ef4444;
 
 
 
11
  }
12
-
13
  * {
14
  box-sizing: border-box;
15
  margin: 0;
16
  padding: 0;
17
  }
18
-
19
  body {
20
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
21
- background-color: #f1f5f9;
22
  color: var(--dark);
23
  direction: rtl;
 
24
  }
25
-
26
  .container {
27
  max-width: 1200px;
28
  margin: 0 auto;
29
  padding: 20px;
30
  }
31
-
32
  .hero {
33
  text-align: center;
34
- padding: 60px 20px;
35
  background: linear-gradient(135deg, var(--primary), var(--secondary));
36
  color: white;
37
  border-radius: 16px;
38
  margin-bottom: 40px;
 
39
  }
40
-
41
  .hero h1 {
42
  font-size: 2.5rem;
43
  margin-bottom: 20px;
@@ -60,14 +61,18 @@ body {
60
  grid-template-columns: 1fr;
61
  }
62
  }
63
-
64
  .tool-card {
65
- background: white;
66
  border-radius: 16px;
67
- padding: 25px;
68
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
 
69
  }
70
 
 
 
 
 
71
  .tool-card h2 {
72
  margin-bottom: 20px;
73
  display: flex;
@@ -75,17 +80,85 @@ body {
75
  gap: 10px;
76
  color: var(--primary);
77
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
 
79
  .upload-area {
80
  border: 2px dashed var(--gray);
81
  border-radius: 12px;
82
- padding: 30px;
83
  text-align: center;
84
  margin-bottom: 20px;
85
  transition: all 0.3s;
86
  position: relative;
 
87
  }
88
-
89
  .upload-area:hover {
90
  border-color: var(--primary);
91
  }
 
1
+
2
  :root {
3
+ --primary: #5d5fef;
4
+ --primary-light: #8183f2;
5
+ --secondary: #6d8bff;
6
+ --dark: #2d3748;
7
+ --light: #f7fafc;
8
+ --gray: #a0aec0;
9
+ --success: #48bb78;
10
+ --warning: #ed8936;
11
+ --danger: #f56565;
12
+ --accent: #9f7aea;
13
+ --background: #f8f9fa;
14
+ --card-bg: #ffffff;
15
  }
 
16
  * {
17
  box-sizing: border-box;
18
  margin: 0;
19
  padding: 0;
20
  }
 
21
  body {
22
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
23
+ background-color: var(--background);
24
  color: var(--dark);
25
  direction: rtl;
26
+ line-height: 1.6;
27
  }
 
28
  .container {
29
  max-width: 1200px;
30
  margin: 0 auto;
31
  padding: 20px;
32
  }
 
33
  .hero {
34
  text-align: center;
35
+ padding: 80px 20px;
36
  background: linear-gradient(135deg, var(--primary), var(--secondary));
37
  color: white;
38
  border-radius: 16px;
39
  margin-bottom: 40px;
40
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
41
  }
 
42
  .hero h1 {
43
  font-size: 2.5rem;
44
  margin-bottom: 20px;
 
61
  grid-template-columns: 1fr;
62
  }
63
  }
 
64
  .tool-card {
65
+ background: var(--card-bg);
66
  border-radius: 16px;
67
+ padding: 30px;
68
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
69
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
70
  }
71
 
72
+ .tool-card:hover {
73
+ transform: translateY(-5px);
74
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
75
+ }
76
  .tool-card h2 {
77
  margin-bottom: 20px;
78
  display: flex;
 
80
  gap: 10px;
81
  color: var(--primary);
82
  }
83
+ .project-type-selector {
84
+ display: flex;
85
+ gap: 10px;
86
+ margin-bottom: 20px;
87
+ }
88
+
89
+ .project-type {
90
+ flex: 1;
91
+ padding: 12px;
92
+ border: 1px solid var(--gray);
93
+ border-radius: 8px;
94
+ background: none;
95
+ cursor: pointer;
96
+ transition: all 0.3s;
97
+ display: flex;
98
+ flex-direction: column;
99
+ align-items: center;
100
+ gap: 5px;
101
+ }
102
+
103
+ .project-type.active {
104
+ background: var(--primary);
105
+ color: white;
106
+ border-color: var(--primary);
107
+ }
108
+
109
+ .project-type i {
110
+ font-size: 1.5rem;
111
+ }
112
+
113
+ #projectName {
114
+ width: 100%;
115
+ padding: 12px;
116
+ border: 1px solid #ddd;
117
+ border-radius: 8px;
118
+ margin-bottom: 20px;
119
+ font-family: inherit;
120
+ }
121
+
122
+ .output-options {
123
+ margin: 20px 0;
124
+ }
125
+
126
+ .output-options h3 {
127
+ margin-bottom: 15px;
128
+ color: var(--dark);
129
+ }
130
+
131
+ .options-grid {
132
+ display: grid;
133
+ grid-template-columns: repeat(2, 1fr);
134
+ gap: 10px;
135
+ }
136
+
137
+ .option-checkbox {
138
+ display: flex;
139
+ align-items: center;
140
+ gap: 8px;
141
+ padding: 10px;
142
+ background: var(--light);
143
+ border-radius: 8px;
144
+ cursor: pointer;
145
+ transition: background 0.3s;
146
+ }
147
+
148
+ .option-checkbox:hover {
149
+ background: #e2e8f0;
150
+ }
151
 
152
  .upload-area {
153
  border: 2px dashed var(--gray);
154
  border-radius: 12px;
155
+ padding: 40px;
156
  text-align: center;
157
  margin-bottom: 20px;
158
  transition: all 0.3s;
159
  position: relative;
160
+ background: var(--light);
161
  }
 
162
  .upload-area:hover {
163
  border-color: var(--primary);
164
  }