Spaces:
Sleeping
Sleeping
File size: 65,147 Bytes
05dddec |
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 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<script src="./static/tailwind.js"></script>
<link rel="stylesheet" href="./static/tailwind.css">
<title>Xenesis - Event</title>
<style>
* {
scroll-behavior: smooth;
}
.eventName {
text-shadow: -1px 1px 0 #000,
1px 1px 0 #000,
1px -1px 0 #000,
-1px -1px 0 #000;
}
.customScrollbar::-webkit-scrollbar {
display: none;
}
.radial-gradient-container {
background: radial-gradient(at top left, #211e60 1%, #240a34 50%);
}
.clip-copyrights {
clip-path: polygon(0 0, 85% 0%, 100% 100%, 0% 100%);
}
.clip-button {
background: linear-gradient(to right, #7815ea, #c595ff) !important;
clip-path: polygon(0% 0%, 90% 0, 100% 30%, 100% 100%, 0 100%);
}
</style>
</head>
<body>
<!-- Navbar -->
<nav class="flex items-center justify-between text-white fixed w-full top-0 py-[calc(3vh)] px-[calc(3vh)] z-50 transition-all duration-300" id="navbar">
<div>
<h1 class="text-[calc(3vh)]">Logo</h1>
</div>
<div class="relative flex items-center justify-center gap-4 lg:hidden">
{% if isUser == True %}
<!-- Profile Image -->
<img src="/static/avatars/{{profilePic}}.png" alt="" class="w-[45px] h-[45px] rounded-full object-cover bg-slate-300" onclick="toggleProfileDropdown()" />
<!-- Profile -->
<div class="fixed right-10 top-6 z-[999] overflow-visible flex items-center justify-center gap-4 px-[calc(2vh)]">
<div class="absolute bg-slate-600 top-16 right-0 w-full min-w-[200px] rounded-md z-[999] h-0 overflow-hidden transition-all duration-300" id="profile-dropdown-mobile">
<p class="w-full px-4 text-white"><i class="bi bi-person mr-2.5"></i>{{userName}}</p>
<hr class="w-full my-2" />
<a href="/logout" class="">
<p class="w-full px-4 text-white truncate capitalize"><i class="bi bi-box-arrow-right mr-2.5"></i>Logout</p>
</a>
</div>
</div>
{%endif%}
<!-- Menu Toggle Button -->
<button class="text-2xl block lg:hidden !outline-none" onclick="toggleMobileMenu()"><i class="bi bi-list"></i></button>
</div>
<!-- Mobile Menu -->
<div class="absolute top-0 left-0 flex flex-col gap-5 items-center justify-center w-screen h-screen z-50 bg-slate-900 bg-opacity-95 hidden" id="mobile-menu">
<button class="absolute top-5 right-5 !outline-none" onclick="toggleMobileMenu()"><i class="bi bi-x-lg"></i></button>
<a href="/" class="text-2xl">Home</a>
<a href="/events" class="text-2xl">Events</a>
<a href="#" class="text-2xl">Event Confirm</a>
<a href="/aboutus" class="text-2xl">About Us</a>
<a href="/login" class="text-2xl">Login</a>
<a href="/register" class="text-2xl">Register</a>
</div>
<!-- Tablet | Laptop Menu -->
<ul class="flex items-center hidden lg:flex">
<li class="px-[calc(2vh)] font-semibold text-[calc(3vh)]"><a href="/">Home</a></li>
<li class="px-[calc(2vh)] font-semibold text-[calc(3vh)]"><a href="/events">Events</a></li>
<li class="px-[calc(2vh)] font-semibold text-[calc(3vh)]"><a href="#">Event Confirm</a></li>
<li class="px-[calc(2vh)] font-semibold text-[calc(3vh)]"><a href="/aboutus">About Us</a></li>
<li class="px-[calc(2vh)] font-semibold text-[calc(3vh)]"><a href="/login">Login</a></li>
<li class="px-[calc(2vh)] font-semibold text-[calc(3vh)]"><a href="/register">Register</a></li>
<div class="px-[calc(2vh)] font-semibold text-[calc(3vh)]">
<button>Register for Event</button>
</div>
<div class="relative flex items-center justify-center gap-4 px-[calc(2vh)]">
<img src="./static/event-images/4.jpg" alt="" class=" w-[50px] h-[50px] rounded-full object-cover" onclick="toggleProfileDropdown()">
<div class="absolute bg-slate-600 bg-opacity-50 top-16 right-0 w-full min-w-[200px] rounded-md border-slate-400 z-50 h-0 overflow-hidden transition-all duration-300" id="profile-dropdown">
<a href="#" class="">
<p class="w-full px-4"><i class="bi bi-gear mr-2.5"></i>Profile Settings</p>
</a>
<hr class="my-3 border-b-slate-400">
<a href="#" class="">
<p class="w-full px-4"><i class="bi bi-box-arrow-right mr-2.5"></i>Logout</p>
</a>
</div>
</div>
</ul>
</nav>
<!-- Hero Section -->
<div class="w-full h-screen overflow-hidden customScrollbar relative">
<canvas id="canvas" class="w-screen h-[calc((1024/1536)*100vw)] absolute top-0 z-0"></canvas>
<div class="absolute top-1/2 -translate-y-1/2 left-1/2 -translate-x-1/2 px-[calc(3vh)] text-center z-20">
<h1 class="text-[calc(12vh)] text-white uppercase font-bold z-20">
Events
</h1>
</div>
<div class="w-full h-full bg-[rgba(0,0,0,0.4)] absolute top-0 left-0 z-10"></div>
</div>
<!-- Department Events -->
<section class="w-full bg-[#240A35]">
<div class="absolute w-full h-full top-0 bg-gradient-to-t from-[#240A35] via-transparent to-transparent z-10"> </div>
<!-- Computer Events -->
<div class="py-6 px-4">
<h1 class="mb-4 text-white font-bold text-2xl">Computer Engineering</h1>
<div class="grid grid-cols-4 gap-5 mx-2">
<div class="bg-[#AAABE2]/50 backdrop-blur-md rounded-lg group" id="event">
<div class="w-full rounded-t-lg overflow-hidden relative group">
<img src="./static/event-images/1.jpg" alt="1"
class="group-hover:scale-110 h-full w-full object-cover overflow-hidden transition-all duration-300">
</div>
<div class="my-3 px-4">
<h1 class="text-white font-bold text-2xl capitalize eventName">X-motion game mania
</h1>
<p class=" text-[#2F1D69] text-lg my-2 font-semibold rounded-lg capitalize w-fit">
₹100 per
head</p>
<a href="/"
class="bg-[#2F1D69] text-white font-semibold px-2 py-1 rounded-lg">Register</a>
</div>
<p class="mt-2 px-4 text-white my-3">Lorem ipsum dolor sit amet, consectetur adipisicing
elit.
Dignissimos, nisi officia.
Ratione natus doloremque magni quam explicabo</p>
<div
class="flex items-end justify-center bg-[#2F1D69] h-14 px-2 -pt-10 pb-0 rounded-b-lg relative">
<div class="flex flex-col items-center absolute bottom-0 left-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
2</p>
<p
class="bg-gray-500 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1500</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 ">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
1</p>
<p
class="bg-yellow-500 px-4 py-2 text-white font-semibold transition-all duration-300 hover:py-5">
₹2000</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 right-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
3</p>
<p
class="bg-orange-900 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1000</p>
</div>
</div>
</div>
<div class="bg-[#AAABE2]/50 backdrop-blur-md rounded-lg group" id="event">
<div class="w-full rounded-t-lg overflow-hidden relative group">
<img src="./static/event-images/2.jpg" alt="1"
class="group-hover:scale-110 h-full w-full object-cover overflow-hidden transition-all duration-300">
</div>
<div class="my-3 px-4">
<h1 class="text-white font-bold text-2xl capitalize eventName">X-motion game mania
</h1>
<p class=" text-[#2F1D69] text-lg my-2 font-semibold rounded-lg capitalize w-fit">
₹100 per
head</p>
<a href="/"
class="bg-[#2F1D69] text-white font-semibold px-2 py-1 rounded-lg">Register</a>
</div>
<p class="mt-2 px-4 text-white my-3">Lorem ipsum dolor sit amet, consectetur adipisicing
elit.
Dignissimos, nisi officia.
Ratione natus doloremque magni quam explicabo</p>
<div
class="flex items-end justify-center bg-[#2F1D69] h-14 px-2 -pt-10 pb-0 rounded-b-lg relative">
<div class="flex flex-col items-center absolute bottom-0 left-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
2</p>
<p
class="bg-gray-500 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1500</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 ">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
1</p>
<p
class="bg-yellow-500 px-4 py-2 text-white font-semibold transition-all duration-300 hover:py-5">
₹2000</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 right-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
3</p>
<p
class="bg-orange-900 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1000</p>
</div>
</div>
</div>
<div class="bg-[#AAABE2]/50 backdrop-blur-md rounded-lg group" id="event">
<div class="w-full rounded-t-lg overflow-hidden relative group">
<img src="./static/event-images/4.jpg" alt="1"
class="group-hover:scale-110 h-full w-full object-cover overflow-hidden transition-all duration-300">
</div>
<div class="my-3 px-4">
<h1 class="text-white font-bold text-2xl capitalize eventName">X-motion game mania
</h1>
<p class=" text-[#2F1D69] text-lg my-2 font-semibold rounded-lg capitalize w-fit">
₹100 per
head</p>
<a href="/"
class="bg-[#2F1D69] text-white font-semibold px-2 py-1 rounded-lg">Register</a>
</div>
<p class="mt-2 px-4 text-white my-3">Lorem ipsum dolor sit amet, consectetur adipisicing
elit.
Dignissimos, nisi officia.
Ratione natus doloremque magni quam explicabo</p>
<div
class="flex items-end justify-center bg-[#2F1D69] h-14 px-2 -pt-10 pb-0 rounded-b-lg relative">
<div class="flex flex-col items-center absolute bottom-0 left-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
2</p>
<p
class="bg-gray-500 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1500</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 ">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
1</p>
<p
class="bg-yellow-500 px-4 py-2 text-white font-semibold transition-all duration-300 hover:py-5">
₹2000</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 right-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
3</p>
<p
class="bg-orange-900 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1000</p>
</div>
</div>
</div>
<div class="bg-[#AAABE2]/50 backdrop-blur-md rounded-lg group" id="event">
<div class="w-full rounded-t-lg overflow-hidden relative group">
<img src="./static/event-images/1.jpg" alt="1"
class="group-hover:scale-110 h-full w-full object-cover overflow-hidden transition-all duration-300">
</div>
<div class="my-3 px-4">
<h1 class="text-white font-bold text-2xl capitalize eventName">X-motion game mania
</h1>
<p class=" text-[#2F1D69] text-lg my-2 font-semibold rounded-lg capitalize w-fit">
₹100 per
head</p>
<a href="/"
class="bg-[#2F1D69] text-white font-semibold px-2 py-1 rounded-lg">Register</a>
</div>
<p class="mt-2 px-4 text-white my-3">Lorem ipsum dolor sit amet, consectetur adipisicing
elit.
Dignissimos, nisi officia.
Ratione natus doloremque magni quam sada dd d ada das dad asdasdas d asdad ad asd asd asdasd asd adasd adasdasd asd addadexplicabo</p>
<div
class="flex items-end justify-center bg-[#2F1D69] h-14 px-2 -pt-10 pb-0 rounded-b-lg relative">
<div class="flex flex-col items-center absolute bottom-0 left-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
2</p>
<p
class="bg-gray-500 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1500</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 ">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
1</p>
<p
class="bg-yellow-500 px-4 py-2 text-white font-semibold transition-all duration-300 hover:py-5">
₹2000</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 right-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
3</p>
<p
class="bg-orange-900 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1000</p>
</div>
</div>
</div>
<div class="bg-[#AAABE2]/50 backdrop-blur-md rounded-lg group" id="event">
<div class="w-full rounded-t-lg overflow-hidden relative group">
<img src="./static/event-images/2.jpg" alt="1"
class="group-hover:scale-110 h-full w-full object-cover overflow-hidden transition-all duration-300">
</div>
<div class="my-3 px-4">
<h1 class="text-white font-bold text-2xl capitalize eventName">X-motion game mania
</h1>
<p class=" text-[#2F1D69] text-lg my-2 font-semibold rounded-lg capitalize w-fit">
₹100 per
head</p>
<a href="/"
class="bg-[#2F1D69] text-white font-semibold px-2 py-1 rounded-lg">Register</a>
</div>
<p class="mt-2 px-4 text-white my-3">Lorem ipsum dolor sit amet, consectetur adipisicing
elit.
Dignissimos, nisi officia.
Ratione natus doloremque magni quam explicabo</p>
<div
class="flex items-end justify-center bg-[#2F1D69] h-14 px-2 -pt-10 pb-0 rounded-b-lg relative">
<div class="flex flex-col items-center absolute bottom-0 left-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
2</p>
<p
class="bg-gray-500 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1500</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 ">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
1</p>
<p
class="bg-yellow-500 px-4 py-2 text-white font-semibold transition-all duration-300 hover:py-5">
₹2000</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 right-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
3</p>
<p
class="bg-orange-900 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1000</p>
</div>
</div>
</div>
<div class="bg-[#AAABE2]/50 backdrop-blur-md rounded-lg group" id="event">
<div class="w-full rounded-t-lg overflow-hidden relative group">
<img src="./static/event-images/4.jpg" alt="1"
class="group-hover:scale-110 h-full w-full object-cover overflow-hidden transition-all duration-300">
</div>
<div class="my-3 px-4">
<h1 class="text-white font-bold text-2xl capitalize eventName">X-motion game mania
</h1>
<p class=" text-[#2F1D69] text-lg my-2 font-semibold rounded-lg capitalize w-fit">
₹100 per
head</p>
<a href="/"
class="bg-[#2F1D69] text-white font-semibold px-2 py-1 rounded-lg">Register</a>
</div>
<p class="mt-2 px-4 text-white my-3">Lorem ipsum dolor sit amet, consectetur adipisicing
elit.
Dignissimos, nisi officia.
Ratione natus doloremque magni quam explicabo</p>
<div
class="flex items-end justify-center bg-[#2F1D69] h-14 px-2 -pt-10 pb-0 rounded-b-lg relative">
<div class="flex flex-col items-center absolute bottom-0 left-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
2</p>
<p
class="bg-gray-500 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1500</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 ">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
1</p>
<p
class="bg-yellow-500 px-4 py-2 text-white font-semibold transition-all duration-300 hover:py-5">
₹2000</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 right-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
3</p>
<p
class="bg-orange-900 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1000</p>
</div>
</div>
</div>
<div class="bg-[#AAABE2]/50 backdrop-blur-md rounded-lg group" id="event">
<div class="w-full rounded-t-lg overflow-hidden relative group">
<img src="./static/event-images/3.jpg" alt="1"
class="group-hover:scale-110 h-full w-full object-cover overflow-hidden transition-all duration-300">
</div>
<div class="my-3 px-4">
<h1 class="text-white font-bold text-2xl capitalize eventName">X-motion game mania
</h1>
<p class=" text-[#2F1D69] text-lg my-2 font-semibold rounded-lg capitalize w-fit">
₹100 per
head</p>
<a href="/"
class="bg-[#2F1D69] text-white font-semibold px-2 py-1 rounded-lg">Register</a>
</div>
<p class="mt-2 px-4 text-white my-3">Lorem ipsum dolor sit amet, consectetur adipisicing
elit.
Dignissimos, nisi officia.
Ratione natus doloremque magni quam explicabo</p>
<div
class="flex items-end justify-center bg-[#2F1D69] h-14 px-2 -pt-10 pb-0 rounded-b-lg relative">
<div class="flex flex-col items-center absolute bottom-0 left-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
2</p>
<p
class="bg-gray-500 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1500</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 ">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
1</p>
<p
class="bg-yellow-500 px-4 py-2 text-white font-semibold transition-all duration-300 hover:py-5">
₹2000</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 right-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
3</p>
<p
class="bg-orange-900 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1000</p>
</div>
</div>
</div>
</div>
</div>
<!-- IT Events -->
<div class="py-6 px-4">
<h1 class="mb-4 text-white font-bold text-2xl">IT Engineering</h1>
<div class="grid grid-cols-4 gap-5 mx-2">
<div class="bg-[#AAABE2]/50 backdrop-blur-md rounded-lg group" id="event">
<div class="w-full rounded-t-lg overflow-hidden relative group">
<img src="./static/event-images/1.jpg" alt="1"
class="group-hover:scale-110 h-full w-full object-cover overflow-hidden transition-all duration-300">
</div>
<div class="my-3 px-4">
<h1 class="text-white font-bold text-2xl capitalize eventName">X-motion game mania
</h1>
<p class=" text-[#2F1D69] text-lg my-2 font-semibold rounded-lg capitalize w-fit">
₹100 per
head</p>
<a href="/"
class="bg-[#2F1D69] text-white font-semibold px-2 py-1 rounded-lg">Register</a>
</div>
<p class="mt-2 px-4 text-white my-3">Lorem ipsum dolor sit amet, consectetur adipisicing
elit.
Dignissimos, nisi officia.
Ratione natus doloremque magni quam explicabo</p>
<div
class="flex items-end justify-center bg-[#2F1D69] h-14 px-2 -pt-10 pb-0 rounded-b-lg relative">
<div class="flex flex-col items-center absolute bottom-0 left-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
2</p>
<p
class="bg-gray-500 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1500</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 ">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
1</p>
<p
class="bg-yellow-500 px-4 py-2 text-white font-semibold transition-all duration-300 hover:py-5">
₹2000</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 right-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
3</p>
<p
class="bg-orange-900 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1000</p>
</div>
</div>
</div>
<div class="bg-[#AAABE2]/50 backdrop-blur-md rounded-lg group" id="event">
<div class="w-full rounded-t-lg overflow-hidden relative group">
<img src="./static/event-images/2.jpg" alt="1"
class="group-hover:scale-110 h-full w-full object-cover overflow-hidden transition-all duration-300">
</div>
<div class="my-3 px-4">
<h1 class="text-white font-bold text-2xl capitalize eventName">X-motion game mania
</h1>
<p class=" text-[#2F1D69] text-lg my-2 font-semibold rounded-lg capitalize w-fit">
₹100 per
head</p>
<a href="/"
class="bg-[#2F1D69] text-white font-semibold px-2 py-1 rounded-lg">Register</a>
</div>
<p class="mt-2 px-4 text-white my-3">Lorem ipsum dolor sit amet, consectetur adipisicing
elit.
Dignissimos, nisi officia.
Ratione natus doloremque magni quam explicabo</p>
<div
class="flex items-end justify-center bg-[#2F1D69] h-14 px-2 -pt-10 pb-0 rounded-b-lg relative">
<div class="flex flex-col items-center absolute bottom-0 left-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
2</p>
<p
class="bg-gray-500 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1500</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 ">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
1</p>
<p
class="bg-yellow-500 px-4 py-2 text-white font-semibold transition-all duration-300 hover:py-5">
₹2000</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 right-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
3</p>
<p
class="bg-orange-900 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1000</p>
</div>
</div>
</div>
<div class="bg-[#AAABE2]/50 backdrop-blur-md rounded-lg group" id="event">
<div class="w-full rounded-t-lg overflow-hidden relative group">
<img src="./static/event-images/4.jpg" alt="1"
class="group-hover:scale-110 h-full w-full object-cover overflow-hidden transition-all duration-300">
</div>
<div class="my-3 px-4">
<h1 class="text-white font-bold text-2xl capitalize eventName">X-motion game mania
</h1>
<p class=" text-[#2F1D69] text-lg my-2 font-semibold rounded-lg capitalize w-fit">
₹100 per
head</p>
<a href="/"
class="bg-[#2F1D69] text-white font-semibold px-2 py-1 rounded-lg">Register</a>
</div>
<p class="mt-2 px-4 text-white my-3">Lorem ipsum dolor sit amet, consectetur adipisicing
elit.
Dignissimos, nisi officia.
Ratione natus doloremque magni quam explicabo</p>
<div
class="flex items-end justify-center bg-[#2F1D69] h-14 px-2 -pt-10 pb-0 rounded-b-lg relative">
<div class="flex flex-col items-center absolute bottom-0 left-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
2</p>
<p
class="bg-gray-500 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1500</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 ">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
1</p>
<p
class="bg-yellow-500 px-4 py-2 text-white font-semibold transition-all duration-300 hover:py-5">
₹2000</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 right-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
3</p>
<p
class="bg-orange-900 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1000</p>
</div>
</div>
</div>
<div class="bg-[#AAABE2]/50 backdrop-blur-md rounded-lg group" id="event">
<div class="w-full rounded-t-lg overflow-hidden relative group">
<img src="./static/event-images/1.jpg" alt="1"
class="group-hover:scale-110 h-full w-full object-cover overflow-hidden transition-all duration-300">
</div>
<div class="my-3 px-4">
<h1 class="text-white font-bold text-2xl capitalize eventName">X-motion game mania
</h1>
<p class=" text-[#2F1D69] text-lg my-2 font-semibold rounded-lg capitalize w-fit">
₹100 per
head</p>
<a href="/"
class="bg-[#2F1D69] text-white font-semibold px-2 py-1 rounded-lg">Register</a>
</div>
<p class="mt-2 px-4 text-white my-3">Lorem ipsum dolor sit amet, consectetur adipisicing
elit.
Dignissimos, nisi officia.
Ratione natus doloremque magni quam explicabo</p>
<div
class="flex items-end justify-center bg-[#2F1D69] h-14 px-2 -pt-10 pb-0 rounded-b-lg relative">
<div class="flex flex-col items-center absolute bottom-0 left-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
2</p>
<p
class="bg-gray-500 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1500</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 ">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
1</p>
<p
class="bg-yellow-500 px-4 py-2 text-white font-semibold transition-all duration-300 hover:py-5">
₹2000</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 right-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
3</p>
<p
class="bg-orange-900 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1000</p>
</div>
</div>
</div>
<div class="bg-[#AAABE2]/50 backdrop-blur-md rounded-lg group" id="event">
<div class="w-full rounded-t-lg overflow-hidden relative group">
<img src="./static/event-images/2.jpg" alt="1"
class="group-hover:scale-110 h-full w-full object-cover overflow-hidden transition-all duration-300">
</div>
<div class="my-3 px-4">
<h1 class="text-white font-bold text-2xl capitalize eventName">X-motion game mania
</h1>
<p class=" text-[#2F1D69] text-lg my-2 font-semibold rounded-lg capitalize w-fit">
₹100 per
head</p>
<a href="/"
class="bg-[#2F1D69] text-white font-semibold px-2 py-1 rounded-lg">Register</a>
</div>
<p class="mt-2 px-4 text-white my-3">Lorem ipsum dolor sit amet, consectetur adipisicing
elit.
Dignissimos, nisi officia.
Ratione natus doloremque magni quam explicabo</p>
<div
class="flex items-end justify-center bg-[#2F1D69] h-14 px-2 -pt-10 pb-0 rounded-b-lg relative">
<div class="flex flex-col items-center absolute bottom-0 left-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
2</p>
<p
class="bg-gray-500 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1500</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 ">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
1</p>
<p
class="bg-yellow-500 px-4 py-2 text-white font-semibold transition-all duration-300 hover:py-5">
₹2000</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 right-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
3</p>
<p
class="bg-orange-900 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1000</p>
</div>
</div>
</div>
<div class="bg-[#AAABE2]/50 backdrop-blur-md rounded-lg group" id="event">
<div class="w-full rounded-t-lg overflow-hidden relative group">
<img src="./static/event-images/4.jpg" alt="1"
class="group-hover:scale-110 h-full w-full object-cover overflow-hidden transition-all duration-300">
</div>
<div class="my-3 px-4">
<h1 class="text-white font-bold text-2xl capitalize eventName">X-motion game mania
</h1>
<p class=" text-[#2F1D69] text-lg my-2 font-semibold rounded-lg capitalize w-fit">
₹100 per
head</p>
<a href="/"
class="bg-[#2F1D69] text-white font-semibold px-2 py-1 rounded-lg">Register</a>
</div>
<p class="mt-2 px-4 text-white my-3">Lorem ipsum dolor sit amet, consectetur adipisicing
elit.
Dignissimos, nisi officia.
Ratione natus doloremque magni quam explicabo</p>
<div
class="flex items-end justify-center bg-[#2F1D69] h-14 px-2 -pt-10 pb-0 rounded-b-lg relative">
<div class="flex flex-col items-center absolute bottom-0 left-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
2</p>
<p
class="bg-gray-500 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1500</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 ">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
1</p>
<p
class="bg-yellow-500 px-4 py-2 text-white font-semibold transition-all duration-300 hover:py-5">
₹2000</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 right-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
3</p>
<p
class="bg-orange-900 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1000</p>
</div>
</div>
</div>
<div class="bg-[#AAABE2]/50 backdrop-blur-md rounded-lg group" id="event">
<div class="w-full rounded-t-lg overflow-hidden relative group">
<img src="./static/event-images/3.jpg" alt="1"
class="group-hover:scale-110 h-full w-full object-cover overflow-hidden transition-all duration-300">
</div>
<div class="my-3 px-4">
<h1 class="text-white font-bold text-2xl capitalize eventName">X-motion game mania
</h1>
<p class=" text-[#2F1D69] text-lg my-2 font-semibold rounded-lg capitalize w-fit">
₹100 per
head</p>
<a href="/"
class="bg-[#2F1D69] text-white font-semibold px-2 py-1 rounded-lg">Register</a>
</div>
<p class="mt-2 px-4 text-white my-3">Lorem ipsum dolor sit amet, consectetur adipisicing
elit.
Dignissimos, nisi officia.
Ratione natus doloremque magni quam explicabo</p>
<div
class="flex items-end justify-center bg-[#2F1D69] h-14 px-2 -pt-10 pb-0 rounded-b-lg relative">
<div class="flex flex-col items-center absolute bottom-0 left-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
2</p>
<p
class="bg-gray-500 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1500</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 ">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
1</p>
<p
class="bg-yellow-500 px-4 py-2 text-white font-semibold transition-all duration-300 hover:py-5">
₹2000</p>
</div>
<div class="flex flex-col items-center absolute bottom-0 right-[47px]">
<p
class="text-[#2F1D69] font-semibold bg-white rounded-full h-5 w-5 flex items-center justify-center mb-1 font-bold">
3</p>
<p
class="bg-orange-900 px-4 py-[3px] text-white font-semibold transition-all duration-300 hover:py-5">
₹1000</p>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-[#211e60] pt-20">
<div class='flex flex-col md:flex-row lg:justify-around justify-center md:gap-10 gap-3 xl:px-32 lg:px-20 md:px-12 px-8 mb-8'>
<!-- Social | Logo -->
<div class='flex flex-col md:items-center items-start gap-3'>
<img src='./static/ldrp.png' alt='Xenesis' class='lg:w-[140px] w-[110px]' />
<p class='lg:max-w-[200px] md:max-w-[140px] md:text-center text-gray-300'>Epic Events organized for ultimate students!</p>
<div class='flex items-center justify-center lg:gap-5 gap-4 md:mt-3 mt-1'>
<a href='' class='text-[#9740fe] lg:text-2xl md:text-xl text-2xl hover:-translate-y-2 hover:text-[#dfc5ff] transition-all duration-300'><i class="bi bi-facebook"></i></a>
<a href='' class='text-[#9740fe] lg:text-2xl md:text-xl text-2xl hover:-translate-y-2 hover:text-[#dfc5ff] transition-all duration-300'><i class="bi bi-twitter"></i></a>
<a href='' class='text-[#9740fe] lg:text-2xl md:text-xl text-2xl hover:-translate-y-2 hover:text-[#dfc5ff] transition-all duration-300'><i class="bi bi-instagram"></i></a>
<a href='' class='text-[#9740fe] lg:text-3xl md:text-xl text-2xl hover:-translate-y-2 hover:text-[#dfc5ff] transition-all duration-300'><i class="bi bi-youtube"></i></a>
</div>
</div>
<!-- Useful Links -->
<div class='pt-4'>
<h3 class='font-bold text-white lg:text-xl sm:text-lg mb-4 pb-2 relative after:content-"" after:absolute lg:after:left-2 after:left-0 after:bottom-0 md:after:w-[50%] after:w-[100px] after:h-[3px] after:bg-[#9704fe]'>Useful Links</h3>
<div class='flex flex-col text-left text-gray-400 gap-1 lg:pl-2 pl-0 lg:text-base text-sm'>
<a href='' class='hover:translate-x-2 hover:text-[#bc85ff] transition-all duration-300'>Events</a>
<a href='' class='hover:translate-x-2 hover:text-[#bc85ff] transition-all duration-300'>About Us</a>
<a href='' class='hover:translate-x-2 hover:text-[#bc85ff] transition-all duration-300'>Register in Event</a>
<a href='' class='hover:translate-x-2 hover:text-[#bc85ff] transition-all duration-300'>Events</a>
</div>
</div>
<!-- Join Us -->
<div class='pt-4'>
<h3 class='font-bold text-white lg:text-xl sm:text-lg mb-4 pb-2 relative after:content-"" after:absolute lg:after:left-2 after:left-0 after:bottom-0 md:after:w-[50%] after:w-[100px] after:h-[3px] after:bg-[#9704fe]'>Contact Us</h3>
<div class='flex flex-col text-left gap-2 text-gray-400 lg:pl-2 pl-0 lg:text-base text-sm'>
<div class='flex flex-col group cursor-pointer'>
<p class='text-[#9740fe]'>Join Us:</p>
<p class='text-gray-300 text-sm group-hover:translate-x-2 transition-all duration-300'>[email protected]</p>
</div>
<div class='flex flex-col group cursor-pointer'>
<p class='text-[#9740fe]'>Phone:</p>
<p class='text-gray-300 text-sm group-hover:translate-x-2 transition-all duration-300'>+91 786 308 5614</p>
</div>
</div>
</div>
<!-- Newsletter -->
<div class='pt-4'>
<h3 class='font-bold text-white lg:text-xl sm:text-lg mb-5 pb-2 relative after:content-"" after:absolute after:left-0 after:bottom-0 md:after:w-[50%] after:w-[100px] after:h-[3px] after:bg-[#9704fe]'>Newsletter Signup</h3>
<div class='flex flex-col text-left gap-2 text-gray-400 lg:text-base text-sm'>
<form class='flex flex-col items-start gap-3'>
<input type="email" placeholder='[email protected]' class='lg:px-3 px-2.5 lg:py-2 py-1.5 text-sm outline-none bg-transparent border border-gray-500 rounded' />
<input type="submit" value="Subscribe" class='uppercase cursor-pointer text-xs lg:px-6 px-4 lg:py-3 py-2 clip-button text-white font-semibold hover:bg-[black] bg-gradient-to-tr from-[#7815ea] to-[#c595ff] hover:translate-x-1 transition-all duration-300' />
</form>
</div>
</div>
</div>
<!-- Copyrights -->
<div class='bg-[#240a34] bg-opacity-20 md:w-fit w-full md:px-24 px-8 md:pr-36 mb-0 sm:clip-copyrights text-gray-300 font-semibold py-8 text-xl'>
© 2023 Xenesis All Rights Registered
</div>
</footer>
<script>
function handleLeft() {
let slider = document.getElementById("eventSlider");
let event = document.getElementById("event");
slider.scrollLeft += (event.offsetWidth + 20);
}
function handleRight() {
let slider = document.getElementById("eventSlider");
let event = document.getElementById("event");
slider.scrollLeft -= (event.offsetWidth + 20);
}
window.addEventListener('scroll', function () {
const header = document.getElementById("navbar");
header.classList.toggle('backdrop-blur-md', window.scrollY > 0);
});
window.addEventListener('scroll', function () {
const header = document.getElementById("navbar");
header.classList.toggle('backdrop-blur-md', window.scrollY > 0);
});
// Menu Dropdown Code
let mobileMenu = document.querySelector('#mobile-menu');
function toggleMobileMenu() {
mobileMenu.classList.toggle('hidden');
}
// Profile Dropdown Code
let profileDropdownMobile = document.querySelector('#profile-dropdown-mobile');
let profileDropdown = document.querySelector('#profile-dropdown');
function toggleProfileDropdown() {
// Dropdown for Mobile
profileDropdownMobile.classList.toggle('h-none')
profileDropdownMobile.classList.toggle('h-auto')
profileDropdownMobile.classList.toggle('border')
profileDropdownMobile.classList.toggle('py-3')
// Dropdown for Laptop - Tablet
profileDropdown.classList.toggle('h-none')
profileDropdown.classList.toggle('h-auto')
profileDropdown.classList.toggle('border')
profileDropdown.classList.toggle('py-3')
}
</script>
<script id="vs" type="f">
attribute vec2 position;
attribute vec2 texcoord;
uniform mat3 u_matrix;
varying vec2 v_texcoord;
void main() {
gl_Position = vec4(u_matrix * vec3(position, 1), 1);
v_texcoord = texcoord;
}
</script>
<!-- fragment shader -->
<script id="fs" type="f">
precision mediump float;
uniform vec2 u_mouse;
uniform sampler2D u_originalImage;
uniform sampler2D u_mapImage;
varying vec2 v_texcoord;
void main() {
vec4 depthDistortion = texture2D(u_mapImage, v_texcoord);
float parallaxMult = depthDistortion.r;
vec2 parallax = (u_mouse) * parallaxMult;
vec4 original = texture2D(u_originalImage, (v_texcoord + parallax));
gl_FragColor = original;
}
</script>
<!-- partial -->
<script src='https://cdn.rawgit.com/greggman/twgl.js/master/dist/4.x/twgl-full.min.js'></script>
<script src='https://webglfundamentals.org/webgl/resources/m3.js'></script>
<script>
function main(id, sourceImage, depthMap, parallaxSpeed) {
// Get A WebGL context
/** @type {HTMLCanvasElement} */
const canvas = document.getElementById(id);
const gl = canvas.getContext("webgl");
if (!gl) {
return;
}
let originalImage = { width: 0, height: 0 }; // replaced after loading
const originalTexture = twgl.createTexture(
gl,
{
src: sourceImage,
crossOrigin: "",
},
(err, texture, source) => {
originalImage = source;
}
);
const mapTexture = twgl.createTexture(gl, {
src: depthMap,
crossOrigin: "",
});
// compile shaders, link program, lookup location
const programInfo = twgl.createProgramInfo(gl, ["vs", "fs"]);
// calls gl.createBuffer, gl.bindBuffer, gl.bufferData for a quad
const bufferInfo = twgl.primitives.createXYQuadBufferInfo(gl);
const mouse = [0, 0];
document.addEventListener("mousemove", (event) => {
mouse[0] = ((event.clientX / gl.canvas.clientWidth) * 2 - 1) * parallaxSpeed;
mouse[1] = ((event.clientY / gl.canvas.clientHeight) * 2 - 1) * parallaxSpeed;
});
document.addEventListener("touchmove", (event) => {
mouse[0] = ((event.touches[0].clientX / gl.canvas.clientWidth) * 2 - 1) * parallaxSpeed;
mouse[1] = ((event.touches[0].clientY / gl.canvas.clientHeight) * 2 - 1) * parallaxSpeed;
});
document.addEventListener("touchend", (event) => {
mouse[0] = 0;
mouse[1] = 0;
});
var nMouse = [0, 0];
var oMouse = [0, 0];
requestAnimationFrame(render);
function render() {
twgl.resizeCanvasToDisplaySize(gl.canvas);
gl.viewport(0, 0, gl.canvas.width, gl.canvas.height);
gl.clearColor(0, 0, 0, 0);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.useProgram(programInfo.program);
// calls gl.bindBuffer, gl.enableVertexAttribArray, gl.vertexAttribPointer
twgl.setBuffersAndAttributes(gl, programInfo, bufferInfo);
const canvasAspect = gl.canvas.clientWidth / gl.canvas.clientHeight;
const imageAspect = originalImage.width / originalImage.height;
const mat = m3.scaling(imageAspect / canvasAspect, -1);
nMouse[0] += (mouse[0] - nMouse[0]) * 0.05;
nMouse[1] += (mouse[1] - nMouse[1]) * 0.05;
// calls gl.activeTexture, gl.bindTexture, gl.uniformXXX
twgl.setUniforms(programInfo, {
u_matrix: mat,
u_originalImage: originalTexture,
u_mapImage: mapTexture,
u_mouse: nMouse,
});
// calls gl.drawArrays or gl.drawElements
twgl.drawBufferInfo(gl, bufferInfo);
requestAnimationFrame(render);
}
}
main("canvas", "./static/event-images/eventHerolandingPage2.png", "./static/event-images/eventHeroDepthMap.jpeg", -0.03);
</script>
</body>
</html> |