An open API service indexing awesome lists of open source software.

https://github.com/nicolassiver/nodebb-widget-ns-birthdays

Efficient widget to output all today's birthdays of community members.
https://github.com/nicolassiver/nodebb-widget-ns-birthdays

birthdays nodebb nodebb-widget widget

Last synced: about 1 month ago
JSON representation

Efficient widget to output all today's birthdays of community members.

Awesome Lists containing this project

README

        

# NodeBB Widget: Birthdays

Efficient widget to output all today's birthdays of community members.

## Table of Contents

![Version](https://img.shields.io/npm/v/nodebb-widget-ns-birthdays.svg)
![Dependencies](https://david-dm.org/NicolasSiver/nodebb-widget-ns-birthdays.svg)
![Code Climate](https://img.shields.io/codeclimate/github/NicolasSiver/nodebb-widget-ns-birthdays.svg)
![Travis](https://travis-ci.org/NicolasSiver/nodebb-widget-ns-birthdays.svg?branch=master)

- [Customization](#customization)
- [Screenshots](#screenshots)
- [How does it work?](#how-does-it-work)
- [Future ideas for improvement](#future-ideas-for-improvement)

## Customization

You could change styles for these classes:

- `.birthdays .birthday-item`, responsible for line in the list
- `.birthdays .birthday-name`, responsible for the user's name
- `.birthdays .birthday-age`, responsible for the user's age (Also age could be disabled in widget settings)

If you want change icon style, refer to `.fa` class.

## Screenshots

![Widget Preview](screenshot.png)

## How does it work?

1. At start, job will be triggered to check all users that have birthday today. It's an async process. By design it will take some time.
2. Every day at midnight (Server Time), job to find today's birthdays is fired
3. Widget returns birthdays that are stored in memory, It's fast and efficient.

Optimisations:

- to store today's birthdays in memory
- to check for birthdays only once per day