mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-17 14:26:30 +00:00
Use TZ from browser (#1524)
This commit is contained in:
parent
eb0b262de4
commit
44479c3b5b
@ -1,7 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import Layout from "@theme/Layout";
|
import Layout from "@theme/Layout";
|
||||||
import Link from "@docusaurus/Link";
|
import BrowserOnly from '@docusaurus/BrowserOnly';
|
||||||
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
|
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
|
||||||
import useBaseUrl from "@docusaurus/useBaseUrl";
|
import useBaseUrl from "@docusaurus/useBaseUrl";
|
||||||
import styles from "./styles.module.css";
|
import styles from "./styles.module.css";
|
||||||
@ -94,21 +94,26 @@ const features = [
|
|||||||
{
|
{
|
||||||
title: <>Upcoming Events</>,
|
title: <>Upcoming Events</>,
|
||||||
imageUrl: "",
|
imageUrl: "",
|
||||||
description: (
|
description: UpcomingEvents(),
|
||||||
<>
|
},
|
||||||
<iframe
|
];
|
||||||
|
|
||||||
|
function UpcomingEvents() {
|
||||||
|
return (
|
||||||
|
<BrowserOnly>
|
||||||
|
{() => <iframe
|
||||||
title="Upcoming Events Calendar"
|
title="Upcoming Events Calendar"
|
||||||
src="https://calendar.google.com/calendar/embed?height=400&wkst=2&bgcolor=%23ffffff&ctz=UTC&src=cDA3bjk4Z28xMW9uYW1kMDhkMGttcTZqaHNAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ&color=%23039BE5&title=Release%20Schedule&mode=AGENDA&showPrint=0&showTabs=0&showCalendars=0&showTz=1&showNav=0&showDate=0&showTitle=0"
|
src={`https://calendar.google.com/calendar/embed?height=400&wkst=2&bgcolor=%23ffffff&ctz=${Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC"}&src=cDA3bjk4Z28xMW9uYW1kMDhkMGttcTZqaHNAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ&color=%23039BE5&title=Release%20Schedule&mode=AGENDA&showPrint=0&showTabs=0&showCalendars=0&showTz=1&showNav=0&showDate=0&showTitle=0`}
|
||||||
style={{ borderWidth: 0, margin: "auto" }}
|
style={{ borderWidth: 0, margin: "auto" }}
|
||||||
width="300"
|
width="300"
|
||||||
height="200"
|
height="200"
|
||||||
frameBorder="0"
|
frameBorder="0"
|
||||||
scrolling="no"
|
scrolling="no"
|
||||||
/>
|
/>}
|
||||||
</>
|
</BrowserOnly>
|
||||||
),
|
|
||||||
},
|
);
|
||||||
];
|
}
|
||||||
|
|
||||||
function Feature({ imageUrl, title, description }) {
|
function Feature({ imageUrl, title, description }) {
|
||||||
const imgUrl = useBaseUrl(imageUrl);
|
const imgUrl = useBaseUrl(imageUrl);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user