Added a thank-you-page when user submits form

dependabot/npm_and_yarn/typescript-eslint/parser-4.33.0
Guusvanmeerveld 4 years ago
parent 7848de25e7
commit 49b519b015

@ -4,7 +4,15 @@ const Contact = () => (
<div className="header" id="contact"> <div className="header" id="contact">
Contact Contact
</div> </div>
<form className="content" method="POST" data-netlify="true" name="contact" data-netlify-recaptcha="true"> <form
encType="application/x-www-form-urlencoded"
action="/thanks"
className="content"
method="POST"
data-netlify="true"
name="contact"
data-netlify-recaptcha="true"
>
<fieldset> <fieldset>
<label htmlFor="email">Email</label> <label htmlFor="email">Email</label>
<input name="email" type="email" required placeholder="Your email address" id="email" /> <input name="email" type="email" required placeholder="Your email address" id="email" />

@ -1,10 +1,12 @@
const Footer = () => ( const Footer = () => {
const year = new Date().getFullYear();
return (
<footer className="footer"> <footer className="footer">
<div className="container"> <div className="container">
<img src="/profile.png" width="100%" height="100%" alt="" className="profile" /> <img src="/profile.png" width="100%" height="100%" alt="" className="profile" />
<div className="branding"> <div className="branding">
Guus van Meerveld <br /> Guus van Meerveld <br />
&#169; 2021 &#169; {year}
</div> </div>
<div className="socials"> <div className="socials">
<a href="https://twitter.com/GuusvanMeerveld"> <a href="https://twitter.com/GuusvanMeerveld">
@ -23,5 +25,6 @@ const Footer = () => (
</div> </div>
</footer> </footer>
); );
};
export default Footer; export default Footer;

@ -3,8 +3,8 @@ const Navbar = () => (
<div className="container"> <div className="container">
<span className="header">Portfolio</span> <span className="header">Portfolio</span>
<div className="items"> <div className="items">
<a href="#projects">Projects</a> <a href="/#projects">Projects</a>
<a href="#contact">Contact</a> <a href="/#contact">Contact</a>
</div> </div>
</div> </div>
</nav> </nav>

@ -14,7 +14,7 @@ const Page = ({
<meta charSet="UTF-8" /> <meta charSet="UTF-8" />
<meta httpEquiv="X-UA-Compatible" content="IE=edge" /> <meta httpEquiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Portfolio | {title}</title> <title>G-VM | {title}</title>
<meta name="description" content={description} /> <meta name="description" content={description} />
<meta name="keywords" content="guus van meerveld argo magister tempo discord" /> <meta name="keywords" content="guus van meerveld argo magister tempo discord" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />

@ -1,6 +1,7 @@
import "../styles/milligram.min.css"; import "../styles/milligram.min.css";
import "../styles/raleway.css"; import "../styles/raleway.css";
import "../styles/sass/index.scss"; import "../styles/sass/index.scss";
import "../styles/sass/thanks.scss";
function App({ Component, pageProps }) { function App({ Component, pageProps }) {
return <Component {...pageProps} />; return <Component {...pageProps} />;

@ -5,9 +5,8 @@ import Projects from "../components/Projects";
import Contact from "../components/Contact"; import Contact from "../components/Contact";
import Footer from "../components/Footer"; import Footer from "../components/Footer";
export default function Home() { const Home = () => (
return ( <Page description="A simple portfolio website to display my projects." title="Projects">
<Page description="A simple portfolio website to display my projects." title="Guus van Meerveld">
<Navbar /> <Navbar />
<Landing /> <Landing />
<Projects /> <Projects />
@ -15,4 +14,5 @@ export default function Home() {
<Footer /> <Footer />
</Page> </Page>
); );
}
export default Home;

@ -0,0 +1,20 @@
import Page from "../components/Page";
import Navbar from "../components/Navbar";
const Thanks = () => (
<Page title="Thanks!" description="Thanks for submitting your contact form!">
<Navbar />
<div className="message">
<div>
<div className="icon"></div>
<div className="header">Thank you!</div>
<div className="subtitle">Your submission is greatly appreciated!</div>
<a href="/" className="link button">
Go back
</a>
</div>
</div>
</Page>
);
export default Thanks;

@ -0,0 +1,26 @@
.message {
font-family: "Raleway";
height: 100vh;
width: 100vw;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
.icon {
font-size: 10rem;
}
.header {
font-size: 5rem;
}
.subtitle {
font-size: 3rem;
}
.link {
margin-top: 1.5rem;
}
}
Loading…
Cancel
Save