From 67cb8b69c628cbc5e5420aea17f7502cc7bde605 Mon Sep 17 00:00:00 2001 From: djg Date: Mon, 21 Sep 2026 22:15:42 +0000 Subject: [PATCH] initial import --- build.py | 570 +++++++++++++++++++++++++++ content/jokes.json | 362 +++++++++++++++++ deploy.sh | 41 ++ k8s/letsencrypt-issuer.yaml | 25 ++ k8s/static-sites.yaml | 262 ++++++++++++ k8s/traefik.yaml | 113 ++++++ site/404.html | 83 ++++ site/about/index.html | 88 +++++ site/api/v1/random.json | 1 + site/api/v1/today.json | 1 + site/category/animals/index.html | 84 ++++ site/category/christmas/index.html | 84 ++++ site/category/family/index.html | 84 ++++ site/category/food/index.html | 84 ++++ site/category/halloween/index.html | 84 ++++ site/category/knock-knock/index.html | 84 ++++ site/category/one-liners/index.html | 84 ++++ site/category/school/index.html | 84 ++++ site/category/space/index.html | 84 ++++ site/category/sports/index.html | 84 ++++ site/category/tech/index.html | 84 ++++ site/category/travel/index.html | 84 ++++ site/category/weather/index.html | 84 ++++ site/category/work/index.html | 84 ++++ site/contact/index.html | 81 ++++ site/dad-joke-generator/index.html | 95 +++++ site/index.html | 194 +++++++++ site/joke-of-the-day/index.html | 91 +++++ site/privacy-policy/index.html | 93 +++++ site/robots.txt | 4 + site/rss.xml | 49 +++ site/search/index.html | 84 ++++ site/sitemap.xml | 34 ++ site/static/favicon.svg | 6 + site/static/jokes-data.js | 1 + site/static/main.js | 235 +++++++++++ site/static/style.css | 169 ++++++++ site/terms/index.html | 89 +++++ site/topic/birthday/index.html | 83 ++++ site/topic/cats/index.html | 83 ++++ site/topic/coffee/index.html | 83 ++++ site/topic/cows/index.html | 83 ++++ site/topic/dogs/index.html | 83 ++++ site/topic/love/index.html | 83 ++++ site/topic/money/index.html | 83 ++++ site/topic/sleep/index.html | 83 ++++ site/topic/winter/index.html | 83 ++++ static/favicon.svg | 6 + static/main.js | 235 +++++++++++ static/style.css | 169 ++++++++ 50 files changed, 5104 insertions(+) create mode 100644 build.py create mode 100644 content/jokes.json create mode 100755 deploy.sh create mode 100644 k8s/letsencrypt-issuer.yaml create mode 100644 k8s/static-sites.yaml create mode 100644 k8s/traefik.yaml create mode 100644 site/404.html create mode 100644 site/about/index.html create mode 100644 site/api/v1/random.json create mode 100644 site/api/v1/today.json create mode 100644 site/category/animals/index.html create mode 100644 site/category/christmas/index.html create mode 100644 site/category/family/index.html create mode 100644 site/category/food/index.html create mode 100644 site/category/halloween/index.html create mode 100644 site/category/knock-knock/index.html create mode 100644 site/category/one-liners/index.html create mode 100644 site/category/school/index.html create mode 100644 site/category/space/index.html create mode 100644 site/category/sports/index.html create mode 100644 site/category/tech/index.html create mode 100644 site/category/travel/index.html create mode 100644 site/category/weather/index.html create mode 100644 site/category/work/index.html create mode 100644 site/contact/index.html create mode 100644 site/dad-joke-generator/index.html create mode 100644 site/index.html create mode 100644 site/joke-of-the-day/index.html create mode 100644 site/privacy-policy/index.html create mode 100644 site/robots.txt create mode 100644 site/rss.xml create mode 100644 site/search/index.html create mode 100644 site/sitemap.xml create mode 100644 site/static/favicon.svg create mode 100644 site/static/jokes-data.js create mode 100644 site/static/main.js create mode 100644 site/static/style.css create mode 100644 site/terms/index.html create mode 100644 site/topic/birthday/index.html create mode 100644 site/topic/cats/index.html create mode 100644 site/topic/coffee/index.html create mode 100644 site/topic/cows/index.html create mode 100644 site/topic/dogs/index.html create mode 100644 site/topic/love/index.html create mode 100644 site/topic/money/index.html create mode 100644 site/topic/sleep/index.html create mode 100644 site/topic/winter/index.html create mode 100644 static/favicon.svg create mode 100644 static/main.js create mode 100644 static/style.css diff --git a/build.py b/build.py new file mode 100644 index 0000000..ff5c365 --- /dev/null +++ b/build.py @@ -0,0 +1,570 @@ +#!/usr/bin/env python3 +"""Static site generator for bestdadjokes.lol. Python 3.6 stdlib only.""" +import json, os, re, shutil, html, datetime + +ROOT = os.path.dirname(os.path.abspath(__file__)) +CONTENT = os.path.join(ROOT, 'content', 'jokes.json') +SITE_DIR = os.path.join(ROOT, 'site') +STATIC = os.path.join(ROOT, 'static') + +SITE_URL = 'https://bestdadjokes.lol' +SITE_NAME = 'Best Dad Jokes' +TAGLINE = 'The best dad jokes on the internet โ€” short, clean, and groan-worthy.' +YEAR = datetime.date.today().year + +with open(CONTENT) as f: + DATA = json.load(f) +CATS = DATA['categories'] +JOKES = DATA['jokes'] +CAT_BY_SLUG = {c['slug']: c for c in CATS} +for i, j in enumerate(JOKES): + j['id'] = i + +# Long-tail topic pages: jokes matched by keyword across all categories. +TOPICS = [ + {"slug": "coffee", "name": "Dad Jokes About Coffee", "emoji": "โ˜•", + "intro": "Fuel for dads and their worst puns alike. These coffee dad jokes are best served strong, black, and with a healthy amount of eye-rolling.", + "keywords": r"\b(coffee|espresso|latte|caffeine|beans?|mugs?)\b"}, + {"slug": "cats", "name": "Dad Jokes About Cats", "emoji": "๐Ÿฑ", + "intro": "For the cat dads out there. These cat dad jokes will make your feline walk out of the room in disgust โ€” which, for a cat, is a standing ovation.", + "keywords": r"\b(cats?|kittens?|purr|feline|meow)\b"}, + {"slug": "dogs", "name": "Dad Jokes About Dogs", "emoji": "๐Ÿ•", + "intro": "A dog is the only audience that wags at dad jokes. Fetch! These dog dad jokes are good boys, every one of them.", + "keywords": r"\b(dogs?|puppy|puppies|pup|hound)\b"}, + {"slug": "cows", "name": "Dad Jokes About Cows", "emoji": "๐Ÿ„", + "intro": "Outstanding in their field and in our pun archive. These cow dad jokes are udderly relentless.", + "keywords": r"\b(cows?|cattle|moo|udder|beef|herd)\b"}, + {"slug": "pizza", "name": "Dad Jokes About Pizza", "emoji": "๐Ÿ•", + "intro": "A slice of comedy gold. These pizza dad jokes are cheesy by design โ€” that's not a bug, it's the whole point.", + "keywords": r"\bpizzas?\b"}, + {"slug": "money", "name": "Dad Jokes About Money", "emoji": "๐Ÿ’ฐ", + "intro": "Money can't buy happiness, but it can buy these money dad jokes, which are basically the same thing but cheaper.", + "keywords": r"\b(money|cash|coins?|dollars?|penn(y|ies)|bank|rich|spen[dt]|salary)\b"}, + {"slug": "sleep", "name": "Dad Jokes About Sleep", "emoji": "๐Ÿ˜ด", + "intro": "Read these sleep dad jokes in bed. Groaning yourself to sleep counts as a lullaby.", + "keywords": r"\b(sleep|nap|bed|pillow|blanket|tired|asleep|dream)\b"}, + {"slug": "love", "name": "Dad Jokes About Love", "emoji": "โค๏ธ", + "intro": "Romance, dad-style. These love dad jokes have walked someone down the aisle against their will and lived to pun about it.", + "keywords": r"\b(love|romantic|valentine|marri(ed|age)|attract|wife|husband|buoy)\b"}, + {"slug": "birthday", "name": "Birthday Dad Jokes", "emoji": "๐ŸŽ‚", + "intro": "Because every birthday needs at least one groan with the cake. These birthday dad jokes are tradition now, sorry.", + "keywords": r"\b(birthday|cake|candles?|party|presents?)\b"}, + {"slug": "winter", "name": "Winter Dad Jokes", "emoji": "โ›„", + "intro": "These winter dad jokes are snow joke. Perfect for breaking the ice at any cold-weather gathering.", + "keywords": r"\b(winter|snow|snowman|ic(y|icle)|frost|chill)\b"}, +] +MIN_TOPIC_JOKES = 5 + + +def esc(s): + return html.escape(s, quote=True) + + +def joke_count(slug): + return sum(1 for j in JOKES if j['cat'] == slug) + + +def joke_card(j, reveal=False): + """A single joke card. Punchline is in the DOM (SEO-safe); JS blurs until clicked.""" + cls = 'joke-card' + if j.get('type') == 'knock': + body = '

%s

' % esc(j['setup']).replace('\n', '
') + else: + body = '

%s

' % esc(j['setup']) + punch = '
%s
' % esc(j['punch']) + share = ('' + '' % (j['id'], j['id'])) + return ('
%s%s' + '
%s
' + % (cls, j['id'], body, punch, share)) + + +def layout(title, desc, body, path='/', extra_head=''): + nav_cats = ''.join( + '%s %s' % (c['slug'], c['emoji'], esc(c['name'])) + for c in CATS[:7]) + rest = ''.join('%s %s' % (c['slug'], c['emoji'], esc(c['name'])) + for c in CATS[7:]) + foot_cats = ''.join('%s' % (c['slug'], esc(c['name'])) for c in CATS) + return f""" + + + + +{esc(title)} + + + + + + + + + + + + +{extra_head} + + + +
+{body} +
+ + + + +""" + + +def page_index(): + rnd = JOKES[(datetime.date.today().toordinal() * 7) % len(JOKES)] + d_idx = datetime.date.today().toordinal() + jod = JOKES[d_idx % len(JOKES)] + latest = JOKES[-12:][::-1] + live_topics = [t for t in TOPICS if len(topic_jokes(t)) >= MIN_TOPIC_JOKES] + topic_chips = ''.join('%s %s' % ( + t['slug'], t['emoji'], esc(t['name'].replace('Dad Jokes About ', '').replace('Dad Jokes', 'Jokes'))) + for t in live_topics) + cat_cards = ''.join(f""" + + {c['emoji']} + {esc(c['name'])} + {joke_count(c['slug'])} jokes + """ for c in CATS) + latest_cards = ''.join(joke_card(j) for j in latest) + body = f""" +
+

The Best Dad Jokes on the Internet

+

Short. Clean. Painfully punny. {len(JOKES)}+ jokes your kids don't want to hear but absolutely need to.

+
+

{esc(rnd['setup'])}

+
{esc(rnd['punch'])}
+
+ + + +
+
+
+ + + +
+
+

๐Ÿ˜„ Dad Joke of the Day

+

{esc(jod['setup'])}

+
{esc(jod['punch'])}
+

See the archive โ†’

+
+
+ +
+

Browse Dad Jokes by Category

+
{cat_cards}
+
+ +
+

Popular Dad Joke Topics

+
+ {topic_chips} +
+
+ + + +
+

Fresh Out of the Dad Oven

+
{latest_cards}
+ +
+ +
+

What is a dad joke?

+

A dad joke is a short, clean, pun-based joke delivered with maximum confidence and zero shame. It's the kind of joke that makes your kids groan, your wife roll her eyes, and your dog leave the room. Science has yet to explain why hearing one makes you feel briefly smarter and visibly worse at the same time.

+

This site is a growing collection of the best dad jokes on the internet: one-liners, knock-knock jokes, and puns about animals, food, work, school, sports, tech, space and more. Every joke is family-friendly โ€” the only thing at risk of injury is everyone's patience. Start with the dad joke generator, browse the categories, or come back every day for a new dad joke of the day.

+
""" + title = 'Best Dad Jokes โ€” %d+ Funny, Clean Dad Jokes (One-Liners, Puns & Knock-Knocks)' % len(JOKES) + desc = ('The best dad jokes on the internet: %d clean, funny, groan-worthy dad jokes. ' + 'One-liners, knock-knock jokes and puns by category, plus a daily dad joke and a free generator.' + % len(JOKES)) + ld = { + "@context": "https://schema.org", + "@type": "WebSite", + "name": SITE_NAME, + "url": SITE_URL + '/', + "description": TAGLINE, + "potentialAction": { + "@type": "SearchAction", + "target": SITE_URL + "/search/?q={search_term_string}", + "query-input": "required name=search_term_string" + } + } + return layout(title, desc, body, '/', + '' % esc(json.dumps(ld))) + + +def page_category(slug): + c = CAT_BY_SLUG[slug] + js = [j for j in JOKES if j['cat'] == slug] + cards = ''.join(joke_card(j) for j in js) + others = [o for o in CATS if o['slug'] != slug][:6] + others_html = ''.join('%s %s' % (o['slug'], o['emoji'], esc(o['name'])) for o in others) + body = f""" +
+ +

{c['emoji']} {esc(c['name'])}

+

{esc(c['blurb'])} That's {len(js)} jokes of pure dad energy.

+
{cards}
+ +

Keep the groans going

+
{others_html}
+ +
""" + title = '%s โ€” %d Funny, Clean %s' % (c['name'], len(js), c['name']) + desc = '%s %s %d jokes, all clean and all terrible. Perfect for dads, teachers and any occasion that needs a groan.' % (c['blurb'], 'Browse', len(js)) + ld = {"@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [ + {"@type": "ListItem", "position": 1, "name": "Home", "item": SITE_URL + '/'}, + {"@type": "ListItem", "position": 2, "name": c['name'], "item": SITE_URL + '/category/%s/' % slug}]} + return layout(title, desc, body, '/category/%s/' % slug, + '' % esc(json.dumps(ld))) + + +def topic_jokes(topic): + pat = re.compile(topic['keywords']) + return [j for j in JOKES if pat.search((j['setup'] + ' ' + j['punch']).lower())] + + +def page_topic(slug): + t = next(t for t in TOPICS if t['slug'] == slug) + js = topic_jokes(t) + if len(js) < MIN_TOPIC_JOKES: + return None + cards = ''.join(joke_card(j) for j in js) + other_topics = [o for o in TOPICS if o['slug'] != slug and len(topic_jokes(o)) >= MIN_TOPIC_JOKES][:6] + chips = ''.join('%s %s' % (o['slug'], o['emoji'], esc(o['name'].replace('Dad Jokes About ', '').replace('Dad Jokes', 'Jokes'))) for o in other_topics) + body = f""" +
+ +

{t['emoji']} {esc(t['name'])}

+

{esc(t['intro'])} That's {len(js)} of them, carefully curated for maximum groan.

+
{cards}
+

More where that came from

+
{chips}
+ +
""" + title = '%s โ€” %d Clean, Groan-Worthy Jokes' % (t['name'], len(js)) + desc = '%s %s' % (t['intro'], 'A curated collection of %d clean, family-friendly jokes.' % len(js)) + return layout(title, desc, body, '/topic/%s/' % slug) + + +def page_generator(): + body = """ +
+

๐ŸŽฒ Dad Joke Generator

+

One click. One random dad joke. Zero apologies. Works at parties, in the car line, and mid-argument.

+
+

Click the button to summon a dad joke.

+
+
+ + + +
+
+

How to weaponize a dad joke

+
    +
  1. Deliver with confidence. Eye contact is everything. The dad joke fears hesitation.
  2. +
  3. Pause before the punchline. Let the suspense marinate. Then pounce.
  4. +
  5. Ignore the groans. The groan is applause in dad dialect.
  6. +
  7. Repeat the best ones. Repetition builds tradition. Tradition builds groans.
  8. +
+

Looking for something specific? Search all dad jokes or browse by category.

+
""" + title = 'Dad Joke Generator โ€” Random Dad Jokes, One Click' + desc = 'Press one button and get a random dad joke instantly. Hundreds of clean, funny dad jokes ready to embarrass your kids.' + return layout(title, desc, body, '/dad-joke-generator/') + + +def page_jotd(): + d = datetime.date.today() + j = JOKES[d.toordinal() % len(JOKES)] + body = f""" +
+

๐Ÿ˜„ Dad Joke of the Day

+

A brand-new dad joke every single day. Doctors recommend exactly one per day. We won't tell if you don't.

+
+

{d.strftime('%B %d, %Y')}

+

{esc(j['setup'])}

+
{esc(j['punch'])}
+
+ + +
+
+

The dad joke archive

+

Every recent dad joke of the day, one per day, no repeats (for a few months, anyway):

+
+ +
""" + title = 'Dad Joke of the Day โ€” A New Funny Dad Joke Daily' + desc = "Today's dad joke of the day, plus the full archive. One clean, funny dad joke for every day of the year." + ld = {"@context": "https://schema.org", "@type": "SpecialAnnouncement", "name": "Dad Joke of the Day", + "url": SITE_URL + '/joke-of-the-day/', "category": "https://schema.org/EntertainmentEvent"} + return layout(title, desc, body, '/joke-of-the-day/', + '' % SITE_URL + + '' % esc(json.dumps(ld))) + + +def page_search(): + body = """ +
+

๐Ÿ”Ž Search Dad Jokes

+

Looking for a dad joke about coffee, cats, or cardio? Type it in. We probably have a pun for that.

+
+ +
+

+
+

No jokes matched. Which, honestly, is a great setup for a new dad joke โ€” send it to us via the contact page.

+
""" + title = 'Search Dad Jokes โ€” Find a Dad Joke About Anything' + desc = 'Search hundreds of clean dad jokes by keyword. Find puns and one-liners about any topic instantly.' + return layout(title, desc, body, '/search/') + + +def page_about(): + body = """ +
+

๐Ÿ‘‹ About Best Dad Jokes

+

Welcome to BestDadJokes.lol โ€” a growing collection of the internet's best dad jokes: short, clean, pun-heavy, and delivered with the quiet confidence only a dad can muster.

+

The mission is simple: build the most useful dad joke resource on the internet. That means:

+ +

Why dad jokes?

+

Because a dad joke is never just a joke. It's a love language. It's saying "I would rather embarrass myself than miss a chance to make you laugh." Also, they're free, and this is a budget operation.

+

Get in touch

+

Got a joke that deserves to be here? Found a bug? Want to license 300 dad jokes for your family group chat? Head to the contact page.

+
""" + title = 'About โ€” Best Dad Jokes .lol' + desc = 'BestDadJokes.lol is a curated collection of clean, funny dad jokes. Hand-picked jokes, family-friendly humor, zero nonsense.' + return layout(title, desc, body, '/about/') + + +def page_contact(): + body = """ +
+

๐Ÿ“ฎ Contact

+

Want to send us the greatest dad joke of all time? Report a joke that's more "dad" than "joke"? Tell us the site made you laugh so hard you spilled your coffee? We read everything.

+

Email us at hello@bestdadjokes.lol โ€” responses may be delayed by naps.

+

Joke submissions

+

Include the setup and the punchline in your email. If we use it, you get full bragging rights and absolutely no money, which is exactly how dad economics works.

+
""" + title = 'Contact โ€” Best Dad Jokes .lol' + desc = 'Get in touch with BestDadJokes.lol โ€” submit a dad joke, say hi, or report a bug.' + return layout(title, desc, body, '/contact/') + + +def page_privacy(): + body = """ +
+

Privacy Policy

+

Last updated: %s

+

BestDadJokes.lol respects your privacy, which is ironic because dads famously respect nothing more than a good interruption. Here's the deal in plain English:

+

What we collect

+

We keep standard web server logs (IP address, browser type, pages visited) for security and aggregate traffic statistics. We do not ask for your name, email, or your kids' report cards. There are no accounts on this site.

+

Cookies and advertising

+

We may display advertising on this site to keep it free. Advertising partners, which may include Google, use cookies and similar technologies to serve ads based on your prior visits to this and other websites.

+

Google's use of advertising cookies enables it and its partners to serve ads based on your visits to this site and/or other sites on the Internet. You may opt out of personalized advertising by visiting Google Ads Settings, or opt out of third-party vendor cookies at aboutads.info.

+

If we run a consent banner for visitors from the EEA/UK, your choices will be honored and stored locally.

+

Analytics

+

We use aggregate, privacy-respecting analytics to count page views and understand which categories people enjoy. This data cannot reasonably be used to identify you.

+

Data sharing

+

We do not sell personal data. We have no personal data to sell. We barely have data.

+

Children

+

Content on this site is family-friendly by design. The site is not directed at children under 13, and we do not knowingly collect personal information from children.

+

Contact

+

Questions about this policy? Email hello@bestdadjokes.lol.

+
""" % datetime.date.today().strftime('%B %d, %Y') + title = 'Privacy Policy โ€” Best Dad Jokes .lol' + desc = 'Privacy policy for BestDadJokes.lol โ€” what we collect (very little), cookies, advertising, and your choices.' + return layout(title, desc, body, '/privacy-policy/') + + +def page_terms(): + body = """ +
+

Terms of Use

+

Last updated: %s

+

By using BestDadJokes.lol you agree to the following terms. Reading them aloud in a dad voice is optional but encouraged.

+

Use of content

+

The jokes on this site are provided for personal, non-commercial enjoyment. Share them freely at dinner tables, offices, and group chats. If you want to republish jokes in bulk or use this site commercially, contact us first โ€” we're reasonable people.

+

No warranties

+

This site is provided "as is." We make no guarantees that jokes will be funny, that groans will be produced, or that your teenagers will acknowledge your existence. All comedic risk is yours.

+

Limitation of liability

+

To the fullest extent permitted by law, BestDadJokes.lol is not liable for any damages arising from use of the site, including but not limited to eye-rolling, sighing, involuntary chuckling, and children hiding your phone.

+

External links

+

We are not responsible for the content of external websites, including their jokes, which are almost certainly worse than ours.

+

Changes

+

We may update these terms occasionally. Continued use of the site means you accept the updated terms, and possibly a fresh dad joke.

+
""" % datetime.date.today().strftime('%B %d, %Y') + title = 'Terms of Use โ€” Best Dad Jokes .lol' + desc = 'Terms of use for BestDadJokes.lol.' + return layout(title, desc, body, '/terms/') + + +def page_404(): + body = """ +
+

404

+

This page is like a dad joke that got cut from the site โ€” it just didn't land.

+
+

Why did the web page go to therapy?

+
It had too many broken links.
+
+

Take me home โ†’

