support@sparkfll.tech
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/codes.json b/assets/codes.json
new file mode 100644
index 0000000..8cf83ea
--- /dev/null
+++ b/assets/codes.json
@@ -0,0 +1,3 @@
+{
+ "codes": ["code1", "code2", "code3"]
+}
\ No newline at end of file
diff --git a/assets/js/resources.js b/assets/js/resources.js
new file mode 100644
index 0000000..78f0893
--- /dev/null
+++ b/assets/js/resources.js
@@ -0,0 +1,52 @@
+// Check if codes exists in localStorage
+var codes = localStorage.getItem('codes');
+if (!codes) {
+ // If not, initialize it
+ codes = ["code1", "code2", "code3"];
+ localStorage.setItem('codes', JSON.stringify(codes));
+} else {
+ // If it does, parse it
+ codes = JSON.parse(codes);
+}
+
+document.querySelector('form').addEventListener('submit', function(e) {
+ e.preventDefault(); // Prevent the form from submitting normally
+
+ var enteredCode = document.getElementById('inputPassword2').value;
+
+ var codeIndex = codes.indexOf(enteredCode);
+ if (codeIndex !== -1) {
+ var reflowAuth = localStorage.getItem('reflowAuth');
+ var parsedReflowAuth = JSON.parse(reflowAuth);
+ var email = parsedReflowAuth.profile.email;
+ localStorage.setItem('resourceAccess', email);
+ codes.splice(codeIndex, 1); // Remove the used code from the array
+ // Update codes in localStorage
+ localStorage.setItem('codes', JSON.stringify(codes));
+ alert('Access granted!');
+ location.reload(); // Refresh the page
+ } else {
+ alert('Invalid code. Try again.');
+ }
+});
+
+window.onload = function() {
+ console.log('Page has loaded');
+ var resourceAccess = localStorage.getItem('resourceAccess');
+ var reflowAuth = localStorage.getItem('reflowAuth');
+ var parsedReflowAuth = JSON.parse(reflowAuth);
+
+ if (parsedReflowAuth) {
+ var email = parsedReflowAuth.profile.email;
+ // Rest of your code...
+ if (resourceAccess && resourceAccess === email) {
+ console.log('Access granted');
+ // Assuming the div has an id of 'hiddenDiv'
+ var hiddenDiv = document.getElementById('hiddenDiv');
+ console.log(hiddenDiv);
+ hiddenDiv.hidden = false; // Unhide the div
+ }
+ } else {
+ console.log('parsedReflowAuth is null');
+ }
+};
\ No newline at end of file
diff --git a/index.html b/index.html
index 2523cfa..8059c71 100644
--- a/index.html
+++ b/index.html
@@ -287,7 +287,7 @@
class="mb-4"
style="
font-family: 'Coolvetica Rg';
- font-size: larger;
+ font-size: 1.5em; /* Adjust this value to increase the font size */
color: white !important;
text-align: justify;
"
@@ -344,7 +344,7 @@
data-aos-duration="650"
style="
font-family: 'Coolvetica Rg';
- font-size: larger;
+ font-size: 1.5em; /* Adjust this value to increase the font size */
text-align: justify;
color: white !important;
"
@@ -1138,7 +1138,15 @@
>@2024spark
-
+
support@sparkfll.tech