-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b857a7
commit 24306c0
Showing
6 changed files
with
53 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,35 @@ | ||
import './MovieCard.scss'; | ||
|
||
export const MovieCard = () => <>Put the card here</>; | ||
export const MovieCard = ({ movie }) => ( | ||
<div className="card" data-cy="Movie"> | ||
<div className="card-image"> | ||
<figure className="image is-4by3"> | ||
<img data-cy="MovieImage" src={movie.imgUrl} alt="Film logo" /> | ||
</figure> | ||
</div> | ||
|
||
<div className="card-content"> | ||
<div className="media"> | ||
<div className="media-left"> | ||
<figure className="image is-48x48"> | ||
<img src="images/imdb-logo.jpeg" alt="imdb" /> | ||
</figure> | ||
</div> | ||
|
||
<div className="media-content"> | ||
<p className="title is-8" data-cy="MovieTitle"> | ||
{movie.title} | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<div className="content"> | ||
<p data-cy="MovieDescription">{movie.description}</p> | ||
|
||
<a href={movie.imdbUrl} data-cy="MovieLink"> | ||
IMDB | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
// add styles here | ||
.card-image img { | ||
object-fit: contain; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
import { MovieCard } from '../MovieCard/MovieCard'; | ||
import './MovieList.scss'; | ||
|
||
export const MovieList = () => <>Put the list here</>; | ||
export const MovieList = ({ moviesFromServer }) => ( | ||
<div className="movies"> | ||
{moviesFromServer.map(movie => ( | ||
<MovieCard movie={movie} key={movie.imdbId} /> | ||
))} | ||
</div> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
// add styles here | ||
.movies { | ||
display: grid; | ||
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); | ||
gap: 20px; | ||
} |