diff --git a/.gitignore b/.gitignore index 3c3629e..57ab46d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,6 @@ node_modules + + + + + diff --git a/data/planetinfo.json b/data/planetinfo.json index 18e1fa9..46d8fd3 100644 --- a/data/planetinfo.json +++ b/data/planetinfo.json @@ -1,67 +1 @@ -{ - "planets": [ - { - "planet": "Mercury", - "moons": 0, - "diameter": 4879, - "distanceFromSun": 57.9, - "images": "../images/mercury.png" - }, - { - "planet": "Venus", - "moons": 0, - "diameter": 12104, - "distanceFromSun": 108.2, - "images": "../images/venus.png" - }, - { - "planet": "Earth", - "moons": 1, - "diameter": 12756, - "distanceFromSun": 149.6, - "images": "../images/earth.png" - }, - { - "planet": "Mars", - "moons": 80, - "diameter": "6792", - "distanceFromSun": "227.9", - "images": "../images/mars.png" - }, - { - "planet": "Jupiter", - "moons": 67, - "diameter": 142984, - "distanceFromSun": 778.6, - "images": "../images/jupiter.png" - }, - { - "planet": "Saturn", - "moons": 62, - "diameter": 120536, - "distanceFromSun": 1433.5, - "images": "../images/saturn.png" - }, - { - "planet": "Uranus", - "moons": 27, - "diameter": 51118, - "distanceFromSun": 2872.5, - "images": "../images/uranus.png" - }, - { - "planet": "Neptune", - "moons": 14, - "diameter": 49528, - "distanceFromSun": 4495.1, - "images": "../images/neptune.png" - }, - { - "planet": "Pluto(Dwarf-Planet)", - "moons": 5, - "diameter": 2370, - "distanceFromSun": 5906.4, - "images": "../images/pluto.png" - } - ] -} \ No newline at end of file +{"planets":[{"planet":"Mercury","moons":0,"diameter":4879,"distanceFromSun":57.9,"images":"../images/mercury.png"},{"planet":"Venus","moons":0,"diameter":12104,"distanceFromSun":108.2,"images":"../images/venus.png"},{"planet":"Earth","moons":"1","diameter":"12756","distanceFromSun":"149.6","images":"../images/earth.png"},{"planet":"Mars","moons":0,"diameter":6792,"distanceFromSun":227.9,"images":"../images/mars.png"},{"planet":"Jupiter","moons":67,"diameter":142984,"distanceFromSun":778.6,"images":"../images/jupiter.png"},{"planet":"Saturn","moons":62,"diameter":120536,"distanceFromSun":1433.5,"images":"../images/saturn.png"},{"planet":"Uranus","moons":27,"diameter":51118,"distanceFromSun":2872.5,"images":"../images/uranus.png"},{"planet":"Neptune","moons":14,"diameter":49528,"distanceFromSun":4495.1,"images":"../images/neptune.png"},{"planet":"Pluto","moons":5,"diameter":2370,"distanceFromSun":5906.4,"images":"../images/pluto.png"}]} \ No newline at end of file diff --git a/public/images/astronaut.png b/public/images/astronaut.png new file mode 100644 index 0000000..9df3313 Binary files /dev/null and b/public/images/astronaut.png differ diff --git a/public/images/bg.jpg b/public/images/bg.jpg new file mode 100644 index 0000000..923f92b Binary files /dev/null and b/public/images/bg.jpg differ diff --git a/public/images/earth.png b/public/images/earth.png new file mode 100644 index 0000000..10c89a8 Binary files /dev/null and b/public/images/earth.png differ diff --git a/public/images/jupiter.png b/public/images/jupiter.png new file mode 100644 index 0000000..4aaedd3 Binary files /dev/null and b/public/images/jupiter.png differ diff --git a/public/images/mars.png b/public/images/mars.png new file mode 100644 index 0000000..c3cc54e Binary files /dev/null and b/public/images/mars.png differ diff --git a/public/images/mercury.png b/public/images/mercury.png new file mode 100644 index 0000000..afd7cc5 Binary files /dev/null and b/public/images/mercury.png differ diff --git a/public/images/moon.png b/public/images/moon.png new file mode 100644 index 0000000..a10aad0 Binary files /dev/null and b/public/images/moon.png differ diff --git a/public/images/neptune.png b/public/images/neptune.png new file mode 100644 index 0000000..ef602ea Binary files /dev/null and b/public/images/neptune.png differ diff --git a/public/images/pluto.png b/public/images/pluto.png new file mode 100644 index 0000000..cb7f69d Binary files /dev/null and b/public/images/pluto.png differ diff --git a/public/images/rocket.png b/public/images/rocket.png new file mode 100644 index 0000000..fa528d6 Binary files /dev/null and b/public/images/rocket.png differ diff --git a/public/images/saturn.png b/public/images/saturn.png new file mode 100644 index 0000000..c9c0f51 Binary files /dev/null and b/public/images/saturn.png differ diff --git a/public/images/star.gif b/public/images/star.gif new file mode 100644 index 0000000..1cf078e Binary files /dev/null and b/public/images/star.gif differ diff --git a/public/images/star.png b/public/images/star.png new file mode 100644 index 0000000..7102f89 Binary files /dev/null and b/public/images/star.png differ diff --git a/public/images/sun.gif b/public/images/sun.gif new file mode 100644 index 0000000..30d812e Binary files /dev/null and b/public/images/sun.gif differ diff --git a/public/images/uranus.png b/public/images/uranus.png new file mode 100644 index 0000000..194dcaf Binary files /dev/null and b/public/images/uranus.png differ diff --git a/public/images/venus.png b/public/images/venus.png new file mode 100644 index 0000000..c34a6a2 Binary files /dev/null and b/public/images/venus.png differ diff --git a/public/main.css b/public/main.css new file mode 100644 index 0000000..86ee8bd --- /dev/null +++ b/public/main.css @@ -0,0 +1,137 @@ + +html { + cursor: url('./images/rocket.png'), auto; +} +body { + /* font-family: 'Bungee Shade', cursive; */ + font-family: 'Press Start 2P', cursive; + background-image: url('./images/bg.jpg'); + background-color: black; +} + +h1 { + font-size: 50px; + text-align: center; + color: white; +} + +h1:hover { + cursor: url('./images/rocket.png'), auto; + +} + +h4 { + font-size: 20px; + text-align: center; + color: white + +} + +.footer { + background-color: rgb(43, 226, 171); + padding: 20px; + position: fixed; bottom: 0; right: 0; +} + +.planet { + display: inline-block; + margin: 10px; + max-width: 200px; +} +.planet:hover { + cursor: url('./images/astronaut.png'), auto; +} + +.sun { + display: inline-block; + margin: 10px; + max-width: 350px; + position: relative; top: 100px; +} + +.Mercury { + max-width: 70px; +} + +.Venus { + max-width: 100px; +} + +.Earth { + max-width: 120px; +} + +.Mars { + max-width: 90px; +} + + +.Jupiter { + max-width: 190px; + position: relative; top: 30px; +} + +.Saturn { + max-width: 270px; + position: relative; top: 10px; +} + +.Uranus { + max-width: 140px; +} + +.Neptune { + max-width: 120px; +} + +.Pluto { + max-width: 30px; + position: relative; bottom: 30px; +} + +.profilePlanet { + display: inline-block; + max-width: 900px; + position: absolute; +} + +.content { + display: inline; + position: absolute; bottom: 400px; left: 900px; + color: white; + font-size:30px; +} + +li { + font-size: 20px; +} + +button { + display: inline; + position: absolute; bottom: 250px; left: 1150px; + background-color: white; + color: white; + font-family: 'Press Start 2P', cursive; + font-size:30px; + padding: 10px 13px 10px 13px; + +} + +button:hover{ + cursor: url('./images/rocket.png'), auto; +} + +form { + color: white; + text-align: center; + margin: 150px; + +} + +input { + font-size: 16px; + font-family: 'Press Start 2P', cursive; + padding: 10px; + margin: 20px; +} + diff --git a/routes.js b/routes.js index 5de3fd0..32aa4bf 100644 --- a/routes.js +++ b/routes.js @@ -72,7 +72,7 @@ router.post('/planets/edit/:planet', (req, res) => { let planetDetails = JSON.parse(data) let single = planetDetails.planets.find((item) => item.planet == Id) - single.planet = newData.planet + // single.planet = newData.planet single.moons = newData.moons single.diameter = newData.diameter single.distanceFromSun = newData.distanceFromSun diff --git a/views/layouts/main.hbs b/views/layouts/main.hbs index e69de29..be49077 100644 --- a/views/layouts/main.hbs +++ b/views/layouts/main.hbs @@ -0,0 +1,17 @@ + + +
+ +