diff --git a/components/blocks/downloadBlock.tsx b/components/blocks/downloadBlock.tsx index 6f2be8cf3a..cf456070c1 100644 --- a/components/blocks/downloadBlock.tsx +++ b/components/blocks/downloadBlock.tsx @@ -1,5 +1,6 @@ import classNames from "classnames"; import Image from "next/image"; +import { useState } from "react"; import { FaFileDownload } from "react-icons/fa"; import type { Template } from "tinacms"; import { tinaField } from "tinacms/dist/react"; @@ -43,6 +44,7 @@ export const DownloadBlock = (data: DownloadBlockProps) => { }; const Download = (data: Downloads) => { + const [isImgBroken, setIsImgBroken] = useState(false); const { header, img, @@ -64,7 +66,15 @@ const Download = (data: Downloads) => { )} data-tina-field={tinaField(data, "img")} > - {header} + {!isImgBroken && ( + setIsImgBroken(true)} + src={img} + alt={header} + height={400} + width={210} + /> + )} )}
Download
diff --git a/components/layout/footer.tsx b/components/layout/footer.tsx index 6eef1579c7..cdae84cfcf 100644 --- a/components/layout/footer.tsx +++ b/components/layout/footer.tsx @@ -1,9 +1,11 @@ import dayjs from "dayjs"; import dynamic from "next/dynamic"; import Image from "next/image"; +import { BuiltOnAzure } from "../blocks"; import { CustomLink } from "../customLink"; import { SocialIcons } from "../socialIcons/socialIcons"; import { Container } from "../util/container"; +import { Section } from "../util/section"; export const Footer = () => { return ( @@ -102,3 +104,10 @@ const SiteInfo = () => ( ); +export const PreFooter = () => { + return ( +
+ +
+ ); +}; diff --git a/components/layout/layout.tsx b/components/layout/layout.tsx index e3d96518ac..957d261c66 100644 --- a/components/layout/layout.tsx +++ b/components/layout/layout.tsx @@ -2,7 +2,7 @@ import classNames from "classnames"; import Head from "next/head"; import { useRouter } from "next/router"; import { useLiveStreamProps } from "../../hooks/useLiveStreamProps"; -import { Footer } from "./footer"; +import { Footer, PreFooter } from "./footer"; import { Theme } from "./theme"; import dayjs from "dayjs"; @@ -57,14 +57,14 @@ interface LayoutProps { menuGroups: NavMenuGroup[]; }; children: React.ReactNode; - mainClassName?: string; + showAzureBanner?: boolean; } export const Layout = ({ children, menu, className = "", - mainClassName = "", + showAzureBanner, }: LayoutProps) => { const liveStreamProps = useLiveStreamProps(); const router = useRouter(); @@ -153,9 +153,9 @@ export const Layout = ({ /> -
- {children} -
+
{children}
+ + {showAzureBanner && }