mirror of
https://github.com/PotentiaRobotics/website.git
synced 2025-04-20 12:20:19 -04:00
Finished contact
This commit is contained in:
parent
a0d14ded1a
commit
292e5552aa
|
@ -3,6 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"></link>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="theme-color" content="#000000" />
|
<meta name="theme-color" content="#000000" />
|
||||||
<meta name="description" content="The TJHSST Humanoid Robot Project" />
|
<meta name="description" content="The TJHSST Humanoid Robot Project" />
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React, {Component} from "react";
|
import React, {Component} from "react";
|
||||||
import emailjs from "emailjs-com";
|
import emailjs from "emailjs-com";
|
||||||
import styled, {createGlobalStyle} from 'styled-components';
|
import styled, {createGlobalStyle} from 'styled-components';
|
||||||
import {StyledFormWrapper, StyledForm, StyledButton, StyledError, StyledInput, StyledTextArea, sharedStyles, StyledTextAreaSubject} from "./assets/StyledContactForm.js";
|
import {StyledFormWrapper, StyledForm, StyledButton, StyledError, StyledInput, StyledTextArea, sharedStyles, StyledTextAreaSubject, ButtonSet} from "./assets/StyledContactForm.js";
|
||||||
|
import './assets/contact.css'
|
||||||
|
|
||||||
const GlobalStyle = createGlobalStyle`
|
const GlobalStyle = createGlobalStyle`
|
||||||
html {
|
html {
|
||||||
|
@ -34,6 +34,7 @@ class ContactForm extends Component {
|
||||||
this.handleSubjectChange = this.handleSubjectChange.bind(this);
|
this.handleSubjectChange = this.handleSubjectChange.bind(this);
|
||||||
this.handleMessageChange = this.handleMessageChange.bind(this);
|
this.handleMessageChange = this.handleMessageChange.bind(this);
|
||||||
this.handleSubmit = this.handleSubmit.bind(this);
|
this.handleSubmit = this.handleSubmit.bind(this);
|
||||||
|
this.scrollDown = this.scrollDown.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleNameChange(event) {
|
handleNameChange(event) {
|
||||||
|
@ -88,6 +89,16 @@ class ContactForm extends Component {
|
||||||
event.target.reset();
|
event.target.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
scrollDown(id) {
|
||||||
|
const element = document.getElementById(id);
|
||||||
|
element.scrollIntoView({
|
||||||
|
behavior: "smooth",
|
||||||
|
block: "end",
|
||||||
|
inline: "nearest"
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -125,9 +136,16 @@ class ContactForm extends Component {
|
||||||
<StyledButton type="submit">Send Message</StyledButton>
|
<StyledButton type="submit">Send Message</StyledButton>
|
||||||
</StyledForm>
|
</StyledForm>
|
||||||
</StyledFormWrapper>
|
</StyledFormWrapper>
|
||||||
|
<button2 onClick={() => this.scrollDown("goHere")}>⤋ Or Find Us At ⤋ <span><br></br></span>⤋</button2>
|
||||||
|
<ButtonSet id="goHere">
|
||||||
|
<a href="#" class="fa fa-linkedin"></a>
|
||||||
|
<a href="#" class="fa fa-youtube"></a>
|
||||||
|
<a href="#" class="fa fa-github"></a>
|
||||||
|
</ButtonSet>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default ContactForm;
|
export default ContactForm;
|
|
@ -15,6 +15,7 @@ const StyledFormWrapper = styled.div`
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
margin-top: -125px;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
@ -69,6 +70,15 @@ const StyledError = styled.div`
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
margin: 0 0 40px 0;
|
margin: 0 0 40px 0;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
const ButtonSet = styled.div`
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 100vh;
|
||||||
|
margin-top: -125px;
|
||||||
|
padding: 0 20px;
|
||||||
|
`;
|
||||||
export default StyledFormWrapper;
|
export default StyledFormWrapper;
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
@ -79,5 +89,6 @@ export {
|
||||||
StyledTextArea,
|
StyledTextArea,
|
||||||
StyledButton,
|
StyledButton,
|
||||||
StyledError,
|
StyledError,
|
||||||
StyledTextAreaSubject
|
StyledTextAreaSubject,
|
||||||
|
ButtonSet
|
||||||
};
|
};
|
46
src/components/assets/contact.css
Normal file
46
src/components/assets/contact.css
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
button2 {
|
||||||
|
display:block;
|
||||||
|
width:18%;
|
||||||
|
margin:0 auto;
|
||||||
|
position:relative;
|
||||||
|
font-size:40px;
|
||||||
|
margin-top: -125px;
|
||||||
|
outline:none;
|
||||||
|
color:#fff;
|
||||||
|
border:none;
|
||||||
|
text-decoration:none;
|
||||||
|
text-align:center;
|
||||||
|
cursor:pointer;
|
||||||
|
-webkit-border-radius:10px;
|
||||||
|
-moz-border-radius:2px;
|
||||||
|
border-radius:1px;
|
||||||
|
background-color:#ee6c4d;
|
||||||
|
border-bottom:1px solid #7b8b2f;
|
||||||
|
}
|
||||||
|
.fa {
|
||||||
|
padding: 20px;
|
||||||
|
font-size: 30px;
|
||||||
|
width: 100px;
|
||||||
|
text-align: center;
|
||||||
|
text-decoration: none;
|
||||||
|
margin: 5px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fa:hover {
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fa-linkedin {
|
||||||
|
background: #0077b5;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fa-youtube {
|
||||||
|
background: #FF0000;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fa-github {
|
||||||
|
background: #000000;
|
||||||
|
color: white;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user