Spaces:
Running
Running
Update index.html
Browse files- index.html +76 -214
index.html
CHANGED
|
@@ -29,251 +29,79 @@
|
|
| 29 |
}
|
| 30 |
</style>
|
| 31 |
</head>
|
| 32 |
-
|
|
|
|
| 33 |
|
| 34 |
<main class="flex-grow flex flex-col items-center justify-center p-4 text-center">
|
| 35 |
-
<h1 class="text-4xl md:text-
|
| 36 |
-
<p class="text-
|
| 37 |
-
|
| 38 |
-
<p class="text-md md:text-x0.10 text-gray-600 mt-2">1901 Avenue of the Stars / Silicon Beach /</p>
|
| 39 |
-
<p class="text-md md:text-x0.10 text-gray-600 mt-2">California Films Project is a private SaaS <b>Dev/. Inception date: 6.10.2025</b> 2025. Allrights reserved.</p>
|
| 40 |
-
<br>
|
| 41 |
-
<p class="text-md md:text-x0.05 text-gray-600 mt-1">§ 1.482-4 (b) (4)(5) §1.482-4(f)(3) § 6132 (h)(1) Section 798.3 Notice 2014-21</p>
|
| 42 |
-
|
| 43 |
</main>
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
<div class="fixed bottom-6 right-6 z-50">
|
| 46 |
<button id="togglePanel" class="bg-blue-600 hover:bg-blue-700 text-white w-16 h-16 rounded-full flex items-center justify-center shadow-lg transition-all duration-300 transform hover:scale-110">
|
| 47 |
<i class="fas fa-id-card text-2xl"></i>
|
| 48 |
</button>
|
| 49 |
</div>
|
| 50 |
|
| 51 |
-
<div
|
| 52 |
-
<
|
| 53 |
-
<
|
| 54 |
-
|
| 55 |
-
<button id="closePanel" class="text-gray-500 hover:text-gray-700">
|
| 56 |
-
<i class="fas fa-times"></i>
|
| 57 |
-
</button>
|
| 58 |
-
</div>
|
| 59 |
-
<p class="text-gray-600 mb-4 text-sm">Complete this form to participate. {Financier-or-Filmmaker} {Film-Stream-Television} {<> 1M Budgets} {New ROI Model} Your unique ID will serve as your placeholder.</p>
|
| 60 |
-
<form id="interestForm" class="space-y-4">
|
| 61 |
-
<div>
|
| 62 |
-
<label for="name" class="block text-sm font-medium text-gray-700 mb-1">Full Name</label>
|
| 63 |
-
<input type="text" id="name" name="name" required class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
| 64 |
-
</div>
|
| 65 |
-
<div>
|
| 66 |
-
<label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email</label>
|
| 67 |
-
<input type="email" id="email" name="email" required class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
| 68 |
-
</div>
|
| 69 |
-
<div>
|
| 70 |
-
<button type="submit" id="submitButton" class="w-full bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-md transition duration-300 flex items-center justify-center">
|
| 71 |
-
<span id="buttonText">Generate Unique ID</span>
|
| 72 |
-
<i id="buttonIcon" class="fas fa-arrow-right ml-2"></i>
|
| 73 |
-
</button>
|
| 74 |
-
</div>
|
| 75 |
-
</form>
|
| 76 |
-
</div>
|
| 77 |
-
<div id="successMessage" class="hidden text-center">
|
| 78 |
-
<div class="text-green-500">
|
| 79 |
-
<i class="fas fa-check-circle fa-3x"></i>
|
| 80 |
-
</div>
|
| 81 |
-
<h4 class="text-lg font-semibold text-gray-800 mt-3">Success!</h4>
|
| 82 |
-
<p class="text-gray-600 mt-1">Your unique ID is:</p>
|
| 83 |
-
<p id="uniqueIDDisplay" class="font-bold text-lg text-gray-800 bg-gray-100 rounded-md py-2 mt-2"></p>
|
| 84 |
-
<p class="mt-3 text-sm text-gray-500">We'll be in touch soon!</p>
|
| 85 |
-
<button id="closeSuccess" class="mt-4 w-full text-sm text-gray-600 hover:text-gray-800">Close</button>
|
| 86 |
-
</div>
|
| 87 |
</div>
|
| 88 |
|
| 89 |
-
<
|
| 90 |
-
|
| 91 |
-
// --- CONFIGURATION ---
|
| 92 |
-
const WORKER_URL = 'https://contact-form-api.aiagents.workers.dev/';
|
| 93 |
-
|
| 94 |
-
// --- STATE ---
|
| 95 |
-
let isSubmitting = false;
|
| 96 |
-
|
| 97 |
-
// --- ELEMENTS ---
|
| 98 |
-
const togglePanelBtn = document.getElementById('togglePanel');
|
| 99 |
-
const floatingPanel = document.getElementById('floatingPanel');
|
| 100 |
-
const closePanelBtn = document.getElementById('closePanel');
|
| 101 |
-
const interestForm = document.getElementById('interestForm');
|
| 102 |
-
const formContainer = document.getElementById('formContainer');
|
| 103 |
-
const successMessage = document.getElementById('successMessage');
|
| 104 |
-
const uniqueIDDisplay = document.getElementById('uniqueIDDisplay');
|
| 105 |
-
const closeSuccessBtn = document.getElementById('closeSuccess');
|
| 106 |
-
const submitButton = document.getElementById('submitButton');
|
| 107 |
-
const buttonText = document.getElementById('buttonText');
|
| 108 |
-
|
| 109 |
-
// --- FUNCTIONS ---
|
| 110 |
-
const showPanel = () => floatingPanel.classList.remove('hidden');
|
| 111 |
-
const hidePanel = () => floatingPanel.classList.add('hidden');
|
| 112 |
-
|
| 113 |
-
const generateUniqueId = () => 'CFP-' + Date.now().toString(36) + Math.random().toString(36).substring(2, 8).toUpperCase();
|
| 114 |
-
|
| 115 |
-
// --- EVENT LISTENERS ---
|
| 116 |
-
togglePanelBtn.addEventListener('click', showPanel);
|
| 117 |
-
closePanelBtn.addEventListener('click', hidePanel);
|
| 118 |
-
closeSuccessBtn.addEventListener('click', () => {
|
| 119 |
-
hidePanel();
|
| 120 |
-
setTimeout(() => {
|
| 121 |
-
formContainer.classList.remove('hidden');
|
| 122 |
-
successMessage.classList.add('hidden');
|
| 123 |
-
interestForm.reset();
|
| 124 |
-
}, 300);
|
| 125 |
-
});
|
| 126 |
-
|
| 127 |
-
interestForm.addEventListener('submit', async (e) => {
|
| 128 |
-
e.preventDefault();
|
| 129 |
-
|
| 130 |
-
// ** THE FIX IS HERE: If a submission is already happening, do nothing. **
|
| 131 |
-
if (isSubmitting) {
|
| 132 |
-
return;
|
| 133 |
-
}
|
| 134 |
-
|
| 135 |
-
isSubmitting = true;
|
| 136 |
-
submitButton.disabled = true;
|
| 137 |
-
buttonText.textContent = 'Submitting...';
|
| 138 |
-
|
| 139 |
-
const uniqueId = generateUniqueId();
|
| 140 |
-
const name = document.getElementById('name').value;
|
| 141 |
-
const email = document.getElementById('email').value;
|
| 142 |
-
|
| 143 |
-
try {
|
| 144 |
-
const response = await fetch(WORKER_URL, {
|
| 145 |
-
method: 'POST',
|
| 146 |
-
headers: { 'Content-Type': 'application/json' },
|
| 147 |
-
body: JSON.stringify({ name, email, uniqueId }),
|
| 148 |
-
});
|
| 149 |
-
|
| 150 |
-
if (!response.ok) {
|
| 151 |
-
const errorData = await response.json();
|
| 152 |
-
throw new Error(errorData.error || 'Submission failed');
|
| 153 |
-
}
|
| 154 |
-
|
| 155 |
-
uniqueIDDisplay.textContent = uniqueId;
|
| 156 |
-
formContainer.classList.add('hidden');
|
| 157 |
-
successMessage.classList.remove('hidden');
|
| 158 |
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
alert(`There was an error: ${error.message}`);
|
| 162 |
-
} finally {
|
| 163 |
-
// Re-enable the form for a new submission later
|
| 164 |
-
isSubmitting = false;
|
| 165 |
-
submitButton.disabled = false;
|
| 166 |
-
buttonText.textContent = 'Generate Unique ID';
|
| 167 |
-
}
|
| 168 |
-
});
|
| 169 |
-
});
|
| 170 |
-
|
| 171 |
-
// Paste this code inside the existing document.addEventListener('DOMContentLoaded', () => { ... });
|
| 172 |
|
|
|
|
|
|
|
| 173 |
|
|
|
|
| 174 |
document.addEventListener('DOMContentLoaded', () => {
|
| 175 |
|
| 176 |
// #################################################################
|
| 177 |
-
// ##
|
| 178 |
// #################################################################
|
| 179 |
-
const
|
| 180 |
-
if (
|
| 181 |
-
// ---
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
// --- ELEMENTS ---
|
| 186 |
-
const togglePanelBtn = document.getElementById('togglePanel');
|
| 187 |
-
const floatingPanel = document.getElementById('floatingPanel');
|
| 188 |
-
const closePanelBtn = document.getElementById('closePanel');
|
| 189 |
-
const formContainer = document.getElementById('formContainer');
|
| 190 |
-
const successMessage = document.getElementById('successMessage');
|
| 191 |
-
const uniqueIDDisplay = document.getElementById('uniqueIDDisplay');
|
| 192 |
-
const closeSuccessBtn = document.getElementById('closeSuccess');
|
| 193 |
-
const submitButton = document.getElementById('submitButton');
|
| 194 |
-
const buttonText = document.getElementById('buttonText');
|
| 195 |
-
|
| 196 |
-
const showInterestPanel = () => floatingPanel.classList.remove('hidden');
|
| 197 |
-
const hideInterestPanel = () => floatingPanel.classList.add('hidden');
|
| 198 |
-
const generateUniqueId = () => 'CFP-' + Date.now().toString(36) + Math.random().toString(36).substring(2, 8).toUpperCase();
|
| 199 |
-
|
| 200 |
-
togglePanelBtn.addEventListener('click', showInterestPanel);
|
| 201 |
-
closePanelBtn.addEventListener('click', hideInterestPanel);
|
| 202 |
-
closeSuccessBtn.addEventListener('click', () => {
|
| 203 |
-
hideInterestPanel();
|
| 204 |
-
setTimeout(() => {
|
| 205 |
-
formContainer.classList.remove('hidden');
|
| 206 |
-
successMessage.classList.add('hidden');
|
| 207 |
-
interestForm.reset();
|
| 208 |
-
}, 300);
|
| 209 |
-
});
|
| 210 |
-
|
| 211 |
-
interestForm.addEventListener('submit', async (e) => {
|
| 212 |
-
e.preventDefault();
|
| 213 |
-
if (isSubmitting) return;
|
| 214 |
-
|
| 215 |
-
isSubmitting = true;
|
| 216 |
-
submitButton.disabled = true;
|
| 217 |
-
buttonText.textContent = 'Submitting...';
|
| 218 |
-
const uniqueId = generateUniqueId();
|
| 219 |
-
const name = document.getElementById('name').value;
|
| 220 |
-
const email = document.getElementById('email').value;
|
| 221 |
-
|
| 222 |
-
try {
|
| 223 |
-
const response = await fetch(WORKER_URL, {
|
| 224 |
-
method: 'POST',
|
| 225 |
-
headers: { 'Content-Type': 'application/json' },
|
| 226 |
-
body: JSON.stringify({ name, email, uniqueId }),
|
| 227 |
-
});
|
| 228 |
-
if (!response.ok) {
|
| 229 |
-
const errorData = await response.json();
|
| 230 |
-
throw new Error(errorData.error || 'Submission failed');
|
| 231 |
-
}
|
| 232 |
-
uniqueIDDisplay.textContent = uniqueId;
|
| 233 |
-
formContainer.classList.add('hidden');
|
| 234 |
-
successMessage.classList.remove('hidden');
|
| 235 |
-
} catch (error) {
|
| 236 |
-
console.error('Error submitting form:', error);
|
| 237 |
-
alert(`There was an error: ${error.message}`);
|
| 238 |
-
} finally {
|
| 239 |
-
isSubmitting = false;
|
| 240 |
-
submitButton.disabled = false;
|
| 241 |
-
buttonText.textContent = 'Generate Unique ID';
|
| 242 |
-
}
|
| 243 |
-
});
|
| 244 |
}
|
| 245 |
|
|
|
|
| 246 |
// #################################################################
|
| 247 |
-
// ##
|
| 248 |
// #################################################################
|
| 249 |
const pointsCalculatorPanel = document.getElementById('pointsCalculatorPanel');
|
| 250 |
if (pointsCalculatorPanel) {
|
| 251 |
-
// --- ELEMENTS ---
|
| 252 |
const toggleCalculatorBtn = document.getElementById('toggleCalculator');
|
| 253 |
const closeCalculatorBtn = document.getElementById('closeCalculator');
|
| 254 |
const pointsResultDiv = document.getElementById('pointsResult');
|
| 255 |
const roleInputs = document.querySelectorAll('input[name="filmRole"]');
|
| 256 |
|
| 257 |
-
// --- POINTS DATA ---
|
| 258 |
const pointsData = {
|
| 259 |
-
Financier: {
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
},
|
| 263 |
-
Producer: {
|
| 264 |
-
points: "10 Points",
|
| 265 |
-
description: "A lead producer typically receives points from the 'Producer's Pool,' rewarding their effort in developing and managing the entire project."
|
| 266 |
-
},
|
| 267 |
-
Director: {
|
| 268 |
-
points: "5 Points",
|
| 269 |
-
description: "An established director's creative leadership is often rewarded with points from the 'Talent Pool' in addition to their fee."
|
| 270 |
-
}
|
| 271 |
};
|
| 272 |
|
| 273 |
const updatePointsDisplay = () => {
|
| 274 |
const selectedRole = document.querySelector('input[name="filmRole"]:checked').value;
|
| 275 |
const data = pointsData[selectedRole];
|
| 276 |
-
pointsResultDiv
|
|
|
|
|
|
|
| 277 |
};
|
| 278 |
|
| 279 |
toggleCalculatorBtn.addEventListener('click', () => {
|
|
@@ -283,17 +111,51 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
| 283 |
updatePointsDisplay();
|
| 284 |
});
|
| 285 |
|
| 286 |
-
closeCalculatorBtn
|
| 287 |
-
|
| 288 |
-
|
|
|
|
|
|
|
| 289 |
|
| 290 |
roleInputs.forEach(input => {
|
| 291 |
input.addEventListener('change', updatePointsDisplay);
|
| 292 |
});
|
| 293 |
}
|
| 294 |
-
});
|
| 295 |
|
| 296 |
-
</script>
|
| 297 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 298 |
</body>
|
|
|
|
| 299 |
</html>
|
|
|
|
| 29 |
}
|
| 30 |
</style>
|
| 31 |
</head>
|
| 32 |
+
|
| 33 |
+
<body class="min-h-screen bg-gray-50 flex flex-col">
|
| 34 |
|
| 35 |
<main class="flex-grow flex flex-col items-center justify-center p-4 text-center">
|
| 36 |
+
<h1 class="text-4xl md:text-7xl font-bold mb-4 gradient-text">California Films Project</h1>
|
| 37 |
+
<p class="text-lg md:text-2xl text-gray-600">Film Tax Incentives / Benefits / Blockchain Token Project</p>
|
| 38 |
+
<p class="text-md md:text-xl text-gray-600 mt-2">1901 Avenue of the Stars / Silicon Beach</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
</main>
|
| 40 |
|
| 41 |
+
<div class="fixed bottom-6 left-6 z-50">
|
| 42 |
+
<button id="togglePrivacy" class="bg-gray-700 hover:bg-gray-800 text-white w-16 h-16 rounded-full flex items-center justify-center shadow-lg transition-all duration-300 transform hover:scale-110">
|
| 43 |
+
<i class="fas fa-shield-alt text-2xl"></i>
|
| 44 |
+
</button>
|
| 45 |
+
</div>
|
| 46 |
+
|
| 47 |
<div class="fixed bottom-6 right-6 z-50">
|
| 48 |
<button id="togglePanel" class="bg-blue-600 hover:bg-blue-700 text-white w-16 h-16 rounded-full flex items-center justify-center shadow-lg transition-all duration-300 transform hover:scale-110">
|
| 49 |
<i class="fas fa-id-card text-2xl"></i>
|
| 50 |
</button>
|
| 51 |
</div>
|
| 52 |
|
| 53 |
+
<div class="fixed bottom-6 right-24 z-50">
|
| 54 |
+
<button id="toggleCalculator" class="bg-green-600 hover:bg-green-700 text-white w-16 h-16 rounded-full flex items-center justify-center shadow-lg transition-all duration-300 transform hover:scale-110">
|
| 55 |
+
<i class="fas fa-percent text-2xl"></i>
|
| 56 |
+
</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
</div>
|
| 58 |
|
| 59 |
+
<div id="floatingPanel" class="fixed bottom-24 right-6 w-80 bg-white rounded-xl shadow-xl p-6 hidden opacity-0 transition-all duration-300 transform translate-y-4 z-40">
|
| 60 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
|
| 62 |
+
<div id="pointsCalculatorPanel" class="fixed bottom-24 right-6 w-80 md:w-96 bg-white rounded-xl shadow-xl p-6 hidden opacity-0 transition-all duration-300 transform translate-y-4 z-40">
|
| 63 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
+
<div id="privacyPanel" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 hidden opacity-0 z-50 transition-opacity duration-300">
|
| 66 |
+
</div>
|
| 67 |
|
| 68 |
+
<script>
|
| 69 |
document.addEventListener('DOMContentLoaded', () => {
|
| 70 |
|
| 71 |
// #################################################################
|
| 72 |
+
// ## PANEL 1: "INDICATE YOUR INTEREST"
|
| 73 |
// #################################################################
|
| 74 |
+
const interestFormPanel = document.getElementById('floatingPanel');
|
| 75 |
+
if (interestFormPanel) {
|
| 76 |
+
// --- NOTE: This panel's content should be filled in from your previous working code ---
|
| 77 |
+
// This is just the placeholder logic to ensure it runs
|
| 78 |
+
const toggleInterestBtn = document.getElementById('togglePanel');
|
| 79 |
+
toggleInterestBtn.addEventListener('click', () => alert('Interest Panel Logic Here'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
}
|
| 81 |
|
| 82 |
+
|
| 83 |
// #################################################################
|
| 84 |
+
// ## PANEL 2: "POINTS CALCULATOR"
|
| 85 |
// #################################################################
|
| 86 |
const pointsCalculatorPanel = document.getElementById('pointsCalculatorPanel');
|
| 87 |
if (pointsCalculatorPanel) {
|
|
|
|
| 88 |
const toggleCalculatorBtn = document.getElementById('toggleCalculator');
|
| 89 |
const closeCalculatorBtn = document.getElementById('closeCalculator');
|
| 90 |
const pointsResultDiv = document.getElementById('pointsResult');
|
| 91 |
const roleInputs = document.querySelectorAll('input[name="filmRole"]');
|
| 92 |
|
|
|
|
| 93 |
const pointsData = {
|
| 94 |
+
Financier: { points: "50 Points", description: "Financing 100% of the budget typically equals 50% of the net profits, representing the foundational 50/50 split between capital and production." },
|
| 95 |
+
Producer: { points: "10 Points", description: "A lead producer typically receives points from the 'Producer's Pool,' rewarding their effort in developing and managing the entire project." },
|
| 96 |
+
Director: { points: "5 Points", description: "An established director's creative leadership is often rewarded with points from the 'Talent Pool' in addition to their fee." }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
};
|
| 98 |
|
| 99 |
const updatePointsDisplay = () => {
|
| 100 |
const selectedRole = document.querySelector('input[name="filmRole"]:checked').value;
|
| 101 |
const data = pointsData[selectedRole];
|
| 102 |
+
if (pointsResultDiv) {
|
| 103 |
+
pointsResultDiv.innerHTML = `<h4 class="text-2xl font-bold text-blue-600">${data.points}</h4><p class="text-xs text-gray-600 mt-1">${data.description}</p>`;
|
| 104 |
+
}
|
| 105 |
};
|
| 106 |
|
| 107 |
toggleCalculatorBtn.addEventListener('click', () => {
|
|
|
|
| 111 |
updatePointsDisplay();
|
| 112 |
});
|
| 113 |
|
| 114 |
+
if(closeCalculatorBtn) {
|
| 115 |
+
closeCalculatorBtn.addEventListener('click', () => {
|
| 116 |
+
pointsCalculatorPanel.classList.add('hidden', 'opacity-0', 'translate-y-4');
|
| 117 |
+
});
|
| 118 |
+
}
|
| 119 |
|
| 120 |
roleInputs.forEach(input => {
|
| 121 |
input.addEventListener('change', updatePointsDisplay);
|
| 122 |
});
|
| 123 |
}
|
|
|
|
| 124 |
|
|
|
|
| 125 |
|
| 126 |
+
// #################################################################
|
| 127 |
+
// ## PANEL 3: PRIVACY POLICY
|
| 128 |
+
// #################################################################
|
| 129 |
+
const privacyPanel = document.getElementById('privacyPanel');
|
| 130 |
+
if (privacyPanel) {
|
| 131 |
+
const togglePrivacyBtn = document.getElementById('togglePrivacy');
|
| 132 |
+
const closePrivacyBtn = document.getElementById('closePrivacy');
|
| 133 |
+
const acceptPrivacyBtn = document.getElementById('acceptPrivacy');
|
| 134 |
+
|
| 135 |
+
const openPrivacyPanel = () => {
|
| 136 |
+
privacyPanel.classList.remove('hidden');
|
| 137 |
+
setTimeout(() => { privacyPanel.classList.remove('opacity-0'); privacyPanel.classList.add('opacity-100'); }, 10);
|
| 138 |
+
};
|
| 139 |
+
|
| 140 |
+
const closePrivacyPanel = () => {
|
| 141 |
+
privacyPanel.classList.remove('opacity-100');
|
| 142 |
+
privacyPanel.classList.add('opacity-0');
|
| 143 |
+
setTimeout(() => privacyPanel.classList.add('hidden'), 300);
|
| 144 |
+
};
|
| 145 |
+
|
| 146 |
+
togglePrivacyBtn.addEventListener('click', openPrivacyPanel);
|
| 147 |
+
closePrivacyBtn.addEventListener('click', closePrivacyPanel);
|
| 148 |
+
acceptPrivacyBtn.addEventListener('click', closePrivacyPanel);
|
| 149 |
+
|
| 150 |
+
privacyPanel.addEventListener('click', (event) => {
|
| 151 |
+
if (event.target === privacyPanel) {
|
| 152 |
+
closePrivacyPanel();
|
| 153 |
+
}
|
| 154 |
+
});
|
| 155 |
+
}
|
| 156 |
+
});
|
| 157 |
+
</script>
|
| 158 |
+
|
| 159 |
</body>
|
| 160 |
+
|
| 161 |
</html>
|