Spaces:
Running
Running
File size: 17,211 Bytes
f7b3a8e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 | <!DOCTYPE html>
<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> |