Spaces:
Running
Running
нужно сделать сайт для планирования размещения товаров в коробках и оптимизацию размещения коробок на паллете 1200х800.
c8e4e20
verified
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>PackMaster Pro - Optimal Packaging Solutions</title> | |
| <link rel="icon" type="image/x-icon" href="/static/favicon.ico"> | |
| <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://cdn.jsdelivr.net/npm/three@0.132.2/build/three.min.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script> | |
| <style> | |
| .box-visualization { | |
| perspective: 1000px; | |
| } | |
| .box { | |
| transform-style: preserve-3d; | |
| transition: transform 0.5s ease; | |
| } | |
| .box:hover { | |
| transform: rotateY(15deg) rotateX(10deg); | |
| } | |
| .pallet-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); | |
| gap: 5px; | |
| } | |
| .dimension-input:focus { | |
| box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5); | |
| } | |
| .card { | |
| backdrop-filter: blur(10px); | |
| background-color: rgba(255, 255, 255, 0.8); | |
| } | |
| @media (max-width: 768px) { | |
| .pallet-grid { | |
| grid-template-columns: repeat(4, 1fr); | |
| } | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-100 min-h-screen"> | |
| <div id="vanta-bg" class="fixed top-0 left-0 w-full h-full -z-10"></div> | |
| <header class="bg-indigo-600 text-white shadow-lg"> | |
| <div class="container mx-auto px-4 py-6"> | |
| <div class="flex justify-between items-center"> | |
| <div class="flex items-center space-x-2"> | |
| <i data-feather="package" class="w-8 h-8"></i> | |
| <h1 class="text-2xl font-bold">PackMaster Pro</h1> | |
| </div> | |
| <nav class="hidden md:block"> | |
| <ul class="flex space-x-6"> | |
| <li><a href="#" class="hover:text-indigo-200 transition">Home</a></li> | |
| <li><a href="#" class="hover:text-indigo-200 transition">Calculator</a></li> | |
| <li><a href="#" class="hover:text-indigo-200 transition">Visualizer</a></li> | |
| <li><a href="#" class="hover:text-indigo-200 transition">Materials</a></li> | |
| </ul> | |
| </nav> | |
| <button class="md:hidden"> | |
| <i data-feather="menu" class="w-6 h-6"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </header> | |
| <main class="container mx-auto px-4 py-8"> | |
| <section class="mb-12"> | |
| <div class="text-center mb-8"> | |
| <h2 class="text-3xl font-bold text-gray-800 mb-2">Optimal Packaging Calculator</h2> | |
| <p class="text-gray-600 max-w-2xl mx-auto">Calculate the perfect box dimensions and pallet configuration for your products</p> | |
| </div> | |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-8"> | |
| <div class="card rounded-xl shadow-lg p-6"> | |
| <h3 class="text-xl font-semibold mb-4 text-indigo-700">Product Dimensions</h3> | |
| <div class="space-y-4"> | |
| <div> | |
| <label class="block text-gray-700 mb-1">Product Length (mm)</label> | |
| <input type="number" class="w-full px-4 py-2 border rounded-lg dimension-input" placeholder="117" id="product-length"> | |
| </div> | |
| <div> | |
| <label class="block text-gray-700 mb-1">Product Width (mm)</label> | |
| <input type="number" class="w-full px-4 py-2 border rounded-lg dimension-input" placeholder="60" id="product-width"> | |
| </div> | |
| <div> | |
| <label class="block text-gray-700 mb-1">Product Height (mm)</label> | |
| <input type="number" class="w-full px-4 py-2 border rounded-lg dimension-input" placeholder="185" id="product-height"> | |
| </div> | |
| <div> | |
| <label class="block text-gray-700 mb-1">Quantity per box</label> | |
| <select class="w-full px-4 py-2 border rounded-lg dimension-input" id="quantity-per-box"> | |
| <option value="8">8 units</option> | |
| <option value="12" selected>12 units</option> | |
| <option value="16">16 units</option> | |
| <option value="24">24 units</option> | |
| </select> | |
| </div> | |
| <div> | |
| <label class="block text-gray-700 mb-1">Cardboard Type</label> | |
| <select class="w-full px-4 py-2 border rounded-lg dimension-input" id="cardboard-type"> | |
| <option value="T21">T21</option> | |
| <option value="T23" selected>T23</option> | |
| </select> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="card rounded-xl shadow-lg p-6"> | |
| <h3 class="text-xl font-semibold mb-4 text-indigo-700">Pallet Constraints</h3> | |
| <div class="space-y-4"> | |
| <div> | |
| <label class="block text-gray-700 mb-1">Pallet Size (mm)</label> | |
| <div class="flex space-x-2"> | |
| <input type="number" class="w-1/2 px-4 py-2 border rounded-lg dimension-input" value="1200" id="pallet-length" readonly> | |
| <input type="number" class="w-1/2 px-4 py-2 border rounded-lg dimension-input" value="800" id="pallet-width" readonly> | |
| </div> | |
| </div> | |
| <div> | |
| <label class="block text-gray-700 mb-1">Max Pallet Height (mm)</label> | |
| <input type="number" class="w-full px-4 py-2 border rounded-lg dimension-input" placeholder="1800" id="max-pallet-height"> | |
| </div> | |
| <div> | |
| <label class="block text-gray-700 mb-1">Max Boxes per Layer</label> | |
| <input type="number" class="w-full px-4 py-2 border rounded-lg dimension-input" placeholder="Auto-calculate" id="max-boxes-layer" disabled> | |
| </div> | |
| <div> | |
| <label class="block text-gray-700 mb-1">Total Boxes Needed</label> | |
| <input type="number" class="w-full px-4 py-2 border rounded-lg dimension-input" placeholder="Enter quantity" id="total-boxes"> | |
| </div> | |
| <div class="pt-2"> | |
| <button id="calculate-btn" class="w-full bg-indigo-600 hover:bg-indigo-700 text-white py-3 px-4 rounded-lg font-medium transition flex items-center justify-center"> | |
| <i data-feather="cpu" class="mr-2"></i> | |
| Calculate Optimal Configuration | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <section class="mb-12" id="results-section" style="display: none;"> | |
| <div class="card rounded-xl shadow-lg p-6"> | |
| <h3 class="text-xl font-semibold mb-4 text-indigo-700">Optimal Configuration Results</h3> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-6"> | |
| <div class="bg-blue-50 p-4 rounded-lg"> | |
| <h4 class="font-medium text-blue-800 mb-2">Recommended Box Dimensions</h4> | |
| <div class="flex items-center space-x-2"> | |
| <div class="bg-blue-100 p-2 rounded"> | |
| <i data-feather="box" class="text-blue-600"></i> | |
| </div> | |
| <div> | |
| <p class="text-gray-700"><span class="font-medium" id="box-length">-</span> × <span class="font-medium" id="box-width">-</span> × <span class="font-medium" id="box-height">-</span> mm</p> | |
| <p class="text-sm text-gray-500">Internal dimensions</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-green-50 p-4 rounded-lg"> | |
| <h4 class="font-medium text-green-800 mb-2">Pallet Layers</h4> | |
| <div class="flex items-center space-x-2"> | |
| <div class="bg-green-100 p-2 rounded"> | |
| <i data-feather="layers" class="text-green-600"></i> | |
| </div> | |
| <div> | |
| <p class="text-gray-700"><span class="font-medium" id="layers-count">-</span> layers (<span class="font-medium" id="boxes-per-layer">-</span> boxes/layer)</p> | |
| <p class="text-sm text-gray-500">Total boxes: <span class="font-medium" id="total-boxes-result">-</span></p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-purple-50 p-4 rounded-lg"> | |
| <h4 class="font-medium text-purple-800 mb-2">Space Utilization</h4> | |
| <div class="flex items-center space-x-2"> | |
| <div class="bg-purple-100 p-2 rounded"> | |
| <i data-feather="percent" class="text-purple-600"></i> | |
| </div> | |
| <div> | |
| <p class="text-gray-700"><span class="font-medium" id="space-utilization">-</span>% pallet space used</p> | |
| <p class="text-sm text-gray-500">Cardboard: <span class="font-medium" id="cardboard-thickness">-</span> mm thickness</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="mb-6"> | |
| <h4 class="font-medium text-gray-700 mb-3">Box Arrangement Visualization</h4> | |
| <div class="box-visualization bg-white p-4 rounded-lg shadow-inner flex justify-center items-center"> | |
| <div class="box relative w-48 h-32 bg-indigo-100 border-2 border-indigo-300"> | |
| <!-- Box sides will be added via JS --> | |
| </div> | |
| </div> | |
| </div> | |
| <div> | |
| <h4 class="font-medium text-gray-700 mb-3">Pallet Layout</h4> | |
| <div class="pallet-grid bg-gray-200 p-4 rounded-lg border border-gray-300"> | |
| <!-- Pallet boxes will be added via JS --> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <section class="card rounded-xl shadow-lg p-6 mb-8"> | |
| <h3 class="text-xl font-semibold mb-4 text-indigo-700">Packaging Tips</h3> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-6"> | |
| <div class="flex items-start space-x-3"> | |
| <div class="bg-indigo-100 p-2 rounded-full"> | |
| <i data-feather="rotate-cw" class="text-indigo-600"></i> | |
| </div> | |
| <div> | |
| <h4 class="font-medium text-gray-800">Rotation Matters</h4> | |
| <p class="text-gray-600 text-sm">Try rotating products 90° to find more efficient arrangements.</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start space-x-3"> | |
| <div class="bg-indigo-100 p-2 rounded-full"> | |
| <i data-feather="package" class="text-indigo-600"></i> | |
| </div> | |
| <div> | |
| <h4 class="font-medium text-gray-800">Padding Consideration</h4> | |
| <p class="text-gray-600 text-sm">Add 3-5mm padding around products for protection.</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start space-x-3"> | |
| <div class="bg-indigo-100 p-2 rounded-full"> | |
| <i data-feather="trending-up" class="text-indigo-600"></i> | |
| </div> | |
| <div> | |
| <h4 class="font-medium text-gray-800">Stacking Strength</h4> | |
| <p class="text-gray-600 text-sm">Consider stacking strength when choosing box heights.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| </main> | |
| <footer class="bg-gray-800 text-white py-8"> | |
| <div class="container mx-auto px-4"> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-8"> | |
| <div> | |
| <h3 class="text-lg font-semibold mb-4">PackMaster Pro</h3> | |
| <p class="text-gray-400">Optimizing your packaging solutions since 2023. Save space, reduce costs, and improve logistics.</p> | |
| </div> | |
| <div> | |
| <h3 class="text-lg font-semibold mb-4">Quick Links</h3> | |
| <ul class="space-y-2"> | |
| <li><a href="#" class="text-gray-400 hover:text-white transition">Home</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-white transition">Calculator</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-white transition">Visualizer</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-white transition">Contact</a></li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h3 class="text-lg font-semibold mb-4">Contact Us</h3> | |
| <div class="flex items-center space-x-2 mb-2"> | |
| <i data-feather="mail" class="text-gray-400"></i> | |
| <span class="text-gray-400">support@packmasterpro.com</span> | |
| </div> | |
| <div class="flex items-center space-x-2"> | |
| <i data-feather="phone" class="text-gray-400"></i> | |
| <span class="text-gray-400">+1 (555) 123-4567</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="border-t border-gray-700 mt-8 pt-6 text-center text-gray-400"> | |
| <p>© 2023 PackMaster Pro. All rights reserved.</p> | |
| </div> | |
| </div> | |
| </footer> | |
| <script> | |
| // Initialize Vanta.js background | |
| VANTA.GLOBE({ | |
| el: "#vanta-bg", | |
| mouseControls: true, | |
| touchControls: true, | |
| gyroControls: false, | |
| minHeight: 200.00, | |
| minWidth: 200.00, | |
| scale: 1.00, | |
| scaleMobile: 1.00, | |
| color: 0x5b6ee1, | |
| backgroundColor: 0xf8fafc | |
| }); | |
| // Initialize feather icons | |
| feather.replace(); | |
| // Calculate button functionality | |
| document.getElementById('calculate-btn').addEventListener('click', function() { | |
| // Get input values | |
| const productLength = parseInt(document.getElementById('product-length').value) || 117; | |
| const productWidth = parseInt(document.getElementById('product-width').value) || 60; | |
| const productHeight = parseInt(document.getElementById('product-height').value) || 185; | |
| const quantityPerBox = parseInt(document.getElementById('quantity-per-box').value) || 12; | |
| const cardboardType = document.getElementById('cardboard-type').value; | |
| const maxPalletHeight = parseInt(document.getElementById('max-pallet-height').value) || 1800; | |
| const totalBoxesNeeded = parseInt(document.getElementById('total-boxes').value) || 24; | |
| // Calculate optimal box dimensions (simplified example) | |
| let rows = 1; | |
| let columns = 1; | |
| // Determine optimal arrangement based on quantity | |
| if (quantityPerBox === 8) { | |
| rows = 2; | |
| columns = 4; | |
| } else if (quantityPerBox === 12) { | |
| rows = 2; | |
| columns = 6; | |
| } else if (quantityPerBox === 16) { | |
| rows = 4; | |
| columns = 4; | |
| } else if (quantityPerBox === 24) { | |
| rows = 4; | |
| columns = 6; | |
| } | |
| // Calculate box dimensions (including padding and cardboard thickness) | |
| const padding = 5; // mm padding around products | |
| const cardboardThickness = cardboardType === 'T21' ? 4 : 6; // mm | |
| const boxWidth = (productWidth * columns) + (padding * 2) + (cardboardThickness * 2); | |
| const boxLength = (productLength * rows) + (padding * 2) + (cardboardThickness * 2); | |
| const boxHeight = productHeight + padding + cardboardThickness; | |
| // Calculate pallet layout | |
| const palletLength = 1200; | |
| const palletWidth = 800; | |
| const boxesPerRow = Math.floor(palletLength / boxLength); | |
| const boxesPerColumn = Math.floor(palletWidth / boxWidth); | |
| const boxesPerLayer = boxesPerRow * boxesPerColumn; | |
| const totalLayers = Math.floor(maxPalletHeight / boxHeight); | |
| const totalBoxes = Math.min(totalBoxesNeeded, boxesPerLayer * totalLayers); | |
| const actualLayers = Math.ceil(totalBoxes / boxesPerLayer); | |
| // Space utilization calculation (simplified) | |
| const totalBoxVolume = (boxLength * boxWidth * boxHeight * totalBoxes); | |
| const palletVolume = palletLength * palletWidth * (boxHeight * actualLayers); | |
| const spaceUtilization = Math.round((totalBoxVolume / palletVolume) * 100); | |
| // Display results | |
| document.getElementById('box-length').textContent = boxLength; | |
| document.getElementById('box-width').textContent = boxWidth; | |
| document.getElementById('box-height').textContent = boxHeight; | |
| document.getElementById('layers-count').textContent = actualLayers; | |
| document.getElementById('boxes-per-layer').textContent = boxesPerLayer; | |
| document.getElementById('total-boxes-result').textContent = totalBoxes; | |
| document.getElementById('space-utilization').textContent = spaceUtilization; | |
| document.getElementById('cardboard-thickness').textContent = cardboardThickness; | |
| // Show results section | |
| document.getElementById('results-section').style.display = 'block'; | |
| // Create box visualization (simplified) | |
| const boxVisualization = document.querySelector('.box'); | |
| boxVisualization.innerHTML = ''; | |
| boxVisualization.style.width = `${boxWidth/5}px`; | |
| boxVisualization.style.height = `${boxHeight/5}px`; | |
| // Create pallet visualization | |
| const palletGrid = document.querySelector('.pallet-grid'); | |
| palletGrid.innerHTML = ''; | |
| for (let i = 0; i < boxesPerLayer; i++) { | |
| const box = document.createElement('div'); | |
| box.className = 'bg-indigo-100 border border-indigo-300 h-12 flex items-center justify-center'; | |
| box.innerHTML = `<span class="text-xs text-indigo-700">${i+1}</span>`; | |
| palletGrid.appendChild(box); | |
| } | |
| // Scroll to results | |
| document.getElementById('results-section').scrollIntoView({ behavior: 'smooth' }); | |
| }); | |
| // Initial calculation with default values | |
| document.getElementById('calculate-btn').click(); | |
| </script> | |
| </body> | |
| </html> | |