File size: 14,746 Bytes
d62ea66 |
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 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PixelMotion Editor | Transform Your Images</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>
.slider-thumb::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 20px;
height: 20px;
background: #6366f1;
cursor: pointer;
border-radius: 50%;
}
.drop-zone {
border: 2px dashed #6366f1;
transition: all 0.3s ease;
}
.drop-zone:hover {
border-color: #a855f7;
background-color: rgba(99, 102, 241, 0.05);
}
.preview-container {
aspect-ratio: 16/9;
}
</style>
</head>
<body class="bg-gray-50">
<!-- Navigation -->
<nav class="bg-white shadow-sm py-4 px-6 flex justify-between items-center">
<div class="flex items-center space-x-2">
<div class="w-8 h-8 bg-indigo-500 rounded-lg flex items-center justify-center">
<i data-feather="film" class="text-white"></i>
</div>
<span class="text-xl font-bold text-indigo-500">PixelMotion</span>
</div>
<div class="hidden md:flex space-x-6">
<a href="#" class="text-gray-600 hover:text-indigo-500 font-medium">Editor</a>
<a href="#" class="text-gray-600 hover:text-indigo-500 font-medium">Tutorials</a>
<a href="#" class="text-gray-600 hover:text-indigo-500 font-medium">Help</a>
</div>
<div class="flex items-center space-x-4">
<button class="px-4 py-2 rounded-lg text-indigo-500 font-medium hover:bg-indigo-50">
<i data-feather="save" class="mr-2"></i> Save Project
</button>
<button class="px-4 py-2 bg-indigo-500 text-white rounded-lg font-medium hover:bg-indigo-600 transition flex items-center">
<i data-feather="download" class="mr-2"></i> Export
</button>
</div>
</nav>
<div class="container mx-auto px-6 py-8">
<div class="flex flex-col lg:flex-row gap-8">
<!-- Left Panel - Preview -->
<div class="lg:w-2/3">
<div class="bg-white rounded-xl shadow-sm overflow-hidden">
<div class="preview-container bg-gray-100 flex items-center justify-center relative">
<div class="absolute inset-0 flex items-center justify-center">
<img id="preview-image" src="http://static.photos/technology/1200x630/42" alt="Preview" class="w-full h-full object-contain">
</div>
<div class="absolute bottom-4 left-4 right-4 bg-white bg-opacity-90 p-3 rounded-lg shadow-sm flex items-center justify-between">
<div class="flex items-center space-x-4">
<button class="w-10 h-10 bg-indigo-500 text-white rounded-full flex items-center justify-center">
<i data-feather="play"></i>
</button>
<div class="text-sm text-gray-600">0:00 / 0:10</div>
</div>
<div class="flex items-center space-x-2">
<button class="w-8 h-8 text-gray-500 hover:text-indigo-500">
<i data-feather="volume-2"></i>
</button>
<button class="w-8 h-8 text-gray-500 hover:text-indigo-500">
<i data-feather="settings"></i>
</button>
<button class="w-8 h-8 text-gray-500 hover:text-indigo-500">
<i data-feather="maximize"></i>
</button>
</div>
</div>
</div>
</div>
</div>
<!-- Right Panel - Controls -->
<div class="lg:w-1/3">
<div class="bg-white rounded-xl shadow-sm overflow-hidden">
<div class="p-6 border-b border-gray-200">
<h2 class="text-xl font-semibold">Animation Settings</h2>
</div>
<div class="p-6 space-y-6">
<!-- Upload Section -->
<div class="drop-zone rounded-lg p-8 text-center cursor-pointer">
<div class="flex flex-col items-center">
<i data-feather="upload" class="w-10 h-10 text-indigo-500 mb-3"></i>
<h3 class="font-medium mb-1">Drag & Drop Image</h3>
<p class="text-sm text-gray-500 mb-3">or click to browse files</p>
<button class="px-4 py-2 bg-indigo-500 text-white rounded-lg text-sm hover:bg-indigo-600 transition">
Select Image
</button>
</div>
</div>
<!-- Animation Controls -->
<div>
<div class="flex justify-between items-center mb-2">
<label class="font-medium">Animation Intensity</label>
<span class="text-sm text-gray-500">70%</span>
</div>
<input type="range" min="0" max="100" value="70" class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-thumb">
</div>
<div>
<div class="flex justify-between items-center mb-2">
<label class="font-medium">Animation Duration</label>
<span class="text-sm text-gray-500">10 seconds</span>
</div>
<input type="range" min="1" max="30" value="10" class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-thumb">
</div>
<div>
<label class="font-medium block mb-2">Animation Style</label>
<select class="w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500">
<option>Subtle Movement</option>
<option>Panning Effect</option>
<option>Zoom Effect</option>
<option>3D Parallax</option>
<option>Custom Path</option>
</select>
</div>
<div>
<label class="font-medium block mb-2">Background Style</label>
<div class="grid grid-cols-3 gap-3">
<button class="p-2 border border-gray-300 rounded-lg hover:border-indigo-500">
<div class="h-12 bg-gray-200 rounded"></div>
<div class="text-xs text-center mt-1">Blur</div>
</button>
<button class="p-2 border border-gray-300 rounded-lg hover:border-indigo-500">
<div class="h-12 bg-indigo-100 rounded"></div>
<div class="text-xs text-center mt-1">Color</div>
</button>
<button class="p-2 border border-gray-300 rounded-lg hover:border-indigo-500">
<div class="h-12 bg-gradient-to-r from-indigo-500 to-purple-500 rounded"></div>
<div class="text-xs text-center mt-1">Gradient</div>
</button>
<button class="p-2 border border-gray-300 rounded-lg hover:border-indigo-500">
<div class="h-12 bg-white border border-gray-300 rounded"></div>
<div class="text-xs text-center mt-1">Transparent</div>
</button>
<button class="p-2 border border-gray-300 rounded-lg hover:border-indigo-500">
<div class="h-12 bg-gray-900 rounded"></div>
<div class="text-xs text-center mt-1">Black</div>
</button>
<button class="p-2 border border-gray-300 rounded-lg hover:border-indigo-500">
<div class="h-12 bg-gray-100 rounded flex items-center justify-center">
<i data-feather="image" class="text-gray-400"></i>
</div>
<div class="text-xs text-center mt-1">Custom</div>
</button>
</div>
</div>
<div>
<label class="font-medium block mb-2">Advanced Options</label>
<div class="space-y-3">
<div class="flex items-center justify-between">
<span class="text-gray-700">Stabilize Image</span>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" value="" class="sr-only peer" checked>
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-500"></div>
</label>
</div>
<div class="flex items-center justify-between">
<span class="text-gray-700">Enhance Quality</span>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" value="" class="sr-only peer">
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-500"></div>
</label>
</div>
<div class="flex items-center justify-between">
<span class="text-gray-700">Add Soundtrack</span>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" value="" class="sr-only peer">
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-500"></div>
</label>
</div>
</div>
</div>
<button class="w-full py-3 bg-indigo-500 text-white rounded-lg font-medium hover:bg-indigo-600 transition flex items-center justify-center">
<i data-feather="play" class="mr-2"></i> Generate Video
</button>
</div>
</div>
</div>
</div>
</div>
<script>
// Initialize feather icons
feather.replace();
// Image upload preview
document.querySelector('.drop-zone').addEventListener('click', function() {
// This would normally open a file dialog
console.log('File upload triggered');
});
// Drag and drop functionality
const dropZone = document.querySelector('.drop-zone');
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
dropZone.addEventListener(eventName, preventDefaults, false);
});
function preventDefaults(e) {
e.preventDefault();
e.stopPropagation();
}
['dragenter', 'dragover'].forEach(eventName => {
dropZone.addEventListener(eventName, highlight, false);
});
['dragleave', 'drop'].forEach(eventName => {
dropZone.addEventListener(eventName, unhighlight, false);
});
function highlight() {
dropZone.classList.add('border-indigo-500', 'bg-indigo-50');
}
function unhighlight() {
dropZone.classList.remove('border-indigo-500', 'bg-indigo-50');
}
dropZone.addEventListener('drop', handleDrop, false);
function handleDrop(e) {
const dt = e.dataTransfer;
const files = dt.files;
handleFiles(files);
}
function handleFiles(files) {
if (files.length) {
const file = files[0];
if (file.type.startsWith('image/')) {
const reader = new FileReader();
reader.onload = function(e) {
document.getElementById('preview-image').src = e.target.result;
};
reader.readAsDataURL(file);
}
}
}
</script>
</body>
</html>
|