From cc62b1a2c706c8b8dc03af1c8b7bed472552eab7 Mon Sep 17 00:00:00 2001 From: andres alcocer Date: Tue, 13 Nov 2018 20:00:07 -0500 Subject: [PATCH] search icon functionality --- src/components/MovieRow/MovieRow.js | 8 -- .../NavigationItems/NavigationItems.js | 6 -- src/containers/Navigation/Navigation.js | 32 +++++--- src/containers/SearchMovie/SearchMovie.js | 75 ------------------- src/static/sass/base/_base.scss | 2 +- src/static/sass/components/_movie.scss | 12 +-- src/static/sass/layout/_navigation.scss | 4 +- 7 files changed, 25 insertions(+), 114 deletions(-) delete mode 100644 src/containers/SearchMovie/SearchMovie.js diff --git a/src/components/MovieRow/MovieRow.js b/src/components/MovieRow/MovieRow.js index c6b32cd..6c31810 100644 --- a/src/components/MovieRow/MovieRow.js +++ b/src/components/MovieRow/MovieRow.js @@ -6,14 +6,6 @@ const movieRow = (props) => (
- - {/*
-

{props.movie.title}

-

{props.movie.overview}

- { window.location.href = "https://www.themoviedb.org/movie/" + props.movie.id; }}> - view -
*/} ); diff --git a/src/components/NavigationItems/NavigationItems.js b/src/components/NavigationItems/NavigationItems.js index d940b34..0aeca69 100644 --- a/src/components/NavigationItems/NavigationItems.js +++ b/src/components/NavigationItems/NavigationItems.js @@ -43,12 +43,6 @@ class NavigationItems extends Component {
- {/* */} - {/* */} - {/*

hello

-

hello

*/}
); diff --git a/src/containers/Navigation/Navigation.js b/src/containers/Navigation/Navigation.js index 4349dbf..48a35ab 100644 --- a/src/containers/Navigation/Navigation.js +++ b/src/containers/Navigation/Navigation.js @@ -1,7 +1,6 @@ import React, { Component } from 'react'; - -import NavigationItems from '../../components/NavigationItems/NavigationItems'; - +import NavigationItem from '../../components/NavigationItems/NavigationItem/NavigationItem' +import SearchLogo from '../../static/images/search-icon.svg'; class navigation extends Component { state = { @@ -32,15 +31,24 @@ class navigation extends Component { return ( ) } diff --git a/src/containers/SearchMovie/SearchMovie.js b/src/containers/SearchMovie/SearchMovie.js deleted file mode 100644 index b803674..0000000 --- a/src/containers/SearchMovie/SearchMovie.js +++ /dev/null @@ -1,75 +0,0 @@ -// import React, { Component } from 'react'; -// import axios from "axios"; -// // import Search from '../../components/Search/Search'; -// import MovieRow from '../../components/MovieRow/MovieRow'; -// import Layout from '../Layout/Layout'; - - -// class SearchMovie extends Component { - -// state = { -// // an array that will hold all of our movies component -// rows: [], -// myVal: false -// } - -// makeAipCall = (searchItem) => { -// const url = "https://api.themoviedb.org/3/search/movie?api_key=224ce27b38a3805ecf6f6c36eb3ba9d0&page=1&query=" + searchItem; -// axios.get(url) -// .then(res => { -// // extract the data from json object -// const movies = res.data.results; -// // Holds our movieComponent. -// let movieRows = []; -// let total = 0; -// movies.forEach((movie) => { -// // manually build our image url and set it on the movie object -// movie.posterSrc = "https://image.tmdb.org/t/p/w185" + movie.poster_path; -// total+= 1; -// // pass in the movie object to our MovieRow component and keep it in a variable called -// // movieComponent -// const movieComponent = -// // push our movieComponent to our movieRows array; -// movieRows.push(movieComponent); -// }) -// // update state -// this.setState({ rows: movieRows }); -// }).catch(error => { -// console.log(error); -// }); -// } - - - -// // get the user input and pass it to the makeAPICall function -// searchHandler = (event) => { -// // const searchItem = event.target.value; -// // this.makeAipCall(searchItem); -// alert("Hello"); -// } - - -// render() { - - - -// return ( -//
-// -// {/* */} -// {event.key} -//
- -// ); -// } -// } - -// export default SearchMovie; \ No newline at end of file diff --git a/src/static/sass/base/_base.scss b/src/static/sass/base/_base.scss index 8455717..8d1e4cc 100644 --- a/src/static/sass/base/_base.scss +++ b/src/static/sass/base/_base.scss @@ -69,7 +69,7 @@ html { background-color: $color-background; height: 150%; padding-bottom: 10rem; - + padding-left: 4rem; } diff --git a/src/static/sass/components/_movie.scss b/src/static/sass/components/_movie.scss index b1d045d..7750d46 100644 --- a/src/static/sass/components/_movie.scss +++ b/src/static/sass/components/_movie.scss @@ -5,7 +5,8 @@ &__column-poster { height: 25rem; - width: 18rem; + width: 17.5rem; + } &__poster { @@ -16,12 +17,3 @@ div.movie:first-child { padding-top: 15rem; } - -.even { - background-color: $color-purple; -} - -.odd { - background-color: $color-light-blue-2; - -} \ No newline at end of file diff --git a/src/static/sass/layout/_navigation.scss b/src/static/sass/layout/_navigation.scss index 06c169c..6f248e9 100644 --- a/src/static/sass/layout/_navigation.scss +++ b/src/static/sass/layout/_navigation.scss @@ -54,11 +54,11 @@ input[type="text"] { font-size: 1.4rem; border: none; outline: none; - background-color: red; + // background-color: red; width: 0px; padding: 10px; padding-right: 2rem; - // background: none; + background: none; transition: width .5s cubic-bezier(0.000, 0.795, 0.000, 1.000); cursor: pointer; }