Download index.html from havae/ddddddd: direct link, hf CLI and curl.
- Browser
- Download file 22.9 kB
-
https://huggingface.co/spaces/havae/ddddddd/resolve/main/index.html
- Command line
-
hf download hf://spaces/havae/ddddddd/index.html
-
curl -L -o index.html https://huggingface.co/spaces/havae/ddddddd/resolve/main/index.html
22.9 kB
| <html lang="tr"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Link Koleksiyonum</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| .lightbox { | |
| display: none; | |
| position: fixed; | |
| z-index: 999; | |
| left: 0; | |
| top: 0; | |
| width: 100%; | |
| height: 100%; | |
| background-color: rgba(0,0,0,0.9); | |
| } | |
| .lightbox-content { | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| height: 100%; | |
| } | |
| .lightbox-img { | |
| max-width: 90%; | |
| max-height: 90%; | |
| object-fit: contain; | |
| transition: transform 0.25s ease; | |
| transform-origin: center center; | |
| cursor: zoom-in; | |
| } | |
| .lightbox-img.zoomed { | |
| cursor: grab; | |
| } | |
| .close-lightbox { | |
| position: absolute; | |
| top: 20px; | |
| right: 30px; | |
| color: white; | |
| font-size: 40px; | |
| cursor: pointer; | |
| } | |
| .prev, .next { | |
| position: absolute; | |
| top: 50%; | |
| width: auto; | |
| padding: 16px; | |
| margin-top: -50px; | |
| color: white; | |
| font-weight: bold; | |
| font-size: 20px; | |
| cursor: pointer; | |
| user-select: none; | |
| } | |
| .next { | |
| right: 0; | |
| } | |
| .card { | |
| transition: all 0.3s ease; | |
| } | |
| .card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 10px 20px rgba(0,0,0,0.1); | |
| } | |
| .status-dot { | |
| width: 12px; | |
| height: 12px; | |
| border-radius: 50%; | |
| display: inline-block; | |
| margin-right: 5px; | |
| } | |
| .online { | |
| background-color: #10B981; | |
| } | |
| .offline { | |
| background-color: #EF4444; | |
| } | |
| .checking { | |
| background-color: #F59E0B; | |
| } | |
| .fade-in { | |
| animation: fadeIn 0.5s; | |
| } | |
| @keyframes fadeIn { | |
| from { opacity: 0; } | |
| to { opacity: 1; } | |
| } | |
| .social-btn { | |
| @apply text-white shadow-md transition-all duration-200; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-100 min-h-screen"> | |
| <!-- Header Section --> | |
| <header class="bg-gradient-to-r from-blue-500 to-purple-600 text-white shadow-lg"> | |
| <div class="container mx-auto px-4 py-6"> | |
| <div class="flex flex-col md:flex-row justify-between items-center"> | |
| <div class="text-center md:text-left mb-4 md:mb-0"> | |
| <h1 class="text-3xl font-bold">Link Koleksiyonum</h1> | |
| <div id="datetime" class="text-xl mt-2"></div> | |
| </div> | |
| </div> | |
| <div class="flex space-x-4 mt-4 justify-center md:justify-start"> | |
| <a href="https://www.youtube.com" target="_blank" class="social-btn bg-red-600 hover:bg-red-700 flex items-center justify-center px-2 py-1 rounded-full text-xs"> | |
| <i class="fab fa-youtube mr-1 text-[10px]"></i> YouTube | |
| </a> | |
| <a href="https://www.facebook.com" target="_blank" class="social-btn bg-blue-600 hover:bg-blue-700 flex items-center justify-center px-2 py-1 rounded-full text-xs"> | |
| <i class="fab fa-facebook-f mr-1 text-[10px]"></i> Facebook | |
| </a> | |
| <a href="https://www.instagram.com" target="_blank" class="social-btn bg-gradient-to-r from-pink-500 to-purple-600 hover:from-pink-600 hover:to-purple-700 flex items-center justify-center px-2 py-1 rounded-full text-xs"> | |
| <i class="fab fa-instagram mr-1 text-[10px]"></i> Instagram | |
| </a> | |
| <a href="https://twitter.com" target="_blank" class="social-btn bg-black hover:bg-gray-800 flex items-center justify-center px-2 py-1 rounded-full text-xs"> | |
| <i class="fab fa-x-twitter mr-1 text-[10px]"></i> Twitter | |
| </a> | |
| <a href="https://www.reddit.com" target="_blank" class="social-btn bg-orange-600 hover:bg-orange-700 flex items-center justify-center px-2 py-1 rounded-full text-xs"> | |
| <i class="fab fa-reddit-alien mr-1 text-[10px]"></i> Reddit | |
| </a> | |
| <button id="refreshAllBtn" class="bg-yellow-600 hover:bg-yellow-700 text-white px-4 py-2 rounded-full flex items-center"> | |
| <i class="fas fa-sync-alt mr-2"></i> Yenile | |
| </button> | |
| <button id="addBtn" class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded-full flex items-center"> | |
| <i class="fas fa-plus mr-2"></i> Ekle | |
| </button> | |
| <button id="exportBtn" class="bg-indigo-600 hover:bg-indigo-700 text-white px-4 py-2 rounded-full flex items-center"> | |
| <i class="fas fa-file-export mr-2"></i> CSV | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <!-- Main Content --> | |
| <main class="container mx-auto px-4 py-8"> | |
| <!-- Add Form Modal (Hidden by default) --> | |
| <div id="addModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden"> | |
| <div class="bg-white rounded-lg shadow-xl p-6 w-full max-w-md"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h2 class="text-2xl font-bold">Yeni Link Ekle</h2> | |
| <button id="closeModal" class="text-gray-500 hover:text-gray-700"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| <form id="linkForm" class="space-y-4"> | |
| <div> | |
| <label for="imageUrl" class="block text-sm font-medium text-gray-700">Resim URL</label> | |
| <input type="url" id="imageUrl" required class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 p-2 border"> | |
| </div> | |
| <div> | |
| <label for="linkUrl" class="block text-sm font-medium text-gray-700">Gidecek Link</label> | |
| <input type="url" id="linkUrl" required class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 p-2 border"> | |
| </div> | |
| <div> | |
| <label for="nickname" class="block text-sm font-medium text-gray-700">Takma Ad</label> | |
| <input type="text" id="nickname" required class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 p-2 border"> | |
| </div> | |
| <div class="flex justify-end space-x-3"> | |
| <button type="button" id="cancelAdd" class="px-4 py-2 bg-gray-300 text-gray-700 rounded-md hover:bg-gray-400">İptal</button> | |
| <button type="submit" class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700">Kaydet</button> | |
| </div> | |
| </form> | |
| </div> | |
| </div> | |
| <!-- Links Grid --> | |
| <div id="linksContainer" class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-6"> | |
| <!-- Links will be added here dynamically --> | |
| </div> | |
| </main> | |
| <script> | |
| // DOM Elements | |
| const datetimeElement = document.getElementById('datetime'); | |
| const addBtn = document.getElementById('addBtn'); | |
| const exportBtn = document.getElementById('exportBtn'); | |
| const addModal = document.getElementById('addModal'); | |
| const closeModal = document.getElementById('closeModal'); | |
| const cancelAdd = document.getElementById('cancelAdd'); | |
| const linkForm = document.getElementById('linkForm'); | |
| const linksContainer = document.getElementById('linksContainer'); | |
| // Update datetime | |
| function updateDateTime() { | |
| const now = new Date(); | |
| const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', hour: '2-digit', minute: '2-digit' }; | |
| datetimeElement.textContent = now.toLocaleDateString('tr-TR', options); | |
| } | |
| // Initialize | |
| updateDateTime(); | |
| setInterval(updateDateTime, 60000); // Update every minute | |
| // Load saved links from localStorage | |
| let savedLinks = JSON.parse(localStorage.getItem('savedLinks')) || []; | |
| // Check link status (if image still exists) | |
| async function checkLinkStatus(url) { | |
| try { | |
| const response = await fetch(url, { method: 'HEAD', mode: 'no-cors' }); | |
| return 'online'; | |
| } catch (error) { | |
| return 'offline'; | |
| } | |
| } | |
| // Render all links | |
| async function renderLinks() { | |
| linksContainer.innerHTML = ''; | |
| // Check status for all links first | |
| const linksWithStatus = await Promise.all(savedLinks.map(async link => { | |
| const status = await checkLinkStatus(link.imageUrl); | |
| return { ...link, status }; | |
| })); | |
| // Update savedLinks with status | |
| savedLinks = linksWithStatus; | |
| localStorage.setItem('savedLinks', JSON.stringify(savedLinks)); | |
| // Render each link | |
| savedLinks.forEach((link, index) => { | |
| const linkElement = document.createElement('div'); | |
| linkElement.className = 'card bg-white rounded-lg overflow-hidden shadow-md fade-in'; | |
| linkElement.innerHTML = ` | |
| <div class="relative"> | |
| <img src="${link.imageUrl}" alt="${link.nickname}" class="w-full h-40 object-cover cursor-pointer"> | |
| <div class="absolute bottom-2 left-2"> | |
| <span class="status-dot ${link.status === 'online' ? 'online' : link.status === 'offline' ? 'offline' : 'checking'}"></span> | |
| <span class="text-xs text-white bg-black bg-opacity-50 px-2 py-1 rounded">${link.status === 'online' ? 'Çevrimiçi' : link.status === 'offline' ? 'Çevrimdışı' : 'Kontrol Ediliyor'}</span> | |
| </div> | |
| </div> | |
| <div class="p-4"> | |
| <h3 class="font-semibold text-lg truncate">${link.nickname}</h3> | |
| <a href="${link.linkUrl}" target="_blank" class="block mt-2 text-blue-600 hover:underline truncate">${link.linkUrl}</a> | |
| <div class="mt-3 flex justify-end space-x-2"> | |
| <button class="copy-name-btn bg-blue-100 text-blue-800 p-2 rounded-full hover:bg-blue-200" data-index="${index}"> | |
| <i class="fas fa-copy"></i> | |
| </button> | |
| <button class="copy-link-btn bg-green-100 text-green-800 p-2 rounded-full hover:bg-green-200" data-index="${index}"> | |
| <i class="fas fa-link"></i> | |
| </button> | |
| <button class="delete-btn bg-red-100 text-red-800 p-2 rounded-full hover:bg-red-200" data-index="${index}"> | |
| <i class="fas fa-trash"></i> | |
| </button> | |
| </div> | |
| </div> | |
| `; | |
| linksContainer.appendChild(linkElement); | |
| }); | |
| } | |
| // Modal controls | |
| addBtn.addEventListener('click', () => { | |
| addModal.classList.remove('hidden'); | |
| }); | |
| closeModal.addEventListener('click', () => { | |
| addModal.classList.add('hidden'); | |
| }); | |
| cancelAdd.addEventListener('click', () => { | |
| addModal.classList.add('hidden'); | |
| }); | |
| // Add new link | |
| linkForm.addEventListener('submit', (e) => { | |
| e.preventDefault(); | |
| const imageUrl = document.getElementById('imageUrl').value; | |
| const linkUrl = document.getElementById('linkUrl').value; | |
| const nickname = document.getElementById('nickname').value; | |
| const newLink = { | |
| imageUrl, | |
| linkUrl, | |
| nickname, | |
| status: 'checking' | |
| }; | |
| savedLinks.push(newLink); | |
| localStorage.setItem('savedLinks', JSON.stringify(savedLinks)); | |
| linkForm.reset(); | |
| addModal.classList.add('hidden'); | |
| renderLinks(); | |
| }); | |
| // Event delegation for dynamic buttons | |
| linksContainer.addEventListener('click', async (e) => { | |
| // Copy name button | |
| if (e.target.closest('.copy-name-btn')) { | |
| const index = e.target.closest('.copy-name-btn').getAttribute('data-index'); | |
| const nickname = savedLinks[index].nickname; | |
| navigator.clipboard.writeText(nickname); | |
| // Show feedback | |
| const btn = e.target.closest('.copy-name-btn'); | |
| btn.innerHTML = '<i class="fas fa-check"></i>'; | |
| setTimeout(() => { | |
| btn.innerHTML = '<i class="fas fa-copy"></i>'; | |
| }, 1000); | |
| } | |
| // Copy link button | |
| if (e.target.closest('.copy-link-btn')) { | |
| const index = e.target.closest('.copy-link-btn').getAttribute('data-index'); | |
| const linkUrl = savedLinks[index].linkUrl; | |
| navigator.clipboard.writeText(linkUrl); | |
| // Show feedback | |
| const btn = e.target.closest('.copy-link-btn'); | |
| btn.innerHTML = '<i class="fas fa-check"></i>'; | |
| setTimeout(() => { | |
| btn.innerHTML = '<i class="fas fa-link"></i>'; | |
| }, 1000); | |
| } | |
| // Refresh button | |
| if (e.target.closest('.refresh-btn')) { | |
| const index = e.target.closest('.refresh-btn').getAttribute('data-index'); | |
| const btn = e.target.closest('.refresh-btn'); | |
| // Show loading | |
| btn.innerHTML = '<i class="fas fa-spinner fa-spin"></i>'; | |
| // Check status | |
| const status = await checkLinkStatus(savedLinks[index].imageUrl); | |
| savedLinks[index].status = status; | |
| localStorage.setItem('savedLinks', JSON.stringify(savedLinks)); | |
| // Render again | |
| renderLinks(); | |
| } | |
| // Delete button | |
| if (e.target.closest('.delete-btn')) { | |
| const index = e.target.closest('.delete-btn').getAttribute('data-index'); | |
| if (confirm('Bu bağlantıyı silmek istediğinize emin misiniz?')) { | |
| savedLinks.splice(index, 1); | |
| localStorage.setItem('savedLinks', JSON.stringify(savedLinks)); | |
| renderLinks(); | |
| } | |
| } | |
| }); | |
| // Export to CSV | |
| exportBtn.addEventListener('click', () => { | |
| if (savedLinks.length === 0) { | |
| alert('Dışa aktarılacak bağlantı bulunamadı!'); | |
| return; | |
| } | |
| // Create CSV content | |
| let csvContent = "data:text/csv;charset=utf-8,"; | |
| // Add headers | |
| csvContent += "Resim URL,Gidecek Link,Takma Ad,Durum\r\n"; | |
| // Add data rows | |
| savedLinks.forEach(link => { | |
| const row = [ | |
| `"${link.imageUrl}"`, | |
| `"${link.linkUrl}"`, | |
| `"${link.nickname}"`, | |
| `"${link.status === 'online' ? 'Çevrimiçi' : link.status === 'offline' ? 'Çevrimdışı' : 'Kontrol Ediliyor'}"` | |
| ].join(","); | |
| csvContent += row + "\r\n"; | |
| }); | |
| // Create download link | |
| const encodedUri = encodeURI(csvContent); | |
| const link = document.createElement("a"); | |
| link.setAttribute("href", encodedUri); | |
| link.setAttribute("download", "link_koleksiyonu.csv"); | |
| document.body.appendChild(link); | |
| // Trigger download | |
| link.click(); | |
| document.body.removeChild(link); | |
| }); | |
| // Refresh all links | |
| document.getElementById('refreshAllBtn').addEventListener('click', async () => { | |
| const btn = document.getElementById('refreshAllBtn'); | |
| const originalHTML = btn.innerHTML; | |
| // Show loading | |
| btn.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Yenileniyor'; | |
| // Refresh all links | |
| await renderLinks(); | |
| // Restore button | |
| btn.innerHTML = originalHTML; | |
| }); | |
| // Lightbox functionality | |
| const lightbox = document.createElement('div'); | |
| lightbox.id = 'lightbox'; | |
| lightbox.className = 'lightbox'; | |
| lightbox.innerHTML = ` | |
| <span class="close-lightbox">×</span> | |
| <div class="lightbox-content"> | |
| <img id="lightbox-img" class="lightbox-img" src=""> | |
| </div> | |
| <a class="prev">❮</a> | |
| <a class="next">❯</a> | |
| `; | |
| document.body.appendChild(lightbox); | |
| const lightboxImg = document.getElementById('lightbox-img'); | |
| const closeLightbox = document.querySelector('.close-lightbox'); | |
| const prevBtn = document.querySelector('.prev'); | |
| const nextBtn = document.querySelector('.next'); | |
| let currentImageIndex = 0; | |
| // Open lightbox when image is clicked | |
| document.addEventListener('click', (e) => { | |
| const imgElement = e.target.closest('.card img'); | |
| if (imgElement) { | |
| const card = imgElement.closest('.card'); | |
| const index = Array.from(document.querySelectorAll('.card')).indexOf(card); | |
| if (index !== -1) { | |
| currentImageIndex = index; | |
| lightboxImg.src = savedLinks[currentImageIndex].imageUrl; | |
| lightbox.style.display = 'block'; | |
| document.body.style.overflow = 'hidden'; | |
| } | |
| } | |
| }); | |
| // Close lightbox | |
| closeLightbox.addEventListener('click', () => { | |
| lightbox.style.display = 'none'; | |
| document.body.style.overflow = 'auto'; | |
| resetZoom(); | |
| }); | |
| // Zoom functionality | |
| let scale = 1; | |
| let isDragging = false; | |
| let startX, startY, translateX = 0, translateY = 0; | |
| function resetZoom() { | |
| scale = 1; | |
| translateX = 0; | |
| translateY = 0; | |
| lightboxImg.style.transform = `scale(${scale}) translate(${translateX}px, ${translateY}px)`; | |
| lightboxImg.classList.remove('zoomed'); | |
| } | |
| // Mouse wheel zoom | |
| lightboxImg.addEventListener('wheel', (e) => { | |
| e.preventDefault(); | |
| const delta = -e.deltaY; | |
| if (delta > 0) { | |
| scale *= 1.1; | |
| } else { | |
| scale *= 0.9; | |
| } | |
| // Limit zoom | |
| scale = Math.min(Math.max(1, scale), 5); | |
| if (scale > 1) { | |
| lightboxImg.classList.add('zoomed'); | |
| } else { | |
| lightboxImg.classList.remove('zoomed'); | |
| } | |
| lightboxImg.style.transform = `scale(${scale}) translate(${translateX}px, ${translateY}px)`; | |
| }); | |
| // Drag to move zoomed image | |
| lightboxImg.addEventListener('mousedown', (e) => { | |
| if (scale > 1) { | |
| isDragging = true; | |
| startX = e.clientX - translateX; | |
| startY = e.clientY - translateY; | |
| lightboxImg.style.cursor = 'grabbing'; | |
| } | |
| }); | |
| document.addEventListener('mousemove', (e) => { | |
| if (!isDragging) return; | |
| translateX = e.clientX - startX; | |
| translateY = e.clientY - startY; | |
| lightboxImg.style.transform = `scale(${scale}) translate(${translateX}px, ${translateY}px)`; | |
| }); | |
| document.addEventListener('mouseup', () => { | |
| isDragging = false; | |
| if (scale > 1) { | |
| lightboxImg.style.cursor = 'grab'; | |
| } | |
| }); | |
| // Double click to reset zoom | |
| lightboxImg.addEventListener('dblclick', resetZoom); | |
| // Navigate between images | |
| prevBtn.addEventListener('click', (e) => { | |
| e.stopPropagation(); | |
| resetZoom(); | |
| currentImageIndex = (currentImageIndex - 1 + savedLinks.length) % savedLinks.length; | |
| lightboxImg.src = savedLinks[currentImageIndex].imageUrl; | |
| }); | |
| nextBtn.addEventListener('click', (e) => { | |
| e.stopPropagation(); | |
| resetZoom(); | |
| currentImageIndex = (currentImageIndex + 1) % savedLinks.length; | |
| lightboxImg.src = savedLinks[currentImageIndex].imageUrl; | |
| }); | |
| // Close when clicking outside image | |
| lightbox.addEventListener('click', (e) => { | |
| if (e.target === lightbox) { | |
| lightbox.style.display = 'none'; | |
| document.body.style.overflow = 'auto'; | |
| } | |
| }); | |
| // Initial render | |
| renderLinks(); | |
| </script> | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=havae/ddddddd" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |