crafty-configurator-hub / customize.html
VictorS96's picture
remove contact information
baa6825 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Crafty Configurator Hub | Customize</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<style>
.customization-panel {
transition: all 0.3s ease;
}
.option-selected {
border-color: #667eea;
background-color: #f0f4ff;
}
.preview-container {
perspective: 1000px;
}
.product-preview {
transition: transform 0.5s ease;
}
</style>
</head>
<body class="bg-gray-50">
<nav class="bg-white shadow-sm">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex items-center">
<i data-feather="package" class="text-indigo-600"></i>
<span class="ml-2 text-xl font-semibold text-gray-900">Crafty Configurator</span>
</div>
<div class="flex items-center">
<button id="logoutBtn" class="text-gray-500 hover:text-gray-700 px-3 py-2 rounded-md text-sm font-medium flex items-center">
<i data-feather="log-out" class="mr-1"></i> Logout
</button>
</div>
</div>
</div>
</nav>
<main class="max-w-7xl mx-auto py-8 px-4 sm:px-6 lg:px-8">
<div class="flex flex-col lg:flex-row gap-8">
<!-- Product Preview -->
<div class="lg:w-1/2 preview-container">
<div class="bg-white rounded-lg shadow-md p-6 sticky top-8 product-preview">
<h2 class="text-2xl font-bold text-gray-900 mb-4" id="productTitle">Premium Watch</h2>
<div class="flex justify-center mb-6">
<img src="http://static.photos/retail/640x360/1" alt="Product Preview" id="productPreview" class="max-h-80 object-contain">
</div>
<div class="border-t border-gray-200 pt-4">
<h3 class="text-lg font-medium text-gray-900 mb-2">Your Selections:</h3>
<ul id="selectedOptions" class="space-y-1 text-gray-600">
<!-- Options will be added here dynamically -->
</ul>
</div>
</div>
</div>
<!-- Customization Options -->
<div class="lg:w-1/2 space-y-8">
<div class="bg-white rounded-lg shadow-md overflow-hidden">
<div class="p-6">
<h2 class="text-2xl font-bold text-gray-900 mb-6">Customize Your Product</h2>
<!-- Color Options -->
<div class="mb-8 customization-panel">
<h3 class="text-lg font-medium text-gray-900 mb-3">Color</h3>
<div class="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-5 gap-3">
<div class="option-selector h-12 rounded-md border-2 border-transparent cursor-pointer flex items-center justify-center bg-red-500"
data-option="color" data-value="red" onclick="selectOption(this)"></div>
<div class="option-selector h-12 rounded-md border-2 border-transparent cursor-pointer flex items-center justify-center bg-blue-500"
data-option="color" data-value="blue" onclick="selectOption(this)"></div>
<div class="option-selector h-12 rounded-md border-2 border-transparent cursor-pointer flex items-center justify-center bg-green-500"
data-option="color" data-value="green" onclick="selectOption(this)"></div>
<div class="option-selector h-12 rounded-md border-2 border-transparent cursor-pointer flex items-center justify-center bg-yellow-500"
data-option="color" data-value="yellow" onclick="selectOption(this)"></div>
<div class="option-selector h-12 rounded-md border-2 border-transparent cursor-pointer flex items-center justify-center bg-black"
data-option="color" data-value="black" onclick="selectOption(this)"></div>
</div>
</div>
<!-- Material Options -->
<div class="mb-8 customization-panel">
<h3 class="text-lg font-medium text-gray-900 mb-3">Material</h3>
<div class="grid grid-cols-2 sm:grid-cols-3 gap-3">
<div class="option-selector p-3 rounded-md border-2 border-transparent cursor-pointer bg-gray-100"
data-option="material" data-value="leather" onclick="selectOption(this)">
<div class="font-medium text-gray-900">Leather</div>
<div class="text-sm text-gray-500">Classic and durable</div>
</div>
<div class="option-selector p-3 rounded-md border-2 border-transparent cursor-pointer bg-gray-100"
data-option="material" data-value="metal" onclick="selectOption(this)">
<div class="font-medium text-gray-900">Metal</div>
<div class="text-sm text-gray-500">Premium finish</div>
</div>
<div class="option-selector p-3 rounded-md border-2 border-transparent cursor-pointer bg-gray-100"
data-option="material" data-value="silicone" onclick="selectOption(this)">
<div class="font-medium text-gray-900">Silicone</div>
<div class="text-sm text-gray-500">Lightweight & flexible</div>
</div>
</div>
</div>
<!-- Engraving Options -->
<div class="mb-8 customization-panel">
<h3 class="text-lg font-medium text-gray-900 mb-3">Personal Engraving</h3>
<div class="space-y-3">
<div>
<label for="engravingText" class="block text-sm font-medium text-gray-700">Text (max 20 characters)</label>
<input type="text" id="engravingText" maxlength="20"
class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500">
</div>
<div>
<label for="engravingFont" class="block text-sm font-medium text-gray-700">Font Style</label>
<select id="engravingFont"
class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500">
<option value="standard">Standard</option>
<option value="script">Script</option>
<option value="block">Block</option>
<option value="elegant">Elegant</option>
</select>
</div>
<div>
<label class="inline-flex items-center">
<input type="checkbox" id="engravingPremium" class="form-checkbox h-4 w-4 text-indigo-600 transition duration-150 ease-in-out">
<span class="ml-2 text-sm text-gray-700">Add premium engraving</span>
</label>
</div>
</div>
</div>
<!-- Additional Notes -->
<div class="mb-8">
<h3 class="text-lg font-medium text-gray-900 mb-3">Additional Requirements</h3>
<textarea id="additionalNotes" rows="3"
class="block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"
placeholder="Any special requests or notes for your order..."></textarea>
</div>
<!-- Submit Button -->
<div class="pt-4 border-t border-gray-200">
<button id="submitRequestBtn"
class="w-full flex justify-center py-3 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition-all duration-200">
Submit Customization Request
</button>
</div>
</div>
</div>
</div>
</div>
</main>
<script>
feather.replace();
let selectedOptions = {};
// Get product from URL
const urlParams = new URLSearchParams(window.location.search);
const product = urlParams.get('product');
// Set product title and image based on selection
document.addEventListener('DOMContentLoaded', function() {
let productTitle = "Custom Product";
let productImage = "http://static.photos/retail/640x360/1";
switch(product) {
case 'premium-watch':
productTitle = "Premium Watch";
productImage = "http://static.photos/retail/640x360/1";
break;
case 'designer-bag':
productTitle = "Designer Bag";
productImage = "http://static.photos/retail/640x360/2";
break;
case 'custom-sneakers':
productTitle = "Custom Sneakers";
productImage = "http://static.photos/retail/640x360/3";
break;
}
document.getElementById('productTitle').textContent = productTitle;
document.getElementById('productPreview').src = productImage;
updateTotalPrice();
});
function selectOption(element) {
const option = element.getAttribute('data-option');
const value = element.getAttribute('data-value');
const price = parseFloat(element.getAttribute('data-price')) || 0;
// Remove selected class from all options in this category
document.querySelectorAll(`[data-option="${option}"]`).forEach(el => {
el.classList.remove('option-selected');
});
// Add selected class to clicked option
element.classList.add('option-selected');
// Store selection
selectedOptions[option] = { value, price };
// Update UI
updateSelectedOptions();
updateTotalPrice();
}
function updateSelectedOptions() {
const container = document.getElementById('selectedOptions');
container.innerHTML = '';
for (const [option, data] of Object.entries(selectedOptions)) {
const li = document.createElement('li');
li.className = 'flex justify-between';
li.innerHTML = `
<span class="capitalize">${option}:</span>
<span>${data.value}</span>
`;
container.appendChild(li);
}
}
function updateTotalPrice() {
}
document.getElementById('engravingPremium').addEventListener('change', updateTotalPrice);
document.getElementById('logoutBtn').addEventListener('click', function() {
window.location.href = 'index.html';
});
document.getElementById('submitRequestBtn').addEventListener('click', function() {
// In a real app, you would send this data to the server
alert('Customization request submitted successfully! Our team will review your request and contact you soon.');
// Redirect to confirmation page or back to products
// window.location.href = 'confirmation.html';
});
</script>
</body>
</html>