Spaces:
Running
Running
| <html lang="en" class="h-full"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>PosterPuzzle Maker - Create Giant Posters</title> | |
| <link rel="stylesheet" href="style.css"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script> | |
| <script src="components/navbar.js"></script> | |
| <script src="components/footer.js"></script> | |
| </head> | |
| <body class="min-h-screen flex flex-col bg-gray-50"> | |
| <custom-navbar></custom-navbar> | |
| <main class="flex-grow container mx-auto px-4 py-8"> | |
| <div class="max-w-4xl mx-auto"> | |
| <div class="text-center mb-12"> | |
| <h1 class="text-4xl font-bold text-gray-800 mb-3">Create Your Giant Poster</h1> | |
| <p class="text-lg text-gray-600">Upload an image and we'll split it into A4 pages for you to print and assemble</p> | |
| </div> | |
| <div class="bg-white rounded-xl shadow-md p-6 mb-8"> | |
| <div class="flex flex-col md:flex-row gap-6"> | |
| <div class="w-full md:w-1/2"> | |
| <div class="border-2 border-dashed border-gray-300 rounded-lg p-6 text-center transition hover:border-indigo-400"> | |
| <div id="drop-zone" class="cursor-pointer"> | |
| <i data-feather="upload" class="w-12 h-12 text-indigo-500 mx-auto mb-3"></i> | |
| <h3 class="text-lg font-medium text-gray-700 mb-2">Upload Your Image</h3> | |
| <p class="text-gray-500 mb-3">Drag & drop or click to select</p> | |
| <input type="file" id="file-input" accept="image/*" class="hidden"> | |
| <button id="upload-btn" class="bg-indigo-600 text-white px-4 py-2 rounded-lg hover:bg-indigo-700 transition"> | |
| Select Image | |
| </button> | |
| </div> | |
| </div> | |
| <div class="mt-6"> | |
| <label for="page-count" class="block text-sm font-medium text-gray-700 mb-2">Number of A4 Pages</label> | |
| <div class="flex items-center gap-4"> | |
| <input type="range" id="page-count" min="1" max="16" value="4" class="w-full"> | |
| <span id="page-count-value" class="font-medium text-gray-800">4</span> | |
| </div> | |
| </div> | |
| <div class="mt-6"> | |
| <label for="orientation" class="block text-sm font-medium text-gray-700 mb-2">Orientation</label> | |
| <div class="flex gap-4"> | |
| <button id="portrait" class="orientation-btn active bg-indigo-100 text-indigo-700 px-4 py-2 rounded-lg"> | |
| Portrait | |
| </button> | |
| <button id="landscape" class="orientation-btn px-4 py-2 rounded-lg border border-gray-300"> | |
| Landscape | |
| </button> | |
| </div> | |
| </div> | |
| <div class="mt-6 hidden" id="preview-controls"> | |
| <button id="generate-btn" class="w-full bg-indigo-600 text-white px-6 py-3 rounded-lg hover:bg-indigo-700 transition font-medium"> | |
| Generate Poster Pages | |
| </button> | |
| </div> | |
| </div> | |
| <div class="w-full md:w-1/2"> | |
| <div class="border border-gray-200 rounded-lg overflow-hidden bg-gray-100 flex items-center justify-center" style="min-height: 300px;"> | |
| <div id="image-preview-container" class="hidden w-full h-full flex items-center justify-center"> | |
| <img id="image-preview" class="max-w-full max-h-full object-contain"> | |
| </div> | |
| <div id="empty-state" class="text-center p-6"> | |
| <i data-feather="image" class="w-12 h-12 text-gray-400 mx-auto mb-3"></i> | |
| <p class="text-gray-500">Your image will appear here</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div id="result-section" class="hidden"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h2 class="text-2xl font-bold text-gray-800">Your Poster Pages</h2> | |
| <button id="download-all" class="flex items-center gap-2 bg-indigo-600 text-white px-4 py-2 rounded-lg hover:bg-indigo-700 transition"> | |
| <i data-feather="download"></i> | |
| Download All | |
| </button> | |
| </div> | |
| <div id="poster-pages" class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4"> | |
| <!-- Generated pages will appear here --> | |
| </div> | |
| <div class="mt-8 bg-yellow-50 border-l-4 border-yellow-400 p-4"> | |
| <div class="flex"> | |
| <div class="flex-shrink-0"> | |
| <i data-feather="alert-triangle" class="h-5 w-5 text-yellow-400"></i> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="text-sm text-yellow-700"> | |
| <strong>Printing instructions:</strong> Print all pages at 100% scale (no scaling). | |
| Trim the edges as indicated and assemble them together to create your giant poster. | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| <custom-footer></custom-footer> | |
| <script src="script.js"></script> | |
| <script> | |
| feather.replace(); | |
| </script> | |
| <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script> | |
| </body> | |
| </html> |