Spaces:
Running
Running
create a wall of looping gifs of the top posts of all time from https://www.reddit.com/r/TittyDrop/, the thumbnail gif annimations play on mouse sursor hover. - Initial Deployment
Browse files- README.md +7 -5
- index.html +221 -19
- prompts.txt +1 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: ttdrop
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,221 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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TF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>TittyDrop Top Posts Wall</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
.gif-container {
|
| 11 |
+
position: relative;
|
| 12 |
+
overflow: hidden;
|
| 13 |
+
transition: all 0.3s ease;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
.gif-container:hover {
|
| 17 |
+
transform: scale(1.05);
|
| 18 |
+
z-index: 10;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
.gif-thumbnail {
|
| 22 |
+
transition: opacity 0.3s ease;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
.gif-container:hover .gif-thumbnail {
|
| 26 |
+
opacity: 0;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
.gif-full {
|
| 30 |
+
position: absolute;
|
| 31 |
+
top: 0;
|
| 32 |
+
left: 0;
|
| 33 |
+
opacity: 0;
|
| 34 |
+
transition: opacity 0.3s ease;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
.gif-container:hover .gif-full {
|
| 38 |
+
opacity: 1;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
.loading-spinner {
|
| 42 |
+
animation: spin 1s linear infinite;
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
@keyframes spin {
|
| 46 |
+
0% { transform: rotate(0deg); }
|
| 47 |
+
100% { transform: rotate(360deg); }
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
.gradient-overlay {
|
| 51 |
+
position: absolute;
|
| 52 |
+
bottom: 0;
|
| 53 |
+
left: 0;
|
| 54 |
+
right: 0;
|
| 55 |
+
height: 50%;
|
| 56 |
+
background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
.post-title {
|
| 60 |
+
text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
|
| 61 |
+
}
|
| 62 |
+
</style>
|
| 63 |
+
</head>
|
| 64 |
+
<body class="bg-gray-900 min-h-screen">
|
| 65 |
+
<header class="bg-gradient-to-r from-pink-600 to-purple-600 py-6 shadow-lg">
|
| 66 |
+
<div class="container mx-auto px-4 flex justify-between items-center">
|
| 67 |
+
<h1 class="text-3xl md:text-4xl font-bold text-white flex items-center">
|
| 68 |
+
<i class="fas fa-film mr-3"></i> TittyDrop Top Posts
|
| 69 |
+
</h1>
|
| 70 |
+
<div class="flex items-center space-x-2">
|
| 71 |
+
<i class="fas fa-fire text-white"></i>
|
| 72 |
+
<span class="text-white font-semibold">All Time Top</span>
|
| 73 |
+
</div>
|
| 74 |
+
</div>
|
| 75 |
+
</header>
|
| 76 |
+
|
| 77 |
+
<main class="container mx-auto px-4 py-8">
|
| 78 |
+
<div class="text-center mb-8">
|
| 79 |
+
<h2 class="text-2xl font-semibold text-white mb-2">Hover over thumbnails to reveal full GIFs</h2>
|
| 80 |
+
<p class="text-gray-300">Showing top 100 posts of all time from r/TittyDrop</p>
|
| 81 |
+
</div>
|
| 82 |
+
|
| 83 |
+
<div id="loading" class="text-center py-16">
|
| 84 |
+
<div class="inline-block text-pink-500 text-4xl loading-spinner">
|
| 85 |
+
<i class="fas fa-spinner"></i>
|
| 86 |
+
</div>
|
| 87 |
+
<p class="text-white mt-4">Loading top posts...</p>
|
| 88 |
+
</div>
|
| 89 |
+
|
| 90 |
+
<div id="gif-wall" class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4"></div>
|
| 91 |
+
</main>
|
| 92 |
+
|
| 93 |
+
<footer class="bg-gray-800 text-white py-6">
|
| 94 |
+
<div class="container mx-auto px-4 text-center">
|
| 95 |
+
<p>Content from <a href="https://www.reddit.com/r/TittyDrop/" target="_blank" class="text-pink-400 hover:text-pink-300">r/TittyDrop</a></p>
|
| 96 |
+
<p class="text-sm text-gray-400 mt-2">All content belongs to their respective owners</p>
|
| 97 |
+
</div>
|
| 98 |
+
</footer>
|
| 99 |
+
|
| 100 |
+
<script>
|
| 101 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 102 |
+
const gifWall = document.getElementById('gif-wall');
|
| 103 |
+
const loadingSpinner = document.getElementById('loading');
|
| 104 |
+
|
| 105 |
+
// Fetch top posts from Reddit API
|
| 106 |
+
fetch('https://www.reddit.com/r/TittyDrop/top.json?sort=top&t=all&limit=100')
|
| 107 |
+
.then(response => response.json())
|
| 108 |
+
.then(data => {
|
| 109 |
+
loadingSpinner.style.display = 'none';
|
| 110 |
+
|
| 111 |
+
const posts = data.data.children;
|
| 112 |
+
posts.forEach(post => {
|
| 113 |
+
// Skip non-image posts
|
| 114 |
+
if (!post.data.is_video && !post.data.url.endsWith('.gif')) return;
|
| 115 |
+
|
| 116 |
+
// Create gif container
|
| 117 |
+
const gifContainer = document.createElement('div');
|
| 118 |
+
gifContainer.className = 'gif-container rounded-lg shadow-lg bg-black relative';
|
| 119 |
+
|
| 120 |
+
// Create thumbnail (static version)
|
| 121 |
+
const thumbnail = document.createElement('img');
|
| 122 |
+
thumbnail.src = post.data.thumbnail;
|
| 123 |
+
thumbnail.alt = post.data.title;
|
| 124 |
+
thumbnail.className = 'gif-thumbnail w-full h-auto rounded-lg cursor-pointer';
|
| 125 |
+
thumbnail.loading = 'lazy';
|
| 126 |
+
|
| 127 |
+
// Create full gif version (only loads when hovered)
|
| 128 |
+
let fullGifSrc = '';
|
| 129 |
+
if (post.data.is_video) {
|
| 130 |
+
fullGifSrc = post.data.media.reddit_video.fallback_url;
|
| 131 |
+
} else {
|
| 132 |
+
fullGifSrc = post.data.url;
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
let fullGif;
|
| 136 |
+
if (post.data.is_video) {
|
| 137 |
+
fullGif = document.createElement('video');
|
| 138 |
+
fullGif.className = 'gif-full w-full h-auto rounded-lg absolute top-0 left-0';
|
| 139 |
+
fullGif.autoplay = true;
|
| 140 |
+
fullGif.loop = true;
|
| 141 |
+
fullGif.muted = true;
|
| 142 |
+
fullGif.innerHTML = `<source src="${fullGifSrc}" type="video/mp4">`;
|
| 143 |
+
} else {
|
| 144 |
+
fullGif = document.createElement('img');
|
| 145 |
+
fullGif.src = fullGifSrc;
|
| 146 |
+
fullGif.className = 'gif-full w-full h-auto rounded-lg absolute top-0 left-0';
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
// Create overlay with title info
|
| 150 |
+
const overlay = document.createElement('div');
|
| 151 |
+
overlay.className = 'gradient-overlay rounded-lg pointer-events-none';
|
| 152 |
+
|
| 153 |
+
const titleContainer = document.createElement('div');
|
| 154 |
+
titleContainer.className = 'absolute bottom-0 left-0 right-0 p-3';
|
| 155 |
+
|
| 156 |
+
const title = document.createElement('p');
|
| 157 |
+
title.className = 'post-title text-white text-sm font-semibold truncate';
|
| 158 |
+
title.textContent = post.data.title;
|
| 159 |
+
|
| 160 |
+
const info = document.createElement('div');
|
| 161 |
+
info.className = 'post-title text-white text-xs flex justify-between items-center';
|
| 162 |
+
info.innerHTML = `
|
| 163 |
+
<span><i class="fas fa-arrow-up mr-1"></i> ${post.data.ups.toLocaleString()}</span>
|
| 164 |
+
<span><i class="fas fa-comment mr-1"></i> ${post.data.num_comments.toLocaleString()}</span>
|
| 165 |
+
`;
|
| 166 |
+
|
| 167 |
+
titleContainer.appendChild(title);
|
| 168 |
+
titleContainer.appendChild(info);
|
| 169 |
+
|
| 170 |
+
// Build the container
|
| 171 |
+
gifContainer.appendChild(thumbnail);
|
| 172 |
+
gifContainer.appendChild(fullGif);
|
| 173 |
+
gifContainer.appendChild(overlay);
|
| 174 |
+
gifContainer.appendChild(titleContainer);
|
| 175 |
+
|
| 176 |
+
// Add to the wall
|
| 177 |
+
gifWall.appendChild(gifContainer);
|
| 178 |
+
});
|
| 179 |
+
|
| 180 |
+
// Preload some GIFs when scrolling (for better performance)
|
| 181 |
+
const lazyLoad = () => {
|
| 182 |
+
const lazyGifs = document.querySelectorAll('.gif-container');
|
| 183 |
+
|
| 184 |
+
lazyGifs.forEach(gifContainer => {
|
| 185 |
+
if (isInViewport(gifContainer)) {
|
| 186 |
+
const fullGif = gifContainer.querySelector('.gif-full');
|
| 187 |
+
if (fullGif && fullGif.dataset.src) {
|
| 188 |
+
fullGif.src = fullGif.dataset.src;
|
| 189 |
+
delete fullGif.dataset.src;
|
| 190 |
+
}
|
| 191 |
+
}
|
| 192 |
+
});
|
| 193 |
+
};
|
| 194 |
+
|
| 195 |
+
const isInViewport = (el) => {
|
| 196 |
+
const rect = el.getBoundingClientRect();
|
| 197 |
+
return (
|
| 198 |
+
rect.top <= (window.innerHeight || document.documentElement.clientHeight) &&
|
| 199 |
+
rect.bottom >= 0 &&
|
| 200 |
+
rect.left <= (window.innerWidth || document.documentElement.clientWidth) &&
|
| 201 |
+
rect.right >= 0
|
| 202 |
+
);
|
| 203 |
+
};
|
| 204 |
+
|
| 205 |
+
window.addEventListener('scroll', lazyLoad);
|
| 206 |
+
window.addEventListener('resize', lazyLoad);
|
| 207 |
+
lazyLoad();
|
| 208 |
+
})
|
| 209 |
+
.catch(error => {
|
| 210 |
+
console.error('Error fetching Reddit data:', error);
|
| 211 |
+
loadingSpinner.innerHTML = `
|
| 212 |
+
<div class="text-red-500 text-xl">
|
| 213 |
+
<i class="fas fa-exclamation-triangle mr-2"></i>
|
| 214 |
+
Failed to load posts. Please refresh the page.
|
| 215 |
+
</div>
|
| 216 |
+
`;
|
| 217 |
+
});
|
| 218 |
+
});
|
| 219 |
+
</script>
|
| 220 |
+
<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=AlterMantle/ttdrop" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 221 |
+
</html>
|
prompts.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
create a wall of looping gifs of the top posts of all time from https://www.reddit.com/r/TittyDrop/, the thumbnail gif annimations play on mouse sursor hover.
|