Spaces:
Running
Running
Download index.html from Kraftycoder/awesome: direct link, hf CLI and curl.
- Browser
- Download file 17.2 kB
-
https://huggingface.co/spaces/Kraftycoder/awesome/resolve/main/index.html
- Command line
-
hf download hf://spaces/Kraftycoder/awesome/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Kraftycoder/awesome/resolve/main/index.html
17.2 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Holy Humor - Bible Dad Jokes</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> | |
| @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Poppins:wght@300;400;600&display=swap'); | |
| body { | |
| font-family: 'Poppins', sans-serif; | |
| background-color: #f8f9fa; | |
| } | |
| .header-font { | |
| font-family: 'Playfair Display', serif; | |
| } | |
| .joke-card { | |
| transition: all 0.3s ease; | |
| box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); | |
| } | |
| .joke-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); | |
| } | |
| .loader { | |
| border-top-color: #3498db; | |
| animation: spin 1s linear infinite; | |
| } | |
| @keyframes spin { | |
| 0% { transform: rotate(0deg); } | |
| 100% { transform: rotate(360deg); } | |
| } | |
| .floating-btn { | |
| animation: float 3s ease-in-out infinite; | |
| } | |
| @keyframes float { | |
| 0% { transform: translateY(0px); } | |
| 50% { transform: translateY(-10px); } | |
| 100% { transform: translateY(0px); } | |
| } | |
| .bg-holy-gradient { | |
| background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-holy-gradient min-h-screen"> | |
| <!-- Header --> | |
| <header class="bg-white shadow-sm"> | |
| <div class="container mx-auto px-4 py-6"> | |
| <div class="flex flex-col md:flex-row justify-between items-center"> | |
| <div class="flex items-center mb-4 md:mb-0"> | |
| <i class="fas fa-bible text-3xl text-yellow-600 mr-3"></i> | |
| <h1 class="header-font text-3xl font-bold text-gray-800">Holy Humor</h1> | |
| </div> | |
| <div class="flex items-center space-x-4"> | |
| <button id="dark-mode-toggle" class="p-2 rounded-full bg-gray-100 text-gray-700 hover:bg-gray-200 transition"> | |
| <i class="fas fa-moon"></i> | |
| </button> | |
| <button id="share-btn" class="px-4 py-2 bg-yellow-500 text-white rounded-full hover:bg-yellow-600 transition flex items-center"> | |
| <i class="fas fa-share-alt mr-2"></i> Share | |
| </button> | |
| </div> | |
| </div> | |
| <p class="mt-2 text-gray-600 text-center md:text-left">"A cheerful heart is good medicine" - Proverbs 17:22</p> | |
| </div> | |
| </header> | |
| <!-- Main Content --> | |
| <main class="container mx-auto px-4 py-8"> | |
| <!-- Hero Section --> | |
| <section class="text-center mb-12"> | |
| <h2 class="header-font text-4xl md:text-5xl font-bold text-gray-800 mb-4">Bible-Based Dad Jokes</h2> | |
| <p class="text-xl text-gray-600 max-w-2xl mx-auto">Because even the Good Book has its funny moments. Get ready for some holy laughter!</p> | |
| <div class="mt-8"> | |
| <button id="get-joke-btn" class="px-8 py-3 bg-blue-600 text-white rounded-full hover:bg-blue-700 transition font-semibold text-lg floating-btn"> | |
| <i class="fas fa-plus mr-2"></i> Get More Jokes | |
| </button> | |
| </div> | |
| </section> | |
| <!-- Jokes Container --> | |
| <div id="jokes-container" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-12"> | |
| <!-- Jokes will be loaded here --> | |
| </div> | |
| <!-- Loading Spinner --> | |
| <div id="loading-spinner" class="flex justify-center my-8 hidden"> | |
| <div class="loader ease-linear rounded-full border-4 border-t-4 border-gray-200 h-12 w-12"></div> | |
| </div> | |
| <!-- No More Jokes Message --> | |
| <div id="no-more-jokes" class="text-center text-gray-500 py-8 hidden"> | |
| <p>You've reached the end... but don't worry, the jokes are infinite!</p> | |
| <button id="load-more-btn" class="mt-4 px-6 py-2 bg-blue-500 text-white rounded-full hover:bg-blue-600 transition"> | |
| Load More | |
| </button> | |
| </div> | |
| </main> | |
| <!-- Footer --> | |
| <footer class="bg-white py-8 border-t"> | |
| <div class="container mx-auto px-4 text-center"> | |
| <div class="flex justify-center space-x-6 mb-4"> | |
| <a href="#" class="text-gray-500 hover:text-blue-500"><i class="fab fa-twitter text-xl"></i></a> | |
| <a href="#" class="text-gray-500 hover:text-blue-500"><i class="fab fa-facebook text-xl"></i></a> | |
| <a href="#" class="text-gray-500 hover:text-blue-500"><i class="fab fa-instagram text-xl"></i></a> | |
| </div> | |
| <p class="text-gray-500">© 2023 Holy Humor. All rights reserved.</p> | |
| <p class="text-gray-400 text-sm mt-2">"Rejoice in the Lord always. I will say it again: Rejoice!" - Philippians 4:4</p> | |
| </div> | |
| </footer> | |
| <!-- Share Modal --> | |
| <div id="share-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden z-50"> | |
| <div class="bg-white rounded-lg p-6 max-w-md w-full"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h3 class="text-xl font-bold text-gray-800">Share Holy Humor</h3> | |
| <button id="close-share-modal" class="text-gray-500 hover:text-gray-700"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| <p class="mb-4 text-gray-600">Spread some holy laughter with your friends!</p> | |
| <div class="flex space-x-4 justify-center"> | |
| <button class="p-3 bg-blue-500 text-white rounded-full hover:bg-blue-600"> | |
| <i class="fab fa-facebook-f"></i> | |
| </button> | |
| <button class="p-3 bg-blue-400 text-white rounded-full hover:bg-blue-500"> | |
| <i class="fab fa-twitter"></i> | |
| </button> | |
| <button class="p-3 bg-red-500 text-white rounded-full hover:bg-red-600"> | |
| <i class="fab fa-whatsapp"></i> | |
| </button> | |
| <button class="p-3 bg-gray-800 text-white rounded-full hover:bg-gray-700"> | |
| <i class="fas fa-envelope"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| // Mock API for Bible dad jokes (in a real app, you would use a real API) | |
| const bibleDadJokes = [ | |
| { | |
| setup: "Why did Moses cross the Red Sea?", | |
| punchline: "Because he couldn't find the bridge!", | |
| reference: "Exodus 14:21-22" | |
| }, | |
| { | |
| setup: "What kind of man was Boaz before he got married?", | |
| punchline: "Ruth-less!", | |
| reference: "Ruth 3:11" | |
| }, | |
| { | |
| setup: "Why did the Israelites wander in the desert for 40 years?", | |
| punchline: "Because even back then, men refused to ask for directions!", | |
| reference: "Numbers 14:33-34" | |
| }, | |
| { | |
| setup: "What do you call a sleeping Pharisee?", | |
| punchline: "A hypo-crite!", | |
| reference: "Matthew 23:13" | |
| }, | |
| { | |
| setup: "Why did Noah have to punish the chickens on the ark?", | |
| punchline: "Because they were using fowl language!", | |
| reference: "Genesis 7:14-15" | |
| }, | |
| { | |
| setup: "What did Adam say to Eve when he saw her for the first time?", | |
| punchline: "Stand back! I don't know how big this thing gets!", | |
| reference: "Genesis 2:22-23" | |
| }, | |
| { | |
| setup: "Why did the disciples fall asleep in the Garden of Gethsemane?", | |
| punchline: "Because they were praying for their daily bread and then slept on it!", | |
| reference: "Matthew 26:40-41" | |
| }, | |
| { | |
| setup: "What do you call a fake noodle?", | |
| punchline: "An impasta! (But Jesus would forgive it)", | |
| reference: "Matthew 6:14-15" | |
| }, | |
| { | |
| setup: "Why couldn't Jonah trust the ocean?", | |
| punchline: "Because he knew there was something fishy about it!", | |
| reference: "Jonah 1:17" | |
| }, | |
| { | |
| setup: "What did the grape say when it got stepped on?", | |
| punchline: "Nothing, it just let out a little wine! (John 2:1-11)", | |
| reference: "John 2:1-11" | |
| } | |
| ]; | |
| // DOM Elements | |
| const jokesContainer = document.getElementById('jokes-container'); | |
| const loadingSpinner = document.getElementById('loading-spinner'); | |
| const noMoreJokes = document.getElementById('no-more-jokes'); | |
| const getJokeBtn = document.getElementById('get-joke-btn'); | |
| const loadMoreBtn = document.getElementById('load-more-btn'); | |
| const shareBtn = document.getElementById('share-btn'); | |
| const shareModal = document.getElementById('share-modal'); | |
| const closeShareModal = document.getElementById('close-share-modal'); | |
| const darkModeToggle = document.getElementById('dark-mode-toggle'); | |
| // Variables | |
| let loadedJokes = []; | |
| let jokeIndex = 0; | |
| // Initialize | |
| document.addEventListener('DOMContentLoaded', () => { | |
| loadInitialJokes(); | |
| setupEventListeners(); | |
| }); | |
| // Functions | |
| function loadInitialJokes() { | |
| showLoading(); | |
| setTimeout(() => { | |
| // Shuffle the jokes array | |
| const shuffledJokes = [...bibleDadJokes].sort(() => 0.5 - Math.random()); | |
| loadedJokes = shuffledJokes; | |
| // Display first 6 jokes | |
| for (let i = 0; i < 6; i++) { | |
| if (i < shuffledJokes.length) { | |
| addJokeToDOM(shuffledJokes[i]); | |
| } | |
| } | |
| hideLoading(); | |
| // Show "no more jokes" if we've loaded all | |
| if (loadedJokes.length <= 6) { | |
| noMoreJokes.classList.remove('hidden'); | |
| } | |
| }, 800); | |
| } | |
| function loadMoreJokes() { | |
| showLoading(); | |
| setTimeout(() => { | |
| // Get next batch of jokes | |
| const nextBatch = loadedJokes.slice(jokeIndex, jokeIndex + 3); | |
| if (nextBatch.length === 0) { | |
| // If no more jokes, fetch more from "API" (in this case, reshuffle) | |
| const moreJokes = [...bibleDadJokes].sort(() => 0.5 - Math.random()); | |
| loadedJokes = [...loadedJokes, ...moreJokes]; | |
| // Add the first 3 of the new batch | |
| for (let i = 0; i < 3; i++) { | |
| if (i < moreJokes.length) { | |
| addJokeToDOM(moreJokes[i]); | |
| } | |
| } | |
| jokeIndex = 3; | |
| } else { | |
| // Add the next batch | |
| nextBatch.forEach(joke => addJokeToDOM(joke)); | |
| jokeIndex += 3; | |
| } | |
| hideLoading(); | |
| }, 800); | |
| } | |
| function addJokeToDOM(joke) { | |
| const jokeCard = document.createElement('div'); | |
| jokeCard.className = 'joke-card bg-white rounded-xl p-6 shadow-md'; | |
| jokeCard.innerHTML = ` | |
| <div class="flex items-start mb-4"> | |
| <i class="fas fa-cross text-yellow-500 text-xl mr-3 mt-1"></i> | |
| <div> | |
| <p class="text-lg font-semibold text-gray-800">${joke.setup}</p> | |
| <p class="text-blue-600 font-medium mt-2">${joke.punchline}</p> | |
| </div> | |
| </div> | |
| <div class="flex justify-between items-center"> | |
| <span class="text-sm text-gray-500">${joke.reference}</span> | |
| <div class="flex space-x-2"> | |
| <button class="like-btn p-2 text-gray-400 hover:text-red-500 rounded-full hover:bg-gray-100"> | |
| <i class="far fa-heart"></i> | |
| </button> | |
| <button class="share-joke-btn p-2 text-gray-400 hover:text-blue-500 rounded-full hover:bg-gray-100"> | |
| <i class="fas fa-share-alt"></i> | |
| </button> | |
| </div> | |
| </div> | |
| `; | |
| jokesContainer.appendChild(jokeCard); | |
| // Add event listeners to the new buttons | |
| const likeBtn = jokeCard.querySelector('.like-btn'); | |
| const shareJokeBtn = jokeCard.querySelector('.share-joke-btn'); | |
| likeBtn.addEventListener('click', () => { | |
| likeBtn.innerHTML = `<i class="fas fa-heart text-red-500"></i>`; | |
| likeBtn.classList.remove('hover:text-red-500'); | |
| }); | |
| shareJokeBtn.addEventListener('click', () => { | |
| shareModal.classList.remove('hidden'); | |
| }); | |
| } | |
| function showLoading() { | |
| loadingSpinner.classList.remove('hidden'); | |
| } | |
| function hideLoading() { | |
| loadingSpinner.classList.add('hidden'); | |
| } | |
| function setupEventListeners() { | |
| // Get more jokes button | |
| getJokeBtn.addEventListener('click', loadMoreJokes); | |
| // Load more button | |
| loadMoreBtn.addEventListener('click', loadMoreJokes); | |
| // Share buttons | |
| shareBtn.addEventListener('click', () => { | |
| shareModal.classList.remove('hidden'); | |
| }); | |
| closeShareModal.addEventListener('click', () => { | |
| shareModal.classList.add('hidden'); | |
| }); | |
| // Dark mode toggle | |
| darkModeToggle.addEventListener('click', toggleDarkMode); | |
| // Infinite scroll | |
| window.addEventListener('scroll', () => { | |
| const { scrollTop, scrollHeight, clientHeight } = document.documentElement; | |
| if (scrollTop + clientHeight >= scrollHeight - 100) { | |
| loadMoreJokes(); | |
| } | |
| }); | |
| } | |
| function toggleDarkMode() { | |
| document.body.classList.toggle('bg-gray-900'); | |
| document.body.classList.toggle('bg-holy-gradient'); | |
| const header = document.querySelector('header'); | |
| const footer = document.querySelector('footer'); | |
| const jokeCards = document.querySelectorAll('.joke-card'); | |
| header.classList.toggle('bg-gray-800'); | |
| header.classList.toggle('bg-white'); | |
| footer.classList.toggle('bg-gray-800'); | |
| footer.classList.toggle('bg-white'); | |
| jokeCards.forEach(card => { | |
| card.classList.toggle('bg-gray-700'); | |
| card.classList.toggle('bg-white'); | |
| }); | |
| const darkModeIcon = darkModeToggle.querySelector('i'); | |
| if (document.body.classList.contains('bg-gray-900')) { | |
| darkModeIcon.classList.remove('fa-moon'); | |
| darkModeIcon.classList.add('fa-sun'); | |
| darkModeToggle.classList.remove('bg-gray-100'); | |
| darkModeToggle.classList.add('bg-gray-700', 'text-yellow-300'); | |
| } else { | |
| darkModeIcon.classList.remove('fa-sun'); | |
| darkModeIcon.classList.add('fa-moon'); | |
| darkModeToggle.classList.remove('bg-gray-700', 'text-yellow-300'); | |
| darkModeToggle.classList.add('bg-gray-100'); | |
| } | |
| } | |
| </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=Kraftycoder/awesome" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |