feat(docs): migrate documentation site into monorepo (#5912)

This commit is contained in:
Thomas authored and GitHub committed 2026-06-11 18:48:39 +02:00
1 parent 3e464a76f2
commit 9e421c67bd
605 files changed
+26764 -219

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

+38
View File
@@ -0,0 +1,38 @@
---
title: 'Date and time'
description: 'Displays the current date and time.'
hide_title: true
---
import { AddingWidget } from '@site/src/components/widgets/adding';
import { WidgetConfig } from '@site/src/components/widgets/configuration';
import { WidgetHeader } from '@site/src/components/widgets/header';
import { clockWidget } from '.';
<WidgetHeader
widget={clockWidget}
categories={['Time']}
/>
The clock widget displays the current date and time in a customizable format.
### Screenshots
import localClock from './img/local.png';
import londonClock from './img/london-with-seconds.png';
import tokyoClock from './img/tokyo-12-hour.png';
<div className='flex gap-1'>
<img src={localClock} alt="clock format-24-hours timezone-local" width={128} height={128} />
<img src={londonClock} alt="clock format-24-hours with-seconds timezone-london" width={256} height={128} />
<img src={tokyoClock} alt="clock format-12-hours timezone-tokyo" width={256} height={128} />
</div>
### Adding the widget
<AddingWidget />
### Configuration
<WidgetConfig configuration={clockWidget.configuration} />
+73
View File
@@ -0,0 +1,73 @@
import { WidgetDefinition } from "@site/src/types";
import { IconClock } from "@tabler/icons-react";
export const clockWidget: WidgetDefinition = {
icon: IconClock,
name: "Date and time",
description: "Displays the current date and time.",
path: "../../widgets/clock",
configuration: {
items: [
{
name: "Custom Title/City display",
description: "Show off a custom title or the name of the city/country on top of the clock.",
values: { type: "boolean" },
defaultValue: "no",
},
{
name: "Title",
description: 'Title shown on top of the widget. Only shown if "Custom Title/City display" is enabled.',
values: { type: "string" },
defaultValue: "-",
},
{
name: "24-hour format",
description: "Use 24-hour format instead of 12-hour format.",
values: { type: "boolean" },
defaultValue: "yes",
},
{
name: "Display seconds",
description: "Whether to show seconds in the clock.",
values: { type: "boolean" },
defaultValue: "no",
},
{
name: "Use fixed timezone",
description: "Select custom timezone to display instead of the client timezone.",
values: { type: "boolean" },
defaultValue: "no",
},
{
name: "Timezone",
description: 'Choose the timezone following the IANA standard. Only shown if "Use fixed timezone" is enabled.',
values: "Any IANA timezone, e.g. 'Europe/Berlin', 'America/New_York', 'Asia/Tokyo'",
defaultValue: "Europe/London",
},
{
name: "Show the date",
description: "Whether to show the date below the clock.",
values: { type: "boolean" },
defaultValue: "yes",
},
{
name: "Date format",
description: "Format of the date displayed below the clock.",
values: "A collection of date formats, e.g. 'DD/MM/YYYY', 'MM/DD/YYYY', etc.",
defaultValue: "dddd, MMMM D",
},
{
name: "Custom time format",
description: "Format of the time displayed in the clock.",
values: 'ISO 8601 format, e.g. "HH:mm:ss", "hh:mm A", etc.',
defaultValue: "-",
},
{
name: "Custom date format",
description: "Format of the date displayed below the clock.",
values: 'ISO 8601 format, e.g. "YYYY-MM-DD", "DD/MM/YYYY", etc.',
defaultValue: "-",
},
],
},
};