From e2ae2d0a7bfea57b205e9651bda3ed9ffe7e914c Mon Sep 17 00:00:00 2001 From: Katerina Date: Thu, 16 Jul 2020 11:12:50 +1000 Subject: [PATCH] testing some idea --- public/style2.css | 62 +++++++++++++++++++++------------------ public/trashure-client.js | 12 ++++---- 2 files changed, 39 insertions(+), 35 deletions(-) diff --git a/public/style2.css b/public/style2.css index 7c65154..8688e26 100644 --- a/public/style2.css +++ b/public/style2.css @@ -1,45 +1,49 @@ -.create-form-div, .update-form-div { - background-color: rgb(241, 237, 237); - box-shadow: 1px 0px 40px 0px rgba(78, 108, 246, 0.99); - min-width: 700px; +.create-form-div, +.update-form-div { + background-color: rgb(241, 237, 237); + box-shadow: 1px 0px 40px 0px rgba(78, 108, 246, 0.99); + min-width: 700px; } -.create-form-div input, .update-form-div input{ - height: 20px; - border-radius: 3px; - border: 0.5px solid rgb(180, 179, 179); - padding: 5px; - font-size: 1em; +.create-form-div input, +.update-form-div input { + height: 20px; + border-radius: 3px; + border: 0.5px solid rgb(180, 179, 179); + padding: 5px; + font-size: 1em; } .item-map { - border: 1px solid rgb(180, 179, 179); - border-radius: 3px; + border: 1px solid rgb(180, 179, 179); + border-radius: 3px; + height: 500px; } -.create-btn, .update-btn { - width: 30%; - margin: 10px auto; - padding: 5px; - border: 1px solid black; - border-radius: 3px; - font-size: 1.25em; - background-color: aquamarine; +.create-btn, +.update-btn { + width: 30%; + margin: 10px auto; + padding: 5px; + border: 1px solid black; + border-radius: 3px; + font-size: 1.25em; + background-color: aquamarine; } -.create-btn:hover, .update-btn:hover { - background-color: rgb(82, 199, 160); - cursor: pointer; +.create-btn:hover, +.update-btn:hover { + background-color: rgb(82, 199, 160); + cursor: pointer; } .selection { - height: 25px; - width: 310px; - margin: 0; - font-size: 1em; + height: 25px; + width: 310px; + margin: 0; + font-size: 1em; } .hidden { - display: none; + display: none; } - diff --git a/public/trashure-client.js b/public/trashure-client.js index 92ddbf1..d8d34f5 100644 --- a/public/trashure-client.js +++ b/public/trashure-client.js @@ -70,8 +70,8 @@ function showPosition(position, cb) { // Fetches information to be displayed const handlePinClick = function (e) { - const url = `https://trashure-app.herokuapp.com/api/trashure_items/${e.target.metadata.id}`; - // const url = `http://localhost:8080/api/trashure_items/${e.target.metadata.id}`; + // const url = `https://trashure-app.herokuapp.com/api/trashure_items/${e.target.metadata.id}`; + const url = `http://localhost:8080/api/trashure_items/${e.target.metadata.id}`; axios.get(url).then((res) => { res.data.forEach(function (data) { document.querySelector('.description-of-item').classList.remove('hidden'); @@ -90,8 +90,8 @@ const handlePinClick = function (e) { reverseGeocode(fakevent); - const url = `https://trashure-app.herokuapp.com/api/users/${data.owner_id}`; - // const url = `http://localhost:8080/api/users/${data.owner_id}`; + // const url = `https://trashure-app.herokuapp.com/api/users/${data.owner_id}`; + const url = `http://localhost:8080/api/users/${data.owner_id}`; axios.get(url).then((res) => { document.querySelector( '.owner-of-item' @@ -155,8 +155,8 @@ function getMap() { var center = map.getCenter(); - const url = 'https://trashure-app.herokuapp.com/api/trashure_items'; - // const url = 'http://localhost:8080/api/trashure_items'; + // const url = 'https://trashure-app.herokuapp.com/api/trashure_items'; + const url = 'http://localhost:8080/api/trashure_items'; axios.get(url).then((res) => { res.data.forEach(function (data) {