fix script bug not loading
This commit is contained in:
parent
1c469f8b2d
commit
f6dcca5279
4 changed files with 55 additions and 53 deletions
24
package.json
24
package.json
|
@ -10,28 +10,28 @@
|
||||||
"astro": "astro"
|
"astro": "astro"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/check": "^0.4.1",
|
"@astrojs/check": "^0.5.9",
|
||||||
"@astrojs/mdx": "^2.2.0",
|
"@astrojs/mdx": "^2.2.0",
|
||||||
"@astrojs/preact": "^3.1.1",
|
"@astrojs/preact": "^3.1.1",
|
||||||
"@astrojs/react": "^3.1.0",
|
"@astrojs/react": "^3.1.0",
|
||||||
"@astrojs/tailwind": "^5.1.0",
|
"@astrojs/tailwind": "^5.1.0",
|
||||||
"@fontsource-variable/epilogue": "^5.0.9",
|
"@fontsource-variable/epilogue": "^5.0.13",
|
||||||
"@fontsource-variable/josefin-sans": "^5.0.19",
|
"@fontsource-variable/josefin-sans": "^5.0.20",
|
||||||
"@fontsource-variable/lora": "^5.0.9",
|
"@fontsource-variable/lora": "^5.0.17",
|
||||||
"@fontsource/open-sans": "^5.0.22",
|
"@fontsource/open-sans": "^5.0.27",
|
||||||
"@fontsource/vollkorn": "^5.0.18",
|
"@fontsource/vollkorn": "^5.0.19",
|
||||||
"astro": "^4.1.2",
|
"astro": "^4.5.7",
|
||||||
"framer-motion": "^11.0.14",
|
"framer-motion": "^11.0.15",
|
||||||
"iconify-icon": "^1.0.8",
|
"iconify-icon": "^2.0.0",
|
||||||
"preact": "^10.19.6",
|
"preact": "^10.20.0",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"tailwindcss": "^3.4.1",
|
"tailwindcss": "^3.4.1",
|
||||||
"typescript": "^5.3.3"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tailwindcss/forms": "^0.5.7",
|
"@tailwindcss/forms": "^0.5.7",
|
||||||
"@types/jquery": "^3.5.29",
|
"@types/jquery": "^3.5.29",
|
||||||
"sass": "^1.70.0"
|
"sass": "^1.72.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,11 @@ settings:
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
'@astrojs/check':
|
'@astrojs/check':
|
||||||
specifier: ^0.4.1
|
specifier: ^0.5.9
|
||||||
version: 0.4.1(typescript@5.4.2)
|
version: 0.5.9(typescript@5.4.2)
|
||||||
'@astrojs/mdx':
|
'@astrojs/mdx':
|
||||||
specifier: ^2.2.0
|
specifier: ^2.2.0
|
||||||
version: 2.2.0(astro@4.5.6)
|
version: 2.2.0(astro@4.5.7)
|
||||||
'@astrojs/preact':
|
'@astrojs/preact':
|
||||||
specifier: ^3.1.1
|
specifier: ^3.1.1
|
||||||
version: 3.1.1(@babel/core@7.24.1)(preact@10.20.0)(vite@5.1.6)
|
version: 3.1.1(@babel/core@7.24.1)(preact@10.20.0)(vite@5.1.6)
|
||||||
|
@ -19,33 +19,33 @@ dependencies:
|
||||||
version: 3.1.0(@types/react-dom@18.2.22)(@types/react@18.2.67)(react-dom@18.2.0)(react@18.2.0)(vite@5.1.6)
|
version: 3.1.0(@types/react-dom@18.2.22)(@types/react@18.2.67)(react-dom@18.2.0)(react@18.2.0)(vite@5.1.6)
|
||||||
'@astrojs/tailwind':
|
'@astrojs/tailwind':
|
||||||
specifier: ^5.1.0
|
specifier: ^5.1.0
|
||||||
version: 5.1.0(astro@4.5.6)(tailwindcss@3.4.1)
|
version: 5.1.0(astro@4.5.7)(tailwindcss@3.4.1)
|
||||||
'@fontsource-variable/epilogue':
|
'@fontsource-variable/epilogue':
|
||||||
specifier: ^5.0.9
|
specifier: ^5.0.13
|
||||||
version: 5.0.13
|
version: 5.0.13
|
||||||
'@fontsource-variable/josefin-sans':
|
'@fontsource-variable/josefin-sans':
|
||||||
specifier: ^5.0.19
|
specifier: ^5.0.20
|
||||||
version: 5.0.20
|
version: 5.0.20
|
||||||
'@fontsource-variable/lora':
|
'@fontsource-variable/lora':
|
||||||
specifier: ^5.0.9
|
specifier: ^5.0.17
|
||||||
version: 5.0.17
|
version: 5.0.17
|
||||||
'@fontsource/open-sans':
|
'@fontsource/open-sans':
|
||||||
specifier: ^5.0.22
|
specifier: ^5.0.27
|
||||||
version: 5.0.27
|
version: 5.0.27
|
||||||
'@fontsource/vollkorn':
|
'@fontsource/vollkorn':
|
||||||
specifier: ^5.0.18
|
specifier: ^5.0.19
|
||||||
version: 5.0.19
|
version: 5.0.19
|
||||||
astro:
|
astro:
|
||||||
specifier: ^4.1.2
|
specifier: ^4.5.7
|
||||||
version: 4.5.6(sass@1.72.0)(typescript@5.4.2)
|
version: 4.5.7(sass@1.72.0)(typescript@5.4.2)
|
||||||
framer-motion:
|
framer-motion:
|
||||||
specifier: ^11.0.14
|
specifier: ^11.0.15
|
||||||
version: 11.0.15(react-dom@18.2.0)(react@18.2.0)
|
version: 11.0.15(react-dom@18.2.0)(react@18.2.0)
|
||||||
iconify-icon:
|
iconify-icon:
|
||||||
specifier: ^1.0.8
|
specifier: ^2.0.0
|
||||||
version: 1.0.8
|
version: 2.0.0
|
||||||
preact:
|
preact:
|
||||||
specifier: ^10.19.6
|
specifier: ^10.20.0
|
||||||
version: 10.20.0
|
version: 10.20.0
|
||||||
react:
|
react:
|
||||||
specifier: ^18.2.0
|
specifier: ^18.2.0
|
||||||
|
@ -57,7 +57,7 @@ dependencies:
|
||||||
specifier: ^3.4.1
|
specifier: ^3.4.1
|
||||||
version: 3.4.1
|
version: 3.4.1
|
||||||
typescript:
|
typescript:
|
||||||
specifier: ^5.3.3
|
specifier: ^5.4.2
|
||||||
version: 5.4.2
|
version: 5.4.2
|
||||||
|
|
||||||
devDependencies:
|
devDependencies:
|
||||||
|
@ -68,7 +68,7 @@ devDependencies:
|
||||||
specifier: ^3.5.29
|
specifier: ^3.5.29
|
||||||
version: 3.5.29
|
version: 3.5.29
|
||||||
sass:
|
sass:
|
||||||
specifier: ^1.70.0
|
specifier: ^1.72.0
|
||||||
version: 1.72.0
|
version: 1.72.0
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
@ -85,8 +85,8 @@ packages:
|
||||||
'@jridgewell/trace-mapping': 0.3.25
|
'@jridgewell/trace-mapping': 0.3.25
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@astrojs/check@0.4.1(typescript@5.4.2):
|
/@astrojs/check@0.5.9(typescript@5.4.2):
|
||||||
resolution: {integrity: sha512-XEsuU4TlWkgcsvdeessq5mXLXV1fejtxIioCPv/FfhTzb1bDYe2BtLiSBK+rFTyD9Hl686YOas9AGNMJcpoRsw==}
|
resolution: {integrity: sha512-+QsQMtYq4oso+gmilJC9HLmdi0glZ+04V/VyyTTPry7n21jqjX9SfgDpLGxMk5cwPC/vwZMkn6ORGPnkZS/L5w==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
typescript: ^5.0.0
|
typescript: ^5.0.0
|
||||||
|
@ -167,7 +167,7 @@ packages:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@astrojs/mdx@2.2.0(astro@4.5.6):
|
/@astrojs/mdx@2.2.0(astro@4.5.7):
|
||||||
resolution: {integrity: sha512-EkcCniYdGwsh9k5LknqRrz/UyOnMNXdRk7fgDAw/zUDKnm7zgQAG8hIx0FxG1L2IINxLfu7IcjgZb3f5TFpxKw==}
|
resolution: {integrity: sha512-EkcCniYdGwsh9k5LknqRrz/UyOnMNXdRk7fgDAw/zUDKnm7zgQAG8hIx0FxG1L2IINxLfu7IcjgZb3f5TFpxKw==}
|
||||||
engines: {node: '>=18.14.1'}
|
engines: {node: '>=18.14.1'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
|
@ -176,7 +176,7 @@ packages:
|
||||||
'@astrojs/markdown-remark': 4.3.0
|
'@astrojs/markdown-remark': 4.3.0
|
||||||
'@mdx-js/mdx': 3.0.1
|
'@mdx-js/mdx': 3.0.1
|
||||||
acorn: 8.11.3
|
acorn: 8.11.3
|
||||||
astro: 4.5.6(sass@1.72.0)(typescript@5.4.2)
|
astro: 4.5.7(sass@1.72.0)(typescript@5.4.2)
|
||||||
es-module-lexer: 1.4.2
|
es-module-lexer: 1.4.2
|
||||||
estree-util-visit: 2.0.0
|
estree-util-visit: 2.0.0
|
||||||
github-slugger: 2.0.0
|
github-slugger: 2.0.0
|
||||||
|
@ -240,13 +240,13 @@ packages:
|
||||||
- vite
|
- vite
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@astrojs/tailwind@5.1.0(astro@4.5.6)(tailwindcss@3.4.1):
|
/@astrojs/tailwind@5.1.0(astro@4.5.7)(tailwindcss@3.4.1):
|
||||||
resolution: {integrity: sha512-BJoCDKuWhU9FT2qYg+fr6Nfb3qP4ShtyjXGHKA/4mHN94z7BGcmauQK23iy+YH5qWvTnhqkd6mQPQ1yTZTe9Ig==}
|
resolution: {integrity: sha512-BJoCDKuWhU9FT2qYg+fr6Nfb3qP4ShtyjXGHKA/4mHN94z7BGcmauQK23iy+YH5qWvTnhqkd6mQPQ1yTZTe9Ig==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
astro: ^3.0.0 || ^4.0.0
|
astro: ^3.0.0 || ^4.0.0
|
||||||
tailwindcss: ^3.0.24
|
tailwindcss: ^3.0.24
|
||||||
dependencies:
|
dependencies:
|
||||||
astro: 4.5.6(sass@1.72.0)(typescript@5.4.2)
|
astro: 4.5.7(sass@1.72.0)(typescript@5.4.2)
|
||||||
autoprefixer: 10.4.18(postcss@8.4.37)
|
autoprefixer: 10.4.18(postcss@8.4.37)
|
||||||
postcss: 8.4.37
|
postcss: 8.4.37
|
||||||
postcss-load-config: 4.0.2(postcss@8.4.37)
|
postcss-load-config: 4.0.2(postcss@8.4.37)
|
||||||
|
@ -1363,8 +1363,8 @@ packages:
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/astro@4.5.6(sass@1.72.0)(typescript@5.4.2):
|
/astro@4.5.7(sass@1.72.0)(typescript@5.4.2):
|
||||||
resolution: {integrity: sha512-/pXr+tDvgps1x3w+9i48XzfNPDr4NrT89EJPeCTL57IjaTpitSQ8Oy10Fv6zAqXNLIUJ5j3P1c+fJx+taKIg0g==}
|
resolution: {integrity: sha512-Ioeg3TV42dOJvf6GlmykeR3EKZ8+JcnZyJ/X9qDPzVf2OREmtvW0182YCDXQBqwXFRHndZRcHLqinAWjzZYh/A==}
|
||||||
engines: {node: '>=18.14.1', npm: '>=6.14.0'}
|
engines: {node: '>=18.14.1', npm: '>=6.14.0'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -2447,8 +2447,8 @@ packages:
|
||||||
engines: {node: '>=16.17.0'}
|
engines: {node: '>=16.17.0'}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/iconify-icon@1.0.8:
|
/iconify-icon@2.0.0:
|
||||||
resolution: {integrity: sha512-jvbUKHXf8EnGGArmhlP2IG8VqQLFFyTvTqb9LVL2TKTh7/eCCD1o2HHE9thpbJJb6B8hzhcFb6rOKhvo7reNKA==}
|
resolution: {integrity: sha512-38ArOkxmyD9oDbJBkxaFpE6eZ0K3F9Sk+3x4mWGfjMJaxi3EKrix9Du4iWhgBFT3imKC4FJJE34ur2Rc7Xm+Uw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@iconify/types': 2.0.0
|
'@iconify/types': 2.0.0
|
||||||
dev: false
|
dev: false
|
||||||
|
@ -4025,6 +4025,7 @@ packages:
|
||||||
|
|
||||||
/safe-buffer@5.2.1:
|
/safe-buffer@5.2.1:
|
||||||
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
|
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
|
||||||
|
requiresBuild: true
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/sass@1.72.0:
|
/sass@1.72.0:
|
||||||
|
@ -4207,6 +4208,7 @@ packages:
|
||||||
|
|
||||||
/string_decoder@1.3.0:
|
/string_decoder@1.3.0:
|
||||||
resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==}
|
resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==}
|
||||||
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
safe-buffer: 5.2.1
|
safe-buffer: 5.2.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
|
@ -55,8 +55,8 @@ import navbarPages from "../data/navbarPages.json";
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script is:inline>
|
||||||
var hamburger = document.querySelector(".hamburger") as HTMLButtonElement;
|
var hamburger = document.querySelector(".hamburger");
|
||||||
var secondNav = document.querySelector("#secondNav");
|
var secondNav = document.querySelector("#secondNav");
|
||||||
var navbarListItems = document.querySelectorAll("#navbar-list a");
|
var navbarListItems = document.querySelectorAll("#navbar-list a");
|
||||||
var body = document.body; // Get the body element
|
var body = document.body; // Get the body element
|
||||||
|
@ -79,7 +79,7 @@ import navbarPages from "../data/navbarPages.json";
|
||||||
navbarListItems.forEach((item, index) => {
|
navbarListItems.forEach((item, index) => {
|
||||||
setTimeout(
|
setTimeout(
|
||||||
() => {
|
() => {
|
||||||
let htmlItem = item as HTMLElement;
|
let htmlItem = item;
|
||||||
htmlItem.style.transition = "opacity 0.5s ease";
|
htmlItem.style.transition = "opacity 0.5s ease";
|
||||||
htmlItem.style.opacity = "1";
|
htmlItem.style.opacity = "1";
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ import navbarPages from "../data/navbarPages.json";
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
navbarListItems.forEach((item, index) => {
|
navbarListItems.forEach((item, index) => {
|
||||||
let htmlItem = item as HTMLElement;
|
let htmlItem = item;
|
||||||
htmlItem.style.opacity = "0";
|
htmlItem.style.opacity = "0";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
import Layout from "../layouts/Layout.astro";
|
import Layout from "../layouts/Layout.astro";
|
||||||
|
const { PUBLIC_DISCORD_WEBHOOK_LINK } = import.meta.env;
|
||||||
|
const { PUBLIC_SLACK_WEBHOOK_LINK } = import.meta.env;
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout>
|
<Layout>
|
||||||
|
@ -196,17 +198,15 @@ import Layout from "../layouts/Layout.astro";
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
{/* @ts-ignore */}
|
||||||
const { PUBLIC_DISCORD_WEBHOOK_LINK } = import.meta.env;
|
<script
|
||||||
const { PUBLIC_SLACK_WEBHOOK_LINK } = import.meta.env;
|
define:vars={{ PUBLIC_DISCORD_WEBHOOK_LINK, PUBLIC_SLACK_WEBHOOK_LINK }}
|
||||||
|
>
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
const form = document.getElementById(
|
const form = document.getElementById("contactForm");
|
||||||
"contactForm"
|
|
||||||
) as HTMLFormElement;
|
|
||||||
const policyAgreeButton = document.querySelector(
|
const policyAgreeButton = document.querySelector(
|
||||||
'button[role="switch"]'
|
'button[role="switch"]'
|
||||||
) as HTMLElement;
|
);
|
||||||
let policyAgreed = false;
|
let policyAgreed = false;
|
||||||
|
|
||||||
// Toggle privacy policy agreement
|
// Toggle privacy policy agreement
|
||||||
|
@ -215,7 +215,7 @@ import Layout from "../layouts/Layout.astro";
|
||||||
this.setAttribute("aria-checked", policyAgreed.toString());
|
this.setAttribute("aria-checked", policyAgreed.toString());
|
||||||
const indicator = this.querySelector(
|
const indicator = this.querySelector(
|
||||||
'span[aria-hidden="true"]'
|
'span[aria-hidden="true"]'
|
||||||
) as HTMLElement;
|
);
|
||||||
if (policyAgreed) {
|
if (policyAgreed) {
|
||||||
this.classList.replace("bg-gray-200", "bg-ieee");
|
this.classList.replace("bg-gray-200", "bg-ieee");
|
||||||
indicator.classList.replace(
|
indicator.classList.replace(
|
||||||
|
@ -238,7 +238,7 @@ import Layout from "../layouts/Layout.astro";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const formData = new FormData(form as HTMLFormElement);
|
const formData = new FormData(form);
|
||||||
const formProps = Object.fromEntries(formData);
|
const formProps = Object.fromEntries(formData);
|
||||||
|
|
||||||
const discordPayload = {
|
const discordPayload = {
|
||||||
|
|
Loading…
Reference in a new issue