This commit is contained in:
ruchi 2021-04-03 16:00:40 -04:00
parent e1891bd59b
commit feea4dcaad

View file

@ -1,24 +1,24 @@
import { Component } from "react"; import { Component } from "react";
import "./homePage.css"; import './Homepage.css';
import house1 from "../images/house1.jpg"; import house1 from '../images/house1.jpg';
import house2 from "../images/house2.jpg"; import house2 from '../images/house2.jpg';
import house3 from "../images/house3.jpg"; import house3 from '../images/house3.jpg';
import Carousel from "react-bootstrap/Carousel"; import Carousel from 'react-bootstrap/Carousel'
class homePage extends Component { class Homepage extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
firstname: "", firstname: '',
lastname: "", lastname: '',
email: "", email: '',
message: "", message: ''
}; }
} }
render() { render() {
return ( return (
<div className="homePage"> <div className="Homepage">
<section className="colored-section" id="title"> <section className="colored-section" id="title">
<div className="container-fluid"> <div className="container-fluid">
<div className="row"> <div className="row">
@ -33,13 +33,27 @@ class homePage extends Component {
<div className="housesIntro"> <div className="housesIntro">
<Carousel> <Carousel>
<Carousel.Item> <Carousel.Item>
<img className="headerImg" src={house1} alt="First House" /> <img
className="headerImg"
src={house1}
alt="First House"
/>
</Carousel.Item> </Carousel.Item>
<Carousel.Item> <Carousel.Item>
<img className="headerImg" src={house2} alt="Second House" /> <img
className="headerImg"
src={house2}
alt="Second House"
/>
</Carousel.Item> </Carousel.Item>
<Carousel.Item> <Carousel.Item>
<img className="headerImg" src={house3} alt="Third House" /> <img
className="headerImg"
src={house3}
alt="Third House"
/>
</Carousel.Item> </Carousel.Item>
</Carousel> </Carousel>
</div> </div>
@ -48,54 +62,23 @@ class homePage extends Component {
<div className="container-fluid"> <div className="container-fluid">
<div className="contactIntro"> <div className="contactIntro">
<h2 className="heading-1">Contact Us</h2> <h2 className="heading-1">Contact Us</h2>
<form <form id="contact-form" onSubmit={this.handleSubmit.bind(this)} method="POST">
id="contact-form"
onSubmit={this.handleSubmit.bind(this)}
method="POST"
>
<div className="formhelper row"> <div className="formhelper row">
<div className="col-6"> <div className="col-6">
<input <input type="text" className="form-control" placeholder="First Name" value={this.state.name} onChange={this.onNameChange.bind(this)} />
type="text"
className="form-control"
placeholder="First Name"
value={this.state.name}
onChange={this.onNameChange.bind(this)}
/>
</div> </div>
<div className="col-6"> <div className="col-6">
<input <input type="text" className="form-control" placeholder="Last Name" value={this.state.name} onChange={this.onNameChange.bind(this)} />
type="text"
className="form-control"
placeholder="Last Name"
value={this.state.name}
onChange={this.onNameChange.bind(this)}
/>
</div> </div>
</div> </div>
<div className="form-group"> <div className="form-group">
<input <input type="email" className="form-control" placeholder="Email Address" aria-describedby="emailHelp" value={this.state.email} onChange={this.onEmailChange.bind(this)} />
type="email"
className="form-control"
placeholder="Email Address"
aria-describedby="emailHelp"
value={this.state.email}
onChange={this.onEmailChange.bind(this)}
/>
</div> </div>
<div className="form-group"> <div className="form-group">
<textarea <textarea className="form-control" placeholder="Message" rows="5" value={this.state.message} onChange={this.onMessageChange.bind(this)} />
className="form-control"
placeholder="Message"
rows="5"
value={this.state.message}
onChange={this.onMessageChange.bind(this)}
/>
</div> </div>
<div className="buttonhelper"> <div className="buttonhelper">
<button type="submit" className="button-1"> <button type="submit" className="button-1">Submit</button>
Submit
</button>
</div> </div>
</form> </form>
</div> </div>
@ -106,18 +89,19 @@ class homePage extends Component {
} }
onNameChange(event) { onNameChange(event) {
this.setState({ name: event.target.value }); this.setState({ name: event.target.value })
} }
onEmailChange(event) { onEmailChange(event) {
this.setState({ email: event.target.value }); this.setState({ email: event.target.value })
} }
onMessageChange(event) { onMessageChange(event) {
this.setState({ message: event.target.value }); this.setState({ message: event.target.value })
} }
handleSubmit(event) {} handleSubmit(event) {
}
} }
export default homePage; export default Homepage;