Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/trovster/fitness.trovster.com

Fitness Cards and Activity Rings, based on Apple Fitness.
https://github.com/trovster/fitness.trovster.com

11ty activity-rings api eleventy fitness health rings tailwind

Last synced: 22 days ago
JSON representation

Fitness Cards and Activity Rings, based on Apple Fitness.

Awesome Lists containing this project

README

        

# Fitness Web Component

Simple Web Components for fitness cards and activity rings.

The items in this demo are built using
[Fitness Visualisations](https://github.com/trovster/fitness-visualisations)
Web Components.

This website is built using [Eleventy](https://www.11ty.dev), styled using
[Tailwind](https://tailwindcss.com) and the icons are from
[Heroicons](https://heroicons.com).

## The Code

There are two main web components; a ring and a fully featured card.

```html

Move

Exercise

Stand



```

In this [Eleventy](https://www.11ty.dev) codebase, the components loop through
the `fitness.json` dataset. Each card component expects JSON data that looks
like the following.

```json
{
"date": "2023-09-25T00:00:00+00:00",
"steps": 18935,
"distance": 16254,
"flights": 8,
"move": {
"total": 500,
"goal": 750
},
"exercise": {
"total": 30,
"goal": 60
},
"stand": {
"total": 8,
"goal": 10
}
}
```