Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions MovieInfoApp/AckermanLevi1/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
body {
font-family: Arial, sans-serif;
}

header {
text-align: center;
background-color: #333;
color: #fff;
padding: 1rem;
}

main {
max-width: 800px;
margin: 0 auto;
padding: 1rem;
}

.search-bar {
text-align: center;
margin-bottom: 1rem;
}

#search-input {
width: 60%;
padding: 0.5rem;
border: 1px solid #ccc;
}

#search-button {
padding: 0.5rem 1rem;
background-color: #333;
color: #fff;
border: none;
cursor: pointer;
}

.movie-info {
display: flex;
align-items: center;
}

.poster img {
max-width: 200px;
}

.details {
margin-left: 1rem;
}

#movie-title {
font-size: 1.5rem;
margin: 0;
}

p {
margin: 0.5rem 0;
}
34 changes: 34 additions & 0 deletions MovieInfoApp/AckermanLevi1/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./index.css">
<title>Movie Info Website</title>
</head>
<body>
<header>
<h1>Movie Info Website</h1>
</header>
<main>
<div class="search-bar">
<input type="text" id="search-input" placeholder="Search for a movie">
<button id="search-button">Search</button>
</div>
<div class="movie-info">
<div class="poster">
<img id="movie-poster" src="" alt="Movie Poster">
</div>
<div class="details">
<h2 id="movie-title"></h2>
<p>Genre: <span id="movie-genre"></span></p>
<p>Cast: <span id="movie-cast"></span></p>
<p>IMDb Rating: <span id="movie-rating"></span></p>
<p>Released Date: <span id="movie-released"></span></p>
<p>Director: <span id="movie-director"></span></p>
</div>
</div>
</main>
<script src="./index.js"></script>
</body>
</html>
32 changes: 32 additions & 0 deletions MovieInfoApp/AckermanLevi1/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const searchButton = document.getElementById('search-button');
const searchInput = document.getElementById('search-input');
const movieTitle = document.getElementById('movie-title');
const movieGenre = document.getElementById('movie-genre');
const movieCast = document.getElementById('movie-cast');
const movieRating = document.getElementById('movie-rating');
const movieReleased = document.getElementById('movie-released');
const movieDirector = document.getElementById('movie-director');
const moviePoster = document.getElementById('movie-poster');

searchButton.addEventListener('click', () => {
// Fetch movie data from an API or your database and update the DOM elements accordingly.
// For example, you can use the OMDB API for this purpose.
const apiKey = 'adff2bf8';
const query = searchInput.value;

// Make an API request to get movie data
fetch(`https://www.omdbapi.com/?t=${query}&apikey=${apiKey}`)
.then(response => response.json())
.then(data => {
movieTitle.textContent = data.Title;
movieGenre.textContent = data.Genre;
movieCast.textContent = data.Actors;
movieRating.textContent = data.imdbRating;
movieReleased.textContent = data.Released;
movieDirector.textContent = data.Director;
moviePoster.src = data.Poster;
})
.catch(error => {
console.error('Error fetching data: ', error);
});
});