Novelty Date Widget
I recently trawled through Wikipedia and collected a bunch of random national holidays, birthdays, and historical events for every day of the year and used javascript to make a dumb novelty calendar. Here it is in action:
A few people told me they'd be interested if I packaged it into a widget, so here it is! Linking back to me is appreciated but not necessary.
A few disclaimers (click me)
- I'm not great at coding javascript
- I smashed my head against the keyboard until I got it to work
- There might be a better way to make this widget that I don't know about
- I made this in a bit of a fugue state
- I probably made a some mistakes copy/pasting hundreds of these inane holidays from Wikipedia
- I probably forgot a bunch of important holidays
- I prioritized silly holidays over anniversaries of tragedies/disasters
- This is just for fun. If there's a holiday or birthday you wanna include, you totally can by customizing the script!!
- You might notice the version on my homepage is sometimes different than the one provided here since I wanted to have some birthdays/personal things displayed on my homepage. Don't worry-- this version is more generic!
One Liner Script
Just copy/paste this into the <body> of your page and the widget will appear!
<script src="https://caminus.neocities.org/codezone/nationalday.js"></script>
This creates <div id="natday"></div> where you put the script.
You can style #natday however you'd like.
Pros:
- You literally just copy and paste one line and you're done
- I can make changes and corrections
Cons:
- No special date customizations
- You rely on my site and bandwidth (it's only like a 20KB file so it should be fine?)
- I can make changes you might not like
How to customize (optional)
Alternatively, you can host the widget on your own site and customize it to your heart's content. You can add your birthday, an important holiday I forgot, or anything else you want!
- Download the script here (Right-click, Save As...)
- Upload it to your site.
- Make whatever changes you want!
You can make it say whatever you want on any given day by changing the code. For example, Squeaky's birthday is on May 17, so by changing the code to
"05-17": "it's Squeaky's Birthday!",
on May 17 the widget will read something like:
- Add the following line to your <body> where you'd like the widget:
<script src="nationalday.js"></script>