diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/.DS_Store differ diff --git a/README.md b/README.md index d91ea86..ca9f032 100644 --- a/README.md +++ b/README.md @@ -35,3 +35,16 @@ As developers, we wish to utilize a third-party API. – The ability to randomize the favorite images or turn them into a slideshow of the user and/or the general favorites. – Add a small grid calendar to our inputs for user to select a date for filtering images. + +#### STEPS +To add the tables to another local repo: + - Do a sql:dump from the locally created database (create a text file with the data) + - Then sql:load into the other local repo + +Create a Heroku app (this will store the persistent data for our users): + – Create a new app + – Add a databse + – Do this: heroku pg:push mylocaldb (name) DATABASE_URL --app your-app-name + – Connect heroku with postgres: heroku pg:psql --app your-app-name + – Use postgresql commands to check tables and data + diff --git a/images/1200px-OSIRIS_Mars_true_color.jpg b/images/1200px-OSIRIS_Mars_true_color.jpg new file mode 100644 index 0000000..cc43984 Binary files /dev/null and b/images/1200px-OSIRIS_Mars_true_color.jpg differ diff --git a/images/cote-dazur.jpg b/images/cote-dazur.jpg new file mode 100644 index 0000000..00e9bc9 Binary files /dev/null and b/images/cote-dazur.jpg differ diff --git a/images/hubble-peers-into-the-most-crowded-place-in-the-milky-way_18051161100_o_orig.jpg b/images/hubble-peers-into-the-most-crowded-place-in-the-milky-way_18051161100_o_orig.jpg new file mode 100644 index 0000000..4664658 Binary files /dev/null and b/images/hubble-peers-into-the-most-crowded-place-in-the-milky-way_18051161100_o_orig.jpg differ diff --git a/index.html b/index.html index 65a8ee7..a54604e 100644 --- a/index.html +++ b/index.html @@ -4,41 +4,54 @@ + + + + + + + + Mars Rover Photo App -
+
-

This is a test, this is ONLY a test....

- + +
+
-

This is a test, this is ONLY a test....

+
-
- + -
- - - -
+ + + + +
-
-

This is a test, this is ONLY a test....

-
- - -
-
-
-
- - -
+
+
+ + + +
+ +
+
-

All About MARS

- +

Facts about Mars and the Mars Rover

-
Question goes here
-
Answer goes here
-
Question goes here
-
Answer goes here
-
Question goes here
-
Answer goes here
-
Question goes here
-
Answer goes here
-
Question goes here
-
Answer goes here
+

How long is one Mars year?

+

A Mars DAY is called a sol. One Mars sol is 24 hrs, 39 min and 35.244 seconds. One Mars YEAR is 687 Earth days or 1.9 Earth years.

+

What is the temperature on Mars?

+

The surface temperature of Mars is -153 to 20 degrees Celsius

+

Does Mars have a moon?

+

Earth has one moon, but Mars has two. Their names are Phobos and Deimos.

+

Does Mars have mountains?

+

Yes! Mars is the home of the tallest mountain in the Solar System, Olympus Mons.

+

When was Mars first discovered?

+

Mars was first discovered by Egyptian astronomers in 2nd millineum BC. (Between 2000BC and 1001 BC).

+

How many missions have there been to Mars?

+

There have been over 40 missions to Mars. Only 18 have been successful.

+

What's something that is unique about the Mars rover?

+

Lasers! On top of Curiosity’s “neck and head” is the ChemCam, which contains a laser capable of vaporizing items found on the Martian landscape — like rocks, soil, solids (or Martians) — from a distance of up to 23 feet. The vaporized substance is then analyzed to see if it is worth further study. ChemCam will help NASA “characterize” the geology of Mars, check for evidence of past habitability, assess the “biological potential” of parts of Mars, and determine whether or not the soil of Mars is toxic to Earthlings.

+

Is the Mars rover as fast as a jet?

+

