diff --git a/contact/email/email.js b/contact/email/email.js new file mode 100644 index 00000000..e53a71b8 --- /dev/null +++ b/contact/email/email.js @@ -0,0 +1,33 @@ +$(document).ready(() => { + const queryStringParameters = new URLSearchParams(window.location.search); + const formIdForPurpose = { + general: "xblrvaww", + chair: "mgvwglzd", + vicechair: "mvgpebqj", + secretary: "mwpegnqg", + treasurer: "mrbznaaz", + membership: "xjkbneeg", + rallies: "mdknqlle", + magazine: "manwrddo", + spares: "xqazrddb", + regalia: "xldrqwwl", + website: "xyzgrddd" + }; + + const setFormIdOnFormElement = formId => $("#form").attr("action", `https://formspree.io/f/${formId}`); + + if (queryStringParameters.has("purpose")) { + const purpose = queryStringParameters.get("purpose"); + + if (formIdForPurpose.hasOwnProperty(purpose)) { + const formId = formIdForPurpose[purpose]; + $("#purpose").val(purpose); + setFormIdOnFormElement(formId); + } + } + + $("#purpose").on("change", ({ target }) => { + const formId = formIdForPurpose[target.value]; + $("#form").attr("action", `https://formspree.io/f/${formId}`); + }); +}); diff --git a/contact/email/index.html b/contact/email/index.html new file mode 100644 index 00000000..bcdeb3c6 --- /dev/null +++ b/contact/email/index.html @@ -0,0 +1,97 @@ +--- +title: Send Email +section: contact +customstyles: true +scripts: +--- + +
+
+ +
+

Send Email

+
+
+ + + + + +
+
+ +
+
+
+
+ + +
diff --git a/contact/email/page.css b/contact/email/page.css new file mode 100644 index 00000000..9029c425 --- /dev/null +++ b/contact/email/page.css @@ -0,0 +1,52 @@ +article { + width: 100%; + margin-right: unset; +} + +form#form fieldset { + border: none; + + margin: 0; + padding: 0; +} + +form#form fieldset label, +form#form fieldset label input, +form#form fieldset label select { + font-family: "europa"; + padding: 5px 5px 4px; +} + +form#form fieldset label:first-child h2 { margin-top: 0; } + +form#form fieldset label input#name { min-width: 250px; } +form#form fieldset label input#email { min-width: 325px; } +form#form fieldset label input#subject { min-width: 450px; } + +form#form fieldset label span { + margin-left: 5px; + font-size: 10pt; + color: darkgrey; +} + +form#form fieldset label textarea { + width: calc(100% - 10px); + min-height: 250px; + + padding: 5px; + + font-family: europa; +} + +form#form div#submitContainer { + display: flex; + justify-content: center; +} + +form#form div#submitContainer input#submit { + margin-top: 17px; + padding: 5px 10px; + + font-family: europa; + font-size: 15pt; +} diff --git a/contact/email/sent/index.html b/contact/email/sent/index.html new file mode 100644 index 00000000..9b749875 --- /dev/null +++ b/contact/email/sent/index.html @@ -0,0 +1,26 @@ +--- +title: Email Sent Successfully +section: contact +customstyles: true +--- + +
+
+ +
+

Email Sent Successfully

+

Your email was sent successfully! We will reply to your query as soon as we can.

+
+
+
diff --git a/contact/email/sent/page.css b/contact/email/sent/page.css new file mode 100644 index 00000000..a46b5d70 --- /dev/null +++ b/contact/email/sent/page.css @@ -0,0 +1,4 @@ +article { + width: 100%; + margin-right: unset; +} diff --git a/css/classes.css b/css/classes.css index c51bda98..2a79c20c 100644 --- a/css/classes.css +++ b/css/classes.css @@ -26,7 +26,7 @@ } .metadata { - font-family: europa; + font-family: europa; font-style: italic; } diff --git a/index.html b/index.html index ef5e7e94..38fbc8ba 100644 --- a/index.html +++ b/index.html @@ -1,7 +1,7 @@ --- section: about customstyles: true -scripts: +scripts: ---
diff --git a/slideshow/jquery-3.6.0.slim.min.js b/libraries/jquery-3.6.0.slim.min.js similarity index 100% rename from slideshow/jquery-3.6.0.slim.min.js rename to libraries/jquery-3.6.0.slim.min.js