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 {
@@ -137,6 +139,6 @@ export default class ContactModal extends React.Component {
- )
+ );
}
}
diff --git a/web/src/components/Filters.js b/web/src/components/Filters.js
index 3f47286..098d130 100644
--- a/web/src/components/Filters.js
+++ b/web/src/components/Filters.js
@@ -1,94 +1,94 @@
-import React from 'react'
-import {formatFilterNumber} from '../lib/helpers'
+import React from "react";
+import { formatFilterNumber } from "../lib/helpers";
import {
CATEGORY_FLAT,
CATEGORY_HOUSE,
CATEGORY_OFFICE,
CATEGORY_LAND
-} from '../../../crawler/enums'
+} from "../../../crawler/enums";
export default class Filters extends React.Component {
- onCloseClick (e) {
+ onCloseClick(e) {
if (this.props.onClose) {
- this.props.onClose()
+ this.props.onClose();
}
}
- onMaxPriceChange (e) {
- const maxPrice = e.target.value
+ onMaxPriceChange(e) {
+ const maxPrice = e.target.value;
this.props.dispatch({
- type: 'SET_MAX_PRICE',
- action: {maxPrice}
- })
+ type: "SET_MAX_PRICE",
+ action: { maxPrice }
+ });
}
- onMinPriceChange (e) {
- const minPrice = e.target.value
+ onMinPriceChange(e) {
+ const minPrice = e.target.value;
this.props.dispatch({
- type: 'SET_MIN_PRICE',
- action: {minPrice}
- })
+ type: "SET_MIN_PRICE",
+ action: { minPrice }
+ });
}
- onMaxSizeChange (e) {
+ onMaxSizeChange(e) {
this.props.dispatch({
- type: 'SET_MAX_SIZE',
- action: {maxSize: e.target.value}
- })
+ type: "SET_MAX_SIZE",
+ action: { maxSize: e.target.value }
+ });
}
- onMinSizeChange (e) {
+ onMinSizeChange(e) {
this.props.dispatch({
- type: 'SET_MIN_SIZE',
- action: {minSize: e.target.value}
- })
+ type: "SET_MIN_SIZE",
+ action: { minSize: e.target.value }
+ });
}
- onRoomsClick (rooms) {
+ onRoomsClick(rooms) {
this.props.dispatch({
- type: 'UPDATE_ROUTE',
+ type: "UPDATE_ROUTE",
action: {
- params: {rooms}
+ params: { rooms }
}
- })
+ });
- this.props.dispatch({type: 'SET_ROOMS', action: {rooms}})
+ this.props.dispatch({ type: "SET_ROOMS", action: { rooms } });
}
- onCategoryClick (category) {
+ onCategoryClick(category) {
this.props.dispatch({
- type: 'UPDATE_ROUTE',
+ type: "UPDATE_ROUTE",
action: {
- params: {category}
+ params: { category }
}
- })
+ });
- this.props.dispatch({type: 'SET_CATEGORY', action: {category}})
+ this.props.dispatch({ type: "SET_CATEGORY", action: { category } });
}
- onRefreshClick (closeFilters) {
- this.updateSearch()
+ onRefreshClick(closeFilters) {
+ this.updateSearch();
if (closeFilters) {
this.props.dispatch({
- type: 'CLOSE_FILTERS'
- })
+ type: "CLOSE_FILTERS"
+ });
}
}
- onKeyPress (e) {
- if (e.key === 'Enter') {
- this.updateSearch()
+ onKeyPress(e) {
+ if (e.key === "Enter") {
+ this.updateSearch();
}
}
- updateSearch () {
- const {minPrice, maxPrice, minSize, maxSize} = this.props.filters
+ updateSearch() {
+ const { minPrice, maxPrice, minSize, maxSize } = this.props.filters;
this.props.dispatch({
- type: 'UPDATE_ROUTE',
+ type: "UPDATE_ROUTE",
action: {
params: {
minPrice,
@@ -97,20 +97,20 @@ export default class Filters extends React.Component {
maxSize
}
}
- })
- this.props.dispatch({type: 'UPDATE_SEARCH'})
+ });
+ this.props.dispatch({ type: "UPDATE_SEARCH" });
}
- onResetSearch (e) {
+ onResetSearch(e) {
this.props.dispatch({
- type: 'RESET_FILTERS'
- })
+ type: "RESET_FILTERS"
+ });
}
- render () {
- const {filters} = this.props
- const selectedRooms = val => filters.rooms[val] ? 'selected' : ''
- const selectedCategory = val => filters.category[val] ? 'selected' : ''
+ render() {
+ const { filters } = this.props;
+ const selectedRooms = val => filters.rooms[val] ? "selected" : "";
+ const selectedCategory = val => filters.category[val] ? "selected" : "";
return (