Spaces:
Running
Running
when user clicks the 3 dots on a post, make it so that the following options are shown:
Browse files- index.html +52 -10
index.html
CHANGED
|
@@ -108,10 +108,21 @@
|
|
| 108 |
<p class="text-xs opacity-70">2 hours ago</p>
|
| 109 |
</div>
|
| 110 |
</div>
|
| 111 |
-
<
|
| 112 |
-
<
|
| 113 |
-
|
| 114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
|
| 116 |
<p class="mb-4">Just finished this new beat - looking for a vocalist to collaborate! #HipHop #NeedVocals</p>
|
| 117 |
|
|
@@ -153,10 +164,21 @@
|
|
| 153 |
<p class="text-xs opacity-70">4 hours ago</p>
|
| 154 |
</div>
|
| 155 |
</div>
|
| 156 |
-
<
|
| 157 |
-
<
|
| 158 |
-
|
| 159 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 160 |
|
| 161 |
<p class="mb-4">Looking for producers who specialize in melodic rap beats. Check my profile for samples of my voice!</p>
|
| 162 |
|
|
@@ -268,10 +290,30 @@
|
|
| 268 |
</div>
|
| 269 |
</div>
|
| 270 |
</div>
|
| 271 |
-
|
| 272 |
<script>
|
| 273 |
feather.replace();
|
| 274 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 275 |
targets: '.waveform',
|
| 276 |
scaleX: [0, 1],
|
| 277 |
easing: 'easeOutQuad',
|
|
|
|
| 108 |
<p class="text-xs opacity-70">2 hours ago</p>
|
| 109 |
</div>
|
| 110 |
</div>
|
| 111 |
+
<div class="relative">
|
| 112 |
+
<button class="text-secondary" onclick="togglePostMenu(this)">
|
| 113 |
+
<i data-feather="more-horizontal"></i>
|
| 114 |
+
</button>
|
| 115 |
+
<div class="absolute right-0 mt-1 w-48 bg-accent rounded-md shadow-lg z-50 hidden post-menu">
|
| 116 |
+
<div class="py-1">
|
| 117 |
+
<a href="#" class="block px-4 py-2 text-sm hover:bg-primary/50">Follow</a>
|
| 118 |
+
<a href="#" class="block px-4 py-2 text-sm hover:bg-primary/50">Message</a>
|
| 119 |
+
<a href="#" class="block px-4 py-2 text-sm hover:bg-primary/50">Turn on Notifications</a>
|
| 120 |
+
<a href="#" class="block px-4 py-2 text-sm hover:bg-primary/50">Mute User</a>
|
| 121 |
+
<a href="#" class="block px-4 py-2 text-sm text-red-400 hover:bg-primary/50">Block User</a>
|
| 122 |
+
</div>
|
| 123 |
+
</div>
|
| 124 |
+
</div>
|
| 125 |
+
</div>
|
| 126 |
|
| 127 |
<p class="mb-4">Just finished this new beat - looking for a vocalist to collaborate! #HipHop #NeedVocals</p>
|
| 128 |
|
|
|
|
| 164 |
<p class="text-xs opacity-70">4 hours ago</p>
|
| 165 |
</div>
|
| 166 |
</div>
|
| 167 |
+
<div class="relative">
|
| 168 |
+
<button class="text-secondary" onclick="togglePostMenu(this)">
|
| 169 |
+
<i data-feather="more-horizontal"></i>
|
| 170 |
+
</button>
|
| 171 |
+
<div class="absolute right-0 mt-1 w-48 bg-accent rounded-md shadow-lg z-50 hidden post-menu">
|
| 172 |
+
<div class="py-1">
|
| 173 |
+
<a href="#" class="block px-4 py-2 text-sm hover:bg-primary/50">Follow</a>
|
| 174 |
+
<a href="#" class="block px-4 py-2 text-sm hover:bg-primary/50">Message</a>
|
| 175 |
+
<a href="#" class="block px-4 py-2 text-sm hover:bg-primary/50">Turn on Notifications</a>
|
| 176 |
+
<a href="#" class="block px-4 py-2 text-sm hover:bg-primary/50">Mute User</a>
|
| 177 |
+
<a href="#" class="block px-4 py-2 text-sm text-red-400 hover:bg-primary/50">Block User</a>
|
| 178 |
+
</div>
|
| 179 |
+
</div>
|
| 180 |
+
</div>
|
| 181 |
+
</div>
|
| 182 |
|
| 183 |
<p class="mb-4">Looking for producers who specialize in melodic rap beats. Check my profile for samples of my voice!</p>
|
| 184 |
|
|
|
|
| 290 |
</div>
|
| 291 |
</div>
|
| 292 |
</div>
|
|
|
|
| 293 |
<script>
|
| 294 |
feather.replace();
|
| 295 |
+
|
| 296 |
+
function togglePostMenu(button) {
|
| 297 |
+
const menu = button.nextElementSibling;
|
| 298 |
+
const allMenus = document.querySelectorAll('.post-menu');
|
| 299 |
+
|
| 300 |
+
// Close all other open menus
|
| 301 |
+
allMenus.forEach(m => {
|
| 302 |
+
if (m !== menu) m.classList.add('hidden');
|
| 303 |
+
});
|
| 304 |
+
|
| 305 |
+
// Toggle current menu
|
| 306 |
+
menu.classList.toggle('hidden');
|
| 307 |
+
|
| 308 |
+
// Close menu when clicking outside
|
| 309 |
+
document.addEventListener('click', function closeMenu(e) {
|
| 310 |
+
if (!button.contains(e.target) && !menu.contains(e.target)) {
|
| 311 |
+
menu.classList.add('hidden');
|
| 312 |
+
document.removeEventListener('click', closeMenu);
|
| 313 |
+
}
|
| 314 |
+
});
|
| 315 |
+
}
|
| 316 |
+
anime({
|
| 317 |
targets: '.waveform',
|
| 318 |
scaleX: [0, 1],
|
| 319 |
easing: 'easeOutQuad',
|