File size: 50,294 Bytes
c9d45df 5691058 c9d45df 5691058 c9d45df 5691058 c9d45df 5691058 c9d45df 5691058 c9d45df 5691058 c9d45df 5691058 c9d45df 5691058 c9d45df | 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 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PixelGrid - Your Digital Billboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.pixel {
border: 1px solid #e5e7eb;
transition: all 0.2s;
position: relative;
}
.pixel:hover {
transform: scale(1.05);
z-index: 10;
box-shadow: 0 0 10px rgba(0,0,0,0.3);
}
.pixel-available {
background-color: #f3f4f6;
}
.pixel-sold {
background-color: #ffffff;
}
.pixel-highlight {
background-color: #93c5fd !important;
}
.pixel-selected {
background-color: #60a5fa !important;
border: 1px solid #3b82f6 !important;
}
.grid-container {
overflow: auto;
max-width: 100%;
border: 2px solid #1e40af;
border-radius: 0.5rem;
background-color: #f9fafb;
}
.pixel-image {
width: 100%;
height: 100%;
object-fit: contain;
background-color: white;
}
.modal {
transition: all 0.3s ease;
opacity: 0;
visibility: hidden;
}
.modal.active {
opacity: 1;
visibility: visible;
}
.modal-content {
transform: scale(0.9);
transition: all 0.3s ease;
}
.modal.active .modal-content {
transform: scale(1);
}
@media (max-width: 768px) {
.pixel {
border-width: 0.5px;
}
}
</style>
</head>
<body class="bg-gray-50 min-h-screen">
<!-- Navigation -->
<nav class="bg-blue-800 text-white shadow-lg">
<div class="container mx-auto px-4 py-3 flex justify-between items-center">
<div class="flex items-center space-x-2">
<i class="fas fa-border-all text-2xl"></i>
<h1 class="text-2xl font-bold">PixelGrid</h1>
</div>
<div class="hidden md:flex space-x-6">
<a href="#about" class="hover:text-blue-200 transition">About</a>
<a href="#pricing" class="hover:text-blue-200 transition">Pricing</a>
<a href="#grid" class="hover:text-blue-200 transition">The Grid</a>
<a href="#contact" class="hover:text-blue-200 transition">Contact</a>
</div>
<button class="md:hidden text-xl" id="mobile-menu-button">
<i class="fas fa-bars"></i>
</button>
</div>
<!-- Mobile menu -->
<div class="md:hidden hidden bg-blue-700 px-4 py-2" id="mobile-menu">
<a href="#about" class="block py-2 hover:text-blue-200 transition">About</a>
<a href="#pricing" class="block py-2 hover:text-blue-200 transition">Pricing</a>
<a href="#grid" class="block py-2 hover:text-blue-200 transition">The Grid</a>
<a href="#contact" class="block py-2 hover:text-blue-200 transition">Contact</a>
</div>
</nav>
<!-- Hero Section -->
<header class="bg-gradient-to-r from-blue-600 to-blue-800 text-white py-16">
<div class="container mx-auto px-4 text-center">
<h1 class="text-4xl md:text-5xl font-bold mb-4">Own Your Piece of Digital Real Estate</h1>
<p class="text-xl md:text-2xl mb-8 max-w-3xl mx-auto">Advertise your brand on our pixel grid and get direct traffic to your website!</p>
<div class="flex flex-col md:flex-row justify-center gap-4">
<a href="#grid" class="bg-white text-blue-800 font-bold py-3 px-6 rounded-lg hover:bg-blue-100 transition duration-300">View Available Pixels</a>
<a href="#pricing" class="bg-transparent border-2 border-white text-white font-bold py-3 px-6 rounded-lg hover:bg-blue-700 transition duration-300">Pricing Plans</a>
</div>
</div>
</header>
<!-- About Section -->
<section id="about" class="py-16 bg-white">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12 text-blue-800">About PixelGrid</h2>
<div class="flex flex-col md:flex-row items-center gap-8">
<div class="md:w-1/2">
<img src="https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" alt="Digital advertising" class="rounded-lg shadow-xl w-full h-auto">
</div>
<div class="md:w-1/2">
<h3 class="text-2xl font-semibold mb-4 text-blue-700">The Digital Billboard Revolution</h3>
<p class="text-gray-700 mb-4">PixelGrid is inspired by the original Million Dollar Homepage that took the internet by storm. We've created a modern, responsive platform where businesses and individuals can purchase pixel blocks to display their ads.</p>
<p class="text-gray-700 mb-6">Each pixel block you purchase becomes a clickable advertisement that directs visitors straight to your website. It's simple, effective, and gets your brand in front of thousands of potential customers.</p>
<div class="bg-blue-50 p-4 rounded-lg border-l-4 border-blue-600">
<p class="text-blue-800 font-medium"><i class="fas fa-lightbulb mr-2"></i> Did you know? The original Million Dollar Homepage sold all its pixels in just 5 months!</p>
</div>
</div>
</div>
</div>
</section>
<!-- Pricing Section -->
<section id="pricing" class="py-16 bg-gray-50">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-4 text-blue-800">Simple Pricing</h2>
<p class="text-center text-gray-600 max-w-2xl mx-auto mb-12">Choose the perfect pixel block size for your advertising needs. All prices are one-time payments.</p>
<div class="grid grid-cols-1 md:grid-cols-3 gap-8 max-w-5xl mx-auto">
<!-- Small Block -->
<div class="bg-white rounded-lg shadow-lg overflow-hidden border border-gray-200 hover:border-blue-500 transition duration-300">
<div class="bg-blue-600 text-white py-4 px-6">
<h3 class="text-xl font-bold">10×10 Block</h3>
<p class="text-blue-100">Perfect for small brands</p>
</div>
<div class="p-6">
<div class="text-3xl font-bold mb-4">$10</div>
<ul class="space-y-3 mb-6">
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> 100 pixels total</li>
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Image upload</li>
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Clickable link</li>
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Permanent placement</li>
</ul>
<button class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-4 rounded transition duration-300" onclick="showPurchaseModal(10)">Select Block</button>
</div>
</div>
<!-- Medium Block -->
<div class="bg-white rounded-lg shadow-lg overflow-hidden border-2 border-blue-500 transform scale-105 z-10">
<div class="bg-blue-700 text-white py-4 px-6">
<h3 class="text-xl font-bold">20×20 Block</h3>
<p class="text-blue-100">Most popular choice</p>
</div>
<div class="p-6">
<div class="text-3xl font-bold mb-4">$35 <span class="text-sm font-normal text-gray-500">(Save $5)</span></div>
<ul class="space-y-3 mb-6">
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> 400 pixels total</li>
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Image upload</li>
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Clickable link</li>
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Permanent placement</li>
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Priority positioning</li>
</ul>
<button class="w-full bg-blue-700 hover:bg-blue-800 text-white font-bold py-3 px-4 rounded transition duration-300" onclick="showPurchaseModal(20)">Select Block</button>
</div>
</div>
<!-- Large Block -->
<div class="bg-white rounded-lg shadow-lg overflow-hidden border border-gray-200 hover:border-blue-500 transition duration-300">
<div class="bg-blue-600 text-white py-4 px-6">
<h3 class="text-xl font-bold">50×50 Block</h3>
<p class="text-blue-100">For maximum visibility</p>
</div>
<div class="p-6">
<div class="text-3xl font-bold mb-4">$200 <span class="text-sm font-normal text-gray-500">(Save $50)</span></div>
<ul class="space-y-3 mb-6">
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> 2,500 pixels total</li>
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Image upload</li>
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Clickable link</li>
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Permanent placement</li>
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Premium positioning</li>
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Featured in newsletter</li>
</ul>
<button class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-4 rounded transition duration-300" onclick="showPurchaseModal(50)">Select Block</button>
</div>
</div>
</div>
<div class="mt-12 bg-white p-6 rounded-lg shadow-md max-w-4xl mx-auto">
<h3 class="text-xl font-semibold mb-4 text-blue-700">Custom Block Sizes</h3>
<p class="text-gray-700 mb-4">Need a different size? We offer custom pixel block configurations to meet your specific advertising needs.</p>
<button class="bg-gray-800 hover:bg-gray-900 text-white font-bold py-2 px-4 rounded transition duration-300" onclick="showCustomSizeModal()">Request Custom Size</button>
</div>
</div>
</section>
<!-- The Grid Section -->
<section id="grid" class="py-16 bg-white">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-4 text-blue-800">The Pixel Grid</h2>
<p class="text-center text-gray-600 max-w-2xl mx-auto mb-8">Click and drag to explore. Select available blocks to purchase.</p>
<div class="flex flex-col md:flex-row gap-8">
<div class="md:w-3/4">
<!-- Grid Controls -->
<div class="flex justify-between items-center mb-4">
<div class="flex items-center space-x-2">
<button id="zoom-in" class="bg-gray-200 hover:bg-gray-300 p-2 rounded">
<i class="fas fa-search-plus"></i>
</button>
<button id="zoom-out" class="bg-gray-200 hover:bg-gray-300 p-2 rounded">
<i class="fas fa-search-minus"></i>
</button>
<button id="reset-zoom" class="bg-gray-200 hover:bg-gray-300 p-2 rounded">
<i class="fas fa-expand"></i>
</button>
</div>
<div class="text-sm text-gray-600">
<span id="selected-count">0</span> pixels selected
</div>
</div>
<!-- The Pixel Grid -->
<div class="grid-container relative" id="grid-container">
<div id="pixel-grid" class="grid grid-cols-100 gap-0 bg-white" style="width: 1000px; height: 1000px;"></div>
</div>
<div class="mt-4 flex justify-between items-center">
<div class="text-sm text-gray-600">
Grid size: 100×100 (10,000 total pixels)
</div>
<div class="text-sm text-gray-600">
<span id="available-pixels">9,500</span> pixels available
</div>
</div>
</div>
<!-- Purchase Panel -->
<div class="md:w-1/4">
<div class="bg-gray-50 p-6 rounded-lg shadow-md sticky top-4">
<h3 class="text-xl font-semibold mb-4 text-blue-700">Purchase Details</h3>
<div class="mb-6">
<label class="block text-gray-700 text-sm font-bold mb-2" for="block-size">
Selected Block Size
</label>
<select id="block-size" class="block w-full bg-white border border-gray-300 rounded py-2 px-3 focus:outline-none focus:ring-2 focus:ring-blue-500">
<option value="10">10×10 ($10)</option>
<option value="20">20×20 ($35)</option>
<option value="50">50×50 ($200)</option>
</select>
</div>
<div class="mb-6">
<label class="block text-gray-700 text-sm font-bold mb-2">
Selected Coordinates
</label>
<div id="selected-coordinates" class="bg-white p-3 rounded border border-gray-300 text-sm h-24 overflow-y-auto">
No pixels selected
</div>
</div>
<div class="mb-6">
<label class="block text-gray-700 text-sm font-bold mb-2">
Total Cost
</label>
<div class="text-2xl font-bold text-blue-700" id="total-cost">$0</div>
</div>
<button id="purchase-button" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-4 rounded transition duration-300 disabled:opacity-50 disabled:cursor-not-allowed" disabled onclick="showPurchaseModal()">
Purchase Selected
</button>
<div class="mt-4 text-sm text-gray-600">
<p>Or click directly on the grid to select blocks</p>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Stats Section -->
<section class="py-12 bg-blue-800 text-white">
<div class="container mx-auto px-4">
<div class="grid grid-cols-2 md:grid-cols-4 gap-8 text-center">
<div>
<div class="text-4xl font-bold mb-2" id="total-pixels-sold">500</div>
<div class="text-blue-200">Pixels Sold</div>
</div>
<div>
<div class="text-4xl font-bold mb-2" id="total-revenue">$5,000</div>
<div class="text-blue-200">Revenue Generated</div>
</div>
<div>
<div class="text-4xl font-bold mb-2" id="daily-visitors">1,200</div>
<div class="text-blue-200">Daily Visitors</div>
</div>
<div>
<div class="text-4xl font-bold mb-2" id="days-remaining">120</div>
<div class="text-blue-200">Days Until Sold Out</div>
</div>
</div>
</div>
</section>
<!-- Contact Section -->
<section id="contact" class="py-16 bg-white">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12 text-blue-800">Have Questions?</h2>
<div class="flex flex-col md:flex-row gap-12 max-w-6xl mx-auto">
<div class="md:w-1/2">
<form class="space-y-6">
<div>
<label for="name" class="block text-gray-700 font-medium mb-2">Your Name</label>
<input type="text" id="name" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div>
<label for="email" class="block text-gray-700 font-medium mb-2">Email Address</label>
<input type="email" id="email" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div>
<label for="message" class="block text-gray-700 font-medium mb-2">Your Message</label>
<textarea id="message" rows="5" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"></textarea>
</div>
<button type="submit" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-6 rounded-lg transition duration-300 w-full">
Send Message
</button>
</form>
</div>
<div class="md:w-1/2">
<div class="bg-gray-50 p-6 rounded-lg shadow-sm h-full">
<h3 class="text-xl font-semibold mb-4 text-blue-700">Contact Information</h3>
<div class="space-y-4">
<div class="flex items-start">
<i class="fas fa-envelope text-blue-600 mt-1 mr-3"></i>
<div>
<h4 class="font-medium text-gray-800">Email</h4>
<p class="text-gray-600">contact@pixelgrid.com</p>
</div>
</div>
<div class="flex items-start">
<i class="fas fa-phone-alt text-blue-600 mt-1 mr-3"></i>
<div>
<h4 class="font-medium text-gray-800">Phone</h4>
<p class="text-gray-600">+1 (555) 123-4567</p>
</div>
</div>
<div class="flex items-start">
<i class="fas fa-map-marker-alt text-blue-600 mt-1 mr-3"></i>
<div>
<h4 class="font-medium text-gray-800">Address</h4>
<p class="text-gray-600">123 Digital Street, Silicon Valley, CA 94025</p>
</div>
</div>
</div>
<div class="mt-8">
<h4 class="font-medium text-gray-800 mb-3">Follow Us</h4>
<div class="flex space-x-4">
<a href="#" class="text-blue-600 hover:text-blue-800 text-xl"><i class="fab fa-twitter"></i></a>
<a href="#" class="text-blue-600 hover:text-blue-800 text-xl"><i class="fab fa-facebook"></i></a>
<a href="#" class="text-blue-600 hover:text-blue-800 text-xl"><i class="fab fa-instagram"></i></a>
<a href="#" class="text-blue-600 hover:text-blue-800 text-xl"><i class="fab fa-linkedin"></i></a>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-gray-800 text-white py-8">
<div class="container mx-auto px-4">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="mb-4 md:mb-0">
<div class="flex items-center space-x-2">
<i class="fas fa-border-all text-xl"></i>
<h2 class="text-xl font-bold">PixelGrid</h2>
</div>
<p class="text-gray-400 text-sm mt-1">Your digital advertising platform</p>
</div>
<div class="flex flex-col md:flex-row space-y-2 md:space-y-0 md:space-x-6 text-sm">
<a href="#" class="hover:text-blue-300 transition">Terms of Service</a>
<a href="#" class="hover:text-blue-300 transition">Privacy Policy</a>
<a href="#" class="hover:text-blue-300 transition">FAQ</a>
<a href="#" class="hover:text-blue-300 transition">Refund Policy</a>
</div>
</div>
<div class="border-t border-gray-700 mt-6 pt-6 text-center text-gray-400 text-sm">
<p>© 2023 PixelGrid. All rights reserved.</p>
</div>
</div>
</footer>
<!-- Purchase Modal -->
<div id="purchase-modal" class="modal fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
<div class="modal-content bg-white rounded-lg shadow-xl w-full max-w-md mx-4">
<div class="p-6">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-bold text-blue-800">Purchase Pixel Block</h3>
<button onclick="hideModal('purchase-modal')" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="mb-6">
<div class="flex justify-between mb-2">
<span class="text-gray-700">Block Size:</span>
<span class="font-medium" id="modal-block-size">10×10</span>
</div>
<div class="flex justify-between mb-2">
<span class="text-gray-700">Total Pixels:</span>
<span class="font-medium" id="modal-total-pixels">100</span>
</div>
<div class="flex justify-between mb-4">
<span class="text-gray-700">Total Cost:</span>
<span class="text-xl font-bold text-blue-700" id="modal-total-cost">$10</span>
</div>
<div class="border-t border-gray-200 pt-4">
<div class="mb-4">
<label class="block text-gray-700 text-sm font-bold mb-2" for="pixel-url">
Destination URL
</label>
<input type="url" id="pixel-url" class="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="https://yourwebsite.com">
</div>
<div class="mb-4">
<label class="block text-gray-700 text-sm font-bold mb-2" for="pixel-image">
Upload Image (optional)
</label>
<div class="flex items-center justify-center w-full">
<label for="pixel-image-upload" class="flex flex-col items-center justify-center w-full h-32 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 hover:bg-gray-100">
<div class="flex flex-col items-center justify-center pt-5 pb-6">
<i class="fas fa-cloud-upload-alt text-gray-400 text-3xl mb-2"></i>
<p class="mb-2 text-sm text-gray-500">Click to upload or drag and drop</p>
<p class="text-xs text-gray-500">PNG, JPG (max. 100KB)</p>
</div>
<input id="pixel-image-upload" type="file" class="hidden" accept="image/png, image/jpeg" />
</label>
</div>
<div id="image-preview" class="mt-2 hidden">
<img id="preview-image" src="#" alt="Preview" class="max-w-full h-auto max-h-32 mx-auto">
<button type="button" onclick="removeImage()" class="mt-2 text-red-600 text-sm hover:text-red-800">
<i class="fas fa-trash mr-1"></i> Remove Image
</button>
</div>
</div>
<div class="mb-4">
<label class="block text-gray-700 text-sm font-bold mb-2" for="pixel-email">
Your Email
</label>
<input type="email" id="pixel-email" class="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="your@email.com" required>
</div>
</div>
</div>
<div class="flex justify-end space-x-3">
<button onclick="hideModal('purchase-modal')" class="px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-100 transition">
Cancel
</button>
<button onclick="completePurchase()" class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition">
Complete Purchase
</button>
</div>
</div>
</div>
</div>
<!-- Custom Size Modal -->
<div id="custom-size-modal" class="modal fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
<div class="modal-content bg-white rounded-lg shadow-xl w-full max-w-md mx-4">
<div class="p-6">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-bold text-blue-800">Request Custom Size</h3>
<button onclick="hideModal('custom-size-modal')" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="mb-6">
<div class="mb-4">
<label class="block text-gray-700 text-sm font-bold mb-2" for="custom-width">
Width (in pixels)
</label>
<input type="number" id="custom-width" min="10" max="100" class="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="e.g. 30">
</div>
<div class="mb-4">
<label class="block text-gray-700 text-sm font-bold mb-2" for="custom-height">
Height (in pixels)
</label>
<input type="number" id="custom-height" min="10" max="100" class="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="e.g. 40">
</div>
<div class="mb-4">
<label class="block text-gray-700 text-sm font-bold mb-2" for="custom-email">
Your Email
</label>
<input type="email" id="custom-email" class="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="your@email.com" required>
</div>
<div class="mb-4">
<label class="block text-gray-700 text-sm font-bold mb-2" for="custom-message">
Additional Notes
</label>
<textarea id="custom-message" rows="3" class="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Any special requirements..."></textarea>
</div>
</div>
<div class="flex justify-end space-x-3">
<button onclick="hideModal('custom-size-modal')" class="px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-100 transition">
Cancel
</button>
<button onclick="submitCustomRequest()" class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition">
Submit Request
</button>
</div>
</div>
</div>
</div>
<!-- Success Modal -->
<div id="success-modal" class="modal fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
<div class="modal-content bg-white rounded-lg shadow-xl w-full max-w-md mx-4">
<div class="p-6 text-center">
<div class="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-green-100 mb-4">
<i class="fas fa-check text-green-600 text-xl"></i>
</div>
<h3 class="text-lg font-medium text-gray-900 mb-2" id="success-title">Purchase Successful!</h3>
<div class="mt-2 text-sm text-gray-500" id="success-message">
Your pixel block has been reserved. We've sent a confirmation email with payment instructions.
</div>
<div class="mt-6">
<button onclick="hideModal('success-modal')" class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition">
Continue Browsing
</button>
</div>
</div>
</div>
</div>
<script>
// Mobile menu toggle
document.getElementById('mobile-menu-button').addEventListener('click', function() {
const menu = document.getElementById('mobile-menu');
menu.classList.toggle('hidden');
});
// Initialize the pixel grid
document.addEventListener('DOMContentLoaded', function() {
initializeGrid();
setupEventListeners();
});
// Grid variables
const GRID_SIZE = 100;
const PIXEL_SIZE = 10; // Each pixel is 10px × 10px
let selectedPixels = [];
let currentBlockSize = 10;
let zoomLevel = 1;
// Initialize the grid
function initializeGrid() {
const grid = document.getElementById('pixel-grid');
grid.innerHTML = '';
// Create 100×100 grid
for (let y = 0; y < GRID_SIZE; y++) {
for (let x = 0; x < GRID_SIZE; x++) {
const pixel = document.createElement('div');
pixel.className = 'pixel pixel-available';
pixel.dataset.x = x;
pixel.dataset.y = y;
// Randomly mark some pixels as sold (for demo purposes)
if (Math.random() < 0.05) {
pixel.classList.remove('pixel-available');
pixel.classList.add('pixel-sold');
// Add a demo image to some sold pixels
if (Math.random() < 0.3) {
const img = document.createElement('img');
img.src = `https://picsum.photos/50/50?random=${x}${y}`;
img.className = 'pixel-image';
img.alt = `Ad at ${x},${y}`;
pixel.appendChild(img);
// Make it clickable
pixel.onclick = function(e) {
e.preventDefault();
e.stopPropagation();
window.open('https://example.com', '_blank');
};
}
}
pixel.addEventListener('click', function() {
handlePixelClick(x, y);
});
pixel.addEventListener('mouseover', function() {
highlightBlock(x, y, currentBlockSize);
});
pixel.addEventListener('mouseout', function() {
clearHighlights();
});
grid.appendChild(pixel);
}
}
// Update available pixels count
updateAvailablePixels();
}
// Set up event listeners
function setupEventListeners() {
// Block size selector
document.getElementById('block-size').addEventListener('change', function() {
currentBlockSize = parseInt(this.value);
clearSelection();
});
// Zoom controls
document.getElementById('zoom-in').addEventListener('click', function() {
zoomLevel = Math.min(zoomLevel + 0.1, 2);
updateZoom();
});
document.getElementById('zoom-out').addEventListener('click', function() {
zoomLevel = Math.max(zoomLevel - 0.1, 0.5);
updateZoom();
});
document.getElementById('reset-zoom').addEventListener('click', function() {
zoomLevel = 1;
updateZoom();
});
// Image upload preview
document.getElementById('pixel-image-upload').addEventListener('change', function(e) {
if (e.target.files.length > 0) {
const file = e.target.files[0];
const reader = new FileReader();
reader.onload = function(event) {
document.getElementById('preview-image').src = event.target.result;
document.getElementById('image-preview').classList.remove('hidden');
};
reader.readAsDataURL(file);
}
});
}
// Handle pixel click
function handlePixelClick(x, y) {
const pixel = getPixelElement(x, y);
// Don't allow selection of sold pixels
if (pixel.classList.contains('pixel-sold')) {
return;
}
// Check if we can select a block starting at this pixel
if (!canSelectBlock(x, y, currentBlockSize)) {
alert('This block would extend beyond the grid or include sold pixels. Please select a different area.');
return;
}
// Clear previous selection
clearSelection();
// Select the block
selectBlock(x, y, currentBlockSize);
}
// Get pixel element at coordinates
function getPixelElement(x, y) {
return document.querySelector(`.pixel[data-x="${x}"][data-y="${y}"]`);
}
// Check if a block can be selected
function canSelectBlock(startX, startY, size) {
for (let y = startY; y < startY + size; y++) {
for (let x = startX; x < startX + size; x++) {
// Check if coordinates are within grid
if (x >= GRID_SIZE || y >= GRID_SIZE) {
return false;
}
// Check if pixel is already sold
const pixel = getPixelElement(x, y);
if (pixel.classList.contains('pixel-sold')) {
return false;
}
}
}
return true;
}
// Select a block of pixels
function selectBlock(startX, startY, size) {
selectedPixels = [];
for (let y = startY; y < startY + size; y++) {
for (let x = startX; x < startX + size; x++) {
const pixel = getPixelElement(x, y);
pixel.classList.add('pixel-selected');
selectedPixels.push({x, y});
}
}
// Update UI
updateSelectionUI(startX, startY, size);
}
// Highlight a block on hover
function highlightBlock(startX, startY, size) {
// Don't highlight if we're in the middle of a selection
if (selectedPixels.length > 0) return;
// Don't highlight if the block can't be selected
if (!canSelectBlock(startX, startY, size)) return;
for (let y = startY; y < startY + size; y++) {
for (let x = startX; x < startX + size; x++) {
const pixel = getPixelElement(x, y);
if (!pixel.classList.contains('pixel-sold')) {
pixel.classList.add('pixel-highlight');
}
}
}
}
// Clear all highlights
function clearHighlights() {
if (selectedPixels.length > 0) return;
document.querySelectorAll('.pixel-highlight').forEach(pixel => {
pixel.classList.remove('pixel-highlight');
});
}
// Clear current selection
function clearSelection() {
selectedPixels.forEach(pixel => {
const element = getPixelElement(pixel.x, pixel.y);
element.classList.remove('pixel-selected');
});
selectedPixels = [];
updateSelectionUI();
}
// Update UI based on current selection
function updateSelectionUI(startX, startY, size) {
const selectedCount = selectedPixels.length;
document.getElementById('selected-count').textContent = selectedCount;
// Update coordinates display
const coordinatesElement = document.getElementById('selected-coordinates');
if (selectedCount > 0) {
coordinatesElement.innerHTML = `Block: ${startX},${startY} to ${startX+size-1},${startY+size-1}`;
} else {
coordinatesElement.textContent = 'No pixels selected';
}
// Update total cost
const totalCost = calculateTotalCost();
document.getElementById('total-cost').textContent = `$${totalCost}`;
// Enable/disable purchase button
document.getElementById('purchase-button').disabled = selectedCount === 0;
}
// Calculate total cost based on block size
function calculateTotalCost() {
if (selectedPixels.length === 0) return 0;
const blockSize = currentBlockSize;
// Pricing based on block size
if (blockSize === 10) return 10;
if (blockSize === 20) return 35;
if (blockSize === 50) return 200;
// Default price per pixel for other sizes
return selectedPixels.length * 0.01;
}
// Update zoom level
function updateZoom() {
const grid = document.getElementById('pixel-grid');
grid.style.transform = `scale(${zoomLevel})`;
grid.style.transformOrigin = '0 0';
}
// Update available pixels count
function updateAvailablePixels() {
const available = document.querySelectorAll('.pixel-available').length;
document.getElementById('available-pixels').textContent = available;
}
// Show purchase modal
function showPurchaseModal(blockSize = null) {
if (blockSize) {
currentBlockSize = blockSize;
document.getElementById('block-size').value = blockSize;
// Simulate selecting a random available block
findAvailableBlock(blockSize);
}
if (selectedPixels.length === 0) {
alert('Please select a block of pixels first.');
return;
}
// Set modal values
document.getElementById('modal-block-size').textContent = `${currentBlockSize}×${currentBlockSize}`;
document.getElementById('modal-total-pixels').textContent = selectedPixels.length;
document.getElementById('modal-total-cost').textContent = `$${calculateTotalCost()}`;
// Show modal
document.getElementById('purchase-modal').classList.add('active');
}
// Find an available block of given size (for demo purposes)
function findAvailableBlock(size) {
// Try to find a random available block
for (let attempt = 0; attempt < 100; attempt++) {
const x = Math.floor(Math.random() * (GRID_SIZE - size));
const y = Math.floor(Math.random() * (GRID_SIZE - size));
if (canSelectBlock(x, y, size)) {
clearSelection();
selectBlock(x, y, size);
return;
}
}
alert('Could not find an available block of that size. Please try a smaller size or different location.');
}
// Hide modal
function hideModal(modalId) {
document.getElementById(modalId).classList.remove('active');
// Reset image preview if it's the purchase modal
if (modalId === 'purchase-modal') {
document.getElementById('pixel-image-upload').value = '';
document.getElementById('image-preview').classList.add('hidden');
}
}
// Remove uploaded image
function removeImage() {
document.getElementById('pixel-image-upload').value = '';
document.getElementById('image-preview').classList.add('hidden');
document.getElementById('preview-image').src = '#';
}
// Show custom size modal
function showCustomSizeModal() {
document.getElementById('custom-size-modal').classList.add('active');
}
// Complete purchase
function completePurchase() {
const email = document.getElementById('pixel-email').value;
const url = document.getElementById('pixel-url').value;
// Simple validation
if (!email || !url) {
alert('Please provide both your email and a destination URL.');
return;
}
// In a real app, you would process payment here
// For this demo, we'll just show a success message
// Mark pixels as sold
selectedPixels.forEach(pixel => {
const element = getPixelElement(pixel.x, pixel.y);
element.classList.remove('pixel-available');
element.classList.add('pixel-sold');
// Add image if uploaded
const fileInput = document.getElementById('pixel-image-upload');
if (fileInput.files.length > 0) {
const img = document.createElement('img');
img.src = URL.createObjectURL(fileInput.files[0]);
img.className = 'pixel-image';
img.alt = 'Your ad';
element.appendChild(img);
}
// Make it clickable
element.onclick = function(e) {
e.preventDefault();
e.stopPropagation();
window.open(url, '_blank');
};
});
// Update stats
updateAvailablePixels();
updateStats();
// Hide purchase modal
hideModal('purchase-modal');
// Show success modal
document.getElementById('success-title').textContent = 'Purchase Successful!';
document.getElementById('success-message').textContent = 'Your pixel block has been reserved. We\'ve sent a confirmation email with payment instructions.';
document.getElementById('success-modal').classList.add('active');
// Clear selection
clearSelection();
}
// Submit custom size request
function submitCustomRequest() {
const width = parseInt(document.getElementById('custom-width').value);
const height = parseInt(document.getElementById('custom-height').value);
const email = document.getElementById('custom-email').value;
if (!width || !height || !email) {
alert('Please fill in all required fields.');
return;
}
if (width < 10 || width > 100 || height < 10 || height > 100) {
alert('Please enter dimensions between 10 and 100 pixels.');
return;
}
// In a real app, you would send this to your backend
console.log('Custom request submitted:', {width, height, email});
// Hide modal
hideModal('custom-size-modal');
// Show success modal
document.getElementById('success-title').textContent = 'Request Received!';
document.getElementById('success-message').textContent = 'We\'ve received your custom size request and will contact you shortly with pricing details.';
document.getElementById('success-modal').classList.add('active');
}
// Update stats (for demo purposes)
function updateStats() {
const soldPixels = GRID_SIZE * GRID_SIZE - document.querySelectorAll('.pixel-available').length;
const revenue = soldPixels * 0.01; // $0.01 per pixel for demo
document.getElementById('total-pixels-sold').textContent = soldPixels;
document.getElementById('total-revenue').textContent = `$${revenue.toLocaleString()}`;
// Randomize other stats for demo
document.getElementById('daily-visitors').textContent = Math.floor(1000 + Math.random() * 500);
document.getElementById('days-remaining').textContent = Math.floor(365 * (1 - soldPixels / (GRID_SIZE * GRID_SIZE)));
}
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=RexyGrab/pixelgrid" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |