generated from Nemwel-Boniface/WebpackSetUp
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from Nemwel-Boniface/displayMovies
Project Milestone 4 : Display movies
- Loading branch information
Showing
9 changed files
with
179 additions
and
82 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
node_modules/ | ||
node_modules/ | ||
|
||
dist |
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,26 +1,54 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
|
||
<!-- font awesome icons --> | ||
|
||
<link | ||
rel="stylesheet" | ||
href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||
/> | ||
|
||
<!--Google fonts Mochiy pop one, poppins--> | ||
|
||
<link href="https://fonts.googleapis.com/css2?family=Mochiy+Pop+One&display=swap" rel="stylesheet"> | ||
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;1,300;1,400&display=swap" rel="stylesheet"> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Mochiy+Pop+One&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;1,300;1,400&display=swap" | ||
rel="stylesheet" | ||
/> | ||
|
||
<title>Let's Chill</title> | ||
<script defer src="main.js"></script></head> | ||
<body> | ||
<header class="header"> | ||
<nav class="nav"> | ||
<a href="#"><h2>Lets Chill</h2></a> | ||
<ul> | ||
<li><a href="#">Movies<span>6</span></a></li> | ||
<li><a href="#">About</a></li> | ||
<li><a href="#">Contact</a></li> | ||
</ul> | ||
</nav> | ||
</header> | ||
</body> | ||
</html> | ||
<script defer src="main.js"></script></head> | ||
<body> | ||
<header class="header"> | ||
<nav class="nav"> | ||
<a href="#"><h2>Lets Chill</h2></a> | ||
<ul> | ||
<li> | ||
<a href="#">Movies<span>6</span></a> | ||
</li> | ||
<li><a href="#">About</a></li> | ||
<li><a href="#">Contact</a></li> | ||
</ul> | ||
</nav> | ||
</header> | ||
|
||
<main class="main"> | ||
<div class="image-container"> | ||
|
||
</div> | ||
</main> | ||
<footer> | ||
<p>© Created by <strong>let's Chill</strong> uderer cc licence</p> | ||
</footer> | ||
</body> | ||
</html> |
Large diffs are not rendered by default.
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 +1,31 @@ | ||
import './style.css'; | ||
import './style.css'; | ||
|
||
const url = 'https://api.tvmaze.com/shows/'; | ||
|
||
const movieWrapper = document.querySelector('.image-container'); | ||
const testMovie = async (url) => { | ||
movieWrapper.innerHTML = ''; | ||
for (let i = 720; i < 729; i += 1) { | ||
fetch(url + i) | ||
.then((response) => response.json()) | ||
.then((result) => { | ||
movieWrapper.innerHTML = `${movieWrapper.innerHTML} | ||
<div class="movie" id="${i}"> | ||
<img src="${result.image.medium}" alt="movie"> | ||
<div class="movieDesc"> | ||
<div class="movieDescTop"> | ||
<p>${result.name}</p> | ||
<a href="#"><i class="fa fa-heart" aria-hidden="true"></i> | ||
</a> | ||
</div> | ||
<p><span>2</span>Likes</p> | ||
</div> | ||
<div class="movieBtn"> | ||
<button id="${i}" class="comments" type="button">Comments</button> | ||
<button class="reservations" type="button">Reservations</button> | ||
</div> | ||
</div>`; | ||
}); | ||
} | ||
}; | ||
testMovie(url); |
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