-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from ecadlabs/jambaree-updates-jan19
Jambaree updates jan19
- Loading branch information
Showing
9 changed files
with
414 additions
and
13,083 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import React, { useState } from "react"; | ||
import parse from "html-react-parser"; | ||
import { useMailChimp } from "react-use-mailchimp-signup"; | ||
import styles from "./FooterForm.module.css"; | ||
|
||
function Feature() { | ||
const { error, loading, status, subscribe, message } = useMailChimp({ | ||
action: `https://ecadlabs.us20.list-manage.com/subscribe/post?u=8fdd00e1ab81d5f5550fadb32&id=de1bfb4af9`, | ||
}); | ||
|
||
const [inputs, setInputs] = useState({ | ||
"group[218840]": "1", | ||
}); | ||
|
||
const handleInputChange = (event) => { | ||
event.persist(); | ||
setInputs((inputs) => ({ | ||
...inputs, | ||
[event.target.name]: event.target.value, | ||
})); | ||
}; | ||
|
||
const handleSubmit = (event) => { | ||
if (event) { | ||
event.preventDefault(); | ||
} | ||
if (inputs) { | ||
subscribe(inputs); | ||
} | ||
}; | ||
|
||
return ( | ||
<> | ||
<div className={styles.footerForm}> | ||
{error && <h6>Please enter your email</h6>} | ||
{loading && <p>...Loading</p>} | ||
{message && <p>{message && parse(message)}</p>} | ||
|
||
<h5>Register for updates</h5> | ||
<form className={styles.footerInputContainer} onSubmit={handleSubmit}> | ||
<input | ||
type="email" | ||
name="email" | ||
id="mchimpEmail" | ||
placeholder="Your email address" | ||
onChange={handleInputChange} | ||
className={styles.footerEmail} | ||
/> | ||
<button className={styles.signupButton} type="submit"> | ||
Sign up | ||
</button> | ||
</form> | ||
</div> | ||
</> | ||
); | ||
} | ||
|
||
export default function FooterForm() { | ||
return ( | ||
<section className={styles.features}> | ||
<div className={styles.container}> | ||
<Feature /> | ||
</div> | ||
</section> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* .container { | ||
padding: 100px; | ||
} | ||
.footerForm { | ||
width: 100%; | ||
background: #fff9ed; | ||
} | ||
.footerForm button { | ||
height: fit-content; | ||
white-space: nowrap; | ||
padding: 5px 18px; | ||
background-color: var(--ifm-color-primary); | ||
color: #373f41; | ||
font-size: 12px; | ||
line-height: 22px; | ||
font-weight: 600; | ||
letter-spacing: 0.3px; | ||
font-family: Montserrat; | ||
border-radius: 3px; | ||
margin-bottom: 50px !important; | ||
border: none; | ||
} | ||
.footerForm input { | ||
border: none; | ||
background: transparent; | ||
border-bottom: 1px solid #565656; | ||
padding-right: 100px; | ||
padding-bottom: 8px; | ||
margin-right: 5px; | ||
} */ | ||
.footerForm { | ||
width: 100%; | ||
margin-top: 50px; | ||
background: #fff9ed; | ||
} | ||
|
||
.footerInputContainer { | ||
width: 100%; | ||
display: flex; | ||
justify-content: flex-start; | ||
align-items: flex-start; | ||
flex-wrap: wrap; | ||
gap: 10px; | ||
} | ||
|
||
.footerEmail { | ||
border: none; | ||
background: transparent; | ||
border-bottom: 1px solid #565656; | ||
padding-right: 100px; | ||
margin-bottom: 10px; | ||
padding-top: 10px; | ||
padding-bottom: 10px; | ||
padding-left: 10px; | ||
} | ||
|
||
.signupButton { | ||
height: fit-content; | ||
white-space: nowrap; | ||
padding: 5px 18px; | ||
background-color: var(--ifm-color-primary); | ||
color: #373f41; | ||
font-size: 12px; | ||
line-height: 22px; | ||
font-weight: 600; | ||
letter-spacing: 0.3px; | ||
font-family: Montserrat; | ||
border-radius: 3px; | ||
margin-bottom: 50px !important; | ||
border: none; | ||
transform: translateY(5px); | ||
} | ||
|
||
.signupButton:hover { | ||
cursor: pointer !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.