diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 9e4836d..798f092 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -27,7 +27,7 @@ jobs:
run: npx eslint --no-error-on-unmatched-pattern.
- name: Run all tests
- run: npm run test
+ run: npm test
- name: Generate build
env:
@@ -45,4 +45,4 @@ jobs:
uses: ncipollo/release-action@v1.14.0
with:
artifacts: "react-github-actions-build"
- tag: v1.5.5.1
\ No newline at end of file
+ tag: v1.5.5.2
\ No newline at end of file
diff --git a/src/App.test.js b/src/App.test.js
index dd7260b..855fb75 100644
--- a/src/App.test.js
+++ b/src/App.test.js
@@ -30,6 +30,13 @@ test('Find contact form', async () => {
expect(formFieldMessage).toBeInTheDocument();
});
+// Test Alert message
+test('Find alert message', () => {
+ render( );
+ const alertMessage = screen.getByText(/This website serves as a showcase of my development work/i);
+ expect(alertMessage).toBeInTheDocument();
+});
+
// Test form submit button
test('Find form submit button', () => {
render( );
diff --git a/src/components/AlertComponent.js b/src/components/AlertComponent.js
new file mode 100644
index 0000000..fb7d779
--- /dev/null
+++ b/src/components/AlertComponent.js
@@ -0,0 +1,32 @@
+import React, { useState, useEffect, useCallback } from "react";
+
+const hideAlert = () => {
+ const alertElement = document.querySelector(".alert-container");
+ if (alertElement) {
+ alertElement.classList.add("hidden");
+ }
+};
+
+const AlertComponent = ({ message, animateAlert }) => {
+ return (
+
+
+ {message}
+
+
+ ✕
+
+
+ );
+};
+
+export default AlertComponent;
\ No newline at end of file
diff --git a/src/components/Contact.js b/src/components/Contact.js
index c6b0663..ec685ef 100644
--- a/src/components/Contact.js
+++ b/src/components/Contact.js
@@ -1,31 +1,42 @@
import React, { useState, useEffect, useCallback } from "react";
+import AlertComponent from "./AlertComponent";
function ContactForm() {
const isDevelopment = process.env.NODE_ENV === "development";
const [name, setName] = useState("");
const [email, setEmail] = useState("");
const [message, setMessage] = useState("");
- const handleSubmit = useCallback(async (event) => {
- event.preventDefault();
- let data = { name, email, message };
- try {
- // clear form
- setName('');
- setEmail('');
- setMessage('');
- if (isDevelopment) {
- data = {
- name: "testUser1",
- email: "test@test.com",
- message: "Hello, this is a test message."
- };
+ const [animateAlert, setAnimateAlert] = useState(false);
+
+ useEffect(() => {
+ const timer = setTimeout(() => {
+ setAnimateAlert(true);
+ }, 500);
+ return () => clearTimeout(timer);
+ }, []);
+
+ const handleSubmit = useCallback(
+ async (event) => {
+ event.preventDefault();
+ let data = { name, email, message };
+ try {
+ setName("");
+ setEmail("");
+ setMessage("");
+ if (isDevelopment) {
+ data = {
+ name: "testUser1",
+ email: "test@test.com",
+ message: "Hello, this is a test message.",
+ };
+ }
+ console.log("Form submission successful:", data);
+ } catch (error) {
+ console.error("Form submission error:", error);
}
- console.log('Form submission successful:', data);
- } catch (error) {
- console.error('Form submission error:', error);
- console.log('Error caught');
- }
- }, [name, email, message, isDevelopment]);
+ },
+ [name, email, message, isDevelopment]
+ );
useEffect(() => {
if (isDevelopment) {
@@ -43,13 +54,26 @@ function ContactForm() {
return (
<>
-
+
+ {/* Alert Message */}
+
+ This website serves as a showcase of my development work. The source code is hosted on GitHub and deployed via my personal Netlify account.
+ Therefore, all emails sent through this form will be directed to me. For inquiries related to
+ Studio Zed , please contact
+ Dr. Simone O'Callaghan .
+ >
+ }
+ animateAlert={animateAlert} />
+
+ {/* Form */}
@@ -59,35 +83,21 @@ function ContactForm() {
Get in touch!
-
- {/* Name */}
-
- setName(e.target.value)}
- placeholder="Name"
- required />
+ setName(e.target.value)} placeholder="Name" required/>
-
- {/* Email */}
-
- setEmail(e.target.value)}
- placeholder="Email"
- required
- pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}"
- title="Please enter a valid email address"
- />
+ setEmail(e.target.value)} placeholder="Email"
+ required pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}"
+ title="Please enter a valid email address"/>
-
- {/* Message */}
-
- setMessage(e.target.value)}
- placeholder="Message"
- required />
+ setMessage(e.target.value)} placeholder="Message" required/>
- {/* Submit */}
Submit
diff --git a/src/components/Projects/ProjectCards.js b/src/components/Projects/ProjectCards.js
index f9295be..a073133 100644
--- a/src/components/Projects/ProjectCards.js
+++ b/src/components/Projects/ProjectCards.js
@@ -1,7 +1,7 @@
import React from "react";
import Card from "react-bootstrap/Card";
-//import Button from "react-bootstrap/Button";
-//import { CgWebsite } from "react-icons/cg";
+import Button from "react-bootstrap/Button";
+import { CgArrowRight } from "react-icons/cg";
//import { BsGithub } from "react-icons/bs";
function ProjectCards(props) {
@@ -20,21 +20,19 @@ function ProjectCards(props) {
{"\n"}
{"\n"}
- {/* If the component contains Demo link and if it's not a Blog then, it will render the below component */}
-
{!props.isBlog && props.demoLink && (
- {/*
-
- {"Demo"}
- */}
+
+ {"Visit"}
+
)}
);
}
-export default ProjectCards;
+export default ProjectCards;
\ No newline at end of file
diff --git a/src/components/Projects/Projects.js b/src/components/Projects/Projects.js
index cd9f200..f1bc22b 100644
--- a/src/components/Projects/Projects.js
+++ b/src/components/Projects/Projects.js
@@ -36,8 +36,8 @@ function Projects() {
isBlog={false}
title="Public Art Workers website and branding"
description="A website, Logo and branding for a newly formed company called Public art workers."
- //ghLink="https://github.com/soumyajit4419/Chatify"
- //demoLink="https://chatify-49.web.app/"
+ //ghLink="https://github.com/"
+ demoLink="https://www.publicartworkers.com/"
/>
@@ -46,9 +46,7 @@ function Projects() {
imgPath={JH}
isBlog={false}
title="John Hunter Health anniversary book"
- description="This project is about [Insert name] it is for [ inset ] by [inset] this project involved [ insert]"
- //ghLink="https://github.com/soumyajit4419/Bits-0f-C0de"
- //demoLink="https://blogs.soumya-jit.tech/"
+ //description="This project is about [Insert name] it is for [ inset ] by [inset] this project involved [ insert]"
/>
@@ -57,9 +55,7 @@ function Projects() {
imgPath={LocalConnect}
isBlog={false}
title="Local Connections restuarant"
- description="This project is about [Insert name] it is for [ inset ] by [inset] this project involved [ insert]"
- //ghLink="https://github.com/soumyajit4419/Editor.io"
- //demoLink="https://editor.soumya-jit.tech/"
+ //description="This project is about [Insert name] it is for [ inset ] by [inset] this project involved [ insert]"
/>
@@ -68,9 +64,7 @@ function Projects() {
imgPath={newcastleArt}
isBlog={false}
title="Newcastle art gallery"
- description="This project is about [Insert name] it is for [ inset ] by [inset] this project involved [ insert]"
- //ghLink="https://github.com/soumyajit4419/Plant_AI"
- //demoLink="https://plant49-ai.herokuapp.com/"
+ //description="This project is about [Insert name] it is for [ inset ] by [inset] this project involved [ insert]"
/>
@@ -79,9 +73,7 @@ function Projects() {
imgPath={wanersbay}
isBlog={false}
title="Warners Bay kids book"
- description="This project is about [Insert name] it is for [ inset ] by [inset] this project involved [ insert]"
- //ghLink="https://github.com/soumyajit4419/AI_For_Social_Good"
- // demoLink="https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley" <--------Please include a demo link here
+ //description="This project is about [Insert name] it is for [ inset ] by [inset] this project involved [ insert]"
/>
@@ -90,9 +82,7 @@ function Projects() {
imgPath={water}
isBlog={false}
title="Water conservation kids book"
- description="This project is about [Insert name] it is for [ inset ] by [inset] this project involved [ insert]"
- //ghLink="https://github.com/soumyajit4419/Face_And_Emotion_Detection"
- // demoLink="https://blogs.soumya-jit.tech/" <--------Please include a demo link here
+ //description="This project is about [Insert name] it is for [ inset ] by [inset] this project involved [ insert]"
/>
@@ -101,9 +91,7 @@ function Projects() {
imgPath={tina}
isBlog={false}
title="This Is Not Art Program"
- description="This project is about [Insert name] it is for [ inset ] by [inset] this project involved [ insert]"
- //ghLink="https://github.com/soumyajit4419/Face_And_Emotion_Detection"
- // demoLink="https://blogs.soumya-jit.tech/" <--------Please include a demo link here
+ //description="This project is about [Insert name] it is for [ inset ] by [inset] this project involved [ insert]"
/>
@@ -112,9 +100,7 @@ function Projects() {
imgPath={noWorries}
isBlog={false}
title="No worries rebranding and website"
- description="This project is about [Insert name] it is for [ inset ] by [inset] this project involved [ insert]"
- //ghLink="https://github.com/soumyajit4419/Face_And_Emotion_Detection"
- // demoLink="https://blogs.soumya-jit.tech/" <--------Please include a demo link here
+ //description="This project is about [Insert name] it is for [ inset ] by [inset] this project involved [ insert]"
/>
@@ -123,9 +109,7 @@ function Projects() {
imgPath={air}
isBlog={false}
title="Art in Recovery rebrading and commemorative book"
- description="This project is about [Insert name] it is for [ inset ] by [inset] this project involved [ insert]"
- //ghLink="https://github.com/soumyajit4419/Face_And_Emotion_Detection"
- // demoLink="https://blogs.soumya-jit.tech/" <--------Please include a demo link here
+ //description="This project is about [Insert name] it is for [ inset ] by [inset] this project involved [ insert]"
/>
@@ -135,8 +119,6 @@ function Projects() {
isBlog={false}
title="Head 2 Art website and branding project"
description="This project is about [Insert name] it is for [ inset ] by [inset] this project involved [ insert]"
- //ghLink="https://github.com/soumyajit4419/Face_And_Emotion_Detection"
- // demoLink="https://blogs.soumya-jit.tech/" <--------Please include a demo link here
/>
*/}
diff --git a/src/style.css b/src/style.css
index 41f0fcb..2629d84 100644
--- a/src/style.css
+++ b/src/style.css
@@ -785,6 +785,30 @@ a {
left: 0%;
position: relative;
margin-bottom: 210px;
+ flex-direction: column;
+}
+
+.alert-container {
+ display: flex;
+ background-color: rgb(247, 200, 205);
+ color: rgb(114, 28, 36);
+ padding: 10px;
+ border: 1px solid rgb(245, 198, 203);
+ border-radius: 5px;
+ margin-bottom: 10px;
+ flex-direction: row;
+ align-items: center;
+ width: 100%;
+ max-width: 800px;
+ opacity: 1;
+ transform: translateY(0);
+ transition: opacity 0.3s ease, transform 0.3s ease;
+}
+
+.alert-container.hidden {
+ opacity: 0;
+ transform: translateY(-10px);
+ pointer-events: none; /* Prevent interaction */
}
.form {