diff --git a/components/Layout.jsx b/components/Layout.jsx index 3c2f0c7..3717a6b 100644 --- a/components/Layout.jsx +++ b/components/Layout.jsx @@ -10,14 +10,17 @@ import { PrimaryNavigation } from '@/components/PrimaryNavigation' import { Prose } from '@/components/Prose' import { SiteFooter } from '@/components/SiteFooter' import { SiteHeader } from '@/components/SiteHeader' +import { SitewideNotice } from '@/components/SitewideNotice' import { collectHeadings } from '@/lib/utils' Layout.fragment = gql` fragment LayoutFragment on RootQuery { + ...SitewideNoticeFragment ...PrimaryNavigationFragment ...DocsSidebarNavigationFragment ...FooterNavigationFragment } + ${SitewideNotice.fragment} ${PrimaryNavigation.fragment} ${DocsSidebarNavigation.fragment} ${FooterNavigation.fragment} @@ -124,7 +127,8 @@ export function Layout({ data, children, toc, title }) { return ( <> - + +
diff --git a/components/LayoutArchive.jsx b/components/LayoutArchive.jsx index e4d219e..6fdba42 100644 --- a/components/LayoutArchive.jsx +++ b/components/LayoutArchive.jsx @@ -8,13 +8,16 @@ import { DocsSidebarNavigation } from '@/components/DocsSidebarNavigation' import { Prose } from '@/components/Prose' import { SiteFooter } from '@/components/SiteFooter' import { SiteHeader } from '@/components/SiteHeader' +import { SitewideNotice } from '@/components/SitewideNotice' LayoutArchive.fragment = gql` fragment LayoutArchiveFragment on RootQuery { + ...SitewideNoticeFragment ...PrimaryNavigationFragment ...DocsSidebarNavigationFragment ...FooterNavigationFragment } + ${SitewideNotice.fragment} ${PrimaryNavigation.fragment} ${DocsSidebarNavigation.fragment} ${FooterNavigation.fragment} @@ -53,7 +56,8 @@ export function LayoutArchive({ data, children, title }) { return ( <> - + +
diff --git a/components/LayoutFrontPage.jsx b/components/LayoutFrontPage.jsx index 0bf1238..eb0d0c8 100644 --- a/components/LayoutFrontPage.jsx +++ b/components/LayoutFrontPage.jsx @@ -6,13 +6,16 @@ import { SiteFooter } from './SiteFooter' import { PrimaryNavigation } from '@/components/PrimaryNavigation' import { SiteHeader } from '@/components/SiteHeader' +import { SitewideNotice } from '@/components/SitewideNotice' LayoutFrontPage.fragment = gql` fragment LayoutFrontPageFragment on RootQuery { + ...SitewideNoticeFragment ...PrimaryNavigationFragment ...FooterNavigationFragment } + ${SitewideNotice.fragment} ${PrimaryNavigation.fragment} ${FooterNavigation.fragment} ` @@ -36,7 +39,8 @@ export function LayoutFrontPage({ data, children }) { : [] return ( <> - + +
{children}
diff --git a/components/SiteHeader.jsx b/components/SiteHeader.jsx index ed99d8e..c886066 100644 --- a/components/SiteHeader.jsx +++ b/components/SiteHeader.jsx @@ -10,9 +10,11 @@ import { PrimaryNavigation } from '@/components/PrimaryNavigation' import { Search } from '@/components/Search' import { ModeToggle } from '@/components/ThemeSelector' -export function SiteHeader({ navigation }) { +export function SiteHeader({ navigation, isNoticeVisible = false }) { let [isScrolled, setIsScrolled] = useState(false) + const headerTopPosition = isNoticeVisible ? 'top-12' : 'top-0'; + useEffect(() => { function onScroll() { setIsScrolled(window.scrollY > 0) @@ -27,7 +29,9 @@ export function SiteHeader({ navigation }) { return (
+

{message}

+
+ ) + } +} diff --git a/wp-blocks/AcfFieldTypeSettingsBlock.js b/wp-blocks/AcfFieldTypeSettingsBlock.js index bf5ad7c..f5741e8 100644 --- a/wp-blocks/AcfFieldTypeSettingsBlock.js +++ b/wp-blocks/AcfFieldTypeSettingsBlock.js @@ -1,5 +1,4 @@ import { gql } from '@apollo/client'; -import clsx from 'clsx' import React, { useState } from 'react'; import { Button } from "@/components/ui/button"; @@ -8,7 +7,7 @@ import { Card, CardFooter, CardHeader } from "@/components/ui/card"; const AccordionItem = ({ title, content, isOpen, onClick }) => { return ( <> - {isOpen && ( -
+
{content}
)} @@ -86,7 +85,7 @@ export function AcfFieldTypeSettingsBlock({ fieldTypeSettingsBlockFields }) { })} -
+