Nooooooo. Curiosity will have an average speed of between 0.00018 mph and 0.00073 mph. (1 1/2 to 6 miles a YEAR.) Even on a long day, Curiosity will only travel about 600 ft.

+

Is Curiosity powerful?

+

Yes and no. The iPhone in your pocket has at least 4 times the computing power of Curiosity, which packs a mere 200MHz CPU, to iPhones 800MHz CPU. Further, Curiosity packs just 256MB of RAM, and 2GB of on-board storage space. The iPhone has 512MB of RAM and up to 64GB of storage. However, Curiosity has multiple computers in case one breaks, all of which are capable of withstanding massive amounts of radiation an iPhone would not survive.

+

"How did Curiosity get to Mars in the first place?">

+

Curiosity has a rough journey to get to Mars and there is no guarantee it will arrive. Below is a video of it's hard journey to Mars.

+ +

Does Curiosity have a birthday?

+

Yes. Its birthday is on August 5, 2012. For it's 1st Birthday, it sang itself a lonely birthday song. Millions of Earthlings were sad Curiosity was all alone. However, Curiosity runs on a nuclear battery that turns heat into electricity and it will eventually die. In the scientific world, there is no value in songs, so it's vibration unit has been reprogrammed for scientific data collection. If you would like to hear it sing Happy Birthday, watch the video below.

+
-

"About Team Nitrogen"

-
-

Charlie

- -

Liz

- -

Carmen

- -

Katlyn

- -
-
+

Team Nitrogen

+
+

Charlie Heiner

+ black and white alien image +

I appreciate the Universe most by getting away from the city and into nature with my camera. It's not as easy these days while learning to code with a new one at home, but my supportive, beautiful wife and two amazing children make it very worthwhile. The eclipse this year was such an incredible reminder of how vast the Universe really is.

+
+ +
+

Liz Petersen

+ cute alien holding cat +

When I was 11, I wanted to be an astronaut. That dream quickly changed with the onset of the teen years and a driver’s license. A graphic and web designer by training, I am currently studying software development at Alchemy Code Lab in Portland, OR. Hobbies include riding my motorcycle to beautiful places, nature photography, hiking, and camping. I'm a plant nerd, parent of one, and practitioner of mindful communication. The farthest reaches of space have continued to hold my interest, and I have been totally excited working on this project.

+
+ +
+

Carmen Perezchica

+ Martians pointing at Mars rover +

Mars lover and enthusiast who has dreamed of blasting off planet Earth to Mars since the age of 3. If they open up applications to Elon Musk's Tesla trip to Mars, I will be the first to sign up myself, my husband and two stellar kids. My coding breaks often involve viewing photos of Mars.

+
+ +
+

Katlyn Tucker

+ Mars rover leaves a message in the Mars sand which spells out Mars +

I enjoy warping time and space while learning to speak in code. Although not an astronaut, I watched two space shuttle launches in person. I almost applied to the program to colonize Mars, but leaving behind my two teens, friends and family and never returning to Earth was the dealbreaker. In my free time, I take photos, make jewelry and hang out with my kids, where we often sit and watch the Universe.

