Discourse Birthdays/Anniversaries Today (Banner)

:information_source: Summary Adds a banner to the site to show the anniversaries and birthdays today.
:eyeglasses: Preview Theme Creator
:hammer_and_wrench: Repository GitHub - NateDhaliwal/Discourse-Birthdays-Anniversaries-Today
:question: Install Guide How to install a theme or theme component
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

:warning: The Cakeday plugin must be installed for this theme component to work.

This theme component places a banner at the top of the site on the homepage displaying the birthdays and anniversaries for that day.

The setting banner_location allows you to select where you want the banner to be placed. The available options are:

  • above-site-header
  • below-site-header
  • above-main-containter

The settings banner_text_color an banner_background_color change the banner’s text and background colours respectively. You can input Discourse CSS variables like var(--primary) or var(--tertiary), or Hex values too.

I got this idea when looking at Discourse and wondering, since the Cakeday plugin is installed, why don’t users celebrate other user’s birthdays and anniversaries? We used to do this kind of thing on a forum I was on, and here on Meta too. With this theme component, you can celebrate user’s special days with them, promoting a more inclusive community.

Screenshots:
Desktop:

Mobile:


I grab the data from /cakeday/anniversaries/today.json and /cakeday/birthdays/today.json for the display of users.


I'm working towards a few settings to show only either anniversaries or birthdays.

:robot: I used a bit of AI to help get a few variables from a function to a function to a get(), and it rewrote it to an async function instead (I wrote the main logic for getting the data, so most of it wasn’t written by AI). JS isn’t my first language of choice, so I’m not very “into” it yet. Yet.

1 Like