privateuserh commited on
Commit
4065cf0
·
verified ·
1 Parent(s): c550769

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +55 -0
index.html CHANGED
@@ -167,6 +167,61 @@
167
  });
168
  });
169
  </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
 
171
  </body>
172
  </html>
 
167
  });
168
  });
169
  </script>
170
+ <script>
171
+ // Paste this code inside the existing document.addEventListener('DOMContentLoaded', () => { ... });
172
+
173
+ // --- Points Calculator Elements ---
174
+ const toggleCalculatorBtn = document.getElementById('toggleCalculator');
175
+ const pointsCalculatorPanel = document.getElementById('pointsCalculatorPanel');
176
+ const closeCalculatorBtn = document.getElementById('closeCalculator');
177
+ const pointsResultDiv = document.getElementById('pointsResult');
178
+ const roleInputs = document.querySelectorAll('input[name="filmRole"]');
179
+
180
+ // --- Points Data ---
181
+ const pointsData = {
182
+ Financier: {
183
+ points: "50 Points",
184
+ description: "Financing 100% of the budget typically equals 50% of the net profits, representing the foundational 50/50 split between capital and production."
185
+ },
186
+ Producer: {
187
+ points: "10 Points",
188
+ description: "A lead producer typically receives points from the 'Producer's Pool,' rewarding their effort in developing and managing the entire project."
189
+ },
190
+ Director: {
191
+ points: "5 Points",
192
+ description: "An established director's creative leadership is often rewarded with points from the 'Talent Pool' in addition to their fee."
193
+ }
194
+ };
195
+
196
+ // --- Function to update the display ---
197
+ const updatePointsDisplay = () => {
198
+ const selectedRole = document.querySelector('input[name="filmRole"]:checked').value;
199
+ const data = pointsData[selectedRole];
200
+
201
+ pointsResultDiv.innerHTML = `
202
+ <h4 class="text-2xl font-bold text-blue-600">${data.points}</h4>
203
+ <p class="text-xs text-gray-600 mt-1">${data.description}</p>
204
+ `;
205
+ };
206
+
207
+ // --- Event Listeners ---
208
+ toggleCalculatorBtn.addEventListener('click', () => {
209
+ pointsCalculatorPanel.classList.toggle('hidden');
210
+ pointsCalculatorPanel.classList.toggle('opacity-0');
211
+ pointsCalculatorPanel.classList.toggle('translate-y-4');
212
+ // Update display when panel opens
213
+ updatePointsDisplay();
214
+ });
215
+
216
+ closeCalculatorBtn.addEventListener('click', () => {
217
+ pointsCalculatorPanel.classList.add('hidden', 'opacity-0', 'translate-y-4');
218
+ });
219
+
220
+ roleInputs.forEach(input => {
221
+ input.addEventListener('change', updatePointsDisplay);
222
+ });
223
+
224
+ </script>
225
 
226
  </body>
227
  </html>