+
+ +
diff --git a/models/image.js b/models/image.js index 9a2024a..c90c04a 100644 --- a/models/image.js +++ b/models/image.js @@ -1,7 +1,7 @@ 'use strict'; var app = app || {}; -// const API_URL = 'heroku route'; +// const API_URL = 'https://code-301-mars.herokuapp.com/'; const API_URL = 'http://localhost:3000/api/v1'; (function (module) { @@ -9,15 +9,25 @@ const API_URL = 'http://localhost:3000/api/v1'; this.id = obj.id; this.rover = obj.rover; this.camera = obj.camera; - this.url = obj.url; + this.url = obj.url; } Image.all = []; + Image.faves = []; Image.fetchImages = (cb) => { + let camShort = ''; + if($('#camera option:selected').text() == 'Navigation') { + camShort = "NAVCAM"; + }else if($('#camera option:selected').text() == 'Front Hazard') { + camShort = "FHAZ"; + }else{ + camShort = "RHAZ"; + } + const options = { - rover: 'curiosity', - camera: 'fhaz', - date: '2015-12-13' + rover: $('#rover option:selected').text(), + camera: camShort, + date: $('#date').val() } $.get(`${API_URL}/nasa`, options) .then(Image.loadAll) @@ -25,10 +35,40 @@ const API_URL = 'http://localhost:3000/api/v1'; .fail(console.error); } + Image.fetchFaves = () =>{ + + Image.all = []; + const user = { + user: $('#userInput').val() + } + $.get(`${API_URL}/favorites`, user) + .then(Image.loadFaves) + .fail(console.error); + + console.log("this is in fetchFaves", Image.all); + + + $('#favorites-wrapper').show(); + + } + Image.loadFaves = (data) => { + Image.all = data.map(obj => new Image(obj)); + console.log('this is in loadFaves', data); + console.log('this is image.all in loadFaves', Image.all) + $('#favorites-wrapper').empty(); + app.Image.all.map(image => $('#favorites-wrapper').append(image.toHtml())); + + } + Image.loadAll = (data) => { Image.all = data.map(obj => new Image(obj)); - console.log(Image.all); - //app.imageView.initDiscoverPage(); + console.log('this is in loadAll', Image.all); + app.imageView.append(); + Image.all = []; + } + + Image.saveImage = (image) =>{ + $.post(`${API_URL}/favorites`, image) } Image.prototype.toHtml = function () { diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..48e341a --- /dev/null +++ b/package-lock.json @@ -0,0 +1,3 @@ +{ + "lockfileVersion": 1 +} diff --git a/styles/.DS_Store b/styles/.DS_Store new file mode 100644 index 0000000..5007f20 Binary files /dev/null and b/styles/.DS_Store differ diff --git a/styles/base.css b/styles/base.css new file mode 100644 index 0000000..5c45170 --- /dev/null +++ b/styles/base.css @@ -0,0 +1,53 @@ +body { + margin: 0; + padding: 0; + background-color: #000000; + +} + +h1 { + + font-family: 'Carter One',cursive; + + font-size: 2.3em; + color: rgb(228, 53, 9); + margin: 0; + padding-top: 50px; + padding-left: 100px; + position: absolute; + z-index: 1; +} + +h2 { + + font-family: 'Carter One', cursive; + + font-size: 1.7em; +} + +h3 { + + font-family: 'Carter One', cursive; + font-size: 1.3em; + +} + +p { + font-family: 'Roboto', sans-serif; + font-size: 1em; +} + +a { + text-decoration: none; + color: rgb(251, 153, 76); + display: block; + } + +a:hover { + color: rgb(228, 53, 9); + } + +a.active { + color: rgb(251, 153, 76); + cursor: default; + } diff --git a/styles/layout.css b/styles/layout.css new file mode 100644 index 0000000..d0f063b --- /dev/null +++ b/styles/layout.css @@ -0,0 +1,16 @@ +#home { + background-color: #000000; + +} + +#learn { + background-image: url('https://www.nasa.gov/sites/default/files/thumbnails/image/hubble_friday_05292015.jpg'); + background-position: center top; + background-repeat: repeat; +} + +footer{ + width: 100%; + margin: 0 auto; + } + \ No newline at end of file diff --git a/styles/module.css b/styles/module.css new file mode 100644 index 0000000..f51b393 --- /dev/null +++ b/styles/module.css @@ -0,0 +1,98 @@ +/* Navigation module */ + +.nav ul { + list-style: none; + text-align: center; + padding: 0; + margin: 0px auto; + background-color: #000000; + } + +.nav li { + display: inline-block; + font-family: 'Carter One', cursive; + font-size: 1.25em; + line-height: 40px; + height: 40px; + padding: 5px 10px; + } + +.nav a { + text-decoration: none; + color: rgb(251, 153, 76); + display: block; + } + +.nav a:hover { + color: rgb(228, 53, 9); + } + +.nav a.active { + color: rgb(251, 153, 76); + cursor: default; + } + + + +/* Container module for Gallery */ + + #gallery-wrapper { + position: relative; + display: flex; + justify-content: space-around; + flex-wrap: wrap; + padding: 40px 40px 100px 40px; + } + + .imageBlock { + display: block; + position: relative; + width: 25%; + height: 200px; + margin: 20px 0; + padding: 40px; + background-position: center; + background-size: cover; + text-align: center; + border-radius: 20px; + transition: box-shadow .3s ease-in-out; + } + + /* Container module for Favorites */ + + #favorites-wrapper { + position: relative; + display: flex; + justify-content: space-around; + flex-wrap: wrap; + padding: 40px 40px 100px 40px; + + } + +.imageBlock { + display: block; + position: relative; + width: 25%; + height: 200px; + margin: 20px 0; + padding: 40px; + background-position: center; + background-size: cover; + text-align: center; + border-radius: 20px; + transition: box-shadow .3s ease-in-out; + } +/* LEARN page module */ + +div.faq_container { + background-color: #ffffff; + background-size: cover; + opacity: 0.8; + width: 80%; + position: relative; + margin-left: auto; + margin-right: auto; + height: 2000px; + padding-top: 100px; + padding-left: 150px; + } diff --git a/styles/state.css b/styles/state.css new file mode 100644 index 0000000..e69de29 diff --git a/styles/theme.css b/styles/theme.css new file mode 100644 index 0000000..ba62feb --- /dev/null +++ b/styles/theme.css @@ -0,0 +1,99 @@ +/* Learn Page/FAQ styling */ + +div.faq p#question { + font-family: 'Roboto', sans-serif; + font-weight: bold; + font-size: 20px; + color: #35aa06; + margin: 2%; + + } + +/* Learn page styling */ +div.faq p#answer { + font-family: 'Roboto', sans-serif; + font-size: 18px; + color: rgb(37,57,79); + margin: 2%; + } + + +/* About page styling */ + +#about h2 { + font-size: 40px; + color: rgb(74,98,163); + width:60%; + justify-content: space-around; + text-align: center; + padding-left: 15%; + padding-right: 15%; + +} +#about h3 { + font-weight: bold; + font-size: 30px; + color: #35aa06; + padding-left: 70px; +} + +#about p#bio { + font-family: 'Roboto', sans-serif; + font-size: 20px; + color: rgb(250, 245, 245); + margin-top: 100px; + justify-content: space-around; + justify-content: space-between; + +} + +#about img{ + display: block; + position: relative; + width: 25%; + height: 25%; + padding: 20px; + background-position: center; + background-size: cover; + text-align: center; + border-radius: 10px; + float:left; + clear: both; + margin-left: 30px; + } + +#about .bio-wrapper{ + display: block; + block-size: 20%; + width: 100%; + float:right; + clear: both; + padding: 30px 30px 50px 50px; +} + +/* Favorites page styling */ +#getFaves{ + display:block; + block-size: 80%; + color: rgb(74,98,163); + text-align:center; + font-size: 1.3em; + font-weight:bold; + padding-top: 100px; + padding-bottom: 100px; +} + +#favorites-wrapper { + + position: relative; + width: 80%; + height:auto; + justify-content: space-around; + justify-content: space-between; + background-position: center; + text-align: center; + border-radius: 10px; + margin-left: 100px; + background-color:rgb(74,98,163); + padding-top: 200px; +} \ No newline at end of file diff --git a/styles/vendor/.DS_Store b/styles/vendor/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/styles/vendor/.DS_Store differ diff --git a/styles/vendor/normalize.css b/styles/vendor/normalize.css new file mode 100644 index 0000000..fa4e73d --- /dev/null +++ b/styles/vendor/normalize.css @@ -0,0 +1,447 @@ +/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in + * IE on Windows Phone and in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers (opinionated). + */ + +body { + margin: 0; +} + +/** + * Add the correct display in IE 9-. + */ + +article, +aside, +footer, +header, +nav, +section { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * Add the correct display in IE 9-. + * 1. Add the correct display in IE. + */ + +figcaption, +figure, +main { /* 1 */ + display: block; +} + +/** + * Add the correct margin in IE 8. + */ + +figure { + margin: 1em 40px; +} + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * 1. Remove the gray background on active links in IE 10. + * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. + */ + +a { + background-color: transparent; /* 1 */ + -webkit-text-decoration-skip: objects; /* 2 */ +} + +/** + * 1. Remove the bottom border in Chrome 57- and Firefox 39-. + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Prevent the duplicate application of `bolder` by the next rule in Safari 6. + */ + +b, +strong { + font-weight: inherit; +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font style in Android 4.3-. + */ + +dfn { + font-style: italic; +} + +/** + * Add the correct background and color in IE 9-. + */ + +mark { + background-color: #ff0; + color: #000; +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Add the correct display in IE 9-. + */ + +audio, +video { + display: inline-block; +} + +/** + * Add the correct display in iOS 4-7. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Remove the border on images inside links in IE 10-. + */ + +img { + border-style: none; +} + +/** + * Hide the overflow in IE. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers (opinionated). + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: sans-serif; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { /* 1 */ + text-transform: none; +} + +/** + * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` + * controls in Android 4. + * 2. Correct the inability to style clickable types in iOS and Safari. + */ + +button, +html [type="button"], /* 1 */ +[type="reset"], +[type="submit"] { + -webkit-appearance: button; /* 2 */ +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * 1. Add the correct display in IE 9-. + * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Remove the default vertical scrollbar in IE. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10-. + * 2. Remove the padding in IE 10-. + */ + +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. + */ + +[type="search"]::-webkit-search-cancel-button, +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in IE 9-. + * 1. Add the correct display in Edge, IE, and Firefox. + */ + +details, /* 1 */ +menu { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Scripting + ========================================================================== */ + +/** + * Add the correct display in IE 9-. + */ + +canvas { + display: inline-block; +} + +/** + * Add the correct display in IE. + */ + +template { + display: none; +} + +/* Hidden + ========================================================================== */ + +/** + * Add the correct display in IE 10-. + */ + +[hidden] { + display: none; +} diff --git a/views/imageView.js b/views/imageView.js index a6c1149..ce952e9 100644 --- a/views/imageView.js +++ b/views/imageView.js @@ -9,17 +9,39 @@ var app = app || {}; $('main section').hide(); $('#photos').show(); - $('#dropDowns').on('submit', (e) => { + $('#dropdowns').on('submit', (e) => { e.preventDefault(); - const object = { - rover: $('#dropDowns select[value="rover"]').value(), - // camera: $('#dropDowns select[name="camera"]').value(), - // date: $('#dropDowns input[name = "dateInput"]').val() - }; - console.log(object); + app.Image.fetchImages(); }) - // app.Image.all.map(image => $('#photos').append(image.toHtml())); - }; + + + + + +}; + imageView.append = () => { + + $('#gallery-wrapper').empty(); + app.Image.all.map(image => $('#gallery-wrapper').append(image.toHtml())); + $('.favImage').on('submit', function (event) { + event.preventDefault(); + + const rover = $('#rover option:selected').text(); + const img_id = $(this).find('img').attr('id'); + const img_num = img_id.slice(1); + const src = $(this).find('img').attr('src'); + + const image = { + image_id: img_num, + rover: rover, + camera: $('#camera option:selected').text(), + url: src, + user: $('#user').val() + } + app.Image.saveImage(image); + + }); + } imageView.initHomePage = () => { $('main section').hide(); @@ -34,6 +56,13 @@ var app = app || {}; imageView.initFavesPage = () => { $('main section').hide(); $('#favePhotos').show(); + + $('#getFaves').on('submit', (e) => { + e.preventDefault(); + app.Image.fetchFaves(); + }) + + } imageView.initAboutPage = () => {