Files
slideshowApp/index.html
Adrian Zürcher 4d9e0836e5 first commit
2026-01-16 07:51:28 +01:00

74 lines
4.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Go File Center</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-50 min-h-screen flex items-center justify-center p-6">
<div class="max-w-md w-full bg-white rounded-xl shadow-lg p-8 border border-gray-100">
<a href="/settings" class="absolute top-6 right-6 text-gray-400 hover:text-blue-600 transition-colors">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" />
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
</svg>
</a>
<div class="text-center mb-8">
<h1 class="text-2xl font-bold text-gray-800">Photo Upload</h1>
<p class="text-gray-500 text-sm">Upload multiple PNG or JPG files</p>
</div>
<form action="/upload" method="POST" enctype="multipart/form-data" class="space-y-6">
<div class="relative border-2 border-dashed border-blue-200 rounded-lg p-6 hover:border-blue-400 transition-colors group">
<input type="file" name="myPictures" multiple accept="image/*"
class="absolute inset-0 w-full h-full opacity-0 cursor-pointer"
id="fileInput" onchange="updateFileList()">
<div class="text-center pointer-events-none">
<svg class="mx-auto h-12 w-12 text-blue-400 group-hover:scale-110 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" />
</svg>
<p class="mt-2 text-sm text-gray-600">Click to select or drag and drop</p>
</div>
</div>
<ul id="fileList" class="text-xs text-gray-500 space-y-1 max-h-32 overflow-y-auto"></ul>
<button type="submit"
class="w-full bg-blue-600 hover:bg-blue-700 text-white font-semibold py-3 px-4 rounded-lg transition-all shadow-md active:scale-95">
Upload All Files
</button>
<div class="mt-4 text-center">
<a href="/manage" class="text-gray-400 hover:text-gray-600 text-xs transition-colors">
Manage Existing Files
</a>
</div>
</form>
<div class="mt-8 pt-6 border-t border-gray-100 text-center">
<a href="/slideshow" class="inline-flex items-center gap-2 text-blue-600 hover:text-blue-800 font-medium text-sm transition-colors">
<span>Open Fullscreen Slideshow</span>
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7l5 5m0 0l-5 5m5-5H6" /></svg>
</a>
</div>
</div>
<script>
function updateFileList() {
const input = document.getElementById('fileInput');
const list = document.getElementById('fileList');
list.innerHTML = '';
for (let i = 0; i < input.files.length; i++) {
const li = document.createElement('li');
li.className = "flex items-center gap-2 bg-gray-50 p-1 px-2 rounded";
li.textContent = `📄 ${input.files[i].name}`;
list.appendChild(li);
}
}
</script>
</body>
</html>