CloudStorage / templates /movieDetail.html
thejagstudio's picture
Update templates/movieDetail.html
a8df994 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>{{data.title}}</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body>
<div class="bg-white relative overflow-x-hidden h-full min-h-screen">
<div id="previewContainer" class="bg-[#313131] origin-center absolute flex flex-col scale-0 top-0 left-0 h-full w-full transition-all duration-500 z-50">
<svg onclick="preview('{{ file.2 }}')" width="32" height="32" class="top-5 right-20 fixed top-0 bg-red-500 p-1 hover:scale-110 transition-all cursor-pointer z-50 rounded-full" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M11.293 3.293a1 1 0 1 1 1.414 1.414L9.414 8l3.293 3.293a1 1 0 0 1-1.414 1.414L8 9.414l-3.293 3.293a1 1 0 0 1-1.414-1.414L6.586 8 3.293 4.707a1 1 0 0 1 1.414-1.414L8 6.586z" />
</svg>
<iframe id="previewIframe" src="" frameborder="0" seamless="" draggable="false" loading="lazy" decoding="async" data-nimg="1" class="fixed top-0 h-[100vh] w-full z-10 rounded-sm object-cover object-center" style="color: transparent"></iframe>
</div>
<header class="h-20 flex m-4 justify-between items-center mb-4">
<!-- logo - start -->
<a href="/" class="my-5 inline-flex items-center text-black-800 text-2xl md:text-3xl font-bold gap-2.5" aria-label="logo">
<svg class="w-[10%] text-indigo-500" id="outputsvg" xmlns="http://www.w3.org/2000/svg" style="transform: none; transform-origin: 50% 50%; cursor: move; transition: none 0s ease 0s" viewBox="0 0 3500 3500">
<g id="l5TLm6F9JGem8YOQ8A41YML" fill="rgb(100,103,241)" style="transform: none">
<g><path id="pulsHdoRs" d="M1455 3470 c-164 -30 -323 -83 -480 -160 -487 -242 -829 -689 -935 -1226 -28 -139 -37 -389 -21 -534 64 -550 390 -1040 879 -1319 170 -98 440 -186 642 -211 203 -24 460 -7 658 45 609 160 1093 651 1246 1263 120 479 34 978 -238 1387 -258 387 -641 646 -1101 745 -149 33 -495 38 -650 10z m488 -574 c37 -7 70 -15 72 -18 3 -3 -39 -24 -92 -48 -214 -94 -369 -196 -520 -343 -336 -327 -433 -761 -242 -1084 19 -31 67 -89 107 -130 40 -40 70 -73 67 -73 -15 0 -143 54 -225 95 -221 111 -505 336 -517 410 -9 55 17 270 43 362 121 418 441 719 869 818 117 28 326 33 438 11z m360 -132 c271 -152 315 -279 149 -436 -70 -67 -94 -78 -165 -78 -46 0 -61 6 -127 51 -90 62 -156 92 -258 121 -65 17 -95 20 -187 15 -153 -7 -269 -48 -381 -133 -27 -21 -44 -31 -38 -23 110 147 205 237 364 343 100 67 296 166 395 199 l70 24 55 -23 c30 -12 85 -39 123 -60z m-1463 -1370 c262 -187 520 -287 807 -314 125 -12 210 -3 313 31 81 26 86 29 188 96 128 86 196 84 296 -8 59 -54 106 -135 106 -183 -1 -41 -30 -104 -66 -139 -47 -47 -187 -136 -271 -172 -299 -129 -612 -133 -916 -10 -250 102 -488 336 -599 590 -42 96 -74 194 -83 254 l-7 44 73 -64 c41 -36 112 -92 159 -125z"></path></g>
</g>
</svg>
Cloud Storage
</a>
<!-- logo - end -->
<!-- nav - start -->
<nav class="hidden lg:flex gap-12">
<a href="/" class="text-gray-600 hover:text-indigo-500 active:text-indigo-700 text-lg font-semibold transition duration-100">Home</a>
<a href="/list" class="text-gray-600 hover:text-indigo-500 active:text-indigo-700 text-lg font-semibold transition duration-100">List</a>
<a href="/upload" class="text-gray-600 hover:text-indigo-500 active:text-indigo-700 text-lg font-semibold transition duration-100">Upload</a>
<a href="/movie" class="text-indigo-500 text-lg font-semibold">Movie</a>
<a href="/logout" class="text-gray-600 hover:text-indigo-500 active:text-indigo-700 text-lg font-semibold transition duration-100">Logout</a>
</nav>
<!-- nav - end -->
<!-- buttons - start -->
<div id="nav" onmouseout="outB()" onmouseover="inB()" class="overflow-visible z-10 mt-[150px] grid grid-cols-1 grid-rows-5">
<button type="button" class="shadow-xl inline-flex items-center lg:hidden bg-gray-200 hover:bg-gray-300 focus-visible:ring ring-indigo-300 text-gray-500 active:text-gray-700 text-sm md:text-base font-semibold rounded-lg gap-2 px-2.5 py-2">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h6a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z" clip-rule="evenodd" />
</svg>
Menu
</button>
<a href="../" class="mt-2 hidden bg-white rounded-t-lg px-2 text-gray-600 hover:text-indigo-500 active:text-indigo-700 text-lg font-semibold transition duration-100">Home</a>
<a href="../list" class="shadow-xl hidden bg-white px-2 text-gray-600 hover:text-indigo-500 active:text-indigo-700 text-lg font-semibold transition duration-100">List</a>
<a href="../upload" class="shadow-xl hidden bg-white px-2 text-gray-600 hover:text-indigo-500 active:text-indigo-700 text-lg font-semibold transition duration-100">Upload</a>
<a href="../movie" class="shadow-xl hidden bg-white px-2 text-indigo-500 hover:text-indigo-500 active:text-indigo-700 text-lg font-semibold transition duration-100">Movie</a>
<a href="../logout" class="shadow-xl hidden bg-white px-2 text-gray-600 hover:text-indigo-500 active:text-indigo-700 text-lg font-semibold transition duration-100 rounded-b-lg">Logout</a>
</div>
<!-- buttons - end -->
</header>
<section class="relative">
<div class="absolute h-full w-full bg-cover bg-[top_center] bg-no-repeat">
<img src="https://image.tmdb.org/t/p/w1280{{data.backdrop_path}}" class="w-full opacity-50 object-cover h-full blur-2xl scale-110 translate-y-16" />
</div>
<div class="mx-auto w-[80%] h-full py-10">
<div class="flex flex-col gap-10">
<div class="z-[2] flex flex-col items-start gap-10 lg:flex-row">
<div class="flex w-full flex-col items-center justify-center rounded-xl lg:block lg:w-auto">
<div class="group relative flex w-full items-center justify-center hover:cursor-pointer">
<a target="_blank" class="absolute inset-x-0 mx-auto flex h-full w-full items-center justify-center opacity-0 transition-opacity group-hover:opacity-100 md:hidden" href="https://youtube.com/watch?v=Y0ZsLudtfjI">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-play h-20 w-20 text-white">
<circle cx="12" cy="12" r="10"></circle>
<polygon points="10 8 16 12 10 16 10 8"></polygon>
</svg>
</a>
<button type="button" aria-haspopup="dialog" aria-expanded="false" aria-controls="radix-:Rid7rrqja:" data-state="closed" class="absolute inset-x-0 mx-auto hidden h-full w-full items-center justify-center opacity-0 transition-opacity group-hover:opacity-100 md:flex">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-play h-20 w-20 text-white">
<circle cx="12" cy="12" r="10"></circle>
<polygon points="10 8 16 12 10 16 10 8"></polygon>
</svg>
</button>
<img loading="lazy" width="300" height="400" decoding="async" data-nimg="1" class="rounded-xl border-[3px] border-white" style="color: transparent" src="https://image.tmdb.org/t/p/w1280{{data.poster_path}}" />
</div>
</div>
<div class="flex-1 space-y-5">
<div class="space-y-3">
<h1 class="text-3xl font-bold tracking-wide">{{data.title}}</h1>
<div class="flex flex-col items-start gap-2 md:flex-row md:items-center">
<p>{{data.release_date }}</p>
<span class="hidden md:inline-block"></span>
<div class="space-x-2">
{% for genre in data.genres %}
<span class="underline underline-offset-4">{{genre.name}}</span>
{% endfor %}
</div>
<span class="hidden md:inline-block"></span>
<p>{{data.runtime}}<!-- -->min</p>
</div>
</div>
<div class="flex flex-col gap-2">
<div class="flex items-center gap-2">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#FF9900" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-star text-[#FF9900]"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>
<p class="text-lg capitalize">{{data.vote_average}} / 10</p>
</div>
<div class="flex items-center gap-2">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-thumbs-up">
<path d="M7 10v12"></path>
<path d="M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z"></path>
</svg>
<p class="text-lg capitalize">{{data.vote_count}}</p>
</div>
</div>
<div class="flex w-full flex-col gap-3">
<h1 class="text-xl font-semibold">Plot Summary</h1>
<p class="line-clamp-4">{{data.overview}}</p>
</div>
<div class="space-y-5">
<h1 class="text-xl font-semibold">Top Casts</h1>
<div class="flex overflow-x-scroll w-[50rem] flex-row items-center gap-10">
{% for cast in data.credits.cast %}
<div class="flex items-center gap-2 w-fit mr-5">
<img alt="{{cast.name}}" loading="lazy" width="50" height="50" decoding="async" data-nimg="1" class="rounded-full border-2 border-white aspect-square object-cover" src="https://media.themoviedb.org/t/p/w138_and_h175_face/{{cast.profile_path}}" />
<div class="flex flex-col w-full">
<p class="font-semibold whitespace-nowrap">{{cast.name}}</p>
<p class="text-sm text-foreground/50 whitespace-nowrap">{{cast.character}}</p>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>
<video controls="controls" id="moviePlayer" class="absolute inset-0 z-50 w-full h-full object-cover">
{% for link in data.watchLink.streamingData.adaptiveFormats %}
<source src="{{link.url}}" type="video/mp4" />
{% endfor %}
</video>
</section>
</div>
<script>
function inB(event) {
ass = document.getElementById("nav").getElementsByTagName("a");
for (let i = 0; i < ass.length; i++) {
ass[i].classList.remove("hidden");
}
}
function outB(event) {
ass = document.getElementById("nav").getElementsByTagName("a");
for (let i = 0; i < ass.length; i++) {
ass[i].classList.add("hidden");
}
}
function openMovie(id) {
let videoLink = "https://drive.google.com/uc?export=download&id=" + id;
document.getElementById("moviePlayer").src = videoLink;
}
</script>
</body>
</html>