diff --git a/web/dist/index.html b/web/dist/index.html index 3bc97bf..17c5bb2 100644 --- a/web/dist/index.html +++ b/web/dist/index.html @@ -11,6 +11,7 @@ +
diff --git a/web/dist/static/images/sa-bg.jpg b/web/dist/static/images/sa-bg.jpg new file mode 100644 index 0000000..b204a87 Binary files /dev/null and b/web/dist/static/images/sa-bg.jpg differ diff --git a/web/dist/welcome.css b/web/dist/welcome.css new file mode 100644 index 0000000..2e48e85 --- /dev/null +++ b/web/dist/welcome.css @@ -0,0 +1,65 @@ + + +/*.welcome-container div {*/ + /*border: 1px solid red;*/ +/*}*/ + +.welcome-container h1 { + font-size: 2em; + text-align: center; +} + +.welcome-container h2 { + + padding-bottom: 25px; + color: #2d3138; + font-size: 26px; + font-weight: 200; + text-align: center; + letter-spacing: .59px; +} + + +.welcome-container-bg { + /*background-color: rgb(92, 192, 99);*/ + background-image: url('static/map.jpg'); + /*background-image: url('static/images/sa-bg.jpg');*/ + /*background-position: center;*/ + -moz-filter: blur(5px); + -o-filter: blur(5px); + -ms-filter: blur(5px); + filter: blur(5px); + content: ""; + position: fixed; + left: 0; + right: 0; + z-index: -1; + + width: 100%; + height: 100%; +} + +.welcome-container { + position: fixed; + left: 0; + right: 0; + z-index: 0; + margin-left: 20px; + margin-right: 20px; + height: 100%; + padding: 100px; +} + +.welcome-content { + /*height: 100%;*/ + margin: 0 auto; + width: 600px; + background-color: hsla(0,0%,100%,.95); + box-shadow: 0 2px 4px 0 rgba(73,73,73,.1); + padding: 50px; +} + +.welcome-content .gmaps-places-input-welcome { + + width: 100%; +} diff --git a/web/src/components/ContactModal.js b/web/src/components/ContactModal.js index 713ed6e..2d5b0e9 100644 --- a/web/src/components/ContactModal.js +++ b/web/src/components/ContactModal.js @@ -1,28 +1,27 @@ -import React from 'react' -import {saveContactRequest} from '../lib/api' +import React from "react"; +import { saveContactRequest } from "../lib/api"; export default class ContactModal extends React.Component { - onContactCloseClick (e) { - e.preventDefault() + onContactCloseClick(e) { + e.preventDefault(); this.props.dispatch({ - type: 'CLOSE_CONTACT' - }) + type: "CLOSE_CONTACT" + }); } - onSubmit (e) { - e.preventDefault() - const {name, email, message, phone, alert} = this.props.contact; + onSubmit(e) { + e.preventDefault(); + const { name, email, message, phone, alert } = this.props.contact; if (!name || !email) { this.props.dispatch({ - type: 'INVALID_CONTACT' - }) + type: "INVALID_CONTACT" + }); } else { - this.props.dispatch({ - type: 'SUBMIT_CONTACT_START' - }) + type: "SUBMIT_CONTACT_START" + }); saveContactRequest(this.props.listingId, { name, @@ -30,39 +29,42 @@ export default class ContactModal extends React.Component { phone, message, alert - }).then(l => l.text()).then(res => { - this.props.dispatch({ - type: 'SUBMIT_CONTACT_END' + }) + .then(l => l.text()) + .then(res => { + this.props.dispatch({ + type: "SUBMIT_CONTACT_END" + }); + }) + .catch(e => { + // TODO: should we have a global view for rendering errors + console.error(e); }); - }).catch(e => { - // TODO: should we have a global view for rendering errors - console.error(e) - }); } } - onFieldChange (field, e) { + onFieldChange(field, e) { this.props.dispatch({ - type: 'UPDATE_CONTACT_INFO', + type: "UPDATE_CONTACT_INFO", action: { field, value: e.target.value } - }) + }); } - onAlertToggle (e) { - const alert = this.props.contact.alert + onAlertToggle(e) { + const alert = this.props.contact.alert; this.props.dispatch({ - type: 'UPDATE_CONTACT_INFO', + type: "UPDATE_CONTACT_INFO", action: { - field: 'alert', + field: "alert", value: !alert } - }) + }); } - render () { + render() { const { message, email, @@ -72,10 +74,10 @@ export default class ContactModal extends React.Component { nameInvalid, emailInvalid, sending - } = this.props.contact + } = this.props.contact; - const nameValidationClass = nameInvalid ? 'validation-failed' : '' - const emailValidationClass = emailInvalid ? 'validation-failed' : '' + const nameValidationClass = nameInvalid ? "validation-failed" : ""; + const emailValidationClass = emailInvalid ? "validation-failed" : ""; return (
@@ -94,7 +96,7 @@ export default class ContactModal extends React.Component { @@ -103,32 +105,32 @@ export default class ContactModal extends React.Component {