From 8fba33176817055f19fd9305d42db5a0298ede9a Mon Sep 17 00:00:00 2001 From: Koala <76986040+Koala3353@users.noreply.github.com> Date: Fri, 2 Feb 2024 17:01:57 +0800 Subject: [PATCH] Add files via upload --- 404.html | 178 +++++++++--- assets/codes.json | 3 + assets/js/resources.js | 52 ++++ index.html | 23 +- product-page.html | 275 +++++++++---------- resources/arduino/videos/arduino-video1.html | 178 +++++++++--- resources/arduino/videos/arduino-video2.html | 178 +++++++++--- resources/arduino/videos/arduino-video3.html | 178 +++++++++--- resources/arduino/videos/arduinovids.html | 29 +- resources/resources.html | 217 +++++++++++---- reviews.html | 176 +++++++++--- settings.html | 178 +++++++++--- shopping-cart.html | 166 ++++++++--- specific-product.html | 178 +++++++++--- 14 files changed, 1489 insertions(+), 520 deletions(-) create mode 100644 assets/codes.json create mode 100644 assets/js/resources.js diff --git a/404.html b/404.html index 0088f2f..513e32e 100644 --- a/404.html +++ b/404.html @@ -169,44 +169,150 @@

Page 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

  • - support@sparkfll.tech
    - + diff --git a/resources/arduino/videos/arduino-video2.html b/resources/arduino/videos/arduino-video2.html index 2b881f7..e73fe1a 100644 --- a/resources/arduino/videos/arduino-video2.html +++ b/resources/arduino/videos/arduino-video2.html @@ -169,44 +169,150 @@

    -
    -
    -
    -

    Socials

    - -
    - - -
    -
    -
    support@sparkfll.tech - +
    +
    +
    +

    + Socials +

    + +
    +
    +

    + Products +

    + +
    + +
    +
    +
    +
    +
    diff --git a/resources/arduino/videos/arduino-video3.html b/resources/arduino/videos/arduino-video3.html index 2c2d7ee..acb0a2b 100644 --- a/resources/arduino/videos/arduino-video3.html +++ b/resources/arduino/videos/arduino-video3.html @@ -170,44 +170,150 @@

    -
    -
    -
    -

    Socials

    - -
    - - -
    -
    -
    support@sparkfll.tech - +
    +
    +
    +

    + Socials +

    + +
    +
    +

    + Products +

    + +
    + +
    +
    +
    +
    +
    diff --git a/resources/arduino/videos/arduinovids.html b/resources/arduino/videos/arduinovids.html index c1e9cd6..8f3dec1 100644 --- a/resources/arduino/videos/arduinovids.html +++ b/resources/arduino/videos/arduinovids.html @@ -443,7 +443,15 @@

    >@2024spark -
  • +
  • support@sparkfll.tech

  • -
    @@ -255,6 +349,7 @@

    Products

    + \ No newline at end of file diff --git a/reviews.html b/reviews.html index 66a7d56..0d3c58b 100644 --- a/reviews.html +++ b/reviews.html @@ -318,44 +318,150 @@

    REVIEWS + diff --git a/settings.html b/settings.html index 3a09ba5..3257a58 100644 --- a/settings.html +++ b/settings.html @@ -163,44 +163,150 @@ diff --git a/shopping-cart.html b/shopping-cart.html index 823e51a..f762d64 100644 --- a/shopping-cart.html +++ b/shopping-cart.html @@ -124,65 +124,145 @@