diff --git a/docs/widgets.md b/docs/widgets.md new file mode 100644 index 00000000..2589685e --- /dev/null +++ b/docs/widgets.md @@ -0,0 +1,42 @@ +# Widgets + +Dashy has support for displaying dynamic content in the form of widgets. There are several built-in widgets availible out-of-the-box (with more on the way!) as well as support for custom widgets to display stats from almost any service with an accessible API. + +##### Contents +- [Built-In Widgets](#built-in-widgets) +- [Dynamic Widgets](#dynamic-widgets) +- [Build your own Widget](#build-your-own-widget) + +## Built-In Widgets + +### Clock + +A simple, live-updating time and date widget with time-zone support. All options are optional. + +##### Options + +**Field** | **Type** | **Required** | **Description** +--- | --- | --- | --- +**`timeZone`** | `string` | _Optional_ | The time zone to display date and time in.
Specified as Region/City, for example: `Australia/Melbourne`. See the [Time Zone DB](https://timezonedb.com/time-zones) for a full list of supported TZs. Defaults to the browser / device's local time +**`format`** | `string` | _Optional_ | A country code for displaying the date and time in local format.
Specified as `[ISO-3166]-[ISO-639]`, for example: `en-AU`. See [here](https://www.fincher.org/Utilities/CountryLanguageList.shtml) for a full list of locales. Defaults to the browser / device's region +**`hideDate`** | `boolean` | _Optional_ | If set to `true`, the date and city will not be shown. Defaults to `false` + +##### Example + +```yaml +- name: London Time + icon: fas fa-clock + type: clock + options: + timeZone: Europe/London + format: en-GB + hideDate: false +``` + +--- + +## Dynamic Widgets + +--- + +## Build your own Widget diff --git a/public/fonts/Digital-Regular.ttf b/public/fonts/Digital-Regular.ttf new file mode 100644 index 00000000..5dbe6f90 Binary files /dev/null and b/public/fonts/Digital-Regular.ttf differ diff --git a/src/components/Widgets/Clock.vue b/src/components/Widgets/Clock.vue new file mode 100644 index 00000000..acb89946 --- /dev/null +++ b/src/components/Widgets/Clock.vue @@ -0,0 +1,104 @@ + + + + +