diff --git a/public/app.js b/public/app.js
new file mode 100644
index 0000000..88afdb5
--- /dev/null
+++ b/public/app.js
@@ -0,0 +1,28 @@
+fetch("/images")
+ .then(response => {
+ if (!response.ok) throw new Error("Failed to fetch images.");
+ return response.json();
+ })
+ .then(images => {
+ const gallery = document.getElementById("gallery");
+ images.forEach(img => {
+ const imgContainer = document.createElement("div");
+ imgContainer.className = "image-container";
+ imgContainer.innerHTML = `
+
+
+
+
+ `;
+ const copyBtn = imgContainer.querySelector('.copy-btn');
+ copyBtn.addEventListener('click', (e) => {
+ e.preventDefault();
+ navigator.clipboard.writeText(img.url).then(() => {
+ copyBtn.textContent = 'Copied!';
+ setTimeout(() => copyBtn.textContent = 'Copy URL', 1200);
+ });
+ });
+ gallery.appendChild(imgContainer);
+ });
+ })
+ .catch(error => console.error("Error loading images:", error));
diff --git a/public/index.html b/public/index.html
index 65268f7..7c908e7 100644
--- a/public/index.html
+++ b/public/index.html
@@ -4,37 +4,14 @@