-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathdesktop.html
663 lines (582 loc) · 20 KB
/
desktop.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<title>
AniTeams Slider
</title>
<link href="stylesheet.css" rel="stylesheet"/>
<link href="https://fonts.googleapis.com" rel="preconnect"/>
<link crossorigin="" href="https://fonts.gstatic.com" rel="preconnect"/>
<link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet"/>
</head>
<body>
<!----- Welcome dialogue ---->
<div id="welcome-dialog" class="dialog">
<div class="dialog-content">
<h2 class="dialog-header">🎉 Welcome to AniTeams!</h2>
<div class="dialog-message">
<p><strong>What's New:</strong></p>
<ul>
<li>✨ Brand-new anime streaming page.</li>
<li>🎨 Still powered by the trusted ArtPlayer.</li>
<li>🆕 Completely revamped anime watching page.</li>
<li>📈 Tons of new features to enhance your experience.</li>
</ul>
<p>I hope you enjoy using this site!</p>
</div>
<button id="ok-button">Got It!</button>
</div>
</div>
<script>
// Check localStorage for the welcome dialog status
document.addEventListener("DOMContentLoaded", () => {
const dialog = document.getElementById("welcome-dialog");
const okButton = document.getElementById("ok-button");
// Show dialog if not already acknowledged
if (!localStorage.getItem("welcomeAcknowledged")) {
dialog.classList.add("active");
}
// Handle the 'Got It!' button click
okButton.addEventListener("click", () => {
localStorage.setItem("welcomeAcknowledged", "true");
dialog.classList.remove("active");
});
});
</script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');
/* Dialog Styling */
.dialog {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.9); /* Darker semi-transparent black */
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease-in-out, visibility 0s 0.3s;
}
.dialog.active {
opacity: 1;
visibility: visible;
transition: opacity 0.3s ease-in-out;
}
.dialog-content {
background-color: #1b1b1b; /* Sleek dark gray background */
color: #f2f2f2; /* Light gray text */
padding: 30px;
border-radius: 16px;
text-align: left;
max-width: 480px;
width: 90%;
box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.7);
animation: fadeIn 0.5s ease-out;
font-family: 'Poppins', sans-serif; /* Stylish Google Font */
}
.dialog-header {
font-size: 26px;
font-weight: 600;
margin-bottom: 15px;
border-bottom: 3px solid #9932cc; /* Elegant purple underline */
padding-bottom: 8px;
color: #d69df5; /* Light purple */
text-align: center;
}
.dialog-message p {
margin: 0 0 15px;
font-size: 16px;
line-height: 1.8;
}
.dialog-message ul {
margin: 0 0 15px;
padding-left: 20px;
font-size: 15px;
line-height: 1.8;
}
.dialog-message ul li {
margin-bottom: 10px;
}
/* Button Styles */
#ok-button {
display: block;
margin: 20px auto 0;
background-color: #9932cc; /* Purple button */
color: #fff;
padding: 12px 30px;
border: none;
border-radius: 8px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: background-color 0.3s ease, transform 0.2s ease;
font-family: 'Poppins', sans-serif;
box-shadow: 0 4px 10px rgba(153, 50, 204, 0.4);
}
#ok-button:hover {
background-color: #a74be7; /* Lighter purple on hover */
transform: scale(1.05);
}
/* Fade-in Animation */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
</style>
<!-- Header Section -->
<header>
<!-- Navigation Bar -->
<nav class="navbar">
<!-- Toggle Button for Sidebar -->
<div class="bars" onclick="toggleMenu()">
<div class="bar1">
</div>
<div class="bar2">
</div>
<div class="bar3">
</div>
</div>
</nav>
<!-- Magnifying Glass Icon and Login Button -->
<div class="header-extras">
<div class="css-icon-search" onclick="redirectToPage()">
</div>
</div>
<script>
// Function to redirect the user to a new page
function redirectToPage() {
window.location.href = './search.html'; // Change this URL to your desired destination
}
</script>
</header>
<!-- Sidebar / Side Menu -->
<aside class="side-menu" id="sideMenu">
<!-- Close Button for Sidebar -->
<div class="close-button" onclick="toggleMenu()">
Close
</div>
<!-- Sidebar Items -->
<ul class="nav-list">
<li class="item">
<a href="./index.html">Home</a>
</li>
<li class="item">
<a href="./about.html">About</a>
</li>
<li class="item">
<a href="./contact.html">Contact</a>
</li>
<li class="item">
<a href="./bookmarks.html">Bookmarks</a>
</li>
<li class="item">
Genres
</li>
<div class="genre-list" id="genreList">
<!-- Genres will be populated here by JavaScript -->
</div>
</ul>
</aside>
<script>
// JavaScript to Toggle Sidebar
function toggleMenu() {
document.getElementById("sideMenu").classList.toggle("open");
document.querySelector(".bars").classList.toggle("open");
}
// Fetch Genres from API and Populate Sidebar
async function fetchGenres() {
try {
const response = await fetch('https://aniwatch-api-net.vercel.app/api/v2/hianime/home'); // Replace with your API URL
const result = await response.json();
if (result.success && result.data.genres) {
const genreList = document.getElementById('genreList');
genreList.innerHTML = ''; // Clear any existing content
result.data.genres.forEach((genre) => {
const genreItem = document.createElement('div');
genreItem.classList.add('genre-item');
genreItem.textContent = genre;
genreList.appendChild(genreItem);
});
} else {
console.error("Error: Unable to load genres");
}
} catch (error) {
console.error("Error fetching genres:", error);
}
}
// Load genres on page load
window.onload = fetchGenres;
</script>
<section class="spotlight-slideshow">
<div class="swiper">
<div class="slideshow-container" id="slideshow-container">
</div>
<div class="navigation">
<span class="prev">❮</span>
<span class="next">❯</span>
</div>
</div>
</section>
<script>
let currentSlide = 0;
const slideshowContainer = document.getElementById('slideshow-container');
// Function to truncate the description text
function truncateDescription(description, length = 100) {
return description.length > length ? description.substring(0, length) + '...' : description;
}
// Fetch anime data from the API
fetch('https://aniwatch-api-net.vercel.app/api/v2/hianime/home')
.then(response => response.json())
.then(data => {
const spotlightAnimes = data.data.spotlightAnimes;
spotlightAnimes.forEach(anime => {
const slide = document.createElement('div');
slide.classList.add('slide');
const imgContainer = document.createElement('div');
imgContainer.classList.add('img-container');
const img = document.createElement('img');
img.src = anime.poster;
img.alt = anime.name;
img.classList.add('img');
imgContainer.appendChild(img);
const content = document.createElement('div');
content.classList.add('content');
const rank = document.createElement('div');
rank.classList.add('rank');
rank.textContent = `Rank: #${anime.rank}`;
const title = document.createElement('h3');
title.classList.add('title');
title.textContent = anime.name;
const description = document.createElement('div');
description.classList.add('description');
description.textContent = truncateDescription(anime.description, 100);
const icons = document.createElement('div');
icons.classList.add('icons');
if (anime.type) {
const icon = document.createElement('div');
icon.classList.add('icon');
const iconSpan = document.createElement('span');
iconSpan.classList.add('icon-span');
iconSpan.textContent = anime.type;
icon.appendChild(iconSpan);
icons.appendChild(icon);
}
const watchBtn = document.createElement('div');
watchBtn.classList.add('watch-btn');
const watchLink = document.createElement('a');
watchLink.href = `watch.html?id=${anime.id}`;
watchLink.classList.add('watch-link');
watchLink.textContent = 'Watch Now';
const detailLink = document.createElement('a');
detailLink.href = `details.html?id=${anime.id}`;
detailLink.classList.add('detail-link');
detailLink.textContent = 'More Info';
watchBtn.appendChild(watchLink);
watchBtn.appendChild(detailLink);
content.appendChild(rank);
content.appendChild(title);
content.appendChild(description);
content.appendChild(icons);
content.appendChild(watchBtn);
slide.appendChild(imgContainer);
slide.appendChild(content);
slideshowContainer.appendChild(slide);
});
// Now that all slides are loaded, start the slideshow
const slides = document.querySelectorAll('.slide');
const totalSlides = slides.length;
// Function to update the slide position with fade effect
function updateSlidePosition() {
slides.forEach((slide, index) => {
if (index === currentSlide) {
slide.classList.add('fade-in');
slide.classList.remove('fade-out');
} else {
slide.classList.add('fade-out');
slide.classList.remove('fade-in');
}
});
}
// Function to move to the next slide
function nextSlide() {
currentSlide = (currentSlide + 1) % totalSlides;
updateSlidePosition();
}
// Auto slide every 5 seconds
setInterval(nextSlide, 5000);
// Initialize the slideshow
updateSlidePosition();
})
.catch(error => console.error('Error fetching anime data:', error));
</script>
<p>
<span class="trending">
Trending
</span>
</p>
<section class="card-section">
<div class="anime-cards" id="anime-cards-container">
<!-- Anime cards will be dynamically inserted here by JavaScript -->
</div>
</section>
<script>
document.addEventListener("DOMContentLoaded", function () {
fetchAndDisplayTrendingAnime();
});
function fetchAndDisplayTrendingAnime() {
const apiUrl = "https://aniwatch-api-net.vercel.app/api/v2/hianime/home";// replace with your deployed version of the aniwatch api
fetch(apiUrl)
.then(response => response.json())
.then(data => {
if (data.success && data.data.trendingAnimes) {
const container = document.getElementById("anime-cards-container");
container.innerHTML = ""; // Clear any existing content
data.data.trendingAnimes.forEach(anime => {
const card = document.createElement("div");
card.classList.add("anime-card");
card.innerHTML = `
<img src="${anime.poster}" alt="${anime.name}">
<div class="description-text">${anime.name}</div>
`;
container.appendChild(card);
});
} else {
console.error("Trending anime data not found.");
}
})
.catch(error => console.error("Error fetching trending anime:", error));
}
</script>
<p>
<span class="trending">
Latest Episodes
</span>
</p>
<div class="card-container">
</div>
<script>
async function fetchAnimeData() {
const apiUrl = "https://aniwatch-api-net.vercel.app/api/v2/hianime/home"; // Replace with your actual API URL
try {
const response = await fetch(apiUrl);
const data = await response.json();
if (data.success) {
const cardContainer = document.querySelector('.card-container');
cardContainer.innerHTML = ''; // Clear previous content
data.data.latestEpisodeAnimes.forEach(anime => {
const cardHTML = `
<div class="card">
<div class="poster">
<img src="${anime.poster}" alt="${anime.name} Poster" class="image"/>
<a href="details.html?id=${anime.id}" class="overlay">
<img src="play-buttton.png" alt="Play" class="play-button"/>
</a>
<div class="info-left">
<div class="btn">SUB ${anime.episodes.sub}</div>
</div>
<div class="info-right">
<div class="btn-episode">Ep ${anime.episodes.sub}</div>
</div>
</div>
<div class="details">
<h3 class="name">${anime.name}</h3>
<p class="jname">${anime.jname}</p>
</div>
</div>
`;
cardContainer.insertAdjacentHTML('beforeend', cardHTML);
});
} else {
console.error("Failed to fetch anime data:", data.message);
}
} catch (error) {
console.error("Error fetching data:", error);
}
}
fetchAnimeData();
</script>
<footer class="footer">
<a href="index.html" class="logo-link">
<img src="logo.png" alt="AniTeams Logo" class="logo">
</a>
<div class="footer-container">
<div class="pagination">
<a href="#">A</a>
<a href="#">B</a>
<a href="#">C</a>
<a href="#">D</a>
<a href="#">E</a>
<a href="#">F</a>
<a href="#">G</a>
<a href="#">H</a>
<a href="#">I</a>
<a href="#">J</a>
<a href="#">K</a>
<a href="#">L</a>
<a href="#">M</a>
<a href="#">N</a>
<a href="#">O</a>
<a href="#">P</a>
<a href="#">Q</a>
<a href="#">R</a>
<a href="#">S</a>
<a href="#">T</a>
<a href="#">U</a>
<a href="#">V</a>
<a href="#">W</a>
<a href="#">X</a>
<a href="#">Y</a>
<a href="#">Z</a>
</div>
</div>
<div class="footer-links">
<a href="/credits">Credits</a> |
<span>Files not stored on this server.</span>
</div>
<div class="footer-bottom">
<span>© <span id="year"></span> AniTeams. All rights reserved.</span>
</div>
</footer>
<style>
/* General Footer Styling */
.footer-container {
display: flex;
justify-content: flex-start;
align-items: flex-end;
flex-wrap: wrap;
margin: 0 50px 0 20px;
}
.footer {
background: url("footer.jpg") no-repeat center center;
background-size: cover;
height: 350px; /* Default height for larger screens */
overflow: hidden; /* Prevent unnecessary scrolling */
padding-bottom: 30px; /* Adds some space at the bottom */
}
/* Logo Styling */
.logo-link {
display: inline-block;
}
.logo {
height: 100px; /* Default logo height for larger screens */
max-width: 100%; /* Ensure the logo doesn’t exceed its container */
z-index: 999;
transition: transform 0.3s ease; /* Animation for hover effect */
}
.logo-link:hover .logo {
transform: scale(1.05); /* Animation for logo hover */
}
/* Pagination Styling */
.pagination {
display: flex;
gap: 10px;
flex-wrap: wrap;
margin-left: 5px;
}
.pagination a {
color: white;
text-decoration: none;
padding: 8px 15px;
background-color: rgba(255, 255, 255, 0.1);
border-radius: 5px;
transition: background-color 100ms ease-in-out; /* Link hover effect animation */
}
/* Link Hover Effect */
.pagination a:hover {
background-color: hsl(271, 100%, 65%);
font-weight: bold;
}
/* Footer Links Styling */
.footer-links {
text-align: center;
margin-top: 20px;
}
.footer-links a {
color: white;
text-decoration: none;
margin: 0 10px;
}
.footer-links a:hover {
text-decoration: underline;
}
/* Footer Bottom Styling */
.footer-bottom {
text-align: center;
margin-top: 20px;
color: white;
}
/* Copyright Year */
#year {
font-weight: bold;
}
/* Media Queries for Mobile Devices */
@media screen and (max-width: 768px) {
.footer-container {
margin: 0 10px; /* Reduce the margin for smaller screens */
flex-direction: column;
align-items: center;
}
.footer {
height: 350px; /* Maintain default footer height */
background-size: cover; /* Ensure the image scales properly */
}
.logo {
height: 80px; /* Shrink the logo for medium-sized screens */
}
.pagination a {
padding: 6px 10px; /* Reduce padding for pagination links */
font-size: 14px; /* Adjust font size */
}
.footer-links {
font-size: 14px;
}
.footer-bottom {
font-size: 12px; /* Adjust footer text size */
}
}
@media screen and (max-width: 480px) {
.footer-container {
margin: 0 5px;
}
.footer {
height: 350px; /* Maintain default footer height */
background-size: cover; /* Maintain full background image scaling */
}
.logo {
height: 60px; /* Further reduce logo size for small screens */
}
.pagination {
gap: 5px; /* Narrow gap for pagination links */
}
.pagination a {
padding: 5px 8px;
font-size: 12px;
}
.footer-links a {
margin: 0 5px;
font-size: 12px;
}
.footer-bottom {
font-size: 10px;
}
}
</style>
<script>
document.getElementById("year").textContent = new Date().getFullYear();
</script>
<script src="https://cdn.jsdelivr.net/npm/eruda"></script>
<script>eruda.init();</script>
</body>
</html>