388 lines
14 KiB
HTML
388 lines
14 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Watermelon Movies 🍉</title>
|
|
<!-- Favicon link -->
|
|
<link rel="icon" type="image/x-icon"
|
|
href="/icons/favicon_watermelon_icon.ico">
|
|
<!-- Tailwind CSS CDN -->
|
|
<link
|
|
href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css"
|
|
rel="stylesheet">
|
|
<style>
|
|
/* Custom styles for movie tiles */
|
|
.movie-tile {
|
|
transition: transform 0.3s;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.movie-tile:hover {
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
/* Background gradient color */
|
|
body {
|
|
background: linear-gradient(to right, #32cd32 50%, #ff6347 50%);
|
|
}
|
|
|
|
/* RTL text alignment */
|
|
.movie-tile h3, .movie-tile p {
|
|
text-align: left;
|
|
}
|
|
|
|
/* Fullscreen video player modal styles */
|
|
.video-modal {
|
|
display: none;
|
|
position: fixed;
|
|
z-index: 1000;
|
|
left: 50%;
|
|
top: 25%; /* Adjusted from 50% to 25% to move the modal up */
|
|
transform: translate(-50%, -25%); /* Adjusted the Y-translate value */
|
|
width: 100%; /* Adjust as needed */
|
|
height: 100%; /* Adjust as needed */
|
|
background-color: rgba(0, 0, 0, 0.9);
|
|
padding: 0;
|
|
margin: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
|
|
.video-modal-content {
|
|
position: relative;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.close {
|
|
position: absolute;
|
|
top: 20px;
|
|
right: 30px; /* Changed from left to right */
|
|
color: white;
|
|
font-size: 40px;
|
|
cursor: pointer;
|
|
z-index: 1010; /* Ensure it's above the iframe */
|
|
}
|
|
|
|
.video-container iframe {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
border: none;
|
|
}
|
|
|
|
|
|
.melon {
|
|
width: 6em;
|
|
height: 6em;
|
|
background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/21542/melon.svg) no-repeat no-repeat;
|
|
background-size: 48em; /* 6em * 8 */
|
|
background-position: 0% 0%;
|
|
|
|
animation: melonSequence 0.8s steps(7) infinite reverse;
|
|
|
|
margin: 0em auto;
|
|
}
|
|
|
|
@keyframes melonSequence {
|
|
from {
|
|
background-position: 0% 0%;
|
|
}
|
|
to {
|
|
background-position: 100% 0%;
|
|
}
|
|
}
|
|
|
|
.flex {
|
|
display: flex;
|
|
flex-direction: row-reverse; /* Reverse the order for RTL */
|
|
}
|
|
|
|
.search-input {
|
|
border-top-right-radius: 0;
|
|
border-bottom-right-radius: 0;
|
|
text-align: right; /* For RTL */
|
|
}
|
|
|
|
.search-btn {
|
|
border-top-left-radius: 0;
|
|
border-bottom-left-radius: 0;
|
|
color: black;
|
|
}
|
|
|
|
.coming-soon-slider {
|
|
scroll-snap-type: x mandatory;
|
|
overflow-x: scroll;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
|
|
.slider-container {
|
|
display: flex;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.slider-item {
|
|
flex: 0 0 auto;
|
|
width: 200px; /* Adjust the width as per your design */
|
|
scroll-snap-align: start;
|
|
}
|
|
|
|
.slider-item img {
|
|
width: 100%;
|
|
height: auto;
|
|
border-radius: 0.5rem;
|
|
}
|
|
|
|
/* Hide vertical scrollbar for the entire page */
|
|
body, html {
|
|
overflow-y: hidden; /* Hide vertical scrollbar */
|
|
max-height: 100vh; /* Optional: Limit the height of the body to the viewport height */
|
|
}
|
|
|
|
/* Hide horizontal scrollbar for the slider */
|
|
.slider-container {
|
|
-ms-overflow-style: none; /* IE and Edge */
|
|
scrollbar-width: none; /* Firefox */
|
|
}
|
|
|
|
.slider-container::-webkit-scrollbar {
|
|
display: none; /* Hide scrollbar for Chrome, Safari and Opera */
|
|
}
|
|
|
|
/* Ensure the body or main container supports vertical scrolling if needed */
|
|
body, .main-container {
|
|
overflow-x: hidden; /* Hide horizontal overflow */
|
|
overflow-y: auto; /* Enable vertical scrolling if content overflows */
|
|
}
|
|
|
|
/* Hide scrollbar for aesthetic purposes */
|
|
.coming-soon-slider::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.coming-soon-slider {
|
|
-ms-overflow-style: none; /* IE and Edge */
|
|
scrollbar-width: none; /* Firefox */
|
|
}
|
|
|
|
/* Custom styles for movie tiles */
|
|
.movie-tile {
|
|
transition: transform 0.3s;
|
|
cursor: pointer;
|
|
background: rgb(232, 222, 222); /* Set background to white */
|
|
border-radius: 15px; /* Rounded corners */
|
|
padding: 10px; /* Padding inside the tile */
|
|
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); /* Optional: adds shadow for depth */
|
|
}
|
|
|
|
.movie-tile:hover {
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.movie-tile img {
|
|
border-radius: 10px; /* Rounded corners for images */
|
|
margin-bottom: 10px; /* Space between image and text */
|
|
}
|
|
|
|
/* Ensure text is visible against the white background */
|
|
.movie-tile h3, .movie-tile p {
|
|
color: black; /* Dark text color for readability */
|
|
text-align: left;
|
|
margin: 5px 0; /* Margin for spacing */
|
|
font-family: 'Courier New', Courier, monospace; /* Monospace font */
|
|
}
|
|
|
|
body {
|
|
font-family: 'Courier New', Courier, monospace; /* Monospace font for all text */
|
|
}
|
|
|
|
|
|
|
|
|
|
</style>
|
|
</head>
|
|
<body class="text-black">
|
|
<div class="container mx-auto px-4">
|
|
<h1 class="text-6xl font-bold my-8 text-left">Watermelon Movies 🍉</h1>
|
|
<h2 class="text-left">🤘.The Jews took hollywood...we're stealing it back</h2>
|
|
<div class="melon"></div>
|
|
<div class="relative text-gray-600">
|
|
<input type="search" name="serch" placeholder="Search" class="bg-white h-10 px-5 pr-10 rounded-full text-sm focus:outline-none">
|
|
<button type="submit" class="absolute right-0 top-0 mt-3 mr-4">
|
|
<svg class="h-4 w-4 fill-current" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 56.966 56.966" style="enable-background:new 0 0 56.966 56.966;" xml:space="preserve" width="512px" height="512px">
|
|
<path d="M55.146,51.887L41.588,37.786c3.486-4.144,5.396-9.358,5.396-14.786c0-12.682-10.318-23-23-23s-23,10.318-23,23 s10.318,23,23,23c4.761,0,9.298-1.436,13.177-4.162l13.661,14.208c0.571,0.593,1.339,0.92,2.162,0.92 c0.779,0,1.518-0.297,2.079-0.837C56.255,54.982,56.293,53.08,55.146,51.887z M23.984,6c9.374,0,17,7.626,17,17s-7.626,17-17,17 s-17-7.626-17-17S14.61,6,23.984,6z"/>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
<br>
|
|
|
|
<div id="movies" class="grid grid-cols-1 md:grid-cols-3 lg:grid-cols-5 gap-4">
|
|
<!-- Movie tiles will be added here -->
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Coming Soon Section -->
|
|
<div id="comingSoon" class="my-8">
|
|
<h2 class="text-2xl font-bold mb-4 text-left pl-4">Coming Soon</h2>
|
|
<div
|
|
class="slider-container flex overflow-x-auto pl-4 pr-2 py-2 space-x-4">
|
|
<!-- Slider items will be added here by JavaScript -->
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Fullscreen video player modal -->
|
|
<div id="videoModal" class="video-modal">
|
|
<div class="video-modal-content">
|
|
<span class="close" onclick="closeVideoPlayer()">×</span>
|
|
<!-- Cloudflare Stream Video Player -->
|
|
<div id="videoContainer"
|
|
style="position: relative; padding-top: 10%; padding-bottom: 10%; width: 100%; height: 40%;">
|
|
<!-- Video iframe will be inserted here -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
fetchMovies();
|
|
});
|
|
|
|
const customURLs = {
|
|
"Simon Birch": "https://customer-1sg29b2sx40xqfiq.cloudflarestream.com/9bbbbb31d5eba50521e7f2c524ff38ac/watch",
|
|
"Drop Dead Fred": "https://customer-1sg29b2sx40xqfiq.cloudflarestream.com/b909bb0aa6763c9832ad4be50eaeb4b7/watch",
|
|
"Sneakers": "https://customer-1sg29b2sx40xqfiq.cloudflarestream.com/f3191be6c61879b6fde28cbbe9a13eed/watch",
|
|
"Barbie": "https://customer-1sg29b2sx40xqfiq.cloudflarestream.com/7e2087e531ef364ba1eb7d9974b2ca3b/watch",
|
|
"Oppenheimer": "https://customer-1sg29b2sx40xqfiq.cloudflarestream.com/c8a2ff260b91f7998e72b098cf0fd8f2/watch",
|
|
"Angel Heart": "https://customer-1sg29b2sx40xqfiq.cloudflarestream.com/6166aadd3d82cebfd6242079f39c316e/watch",
|
|
"El Topo": "https://customer-1sg29b2sx40xqfiq.cloudflarestream.com/9046cea25793e43d5dee945e0d8d4d84/watch",
|
|
"The Holy Mountain": "https://customer-1sg29b2sx40xqfiq.cloudflarestream.com/331ad3d67b0a56f6a2dae7630b1eec72/watch",
|
|
"Katyn": "https://customer-1sg29b2sx40xqfiq.cloudflarestream.com/f0f5ac7fa8d3b147cced19d265118bc4/watch",
|
|
"Blank Check": "https://customer-1sg29b2sx40xqfiq.cloudflarestream.com/075f8e99b0322088bcde884418e5e861/watch",
|
|
"Ri¢hie Ri¢h": "https://customer-1sg29b2sx40xqfiq.cloudflarestream.com/7cbcf7a43ba2b11dc683365cf2b889a2/watch",
|
|
"The Notorious Mr. Bout": "https://customer-1sg29b2sx40xqfiq.cloudflarestream.com/69377c0f9a20de89c1a1d479dd9435f8/watch",
|
|
"Lord of War": "https://customer-1sg29b2sx40xqfiq.cloudflarestream.com/26655c062a4a5a6a30af30eb995bcf35/watch",
|
|
"Fury": "https://customer-1sg29b2sx40xqfiq.cloudflarestream.com/26655c062a4a5a6a30af30eb995bcf35/watch",
|
|
"American Psycho": "https://customer-1sg29b2sx40xqfiq.cloudflarestream.com/26655c062a4a5a6a30af30eb995bcf35/watch",
|
|
"The Beekeper": "https://customer-1sg29b2sx40xqfiq.cloudflarestream.com/26655c062a4a5a6a30af30eb995bcf35/watch",
|
|
"John Wick Chapter 4": "https://customer-1sg29b2sx40xqfiq.cloudflarestream.com/26655c062a4a5a6a30af30eb995bcf35/watch",
|
|
"Patch Adams": "https://customer-1sg29b2sx40xqfiq.cloudflarestream.com/26655c062a4a5a6a30af30eb995bcf35/watch",
|
|
// ... add more custom URLs as needed
|
|
};
|
|
|
|
function mergeCustomURLs(movies, customURLs) {
|
|
return movies.map(movie => {
|
|
if (customURLs[movie.title]) {
|
|
return {...movie, customURL: customURLs[movie.title]};
|
|
}
|
|
return movie;
|
|
});
|
|
}
|
|
|
|
// Add this function to update the video player's URL and display it
|
|
function updateVideoPlayerAndShow(url) {
|
|
const videoContainer = document.getElementById('videoContainer');
|
|
videoContainer.innerHTML = `<iframe src="${url}" style="border: none; position: absolute; top: 0; left: 0; height: 100%; width: 100%;" allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe>`;
|
|
openVideoPlayer();
|
|
}
|
|
|
|
function displayMovies(movies) {
|
|
const moviesContainer = document.getElementById('movies');
|
|
movies.forEach(movie => {
|
|
const movieElement = document.createElement('div');
|
|
movieElement.className = 'movie-tile p-2';
|
|
movieElement.innerHTML = `
|
|
<img src="https://image.tmdb.org/t/p/w500${movie.poster_path}" alt="${movie.title}" class="w-full h-auto rounded">
|
|
<h3 class="text-xl font-semibold mt-2">${movie.title}</h3>
|
|
<p class="text-black-400 text-sm">${movie.overview}</p>
|
|
`;
|
|
|
|
const customURL = customURLs[movie.title];
|
|
if (customURL) {
|
|
movieElement.addEventListener('click', function() {
|
|
updateVideoPlayerAndShow(customURL);
|
|
});
|
|
}
|
|
|
|
moviesContainer.appendChild(movieElement);
|
|
});
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function openVideoPlayer() {
|
|
document.getElementById('videoModal').style.display = 'block';
|
|
}
|
|
|
|
function closeVideoPlayer() {
|
|
document.getElementById('videoModal').style.display = 'none';
|
|
// Correctly target the iframe and stop the video by resetting its 'src'
|
|
var iframe = document.getElementById('videoContainer').querySelector('iframe');
|
|
if (iframe) {
|
|
var iframeSrc = iframe.src;
|
|
iframe.src = iframeSrc; // This will effectively reload (and thus stop) the video
|
|
}
|
|
}
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
fetchSpecificMovies();
|
|
});
|
|
|
|
function fetchSpecificMovies() {
|
|
// Add 'Sneakers', 'Barbie', and 'Oppenheimer' to the array
|
|
const moviesToFetch = ['Patch Adams', 'Lord of War', 'The Notorious Mr. Bout', 'Fury', 'American Psycho', 'John Wick Chapter 4', 'The Beekeper', 'Ri¢hie Ri¢h', 'Blank Check','El Topo', 'The Holy Mountain','Angel Heart','Katyn','Simon Birch', 'Drop Dead Fred', 'Sneakers', 'Barbie', 'Oppenheimer', 'The Heist Before Christmas'];
|
|
moviesToFetch.forEach(title => {
|
|
searchMovie(title);
|
|
});
|
|
}
|
|
function searchMovie(movieTitle) {
|
|
const apiKey = '8bb85bb00bf81f0ad511a7609d736c7f'; // Replace with your actual API key
|
|
const url = `https://api.themoviedb.org/3/search/movie?api_key=${apiKey}&query=${encodeURIComponent(movieTitle)}`;
|
|
|
|
fetch(url)
|
|
.then(response => response.json())
|
|
.then(data => {
|
|
if (data.results.length > 0) {
|
|
const movie = data.results[0]; // Assuming the first result is the desired one
|
|
displayMovies([movie]); // Reusing your existing function to display the movie
|
|
} else {
|
|
console.log(`Movie not found: ${movieTitle}`);
|
|
}
|
|
})
|
|
.catch(error => console.error(`Fetching movie failed: ${movieTitle}`, error));
|
|
}
|
|
|
|
|
|
function fetchMovies() {
|
|
fetch('https://api.themoviedb.org/3/movie/popular?api_key=8bb85bb00bf81f0ad511a7609d736c7f&language=en')
|
|
.then(response => response.json())
|
|
.then(data => {
|
|
// displayMovies(data.results); // Display movies in grid
|
|
displayComingSoon(data.results); // Display movies in "Coming Soon" slider
|
|
})
|
|
.catch(error => console.error('Fetching movies failed:', error));
|
|
}
|
|
|
|
function displayComingSoon(movies) {
|
|
const comingSoonContainer = document.querySelector('.slider-container');
|
|
movies.forEach(movie => {
|
|
const sliderItem = document.createElement('div');
|
|
sliderItem.className = 'slider-item p-2 rounded-lg';
|
|
sliderItem.innerHTML = `
|
|
<img src="https://image.tmdb.org/t/p/w500${movie.poster_path}" alt="${movie.title}" class="rounded-lg w-full h-auto">
|
|
<h3 class="text-lg font-semibold mt-2">${movie.title}</h3>
|
|
`;
|
|
comingSoonContainer.appendChild(sliderItem);
|
|
});
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|