Advent calendar web components: <advent-door> and <advent-container>.
See it live at https://build.awesome.me/
npm install @11ty/advent-calendar<link rel="stylesheet" href="advent-container.css">
<script type="module" src="advent-door.js"></script>
<script type="module" src="advent-container.js"></script>
<advent-container src="https://build.awesome.me/api/advent/content.json">
<advent-door day="1" unlock="2026-12-01T00:00-06:00"></advent-door>
<advent-door day="2" unlock="2026-12-02T00:00-06:00"></advent-door>
<!-- … through day 24 -->
</advent-container>Demo and full docs: https://advent-calendar.11ty.dev/
The src attribute on <advent-container> can point to a static JSON file:
{
"doors": [
{ "day": 1, "brand": "build-awesome", "html": "<h2>Day one</h2>", "confetti": "🎉" },
{ "day": 2, "html": "<h2>Day two</h2>" }
]
}MIT