css fix ; url fix

This commit is contained in:
GotPPay
2017-11-13 19:26:43 +01:00
parent ec9a29e04d
commit 2974480b83
10 changed files with 27665 additions and 53 deletions

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@ node_modules
crawler/build
backend/build
npm-debug.log
crawler.out

View File

@@ -97,7 +97,7 @@ router.get ('/search/listings', async (req, res, next) => {
//Get only ads with location
query = Object.assign (query, {
has_map: true,
hasMap: true,
});
//AND

View File

@@ -0,0 +1 @@
RENTAL_FROM_PAGE=1 RENTAL_TO_PAGE=1 PROSTOR_FROM_PAGE=1 PROSTOR_TO_PAGE=1 MONGO_URL=mongodb://localhost:27017/kivi node /home/bilal/Saburly/kivi/crawler/build/crawler.js > /home/bilal/Saburly/kivi/crawler/crawler.out

27638
web/dist/app.bundle.js vendored

File diff suppressed because one or more lines are too long

46
web/dist/welcome.css vendored
View File

@@ -64,7 +64,7 @@
/*padding: 50px;*/
}
.buy-button {
.buy-button-active {
height: 80px;
width: 80px;
background:url('static/images/sale_1_mobile.png') no-repeat;
@@ -74,7 +74,26 @@
margin-right: 5%;
}
.rent-button{
.buy-button-inactive {
height: 80px;
width: 80px;
background:url('static/images/sale_0_mobile.png') no-repeat;
background-size: contain;
border: none;
margin-left: 10%;
margin-right: 5%;
}
.rent-button-active{
height: 80px;
width: 80px;
background:url('static/images/rent_1_mobile.png') no-repeat;
background-size: contain;
border: none;
margin-left: 5%;
}
.rent-button-inactive{
height: 80px;
width: 80px;
background:url('static/images/rent_0_mobile.png') no-repeat;
@@ -123,7 +142,7 @@
/*padding: 50px;*/
}
.buy-button {
.buy-button-active {
height: 150px;
width: 150px;
background:url('static/images/sale_1_mobile.png') no-repeat;
@@ -132,8 +151,27 @@
margin-left: 15%;
margin-right: 5%;
}
.buy-button-inactive {
height: 150px;
width: 150px;
background:url('static/images/sale_0_mobile.png') no-repeat;
background-size: contain;
border: none;
margin-left: 15%;
margin-right: 5%;
}
.rent-button{
.rent-button-active{
height: 150px;
width: 150px;
background:url('static/images/rent_1_mobile.png') no-repeat;
background-size: contain;
border: none;
margin-left: 5%;
}
.rent-button-inactive{
height: 150px;
width: 150px;
background:url('static/images/rent_0_mobile.png') no-repeat;

View File

@@ -8,36 +8,22 @@ export default class Welcome extends React.Component {
this.state = {
type: AD_TYPE_SALE,
buyButtonImg: 'static/images/sale_1_mobile.png',
rentButtonImg: 'static/images/rent_0_mobile.png'
}
}
onSaleClick () {
this.setState({
type: AD_TYPE_SALE,
buyButtonImg: 'static/images/sale_1_mobile.png',
rentButtonImg: 'static/images/rent_0_mobile.png'
})
}
onRentClick () {
this.setState({
type: AD_TYPE_RENT,
buyButtonImg: 'static/images/sale_0_mobile.png',
rentButtonImg: 'static/images/rent_1_mobile.png'
})
}
onSearchClick () {
}
render () {
let style1 = {
background:'url(' + this.state.buyButtonImg + ')',
backgrounSize: 'cover'
}
return (
<div>
<div className='welcome-container-bg'>
@@ -48,8 +34,8 @@ export default class Welcome extends React.Component {
<h1>KIVI</h1>
<h2>Pronađi svoj novi dom!</h2>
<div>
<button className='buy-button' style={{background:"url("+this.state.buyButtonImg+") no-repeat"}} onClick={this.onSaleClick.bind(this)}></button>
<button className='rent-button' style={{background:"url("+this.state.rentButtonImg+") no-repeat"}} onClick={this.onRentClick.bind(this)}></button>
<button className={this.state.type===AD_TYPE_SALE?'buy-button-active':'buy-button-inactive'} onClick={this.onSaleClick.bind(this)}></button>
<button className={this.state.type===AD_TYPE_RENT?'rent-button-active':'rent-button-inactive'} onClick={this.onRentClick.bind(this)}></button>
</div>
<button className='search-button' onClick={()=>this.props.onSearch({adType: this.state.type})} >TRAŽI</button>
</div>

View File

@@ -1,7 +1,7 @@
import fetch from 'isomorphic-fetch'
const BASE_URL = 'localhost';
//const BASE_URL = '192.168.0.13';
//const BASE_URL = 'localhost';
const BASE_URL = '138.68.67.31';
export const saveContactRequest = (listingId, params) => {

View File

@@ -34,7 +34,7 @@ S poštovanjem
export const listingUrl = (id) => {
// TODO: fix this once removing hardcoded values
return `http://localhost:8080/?listingId=${id}`
return `http://138.68.67.31:8080/?listingId=${id}`
}
export const isMobile = () => window.matchMedia("(max-width: 768px)").matches

View File

@@ -59,13 +59,15 @@ export default class Router {
sort,
rooms = {},
category = {},
zoom
zoom,
adType
} = this.state
if (listingId) {
params.push(`listingId=${listingId}`)
}
params.push(`adType=${adType}`);
params.push(`sort=${sort}`)
params.push(`bounds=${bounds}`)
params.push(`zoom=${zoom}`)

View File

@@ -3,7 +3,7 @@ module.exports = {
output: {
path: __dirname + "/dist",
filename: "app.bundle.js",
publicPath: "http://0.0.0.0:8080/"
publicPath: "http://138.68.67.31:8080/"
},
devServer: {
// .. rest of devserver options