+
""" + return layout('404 โ€” Page Not Found', 'Page not found. The joke is on us.', body, '/404.html') + + +def write(path, content): + full = os.path.join(SITE_DIR, path) + os.makedirs(os.path.dirname(full), exist_ok=True) + with open(full, 'w') as f: + f.write(content) + + +def build(): + if os.path.exists(SITE_DIR): + shutil.rmtree(SITE_DIR) + os.makedirs(SITE_DIR) + # static assets + st = os.path.join(SITE_DIR, 'static') + os.makedirs(st, exist_ok=True) + for fn in os.listdir(STATIC): + shutil.copy(os.path.join(STATIC, fn), st) + # jokes data for client-side JS + payload = { + 'categories': [{'slug': c['slug'], 'name': c['name'], 'emoji': c['emoji']} for c in CATS], + 'jokes': [{'id': j['id'], 'cat': j['cat'], 'type': j.get('type', 'qa'), + 's': j['setup'], 'p': j['punch']} for j in JOKES]} + write('static/jokes-data.js', + 'window.BDJ=%s;' % json.dumps(payload, ensure_ascii=False, separators=(',', ':'))) + + write('index.html', page_index()) + for c in CATS: + write('category/%s/index.html' % c['slug'], page_category(c['slug'])) + for t in TOPICS: + page = page_topic(t['slug']) + if page: + write('topic/%s/index.html' % t['slug'], page) + write('dad-joke-generator/index.html', page_generator()) + write('joke-of-the-day/index.html', page_jotd()) + write('search/index.html', page_search()) + write('about/index.html', page_about()) + write('contact/index.html', page_contact()) + write('privacy-policy/index.html', page_privacy()) + write('terms/index.html', page_terms()) + write('404.html', page_404()) + + # robots + sitemap + pages = ['/', '/dad-joke-generator/', '/joke-of-the-day/', '/search/', '/about/', '/contact/', + '/privacy-policy/', '/terms/'] + ['/category/%s/' % c['slug'] for c in CATS] \ + + ['/topic/%s/' % t['slug'] for t in TOPICS if len(topic_jokes(t)) >= MIN_TOPIC_JOKES] + write('robots.txt', 'User-agent: *\nAllow: /\n\nSitemap: %s/sitemap.xml\n' % SITE_URL) + today = datetime.date.today().isoformat() + sm = ['', + ''] + for p in pages: + sm.append('%s%s%s%s%s' + % (SITE_URL, p, today, 'weekly' if p == '/' else 'monthly', '1.0' if p == '/' else '0.8')) + sm.append('') + write('sitemap.xml', '\n'.join(sm)) + + # RSS: dad joke of the day feed, last 21 days + from email.utils import formatdate + now_ts = datetime.datetime.utcnow().timestamp() + items = [] + for back in range(21): + d = datetime.date.today() - datetime.timedelta(days=back) + j = JOKES[d.toordinal() % len(JOKES)] + ts = now_ts - back * 86400 + items.append( + '%s%s/joke-of-the-day/?d=%s' + 'bjd-daily-%s' + '%s%s โ€” %s' + % (esc('Dad Joke of the Day โ€” %s' % d.strftime('%b %d')), SITE_URL, d.isoformat(), + d.isoformat(), formatdate(ts), esc(j['setup']), esc(j['punch']))) + rss = ('' + '%s โ€” Dad Joke of the Day' + '%s/joke-of-the-day/%s' + 'en-us%s' + % (esc(SITE_NAME), SITE_URL, esc(TAGLINE), ''.join(items))) + write('rss.xml', rss) + + # free JSON API + rnd = JOKES[(datetime.datetime.utcnow().microsecond // 1000) * len(JOKES) // 1000] + tod = JOKES[datetime.date.today().toordinal() % len(JOKES)] + def api_j(j): + return json.dumps({'setup': j['setup'], 'punchline': j['punch'], 'type': j.get('type', 'qa'), + 'category': j['cat'], + 'source': SITE_URL + '/category/%s/#joke-%d' % (j['cat'], j['id'])}, + ensure_ascii=False) + write('api/v1/random.json', api_j(rnd)) + write('api/v1/today.json', api_j(tod)) + + total = sum(os.path.getsize(os.path.join(dp, f)) for dp, dn, fn in os.walk(SITE_DIR) for f in fn) + nfiles = sum(len(fn) for dp, dn, fn in os.walk(SITE_DIR)) + print('Built %d files into %s (%d bytes)' % (nfiles, SITE_DIR, total)) + + +if __name__ == '__main__': + build() diff --git a/content/jokes.json b/content/jokes.json new file mode 100644 index 0000000..6956bff --- /dev/null +++ b/content/jokes.json @@ -0,0 +1,362 @@ +{ + "categories": [ + {"slug": "animals", "name": "Animal Dad Jokes", "emoji": "๐Ÿฆ", "blurb": "Paws-itively terrible animal puns that will make the whole zoo groan."}, + {"slug": "food", "name": "Food Dad Jokes", "emoji": "๐Ÿ•", "blurb": "Freshly baked food puns served with a side of eye-rolls."}, + {"slug": "work", "name": "Work & Office Dad Jokes", "emoji": "๐Ÿ’ผ", "blurb": "Watercooler-worthy workplace jokes for the 9-to-5 groan."}, + {"slug": "school", "name": "School & Teacher Dad Jokes", "emoji": "๐ŸŽ’", "blurb": "Class clown certified jokes for teachers, students and homework survivors."}, + {"slug": "sports", "name": "Sports Dad Jokes", "emoji": "โšฝ", "blurb": "Jokes that swing, dribble and score โ€” straight from the sidelines."}, + {"slug": "tech", "name": "Tech & Computer Dad Jokes", "emoji": "๐Ÿ’ป", "blurb": "404: good joke not found. Just kidding โ€” these are giggle-bytes."}, + {"slug": "family", "name": "Family & Parenting Dad Jokes", "emoji": "๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง", "blurb": "Certified dad behavior: jokes the whole family has to live with."}, + {"slug": "weather", "name": "Weather Dad Jokes", "emoji": "โ›…", "blurb": "Forecast: 100% chance of groans with scattered puns."}, + {"slug": "space", "name": "Space Dad Jokes", "emoji": "๐Ÿš€", "blurb": "Out-of-this-world jokes โ€” no astronaut training required."}, + {"slug": "travel", "name": "Travel & Vacation Dad Jokes", "emoji": "โœˆ๏ธ", "blurb": "Puns to pack on every trip, from Fin-land to Pencil-vania."}, + {"slug": "halloween", "name": "Halloween Dad Jokes", "emoji": "๐ŸŽƒ", "blurb": "Spook-tacular jokes that are scary bad (and that's the point)."}, + {"slug": "christmas", "name": "Christmas Dad Jokes", "emoji": "๐ŸŽ„", "blurb": "Ho-ho-horrible holiday jokes for the whole workshop."}, + {"slug": "knock-knock", "name": "Knock-Knock Jokes", "emoji": "๐Ÿšช", "blurb": "Who's there? The internet's best collection of knock-knock jokes."}, + {"slug": "one-liners", "name": "Dad Joke One-Liners", "emoji": "๐ŸŽค", "blurb": "Rapid-fire one-liners. Mic drop optional, groan guaranteed."} + ], + "jokes": [ + {"cat": "animals", "setup": "Why don't oysters share their pearls?", "punch": "Because they're shellfish."}, + {"cat": "animals", "setup": "What do you call a bear with no teeth?", "punch": "A gummy bear."}, + {"cat": "animals", "setup": "What do you call a sleeping bull?", "punch": "A bulldozer."}, + {"cat": "animals", "setup": "Why are fish so smart?", "punch": "Because they live in schools."}, + {"cat": "animals", "setup": "What do you call an alligator in a vest?", "punch": "An investigator."}, + {"cat": "animals", "setup": "What do you call a fish without eyes?", "punch": "A fsh."}, + {"cat": "animals", "setup": "What do you call a deer with no eyes?", "punch": "No eye deer."}, + {"cat": "animals", "setup": "What do you call a deer with no eyes and no legs?", "punch": "Still no eye deer."}, + {"cat": "animals", "setup": "Why do cows have hooves instead of feet?", "punch": "Because they lactose."}, + {"cat": "animals", "setup": "What did the buffalo say when his son left for college?", "punch": "Bison."}, + {"cat": "animals", "setup": "Why did the turtle cross the road?", "punch": "To get to the shell station."}, + {"cat": "animals", "setup": "Why do seagulls fly over the sea?", "punch": "Because if they flew over the bay, they'd be bagels."}, + {"cat": "animals", "setup": "What's a cat's favorite color?", "punch": "Purr-ple."}, + {"cat": "animals", "setup": "Why did the dog sit in the shade?", "punch": "Because he didn't want to be a hot dog."}, + {"cat": "animals", "setup": "What do you call a pig that does karate?", "punch": "A pork chop."}, + {"cat": "animals", "setup": "How do bees get to school?", "punch": "On the school buzz."}, + {"cat": "animals", "setup": "What do you call an owl that does magic tricks?", "punch": "Hoo-dini."}, + {"cat": "animals", "setup": "Why don't ducks tell jokes when they fly?", "punch": "Because they'd quack up."}, + {"cat": "animals", "setup": "What did the horse say when it tripped?", "punch": "Help! I've fallen and I can't giddyup!"}, + {"cat": "animals", "setup": "What do you call a snake wearing a hard hat?", "punch": "A boa constructor."}, + {"cat": "animals", "setup": "What's a frog's favorite type of shoes?", "punch": "Open-toad."}, + {"cat": "animals", "setup": "What do you call a crab that plays baseball?", "punch": "A pinch hitter."}, + {"cat": "animals", "setup": "What do you call a lazy kangaroo?", "punch": "A pouch potato."}, + {"cat": "animals", "setup": "How does a penguin build its house?", "punch": "Igloos it together."}, + {"cat": "animals", "setup": "How do you know if there's an elephant under your bed?", "punch": "Your nose touches the ceiling."}, + {"cat": "animals", "setup": "Why do cows wear bells?", "punch": "Because their horns don't work."}, + {"cat": "animals", "setup": "Why do seals swim in salt water?", "punch": "Because pepper water makes them sneeze."}, + {"cat": "animals", "setup": "How many tickles does it take to make an octopus laugh?", "punch": "Ten-tickles."}, + {"cat": "animals", "setup": "What do you call a magic dog?", "punch": "A labracadabrador."}, + + {"cat": "food", "setup": "Why did the tomato blush?", "punch": "Because it saw the salad dressing."}, + {"cat": "food", "setup": "What do you call a fake noodle?", "punch": "An impasta."}, + {"cat": "food", "setup": "Why did the cookie go to the doctor?", "punch": "Because it was feeling crummy."}, + {"cat": "food", "setup": "What did the grape do when it got stepped on?", "punch": "It let out a little wine."}, + {"cat": "food", "setup": "Why don't eggs tell jokes?", "punch": "They'd crack each other up."}, + {"cat": "food", "setup": "What do you call cheese that isn't yours?", "punch": "Nacho cheese."}, + {"cat": "food", "setup": "Why did the banana go to the doctor?", "punch": "It wasn't peeling well."}, + {"cat": "food", "setup": "What's orange and sounds like a parrot?", "punch": "A carrot."}, + {"cat": "food", "setup": "What does a lemon say when it answers the phone?", "punch": "Yellow!"}, + {"cat": "food", "setup": "What did one plate say to the other plate?", "punch": "Dinner's on me."}, + {"cat": "food", "setup": "Why did the yogurt go to the art exhibit?", "punch": "Because it was cultured."}, + {"cat": "food", "setup": "What do you call a sad strawberry?", "punch": "A blueberry."}, + {"cat": "food", "setup": "What did the baby corn say to the mama corn?", "punch": "Where's popcorn?"}, + {"cat": "food", "setup": "Why did the chef get arrested?", "punch": "He was caught beating an egg."}, + {"cat": "food", "setup": "What kind of room doesn't have doors?", "punch": "A mushroom."}, + {"cat": "food", "setup": "What did the lettuce say to the celery?", "punch": "Romaine calm."}, + {"cat": "food", "setup": "Why did the man put his money in the freezer?", "punch": "He wanted cold hard cash."}, + {"cat": "food", "setup": "What did the hamburger name its daughter?", "punch": "Patty."}, + {"cat": "food", "setup": "Why do bananas have to put on sunscreen at the beach?", "punch": "Otherwise they'd peel."}, + {"cat": "food", "setup": "Why did the pizzeria owner go out of business?", "punch": "He couldn't make enough dough."}, + {"cat": "food", "setup": "What do you call an avocado that's been blessed?", "punch": "Holy guacamole."}, + {"cat": "food", "setup": "Why did the coffee file a police report?", "punch": "It got mugged."}, + {"cat": "food", "setup": "What do you call a cow on a trampoline?", "punch": "A milkshake."}, + {"cat": "food", "setup": "Why did the melons plan a big wedding?", "punch": "Because they cantaloupe."}, + {"cat": "food", "setup": "What did the baby cookie's parents do when it cried?", "punch": "They felt crumby."}, + + {"cat": "work", "setup": "Why did the scarecrow win an award?", "punch": "He was outstanding in his field."}, + {"cat": "work", "setup": "Why did the employee get fired from the calendar factory?", "punch": "He took a couple of days off."}, + {"cat": "work", "setup": "My boss told me to have a good day.", "punch": "So I went home."}, + {"cat": "work", "setup": "Why did the banker quit his job?", "punch": "He lost interest."}, + {"cat": "work", "setup": "I used to work in a shoe recycling shop.", "punch": "It was sole destroying."}, + {"cat": "work", "setup": "I got fired from the orange juice factory.", "punch": "I couldn't concentrate."}, + {"cat": "work", "setup": "What did the janitor say when he jumped out of the supply closet?", "punch": "Supplies!"}, + {"cat": "work", "setup": "Why do employees drink so much coffee at work?", "punch": "It's the weekend immune system that keeps them going."}, + {"cat": "work", "setup": "I just got a job making clocks.", "punch": "It's about time."}, + {"cat": "work", "setup": "I used to be a tailor.", "punch": "Turns out I wasn't suited for it."}, + {"cat": "work", "setup": "I started a business making origami.", "punch": "Unfortunately, it folded."}, + {"cat": "work", "setup": "How's my job security?", "punch": "Rock solid โ€” nobody else wants it."}, + {"cat": "work", "setup": "Why did the pencil get a promotion?", "punch": "It was on point."}, + {"cat": "work", "setup": "I asked my boss for a raise.", "punch": "He said the elevator does that, and handed me a ladder."}, + {"cat": "work", "setup": "Why do bakers work so hard?", "punch": "Because they knead the dough."}, + {"cat": "work", "setup": "I quit my job at the helium factory.", "punch": "I refused to be spoken to in that tone."}, + {"cat": "work", "setup": "I got a job feeding the giraffes at the zoo.", "punch": "The pay is lousy, and it's a tall order."}, + {"cat": "work", "setup": "Why did the calendar apply for the job?", "punch": "It had a lot of dates."}, + {"cat": "work", "setup": "Retirement is the best job I've ever had.", "punch": "The pay is terrible, but the hours are great."}, + {"cat": "work", "setup": "My boss said: dress for the job you want, not the job you have.", "punch": "Now HR is asking why I came to work dressed as the boss."}, + + {"cat": "school", "setup": "Why did the student eat his homework?", "punch": "Because the teacher said it was a piece of cake."}, + {"cat": "school", "setup": "Why was the math book sad?", "punch": "It had too many problems."}, + {"cat": "school", "setup": "Why did the teacher wear sunglasses to school?", "punch": "Because her students were so bright."}, + {"cat": "school", "setup": "Who's the king of all school supplies?", "punch": "The ruler."}, + {"cat": "school", "setup": "Why did the student bring a ladder to school?", "punch": "He wanted to go to high school."}, + {"cat": "school", "setup": "Why was the equal sign so humble?", "punch": "It knew it wasn't less than or greater than anyone else."}, + {"cat": "school", "setup": "What do you call a teacher who never farts in public?", "punch": "A private tutor."}, + {"cat": "school", "setup": "Why did the music teacher need a ladder?", "punch": "To reach the high notes."}, + {"cat": "school", "setup": "What did the paper say to the pencil?", "punch": "Write on!"}, + {"cat": "school", "setup": "Why did the kid study in the airplane?", "punch": "He wanted a higher education."}, + {"cat": "school", "setup": "Why was the geometry book so adorable?", "punch": "It had acute angles."}, + {"cat": "school", "setup": "What's a math teacher's favorite tree?", "punch": "Geome-tree."}, + {"cat": "school", "setup": "The past, the present, and the future walked into class.", "punch": "It was tense."}, + {"cat": "school", "setup": "Why did the clock get in trouble at school?", "punch": "It kept tocking back."}, + {"cat": "school", "setup": "Why don't you see giraffes in elementary school?", "punch": "They're all in high school."}, + {"cat": "school", "setup": "Why did the geography teacher love the ocean?", "punch": "It was full of currents."}, + {"cat": "school", "setup": "Teacher: 'Name two pronouns.'", "punch": "Student: 'Who, me?'"}, + {"cat": "school", "setup": "Why do calculators make great friends?", "punch": "You can always count on them."}, + {"cat": "school", "setup": "What's a pirate's favorite subject?", "punch": "ARRRR-t."}, + {"cat": "school", "setup": "Why did the kid throw butter out the window?", "punch": "He wanted to see a butter fly."}, + {"cat": "school", "setup": "Why did the child cross the playground?", "punch": "To get to the other slide."}, + + {"cat": "sports", "setup": "Why did the golfer bring two pairs of pants?", "punch": "In case he got a hole in one."}, + {"cat": "sports", "setup": "Why did the bicycle fall over?", "punch": "It was two-tired."}, + {"cat": "sports", "setup": "Why can't basketball players go on vacation?", "punch": "They'd get called for traveling."}, + {"cat": "sports", "setup": "Why did the football coach go to the bank?", "punch": "To get his quarterback."}, + {"cat": "sports", "setup": "What's a runner's favorite subject?", "punch": "Jog-raphy."}, + {"cat": "sports", "setup": "Why did the soccer player bring string to the game?", "punch": "So he could tie the score."}, + {"cat": "sports", "setup": "Why don't prisoners play tennis?", "punch": "Too many serves."}, + {"cat": "sports", "setup": "Why did the baseball player get arrested?", "punch": "He stole second base."}, + {"cat": "sports", "setup": "Why are basketball courts always wet?", "punch": "Because the players dribble."}, + {"cat": "sports", "setup": "What's the difference between a bad golfer and a bad skydiver?", "punch": "A bad golfer goes WHACK... dang! A bad skydiver goes dang!... WHACK."}, + {"cat": "sports", "setup": "I asked the marathon runner how the race went.", "punch": "He said it was a long story."}, + {"cat": "sports", "setup": "What does a hockey player have in common with a magician?", "punch": "Hat tricks."}, + {"cat": "sports", "setup": "Why was the baseball stadium so cool?", "punch": "Because it was full of fans."}, + {"cat": "sports", "setup": "I told my personal trainer I wanted to learn to do the splits.", "punch": "She asked: 'How flexible are you?' I said: 'I can't make Tuesdays.'"}, + {"cat": "sports", "setup": "Why did the golfer bring an extra sock?", "punch": "In case he got a hole in one."}, + + {"cat": "tech", "setup": "Why do programmers prefer dark mode?", "punch": "Because light attracts bugs."}, + {"cat": "tech", "setup": "Why did the computer go to the doctor?", "punch": "It caught a virus."}, + {"cat": "tech", "setup": "Why did the computer show up late to work?", "punch": "It had a hard drive."}, + {"cat": "tech", "setup": "Why was the smartphone wearing glasses?", "punch": "It lost all its contacts."}, + {"cat": "tech", "setup": "What do you call 8 hobbits?", "punch": "A hobbyte."}, + {"cat": "tech", "setup": "Why did the developer go broke?", "punch": "He used up all his cache."}, + {"cat": "tech", "setup": "Why do Java developers wear glasses?", "punch": "Because they don't C#."}, + {"cat": "tech", "setup": "What do you call a computer that sings?", "punch": "A Dell."}, + {"cat": "tech", "setup": "What did the mouse say to the keyboard?", "punch": "You're just my type."}, + {"cat": "tech", "setup": "Why did the robot go on vacation?", "punch": "He needed to recharge."}, + {"cat": "tech", "setup": "What's a computer's favorite snack?", "punch": "Microchips."}, + {"cat": "tech", "setup": "Why did the Wi-Fi go to therapy?", "punch": "It felt disconnected."}, + {"cat": "tech", "setup": "How does a computer get drunk?", "punch": "It takes screenshots."}, + {"cat": "tech", "setup": "Why did the PowerPoint presentation cross the road?", "punch": "To get to the other slide."}, + {"cat": "tech", "setup": "How many programmers does it take to change a light bulb?", "punch": "None โ€” that's a hardware problem."}, + {"cat": "tech", "setup": "Why was the JavaScript developer sad?", "punch": "He didn't Node how to Express himself."}, + {"cat": "tech", "setup": "What did the router say to the doctor?", "punch": "It hurts when IP."}, + {"cat": "tech", "setup": "Why do keyboards never sleep?", "punch": "They have two shifts."}, + {"cat": "tech", "setup": "I would tell you a UDP joke...", "punch": "...but you might not get it."}, + + {"cat": "family", "setup": "Kid: 'Dad, can you put my shoes on?'", "punch": "Dad: 'No, they don't fit me.'"}, + {"cat": "family", "setup": "Kid: 'Dad, make me a sandwich!'", "punch": "Dad: 'Poof! You're a sandwich.'"}, + {"cat": "family", "setup": "Why did the dad bring a pencil to bed?", "punch": "To draw the curtains."}, + {"cat": "family", "setup": "Why did grandpa put wheels on his rocking chair?", "punch": "He wanted to rock and roll."}, + {"cat": "family", "setup": "What did the mother rope say to the child rope?", "punch": "Don't be knotty."}, + {"cat": "family", "setup": "Why did the toddler put sugar under his pillow?", "punch": "He wanted sweet dreams."}, + {"cat": "family", "setup": "Kid: 'Dad, how do I look?'", "punch": "Dad: 'With your eyes.'"}, + {"cat": "family", "setup": "I used to play piano by ear.", "punch": "Now I use my hands."}, + {"cat": "family", "setup": "Kid: 'Dad, can you tell me what a solar eclipse is?'", "punch": "Dad: 'No sun.'"}, + {"cat": "family", "setup": "Why did the baby strawberry cry?", "punch": "Its parents were in a jam."}, + {"cat": "family", "setup": "Kid: 'I'm cold.'", "punch": "Dad: 'Go stand in the corner โ€” it's 90 degrees.'"}, + {"cat": "family", "setup": "Why did the dad stare at the carton of orange juice?", "punch": "Because it said 'concentrate.'"}, + {"cat": "family", "setup": "What did the baby computer call its parent?", "punch": "Data."}, + {"cat": "family", "setup": "Why did the cookie cry in kindergarten?", "punch": "His mom had been a wafer too long."}, + + {"cat": "weather", "setup": "What does a cloud wear under its raincoat?", "punch": "Thunderwear."}, + {"cat": "weather", "setup": "What did one raindrop say to the other?", "punch": "Two's company, three's a cloud."}, + {"cat": "weather", "setup": "What do you call it when it rains chickens and ducks?", "punch": "Fowl weather."}, + {"cat": "weather", "setup": "I tried to catch some fog earlier.", "punch": "I mist."}, + {"cat": "weather", "setup": "What does the wind say on Valentine's Day?", "punch": "I'm a big fan of yours."}, + {"cat": "weather", "setup": "Why did the sun go to school?", "punch": "To get brighter."}, + {"cat": "weather", "setup": "What falls in winter but never gets hurt?", "punch": "Snow."}, + {"cat": "weather", "setup": "Why did the weather want privacy?", "punch": "It was changing."}, + {"cat": "weather", "setup": "What's a tornado's favorite game?", "punch": "Twister."}, + {"cat": "weather", "setup": "What do snowmen call their offspring?", "punch": "Chill-dren."}, + {"cat": "weather", "setup": "What's a rainbow's favorite accessory?", "punch": "A bow-tie."}, + {"cat": "weather", "setup": "Why don't mountains ever get cold in winter?", "punch": "They wear snowcaps."}, + {"cat": "weather", "setup": "What do you get when you leave a dog out in the cold?", "punch": "A chili dog."}, + {"cat": "weather", "setup": "The forecast said it would rain cats and dogs.", "punch": "I went outside and stepped in a poodle."}, + + {"cat": "space", "setup": "How does the moon cut its hair?", "punch": "Eclipse it."}, + {"cat": "space", "setup": "How do you organize a party in space?", "punch": "You planet."}, + {"cat": "space", "setup": "Why is the moon always broke?", "punch": "It's down to its last quarter."}, + {"cat": "space", "setup": "What do you call an alien with three eyes?", "punch": "An aliiien."}, + {"cat": "space", "setup": "Why did the astronaut break up with his girlfriend?", "punch": "He needed space."}, + {"cat": "space", "setup": "What kind of music do planets listen to?", "punch": "Neptunes."}, + {"cat": "space", "setup": "What did Saturn say to Jupiter?", "punch": "Give me a ring sometime."}, + {"cat": "space", "setup": "What do astronauts use to keep their pants up?", "punch": "An asteroid belt."}, + {"cat": "space", "setup": "Why aren't astronauts hungry after they blast off?", "punch": "Because they've had a big launch."}, + {"cat": "space", "setup": "What's an astronaut's favorite part of a computer?", "punch": "The space bar."}, + {"cat": "space", "setup": "Why did the cow become an astronaut?", "punch": "To see the moooon."}, + {"cat": "space", "setup": "What do you call a space magician?", "punch": "A flying saucerer."}, + {"cat": "space", "setup": "Why couldn't the astronaut book a hotel room on the moon?", "punch": "Because it was full."}, + {"cat": "space", "setup": "How do astronauts serve their dinner?", "punch": "On flying saucers."}, + + {"cat": "travel", "setup": "What do you call a mountain that's really funny?", "punch": "Hill-arious."}, + {"cat": "travel", "setup": "Why did the airplane get sent to its room?", "punch": "For bad altitude."}, + {"cat": "travel", "setup": "Why did the car apply for a job?", "punch": "It was tired of sitting idle."}, + {"cat": "travel", "setup": "What did the beach say as the tide came in?", "punch": "Long time, no sea."}, + {"cat": "travel", "setup": "Where do sharks go on vacation?", "punch": "Fin-land."}, + {"cat": "travel", "setup": "Where do pencils go on vacation?", "punch": "Pencil-vania."}, + {"cat": "travel", "setup": "What do you call a train that sneezes?", "punch": "Achoo-choo train."}, + {"cat": "travel", "setup": "Why did the man bring a ladder to the airport?", "punch": "He heard the fares were sky high."}, + {"cat": "travel", "setup": "Why did the suitcase go to therapy?", "punch": "It had too much baggage."}, + {"cat": "travel", "setup": "Where do sick boats go?", "punch": "To the dock."}, + {"cat": "travel", "setup": "What's the fastest country in the world?", "punch": "Rush-a."}, + {"cat": "travel", "setup": "What's the fastest vegetable?", "punch": "A runner bean."}, + {"cat": "travel", "setup": "What did the ocean say to the beach?", "punch": "Nothing โ€” it just waved."}, + {"cat": "travel", "setup": "Where do math teachers go on vacation?", "punch": "Times Square."}, + {"cat": "travel", "setup": "Why don't calendars ever take a vacation?", "punch": "Their days are numbered."}, + + {"cat": "halloween", "setup": "Why don't skeletons ever fight each other?", "punch": "They don't have the guts."}, + {"cat": "halloween", "setup": "What do you call a witch's garage?", "punch": "A broom closet."}, + {"cat": "halloween", "setup": "Why did the vampire subscribe to the newspaper?", "punch": "He heard it had great circulation."}, + {"cat": "halloween", "setup": "What's a ghost's favorite dessert?", "punch": "I scream."}, + {"cat": "halloween", "setup": "Why don't mummies take vacations?", "punch": "They're afraid to unwind."}, + {"cat": "halloween", "setup": "What do you call a monster who poisons corn flakes?", "punch": "A cereal killer."}, + {"cat": "halloween", "setup": "Why are ghosts such bad liars?", "punch": "You can see right through them."}, + {"cat": "halloween", "setup": "What do you get when you cross a snowman with a vampire?", "punch": "Frostbite."}, + {"cat": "halloween", "setup": "Why did the skeleton go to the party alone?", "punch": "He had no body to go with him."}, + {"cat": "halloween", "setup": "What kind of music do mummies listen to?", "punch": "Wrap music."}, + {"cat": "halloween", "setup": "What did the skeleton order at the restaurant?", "punch": "Spare ribs."}, + {"cat": "halloween", "setup": "Why do witches ride brooms?", "punch": "Vacuum cleaners are too expensive."}, + {"cat": "halloween", "setup": "What do you call a haunted chicken?", "punch": "A poultry-geist."}, + {"cat": "halloween", "setup": "Why did the ghost go to the bar?", "punch": "For the boos."}, + {"cat": "halloween", "setup": "How do you make a skeleton laugh?", "punch": "Tickle its funny bone."}, + {"cat": "halloween", "setup": "What's a vampire's favorite fruit?", "punch": "A blood orange."}, + + {"cat": "christmas", "setup": "What do you call Santa's little helpers?", "punch": "Subordinate Clauses."}, + {"cat": "christmas", "setup": "What do you call Santa when he takes a break?", "punch": "Santa Pause."}, + {"cat": "christmas", "setup": "What do snowmen eat for breakfast?", "punch": "Snowflakes."}, + {"cat": "christmas", "setup": "What did one snowman say to the other snowman?", "punch": "Do you smell carrots?"}, + {"cat": "christmas", "setup": "Why does Santa go down the chimney?", "punch": "Because it soots him."}, + {"cat": "christmas", "setup": "What do you get when you cross Santa with a duck?", "punch": "A Christmas quacker."}, + {"cat": "christmas", "setup": "Why did the Christmas tree go to the barber?", "punch": "It needed a trim."}, + {"cat": "christmas", "setup": "What do elves learn in school?", "punch": "The elf-abet."}, + {"cat": "christmas", "setup": "What's every parent's favorite Christmas carol?", "punch": "Silent Night."}, + {"cat": "christmas", "setup": "What do you call an old snowman?", "punch": "Water."}, + {"cat": "christmas", "setup": "Why are Christmas trees so bad at knitting?", "punch": "They always drop their needles."}, + {"cat": "christmas", "setup": "What does the gingerbread man use to make his bed?", "punch": "Cookie sheets."}, + {"cat": "christmas", "setup": "Why did Rudolph get a bad report card?", "punch": "Because he went down in history."}, + {"cat": "christmas", "setup": "What do you sing at a snowman's birthday party?", "punch": "Freeze a jolly good fellow."}, + {"cat": "christmas", "setup": "What's a Christmas tree's favorite candy?", "punch": "Orna-mints."}, + + {"cat": "knock-knock", "type": "knock", "setup": "Knock knock.\nWho's there?\nBoo.\nBoo who?", "punch": "Don't cry โ€” it's just a joke!"}, + {"cat": "knock-knock", "type": "knock", "setup": "Knock knock.\nWho's there?\nLettuce.\nLettuce who?", "punch": "Lettuce in, it's freezing out here!"}, + {"cat": "knock-knock", "type": "knock", "setup": "Knock knock.\nWho's there?\nCargo.\nCargo who?", "punch": "No โ€” car go vroom vroom!"}, + {"cat": "knock-knock", "type": "knock", "setup": "Knock knock.\nWho's there?\nTank.\nTank who?", "punch": "You're welcome!"}, + {"cat": "knock-knock", "type": "knock", "setup": "Knock knock.\nWho's there?\nInterrupting cow.\nInterrupting cโ€”", "punch": "MOO!"}, + {"cat": "knock-knock", "type": "knock", "setup": "Knock knock.\nWho's there?\nHarry.\nHarry who?", "punch": "Harry up and open the door!"}, + {"cat": "knock-knock", "type": "knock", "setup": "Knock knock.\nWho's there?\nOlive.\nOlive who?", "punch": "Olive you and I miss you!"}, + {"cat": "knock-knock", "type": "knock", "setup": "Knock knock.\nWho's there?\nCandice.\nCandice who?", "punch": "Candice door open, or what?"}, + {"cat": "knock-knock", "type": "knock", "setup": "Knock knock.\nWho's there?\nAtch.\nAtch who?", "punch": "Bless you!"}, + {"cat": "knock-knock", "type": "knock", "setup": "Knock knock.\nWho's there?\nAmish.\nAmish who?", "punch": "Aww โ€” I miss you too!"}, + {"cat": "knock-knock", "type": "knock", "setup": "Knock knock.\nWho's there?\nEurope.\nEurope who?", "punch": "No, YOU'RE a poo!"}, + {"cat": "knock-knock", "type": "knock", "setup": "Knock knock.\nWho's there?\nJustin.\nJustin who?", "punch": "Justin time for dinner!"}, + {"cat": "knock-knock", "type": "knock", "setup": "Knock knock.\nWho's there?\nDwayne.\nDwayne who?", "punch": "Dwayne the bathtub, I'm dwowning!"}, + {"cat": "knock-knock", "type": "knock", "setup": "Knock knock.\nWho's there?\nKen.\nKen who?", "punch": "Ken you open the door, please?"}, + {"cat": "knock-knock", "type": "knock", "setup": "Knock knock.\nWho's there?\nAlpaca.\nAlpaca who?", "punch": "Alpaca the suitcase, you load up the car!"}, + {"cat": "knock-knock", "type": "knock", "setup": "Knock knock.\nWho's there?\nAnita.\nAnita who?", "punch": "Anita borrow your pencil!"}, + {"cat": "knock-knock", "type": "knock", "setup": "Knock knock.\nWho's there?\nGorilla.\nGorilla who?", "punch": "Gorilla cheese sandwich for me, I'm starving!"}, + {"cat": "knock-knock", "type": "knock", "setup": "Knock knock.\nWho's there?\nNobel.\nNobel who?", "punch": "No bell โ€” that's why I knocked!"}, + {"cat": "knock-knock", "type": "knock", "setup": "Knock knock.\nWho's there?\nDoris.\nDoris who?", "punch": "Doris locked โ€” that's why I'm knocking!"}, + {"cat": "knock-knock", "type": "knock", "setup": "Knock knock.\nWho's there?\nAardvark.\nAardvark who?", "punch": "Aardvark a hundred miles for one of your smiles!"}, + + {"cat": "one-liners", "type": "line", "setup": "I'm reading a book about anti-gravity.", "punch": "I just can't put it down."}, + {"cat": "one-liners", "type": "line", "setup": "I used to hate facial hair.", "punch": "Then it grew on me."}, + {"cat": "one-liners", "type": "line", "setup": "What's brown and sticky?", "punch": "A stick."}, + {"cat": "one-liners", "type": "line", "setup": "I told my wife she was drawing her eyebrows too high.", "punch": "She looked surprised."}, + {"cat": "one-liners", "type": "line", "setup": "I don't trust stairs.", "punch": "They're always up to something."}, + {"cat": "one-liners", "type": "line", "setup": "I'm on a seafood diet.", "punch": "I see food and I eat it."}, + {"cat": "one-liners", "type": "line", "setup": "What do you call a fish wearing a bowtie?", "punch": "Sofishticated."}, + {"cat": "one-liners", "type": "line", "setup": "I stayed up all night wondering where the sun went.", "punch": "Then it dawned on me."}, + {"cat": "one-liners", "type": "line", "setup": "I'd tell you a construction joke...", "punch": "...but I'm still working on it."}, + {"cat": "one-liners", "type": "line", "setup": "I know a lot of jokes about retired people.", "punch": "Sadly, none of them work."}, + {"cat": "one-liners", "type": "line", "setup": "I ordered a chicken and an egg from an online store.", "punch": "I'll let you know."}, + {"cat": "one-liners", "type": "line", "setup": "What time did the man go to the dentist?", "punch": "Tooth hurty."}, + {"cat": "one-liners", "type": "line", "setup": "Did you hear about the kidnapping at school?", "punch": "It's fine โ€” he woke up."}, + {"cat": "one-liners", "type": "line", "setup": "What do you call a boomerang that doesn't come back?", "punch": "A stick."}, + {"cat": "one-liners", "type": "line", "setup": "I only know 25 letters of the alphabet.", "punch": "I don't know y."}, + {"cat": "one-liners", "type": "line", "setup": "Did you hear about the restaurant on the moon?", "punch": "Great food, no atmosphere."}, + {"cat": "one-liners", "type": "line", "setup": "Why do we tell actors to 'break a leg'?", "punch": "Because every play has a cast."}, + {"cat": "one-liners", "type": "line", "setup": "What do you call a factory that makes okay products?", "punch": "A satisfactory."}, + {"cat": "one-liners", "type": "line", "setup": "Dear algebra,", "punch": "Stop asking us to find your X. She's never coming back โ€” and don't ask Y."}, + {"cat": "one-liners", "type": "line", "setup": "What's the difference between ignorance and apathy?", "punch": "I don't know and I don't care."}, + {"cat": "one-liners", "type": "line", "setup": "I asked my dog what's two minus two.", "punch": "He said nothing."}, + {"cat": "one-liners", "type": "line", "setup": "What do you call a parade of rabbits hopping backwards?", "punch": "A receding hare-line."}, + {"cat": "one-liners", "type": "line", "setup": "What do you call a sleeping dinosaur?", "punch": "A dino-snore."}, + {"cat": "one-liners", "type": "line", "setup": "What do you call a man with a rubber toe?", "punch": "Roberto."}, + {"cat": "one-liners", "type": "line", "setup": "Why did the two 4s skip dinner?", "punch": "They already 8."}, + {"cat": "one-liners", "type": "line", "setup": "What do you call a sheep with no legs?", "punch": "A cloud."}, + {"cat": "one-liners", "type": "line", "setup": "Why did the picture go to jail?", "punch": "Because it was framed."}, + {"cat": "one-liners", "type": "line", "setup": "What did the man say when he walked into a bar?", "punch": "Ouch."}, + {"cat": "one-liners", "type": "line", "setup": "Why did the man fall down the well?", "punch": "He couldn't see that well."}, + {"cat": "one-liners", "type": "line", "setup": "What's red and bad for your teeth?", "punch": "A brick."}, + {"cat": "one-liners", "type": "line", "setup": "Why was 6 afraid of 7?", "punch": "Because 7 8 9."}, + {"cat": "one-liners", "type": "line", "setup": "What did the zero say to the eight?", "punch": "Nice belt."}, + {"cat": "one-liners", "type": "line", "setup": "Why can't your nose be 12 inches long?", "punch": "Because then it would be a foot."}, + {"cat": "one-liners", "type": "line", "setup": "I'm terrified of elevators.", "punch": "So I'm taking steps to avoid them."}, + {"cat": "one-liners", "type": "line", "setup": "Why don't scientists trust atoms?", "punch": "Because they make up everything."}, + {"cat": "one-liners", "type": "line", "setup": "What did the Buddhist monk say to the hot dog vendor?", "punch": "Make me one with everything."}, + + {"cat": "food", "setup": "What do you call a sad cup of coffee?", "punch": "A depres-so."}, + {"cat": "food", "setup": "How do coffee cups show their love?", "punch": "With mugs and kisses."}, + {"cat": "food", "setup": "Where do coffee beans go for a night out?", "punch": "The coffee bar."}, + {"cat": "food", "setup": "Why was the espresso checking its watch?", "punch": "It was pressed for time."}, + {"cat": "food", "setup": "What's a coffee's favorite magic spell?", "punch": "Espresso Patronum!"}, + {"cat": "food", "setup": "Why don't coffees ever gossip?", "punch": "They don't want to spill the beans."}, + {"cat": "food", "setup": "How does coffee show it cares?", "punch": "It gives you a latte attention."}, + + {"cat": "animals", "setup": "What do you call a pile of kittens?", "punch": "A meow-ntain."}, + {"cat": "animals", "setup": "Why don't cats play poker in the jungle?", "punch": "Too many cheetahs."}, + {"cat": "animals", "setup": "What's a cat's favorite dessert?", "punch": "Mice cream."}, + {"cat": "animals", "setup": "Why did the cat sit on the computer?", "punch": "To keep an eye on the mouse."}, + {"cat": "animals", "setup": "What do you call a cat that works at a hospital?", "punch": "A purr-fessional."}, + {"cat": "animals", "setup": "How do cats end a fight?", "punch": "They hiss and make up."}, + {"cat": "animals", "setup": "Why is everyone so excited about the cat's new job?", "punch": "Because it's feline good."}, + {"cat": "animals", "setup": "Why did the dog cross the road?", "punch": "To get to the barking lot."}, + {"cat": "animals", "setup": "What kind of dog loves surround sound?", "punch": "A subwoofer."}, + {"cat": "animals", "setup": "Why do dogs run in circles?", "punch": "Because it's too hard to run in squares."}, + {"cat": "animals", "setup": "What's a dog's favorite instrument?", "punch": "The trom-BONE."}, + {"cat": "animals", "setup": "How did the puppy feel after finishing its homework?", "punch": "Ruff."}, + {"cat": "animals", "setup": "Why did the dachshund sit by the fire?", "punch": "It was a cold dog."}, + {"cat": "animals", "setup": "What breed of dog can jump higher than a house?", "punch": "Any breed โ€” houses can't jump."}, + + {"cat": "work", "setup": "Why did the penny get promoted?", "punch": "It made perfect cents."}, + {"cat": "work", "setup": "What do you call a rich fish?", "punch": "A goldfish."}, + {"cat": "work", "setup": "Why did the dollar bill break up with the coin?", "punch": "It needed some change."}, + {"cat": "work", "setup": "What happened to the man who put $20 into a vending machine?", "punch": "Nothing โ€” he's still waiting for his two cents."}, + {"cat": "work", "setup": "Why was the money exhausted?", "punch": "It was spent."}, + {"cat": "work", "setup": "Where do cows invest their money?", "punch": "In moo-tual funds."}, + + {"cat": "one-liners", "type": "line", "setup": "What's a nap's favorite kind of movie?", "punch": "A sleeper hit."}, + {"cat": "one-liners", "type": "line", "setup": "Why did the pillow go to the doctor?", "punch": "It was feeling down."}, + {"cat": "one-liners", "type": "line", "setup": "Why are blankets so good at ending arguments?", "punch": "They know how to wrap things up."}, + {"cat": "one-liners", "type": "line", "setup": "I'm great at sleeping.", "punch": "I can do it with my eyes closed."}, + {"cat": "one-liners", "type": "line", "setup": "Why was everyone so tired on the morning of April 1st?", "punch": "They'd just finished a 31-day March."}, + + {"cat": "family", "setup": "Why did the two antennas get married?", "punch": "The ceremony was okay, but the reception was excellent."}, + {"cat": "family", "setup": "What did the paper clip say to the magnet?", "punch": "I find you very attractive."}, + {"cat": "family", "setup": "What's the most romantic part about the ocean?", "punch": "When the buoy meets gull."}, + {"cat": "family", "setup": "Kid: 'Do you have a date for Valentine's Day?'", "punch": "Dad: 'Sure โ€” February 14th.'"}, + {"cat": "family", "setup": "My wife told me to stop impersonating a flamingo.", "punch": "I had to put my foot down."}, + {"cat": "family", "setup": "Why do candles love birthdays?", "punch": "They get to be the light of the party."}, + {"cat": "family", "setup": "What did the elephant want for its birthday?", "punch": "A trunk full of presents."}, + {"cat": "family", "setup": "Why was the birthday cake as hard as a rock?", "punch": "It was marble cake."}, + {"cat": "family", "setup": "What does a clam do on its birthday?", "punch": "It shellabrates."}, + {"cat": "family", "setup": "What did the pirate say on his 80th birthday?", "punch": "Aye matey!"}, + + {"cat": "food", "setup": "What does an aardvark like on its pizza?", "punch": "Ant-chovies."}, + {"cat": "food", "setup": "Why did the hipster burn his tongue on his pizza?", "punch": "He ate it before it was cool."}, + {"cat": "food", "setup": "What kind of pizza do dogs order?", "punch": "Pup-peroni."}, + {"cat": "food", "setup": "What's the difference between a pizza and my pizza jokes?", "punch": "The pizza can actually feed a family."}, + + {"cat": "weather", "setup": "How does a snowman get around town?", "punch": "On an icicle."}, + {"cat": "weather", "setup": "What did the icy road say to the truck?", "punch": "Want to go for a spin?"}, + {"cat": "weather", "setup": "How do you prevent a summer cold?", "punch": "Catch it in the winter."} + ] +} diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..7279fcb --- /dev/null +++ b/deploy.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# Build sites and sync docroots IN PLACE (no dir swap: hostPath mounts bind to +# the directory inode, so replacing the dir would leave pods serving a stale +# path). Routing/TLS are handled by Traefik + cert-manager; no reloads needed. +set -euo pipefail +cd "$(dirname "$0")" +BASE=/home/opc/zai-home-base + +echo "==> building site" +python3 build.py + +mkdir -p "$BASE/sites/bestdadjokes" +if command -v getenforce >/dev/null 2>&1 && [ "$(getenforce)" = "Enforcing" ]; then + chcon -Rt container_file_t "$BASE/sites/bestdadjokes" 2>/dev/null || true +fi +rsync -a --delete site/ "$BASE/sites/bestdadjokes/" + +echo "==> verifying through Traefik (origin)" +sleep 1 +for host in bestdadjokes.lol www.bestdadjokes.lol myadhd.dev; do + code=$(curl -sk -o /dev/null -w '%{http_code}' --resolve "$host:443:127.0.0.1" "https://$host/" --max-time 10) + echo " https://$host -> $code (origin)" +done + +echo "==> asset smoke checks" +fail=0 +hp=$(curl -sk --resolve bestdadjokes.lol:443:127.0.0.1 https://bestdadjokes.lol/ --max-time 10) +echo "$hp" | grep -q 'rel="stylesheet"' || { echo " FAIL: stylesheet not linked in homepage"; fail=1; } +for asset in /static/style.css /static/main.js /static/jokes-data.js /static/favicon.svg; do + out=$(curl -sk -o /dev/null -w '%{http_code} %{content_type}' --resolve bestdadjokes.lol:443:127.0.0.1 "https://bestdadjokes.lol$asset" --max-time 10) + echo " $asset -> $out" + case "$out" in 200*) ;; *) fail=1 ;; esac +done +# every referenced local asset must exist (catches missing files) +echo "$hp" | grep -oE '(src|href)="/[^"]+"' | sed -E 's/(src|href)="([^"]+)"/\2/' | sort -u | while read -r ref; do + case "$ref" in //*) continue ;; esac + code=$(curl -sk -o /dev/null -w '%{http_code}' --resolve bestdadjokes.lol:443:127.0.0.1 "https://bestdadjokes.lol$ref" --max-time 10) + [ "$code" = "200" ] || echo " WARN: referenced asset $ref -> $code" +done +[ "$fail" = "0" ] || { echo "==> DEPLOY FAILED ASSET CHECKS"; exit 1; } +echo "==> deploy complete" diff --git a/k8s/letsencrypt-issuer.yaml b/k8s/letsencrypt-issuer.yaml new file mode 100644 index 0000000..8bc9b20 --- /dev/null +++ b/k8s/letsencrypt-issuer.yaml @@ -0,0 +1,25 @@ +# Let's Encrypt via cert-manager, DNS-01 through the Cloudflare API token. +# The token lives in Secret cert-manager/cloudflare-api-token (created out-of-band +# via `kubectl create secret ... --from-file=api-token=...`; never committed). +apiVersion: cert-manager.io/v1 +kind: ClusterIssuer +metadata: + name: letsencrypt-prod +spec: + acme: + server: https://acme-v02.api.letsencrypt.org/directory + email: hello@bestdadjokes.lol + privateKeySecretRef: + name: letsencrypt-prod-account-key + solvers: + - dns01: + cloudflare: + apiTokenSecretRef: + name: cloudflare-api-token + key: api-token + selector: + dnsZones: + - bestdadjokes.lol + - myadhd.dev + - helpme.tips + - ch4t.buzz diff --git a/k8s/static-sites.yaml b/k8s/static-sites.yaml new file mode 100644 index 0000000..4a5ce32 --- /dev/null +++ b/k8s/static-sites.yaml @@ -0,0 +1,262 @@ +# Static site fleet: one nginx Deployment + Service + Ingress + Certificate per site. +# Docroots come from hostPath /home/opc/zai-home-base/sites/ (built by deploy scripts). +# Edge routing/TLS: Traefik (80/443) + cert-manager Let's Encrypt secrets. +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: static-nginx-conf +data: + nginx.conf: | + worker_processes 1; + error_log /dev/stderr warn; + pid /run/nginx.pid; + events { worker_connections 1024; } + http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + access_log /dev/stdout; + sendfile on; + gzip on; + gzip_types text/plain text/css application/javascript application/json application/xml image/svg+xml; + gzip_min_length 1024; + server { + listen 80; + root /usr/share/nginx/html; + index index.html; + error_page 404 /404.html; + add_header X-Content-Type-Options nosniff always; + add_header Referrer-Policy strict-origin-when-cross-origin always; + location ~* \.(css|js|svg|png|jpg|ico|woff2?)$ { + expires 7d; + add_header Cache-Control "public"; + } + location / { + try_files $uri $uri/ $uri/index.html =404; + } + } + } +--- +# ---------------- bestdadjokes.lol ---------------- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: static-bdj + labels: + site: bestdadjokes.lol +spec: + replicas: 1 + selector: + matchLabels: + site: bestdadjokes.lol + template: + metadata: + labels: + site: bestdadjokes.lol + spec: + nodeSelector: + kubernetes.io/hostname: djg-oracle-sl + tolerations: + - key: node-role.kubernetes.io/master + operator: Exists + effect: NoSchedule + - key: node-role.kubernetes.io/control-plane + operator: Exists + effect: NoSchedule + containers: + - name: nginx + image: nginx:alpine + volumeMounts: + - name: conf + mountPath: /etc/nginx/nginx.conf + subPath: nginx.conf + readOnly: true + - name: html + mountPath: /usr/share/nginx/html + readOnly: true + resources: + requests: + cpu: 20m + memory: 32Mi + limits: + memory: 128Mi + readinessProbe: + httpGet: {path: /, port: 80} + initialDelaySeconds: 2 + periodSeconds: 20 + volumes: + - name: conf + configMap: + name: static-nginx-conf + - name: html + hostPath: + path: /home/opc/zai-home-base/sites/bestdadjokes + type: Directory +--- +apiVersion: v1 +kind: Service +metadata: + name: static-bdj +spec: + selector: + site: bestdadjokes.lol + ports: + - port: 80 + targetPort: 80 +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: bestdadjokes +spec: + rules: + - host: bestdadjokes.lol + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: static-bdj + port: + number: 80 + - host: www.bestdadjokes.lol + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: static-bdj + port: + number: 80 + tls: + - hosts: + - bestdadjokes.lol + - www.bestdadjokes.lol + secretName: bestdadjokes-tls +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: bestdadjokes-lol +spec: + secretName: bestdadjokes-tls + issuerRef: + name: letsencrypt-prod + kind: ClusterIssuer + dnsNames: + - bestdadjokes.lol + - www.bestdadjokes.lol +--- +# ---------------- myadhd.dev (placeholder) ---------------- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: static-adhd + labels: + site: myadhd.dev +spec: + replicas: 1 + selector: + matchLabels: + site: myadhd.dev + template: + metadata: + labels: + site: myadhd.dev + spec: + nodeSelector: + kubernetes.io/hostname: djg-oracle-sl + tolerations: + - key: node-role.kubernetes.io/master + operator: Exists + effect: NoSchedule + - key: node-role.kubernetes.io/control-plane + operator: Exists + effect: NoSchedule + containers: + - name: nginx + image: nginx:alpine + volumeMounts: + - name: conf + mountPath: /etc/nginx/nginx.conf + subPath: nginx.conf + readOnly: true + - name: html + mountPath: /usr/share/nginx/html + readOnly: true + resources: + requests: + cpu: 20m + memory: 32Mi + limits: + memory: 128Mi + readinessProbe: + httpGet: {path: /, port: 80} + initialDelaySeconds: 2 + periodSeconds: 20 + volumes: + - name: conf + configMap: + name: static-nginx-conf + - name: html + hostPath: + path: /home/opc/zai-home-base/sites/myadhd.dev + type: Directory +--- +apiVersion: v1 +kind: Service +metadata: + name: static-adhd +spec: + selector: + site: myadhd.dev + ports: + - port: 80 + targetPort: 80 +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: myadhd +spec: + rules: + - host: myadhd.dev + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: static-adhd + port: + number: 80 + - host: www.myadhd.dev + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: static-adhd + port: + number: 80 + tls: + - hosts: + - myadhd.dev + - www.myadhd.dev + secretName: myadhd-tls +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: myadhd-dev +spec: + secretName: myadhd-tls + issuerRef: + name: letsencrypt-prod + kind: ClusterIssuer + dnsNames: + - myadhd.dev + - www.myadhd.dev diff --git a/k8s/traefik.yaml b/k8s/traefik.yaml new file mode 100644 index 0000000..0e11159 --- /dev/null +++ b/k8s/traefik.yaml @@ -0,0 +1,113 @@ +# Traefik v2.11 LTS as the cluster edge: hostNetwork 80/443, global http->https redirect. +# TLS: entrypoint terminates TLS; certificates provisioned by cert-manager +# (Let's Encrypt DNS-01 via Cloudflare) into the Ingress TLS secrets. +# NOTE: --entrypoints.websecure.http.tls=true is REQUIRED โ€” without it TLS +# routers never engage the mux and every HTTPS request 404s. +apiVersion: v1 +kind: ServiceAccount +metadata: + name: traefik + namespace: kube-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: traefik +rules: + - apiGroups: [""] + resources: ["services", "endpoints", "secrets", "namespaces", "nodes"] + verbs: ["get", "list", "watch"] + - apiGroups: ["discovery.k8s.io"] + resources: ["endpointslices"] + verbs: ["get", "list", "watch"] + - apiGroups: ["networking.k8s.io"] + resources: ["ingresses", "ingressclasses"] + verbs: ["get", "list", "watch"] + - apiGroups: ["networking.k8s.io"] + resources: ["ingresses/status"] + verbs: ["update"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: traefik +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: traefik +subjects: + - kind: ServiceAccount + name: traefik + namespace: kube-system +--- +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: traefik + namespace: kube-system + labels: + app: traefik +spec: + selector: + matchLabels: + app: traefik + template: + metadata: + labels: + app: traefik + spec: + serviceAccountName: traefik + hostNetwork: true + dnsPolicy: ClusterFirstWithHostNet + nodeSelector: + kubernetes.io/hostname: djg-oracle-sl + tolerations: + - key: node-role.kubernetes.io/master + operator: Exists + effect: NoSchedule + - key: node-role.kubernetes.io/control-plane + operator: Exists + effect: NoSchedule + containers: + - name: traefik + image: traefik:v2.11.2 + args: + - --providers.kubernetesingress + - --providers.kubernetescrd=false + - --entrypoints.web.address=:80 + - --entrypoints.web.http.redirections.entrypoint.to=websecure + - --entrypoints.web.http.redirections.entrypoint.scheme=https + - --entrypoints.websecure.address=:443 + - --entrypoints.websecure.http.tls=true + - --log.level=WARN + ports: + - containerPort: 80 + hostPort: 80 + protocol: TCP + - containerPort: 443 + hostPort: 443 + protocol: TCP + resources: + requests: + cpu: 50m + memory: 64Mi + limits: + memory: 256Mi + readinessProbe: + httpGet: + path: / + port: 80 + httpHeaders: + - name: Host + value: bestdadjokes.lol + initialDelaySeconds: 5 + periodSeconds: 15 + livenessProbe: + httpGet: + path: / + port: 80 + httpHeaders: + - name: Host + value: bestdadjokes.lol + initialDelaySeconds: 15 + periodSeconds: 30 diff --git a/site/404.html b/site/404.html new file mode 100644 index 0000000..b7ae991 --- /dev/null +++ b/site/404.html @@ -0,0 +1,83 @@ + + + + + +404 โ€” Page Not Found + + + + + + + + + + + + + + + + +
+ +
+

404

+

This page is like a dad joke that got cut from the site โ€” it just didn't land.

+
+

Why did the web page go to therapy?

+
It had too many broken links.
+
+

Take me home โ†’

+
+
+ + + + + \ No newline at end of file diff --git a/site/about/index.html b/site/about/index.html new file mode 100644 index 0000000..b78ce7d --- /dev/null +++ b/site/about/index.html @@ -0,0 +1,88 @@ + + + + + +About โ€” Best Dad Jokes .lol + + + + + + + + + + + + + + + + +
+ +
+

๐Ÿ‘‹ About Best Dad Jokes

+

Welcome to BestDadJokes.lol โ€” a growing collection of the internet's best dad jokes: short, clean, pun-heavy, and delivered with the quiet confidence only a dad can muster.

+

The mission is simple: build the most useful dad joke resource on the internet. That means:

+
    +
  • Curated, not scraped. Every joke is hand-picked for maximum groan. If it doesn't make someone audibly sigh, it doesn't make the cut.
  • +
  • Family-friendly, always. Clean humor that's safe to tell at the dinner table, the office, or the school pickup line.
  • +
  • Fast and simple. No pop-ups, no logins, no nonsense. Just jokes.
  • +
+

Why dad jokes?

+

Because a dad joke is never just a joke. It's a love language. It's saying "I would rather embarrass myself than miss a chance to make you laugh." Also, they're free, and this is a budget operation.

+

Get in touch

+

Got a joke that deserves to be here? Found a bug? Want to license 300 dad jokes for your family group chat? Head to the contact page.

+
+
+ + + + + \ No newline at end of file diff --git a/site/api/v1/random.json b/site/api/v1/random.json new file mode 100644 index 0000000..9ced15b --- /dev/null +++ b/site/api/v1/random.json @@ -0,0 +1 @@ +{"setup": "What do you call 8 hobbits?", "punchline": "A hobbyte.", "type": "qa", "category": "tech", "source": "https://bestdadjokes.lol/category/tech/#joke-114"} \ No newline at end of file diff --git a/site/api/v1/today.json b/site/api/v1/today.json new file mode 100644 index 0000000..f5bc95a --- /dev/null +++ b/site/api/v1/today.json @@ -0,0 +1 @@ +{"setup": "I don't trust stairs.", "punchline": "They're always up to something.", "type": "line", "category": "one-liners", "source": "https://bestdadjokes.lol/category/one-liners/#joke-241"} \ No newline at end of file diff --git a/site/category/animals/index.html b/site/category/animals/index.html new file mode 100644 index 0000000..39d03fd --- /dev/null +++ b/site/category/animals/index.html @@ -0,0 +1,84 @@ + + + + + +Animal Dad Jokes โ€” 43 Funny, Clean Animal Dad Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

๐Ÿฆ Animal Dad Jokes

+

Paws-itively terrible animal puns that will make the whole zoo groan. That's 43 jokes of pure dad energy.

+

Why don't oysters share their pearls?

Because they're shellfish.

What do you call a bear with no teeth?

A gummy bear.

What do you call a sleeping bull?

A bulldozer.

Why are fish so smart?

Because they live in schools.

What do you call an alligator in a vest?

An investigator.

What do you call a fish without eyes?

A fsh.

What do you call a deer with no eyes?

No eye deer.

What do you call a deer with no eyes and no legs?

Still no eye deer.

Why do cows have hooves instead of feet?

Because they lactose.

What did the buffalo say when his son left for college?

Bison.

Why did the turtle cross the road?

To get to the shell station.

Why do seagulls fly over the sea?

Because if they flew over the bay, they'd be bagels.

What's a cat's favorite color?

Purr-ple.

Why did the dog sit in the shade?

Because he didn't want to be a hot dog.

What do you call a pig that does karate?

A pork chop.

How do bees get to school?

On the school buzz.

What do you call an owl that does magic tricks?

Hoo-dini.

Why don't ducks tell jokes when they fly?

Because they'd quack up.

What did the horse say when it tripped?

Help! I've fallen and I can't giddyup!

What do you call a snake wearing a hard hat?

A boa constructor.

What's a frog's favorite type of shoes?

Open-toad.

What do you call a crab that plays baseball?

A pinch hitter.

What do you call a lazy kangaroo?

A pouch potato.

How does a penguin build its house?

Igloos it together.

How do you know if there's an elephant under your bed?

Your nose touches the ceiling.

Why do cows wear bells?

Because their horns don't work.

Why do seals swim in salt water?

Because pepper water makes them sneeze.

How many tickles does it take to make an octopus laugh?

Ten-tickles.

What do you call a magic dog?

A labracadabrador.

What do you call a pile of kittens?

A meow-ntain.

Why don't cats play poker in the jungle?

Too many cheetahs.

What's a cat's favorite dessert?

Mice cream.

Why did the cat sit on the computer?

To keep an eye on the mouse.

What do you call a cat that works at a hospital?

A purr-fessional.

How do cats end a fight?

They hiss and make up.

Why is everyone so excited about the cat's new job?

Because it's feline good.

Why did the dog cross the road?

To get to the barking lot.

What kind of dog loves surround sound?

A subwoofer.

Why do dogs run in circles?

Because it's too hard to run in squares.

What's a dog's favorite instrument?

The trom-BONE.

How did the puppy feel after finishing its homework?

Ruff.

Why did the dachshund sit by the fire?

It was a cold dog.

What breed of dog can jump higher than a house?

Any breed โ€” houses can't jump.
+ +

Keep the groans going

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/category/christmas/index.html b/site/category/christmas/index.html new file mode 100644 index 0000000..e24e4c9 --- /dev/null +++ b/site/category/christmas/index.html @@ -0,0 +1,84 @@ + + + + + +Christmas Dad Jokes โ€” 15 Funny, Clean Christmas Dad Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

๐ŸŽ„ Christmas Dad Jokes

+

Ho-ho-horrible holiday jokes for the whole workshop. That's 15 jokes of pure dad energy.

+

What do you call Santa's little helpers?

Subordinate Clauses.

What do you call Santa when he takes a break?

Santa Pause.

What do snowmen eat for breakfast?

Snowflakes.

What did one snowman say to the other snowman?

Do you smell carrots?

Why does Santa go down the chimney?

Because it soots him.

What do you get when you cross Santa with a duck?

A Christmas quacker.

Why did the Christmas tree go to the barber?

It needed a trim.

What do elves learn in school?

The elf-abet.

What's every parent's favorite Christmas carol?

Silent Night.

What do you call an old snowman?

Water.

Why are Christmas trees so bad at knitting?

They always drop their needles.

What does the gingerbread man use to make his bed?

Cookie sheets.

Why did Rudolph get a bad report card?

Because he went down in history.

What do you sing at a snowman's birthday party?

Freeze a jolly good fellow.

What's a Christmas tree's favorite candy?

Orna-mints.
+ +

Keep the groans going

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/category/family/index.html b/site/category/family/index.html new file mode 100644 index 0000000..d9999f4 --- /dev/null +++ b/site/category/family/index.html @@ -0,0 +1,84 @@ + + + + + +Family & Parenting Dad Jokes โ€” 24 Funny, Clean Family & Parenting Dad Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง Family & Parenting Dad Jokes

+

Certified dad behavior: jokes the whole family has to live with. That's 24 jokes of pure dad energy.

+

Kid: 'Dad, can you put my shoes on?'

Dad: 'No, they don't fit me.'

Kid: 'Dad, make me a sandwich!'

Dad: 'Poof! You're a sandwich.'

Why did the dad bring a pencil to bed?

To draw the curtains.

Why did grandpa put wheels on his rocking chair?

He wanted to rock and roll.

What did the mother rope say to the child rope?

Don't be knotty.

Why did the toddler put sugar under his pillow?

He wanted sweet dreams.

Kid: 'Dad, how do I look?'

Dad: 'With your eyes.'

I used to play piano by ear.

Now I use my hands.

Kid: 'Dad, can you tell me what a solar eclipse is?'

Dad: 'No sun.'

Why did the baby strawberry cry?

Its parents were in a jam.

Kid: 'I'm cold.'

Dad: 'Go stand in the corner โ€” it's 90 degrees.'

Why did the dad stare at the carton of orange juice?

Because it said 'concentrate.'

What did the baby computer call its parent?

Data.

Why did the cookie cry in kindergarten?

His mom had been a wafer too long.

Why did the two antennas get married?

The ceremony was okay, but the reception was excellent.

What did the paper clip say to the magnet?

I find you very attractive.

What's the most romantic part about the ocean?

When the buoy meets gull.

Kid: 'Do you have a date for Valentine's Day?'

Dad: 'Sure โ€” February 14th.'

My wife told me to stop impersonating a flamingo.

I had to put my foot down.

Why do candles love birthdays?

They get to be the light of the party.

What did the elephant want for its birthday?

A trunk full of presents.

Why was the birthday cake as hard as a rock?

It was marble cake.

What does a clam do on its birthday?

It shellabrates.

What did the pirate say on his 80th birthday?

Aye matey!
+ +

Keep the groans going

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/category/food/index.html b/site/category/food/index.html new file mode 100644 index 0000000..d0c4ef1 --- /dev/null +++ b/site/category/food/index.html @@ -0,0 +1,84 @@ + + + + + +Food Dad Jokes โ€” 36 Funny, Clean Food Dad Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

๐Ÿ• Food Dad Jokes

+

Freshly baked food puns served with a side of eye-rolls. That's 36 jokes of pure dad energy.

+

Why did the tomato blush?

Because it saw the salad dressing.

What do you call a fake noodle?

An impasta.

Why did the cookie go to the doctor?

Because it was feeling crummy.

What did the grape do when it got stepped on?

It let out a little wine.

Why don't eggs tell jokes?

They'd crack each other up.

What do you call cheese that isn't yours?

Nacho cheese.

Why did the banana go to the doctor?

It wasn't peeling well.

What's orange and sounds like a parrot?

A carrot.

What does a lemon say when it answers the phone?

Yellow!

What did one plate say to the other plate?

Dinner's on me.

Why did the yogurt go to the art exhibit?

Because it was cultured.

What do you call a sad strawberry?

A blueberry.

What did the baby corn say to the mama corn?

Where's popcorn?

Why did the chef get arrested?

He was caught beating an egg.

What kind of room doesn't have doors?

A mushroom.

What did the lettuce say to the celery?

Romaine calm.

Why did the man put his money in the freezer?

He wanted cold hard cash.

What did the hamburger name its daughter?

Patty.

Why do bananas have to put on sunscreen at the beach?

Otherwise they'd peel.

Why did the pizzeria owner go out of business?

He couldn't make enough dough.

What do you call an avocado that's been blessed?

Holy guacamole.

Why did the coffee file a police report?

It got mugged.

What do you call a cow on a trampoline?

A milkshake.

Why did the melons plan a big wedding?

Because they cantaloupe.

What did the baby cookie's parents do when it cried?

They felt crumby.

What do you call a sad cup of coffee?

A depres-so.

How do coffee cups show their love?

With mugs and kisses.

Where do coffee beans go for a night out?

The coffee bar.

Why was the espresso checking its watch?

It was pressed for time.

What's a coffee's favorite magic spell?

Espresso Patronum!

Why don't coffees ever gossip?

They don't want to spill the beans.

How does coffee show it cares?

It gives you a latte attention.

What does an aardvark like on its pizza?

Ant-chovies.

Why did the hipster burn his tongue on his pizza?

He ate it before it was cool.

What kind of pizza do dogs order?

Pup-peroni.

What's the difference between a pizza and my pizza jokes?

The pizza can actually feed a family.
+ +

Keep the groans going

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/category/halloween/index.html b/site/category/halloween/index.html new file mode 100644 index 0000000..58828cc --- /dev/null +++ b/site/category/halloween/index.html @@ -0,0 +1,84 @@ + + + + + +Halloween Dad Jokes โ€” 16 Funny, Clean Halloween Dad Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

๐ŸŽƒ Halloween Dad Jokes

+

Spook-tacular jokes that are scary bad (and that's the point). That's 16 jokes of pure dad energy.

+

Why don't skeletons ever fight each other?

They don't have the guts.

What do you call a witch's garage?

A broom closet.

Why did the vampire subscribe to the newspaper?

He heard it had great circulation.

What's a ghost's favorite dessert?

I scream.

Why don't mummies take vacations?

They're afraid to unwind.

What do you call a monster who poisons corn flakes?

A cereal killer.

Why are ghosts such bad liars?

You can see right through them.

What do you get when you cross a snowman with a vampire?

Frostbite.

Why did the skeleton go to the party alone?

He had no body to go with him.

What kind of music do mummies listen to?

Wrap music.

What did the skeleton order at the restaurant?

Spare ribs.

Why do witches ride brooms?

Vacuum cleaners are too expensive.

What do you call a haunted chicken?

A poultry-geist.

Why did the ghost go to the bar?

For the boos.

How do you make a skeleton laugh?

Tickle its funny bone.

What's a vampire's favorite fruit?

A blood orange.
+ +

Keep the groans going

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/category/knock-knock/index.html b/site/category/knock-knock/index.html new file mode 100644 index 0000000..23526e3 --- /dev/null +++ b/site/category/knock-knock/index.html @@ -0,0 +1,84 @@ + + + + + +Knock-Knock Jokes โ€” 20 Funny, Clean Knock-Knock Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

๐Ÿšช Knock-Knock Jokes

+

Who's there? The internet's best collection of knock-knock jokes. That's 20 jokes of pure dad energy.

+

Knock knock.
Who's there?
Boo.
Boo who?

Don't cry โ€” it's just a joke!

Knock knock.
Who's there?
Lettuce.
Lettuce who?

Lettuce in, it's freezing out here!

Knock knock.
Who's there?
Cargo.
Cargo who?

No โ€” car go vroom vroom!

Knock knock.
Who's there?
Tank.
Tank who?

You're welcome!

Knock knock.
Who's there?
Interrupting cow.
Interrupting cโ€”

MOO!

Knock knock.
Who's there?
Harry.
Harry who?

Harry up and open the door!

Knock knock.
Who's there?
Olive.
Olive who?

Olive you and I miss you!

Knock knock.
Who's there?
Candice.
Candice who?

Candice door open, or what?

Knock knock.
Who's there?
Atch.
Atch who?

Bless you!

Knock knock.
Who's there?
Amish.
Amish who?

Aww โ€” I miss you too!

Knock knock.
Who's there?
Europe.
Europe who?

No, YOU'RE a poo!

Knock knock.
Who's there?
Justin.
Justin who?

Justin time for dinner!

Knock knock.
Who's there?
Dwayne.
Dwayne who?

Dwayne the bathtub, I'm dwowning!

Knock knock.
Who's there?
Ken.
Ken who?

Ken you open the door, please?

Knock knock.
Who's there?
Alpaca.
Alpaca who?

Alpaca the suitcase, you load up the car!

Knock knock.
Who's there?
Anita.
Anita who?

Anita borrow your pencil!

Knock knock.
Who's there?
Gorilla.
Gorilla who?

Gorilla cheese sandwich for me, I'm starving!

Knock knock.
Who's there?
Nobel.
Nobel who?

No bell โ€” that's why I knocked!

Knock knock.
Who's there?
Doris.
Doris who?

Doris locked โ€” that's why I'm knocking!

Knock knock.
Who's there?
Aardvark.
Aardvark who?

Aardvark a hundred miles for one of your smiles!
+ +

Keep the groans going

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/category/one-liners/index.html b/site/category/one-liners/index.html new file mode 100644 index 0000000..1442c59 --- /dev/null +++ b/site/category/one-liners/index.html @@ -0,0 +1,84 @@ + + + + + +Dad Joke One-Liners โ€” 41 Funny, Clean Dad Joke One-Liners + + + + + + + + + + + + + + + + +
+ +
+ +

๐ŸŽค Dad Joke One-Liners

+

Rapid-fire one-liners. Mic drop optional, groan guaranteed. That's 41 jokes of pure dad energy.

+

I'm reading a book about anti-gravity.

I just can't put it down.

I used to hate facial hair.

Then it grew on me.

What's brown and sticky?

A stick.

I told my wife she was drawing her eyebrows too high.

She looked surprised.

I don't trust stairs.

They're always up to something.

I'm on a seafood diet.

I see food and I eat it.

What do you call a fish wearing a bowtie?

Sofishticated.

I stayed up all night wondering where the sun went.

Then it dawned on me.

I'd tell you a construction joke...

...but I'm still working on it.

I know a lot of jokes about retired people.

Sadly, none of them work.

I ordered a chicken and an egg from an online store.

I'll let you know.

What time did the man go to the dentist?

Tooth hurty.

Did you hear about the kidnapping at school?

It's fine โ€” he woke up.

What do you call a boomerang that doesn't come back?

A stick.

I only know 25 letters of the alphabet.

I don't know y.

Did you hear about the restaurant on the moon?

Great food, no atmosphere.

Why do we tell actors to 'break a leg'?

Because every play has a cast.

What do you call a factory that makes okay products?

A satisfactory.

Dear algebra,

Stop asking us to find your X. She's never coming back โ€” and don't ask Y.

What's the difference between ignorance and apathy?

I don't know and I don't care.

I asked my dog what's two minus two.

He said nothing.

What do you call a parade of rabbits hopping backwards?

A receding hare-line.

What do you call a sleeping dinosaur?

A dino-snore.

What do you call a man with a rubber toe?

Roberto.

Why did the two 4s skip dinner?

They already 8.

What do you call a sheep with no legs?

A cloud.

Why did the picture go to jail?

Because it was framed.

What did the man say when he walked into a bar?

Ouch.

Why did the man fall down the well?

He couldn't see that well.

What's red and bad for your teeth?

A brick.

Why was 6 afraid of 7?

Because 7 8 9.

What did the zero say to the eight?

Nice belt.

Why can't your nose be 12 inches long?

Because then it would be a foot.

I'm terrified of elevators.

So I'm taking steps to avoid them.

Why don't scientists trust atoms?

Because they make up everything.

What did the Buddhist monk say to the hot dog vendor?

Make me one with everything.

What's a nap's favorite kind of movie?

A sleeper hit.

Why did the pillow go to the doctor?

It was feeling down.

Why are blankets so good at ending arguments?

They know how to wrap things up.

I'm great at sleeping.

I can do it with my eyes closed.

Why was everyone so tired on the morning of April 1st?

They'd just finished a 31-day March.
+ +

Keep the groans going

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/category/school/index.html b/site/category/school/index.html new file mode 100644 index 0000000..274aa51 --- /dev/null +++ b/site/category/school/index.html @@ -0,0 +1,84 @@ + + + + + +School & Teacher Dad Jokes โ€” 21 Funny, Clean School & Teacher Dad Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

๐ŸŽ’ School & Teacher Dad Jokes

+

Class clown certified jokes for teachers, students and homework survivors. That's 21 jokes of pure dad energy.

+

Why did the student eat his homework?

Because the teacher said it was a piece of cake.

Why was the math book sad?

It had too many problems.

Why did the teacher wear sunglasses to school?

Because her students were so bright.

Who's the king of all school supplies?

The ruler.

Why did the student bring a ladder to school?

He wanted to go to high school.

Why was the equal sign so humble?

It knew it wasn't less than or greater than anyone else.

What do you call a teacher who never farts in public?

A private tutor.

Why did the music teacher need a ladder?

To reach the high notes.

What did the paper say to the pencil?

Write on!

Why did the kid study in the airplane?

He wanted a higher education.

Why was the geometry book so adorable?

It had acute angles.

What's a math teacher's favorite tree?

Geome-tree.

The past, the present, and the future walked into class.

It was tense.

Why did the clock get in trouble at school?

It kept tocking back.

Why don't you see giraffes in elementary school?

They're all in high school.

Why did the geography teacher love the ocean?

It was full of currents.

Teacher: 'Name two pronouns.'

Student: 'Who, me?'

Why do calculators make great friends?

You can always count on them.

What's a pirate's favorite subject?

ARRRR-t.

Why did the kid throw butter out the window?

He wanted to see a butter fly.

Why did the child cross the playground?

To get to the other slide.
+ +

Keep the groans going

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/category/space/index.html b/site/category/space/index.html new file mode 100644 index 0000000..61275e0 --- /dev/null +++ b/site/category/space/index.html @@ -0,0 +1,84 @@ + + + + + +Space Dad Jokes โ€” 14 Funny, Clean Space Dad Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

๐Ÿš€ Space Dad Jokes

+

Out-of-this-world jokes โ€” no astronaut training required. That's 14 jokes of pure dad energy.

+

How does the moon cut its hair?

Eclipse it.

How do you organize a party in space?

You planet.

Why is the moon always broke?

It's down to its last quarter.

What do you call an alien with three eyes?

An aliiien.

Why did the astronaut break up with his girlfriend?

He needed space.

What kind of music do planets listen to?

Neptunes.

What did Saturn say to Jupiter?

Give me a ring sometime.

What do astronauts use to keep their pants up?

An asteroid belt.

Why aren't astronauts hungry after they blast off?

Because they've had a big launch.

What's an astronaut's favorite part of a computer?

The space bar.

Why did the cow become an astronaut?

To see the moooon.

What do you call a space magician?

A flying saucerer.

Why couldn't the astronaut book a hotel room on the moon?

Because it was full.

How do astronauts serve their dinner?

On flying saucers.
+ +

Keep the groans going

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/category/sports/index.html b/site/category/sports/index.html new file mode 100644 index 0000000..b5b4415 --- /dev/null +++ b/site/category/sports/index.html @@ -0,0 +1,84 @@ + + + + + +Sports Dad Jokes โ€” 15 Funny, Clean Sports Dad Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

โšฝ Sports Dad Jokes

+

Jokes that swing, dribble and score โ€” straight from the sidelines. That's 15 jokes of pure dad energy.

+

Why did the golfer bring two pairs of pants?

In case he got a hole in one.

Why did the bicycle fall over?

It was two-tired.

Why can't basketball players go on vacation?

They'd get called for traveling.

Why did the football coach go to the bank?

To get his quarterback.

What's a runner's favorite subject?

Jog-raphy.

Why did the soccer player bring string to the game?

So he could tie the score.

Why don't prisoners play tennis?

Too many serves.

Why did the baseball player get arrested?

He stole second base.

Why are basketball courts always wet?

Because the players dribble.

What's the difference between a bad golfer and a bad skydiver?

A bad golfer goes WHACK... dang! A bad skydiver goes dang!... WHACK.

I asked the marathon runner how the race went.

He said it was a long story.

What does a hockey player have in common with a magician?

Hat tricks.

Why was the baseball stadium so cool?

Because it was full of fans.

I told my personal trainer I wanted to learn to do the splits.

She asked: 'How flexible are you?' I said: 'I can't make Tuesdays.'

Why did the golfer bring an extra sock?

In case he got a hole in one.
+ +

Keep the groans going

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/category/tech/index.html b/site/category/tech/index.html new file mode 100644 index 0000000..541a4e2 --- /dev/null +++ b/site/category/tech/index.html @@ -0,0 +1,84 @@ + + + + + +Tech & Computer Dad Jokes โ€” 19 Funny, Clean Tech & Computer Dad Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

๐Ÿ’ป Tech & Computer Dad Jokes

+

404: good joke not found. Just kidding โ€” these are giggle-bytes. That's 19 jokes of pure dad energy.

+

Why do programmers prefer dark mode?

Because light attracts bugs.

Why did the computer go to the doctor?

It caught a virus.

Why did the computer show up late to work?

It had a hard drive.

Why was the smartphone wearing glasses?

It lost all its contacts.

What do you call 8 hobbits?

A hobbyte.

Why did the developer go broke?

He used up all his cache.

Why do Java developers wear glasses?

Because they don't C#.

What do you call a computer that sings?

A Dell.

What did the mouse say to the keyboard?

You're just my type.

Why did the robot go on vacation?

He needed to recharge.

What's a computer's favorite snack?

Microchips.

Why did the Wi-Fi go to therapy?

It felt disconnected.

How does a computer get drunk?

It takes screenshots.

Why did the PowerPoint presentation cross the road?

To get to the other slide.

How many programmers does it take to change a light bulb?

None โ€” that's a hardware problem.

Why was the JavaScript developer sad?

He didn't Node how to Express himself.

What did the router say to the doctor?

It hurts when IP.

Why do keyboards never sleep?

They have two shifts.

I would tell you a UDP joke...

...but you might not get it.
+ +

Keep the groans going

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/category/travel/index.html b/site/category/travel/index.html new file mode 100644 index 0000000..dddf82e --- /dev/null +++ b/site/category/travel/index.html @@ -0,0 +1,84 @@ + + + + + +Travel & Vacation Dad Jokes โ€” 15 Funny, Clean Travel & Vacation Dad Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

โœˆ๏ธ Travel & Vacation Dad Jokes

+

Puns to pack on every trip, from Fin-land to Pencil-vania. That's 15 jokes of pure dad energy.

+

What do you call a mountain that's really funny?

Hill-arious.

Why did the airplane get sent to its room?

For bad altitude.

Why did the car apply for a job?

It was tired of sitting idle.

What did the beach say as the tide came in?

Long time, no sea.

Where do sharks go on vacation?

Fin-land.

Where do pencils go on vacation?

Pencil-vania.

What do you call a train that sneezes?

Achoo-choo train.

Why did the man bring a ladder to the airport?

He heard the fares were sky high.

Why did the suitcase go to therapy?

It had too much baggage.

Where do sick boats go?

To the dock.

What's the fastest country in the world?

Rush-a.

What's the fastest vegetable?

A runner bean.

What did the ocean say to the beach?

Nothing โ€” it just waved.

Where do math teachers go on vacation?

Times Square.

Why don't calendars ever take a vacation?

Their days are numbered.
+ +

Keep the groans going

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/category/weather/index.html b/site/category/weather/index.html new file mode 100644 index 0000000..711cdc0 --- /dev/null +++ b/site/category/weather/index.html @@ -0,0 +1,84 @@ + + + + + +Weather Dad Jokes โ€” 17 Funny, Clean Weather Dad Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

โ›… Weather Dad Jokes

+

Forecast: 100% chance of groans with scattered puns. That's 17 jokes of pure dad energy.

+

What does a cloud wear under its raincoat?

Thunderwear.

What did one raindrop say to the other?

Two's company, three's a cloud.

What do you call it when it rains chickens and ducks?

Fowl weather.

I tried to catch some fog earlier.

I mist.

What does the wind say on Valentine's Day?

I'm a big fan of yours.

Why did the sun go to school?

To get brighter.

What falls in winter but never gets hurt?

Snow.

Why did the weather want privacy?

It was changing.

What's a tornado's favorite game?

Twister.

What do snowmen call their offspring?

Chill-dren.

What's a rainbow's favorite accessory?

A bow-tie.

Why don't mountains ever get cold in winter?

They wear snowcaps.

What do you get when you leave a dog out in the cold?

A chili dog.

The forecast said it would rain cats and dogs.

I went outside and stepped in a poodle.

How does a snowman get around town?

On an icicle.

What did the icy road say to the truck?

Want to go for a spin?

How do you prevent a summer cold?

Catch it in the winter.
+ +

Keep the groans going

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/category/work/index.html b/site/category/work/index.html new file mode 100644 index 0000000..d95fd16 --- /dev/null +++ b/site/category/work/index.html @@ -0,0 +1,84 @@ + + + + + +Work & Office Dad Jokes โ€” 26 Funny, Clean Work & Office Dad Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

๐Ÿ’ผ Work & Office Dad Jokes

+

Watercooler-worthy workplace jokes for the 9-to-5 groan. That's 26 jokes of pure dad energy.

+

Why did the scarecrow win an award?

He was outstanding in his field.

Why did the employee get fired from the calendar factory?

He took a couple of days off.

My boss told me to have a good day.

So I went home.

Why did the banker quit his job?

He lost interest.

I used to work in a shoe recycling shop.

It was sole destroying.

I got fired from the orange juice factory.

I couldn't concentrate.

What did the janitor say when he jumped out of the supply closet?

Supplies!

Why do employees drink so much coffee at work?

It's the weekend immune system that keeps them going.

I just got a job making clocks.

It's about time.

I used to be a tailor.

Turns out I wasn't suited for it.

I started a business making origami.

Unfortunately, it folded.

How's my job security?

Rock solid โ€” nobody else wants it.

Why did the pencil get a promotion?

It was on point.

I asked my boss for a raise.

He said the elevator does that, and handed me a ladder.

Why do bakers work so hard?

Because they knead the dough.

I quit my job at the helium factory.

I refused to be spoken to in that tone.

I got a job feeding the giraffes at the zoo.

The pay is lousy, and it's a tall order.

Why did the calendar apply for the job?

It had a lot of dates.

Retirement is the best job I've ever had.

The pay is terrible, but the hours are great.

My boss said: dress for the job you want, not the job you have.

Now HR is asking why I came to work dressed as the boss.

Why did the penny get promoted?

It made perfect cents.

What do you call a rich fish?

A goldfish.

Why did the dollar bill break up with the coin?

It needed some change.

What happened to the man who put $20 into a vending machine?

Nothing โ€” he's still waiting for his two cents.

Why was the money exhausted?

It was spent.

Where do cows invest their money?

In moo-tual funds.
+ +

Keep the groans going

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/contact/index.html b/site/contact/index.html new file mode 100644 index 0000000..08d7ae3 --- /dev/null +++ b/site/contact/index.html @@ -0,0 +1,81 @@ + + + + + +Contact โ€” Best Dad Jokes .lol + + + + + + + + + + + + + + + + +
+ +
+

๐Ÿ“ฎ Contact

+

Want to send us the greatest dad joke of all time? Report a joke that's more "dad" than "joke"? Tell us the site made you laugh so hard you spilled your coffee? We read everything.

+

Email us at hello@bestdadjokes.lol โ€” responses may be delayed by naps.

+

Joke submissions

+

Include the setup and the punchline in your email. If we use it, you get full bragging rights and absolutely no money, which is exactly how dad economics works.

+
+
+ + + + + \ No newline at end of file diff --git a/site/dad-joke-generator/index.html b/site/dad-joke-generator/index.html new file mode 100644 index 0000000..7d49ed7 --- /dev/null +++ b/site/dad-joke-generator/index.html @@ -0,0 +1,95 @@ + + + + + +Dad Joke Generator โ€” Random Dad Jokes, One Click + + + + + + + + + + + + + + + + +
+ +
+

๐ŸŽฒ Dad Joke Generator

+

One click. One random dad joke. Zero apologies. Works at parties, in the car line, and mid-argument.

+
+

Click the button to summon a dad joke.

+
+
+ + + +
+
+

How to weaponize a dad joke

+
    +
  1. Deliver with confidence. Eye contact is everything. The dad joke fears hesitation.
  2. +
  3. Pause before the punchline. Let the suspense marinate. Then pounce.
  4. +
  5. Ignore the groans. The groan is applause in dad dialect.
  6. +
  7. Repeat the best ones. Repetition builds tradition. Tradition builds groans.
  8. +
+

Looking for something specific? Search all dad jokes or browse by category.

+
+
+ + + + + \ No newline at end of file diff --git a/site/index.html b/site/index.html new file mode 100644 index 0000000..ee19d60 --- /dev/null +++ b/site/index.html @@ -0,0 +1,194 @@ + + + + + +Best Dad Jokes โ€” 322+ Funny, Clean Dad Jokes (One-Liners, Puns & Knock-Knocks) + + + + + + + + + + + + + + + + +
+ +
+

The Best Dad Jokes on the Internet

+

Short. Clean. Painfully punny. 322+ jokes your kids don't want to hear but absolutely need to.

+
+

Who's the king of all school supplies?

+
The ruler.
+
+ + + +
+
+
+ + + +
+
+

๐Ÿ˜„ Dad Joke of the Day

+

I don't trust stairs.

+
They're always up to something.
+

See the archive โ†’

+
+
+ +
+

Browse Dad Jokes by Category

+ +
+ +
+

Popular Dad Joke Topics

+ +
+ + + +
+

Fresh Out of the Dad Oven

+

How do you prevent a summer cold?

Catch it in the winter.

What did the icy road say to the truck?

Want to go for a spin?

How does a snowman get around town?

On an icicle.

What's the difference between a pizza and my pizza jokes?

The pizza can actually feed a family.

What kind of pizza do dogs order?

Pup-peroni.

Why did the hipster burn his tongue on his pizza?

He ate it before it was cool.

What does an aardvark like on its pizza?

Ant-chovies.

What did the pirate say on his 80th birthday?

Aye matey!

What does a clam do on its birthday?

It shellabrates.

Why was the birthday cake as hard as a rock?

It was marble cake.

What did the elephant want for its birthday?

A trunk full of presents.

Why do candles love birthdays?

They get to be the light of the party.
+ +
+ +
+

What is a dad joke?

+

A dad joke is a short, clean, pun-based joke delivered with maximum confidence and zero shame. It's the kind of joke that makes your kids groan, your wife roll her eyes, and your dog leave the room. Science has yet to explain why hearing one makes you feel briefly smarter and visibly worse at the same time.

+

This site is a growing collection of the best dad jokes on the internet: one-liners, knock-knock jokes, and puns about animals, food, work, school, sports, tech, space and more. Every joke is family-friendly โ€” the only thing at risk of injury is everyone's patience. Start with the dad joke generator, browse the categories, or come back every day for a new dad joke of the day.

+
+
+ + + + + \ No newline at end of file diff --git a/site/joke-of-the-day/index.html b/site/joke-of-the-day/index.html new file mode 100644 index 0000000..64437a0 --- /dev/null +++ b/site/joke-of-the-day/index.html @@ -0,0 +1,91 @@ + + + + + +Dad Joke of the Day โ€” A New Funny Dad Joke Daily + + + + + + + + + + + + + + + + +
+ +
+

๐Ÿ˜„ Dad Joke of the Day

+

A brand-new dad joke every single day. Doctors recommend exactly one per day. We won't tell if you don't.

+
+

September 16, 2026

+

I don't trust stairs.

+
They're always up to something.
+
+ + +
+
+

The dad joke archive

+

Every recent dad joke of the day, one per day, no repeats (for a few months, anyway):

+
+ +
+
+ + + + + \ No newline at end of file diff --git a/site/privacy-policy/index.html b/site/privacy-policy/index.html new file mode 100644 index 0000000..d7c75fd --- /dev/null +++ b/site/privacy-policy/index.html @@ -0,0 +1,93 @@ + + + + + +Privacy Policy โ€” Best Dad Jokes .lol + + + + + + + + + + + + + + + + +
+ +
+

Privacy Policy

+

Last updated: September 16, 2026

+

BestDadJokes.lol respects your privacy, which is ironic because dads famously respect nothing more than a good interruption. Here's the deal in plain English:

+

What we collect

+

We keep standard web server logs (IP address, browser type, pages visited) for security and aggregate traffic statistics. We do not ask for your name, email, or your kids' report cards. There are no accounts on this site.

+

Cookies and advertising

+

We may display advertising on this site to keep it free. Advertising partners, which may include Google, use cookies and similar technologies to serve ads based on your prior visits to this and other websites.

+

Google's use of advertising cookies enables it and its partners to serve ads based on your visits to this site and/or other sites on the Internet. You may opt out of personalized advertising by visiting Google Ads Settings, or opt out of third-party vendor cookies at aboutads.info.

+

If we run a consent banner for visitors from the EEA/UK, your choices will be honored and stored locally.

+

Analytics

+

We use aggregate, privacy-respecting analytics to count page views and understand which categories people enjoy. This data cannot reasonably be used to identify you.

+

Data sharing

+

We do not sell personal data. We have no personal data to sell. We barely have data.

+

Children

+

Content on this site is family-friendly by design. The site is not directed at children under 13, and we do not knowingly collect personal information from children.

+

Contact

+

Questions about this policy? Email hello@bestdadjokes.lol.

+
+
+ + + + + \ No newline at end of file diff --git a/site/robots.txt b/site/robots.txt new file mode 100644 index 0000000..096af35 --- /dev/null +++ b/site/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Allow: / + +Sitemap: https://bestdadjokes.lol/sitemap.xml diff --git a/site/rss.xml b/site/rss.xml new file mode 100644 index 0000000..2b6fc42 --- /dev/null +++ b/site/rss.xml @@ -0,0 +1,49 @@ +Best Dad Jokes โ€” Dad Joke of the Dayhttps://bestdadjokes.lol/joke-of-the-day/The best dad jokes on the internet โ€” short, clean, and groan-worthy.en-usDad Joke of the Day โ€” Sep 16https://bestdadjokes.lol/joke-of-the-day/?d=2026-09-16bjd-daily-2026-09-16Wed, 16 Sep 2026 00:34:11 -0000I don't trust stairs. โ€” They're always up to something.Dad Joke of the Day โ€” Sep 15https://bestdadjokes.lol/joke-of-the-day/?d=2026-09-15bjd-daily-2026-09-15Tue, 15 Sep 2026 00:34:11 -0000I told my wife she was drawing her eyebrows too high. โ€” She looked surprised.Dad Joke of the Day โ€” Sep 14https://bestdadjokes.lol/joke-of-the-day/?d=2026-09-14bjd-daily-2026-09-14Mon, 14 Sep 2026 00:34:11 -0000What's brown and sticky? โ€” A stick.Dad Joke of the Day โ€” Sep 13https://bestdadjokes.lol/joke-of-the-day/?d=2026-09-13bjd-daily-2026-09-13Sun, 13 Sep 2026 00:34:11 -0000I used to hate facial hair. โ€” Then it grew on me.Dad Joke of the Day โ€” Sep 12https://bestdadjokes.lol/joke-of-the-day/?d=2026-09-12bjd-daily-2026-09-12Sat, 12 Sep 2026 00:34:11 -0000I'm reading a book about anti-gravity. โ€” I just can't put it down.Dad Joke of the Day โ€” Sep 11https://bestdadjokes.lol/joke-of-the-day/?d=2026-09-11bjd-daily-2026-09-11Fri, 11 Sep 2026 00:34:11 -0000Knock knock. +Who's there? +Aardvark. +Aardvark who? โ€” Aardvark a hundred miles for one of your smiles!Dad Joke of the Day โ€” Sep 10https://bestdadjokes.lol/joke-of-the-day/?d=2026-09-10bjd-daily-2026-09-10Thu, 10 Sep 2026 00:34:11 -0000Knock knock. +Who's there? +Doris. +Doris who? โ€” Doris locked โ€” that's why I'm knocking!Dad Joke of the Day โ€” Sep 09https://bestdadjokes.lol/joke-of-the-day/?d=2026-09-09bjd-daily-2026-09-09Wed, 09 Sep 2026 00:34:11 -0000Knock knock. +Who's there? +Nobel. +Nobel who? โ€” No bell โ€” that's why I knocked!Dad Joke of the Day โ€” Sep 08https://bestdadjokes.lol/joke-of-the-day/?d=2026-09-08bjd-daily-2026-09-08Tue, 08 Sep 2026 00:34:11 -0000Knock knock. +Who's there? +Gorilla. +Gorilla who? โ€” Gorilla cheese sandwich for me, I'm starving!Dad Joke of the Day โ€” Sep 07https://bestdadjokes.lol/joke-of-the-day/?d=2026-09-07bjd-daily-2026-09-07Mon, 07 Sep 2026 00:34:11 -0000Knock knock. +Who's there? +Anita. +Anita who? โ€” Anita borrow your pencil!Dad Joke of the Day โ€” Sep 06https://bestdadjokes.lol/joke-of-the-day/?d=2026-09-06bjd-daily-2026-09-06Sun, 06 Sep 2026 00:34:11 -0000Knock knock. +Who's there? +Alpaca. +Alpaca who? โ€” Alpaca the suitcase, you load up the car!Dad Joke of the Day โ€” Sep 05https://bestdadjokes.lol/joke-of-the-day/?d=2026-09-05bjd-daily-2026-09-05Sat, 05 Sep 2026 00:34:11 -0000Knock knock. +Who's there? +Ken. +Ken who? โ€” Ken you open the door, please?Dad Joke of the Day โ€” Sep 04https://bestdadjokes.lol/joke-of-the-day/?d=2026-09-04bjd-daily-2026-09-04Fri, 04 Sep 2026 00:34:11 -0000Knock knock. +Who's there? +Dwayne. +Dwayne who? โ€” Dwayne the bathtub, I'm dwowning!Dad Joke of the Day โ€” Sep 03https://bestdadjokes.lol/joke-of-the-day/?d=2026-09-03bjd-daily-2026-09-03Thu, 03 Sep 2026 00:34:11 -0000Knock knock. +Who's there? +Justin. +Justin who? โ€” Justin time for dinner!Dad Joke of the Day โ€” Sep 02https://bestdadjokes.lol/joke-of-the-day/?d=2026-09-02bjd-daily-2026-09-02Wed, 02 Sep 2026 00:34:11 -0000Knock knock. +Who's there? +Europe. +Europe who? โ€” No, YOU'RE a poo!Dad Joke of the Day โ€” Sep 01https://bestdadjokes.lol/joke-of-the-day/?d=2026-09-01bjd-daily-2026-09-01Tue, 01 Sep 2026 00:34:11 -0000Knock knock. +Who's there? +Amish. +Amish who? โ€” Aww โ€” I miss you too!Dad Joke of the Day โ€” Aug 31https://bestdadjokes.lol/joke-of-the-day/?d=2026-08-31bjd-daily-2026-08-31Mon, 31 Aug 2026 00:34:11 -0000Knock knock. +Who's there? +Atch. +Atch who? โ€” Bless you!Dad Joke of the Day โ€” Aug 30https://bestdadjokes.lol/joke-of-the-day/?d=2026-08-30bjd-daily-2026-08-30Sun, 30 Aug 2026 00:34:11 -0000Knock knock. +Who's there? +Candice. +Candice who? โ€” Candice door open, or what?Dad Joke of the Day โ€” Aug 29https://bestdadjokes.lol/joke-of-the-day/?d=2026-08-29bjd-daily-2026-08-29Sat, 29 Aug 2026 00:34:11 -0000Knock knock. +Who's there? +Olive. +Olive who? โ€” Olive you and I miss you!Dad Joke of the Day โ€” Aug 28https://bestdadjokes.lol/joke-of-the-day/?d=2026-08-28bjd-daily-2026-08-28Fri, 28 Aug 2026 00:34:11 -0000Knock knock. +Who's there? +Harry. +Harry who? โ€” Harry up and open the door!Dad Joke of the Day โ€” Aug 27https://bestdadjokes.lol/joke-of-the-day/?d=2026-08-27bjd-daily-2026-08-27Thu, 27 Aug 2026 00:34:11 -0000Knock knock. +Who's there? +Interrupting cow. +Interrupting cโ€” โ€” MOO! \ No newline at end of file diff --git a/site/search/index.html b/site/search/index.html new file mode 100644 index 0000000..96a906b --- /dev/null +++ b/site/search/index.html @@ -0,0 +1,84 @@ + + + + + +Search Dad Jokes โ€” Find a Dad Joke About Anything + + + + + + + + + + + + + + + + +
+ +
+

๐Ÿ”Ž Search Dad Jokes

+

Looking for a dad joke about coffee, cats, or cardio? Type it in. We probably have a pun for that.

+
+ +
+

+
+

No jokes matched. Which, honestly, is a great setup for a new dad joke โ€” send it to us via the contact page.

+
+
+ + + + + \ No newline at end of file diff --git a/site/sitemap.xml b/site/sitemap.xml new file mode 100644 index 0000000..e028275 --- /dev/null +++ b/site/sitemap.xml @@ -0,0 +1,34 @@ + + +https://bestdadjokes.lol/2026-09-16weekly1.0 +https://bestdadjokes.lol/dad-joke-generator/2026-09-16monthly0.8 +https://bestdadjokes.lol/joke-of-the-day/2026-09-16monthly0.8 +https://bestdadjokes.lol/search/2026-09-16monthly0.8 +https://bestdadjokes.lol/about/2026-09-16monthly0.8 +https://bestdadjokes.lol/contact/2026-09-16monthly0.8 +https://bestdadjokes.lol/privacy-policy/2026-09-16monthly0.8 +https://bestdadjokes.lol/terms/2026-09-16monthly0.8 +https://bestdadjokes.lol/category/animals/2026-09-16monthly0.8 +https://bestdadjokes.lol/category/food/2026-09-16monthly0.8 +https://bestdadjokes.lol/category/work/2026-09-16monthly0.8 +https://bestdadjokes.lol/category/school/2026-09-16monthly0.8 +https://bestdadjokes.lol/category/sports/2026-09-16monthly0.8 +https://bestdadjokes.lol/category/tech/2026-09-16monthly0.8 +https://bestdadjokes.lol/category/family/2026-09-16monthly0.8 +https://bestdadjokes.lol/category/weather/2026-09-16monthly0.8 +https://bestdadjokes.lol/category/space/2026-09-16monthly0.8 +https://bestdadjokes.lol/category/travel/2026-09-16monthly0.8 +https://bestdadjokes.lol/category/halloween/2026-09-16monthly0.8 +https://bestdadjokes.lol/category/christmas/2026-09-16monthly0.8 +https://bestdadjokes.lol/category/knock-knock/2026-09-16monthly0.8 +https://bestdadjokes.lol/category/one-liners/2026-09-16monthly0.8 +https://bestdadjokes.lol/topic/coffee/2026-09-16monthly0.8 +https://bestdadjokes.lol/topic/cats/2026-09-16monthly0.8 +https://bestdadjokes.lol/topic/dogs/2026-09-16monthly0.8 +https://bestdadjokes.lol/topic/cows/2026-09-16monthly0.8 +https://bestdadjokes.lol/topic/money/2026-09-16monthly0.8 +https://bestdadjokes.lol/topic/sleep/2026-09-16monthly0.8 +https://bestdadjokes.lol/topic/love/2026-09-16monthly0.8 +https://bestdadjokes.lol/topic/birthday/2026-09-16monthly0.8 +https://bestdadjokes.lol/topic/winter/2026-09-16monthly0.8 + \ No newline at end of file diff --git a/site/static/favicon.svg b/site/static/favicon.svg new file mode 100644 index 0000000..f0176fa --- /dev/null +++ b/site/static/favicon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/site/static/jokes-data.js b/site/static/jokes-data.js new file mode 100644 index 0000000..18ef6d6 --- /dev/null +++ b/site/static/jokes-data.js @@ -0,0 +1 @@ +window.BDJ={"categories":[{"slug":"animals","name":"Animal Dad Jokes","emoji":"๐Ÿฆ"},{"slug":"food","name":"Food Dad Jokes","emoji":"๐Ÿ•"},{"slug":"work","name":"Work & Office Dad Jokes","emoji":"๐Ÿ’ผ"},{"slug":"school","name":"School & Teacher Dad Jokes","emoji":"๐ŸŽ’"},{"slug":"sports","name":"Sports Dad Jokes","emoji":"โšฝ"},{"slug":"tech","name":"Tech & Computer Dad Jokes","emoji":"๐Ÿ’ป"},{"slug":"family","name":"Family & Parenting Dad Jokes","emoji":"๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง"},{"slug":"weather","name":"Weather Dad Jokes","emoji":"โ›…"},{"slug":"space","name":"Space Dad Jokes","emoji":"๐Ÿš€"},{"slug":"travel","name":"Travel & Vacation Dad Jokes","emoji":"โœˆ๏ธ"},{"slug":"halloween","name":"Halloween Dad Jokes","emoji":"๐ŸŽƒ"},{"slug":"christmas","name":"Christmas Dad Jokes","emoji":"๐ŸŽ„"},{"slug":"knock-knock","name":"Knock-Knock Jokes","emoji":"๐Ÿšช"},{"slug":"one-liners","name":"Dad Joke One-Liners","emoji":"๐ŸŽค"}],"jokes":[{"id":0,"cat":"animals","type":"qa","s":"Why don't oysters share their pearls?","p":"Because they're shellfish."},{"id":1,"cat":"animals","type":"qa","s":"What do you call a bear with no teeth?","p":"A gummy bear."},{"id":2,"cat":"animals","type":"qa","s":"What do you call a sleeping bull?","p":"A bulldozer."},{"id":3,"cat":"animals","type":"qa","s":"Why are fish so smart?","p":"Because they live in schools."},{"id":4,"cat":"animals","type":"qa","s":"What do you call an alligator in a vest?","p":"An investigator."},{"id":5,"cat":"animals","type":"qa","s":"What do you call a fish without eyes?","p":"A fsh."},{"id":6,"cat":"animals","type":"qa","s":"What do you call a deer with no eyes?","p":"No eye deer."},{"id":7,"cat":"animals","type":"qa","s":"What do you call a deer with no eyes and no legs?","p":"Still no eye deer."},{"id":8,"cat":"animals","type":"qa","s":"Why do cows have hooves instead of feet?","p":"Because they lactose."},{"id":9,"cat":"animals","type":"qa","s":"What did the buffalo say when his son left for college?","p":"Bison."},{"id":10,"cat":"animals","type":"qa","s":"Why did the turtle cross the road?","p":"To get to the shell station."},{"id":11,"cat":"animals","type":"qa","s":"Why do seagulls fly over the sea?","p":"Because if they flew over the bay, they'd be bagels."},{"id":12,"cat":"animals","type":"qa","s":"What's a cat's favorite color?","p":"Purr-ple."},{"id":13,"cat":"animals","type":"qa","s":"Why did the dog sit in the shade?","p":"Because he didn't want to be a hot dog."},{"id":14,"cat":"animals","type":"qa","s":"What do you call a pig that does karate?","p":"A pork chop."},{"id":15,"cat":"animals","type":"qa","s":"How do bees get to school?","p":"On the school buzz."},{"id":16,"cat":"animals","type":"qa","s":"What do you call an owl that does magic tricks?","p":"Hoo-dini."},{"id":17,"cat":"animals","type":"qa","s":"Why don't ducks tell jokes when they fly?","p":"Because they'd quack up."},{"id":18,"cat":"animals","type":"qa","s":"What did the horse say when it tripped?","p":"Help! I've fallen and I can't giddyup!"},{"id":19,"cat":"animals","type":"qa","s":"What do you call a snake wearing a hard hat?","p":"A boa constructor."},{"id":20,"cat":"animals","type":"qa","s":"What's a frog's favorite type of shoes?","p":"Open-toad."},{"id":21,"cat":"animals","type":"qa","s":"What do you call a crab that plays baseball?","p":"A pinch hitter."},{"id":22,"cat":"animals","type":"qa","s":"What do you call a lazy kangaroo?","p":"A pouch potato."},{"id":23,"cat":"animals","type":"qa","s":"How does a penguin build its house?","p":"Igloos it together."},{"id":24,"cat":"animals","type":"qa","s":"How do you know if there's an elephant under your bed?","p":"Your nose touches the ceiling."},{"id":25,"cat":"animals","type":"qa","s":"Why do cows wear bells?","p":"Because their horns don't work."},{"id":26,"cat":"animals","type":"qa","s":"Why do seals swim in salt water?","p":"Because pepper water makes them sneeze."},{"id":27,"cat":"animals","type":"qa","s":"How many tickles does it take to make an octopus laugh?","p":"Ten-tickles."},{"id":28,"cat":"animals","type":"qa","s":"What do you call a magic dog?","p":"A labracadabrador."},{"id":29,"cat":"food","type":"qa","s":"Why did the tomato blush?","p":"Because it saw the salad dressing."},{"id":30,"cat":"food","type":"qa","s":"What do you call a fake noodle?","p":"An impasta."},{"id":31,"cat":"food","type":"qa","s":"Why did the cookie go to the doctor?","p":"Because it was feeling crummy."},{"id":32,"cat":"food","type":"qa","s":"What did the grape do when it got stepped on?","p":"It let out a little wine."},{"id":33,"cat":"food","type":"qa","s":"Why don't eggs tell jokes?","p":"They'd crack each other up."},{"id":34,"cat":"food","type":"qa","s":"What do you call cheese that isn't yours?","p":"Nacho cheese."},{"id":35,"cat":"food","type":"qa","s":"Why did the banana go to the doctor?","p":"It wasn't peeling well."},{"id":36,"cat":"food","type":"qa","s":"What's orange and sounds like a parrot?","p":"A carrot."},{"id":37,"cat":"food","type":"qa","s":"What does a lemon say when it answers the phone?","p":"Yellow!"},{"id":38,"cat":"food","type":"qa","s":"What did one plate say to the other plate?","p":"Dinner's on me."},{"id":39,"cat":"food","type":"qa","s":"Why did the yogurt go to the art exhibit?","p":"Because it was cultured."},{"id":40,"cat":"food","type":"qa","s":"What do you call a sad strawberry?","p":"A blueberry."},{"id":41,"cat":"food","type":"qa","s":"What did the baby corn say to the mama corn?","p":"Where's popcorn?"},{"id":42,"cat":"food","type":"qa","s":"Why did the chef get arrested?","p":"He was caught beating an egg."},{"id":43,"cat":"food","type":"qa","s":"What kind of room doesn't have doors?","p":"A mushroom."},{"id":44,"cat":"food","type":"qa","s":"What did the lettuce say to the celery?","p":"Romaine calm."},{"id":45,"cat":"food","type":"qa","s":"Why did the man put his money in the freezer?","p":"He wanted cold hard cash."},{"id":46,"cat":"food","type":"qa","s":"What did the hamburger name its daughter?","p":"Patty."},{"id":47,"cat":"food","type":"qa","s":"Why do bananas have to put on sunscreen at the beach?","p":"Otherwise they'd peel."},{"id":48,"cat":"food","type":"qa","s":"Why did the pizzeria owner go out of business?","p":"He couldn't make enough dough."},{"id":49,"cat":"food","type":"qa","s":"What do you call an avocado that's been blessed?","p":"Holy guacamole."},{"id":50,"cat":"food","type":"qa","s":"Why did the coffee file a police report?","p":"It got mugged."},{"id":51,"cat":"food","type":"qa","s":"What do you call a cow on a trampoline?","p":"A milkshake."},{"id":52,"cat":"food","type":"qa","s":"Why did the melons plan a big wedding?","p":"Because they cantaloupe."},{"id":53,"cat":"food","type":"qa","s":"What did the baby cookie's parents do when it cried?","p":"They felt crumby."},{"id":54,"cat":"work","type":"qa","s":"Why did the scarecrow win an award?","p":"He was outstanding in his field."},{"id":55,"cat":"work","type":"qa","s":"Why did the employee get fired from the calendar factory?","p":"He took a couple of days off."},{"id":56,"cat":"work","type":"qa","s":"My boss told me to have a good day.","p":"So I went home."},{"id":57,"cat":"work","type":"qa","s":"Why did the banker quit his job?","p":"He lost interest."},{"id":58,"cat":"work","type":"qa","s":"I used to work in a shoe recycling shop.","p":"It was sole destroying."},{"id":59,"cat":"work","type":"qa","s":"I got fired from the orange juice factory.","p":"I couldn't concentrate."},{"id":60,"cat":"work","type":"qa","s":"What did the janitor say when he jumped out of the supply closet?","p":"Supplies!"},{"id":61,"cat":"work","type":"qa","s":"Why do employees drink so much coffee at work?","p":"It's the weekend immune system that keeps them going."},{"id":62,"cat":"work","type":"qa","s":"I just got a job making clocks.","p":"It's about time."},{"id":63,"cat":"work","type":"qa","s":"I used to be a tailor.","p":"Turns out I wasn't suited for it."},{"id":64,"cat":"work","type":"qa","s":"I started a business making origami.","p":"Unfortunately, it folded."},{"id":65,"cat":"work","type":"qa","s":"How's my job security?","p":"Rock solid โ€” nobody else wants it."},{"id":66,"cat":"work","type":"qa","s":"Why did the pencil get a promotion?","p":"It was on point."},{"id":67,"cat":"work","type":"qa","s":"I asked my boss for a raise.","p":"He said the elevator does that, and handed me a ladder."},{"id":68,"cat":"work","type":"qa","s":"Why do bakers work so hard?","p":"Because they knead the dough."},{"id":69,"cat":"work","type":"qa","s":"I quit my job at the helium factory.","p":"I refused to be spoken to in that tone."},{"id":70,"cat":"work","type":"qa","s":"I got a job feeding the giraffes at the zoo.","p":"The pay is lousy, and it's a tall order."},{"id":71,"cat":"work","type":"qa","s":"Why did the calendar apply for the job?","p":"It had a lot of dates."},{"id":72,"cat":"work","type":"qa","s":"Retirement is the best job I've ever had.","p":"The pay is terrible, but the hours are great."},{"id":73,"cat":"work","type":"qa","s":"My boss said: dress for the job you want, not the job you have.","p":"Now HR is asking why I came to work dressed as the boss."},{"id":74,"cat":"school","type":"qa","s":"Why did the student eat his homework?","p":"Because the teacher said it was a piece of cake."},{"id":75,"cat":"school","type":"qa","s":"Why was the math book sad?","p":"It had too many problems."},{"id":76,"cat":"school","type":"qa","s":"Why did the teacher wear sunglasses to school?","p":"Because her students were so bright."},{"id":77,"cat":"school","type":"qa","s":"Who's the king of all school supplies?","p":"The ruler."},{"id":78,"cat":"school","type":"qa","s":"Why did the student bring a ladder to school?","p":"He wanted to go to high school."},{"id":79,"cat":"school","type":"qa","s":"Why was the equal sign so humble?","p":"It knew it wasn't less than or greater than anyone else."},{"id":80,"cat":"school","type":"qa","s":"What do you call a teacher who never farts in public?","p":"A private tutor."},{"id":81,"cat":"school","type":"qa","s":"Why did the music teacher need a ladder?","p":"To reach the high notes."},{"id":82,"cat":"school","type":"qa","s":"What did the paper say to the pencil?","p":"Write on!"},{"id":83,"cat":"school","type":"qa","s":"Why did the kid study in the airplane?","p":"He wanted a higher education."},{"id":84,"cat":"school","type":"qa","s":"Why was the geometry book so adorable?","p":"It had acute angles."},{"id":85,"cat":"school","type":"qa","s":"What's a math teacher's favorite tree?","p":"Geome-tree."},{"id":86,"cat":"school","type":"qa","s":"The past, the present, and the future walked into class.","p":"It was tense."},{"id":87,"cat":"school","type":"qa","s":"Why did the clock get in trouble at school?","p":"It kept tocking back."},{"id":88,"cat":"school","type":"qa","s":"Why don't you see giraffes in elementary school?","p":"They're all in high school."},{"id":89,"cat":"school","type":"qa","s":"Why did the geography teacher love the ocean?","p":"It was full of currents."},{"id":90,"cat":"school","type":"qa","s":"Teacher: 'Name two pronouns.'","p":"Student: 'Who, me?'"},{"id":91,"cat":"school","type":"qa","s":"Why do calculators make great friends?","p":"You can always count on them."},{"id":92,"cat":"school","type":"qa","s":"What's a pirate's favorite subject?","p":"ARRRR-t."},{"id":93,"cat":"school","type":"qa","s":"Why did the kid throw butter out the window?","p":"He wanted to see a butter fly."},{"id":94,"cat":"school","type":"qa","s":"Why did the child cross the playground?","p":"To get to the other slide."},{"id":95,"cat":"sports","type":"qa","s":"Why did the golfer bring two pairs of pants?","p":"In case he got a hole in one."},{"id":96,"cat":"sports","type":"qa","s":"Why did the bicycle fall over?","p":"It was two-tired."},{"id":97,"cat":"sports","type":"qa","s":"Why can't basketball players go on vacation?","p":"They'd get called for traveling."},{"id":98,"cat":"sports","type":"qa","s":"Why did the football coach go to the bank?","p":"To get his quarterback."},{"id":99,"cat":"sports","type":"qa","s":"What's a runner's favorite subject?","p":"Jog-raphy."},{"id":100,"cat":"sports","type":"qa","s":"Why did the soccer player bring string to the game?","p":"So he could tie the score."},{"id":101,"cat":"sports","type":"qa","s":"Why don't prisoners play tennis?","p":"Too many serves."},{"id":102,"cat":"sports","type":"qa","s":"Why did the baseball player get arrested?","p":"He stole second base."},{"id":103,"cat":"sports","type":"qa","s":"Why are basketball courts always wet?","p":"Because the players dribble."},{"id":104,"cat":"sports","type":"qa","s":"What's the difference between a bad golfer and a bad skydiver?","p":"A bad golfer goes WHACK... dang! A bad skydiver goes dang!... WHACK."},{"id":105,"cat":"sports","type":"qa","s":"I asked the marathon runner how the race went.","p":"He said it was a long story."},{"id":106,"cat":"sports","type":"qa","s":"What does a hockey player have in common with a magician?","p":"Hat tricks."},{"id":107,"cat":"sports","type":"qa","s":"Why was the baseball stadium so cool?","p":"Because it was full of fans."},{"id":108,"cat":"sports","type":"qa","s":"I told my personal trainer I wanted to learn to do the splits.","p":"She asked: 'How flexible are you?' I said: 'I can't make Tuesdays.'"},{"id":109,"cat":"sports","type":"qa","s":"Why did the golfer bring an extra sock?","p":"In case he got a hole in one."},{"id":110,"cat":"tech","type":"qa","s":"Why do programmers prefer dark mode?","p":"Because light attracts bugs."},{"id":111,"cat":"tech","type":"qa","s":"Why did the computer go to the doctor?","p":"It caught a virus."},{"id":112,"cat":"tech","type":"qa","s":"Why did the computer show up late to work?","p":"It had a hard drive."},{"id":113,"cat":"tech","type":"qa","s":"Why was the smartphone wearing glasses?","p":"It lost all its contacts."},{"id":114,"cat":"tech","type":"qa","s":"What do you call 8 hobbits?","p":"A hobbyte."},{"id":115,"cat":"tech","type":"qa","s":"Why did the developer go broke?","p":"He used up all his cache."},{"id":116,"cat":"tech","type":"qa","s":"Why do Java developers wear glasses?","p":"Because they don't C#."},{"id":117,"cat":"tech","type":"qa","s":"What do you call a computer that sings?","p":"A Dell."},{"id":118,"cat":"tech","type":"qa","s":"What did the mouse say to the keyboard?","p":"You're just my type."},{"id":119,"cat":"tech","type":"qa","s":"Why did the robot go on vacation?","p":"He needed to recharge."},{"id":120,"cat":"tech","type":"qa","s":"What's a computer's favorite snack?","p":"Microchips."},{"id":121,"cat":"tech","type":"qa","s":"Why did the Wi-Fi go to therapy?","p":"It felt disconnected."},{"id":122,"cat":"tech","type":"qa","s":"How does a computer get drunk?","p":"It takes screenshots."},{"id":123,"cat":"tech","type":"qa","s":"Why did the PowerPoint presentation cross the road?","p":"To get to the other slide."},{"id":124,"cat":"tech","type":"qa","s":"How many programmers does it take to change a light bulb?","p":"None โ€” that's a hardware problem."},{"id":125,"cat":"tech","type":"qa","s":"Why was the JavaScript developer sad?","p":"He didn't Node how to Express himself."},{"id":126,"cat":"tech","type":"qa","s":"What did the router say to the doctor?","p":"It hurts when IP."},{"id":127,"cat":"tech","type":"qa","s":"Why do keyboards never sleep?","p":"They have two shifts."},{"id":128,"cat":"tech","type":"qa","s":"I would tell you a UDP joke...","p":"...but you might not get it."},{"id":129,"cat":"family","type":"qa","s":"Kid: 'Dad, can you put my shoes on?'","p":"Dad: 'No, they don't fit me.'"},{"id":130,"cat":"family","type":"qa","s":"Kid: 'Dad, make me a sandwich!'","p":"Dad: 'Poof! You're a sandwich.'"},{"id":131,"cat":"family","type":"qa","s":"Why did the dad bring a pencil to bed?","p":"To draw the curtains."},{"id":132,"cat":"family","type":"qa","s":"Why did grandpa put wheels on his rocking chair?","p":"He wanted to rock and roll."},{"id":133,"cat":"family","type":"qa","s":"What did the mother rope say to the child rope?","p":"Don't be knotty."},{"id":134,"cat":"family","type":"qa","s":"Why did the toddler put sugar under his pillow?","p":"He wanted sweet dreams."},{"id":135,"cat":"family","type":"qa","s":"Kid: 'Dad, how do I look?'","p":"Dad: 'With your eyes.'"},{"id":136,"cat":"family","type":"qa","s":"I used to play piano by ear.","p":"Now I use my hands."},{"id":137,"cat":"family","type":"qa","s":"Kid: 'Dad, can you tell me what a solar eclipse is?'","p":"Dad: 'No sun.'"},{"id":138,"cat":"family","type":"qa","s":"Why did the baby strawberry cry?","p":"Its parents were in a jam."},{"id":139,"cat":"family","type":"qa","s":"Kid: 'I'm cold.'","p":"Dad: 'Go stand in the corner โ€” it's 90 degrees.'"},{"id":140,"cat":"family","type":"qa","s":"Why did the dad stare at the carton of orange juice?","p":"Because it said 'concentrate.'"},{"id":141,"cat":"family","type":"qa","s":"What did the baby computer call its parent?","p":"Data."},{"id":142,"cat":"family","type":"qa","s":"Why did the cookie cry in kindergarten?","p":"His mom had been a wafer too long."},{"id":143,"cat":"weather","type":"qa","s":"What does a cloud wear under its raincoat?","p":"Thunderwear."},{"id":144,"cat":"weather","type":"qa","s":"What did one raindrop say to the other?","p":"Two's company, three's a cloud."},{"id":145,"cat":"weather","type":"qa","s":"What do you call it when it rains chickens and ducks?","p":"Fowl weather."},{"id":146,"cat":"weather","type":"qa","s":"I tried to catch some fog earlier.","p":"I mist."},{"id":147,"cat":"weather","type":"qa","s":"What does the wind say on Valentine's Day?","p":"I'm a big fan of yours."},{"id":148,"cat":"weather","type":"qa","s":"Why did the sun go to school?","p":"To get brighter."},{"id":149,"cat":"weather","type":"qa","s":"What falls in winter but never gets hurt?","p":"Snow."},{"id":150,"cat":"weather","type":"qa","s":"Why did the weather want privacy?","p":"It was changing."},{"id":151,"cat":"weather","type":"qa","s":"What's a tornado's favorite game?","p":"Twister."},{"id":152,"cat":"weather","type":"qa","s":"What do snowmen call their offspring?","p":"Chill-dren."},{"id":153,"cat":"weather","type":"qa","s":"What's a rainbow's favorite accessory?","p":"A bow-tie."},{"id":154,"cat":"weather","type":"qa","s":"Why don't mountains ever get cold in winter?","p":"They wear snowcaps."},{"id":155,"cat":"weather","type":"qa","s":"What do you get when you leave a dog out in the cold?","p":"A chili dog."},{"id":156,"cat":"weather","type":"qa","s":"The forecast said it would rain cats and dogs.","p":"I went outside and stepped in a poodle."},{"id":157,"cat":"space","type":"qa","s":"How does the moon cut its hair?","p":"Eclipse it."},{"id":158,"cat":"space","type":"qa","s":"How do you organize a party in space?","p":"You planet."},{"id":159,"cat":"space","type":"qa","s":"Why is the moon always broke?","p":"It's down to its last quarter."},{"id":160,"cat":"space","type":"qa","s":"What do you call an alien with three eyes?","p":"An aliiien."},{"id":161,"cat":"space","type":"qa","s":"Why did the astronaut break up with his girlfriend?","p":"He needed space."},{"id":162,"cat":"space","type":"qa","s":"What kind of music do planets listen to?","p":"Neptunes."},{"id":163,"cat":"space","type":"qa","s":"What did Saturn say to Jupiter?","p":"Give me a ring sometime."},{"id":164,"cat":"space","type":"qa","s":"What do astronauts use to keep their pants up?","p":"An asteroid belt."},{"id":165,"cat":"space","type":"qa","s":"Why aren't astronauts hungry after they blast off?","p":"Because they've had a big launch."},{"id":166,"cat":"space","type":"qa","s":"What's an astronaut's favorite part of a computer?","p":"The space bar."},{"id":167,"cat":"space","type":"qa","s":"Why did the cow become an astronaut?","p":"To see the moooon."},{"id":168,"cat":"space","type":"qa","s":"What do you call a space magician?","p":"A flying saucerer."},{"id":169,"cat":"space","type":"qa","s":"Why couldn't the astronaut book a hotel room on the moon?","p":"Because it was full."},{"id":170,"cat":"space","type":"qa","s":"How do astronauts serve their dinner?","p":"On flying saucers."},{"id":171,"cat":"travel","type":"qa","s":"What do you call a mountain that's really funny?","p":"Hill-arious."},{"id":172,"cat":"travel","type":"qa","s":"Why did the airplane get sent to its room?","p":"For bad altitude."},{"id":173,"cat":"travel","type":"qa","s":"Why did the car apply for a job?","p":"It was tired of sitting idle."},{"id":174,"cat":"travel","type":"qa","s":"What did the beach say as the tide came in?","p":"Long time, no sea."},{"id":175,"cat":"travel","type":"qa","s":"Where do sharks go on vacation?","p":"Fin-land."},{"id":176,"cat":"travel","type":"qa","s":"Where do pencils go on vacation?","p":"Pencil-vania."},{"id":177,"cat":"travel","type":"qa","s":"What do you call a train that sneezes?","p":"Achoo-choo train."},{"id":178,"cat":"travel","type":"qa","s":"Why did the man bring a ladder to the airport?","p":"He heard the fares were sky high."},{"id":179,"cat":"travel","type":"qa","s":"Why did the suitcase go to therapy?","p":"It had too much baggage."},{"id":180,"cat":"travel","type":"qa","s":"Where do sick boats go?","p":"To the dock."},{"id":181,"cat":"travel","type":"qa","s":"What's the fastest country in the world?","p":"Rush-a."},{"id":182,"cat":"travel","type":"qa","s":"What's the fastest vegetable?","p":"A runner bean."},{"id":183,"cat":"travel","type":"qa","s":"What did the ocean say to the beach?","p":"Nothing โ€” it just waved."},{"id":184,"cat":"travel","type":"qa","s":"Where do math teachers go on vacation?","p":"Times Square."},{"id":185,"cat":"travel","type":"qa","s":"Why don't calendars ever take a vacation?","p":"Their days are numbered."},{"id":186,"cat":"halloween","type":"qa","s":"Why don't skeletons ever fight each other?","p":"They don't have the guts."},{"id":187,"cat":"halloween","type":"qa","s":"What do you call a witch's garage?","p":"A broom closet."},{"id":188,"cat":"halloween","type":"qa","s":"Why did the vampire subscribe to the newspaper?","p":"He heard it had great circulation."},{"id":189,"cat":"halloween","type":"qa","s":"What's a ghost's favorite dessert?","p":"I scream."},{"id":190,"cat":"halloween","type":"qa","s":"Why don't mummies take vacations?","p":"They're afraid to unwind."},{"id":191,"cat":"halloween","type":"qa","s":"What do you call a monster who poisons corn flakes?","p":"A cereal killer."},{"id":192,"cat":"halloween","type":"qa","s":"Why are ghosts such bad liars?","p":"You can see right through them."},{"id":193,"cat":"halloween","type":"qa","s":"What do you get when you cross a snowman with a vampire?","p":"Frostbite."},{"id":194,"cat":"halloween","type":"qa","s":"Why did the skeleton go to the party alone?","p":"He had no body to go with him."},{"id":195,"cat":"halloween","type":"qa","s":"What kind of music do mummies listen to?","p":"Wrap music."},{"id":196,"cat":"halloween","type":"qa","s":"What did the skeleton order at the restaurant?","p":"Spare ribs."},{"id":197,"cat":"halloween","type":"qa","s":"Why do witches ride brooms?","p":"Vacuum cleaners are too expensive."},{"id":198,"cat":"halloween","type":"qa","s":"What do you call a haunted chicken?","p":"A poultry-geist."},{"id":199,"cat":"halloween","type":"qa","s":"Why did the ghost go to the bar?","p":"For the boos."},{"id":200,"cat":"halloween","type":"qa","s":"How do you make a skeleton laugh?","p":"Tickle its funny bone."},{"id":201,"cat":"halloween","type":"qa","s":"What's a vampire's favorite fruit?","p":"A blood orange."},{"id":202,"cat":"christmas","type":"qa","s":"What do you call Santa's little helpers?","p":"Subordinate Clauses."},{"id":203,"cat":"christmas","type":"qa","s":"What do you call Santa when he takes a break?","p":"Santa Pause."},{"id":204,"cat":"christmas","type":"qa","s":"What do snowmen eat for breakfast?","p":"Snowflakes."},{"id":205,"cat":"christmas","type":"qa","s":"What did one snowman say to the other snowman?","p":"Do you smell carrots?"},{"id":206,"cat":"christmas","type":"qa","s":"Why does Santa go down the chimney?","p":"Because it soots him."},{"id":207,"cat":"christmas","type":"qa","s":"What do you get when you cross Santa with a duck?","p":"A Christmas quacker."},{"id":208,"cat":"christmas","type":"qa","s":"Why did the Christmas tree go to the barber?","p":"It needed a trim."},{"id":209,"cat":"christmas","type":"qa","s":"What do elves learn in school?","p":"The elf-abet."},{"id":210,"cat":"christmas","type":"qa","s":"What's every parent's favorite Christmas carol?","p":"Silent Night."},{"id":211,"cat":"christmas","type":"qa","s":"What do you call an old snowman?","p":"Water."},{"id":212,"cat":"christmas","type":"qa","s":"Why are Christmas trees so bad at knitting?","p":"They always drop their needles."},{"id":213,"cat":"christmas","type":"qa","s":"What does the gingerbread man use to make his bed?","p":"Cookie sheets."},{"id":214,"cat":"christmas","type":"qa","s":"Why did Rudolph get a bad report card?","p":"Because he went down in history."},{"id":215,"cat":"christmas","type":"qa","s":"What do you sing at a snowman's birthday party?","p":"Freeze a jolly good fellow."},{"id":216,"cat":"christmas","type":"qa","s":"What's a Christmas tree's favorite candy?","p":"Orna-mints."},{"id":217,"cat":"knock-knock","type":"knock","s":"Knock knock.\nWho's there?\nBoo.\nBoo who?","p":"Don't cry โ€” it's just a joke!"},{"id":218,"cat":"knock-knock","type":"knock","s":"Knock knock.\nWho's there?\nLettuce.\nLettuce who?","p":"Lettuce in, it's freezing out here!"},{"id":219,"cat":"knock-knock","type":"knock","s":"Knock knock.\nWho's there?\nCargo.\nCargo who?","p":"No โ€” car go vroom vroom!"},{"id":220,"cat":"knock-knock","type":"knock","s":"Knock knock.\nWho's there?\nTank.\nTank who?","p":"You're welcome!"},{"id":221,"cat":"knock-knock","type":"knock","s":"Knock knock.\nWho's there?\nInterrupting cow.\nInterrupting cโ€”","p":"MOO!"},{"id":222,"cat":"knock-knock","type":"knock","s":"Knock knock.\nWho's there?\nHarry.\nHarry who?","p":"Harry up and open the door!"},{"id":223,"cat":"knock-knock","type":"knock","s":"Knock knock.\nWho's there?\nOlive.\nOlive who?","p":"Olive you and I miss you!"},{"id":224,"cat":"knock-knock","type":"knock","s":"Knock knock.\nWho's there?\nCandice.\nCandice who?","p":"Candice door open, or what?"},{"id":225,"cat":"knock-knock","type":"knock","s":"Knock knock.\nWho's there?\nAtch.\nAtch who?","p":"Bless you!"},{"id":226,"cat":"knock-knock","type":"knock","s":"Knock knock.\nWho's there?\nAmish.\nAmish who?","p":"Aww โ€” I miss you too!"},{"id":227,"cat":"knock-knock","type":"knock","s":"Knock knock.\nWho's there?\nEurope.\nEurope who?","p":"No, YOU'RE a poo!"},{"id":228,"cat":"knock-knock","type":"knock","s":"Knock knock.\nWho's there?\nJustin.\nJustin who?","p":"Justin time for dinner!"},{"id":229,"cat":"knock-knock","type":"knock","s":"Knock knock.\nWho's there?\nDwayne.\nDwayne who?","p":"Dwayne the bathtub, I'm dwowning!"},{"id":230,"cat":"knock-knock","type":"knock","s":"Knock knock.\nWho's there?\nKen.\nKen who?","p":"Ken you open the door, please?"},{"id":231,"cat":"knock-knock","type":"knock","s":"Knock knock.\nWho's there?\nAlpaca.\nAlpaca who?","p":"Alpaca the suitcase, you load up the car!"},{"id":232,"cat":"knock-knock","type":"knock","s":"Knock knock.\nWho's there?\nAnita.\nAnita who?","p":"Anita borrow your pencil!"},{"id":233,"cat":"knock-knock","type":"knock","s":"Knock knock.\nWho's there?\nGorilla.\nGorilla who?","p":"Gorilla cheese sandwich for me, I'm starving!"},{"id":234,"cat":"knock-knock","type":"knock","s":"Knock knock.\nWho's there?\nNobel.\nNobel who?","p":"No bell โ€” that's why I knocked!"},{"id":235,"cat":"knock-knock","type":"knock","s":"Knock knock.\nWho's there?\nDoris.\nDoris who?","p":"Doris locked โ€” that's why I'm knocking!"},{"id":236,"cat":"knock-knock","type":"knock","s":"Knock knock.\nWho's there?\nAardvark.\nAardvark who?","p":"Aardvark a hundred miles for one of your smiles!"},{"id":237,"cat":"one-liners","type":"line","s":"I'm reading a book about anti-gravity.","p":"I just can't put it down."},{"id":238,"cat":"one-liners","type":"line","s":"I used to hate facial hair.","p":"Then it grew on me."},{"id":239,"cat":"one-liners","type":"line","s":"What's brown and sticky?","p":"A stick."},{"id":240,"cat":"one-liners","type":"line","s":"I told my wife she was drawing her eyebrows too high.","p":"She looked surprised."},{"id":241,"cat":"one-liners","type":"line","s":"I don't trust stairs.","p":"They're always up to something."},{"id":242,"cat":"one-liners","type":"line","s":"I'm on a seafood diet.","p":"I see food and I eat it."},{"id":243,"cat":"one-liners","type":"line","s":"What do you call a fish wearing a bowtie?","p":"Sofishticated."},{"id":244,"cat":"one-liners","type":"line","s":"I stayed up all night wondering where the sun went.","p":"Then it dawned on me."},{"id":245,"cat":"one-liners","type":"line","s":"I'd tell you a construction joke...","p":"...but I'm still working on it."},{"id":246,"cat":"one-liners","type":"line","s":"I know a lot of jokes about retired people.","p":"Sadly, none of them work."},{"id":247,"cat":"one-liners","type":"line","s":"I ordered a chicken and an egg from an online store.","p":"I'll let you know."},{"id":248,"cat":"one-liners","type":"line","s":"What time did the man go to the dentist?","p":"Tooth hurty."},{"id":249,"cat":"one-liners","type":"line","s":"Did you hear about the kidnapping at school?","p":"It's fine โ€” he woke up."},{"id":250,"cat":"one-liners","type":"line","s":"What do you call a boomerang that doesn't come back?","p":"A stick."},{"id":251,"cat":"one-liners","type":"line","s":"I only know 25 letters of the alphabet.","p":"I don't know y."},{"id":252,"cat":"one-liners","type":"line","s":"Did you hear about the restaurant on the moon?","p":"Great food, no atmosphere."},{"id":253,"cat":"one-liners","type":"line","s":"Why do we tell actors to 'break a leg'?","p":"Because every play has a cast."},{"id":254,"cat":"one-liners","type":"line","s":"What do you call a factory that makes okay products?","p":"A satisfactory."},{"id":255,"cat":"one-liners","type":"line","s":"Dear algebra,","p":"Stop asking us to find your X. She's never coming back โ€” and don't ask Y."},{"id":256,"cat":"one-liners","type":"line","s":"What's the difference between ignorance and apathy?","p":"I don't know and I don't care."},{"id":257,"cat":"one-liners","type":"line","s":"I asked my dog what's two minus two.","p":"He said nothing."},{"id":258,"cat":"one-liners","type":"line","s":"What do you call a parade of rabbits hopping backwards?","p":"A receding hare-line."},{"id":259,"cat":"one-liners","type":"line","s":"What do you call a sleeping dinosaur?","p":"A dino-snore."},{"id":260,"cat":"one-liners","type":"line","s":"What do you call a man with a rubber toe?","p":"Roberto."},{"id":261,"cat":"one-liners","type":"line","s":"Why did the two 4s skip dinner?","p":"They already 8."},{"id":262,"cat":"one-liners","type":"line","s":"What do you call a sheep with no legs?","p":"A cloud."},{"id":263,"cat":"one-liners","type":"line","s":"Why did the picture go to jail?","p":"Because it was framed."},{"id":264,"cat":"one-liners","type":"line","s":"What did the man say when he walked into a bar?","p":"Ouch."},{"id":265,"cat":"one-liners","type":"line","s":"Why did the man fall down the well?","p":"He couldn't see that well."},{"id":266,"cat":"one-liners","type":"line","s":"What's red and bad for your teeth?","p":"A brick."},{"id":267,"cat":"one-liners","type":"line","s":"Why was 6 afraid of 7?","p":"Because 7 8 9."},{"id":268,"cat":"one-liners","type":"line","s":"What did the zero say to the eight?","p":"Nice belt."},{"id":269,"cat":"one-liners","type":"line","s":"Why can't your nose be 12 inches long?","p":"Because then it would be a foot."},{"id":270,"cat":"one-liners","type":"line","s":"I'm terrified of elevators.","p":"So I'm taking steps to avoid them."},{"id":271,"cat":"one-liners","type":"line","s":"Why don't scientists trust atoms?","p":"Because they make up everything."},{"id":272,"cat":"one-liners","type":"line","s":"What did the Buddhist monk say to the hot dog vendor?","p":"Make me one with everything."},{"id":273,"cat":"food","type":"qa","s":"What do you call a sad cup of coffee?","p":"A depres-so."},{"id":274,"cat":"food","type":"qa","s":"How do coffee cups show their love?","p":"With mugs and kisses."},{"id":275,"cat":"food","type":"qa","s":"Where do coffee beans go for a night out?","p":"The coffee bar."},{"id":276,"cat":"food","type":"qa","s":"Why was the espresso checking its watch?","p":"It was pressed for time."},{"id":277,"cat":"food","type":"qa","s":"What's a coffee's favorite magic spell?","p":"Espresso Patronum!"},{"id":278,"cat":"food","type":"qa","s":"Why don't coffees ever gossip?","p":"They don't want to spill the beans."},{"id":279,"cat":"food","type":"qa","s":"How does coffee show it cares?","p":"It gives you a latte attention."},{"id":280,"cat":"animals","type":"qa","s":"What do you call a pile of kittens?","p":"A meow-ntain."},{"id":281,"cat":"animals","type":"qa","s":"Why don't cats play poker in the jungle?","p":"Too many cheetahs."},{"id":282,"cat":"animals","type":"qa","s":"What's a cat's favorite dessert?","p":"Mice cream."},{"id":283,"cat":"animals","type":"qa","s":"Why did the cat sit on the computer?","p":"To keep an eye on the mouse."},{"id":284,"cat":"animals","type":"qa","s":"What do you call a cat that works at a hospital?","p":"A purr-fessional."},{"id":285,"cat":"animals","type":"qa","s":"How do cats end a fight?","p":"They hiss and make up."},{"id":286,"cat":"animals","type":"qa","s":"Why is everyone so excited about the cat's new job?","p":"Because it's feline good."},{"id":287,"cat":"animals","type":"qa","s":"Why did the dog cross the road?","p":"To get to the barking lot."},{"id":288,"cat":"animals","type":"qa","s":"What kind of dog loves surround sound?","p":"A subwoofer."},{"id":289,"cat":"animals","type":"qa","s":"Why do dogs run in circles?","p":"Because it's too hard to run in squares."},{"id":290,"cat":"animals","type":"qa","s":"What's a dog's favorite instrument?","p":"The trom-BONE."},{"id":291,"cat":"animals","type":"qa","s":"How did the puppy feel after finishing its homework?","p":"Ruff."},{"id":292,"cat":"animals","type":"qa","s":"Why did the dachshund sit by the fire?","p":"It was a cold dog."},{"id":293,"cat":"animals","type":"qa","s":"What breed of dog can jump higher than a house?","p":"Any breed โ€” houses can't jump."},{"id":294,"cat":"work","type":"qa","s":"Why did the penny get promoted?","p":"It made perfect cents."},{"id":295,"cat":"work","type":"qa","s":"What do you call a rich fish?","p":"A goldfish."},{"id":296,"cat":"work","type":"qa","s":"Why did the dollar bill break up with the coin?","p":"It needed some change."},{"id":297,"cat":"work","type":"qa","s":"What happened to the man who put $20 into a vending machine?","p":"Nothing โ€” he's still waiting for his two cents."},{"id":298,"cat":"work","type":"qa","s":"Why was the money exhausted?","p":"It was spent."},{"id":299,"cat":"work","type":"qa","s":"Where do cows invest their money?","p":"In moo-tual funds."},{"id":300,"cat":"one-liners","type":"line","s":"What's a nap's favorite kind of movie?","p":"A sleeper hit."},{"id":301,"cat":"one-liners","type":"line","s":"Why did the pillow go to the doctor?","p":"It was feeling down."},{"id":302,"cat":"one-liners","type":"line","s":"Why are blankets so good at ending arguments?","p":"They know how to wrap things up."},{"id":303,"cat":"one-liners","type":"line","s":"I'm great at sleeping.","p":"I can do it with my eyes closed."},{"id":304,"cat":"one-liners","type":"line","s":"Why was everyone so tired on the morning of April 1st?","p":"They'd just finished a 31-day March."},{"id":305,"cat":"family","type":"qa","s":"Why did the two antennas get married?","p":"The ceremony was okay, but the reception was excellent."},{"id":306,"cat":"family","type":"qa","s":"What did the paper clip say to the magnet?","p":"I find you very attractive."},{"id":307,"cat":"family","type":"qa","s":"What's the most romantic part about the ocean?","p":"When the buoy meets gull."},{"id":308,"cat":"family","type":"qa","s":"Kid: 'Do you have a date for Valentine's Day?'","p":"Dad: 'Sure โ€” February 14th.'"},{"id":309,"cat":"family","type":"qa","s":"My wife told me to stop impersonating a flamingo.","p":"I had to put my foot down."},{"id":310,"cat":"family","type":"qa","s":"Why do candles love birthdays?","p":"They get to be the light of the party."},{"id":311,"cat":"family","type":"qa","s":"What did the elephant want for its birthday?","p":"A trunk full of presents."},{"id":312,"cat":"family","type":"qa","s":"Why was the birthday cake as hard as a rock?","p":"It was marble cake."},{"id":313,"cat":"family","type":"qa","s":"What does a clam do on its birthday?","p":"It shellabrates."},{"id":314,"cat":"family","type":"qa","s":"What did the pirate say on his 80th birthday?","p":"Aye matey!"},{"id":315,"cat":"food","type":"qa","s":"What does an aardvark like on its pizza?","p":"Ant-chovies."},{"id":316,"cat":"food","type":"qa","s":"Why did the hipster burn his tongue on his pizza?","p":"He ate it before it was cool."},{"id":317,"cat":"food","type":"qa","s":"What kind of pizza do dogs order?","p":"Pup-peroni."},{"id":318,"cat":"food","type":"qa","s":"What's the difference between a pizza and my pizza jokes?","p":"The pizza can actually feed a family."},{"id":319,"cat":"weather","type":"qa","s":"How does a snowman get around town?","p":"On an icicle."},{"id":320,"cat":"weather","type":"qa","s":"What did the icy road say to the truck?","p":"Want to go for a spin?"},{"id":321,"cat":"weather","type":"qa","s":"How do you prevent a summer cold?","p":"Catch it in the winter."}]}; \ No newline at end of file diff --git a/site/static/main.js b/site/static/main.js new file mode 100644 index 0000000..63e0d5c --- /dev/null +++ b/site/static/main.js @@ -0,0 +1,235 @@ +/* BestDadJokes.lol client-side behavior */ +(function () { + 'use strict'; + document.body.classList.add('js-ux'); + + var JOKES = (window.BDJ && window.BDJ.jokes) || []; + function byId(id) { return JOKES[id]; } + + function $(sel, root) { return (root || document).querySelector(sel); } + function $$(sel, root) { return Array.prototype.slice.call((root || document).querySelectorAll(sel)); } + + /* ---- punchline reveal ---- */ + document.addEventListener('click', function (e) { + var punch = e.target.closest && e.target.closest('[data-punch]'); + if (punch && !punch.classList.contains('revealed')) { + punch.classList.add('revealed'); + } + }); + + /* ---- random ---- */ + var lastId = -1; + function randomJoke() { + if (!JOKES.length) return null; + var j, guard = 0; + do { j = JOKES[Math.floor(Math.random() * JOKES.length)]; guard++; } + while (j.id === lastId && guard < 20 && JOKES.length > 1); + lastId = j.id; + return j; + } + function fillRandom(setupEl, punchEl) { + var j = randomJoke(); + if (!j) return null; + setupEl.textContent = j.s; + punchEl.textContent = j.p; + punchEl.classList.add('revealed'); + punchEl.setAttribute('data-no-blur', ''); + return j; + } + + /* ---- clipboard ---- */ + function copyText(text, btn) { + function ok() { if (btn) { var o = btn.textContent; btn.textContent = 'โœ… Copied'; setTimeout(function () { btn.textContent = o; }, 1400); } } + if (navigator.clipboard && navigator.clipboard.writeText) { + navigator.clipboard.writeText(text).then(ok, function () { legacy(); }); + } else { legacy(); } + function legacy() { + var ta = document.createElement('textarea'); + ta.value = text; document.body.appendChild(ta); ta.select(); + try { document.execCommand('copy'); ok(); } catch (err) {} + document.body.removeChild(ta); + } + } + + /* ---- share card (1080x1350) ---- */ + function wrapText(ctx, text, x, y, maxW, lh) { + var words = text.split(' '), line = '', lines = []; + words.forEach(function (w) { + var test = line + w + ' '; + if (ctx.measureText(test).width > maxW && line) { lines.push(line.trim()); line = w + ' '; } + else { line = test; } + }); + lines.push(line.trim()); + lines.forEach(function (l, i) { ctx.fillText(l, x, y + i * lh); }); + return y + lines.length * lh; + } + function makeCard(setup, punch, cb) { + var c = document.createElement('canvas'); + c.width = 1080; c.height = 1350; + var ctx = c.getContext('2d'); + ctx.fillStyle = '#fff8ec'; ctx.fillRect(0, 0, 1080, 1350); + // border frame + ctx.strokeStyle = '#2b2118'; ctx.lineWidth = 8; + ctx.strokeRect(36, 36, 1008, 1278); + // emoji + ctx.font = '110px serif'; ctx.textAlign = 'center'; + ctx.fillText('๐Ÿ˜‚', 540, 240); + // setup + ctx.fillStyle = '#2b2118'; ctx.textAlign = 'center'; + ctx.font = '700 54px ui-rounded, -apple-system, "Segoe UI", Arial, sans-serif'; + var y = wrapText(ctx, setup, 540, 380, 880, 72); + // punchline + ctx.fillStyle = '#e4572e'; + ctx.font = '800 66px ui-rounded, -apple-system, "Segoe UI", Arial, sans-serif'; + y = wrapText(ctx, punch, 540, y + 150, 880, 86); + // footer + ctx.fillStyle = '#5c4f43'; ctx.font = '700 34px -apple-system, "Segoe UI", Arial, sans-serif'; + ctx.fillText('BestDadJokes.lol', 540, 1240); + cb(c); + } + function shareCard(setup, punch) { + var name = 'dad-joke.png'; + makeCard(setup, punch, function (canvas) { + if (navigator.canShare && navigator.share) { + canvas.toBlob(function (blob) { + if (!blob) return; + var file = new File([blob], name, { type: 'image/png' }); + if (navigator.canShare({ files: [file] })) { + navigator.share({ files: [file], title: 'A dad joke for you' }).catch(function () {}); + } + }, 'image/png'); + } else { + var a = document.createElement('a'); + a.download = name; a.href = canvas.toDataURL('image/png'); + document.body.appendChild(a); a.click(); document.body.removeChild(a); + } + }); + } + + function wireCard(opts) { + var setupEl = $(opts.setup), punchEl = $(opts.punch); + if (!setupEl || !punchEl) return; + var current = opts.initial || null; + if (opts.nextBtn) { + $(opts.nextBtn).addEventListener('click', function () { current = fillRandom(setupEl, punchEl); }); + } + if (opts.copyBtn) { + $(opts.copyBtn).addEventListener('click', function (e) { + if (current) copyText(current.s + ' ' + current.p, e.target); + }); + } + if (opts.shareBtn) { + $(opts.shareBtn).addEventListener('click', function () { + if (current) shareCard(current.s, current.p); + }); + } + return { + get: function () { return current; }, + set: function (j) { current = j; setupEl.textContent = j.s; punchEl.textContent = j.p; punchEl.classList.add('revealed'); punchEl.setAttribute('data-no-blur', ''); } + }; + } + + /* ---- page-specific wiring ---- */ + // hero + var hero = wireCard({ setup: '[data-hero-setup]', punch: '[data-hero-punch]', nextBtn: '[data-hero-next]', copyBtn: '[data-copy-hero]', shareBtn: '[data-share-hero]' }); + if (hero) hero.set(randomJoke()); + + // generator + wireCard({ setup: '[data-gen-setup]', punch: '[data-gen-punch]', nextBtn: '[data-gen-next]', copyBtn: '[data-gen-copy]', shareBtn: '[data-gen-share]' }); + + // joke of the day (+ ?d= override for archive permalinks) + var jodSetup = $('[data-jod-setup]'); + if (jodSetup) { + var m = /[?&]d=(\d{4}-\d{2}-\d{2})/.exec(location.search); + var base = new Date(Date.UTC(2026, 8, 15)); // launch epoch for the rotation + var jod = null; + if (m) { + var parts = m[1].split('-'), d = new Date(Date.UTC(+parts[0], +parts[1] - 1, +parts[2])); + if (!isNaN(d.getTime())) { + var idx = Math.floor((d - new Date(d.getUTCFullYear(), 0, 1)) / 86400000) + d.getUTCMonth() * 31 + d.getUTCDate(); + jod = JOKES[(d.getTime() / 86400000 | 0) % JOKES.length] || JOKES[0]; + $('[data-jod-date]').textContent = d.toUTCString().slice(0, 16); + var ctl = { setup: '[data-jod-setup]', punch: '[data-jod-punch]' }; + jodSetup.textContent = jod.s; + $('[data-jod-punch]').textContent = jod.p; + $('[data-jod-punch]').classList.add('revealed'); + $('[data-jod-punch]').setAttribute('data-no-blur', ''); + } + } + var jodCopy = $('[data-jod-copy]'); + if (jodCopy) { + var punchEl = $('[data-jod-punch]'); + jodCopy.addEventListener('click', function (e) { copyText(jodSetup.textContent + ' ' + punchEl.textContent, e.target); }); + } + var jodShare = $('[data-jod-share]'); + if (jodShare) { + jodShare.addEventListener('click', function () { shareCard(jodSetup.textContent, $('[data-jod-punch]').textContent); }); + } + // archive: last 30 days + var arch = $('[data-jod-archive]'); + if (arch && JOKES.length) { + var today = new Date(); + var html = ''; + for (var i = 1; i <= 30; i++) { + var dd = new Date(today.getTime() - i * 86400000); + var iso = dd.toISOString().slice(0, 10); + var jj = JOKES[Math.floor(dd.getTime() / 86400000) % JOKES.length]; + html += '

' + iso + '

' + + '

' + jj.s.replace(/' + + '

' + jj.p.replace(/
'; + } + arch.innerHTML = html; + } + } + + /* ---- per-card copy/share buttons ---- */ + document.addEventListener('click', function (e) { + var t = e.target; + if (t.hasAttribute && t.hasAttribute('data-copy')) { + var j = byId(+t.getAttribute('data-copy')); + if (j) copyText(j.s + ' ' + j.p, t); + } + if (t.hasAttribute && t.hasAttribute('data-share')) { + var jj = byId(+t.getAttribute('data-share')); + if (jj) shareCard(jj.s, jj.p); + } + }); + + /* ---- search ---- */ + var box = $('#search-box'); + if (box) { + var results = $('[data-search-results]'); + var countEl = $('[data-search-count]'); + var emptyEl = $('[data-search-empty]'); + function renderResults(q) { + q = q.trim().toLowerCase(); + var hits = []; + if (q.length > 1) { + hits = JOKES.filter(function (j) { + return (j.s + ' ' + j.p).toLowerCase().indexOf(q) !== -1; + }).slice(0, 60); + } + countEl.textContent = q.length > 1 ? hits.length + ' joke' + (hits.length === 1 ? '' : 's') + ' matching "' + q + '"' : ''; + emptyEl.style.display = (q.length > 1 && !hits.length) ? 'block' : 'none'; + results.innerHTML = hits.map(function (j) { + return '

' + j.s.replace(/' + + '

' + j.p.replace(/' + + '
' + + 'Category โ†’
'; + }).join(''); + } + box.addEventListener('input', function () { renderResults(box.value); }); + var q = /[?&]q=([^&]*)/.exec(location.search); + if (q) { box.value = decodeURIComponent(q[1].replace(/\+/g, ' ')); } + renderResults(box.value); + box.focus(); + } + + /* ---- close mobile nav on selection ---- */ + $$('.site-nav a').forEach(function (a) { + a.addEventListener('click', function () { + var t = $('#navtoggle'); + if (t) t.checked = false; + }); + }); +})(); diff --git a/site/static/style.css b/site/static/style.css new file mode 100644 index 0000000..86ce4f3 --- /dev/null +++ b/site/static/style.css @@ -0,0 +1,169 @@ +/* BestDadJokes.lol โ€” comic cream */ +* { box-sizing: border-box; margin: 0; padding: 0; } +:root { + --brand: #e4572e; + --brand-dark: #c74623; + --brand2: #f5a623; + --ink: #2b2118; + --ink-soft: #5c4f43; + --cream: #fff8ec; + --card: #ffffff; + --radius: 16px; +} +html { scroll-behavior: smooth; } +body { + font-family: ui-rounded, "SF Pro Rounded", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + background: var(--cream); + color: var(--ink); + line-height: 1.6; + display: flex; + min-height: 100vh; + flex-direction: column; +} +main { flex: 1; } +.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; } +.wrap.narrow { max-width: 800px; } +a { color: var(--brand); } +h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); line-height: 1.15; letter-spacing: -0.5px; margin: 18px 0 10px; } +h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 40px 0 14px; letter-spacing: -0.3px; } +p.page-sub { color: var(--ink-soft); font-size: 1.08rem; max-width: 46rem; margin-bottom: 26px; } + +/* header */ +.site-header { background: var(--card); border-bottom: 2px solid var(--ink); position: sticky; top: 0; z-index: 50; } +.header-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; gap: 10px; } +.logo { font-size: 1.35rem; text-decoration: none; color: var(--ink); letter-spacing: -0.5px; } +.logo strong span { color: var(--brand); } +.logo em { font-style: normal; color: var(--ink-soft); font-size: 1rem; } +.site-nav { display: flex; gap: 4px; flex-wrap: wrap; } +.site-nav a { text-decoration: none; color: var(--ink); font-weight: 600; padding: 7px 12px; border-radius: 999px; } +.site-nav a:hover { background: var(--cream); } +.site-nav a.on { background: var(--ink); color: var(--cream); } +.catbar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; } +.catbar a { flex: 0 0 auto; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .86rem; background: var(--cream); border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px 11px; white-space: nowrap; } +.catbar a:hover { background: var(--brand2); } +.navtoggle, .navburger { display: none; } + +/* hero */ +.hero { text-align: center; padding-top: 34px; } +.hero-sub { color: var(--ink-soft); font-size: 1.15rem; max-width: 44rem; margin: 0 auto 26px; } + +/* joke cards */ +.joke-card, .hero-card, .jod-banner { + background: var(--card); + border: 2px solid var(--ink); + border-radius: var(--radius); + box-shadow: 5px 5px 0 var(--ink); + padding: 22px 24px; + margin-bottom: 18px; +} +.hero-card { max-width: 640px; margin: 0 auto 26px; text-align: left; } +.joke-setup { font-size: 1.13rem; font-weight: 600; } +.joke-setup.multi { line-height: 1.75; } +.joke-punch { + margin-top: 12px; font-size: 1.22rem; font-weight: 800; color: var(--brand); + transition: filter .25s ease; +} +.joke-punch::before { content: "โ†’ "; color: var(--brand2); } +body.js-ux .joke-punch:not(.revealed):not([data-no-blur]) { + filter: blur(6px); + cursor: pointer; + user-select: none; +} +body.js-ux .joke-punch:not(.revealed):hover { filter: blur(3px); } +.joke-actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; } +.btn-tiny { + font: inherit; font-size: .8rem; font-weight: 700; background: var(--cream); + border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px 11px; cursor: pointer; color: var(--ink); +} +.btn-tiny:hover { background: var(--brand2); } +.joke-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; } +.joke-grid .joke-card { margin-bottom: 0; } + +/* buttons */ +.btn { + display: inline-block; font: inherit; font-weight: 800; font-size: 1rem; + background: var(--brand); color: #fff; border: 2px solid var(--ink); + border-radius: 999px; padding: 10px 22px; cursor: pointer; + box-shadow: 3px 3px 0 var(--ink); text-decoration: none; + transition: transform .08s ease, box-shadow .08s ease; +} +.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); } +.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); } +.btn-ghost { background: var(--card); color: var(--ink); } +.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; } + +/* joke of the day */ +.jod-banner { background: linear-gradient(135deg, #fff, #fff4dd); text-align: left; } +.jod-label { font-weight: 800; text-transform: uppercase; letter-spacing: 1px; font-size: .85rem; color: var(--brand-dark); margin-bottom: 8px; } +.jod-date { font-size: .9rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; } +.jod-page { margin: 0 0 30px; } +.jod-more { margin-top: 14px; font-size: .95rem; } +.jod-more a { font-weight: 700; } + +/* categories */ +.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; } +.cat-card { + background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); + box-shadow: 4px 4px 0 var(--ink); padding: 20px 18px; text-decoration: none; color: var(--ink); + display: flex; flex-direction: column; gap: 4px; + transition: transform .08s ease, box-shadow .08s ease; +} +.cat-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); background: #fffdf5; } +.cat-emoji { font-size: 1.8rem; } +.cat-name { font-weight: 800; letter-spacing: -0.2px; } +.cat-count { color: var(--ink-soft); font-size: .88rem; } +.chips { display: flex; gap: 10px; flex-wrap: wrap; } +.chip { border: 1.5px solid var(--ink); border-radius: 999px; padding: 5px 14px; text-decoration: none; color: var(--ink); font-weight: 600; background: var(--card); } +.chip:hover { background: var(--brand2); } +.center-link { text-align: center; margin: 30px 0 10px; } + +/* generator */ +.gen-card { margin-top: 6px; } +.plain-list { margin: 10px 0 20px 22px; } +.plain-list li { margin-bottom: 8px; } + +/* search */ +.search-form input { + width: 100%; font: inherit; font-size: 1.1rem; padding: 13px 18px; + border: 2px solid var(--ink); border-radius: 999px; background: var(--card); outline: none; + box-shadow: 3px 3px 0 var(--ink); margin: 6px 0 18px; +} +.search-count { color: var(--ink-soft); margin-bottom: 16px; font-weight: 600; } + +/* archive */ +.archive { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; margin-bottom: 20px; } +.archive .joke-card { margin-bottom: 0; padding: 16px 18px; } +.archive .joke-setup { font-size: 1rem; } +.archive .joke-punch { font-size: 1.05rem; margin-top: 8px; } +.archive .jod-date { margin-bottom: 2px; } + +/* misc */ +.crumbs { font-size: .9rem; margin: 18px 0 4px; color: var(--ink-soft); } +.crumbs a { color: var(--ink-soft); } +.seo-blurb { margin: 40px auto 50px; } +.seo-blurb p { max-width: 52rem; margin-bottom: 10px; color: var(--ink-soft); } +.center { text-align: center; padding: 80px 20px; } + +/* footer */ +.site-footer { background: var(--ink); color: var(--cream); margin-top: 60px; } +.site-footer a { color: var(--brand2); text-decoration: none; } +.site-footer a:hover { text-decoration: underline; } +.foot-grid { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 30px; padding: 40px 20px 10px; } +.foot-logo { font-size: 1.2rem; font-weight: 800; margin-bottom: 8px; } +.foot-logo span { color: var(--brand2); } +.foot-logo em { font-style: normal; opacity: .7; font-size: .95rem; } +.site-footer p { opacity: .85; font-size: .92rem; } +.foot-h { font-weight: 800; text-transform: uppercase; letter-spacing: 1px; font-size: .78rem; margin-bottom: 10px; } +.foot-links { display: flex; flex-direction: column; gap: 6px; font-size: .92rem; } +.foot-base { border-top: 1px solid rgba(255,248,236,.2); margin-top: 24px; padding-top: 16px; padding-bottom: 20px; font-size: .85rem; } + +@media (max-width: 860px) { + .foot-grid { grid-template-columns: 1fr; gap: 22px; } + .navburger { + display: block; font-size: 1.5rem; cursor: pointer; padding: 2px 10px; + border: 2px solid var(--ink); border-radius: 10px; background: var(--cream); + } + .navtoggle:checked ~ .site-nav { display: flex; } + .site-nav { display: none; flex-direction: column; width: 100%; padding-bottom: 12px; } + .catbar a:first-child { margin-left: 2px; } +} diff --git a/site/terms/index.html b/site/terms/index.html new file mode 100644 index 0000000..696c1ac --- /dev/null +++ b/site/terms/index.html @@ -0,0 +1,89 @@ + + + + + +Terms of Use โ€” Best Dad Jokes .lol + + + + + + + + + + + + + + + + +
+ +
+

Terms of Use

+

Last updated: September 16, 2026

+

By using BestDadJokes.lol you agree to the following terms. Reading them aloud in a dad voice is optional but encouraged.

+

Use of content

+

The jokes on this site are provided for personal, non-commercial enjoyment. Share them freely at dinner tables, offices, and group chats. If you want to republish jokes in bulk or use this site commercially, contact us first โ€” we're reasonable people.

+

No warranties

+

This site is provided "as is." We make no guarantees that jokes will be funny, that groans will be produced, or that your teenagers will acknowledge your existence. All comedic risk is yours.

+

Limitation of liability

+

To the fullest extent permitted by law, BestDadJokes.lol is not liable for any damages arising from use of the site, including but not limited to eye-rolling, sighing, involuntary chuckling, and children hiding your phone.

+

External links

+

We are not responsible for the content of external websites, including their jokes, which are almost certainly worse than ours.

+

Changes

+

We may update these terms occasionally. Continued use of the site means you accept the updated terms, and possibly a fresh dad joke.

+
+
+ + + + + \ No newline at end of file diff --git a/site/topic/birthday/index.html b/site/topic/birthday/index.html new file mode 100644 index 0000000..1e13fe9 --- /dev/null +++ b/site/topic/birthday/index.html @@ -0,0 +1,83 @@ + + + + + +Birthday Dad Jokes โ€” 10 Clean, Groan-Worthy Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

๐ŸŽ‚ Birthday Dad Jokes

+

Because every birthday needs at least one groan with the cake. These birthday dad jokes are tradition now, sorry. That's 10 of them, carefully curated for maximum groan.

+

Why did the student eat his homework?

Because the teacher said it was a piece of cake.

The past, the present, and the future walked into class.

It was tense.

How do you organize a party in space?

You planet.

Why did the skeleton go to the party alone?

He had no body to go with him.

What do you sing at a snowman's birthday party?

Freeze a jolly good fellow.

Why do candles love birthdays?

They get to be the light of the party.

What did the elephant want for its birthday?

A trunk full of presents.

Why was the birthday cake as hard as a rock?

It was marble cake.

What does a clam do on its birthday?

It shellabrates.

What did the pirate say on his 80th birthday?

Aye matey!
+

More where that came from

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/topic/cats/index.html b/site/topic/cats/index.html new file mode 100644 index 0000000..814c15b --- /dev/null +++ b/site/topic/cats/index.html @@ -0,0 +1,83 @@ + + + + + +Dad Jokes About Cats โ€” 9 Clean, Groan-Worthy Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

๐Ÿฑ Dad Jokes About Cats

+

For the cat dads out there. These cat dad jokes will make your feline walk out of the room in disgust โ€” which, for a cat, is a standing ovation. That's 9 of them, carefully curated for maximum groan.

+

What's a cat's favorite color?

Purr-ple.

The forecast said it would rain cats and dogs.

I went outside and stepped in a poodle.

What do you call a pile of kittens?

A meow-ntain.

Why don't cats play poker in the jungle?

Too many cheetahs.

What's a cat's favorite dessert?

Mice cream.

Why did the cat sit on the computer?

To keep an eye on the mouse.

What do you call a cat that works at a hospital?

A purr-fessional.

How do cats end a fight?

They hiss and make up.

Why is everyone so excited about the cat's new job?

Because it's feline good.
+

More where that came from

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/topic/coffee/index.html b/site/topic/coffee/index.html new file mode 100644 index 0000000..eb52d43 --- /dev/null +++ b/site/topic/coffee/index.html @@ -0,0 +1,83 @@ + + + + + +Dad Jokes About Coffee โ€” 10 Clean, Groan-Worthy Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

โ˜• Dad Jokes About Coffee

+

Fuel for dads and their worst puns alike. These coffee dad jokes are best served strong, black, and with a healthy amount of eye-rolling. That's 10 of them, carefully curated for maximum groan.

+

Why did the coffee file a police report?

It got mugged.

Why do employees drink so much coffee at work?

It's the weekend immune system that keeps them going.

What's the fastest vegetable?

A runner bean.

What do you call a sad cup of coffee?

A depres-so.

How do coffee cups show their love?

With mugs and kisses.

Where do coffee beans go for a night out?

The coffee bar.

Why was the espresso checking its watch?

It was pressed for time.

What's a coffee's favorite magic spell?

Espresso Patronum!

Why don't coffees ever gossip?

They don't want to spill the beans.

How does coffee show it cares?

It gives you a latte attention.
+

More where that came from

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/topic/cows/index.html b/site/topic/cows/index.html new file mode 100644 index 0000000..449f52d --- /dev/null +++ b/site/topic/cows/index.html @@ -0,0 +1,83 @@ + + + + + +Dad Jokes About Cows โ€” 6 Clean, Groan-Worthy Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

๐Ÿ„ Dad Jokes About Cows

+

Outstanding in their field and in our pun archive. These cow dad jokes are udderly relentless. That's 6 of them, carefully curated for maximum groan.

+

Why do cows have hooves instead of feet?

Because they lactose.

Why do cows wear bells?

Because their horns don't work.

What do you call a cow on a trampoline?

A milkshake.

Why did the cow become an astronaut?

To see the moooon.

Knock knock.
Who's there?
Interrupting cow.
Interrupting cโ€”

MOO!

Where do cows invest their money?

In moo-tual funds.
+

More where that came from

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/topic/dogs/index.html b/site/topic/dogs/index.html new file mode 100644 index 0000000..17db895 --- /dev/null +++ b/site/topic/dogs/index.html @@ -0,0 +1,83 @@ + + + + + +Dad Jokes About Dogs โ€” 14 Clean, Groan-Worthy Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

๐Ÿ• Dad Jokes About Dogs

+

A dog is the only audience that wags at dad jokes. Fetch! These dog dad jokes are good boys, every one of them. That's 14 of them, carefully curated for maximum groan.

+

Why did the dog sit in the shade?

Because he didn't want to be a hot dog.

What do you call a magic dog?

A labracadabrador.

What do you get when you leave a dog out in the cold?

A chili dog.

The forecast said it would rain cats and dogs.

I went outside and stepped in a poodle.

I asked my dog what's two minus two.

He said nothing.

What did the Buddhist monk say to the hot dog vendor?

Make me one with everything.

Why did the dog cross the road?

To get to the barking lot.

What kind of dog loves surround sound?

A subwoofer.

Why do dogs run in circles?

Because it's too hard to run in squares.

What's a dog's favorite instrument?

The trom-BONE.

How did the puppy feel after finishing its homework?

Ruff.

Why did the dachshund sit by the fire?

It was a cold dog.

What breed of dog can jump higher than a house?

Any breed โ€” houses can't jump.

What kind of pizza do dogs order?

Pup-peroni.
+

More where that came from

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/topic/love/index.html b/site/topic/love/index.html new file mode 100644 index 0000000..7e7ded0 --- /dev/null +++ b/site/topic/love/index.html @@ -0,0 +1,83 @@ + + + + + +Dad Jokes About Love โ€” 9 Clean, Groan-Worthy Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

โค๏ธ Dad Jokes About Love

+

Romance, dad-style. These love dad jokes have walked someone down the aisle against their will and lived to pun about it. That's 9 of them, carefully curated for maximum groan.

+

Why did the geography teacher love the ocean?

It was full of currents.

What does the wind say on Valentine's Day?

I'm a big fan of yours.

I told my wife she was drawing her eyebrows too high.

She looked surprised.

How do coffee cups show their love?

With mugs and kisses.

Why did the two antennas get married?

The ceremony was okay, but the reception was excellent.

What's the most romantic part about the ocean?

When the buoy meets gull.

Kid: 'Do you have a date for Valentine's Day?'

Dad: 'Sure โ€” February 14th.'

My wife told me to stop impersonating a flamingo.

I had to put my foot down.

Why do candles love birthdays?

They get to be the light of the party.
+

More where that came from

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/topic/money/index.html b/site/topic/money/index.html new file mode 100644 index 0000000..c463372 --- /dev/null +++ b/site/topic/money/index.html @@ -0,0 +1,83 @@ + + + + + +Dad Jokes About Money โ€” 7 Clean, Groan-Worthy Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

๐Ÿ’ฐ Dad Jokes About Money

+

Money can't buy happiness, but it can buy these money dad jokes, which are basically the same thing but cheaper. That's 7 of them, carefully curated for maximum groan.

+

Why did the man put his money in the freezer?

He wanted cold hard cash.

Why did the football coach go to the bank?

To get his quarterback.

Why did the penny get promoted?

It made perfect cents.

What do you call a rich fish?

A goldfish.

Why did the dollar bill break up with the coin?

It needed some change.

Why was the money exhausted?

It was spent.

Where do cows invest their money?

In moo-tual funds.
+

More where that came from

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/topic/sleep/index.html b/site/topic/sleep/index.html new file mode 100644 index 0000000..b84ff68 --- /dev/null +++ b/site/topic/sleep/index.html @@ -0,0 +1,83 @@ + + + + + +Dad Jokes About Sleep โ€” 10 Clean, Groan-Worthy Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

๐Ÿ˜ด Dad Jokes About Sleep

+

Read these sleep dad jokes in bed. Groaning yourself to sleep counts as a lullaby. That's 10 of them, carefully curated for maximum groan.

+

How do you know if there's an elephant under your bed?

Your nose touches the ceiling.

Why did the bicycle fall over?

It was two-tired.

Why do keyboards never sleep?

They have two shifts.

Why did the dad bring a pencil to bed?

To draw the curtains.

Why did the toddler put sugar under his pillow?

He wanted sweet dreams.

Why did the car apply for a job?

It was tired of sitting idle.

What does the gingerbread man use to make his bed?

Cookie sheets.

What's a nap's favorite kind of movie?

A sleeper hit.

Why did the pillow go to the doctor?

It was feeling down.

Why was everyone so tired on the morning of April 1st?

They'd just finished a 31-day March.
+

More where that came from

+ + +
+
+ + + + + \ No newline at end of file diff --git a/site/topic/winter/index.html b/site/topic/winter/index.html new file mode 100644 index 0000000..f3cec76 --- /dev/null +++ b/site/topic/winter/index.html @@ -0,0 +1,83 @@ + + + + + +Winter Dad Jokes โ€” 10 Clean, Groan-Worthy Jokes + + + + + + + + + + + + + + + + +
+ +
+ +

โ›„ Winter Dad Jokes

+

These winter dad jokes are snow joke. Perfect for breaking the ice at any cold-weather gathering. That's 10 of them, carefully curated for maximum groan.

+

What falls in winter but never gets hurt?

Snow.

What do snowmen call their offspring?

Chill-dren.

Why don't mountains ever get cold in winter?

They wear snowcaps.

What do you get when you cross a snowman with a vampire?

Frostbite.

What did one snowman say to the other snowman?

Do you smell carrots?

What do you call an old snowman?

Water.

What do you sing at a snowman's birthday party?

Freeze a jolly good fellow.

How does a snowman get around town?

On an icicle.

What did the icy road say to the truck?

Want to go for a spin?

How do you prevent a summer cold?

Catch it in the winter.
+

More where that came from

+ + +
+
+ + + + + \ No newline at end of file diff --git a/static/favicon.svg b/static/favicon.svg new file mode 100644 index 0000000..f0176fa --- /dev/null +++ b/static/favicon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/static/main.js b/static/main.js new file mode 100644 index 0000000..63e0d5c --- /dev/null +++ b/static/main.js @@ -0,0 +1,235 @@ +/* BestDadJokes.lol client-side behavior */ +(function () { + 'use strict'; + document.body.classList.add('js-ux'); + + var JOKES = (window.BDJ && window.BDJ.jokes) || []; + function byId(id) { return JOKES[id]; } + + function $(sel, root) { return (root || document).querySelector(sel); } + function $$(sel, root) { return Array.prototype.slice.call((root || document).querySelectorAll(sel)); } + + /* ---- punchline reveal ---- */ + document.addEventListener('click', function (e) { + var punch = e.target.closest && e.target.closest('[data-punch]'); + if (punch && !punch.classList.contains('revealed')) { + punch.classList.add('revealed'); + } + }); + + /* ---- random ---- */ + var lastId = -1; + function randomJoke() { + if (!JOKES.length) return null; + var j, guard = 0; + do { j = JOKES[Math.floor(Math.random() * JOKES.length)]; guard++; } + while (j.id === lastId && guard < 20 && JOKES.length > 1); + lastId = j.id; + return j; + } + function fillRandom(setupEl, punchEl) { + var j = randomJoke(); + if (!j) return null; + setupEl.textContent = j.s; + punchEl.textContent = j.p; + punchEl.classList.add('revealed'); + punchEl.setAttribute('data-no-blur', ''); + return j; + } + + /* ---- clipboard ---- */ + function copyText(text, btn) { + function ok() { if (btn) { var o = btn.textContent; btn.textContent = 'โœ… Copied'; setTimeout(function () { btn.textContent = o; }, 1400); } } + if (navigator.clipboard && navigator.clipboard.writeText) { + navigator.clipboard.writeText(text).then(ok, function () { legacy(); }); + } else { legacy(); } + function legacy() { + var ta = document.createElement('textarea'); + ta.value = text; document.body.appendChild(ta); ta.select(); + try { document.execCommand('copy'); ok(); } catch (err) {} + document.body.removeChild(ta); + } + } + + /* ---- share card (1080x1350) ---- */ + function wrapText(ctx, text, x, y, maxW, lh) { + var words = text.split(' '), line = '', lines = []; + words.forEach(function (w) { + var test = line + w + ' '; + if (ctx.measureText(test).width > maxW && line) { lines.push(line.trim()); line = w + ' '; } + else { line = test; } + }); + lines.push(line.trim()); + lines.forEach(function (l, i) { ctx.fillText(l, x, y + i * lh); }); + return y + lines.length * lh; + } + function makeCard(setup, punch, cb) { + var c = document.createElement('canvas'); + c.width = 1080; c.height = 1350; + var ctx = c.getContext('2d'); + ctx.fillStyle = '#fff8ec'; ctx.fillRect(0, 0, 1080, 1350); + // border frame + ctx.strokeStyle = '#2b2118'; ctx.lineWidth = 8; + ctx.strokeRect(36, 36, 1008, 1278); + // emoji + ctx.font = '110px serif'; ctx.textAlign = 'center'; + ctx.fillText('๐Ÿ˜‚', 540, 240); + // setup + ctx.fillStyle = '#2b2118'; ctx.textAlign = 'center'; + ctx.font = '700 54px ui-rounded, -apple-system, "Segoe UI", Arial, sans-serif'; + var y = wrapText(ctx, setup, 540, 380, 880, 72); + // punchline + ctx.fillStyle = '#e4572e'; + ctx.font = '800 66px ui-rounded, -apple-system, "Segoe UI", Arial, sans-serif'; + y = wrapText(ctx, punch, 540, y + 150, 880, 86); + // footer + ctx.fillStyle = '#5c4f43'; ctx.font = '700 34px -apple-system, "Segoe UI", Arial, sans-serif'; + ctx.fillText('BestDadJokes.lol', 540, 1240); + cb(c); + } + function shareCard(setup, punch) { + var name = 'dad-joke.png'; + makeCard(setup, punch, function (canvas) { + if (navigator.canShare && navigator.share) { + canvas.toBlob(function (blob) { + if (!blob) return; + var file = new File([blob], name, { type: 'image/png' }); + if (navigator.canShare({ files: [file] })) { + navigator.share({ files: [file], title: 'A dad joke for you' }).catch(function () {}); + } + }, 'image/png'); + } else { + var a = document.createElement('a'); + a.download = name; a.href = canvas.toDataURL('image/png'); + document.body.appendChild(a); a.click(); document.body.removeChild(a); + } + }); + } + + function wireCard(opts) { + var setupEl = $(opts.setup), punchEl = $(opts.punch); + if (!setupEl || !punchEl) return; + var current = opts.initial || null; + if (opts.nextBtn) { + $(opts.nextBtn).addEventListener('click', function () { current = fillRandom(setupEl, punchEl); }); + } + if (opts.copyBtn) { + $(opts.copyBtn).addEventListener('click', function (e) { + if (current) copyText(current.s + ' ' + current.p, e.target); + }); + } + if (opts.shareBtn) { + $(opts.shareBtn).addEventListener('click', function () { + if (current) shareCard(current.s, current.p); + }); + } + return { + get: function () { return current; }, + set: function (j) { current = j; setupEl.textContent = j.s; punchEl.textContent = j.p; punchEl.classList.add('revealed'); punchEl.setAttribute('data-no-blur', ''); } + }; + } + + /* ---- page-specific wiring ---- */ + // hero + var hero = wireCard({ setup: '[data-hero-setup]', punch: '[data-hero-punch]', nextBtn: '[data-hero-next]', copyBtn: '[data-copy-hero]', shareBtn: '[data-share-hero]' }); + if (hero) hero.set(randomJoke()); + + // generator + wireCard({ setup: '[data-gen-setup]', punch: '[data-gen-punch]', nextBtn: '[data-gen-next]', copyBtn: '[data-gen-copy]', shareBtn: '[data-gen-share]' }); + + // joke of the day (+ ?d= override for archive permalinks) + var jodSetup = $('[data-jod-setup]'); + if (jodSetup) { + var m = /[?&]d=(\d{4}-\d{2}-\d{2})/.exec(location.search); + var base = new Date(Date.UTC(2026, 8, 15)); // launch epoch for the rotation + var jod = null; + if (m) { + var parts = m[1].split('-'), d = new Date(Date.UTC(+parts[0], +parts[1] - 1, +parts[2])); + if (!isNaN(d.getTime())) { + var idx = Math.floor((d - new Date(d.getUTCFullYear(), 0, 1)) / 86400000) + d.getUTCMonth() * 31 + d.getUTCDate(); + jod = JOKES[(d.getTime() / 86400000 | 0) % JOKES.length] || JOKES[0]; + $('[data-jod-date]').textContent = d.toUTCString().slice(0, 16); + var ctl = { setup: '[data-jod-setup]', punch: '[data-jod-punch]' }; + jodSetup.textContent = jod.s; + $('[data-jod-punch]').textContent = jod.p; + $('[data-jod-punch]').classList.add('revealed'); + $('[data-jod-punch]').setAttribute('data-no-blur', ''); + } + } + var jodCopy = $('[data-jod-copy]'); + if (jodCopy) { + var punchEl = $('[data-jod-punch]'); + jodCopy.addEventListener('click', function (e) { copyText(jodSetup.textContent + ' ' + punchEl.textContent, e.target); }); + } + var jodShare = $('[data-jod-share]'); + if (jodShare) { + jodShare.addEventListener('click', function () { shareCard(jodSetup.textContent, $('[data-jod-punch]').textContent); }); + } + // archive: last 30 days + var arch = $('[data-jod-archive]'); + if (arch && JOKES.length) { + var today = new Date(); + var html = ''; + for (var i = 1; i <= 30; i++) { + var dd = new Date(today.getTime() - i * 86400000); + var iso = dd.toISOString().slice(0, 10); + var jj = JOKES[Math.floor(dd.getTime() / 86400000) % JOKES.length]; + html += '

' + iso + '

' + + '

' + jj.s.replace(/' + + '

' + jj.p.replace(/
'; + } + arch.innerHTML = html; + } + } + + /* ---- per-card copy/share buttons ---- */ + document.addEventListener('click', function (e) { + var t = e.target; + if (t.hasAttribute && t.hasAttribute('data-copy')) { + var j = byId(+t.getAttribute('data-copy')); + if (j) copyText(j.s + ' ' + j.p, t); + } + if (t.hasAttribute && t.hasAttribute('data-share')) { + var jj = byId(+t.getAttribute('data-share')); + if (jj) shareCard(jj.s, jj.p); + } + }); + + /* ---- search ---- */ + var box = $('#search-box'); + if (box) { + var results = $('[data-search-results]'); + var countEl = $('[data-search-count]'); + var emptyEl = $('[data-search-empty]'); + function renderResults(q) { + q = q.trim().toLowerCase(); + var hits = []; + if (q.length > 1) { + hits = JOKES.filter(function (j) { + return (j.s + ' ' + j.p).toLowerCase().indexOf(q) !== -1; + }).slice(0, 60); + } + countEl.textContent = q.length > 1 ? hits.length + ' joke' + (hits.length === 1 ? '' : 's') + ' matching "' + q + '"' : ''; + emptyEl.style.display = (q.length > 1 && !hits.length) ? 'block' : 'none'; + results.innerHTML = hits.map(function (j) { + return '

' + j.s.replace(/' + + '

' + j.p.replace(/' + + '
' + + 'Category โ†’
'; + }).join(''); + } + box.addEventListener('input', function () { renderResults(box.value); }); + var q = /[?&]q=([^&]*)/.exec(location.search); + if (q) { box.value = decodeURIComponent(q[1].replace(/\+/g, ' ')); } + renderResults(box.value); + box.focus(); + } + + /* ---- close mobile nav on selection ---- */ + $$('.site-nav a').forEach(function (a) { + a.addEventListener('click', function () { + var t = $('#navtoggle'); + if (t) t.checked = false; + }); + }); +})(); diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..86ce4f3 --- /dev/null +++ b/static/style.css @@ -0,0 +1,169 @@ +/* BestDadJokes.lol โ€” comic cream */ +* { box-sizing: border-box; margin: 0; padding: 0; } +:root { + --brand: #e4572e; + --brand-dark: #c74623; + --brand2: #f5a623; + --ink: #2b2118; + --ink-soft: #5c4f43; + --cream: #fff8ec; + --card: #ffffff; + --radius: 16px; +} +html { scroll-behavior: smooth; } +body { + font-family: ui-rounded, "SF Pro Rounded", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + background: var(--cream); + color: var(--ink); + line-height: 1.6; + display: flex; + min-height: 100vh; + flex-direction: column; +} +main { flex: 1; } +.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; } +.wrap.narrow { max-width: 800px; } +a { color: var(--brand); } +h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); line-height: 1.15; letter-spacing: -0.5px; margin: 18px 0 10px; } +h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 40px 0 14px; letter-spacing: -0.3px; } +p.page-sub { color: var(--ink-soft); font-size: 1.08rem; max-width: 46rem; margin-bottom: 26px; } + +/* header */ +.site-header { background: var(--card); border-bottom: 2px solid var(--ink); position: sticky; top: 0; z-index: 50; } +.header-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; gap: 10px; } +.logo { font-size: 1.35rem; text-decoration: none; color: var(--ink); letter-spacing: -0.5px; } +.logo strong span { color: var(--brand); } +.logo em { font-style: normal; color: var(--ink-soft); font-size: 1rem; } +.site-nav { display: flex; gap: 4px; flex-wrap: wrap; } +.site-nav a { text-decoration: none; color: var(--ink); font-weight: 600; padding: 7px 12px; border-radius: 999px; } +.site-nav a:hover { background: var(--cream); } +.site-nav a.on { background: var(--ink); color: var(--cream); } +.catbar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; } +.catbar a { flex: 0 0 auto; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .86rem; background: var(--cream); border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px 11px; white-space: nowrap; } +.catbar a:hover { background: var(--brand2); } +.navtoggle, .navburger { display: none; } + +/* hero */ +.hero { text-align: center; padding-top: 34px; } +.hero-sub { color: var(--ink-soft); font-size: 1.15rem; max-width: 44rem; margin: 0 auto 26px; } + +/* joke cards */ +.joke-card, .hero-card, .jod-banner { + background: var(--card); + border: 2px solid var(--ink); + border-radius: var(--radius); + box-shadow: 5px 5px 0 var(--ink); + padding: 22px 24px; + margin-bottom: 18px; +} +.hero-card { max-width: 640px; margin: 0 auto 26px; text-align: left; } +.joke-setup { font-size: 1.13rem; font-weight: 600; } +.joke-setup.multi { line-height: 1.75; } +.joke-punch { + margin-top: 12px; font-size: 1.22rem; font-weight: 800; color: var(--brand); + transition: filter .25s ease; +} +.joke-punch::before { content: "โ†’ "; color: var(--brand2); } +body.js-ux .joke-punch:not(.revealed):not([data-no-blur]) { + filter: blur(6px); + cursor: pointer; + user-select: none; +} +body.js-ux .joke-punch:not(.revealed):hover { filter: blur(3px); } +.joke-actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; } +.btn-tiny { + font: inherit; font-size: .8rem; font-weight: 700; background: var(--cream); + border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px 11px; cursor: pointer; color: var(--ink); +} +.btn-tiny:hover { background: var(--brand2); } +.joke-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; } +.joke-grid .joke-card { margin-bottom: 0; } + +/* buttons */ +.btn { + display: inline-block; font: inherit; font-weight: 800; font-size: 1rem; + background: var(--brand); color: #fff; border: 2px solid var(--ink); + border-radius: 999px; padding: 10px 22px; cursor: pointer; + box-shadow: 3px 3px 0 var(--ink); text-decoration: none; + transition: transform .08s ease, box-shadow .08s ease; +} +.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); } +.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); } +.btn-ghost { background: var(--card); color: var(--ink); } +.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; } + +/* joke of the day */ +.jod-banner { background: linear-gradient(135deg, #fff, #fff4dd); text-align: left; } +.jod-label { font-weight: 800; text-transform: uppercase; letter-spacing: 1px; font-size: .85rem; color: var(--brand-dark); margin-bottom: 8px; } +.jod-date { font-size: .9rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; } +.jod-page { margin: 0 0 30px; } +.jod-more { margin-top: 14px; font-size: .95rem; } +.jod-more a { font-weight: 700; } + +/* categories */ +.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; } +.cat-card { + background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); + box-shadow: 4px 4px 0 var(--ink); padding: 20px 18px; text-decoration: none; color: var(--ink); + display: flex; flex-direction: column; gap: 4px; + transition: transform .08s ease, box-shadow .08s ease; +} +.cat-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); background: #fffdf5; } +.cat-emoji { font-size: 1.8rem; } +.cat-name { font-weight: 800; letter-spacing: -0.2px; } +.cat-count { color: var(--ink-soft); font-size: .88rem; } +.chips { display: flex; gap: 10px; flex-wrap: wrap; } +.chip { border: 1.5px solid var(--ink); border-radius: 999px; padding: 5px 14px; text-decoration: none; color: var(--ink); font-weight: 600; background: var(--card); } +.chip:hover { background: var(--brand2); } +.center-link { text-align: center; margin: 30px 0 10px; } + +/* generator */ +.gen-card { margin-top: 6px; } +.plain-list { margin: 10px 0 20px 22px; } +.plain-list li { margin-bottom: 8px; } + +/* search */ +.search-form input { + width: 100%; font: inherit; font-size: 1.1rem; padding: 13px 18px; + border: 2px solid var(--ink); border-radius: 999px; background: var(--card); outline: none; + box-shadow: 3px 3px 0 var(--ink); margin: 6px 0 18px; +} +.search-count { color: var(--ink-soft); margin-bottom: 16px; font-weight: 600; } + +/* archive */ +.archive { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; margin-bottom: 20px; } +.archive .joke-card { margin-bottom: 0; padding: 16px 18px; } +.archive .joke-setup { font-size: 1rem; } +.archive .joke-punch { font-size: 1.05rem; margin-top: 8px; } +.archive .jod-date { margin-bottom: 2px; } + +/* misc */ +.crumbs { font-size: .9rem; margin: 18px 0 4px; color: var(--ink-soft); } +.crumbs a { color: var(--ink-soft); } +.seo-blurb { margin: 40px auto 50px; } +.seo-blurb p { max-width: 52rem; margin-bottom: 10px; color: var(--ink-soft); } +.center { text-align: center; padding: 80px 20px; } + +/* footer */ +.site-footer { background: var(--ink); color: var(--cream); margin-top: 60px; } +.site-footer a { color: var(--brand2); text-decoration: none; } +.site-footer a:hover { text-decoration: underline; } +.foot-grid { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 30px; padding: 40px 20px 10px; } +.foot-logo { font-size: 1.2rem; font-weight: 800; margin-bottom: 8px; } +.foot-logo span { color: var(--brand2); } +.foot-logo em { font-style: normal; opacity: .7; font-size: .95rem; } +.site-footer p { opacity: .85; font-size: .92rem; } +.foot-h { font-weight: 800; text-transform: uppercase; letter-spacing: 1px; font-size: .78rem; margin-bottom: 10px; } +.foot-links { display: flex; flex-direction: column; gap: 6px; font-size: .92rem; } +.foot-base { border-top: 1px solid rgba(255,248,236,.2); margin-top: 24px; padding-top: 16px; padding-bottom: 20px; font-size: .85rem; } + +@media (max-width: 860px) { + .foot-grid { grid-template-columns: 1fr; gap: 22px; } + .navburger { + display: block; font-size: 1.5rem; cursor: pointer; padding: 2px 10px; + border: 2px solid var(--ink); border-radius: 10px; background: var(--cream); + } + .navtoggle:checked ~ .site-nav { display: flex; } + .site-nav { display: none; flex-direction: column; width: 100%; padding-bottom: 12px; } + .catbar a:first-child { margin-left: 2px; } +}