Spaces:
Sleeping
Sleeping
Update templates/home.html
Browse files- templates/home.html +188 -188
templates/home.html
CHANGED
|
@@ -1,188 +1,188 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="en">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8">
|
| 5 |
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
| 6 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
-
<title>Hemaroo</title>
|
| 8 |
-
<link href="static/hagimaru.png" rel="icon" type="image/gif"/>
|
| 9 |
-
<script src="static/tailwindcss.js"></script>
|
| 10 |
-
<style>
|
| 11 |
-
.noScrollBar::-webkit-scrollbar {
|
| 12 |
-
display: none;
|
| 13 |
-
}
|
| 14 |
-
</style>
|
| 15 |
-
</head>
|
| 16 |
-
<body class="overflow-x-hidden mb-5 h-fit">
|
| 17 |
-
<nav class="bg-[#191A1B] sticky top-0 z-20">
|
| 18 |
-
<div class="mx-auto px-2 sm:px-6 lg:px-8">
|
| 19 |
-
<div class="relative flex h-16 items-center justify-between">
|
| 20 |
-
<div class="flex flex-1 items-center justify-start">
|
| 21 |
-
<div class="flex flex-shrink-0 mr-8">
|
| 22 |
-
<img class="block h-10 w-auto lg:hidden" src="static/shemaroo_logo.svg" alt="Your Company">
|
| 23 |
-
<img class="hidden h-10 w-auto lg:block" src="static/shemaroo_logo.svg" alt="Your Company">
|
| 24 |
-
</div>
|
| 25 |
-
<div class="hidden sm:ml-6 sm:block">
|
| 26 |
-
<div class="flex">
|
| 27 |
-
<a href="/" class="w-fit p-4 text-white font-bold border-b-[5px] border-red-600">Home</a>
|
| 28 |
-
<a href="#" class="w-fit p-4 text-gray-300 hover:text-white hover:font-bold hover:border-b-[5px] hover:border-red-600 transition-all">Movie</a>
|
| 29 |
-
<a href="#" class="w-fit p-4 text-gray-300 hover:text-white hover:font-bold hover:border-b-[5px] hover:border-red-600 transition-all">Shows</a>
|
| 30 |
-
<a href="#" class="w-fit p-4 text-gray-300 hover:text-white hover:font-bold hover:border-b-[5px] hover:border-red-600 transition-all">Channels</a>
|
| 31 |
-
<a href="#" class="w-fit p-4 text-gray-300 hover:text-white hover:font-bold hover:border-b-[5px] hover:border-red-600 transition-all">Live</a>
|
| 32 |
-
<a href="#" class="w-fit p-4 text-gray-300 hover:text-white hover:font-bold hover:border-b-[5px] hover:border-red-600 transition-all">Browse</a>
|
| 33 |
-
</div>
|
| 34 |
-
</div>
|
| 35 |
-
</div>
|
| 36 |
-
<div class="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0">
|
| 37 |
-
<div class="relative ml-3">
|
| 38 |
-
<button type="button" class="flex rounded-full text-sm focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-gray-800" id="user-menu-button" aria-expanded="false" aria-haspopup="true">
|
| 39 |
-
<img class="h-8 w-8 rounded-full" src="static/search_not_selected.svg" alt="">
|
| 40 |
-
</button>
|
| 41 |
-
</div>
|
| 42 |
-
</div>
|
| 43 |
-
</div>
|
| 44 |
-
</div>
|
| 45 |
-
<div class="sm:hidden bg-[#222222]" id="mobile-menu">
|
| 46 |
-
<div class="space-y-1 px-2 pt-2 pb-3 flex flex-nowrap">
|
| 47 |
-
<a href="/" class="text-white font-bold border-b-[5px] border-red-600 block px-3 py-2 text-base font-medium" aria-current="page">Home</a>
|
| 48 |
-
<a href="#" class="text-gray-300 hover:text-white hover:font-bold hover:border-b-[5px] hover:border-red-600 block px-3 py-1 text-base font-medium">Movie</a>
|
| 49 |
-
<a href="#" class="text-gray-300 hover:text-white hover:font-bold hover:border-b-[5px] hover:border-red-600 block px-3 py-1 text-base font-medium">Shows</a>
|
| 50 |
-
<a href="#" class="text-gray-300 hover:text-white hover:font-bold hover:border-b-[5px] hover:border-red-600 block px-3 py-1 text-base font-medium">Channels</a>
|
| 51 |
-
<a href="#" class="text-gray-300 hover:text-white hover:font-bold hover:border-b-[5px] hover:border-red-600 block px-3 py-1 text-base font-medium">Live</a>
|
| 52 |
-
<a href="#" class="text-gray-300 hover:text-white hover:font-bold hover:border-b-[5px] hover:border-red-600 block px-3 py-1 text-base font-medium">Live</a>
|
| 53 |
-
</div>
|
| 54 |
-
</div>
|
| 55 |
-
</nav>
|
| 56 |
-
<div id="indicators-carousel" class="relative p-3 z-10" data-carousel="static">
|
| 57 |
-
<div class="relative h-56 overflow-hidden rounded-lg md:h-96">
|
| 58 |
-
{%for image in sliderImages%}
|
| 59 |
-
<div class="hidden duration-700 ease-in-out" data-carousel-item>
|
| 60 |
-
<img src="{{image}}" class="absolute block w-full -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2" alt="...">
|
| 61 |
-
</div>
|
| 62 |
-
{%endfor%}
|
| 63 |
-
</div>
|
| 64 |
-
<div class="absolute z-30 flex space-x-3 -translate-x-1/2 bottom-5 left-1/2">
|
| 65 |
-
<button type="button" class="w-3 h-3 rounded-full" aria-current="true" aria-label="Slide 1" data-carousel-slide-to="0"></button>
|
| 66 |
-
<button type="button" class="w-3 h-3 rounded-full" aria-current="false" aria-label="Slide 2" data-carousel-slide-to="1"></button>
|
| 67 |
-
<button type="button" class="w-3 h-3 rounded-full" aria-current="false" aria-label="Slide 3" data-carousel-slide-to="2"></button>
|
| 68 |
-
<button type="button" class="w-3 h-3 rounded-full" aria-current="false" aria-label="Slide 4" data-carousel-slide-to="3"></button>
|
| 69 |
-
<button type="button" class="w-3 h-3 rounded-full" aria-current="false" aria-label="Slide 5" data-carousel-slide-to="4"></button>
|
| 70 |
-
<button type="button" class="w-3 h-3 rounded-full" aria-current="true" aria-label="Slide 6" data-carousel-slide-to="5"></button>
|
| 71 |
-
<button type="button" class="w-3 h-3 rounded-full" aria-current="false" aria-label="Slide 7" data-carousel-slide-to="6"></button>
|
| 72 |
-
<button type="button" class="w-3 h-3 rounded-full" aria-current="false" aria-label="Slide 8" data-carousel-slide-to="7"></button>
|
| 73 |
-
<button type="button" class="w-3 h-3 rounded-full" aria-current="false" aria-label="Slide 9" data-carousel-slide-to="8"></button>
|
| 74 |
-
<button type="button" class="w-3 h-3 rounded-full" aria-current="false" aria-label="Slide 10" data-carousel-slide-to="9"></button>
|
| 75 |
-
</div>
|
| 76 |
-
<button type="button" class="absolute top-0 left-0 z-30 flex items-center justify-center h-full px-4 cursor-pointer group focus:outline-none" data-carousel-prev>
|
| 77 |
-
<span class="inline-flex items-center justify-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none">
|
| 78 |
-
<svg aria-hidden="true" class="w-5 h-5 text-white sm:w-6 sm:h-6 dark:text-gray-800" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"></path></svg>
|
| 79 |
-
<span class="sr-only">Previous</span>
|
| 80 |
-
</span>
|
| 81 |
-
</button>
|
| 82 |
-
<button type="button" class="absolute top-0 right-0 z-30 flex items-center justify-center h-full px-4 cursor-pointer group focus:outline-none" data-carousel-next>
|
| 83 |
-
<span class="inline-flex items-center justify-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none">
|
| 84 |
-
<svg aria-hidden="true" class="w-5 h-5 text-white sm:w-6 sm:h-6 dark:text-gray-800" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg>
|
| 85 |
-
<span class="sr-only">Next</span>
|
| 86 |
-
</span>
|
| 87 |
-
</button>
|
| 88 |
-
</div>
|
| 89 |
-
<!-- <div id="mainPage"> -->
|
| 90 |
-
{%for elem in catagoryObject%}
|
| 91 |
-
{%if elem.0 == "Top 10 Gujarati" or elem.0 == "Best Movies- Watch for Free"%}
|
| 92 |
-
<div class="px-3 my-5">
|
| 93 |
-
<div class="flex flex-nowrap justify-between">
|
| 94 |
-
<h1 class="text-3xl font-bold text-[#35444E]">{{elem.0}}</h1>
|
| 95 |
-
<button class="text-md font-bold text-blue-500">See All</button>
|
| 96 |
-
</div>
|
| 97 |
-
<div class="flex flex-nowrap gap-2 mt-2 w-screen overflow-x-scroll noScrollBar pr-10">
|
| 98 |
-
{%for image in elem.1 %}
|
| 99 |
-
{%if image.0 != "" and image.1 != "" %}
|
| 100 |
-
<img onclick="javascript:window.location.href='{{image.0}}'" class="rounded-lg w-32 lg:w-48 z-0 hover:scale-90 hover:z-10 transition-all cursor-pointer" src="{{image.1}}" alt="">
|
| 101 |
-
{%endif%}
|
| 102 |
-
{%endfor%}
|
| 103 |
-
</div>
|
| 104 |
-
</div>
|
| 105 |
-
{%else%}
|
| 106 |
-
<div class="px-3 my-5">
|
| 107 |
-
<div class="flex flex-nowrap justify-between">
|
| 108 |
-
<h1 class="text-3xl font-bold text-[#35444E]">{{elem.0}}</h1>
|
| 109 |
-
<button class="text-md font-bold text-blue-500">See All</button>
|
| 110 |
-
</div>
|
| 111 |
-
<div class="flex flex-nowrap gap-2 mt-2 w-screen overflow-x-scroll noScrollBar pr-10">
|
| 112 |
-
{%for image in elem.1 %}
|
| 113 |
-
{%if image.0 != "" and image.1 != "" %}
|
| 114 |
-
<img onclick="javascript:window.location.href='{{image.0}}'" class="rounded-lg w-48 lg:w-64 z-0 hover:scale-90 hover:z-10 transition-all cursor-pointer" src="{{image.1}}" alt="">
|
| 115 |
-
{%endif%}
|
| 116 |
-
{%endfor%}
|
| 117 |
-
</div>
|
| 118 |
-
</div>
|
| 119 |
-
{%endif%}
|
| 120 |
-
{%endfor%}
|
| 121 |
-
<!-- </div> -->
|
| 122 |
-
<script>
|
| 123 |
-
window.page = 2;
|
| 124 |
-
window.next_page = true;
|
| 125 |
-
window.loader = false;
|
| 126 |
-
window.onscroll = function(ev) {
|
| 127 |
-
if (!window.loader){
|
| 128 |
-
if (window.next_page){
|
| 129 |
-
if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
|
| 130 |
-
window.loader = true;
|
| 131 |
-
const myHeaders = new Headers();
|
| 132 |
-
myHeaders.append("accept", "application/json, text/plain, */*");
|
| 133 |
-
myHeaders.append("accept-language", "en-US,en;q=0.9,gu;q=0.8,ru;q=0.7,hi;q=0.6");
|
| 134 |
-
myHeaders.append("origin", "https://cors.sh");
|
| 135 |
-
myHeaders.append("referer", "https://cors.sh/");
|
| 136 |
-
myHeaders.append("sec-ch-ua", "\"Google Chrome\";v=\"123\", \"Not:A-Brand\";v=\"8\", \"Chromium\";v=\"123\"");
|
| 137 |
-
myHeaders.append("sec-ch-ua-mobile", "?0");
|
| 138 |
-
myHeaders.append("sec-ch-ua-platform", "\"Windows\"");
|
| 139 |
-
myHeaders.append("sec-fetch-dest", "empty");
|
| 140 |
-
myHeaders.append("sec-fetch-mode", "cors");
|
| 141 |
-
myHeaders.append("sec-fetch-site", "same-site");
|
| 142 |
-
myHeaders.append("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36");
|
| 143 |
-
myHeaders.append("x-cors-api-key", "
|
| 144 |
-
|
| 145 |
-
const requestOptions = {
|
| 146 |
-
method: "GET",
|
| 147 |
-
headers: myHeaders,
|
| 148 |
-
redirect: "follow"
|
| 149 |
-
};
|
| 150 |
-
|
| 151 |
-
fetch("https://proxy.cors.sh/https://www.shemaroome.com/catalogs/add_home_list?page_no="+window.page, requestOptions)
|
| 152 |
-
.then((response) => response.json())
|
| 153 |
-
.then((result) => {
|
| 154 |
-
let next_page = result["next_page"];
|
| 155 |
-
window.next_page = next_page;
|
| 156 |
-
let catagoryObject = result["home_list"];
|
| 157 |
-
for (let i = 0; i < catagoryObject.length; i++) {
|
| 158 |
-
catagoryObject[i] = [catagoryObject[i][1].split("$$")[0], catagoryObject[i][0]];
|
| 159 |
-
for (let j = 0; j < catagoryObject[i][1].length; j++) {
|
| 160 |
-
catagoryObject[i][1][j] = [catagoryObject[i][1][j].split("$$")[0], catagoryObject[i][1][j].split("$$")[5]];
|
| 161 |
-
}
|
| 162 |
-
}
|
| 163 |
-
let mainPage = document.getElementById("mainPage");
|
| 164 |
-
let html = "";
|
| 165 |
-
for (let i = 0; i < catagoryObject.length; i++) {
|
| 166 |
-
html += "<div class='px-3 my-5'><div class='flex flex-nowrap justify-between'><h1 class='text-3xl font-bold text-[#35444E]'>"+catagoryObject[i][0]+"</h1><button class='text-md font-bold text-blue-500'>See All</button></div><div class='flex flex-nowrap gap-2 mt-2 w-screen overflow-x-scroll noScrollBar pr-10'>";
|
| 167 |
-
for (let j = 0; j < catagoryObject[i][1].length; j++) {
|
| 168 |
-
if (catagoryObject[i][1][j][0] != "" && catagoryObject[i][1][j][1] != "") {
|
| 169 |
-
html += "<img onclick=\"javascript:window.location.href='"+catagoryObject[i][1][j][0]+"'\" class='rounded-lg w-48 lg:w-64 z-0 hover:scale-90 hover:z-10 transition-all cursor-pointer' src='"+catagoryObject[i][1][j][1]+"' alt=''>";
|
| 170 |
-
}
|
| 171 |
-
}
|
| 172 |
-
html += "</div></div>";
|
| 173 |
-
}
|
| 174 |
-
// mainPage.innerHTML = html;
|
| 175 |
-
document.body.insertAdjacentHTML("beforeend", html);
|
| 176 |
-
})
|
| 177 |
-
.catch((error) => console.error(error))
|
| 178 |
-
.finally(() => {
|
| 179 |
-
window.loader = false;
|
| 180 |
-
window.page += 1;
|
| 181 |
-
});
|
| 182 |
-
}
|
| 183 |
-
}
|
| 184 |
-
}
|
| 185 |
-
};
|
| 186 |
-
</script>
|
| 187 |
-
</body>
|
| 188 |
-
</html>
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
+
<title>Hemaroo</title>
|
| 8 |
+
<link href="static/hagimaru.png" rel="icon" type="image/gif"/>
|
| 9 |
+
<script src="static/tailwindcss.js"></script>
|
| 10 |
+
<style>
|
| 11 |
+
.noScrollBar::-webkit-scrollbar {
|
| 12 |
+
display: none;
|
| 13 |
+
}
|
| 14 |
+
</style>
|
| 15 |
+
</head>
|
| 16 |
+
<body class="overflow-x-hidden mb-5 h-fit">
|
| 17 |
+
<nav class="bg-[#191A1B] sticky top-0 z-20">
|
| 18 |
+
<div class="mx-auto px-2 sm:px-6 lg:px-8">
|
| 19 |
+
<div class="relative flex h-16 items-center justify-between">
|
| 20 |
+
<div class="flex flex-1 items-center justify-start">
|
| 21 |
+
<div class="flex flex-shrink-0 mr-8">
|
| 22 |
+
<img class="block h-10 w-auto lg:hidden" src="static/shemaroo_logo.svg" alt="Your Company">
|
| 23 |
+
<img class="hidden h-10 w-auto lg:block" src="static/shemaroo_logo.svg" alt="Your Company">
|
| 24 |
+
</div>
|
| 25 |
+
<div class="hidden sm:ml-6 sm:block">
|
| 26 |
+
<div class="flex">
|
| 27 |
+
<a href="/" class="w-fit p-4 text-white font-bold border-b-[5px] border-red-600">Home</a>
|
| 28 |
+
<a href="#" class="w-fit p-4 text-gray-300 hover:text-white hover:font-bold hover:border-b-[5px] hover:border-red-600 transition-all">Movie</a>
|
| 29 |
+
<a href="#" class="w-fit p-4 text-gray-300 hover:text-white hover:font-bold hover:border-b-[5px] hover:border-red-600 transition-all">Shows</a>
|
| 30 |
+
<a href="#" class="w-fit p-4 text-gray-300 hover:text-white hover:font-bold hover:border-b-[5px] hover:border-red-600 transition-all">Channels</a>
|
| 31 |
+
<a href="#" class="w-fit p-4 text-gray-300 hover:text-white hover:font-bold hover:border-b-[5px] hover:border-red-600 transition-all">Live</a>
|
| 32 |
+
<a href="#" class="w-fit p-4 text-gray-300 hover:text-white hover:font-bold hover:border-b-[5px] hover:border-red-600 transition-all">Browse</a>
|
| 33 |
+
</div>
|
| 34 |
+
</div>
|
| 35 |
+
</div>
|
| 36 |
+
<div class="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0">
|
| 37 |
+
<div class="relative ml-3">
|
| 38 |
+
<button type="button" class="flex rounded-full text-sm focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-gray-800" id="user-menu-button" aria-expanded="false" aria-haspopup="true">
|
| 39 |
+
<img class="h-8 w-8 rounded-full" src="static/search_not_selected.svg" alt="">
|
| 40 |
+
</button>
|
| 41 |
+
</div>
|
| 42 |
+
</div>
|
| 43 |
+
</div>
|
| 44 |
+
</div>
|
| 45 |
+
<div class="sm:hidden bg-[#222222]" id="mobile-menu">
|
| 46 |
+
<div class="space-y-1 px-2 pt-2 pb-3 flex flex-nowrap">
|
| 47 |
+
<a href="/" class="text-white font-bold border-b-[5px] border-red-600 block px-3 py-2 text-base font-medium" aria-current="page">Home</a>
|
| 48 |
+
<a href="#" class="text-gray-300 hover:text-white hover:font-bold hover:border-b-[5px] hover:border-red-600 block px-3 py-1 text-base font-medium">Movie</a>
|
| 49 |
+
<a href="#" class="text-gray-300 hover:text-white hover:font-bold hover:border-b-[5px] hover:border-red-600 block px-3 py-1 text-base font-medium">Shows</a>
|
| 50 |
+
<a href="#" class="text-gray-300 hover:text-white hover:font-bold hover:border-b-[5px] hover:border-red-600 block px-3 py-1 text-base font-medium">Channels</a>
|
| 51 |
+
<a href="#" class="text-gray-300 hover:text-white hover:font-bold hover:border-b-[5px] hover:border-red-600 block px-3 py-1 text-base font-medium">Live</a>
|
| 52 |
+
<a href="#" class="text-gray-300 hover:text-white hover:font-bold hover:border-b-[5px] hover:border-red-600 block px-3 py-1 text-base font-medium">Live</a>
|
| 53 |
+
</div>
|
| 54 |
+
</div>
|
| 55 |
+
</nav>
|
| 56 |
+
<div id="indicators-carousel" class="relative p-3 z-10" data-carousel="static">
|
| 57 |
+
<div class="relative h-56 overflow-hidden rounded-lg md:h-96">
|
| 58 |
+
{%for image in sliderImages%}
|
| 59 |
+
<div class="hidden duration-700 ease-in-out" data-carousel-item>
|
| 60 |
+
<img src="{{image}}" class="absolute block w-full -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2" alt="...">
|
| 61 |
+
</div>
|
| 62 |
+
{%endfor%}
|
| 63 |
+
</div>
|
| 64 |
+
<div class="absolute z-30 flex space-x-3 -translate-x-1/2 bottom-5 left-1/2">
|
| 65 |
+
<button type="button" class="w-3 h-3 rounded-full" aria-current="true" aria-label="Slide 1" data-carousel-slide-to="0"></button>
|
| 66 |
+
<button type="button" class="w-3 h-3 rounded-full" aria-current="false" aria-label="Slide 2" data-carousel-slide-to="1"></button>
|
| 67 |
+
<button type="button" class="w-3 h-3 rounded-full" aria-current="false" aria-label="Slide 3" data-carousel-slide-to="2"></button>
|
| 68 |
+
<button type="button" class="w-3 h-3 rounded-full" aria-current="false" aria-label="Slide 4" data-carousel-slide-to="3"></button>
|
| 69 |
+
<button type="button" class="w-3 h-3 rounded-full" aria-current="false" aria-label="Slide 5" data-carousel-slide-to="4"></button>
|
| 70 |
+
<button type="button" class="w-3 h-3 rounded-full" aria-current="true" aria-label="Slide 6" data-carousel-slide-to="5"></button>
|
| 71 |
+
<button type="button" class="w-3 h-3 rounded-full" aria-current="false" aria-label="Slide 7" data-carousel-slide-to="6"></button>
|
| 72 |
+
<button type="button" class="w-3 h-3 rounded-full" aria-current="false" aria-label="Slide 8" data-carousel-slide-to="7"></button>
|
| 73 |
+
<button type="button" class="w-3 h-3 rounded-full" aria-current="false" aria-label="Slide 9" data-carousel-slide-to="8"></button>
|
| 74 |
+
<button type="button" class="w-3 h-3 rounded-full" aria-current="false" aria-label="Slide 10" data-carousel-slide-to="9"></button>
|
| 75 |
+
</div>
|
| 76 |
+
<button type="button" class="absolute top-0 left-0 z-30 flex items-center justify-center h-full px-4 cursor-pointer group focus:outline-none" data-carousel-prev>
|
| 77 |
+
<span class="inline-flex items-center justify-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none">
|
| 78 |
+
<svg aria-hidden="true" class="w-5 h-5 text-white sm:w-6 sm:h-6 dark:text-gray-800" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"></path></svg>
|
| 79 |
+
<span class="sr-only">Previous</span>
|
| 80 |
+
</span>
|
| 81 |
+
</button>
|
| 82 |
+
<button type="button" class="absolute top-0 right-0 z-30 flex items-center justify-center h-full px-4 cursor-pointer group focus:outline-none" data-carousel-next>
|
| 83 |
+
<span class="inline-flex items-center justify-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none">
|
| 84 |
+
<svg aria-hidden="true" class="w-5 h-5 text-white sm:w-6 sm:h-6 dark:text-gray-800" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg>
|
| 85 |
+
<span class="sr-only">Next</span>
|
| 86 |
+
</span>
|
| 87 |
+
</button>
|
| 88 |
+
</div>
|
| 89 |
+
<!-- <div id="mainPage"> -->
|
| 90 |
+
{%for elem in catagoryObject%}
|
| 91 |
+
{%if elem.0 == "Top 10 Gujarati" or elem.0 == "Best Movies- Watch for Free"%}
|
| 92 |
+
<div class="px-3 my-5">
|
| 93 |
+
<div class="flex flex-nowrap justify-between">
|
| 94 |
+
<h1 class="text-3xl font-bold text-[#35444E]">{{elem.0}}</h1>
|
| 95 |
+
<button class="text-md font-bold text-blue-500">See All</button>
|
| 96 |
+
</div>
|
| 97 |
+
<div class="flex flex-nowrap gap-2 mt-2 w-screen overflow-x-scroll noScrollBar pr-10">
|
| 98 |
+
{%for image in elem.1 %}
|
| 99 |
+
{%if image.0 != "" and image.1 != "" %}
|
| 100 |
+
<img onclick="javascript:window.location.href='{{image.0}}'" class="rounded-lg w-32 lg:w-48 z-0 hover:scale-90 hover:z-10 transition-all cursor-pointer" src="{{image.1}}" alt="">
|
| 101 |
+
{%endif%}
|
| 102 |
+
{%endfor%}
|
| 103 |
+
</div>
|
| 104 |
+
</div>
|
| 105 |
+
{%else%}
|
| 106 |
+
<div class="px-3 my-5">
|
| 107 |
+
<div class="flex flex-nowrap justify-between">
|
| 108 |
+
<h1 class="text-3xl font-bold text-[#35444E]">{{elem.0}}</h1>
|
| 109 |
+
<button class="text-md font-bold text-blue-500">See All</button>
|
| 110 |
+
</div>
|
| 111 |
+
<div class="flex flex-nowrap gap-2 mt-2 w-screen overflow-x-scroll noScrollBar pr-10">
|
| 112 |
+
{%for image in elem.1 %}
|
| 113 |
+
{%if image.0 != "" and image.1 != "" %}
|
| 114 |
+
<img onclick="javascript:window.location.href='{{image.0}}'" class="rounded-lg w-48 lg:w-64 z-0 hover:scale-90 hover:z-10 transition-all cursor-pointer" src="{{image.1}}" alt="">
|
| 115 |
+
{%endif%}
|
| 116 |
+
{%endfor%}
|
| 117 |
+
</div>
|
| 118 |
+
</div>
|
| 119 |
+
{%endif%}
|
| 120 |
+
{%endfor%}
|
| 121 |
+
<!-- </div> -->
|
| 122 |
+
<script>
|
| 123 |
+
window.page = 2;
|
| 124 |
+
window.next_page = true;
|
| 125 |
+
window.loader = false;
|
| 126 |
+
window.onscroll = function(ev) {
|
| 127 |
+
if (!window.loader){
|
| 128 |
+
if (window.next_page){
|
| 129 |
+
if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
|
| 130 |
+
window.loader = true;
|
| 131 |
+
const myHeaders = new Headers();
|
| 132 |
+
myHeaders.append("accept", "application/json, text/plain, */*");
|
| 133 |
+
myHeaders.append("accept-language", "en-US,en;q=0.9,gu;q=0.8,ru;q=0.7,hi;q=0.6");
|
| 134 |
+
myHeaders.append("origin", "https://cors.sh");
|
| 135 |
+
myHeaders.append("referer", "https://cors.sh/");
|
| 136 |
+
myHeaders.append("sec-ch-ua", "\"Google Chrome\";v=\"123\", \"Not:A-Brand\";v=\"8\", \"Chromium\";v=\"123\"");
|
| 137 |
+
myHeaders.append("sec-ch-ua-mobile", "?0");
|
| 138 |
+
myHeaders.append("sec-ch-ua-platform", "\"Windows\"");
|
| 139 |
+
myHeaders.append("sec-fetch-dest", "empty");
|
| 140 |
+
myHeaders.append("sec-fetch-mode", "cors");
|
| 141 |
+
myHeaders.append("sec-fetch-site", "same-site");
|
| 142 |
+
myHeaders.append("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36");
|
| 143 |
+
myHeaders.append("x-cors-api-key", "temp_630f36291efaa81d2ceb8081a49c8fa4");
|
| 144 |
+
|
| 145 |
+
const requestOptions = {
|
| 146 |
+
method: "GET",
|
| 147 |
+
headers: myHeaders,
|
| 148 |
+
redirect: "follow"
|
| 149 |
+
};
|
| 150 |
+
|
| 151 |
+
fetch("https://proxy.cors.sh/https://www.shemaroome.com/catalogs/add_home_list?page_no="+window.page, requestOptions)
|
| 152 |
+
.then((response) => response.json())
|
| 153 |
+
.then((result) => {
|
| 154 |
+
let next_page = result["next_page"];
|
| 155 |
+
window.next_page = next_page;
|
| 156 |
+
let catagoryObject = result["home_list"];
|
| 157 |
+
for (let i = 0; i < catagoryObject.length; i++) {
|
| 158 |
+
catagoryObject[i] = [catagoryObject[i][1].split("$$")[0], catagoryObject[i][0]];
|
| 159 |
+
for (let j = 0; j < catagoryObject[i][1].length; j++) {
|
| 160 |
+
catagoryObject[i][1][j] = [catagoryObject[i][1][j].split("$$")[0], catagoryObject[i][1][j].split("$$")[5]];
|
| 161 |
+
}
|
| 162 |
+
}
|
| 163 |
+
let mainPage = document.getElementById("mainPage");
|
| 164 |
+
let html = "";
|
| 165 |
+
for (let i = 0; i < catagoryObject.length; i++) {
|
| 166 |
+
html += "<div class='px-3 my-5'><div class='flex flex-nowrap justify-between'><h1 class='text-3xl font-bold text-[#35444E]'>"+catagoryObject[i][0]+"</h1><button class='text-md font-bold text-blue-500'>See All</button></div><div class='flex flex-nowrap gap-2 mt-2 w-screen overflow-x-scroll noScrollBar pr-10'>";
|
| 167 |
+
for (let j = 0; j < catagoryObject[i][1].length; j++) {
|
| 168 |
+
if (catagoryObject[i][1][j][0] != "" && catagoryObject[i][1][j][1] != "") {
|
| 169 |
+
html += "<img onclick=\"javascript:window.location.href='"+catagoryObject[i][1][j][0]+"'\" class='rounded-lg w-48 lg:w-64 z-0 hover:scale-90 hover:z-10 transition-all cursor-pointer' src='"+catagoryObject[i][1][j][1]+"' alt=''>";
|
| 170 |
+
}
|
| 171 |
+
}
|
| 172 |
+
html += "</div></div>";
|
| 173 |
+
}
|
| 174 |
+
// mainPage.innerHTML = html;
|
| 175 |
+
document.body.insertAdjacentHTML("beforeend", html);
|
| 176 |
+
})
|
| 177 |
+
.catch((error) => console.error(error))
|
| 178 |
+
.finally(() => {
|
| 179 |
+
window.loader = false;
|
| 180 |
+
window.page += 1;
|
| 181 |
+
});
|
| 182 |
+
}
|
| 183 |
+
}
|
| 184 |
+
}
|
| 185 |
+
};
|
| 186 |
+
</script>
|
| 187 |
+
</body>
|
| 188 |
+
</html>
|