diff --git a/pages/about/[keyword].tsx b/pages/about/[keyword].tsx index dac3d086..04753084 100644 --- a/pages/about/[keyword].tsx +++ b/pages/about/[keyword].tsx @@ -22,7 +22,14 @@ export default function CustomPage({ return ( // TODO: make theme adjustable - {components.map((component) => renderComponent(component?.item))} + {components.map((component, index) => ( +
+ {renderComponent(component?.item)} +
+ ))}
) } diff --git a/src/components/CompanyLogos.tsx b/src/components/CompanyLogos.tsx index f4e98583..af37bc46 100644 --- a/src/components/CompanyLogos.tsx +++ b/src/components/CompanyLogos.tsx @@ -1,99 +1,76 @@ -import { type ComponentProps, type ReactNode } from 'react' - -import { WrapWithIf } from '@pluralsh/design-system' +import { type ComponentProps } from 'react' import styled, { useTheme } from 'styled-components' import { type Merge } from 'type-fest' -import { TextLabel } from '@src/components/Typography' -import { type PartnerLogos } from '@src/data/getSiteSettings' - -import { StandardPageWidth } from './layout/LayoutHelpers' - -const CompanyLogosSectionSC = styled.div(({ theme: _ }) => ({ - ul: {}, - img: { - width: 100, - }, -})) +import { getImageUrl } from '@src/consts/routes' +import { type LogoListFragment } from '@src/generated/graphqlDirectus' -// Using old inline-block layout technique so we can use 'text-wrap: balance' -// to keep things looking nice when it breaks to multiple lines -const LogosListSC = styled.ul(({ theme }) => ({ - textAlign: 'center', - textWrap: 'balance', - margin: -theme.spacing.xxlarge / 2, +const LogosListSC = styled.div(({ theme }) => ({ + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + gap: theme.spacing.xxlarge, + paddingRight: theme.spacing.xxlarge, + paddingLeft: theme.spacing.xxlarge, })) -const LogoSC = styled.li(({ theme }) => ({ - display: 'inline-block', - padding: 0, - margin: theme.spacing.xxlarge / 2, - verticalAlign: 'middle', +const LogoSC = styled.a(({ theme }) => ({ + display: 'flex', + justifyContent: 'center', + padding: theme.spacing.medium, + width: 175, + height: 80, + borderRadius: theme.borderRadiuses.medium, + transition: 'background 0.2s ease-in-out', + '&:hover': { + background: theme.colors['fill-zero-hover'], + }, })) export function CompanyLogosSection({ logos, - heading, ...props }: Merge< - ComponentProps, - { - logos?: PartnerLogos['items'] - heading?: ReactNode - } + ComponentProps, + { logos?: LogoListFragment['logos'] } >) { const theme = useTheme() return ( - - - - {heading || 'Used by fast-moving teams at'} - - - {logos?.map((logo) => { - if (!logo?.item) { - return null - } - const { - slug, - logo_dark: logoDark, - logo_light: logoLight, - name, - url, - width, - } = logo.item - const imgUrl = theme.mode === 'light' ? logoLight : logoDark + + {logos?.map((logo) => { + if (!logo?.company_logos_id) { + return null + } + const { + slug, + logo_dark: logoDark, + logo_light: logoLight, + name, + url, + } = logo.company_logos_id + const imgUrl = getImageUrl( + theme.mode === 'light' ? logoLight : logoDark + ) - return ( - imgUrl && ( - - - } - > - {name} - - - ) - ) - })} - - - + return ( + imgUrl && ( + + {name} + + ) + ) + })} + ) } diff --git a/src/components/custom-page/Hero.tsx b/src/components/custom-page/Hero.tsx index 8ea80c13..ff64a14b 100644 --- a/src/components/custom-page/Hero.tsx +++ b/src/components/custom-page/Hero.tsx @@ -9,7 +9,7 @@ import { ImageAspectRatio } from '../AspectRatio' import Embed from '../Embed' import { Body1, Hero1 } from '../Typography' -import { spacingToClassName } from './common' +import { getSpacingClassName } from './common' export function Hero({ spacing, @@ -22,11 +22,10 @@ export function Hero({ video_url: videoUrl, form, }: HeroComponentFragment) { - const spacingClassName = spacingToClassName[spacing ?? 'normal'] ?? '' const imageUrl = getImageUrl(image) return ( -
+
LogoStrip +import { CompanyLogosSection } from '../CompanyLogos' + +import { getSpacingClassName } from './common' + +export function LogoStrip({ + spacing, + logo_list: logoList, +}: LogoStripComponentFragment) { + return ( +
+ +
+ ) } diff --git a/src/components/custom-page/common.tsx b/src/components/custom-page/common.tsx index e3ceadc1..ab393513 100644 --- a/src/components/custom-page/common.tsx +++ b/src/components/custom-page/common.tsx @@ -10,12 +10,15 @@ import { LogoStrip } from './LogoStrip' import { RichTextColumns } from './RichTextColumns' import { SectionHeader } from './SectionHeader' -export const spacingToClassName = { +const spacingToClassName = { relaxed: 'my-[192px]', normal: 'my-[96px]', compact: 'my-[48px]', } +export const getSpacingClassName = (spacing: Nullable) => + spacingToClassName[spacing ?? 'normal'] ?? '' + export function renderComponent( component: NonNullable< NonNullable[number] diff --git a/src/generated/graphqlDirectus.ts b/src/generated/graphqlDirectus.ts index 7043bae0..c1dec457 100644 --- a/src/generated/graphqlDirectus.ts +++ b/src/generated/graphqlDirectus.ts @@ -44,6 +44,8 @@ export type Mutation = { create_collapsible_lists_items_items: Array; create_collapsibles_item?: Maybe; create_collapsibles_items: Array; + create_company_logo_lists_company_logos_item?: Maybe; + create_company_logo_lists_company_logos_items: Array; create_company_logo_lists_item?: Maybe; create_company_logo_lists_items: Array; create_company_logo_lists_items_item?: Maybe; @@ -128,6 +130,8 @@ export type Mutation = { delete_collapsible_lists_items_items?: Maybe; delete_collapsibles_item?: Maybe; delete_collapsibles_items?: Maybe; + delete_company_logo_lists_company_logos_item?: Maybe; + delete_company_logo_lists_company_logos_items?: Maybe; delete_company_logo_lists_item?: Maybe; delete_company_logo_lists_items?: Maybe; delete_company_logo_lists_items_item?: Maybe; @@ -223,6 +227,9 @@ export type Mutation = { update_collapsibles_item?: Maybe; update_collapsibles_items: Array; update_company_logo_lists_batch: Array; + update_company_logo_lists_company_logos_batch: Array; + update_company_logo_lists_company_logos_item?: Maybe; + update_company_logo_lists_company_logos_items: Array; update_company_logo_lists_item?: Maybe; update_company_logo_lists_items: Array; update_company_logo_lists_items_batch: Array; @@ -474,6 +481,22 @@ export type MutationCreate_Collapsibles_ItemsArgs = { }; +export type MutationCreate_Company_Logo_Lists_Company_Logos_ItemArgs = { + data: Create_Company_Logo_Lists_Company_Logos_Input; +}; + + +export type MutationCreate_Company_Logo_Lists_Company_Logos_ItemsArgs = { + data?: InputMaybe>; + filter?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + page?: InputMaybe; + search?: InputMaybe; + sort?: InputMaybe>>; +}; + + export type MutationCreate_Company_Logo_Lists_ItemArgs = { data: Create_Company_Logo_Lists_Input; }; @@ -1092,6 +1115,16 @@ export type MutationDelete_Collapsibles_ItemsArgs = { }; +export type MutationDelete_Company_Logo_Lists_Company_Logos_ItemArgs = { + id: Scalars['ID']['input']; +}; + + +export type MutationDelete_Company_Logo_Lists_Company_Logos_ItemsArgs = { + ids: Array>; +}; + + export type MutationDelete_Company_Logo_Lists_ItemArgs = { id: Scalars['ID']['input']; }; @@ -1699,6 +1732,35 @@ export type MutationUpdate_Company_Logo_Lists_BatchArgs = { }; +export type MutationUpdate_Company_Logo_Lists_Company_Logos_BatchArgs = { + data?: InputMaybe>; + filter?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + page?: InputMaybe; + search?: InputMaybe; + sort?: InputMaybe>>; +}; + + +export type MutationUpdate_Company_Logo_Lists_Company_Logos_ItemArgs = { + data: Update_Company_Logo_Lists_Company_Logos_Input; + id: Scalars['ID']['input']; +}; + + +export type MutationUpdate_Company_Logo_Lists_Company_Logos_ItemsArgs = { + data: Update_Company_Logo_Lists_Company_Logos_Input; + filter?: InputMaybe; + ids: Array>; + limit?: InputMaybe; + offset?: InputMaybe; + page?: InputMaybe; + search?: InputMaybe; + sort?: InputMaybe>>; +}; + + export type MutationUpdate_Company_Logo_Lists_ItemArgs = { data: Update_Company_Logo_Lists_Input; id: Scalars['ID']['input']; @@ -2707,6 +2769,9 @@ export type Query = { company_logo_lists: Array; company_logo_lists_aggregated: Array; company_logo_lists_by_id?: Maybe; + company_logo_lists_company_logos: Array; + company_logo_lists_company_logos_aggregated: Array; + company_logo_lists_company_logos_by_id?: Maybe; company_logo_lists_items: Array; company_logo_lists_items_aggregated: Array; company_logo_lists_items_by_id?: Maybe; @@ -3072,6 +3137,32 @@ export type QueryCompany_Logo_Lists_By_IdArgs = { }; +export type QueryCompany_Logo_Lists_Company_LogosArgs = { + filter?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + page?: InputMaybe; + search?: InputMaybe; + sort?: InputMaybe>>; +}; + + +export type QueryCompany_Logo_Lists_Company_Logos_AggregatedArgs = { + filter?: InputMaybe; + groupBy?: InputMaybe>>; + limit?: InputMaybe; + offset?: InputMaybe; + page?: InputMaybe; + search?: InputMaybe; + sort?: InputMaybe>>; +}; + + +export type QueryCompany_Logo_Lists_Company_Logos_By_IdArgs = { + id: Scalars['ID']['input']; +}; + + export type QueryCompany_Logo_Lists_ItemsArgs = { filter?: InputMaybe; limit?: InputMaybe; @@ -4813,7 +4904,8 @@ export type Company_Logo_Lists = { date_updated?: Maybe; date_updated_func?: Maybe; id: Scalars['ID']['output']; - ignore?: Maybe; + logos?: Maybe>>; + logos_func?: Maybe; partner_logos?: Maybe>>; slug?: Maybe; sort?: Maybe; @@ -4823,6 +4915,16 @@ export type Company_Logo_Lists = { }; +export type Company_Logo_ListsLogosArgs = { + filter?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + page?: InputMaybe; + search?: InputMaybe; + sort?: InputMaybe>>; +}; + + export type Company_Logo_ListsPartner_LogosArgs = { filter?: InputMaybe; limit?: InputMaybe; @@ -4871,7 +4973,7 @@ export type Company_Logo_Lists_Aggregated_Count = { date_created?: Maybe; date_updated?: Maybe; id?: Maybe; - ignore?: Maybe; + logos?: Maybe; slug?: Maybe; sort?: Maybe; status?: Maybe; @@ -4885,6 +4987,69 @@ export type Company_Logo_Lists_Aggregated_Fields = { sort?: Maybe; }; +export type Company_Logo_Lists_Company_Logos = { + __typename?: 'company_logo_lists_company_logos'; + company_logo_lists_id?: Maybe; + company_logos_id?: Maybe; + id: Scalars['ID']['output']; +}; + + +export type Company_Logo_Lists_Company_LogosCompany_Logo_Lists_IdArgs = { + filter?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + page?: InputMaybe; + search?: InputMaybe; + sort?: InputMaybe>>; +}; + + +export type Company_Logo_Lists_Company_LogosCompany_Logos_IdArgs = { + filter?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + page?: InputMaybe; + search?: InputMaybe; + sort?: InputMaybe>>; +}; + +export type Company_Logo_Lists_Company_Logos_Aggregated = { + __typename?: 'company_logo_lists_company_logos_aggregated'; + avg?: Maybe; + avgDistinct?: Maybe; + count?: Maybe; + countAll?: Maybe; + countDistinct?: Maybe; + group?: Maybe; + max?: Maybe; + min?: Maybe; + sum?: Maybe; + sumDistinct?: Maybe; +}; + +export type Company_Logo_Lists_Company_Logos_Aggregated_Count = { + __typename?: 'company_logo_lists_company_logos_aggregated_count'; + company_logo_lists_id?: Maybe; + company_logos_id?: Maybe; + id?: Maybe; +}; + +export type Company_Logo_Lists_Company_Logos_Aggregated_Fields = { + __typename?: 'company_logo_lists_company_logos_aggregated_fields'; + company_logo_lists_id?: Maybe; + company_logos_id?: Maybe; + id?: Maybe; +}; + +export type Company_Logo_Lists_Company_Logos_Filter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; + company_logo_lists_id?: InputMaybe; + company_logos_id?: InputMaybe; + id?: InputMaybe; +}; + export type Company_Logo_Lists_Filter = { _and?: InputMaybe>>; _or?: InputMaybe>>; @@ -4893,7 +5058,8 @@ export type Company_Logo_Lists_Filter = { date_updated?: InputMaybe; date_updated_func?: InputMaybe; id?: InputMaybe; - ignore?: InputMaybe; + logos?: InputMaybe; + logos_func?: InputMaybe; partner_logos?: InputMaybe; slug?: InputMaybe; sort?: InputMaybe; @@ -4973,7 +5139,6 @@ export type Company_Logos = { name: Scalars['String']['output']; slug?: Maybe; url?: Maybe; - width?: Maybe; }; @@ -5019,13 +5184,11 @@ export type Company_Logos_Aggregated_Count = { name?: Maybe; slug?: Maybe; url?: Maybe; - width?: Maybe; }; export type Company_Logos_Aggregated_Fields = { __typename?: 'company_logos_aggregated_fields'; id?: Maybe; - width?: Maybe; }; export type Company_Logos_Filter = { @@ -5039,7 +5202,6 @@ export type Company_Logos_Filter = { name?: InputMaybe; slug?: InputMaybe; url?: InputMaybe; - width?: InputMaybe; }; export type Count_Function_Filter_Operators = { @@ -5169,11 +5331,17 @@ export type Create_Collapsibles_Input = { user_updated?: InputMaybe; }; +export type Create_Company_Logo_Lists_Company_Logos_Input = { + company_logo_lists_id?: InputMaybe; + company_logos_id?: InputMaybe; + id?: InputMaybe; +}; + export type Create_Company_Logo_Lists_Input = { date_created?: InputMaybe; date_updated?: InputMaybe; id?: InputMaybe; - ignore?: InputMaybe; + logos?: InputMaybe>>; partner_logos?: InputMaybe>>; slug?: InputMaybe; sort?: InputMaybe; @@ -5198,7 +5366,6 @@ export type Create_Company_Logos_Input = { name: Scalars['String']['input']; slug?: InputMaybe; url?: InputMaybe; - width?: InputMaybe; }; export type Create_Cta_Input = { @@ -5402,6 +5569,7 @@ export type Create_Logo_Strip_Input = { date_created?: InputMaybe; date_updated?: InputMaybe; id?: InputMaybe; + logo_list?: InputMaybe; spacing?: InputMaybe; user_created?: InputMaybe; }; @@ -6893,11 +7061,22 @@ export type Logo_Strip = { date_updated?: Maybe; date_updated_func?: Maybe; id: Scalars['ID']['output']; + logo_list?: Maybe; spacing?: Maybe; user_created?: Maybe; }; +export type Logo_StripLogo_ListArgs = { + filter?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + page?: InputMaybe; + search?: InputMaybe; + sort?: InputMaybe>>; +}; + + export type Logo_StripUser_CreatedArgs = { filter?: InputMaybe; limit?: InputMaybe; @@ -6926,6 +7105,7 @@ export type Logo_Strip_Aggregated_Count = { date_created?: Maybe; date_updated?: Maybe; id?: Maybe; + logo_list?: Maybe; spacing?: Maybe; user_created?: Maybe; }; @@ -6933,6 +7113,7 @@ export type Logo_Strip_Aggregated_Count = { export type Logo_Strip_Aggregated_Fields = { __typename?: 'logo_strip_aggregated_fields'; id?: Maybe; + logo_list?: Maybe; }; export type Logo_Strip_Filter = { @@ -6943,6 +7124,7 @@ export type Logo_Strip_Filter = { date_updated?: InputMaybe; date_updated_func?: InputMaybe; id?: InputMaybe; + logo_list?: InputMaybe; spacing?: InputMaybe; user_created?: InputMaybe; }; @@ -9107,11 +9289,17 @@ export type Update_Collapsibles_Input = { user_updated?: InputMaybe; }; +export type Update_Company_Logo_Lists_Company_Logos_Input = { + company_logo_lists_id?: InputMaybe; + company_logos_id?: InputMaybe; + id?: InputMaybe; +}; + export type Update_Company_Logo_Lists_Input = { date_created?: InputMaybe; date_updated?: InputMaybe; id?: InputMaybe; - ignore?: InputMaybe; + logos?: InputMaybe>>; partner_logos?: InputMaybe>>; slug?: InputMaybe; sort?: InputMaybe; @@ -9136,7 +9324,6 @@ export type Update_Company_Logos_Input = { name?: InputMaybe; slug?: InputMaybe; url?: InputMaybe; - width?: InputMaybe; }; export type Update_Cta_Input = { @@ -9340,6 +9527,7 @@ export type Update_Logo_Strip_Input = { date_created?: InputMaybe; date_updated?: InputMaybe; id?: InputMaybe; + logo_list?: InputMaybe; spacing?: InputMaybe; user_created?: InputMaybe; }; @@ -9637,9 +9825,9 @@ export type LinkFragment = { __typename?: 'nav_link', id: string, title?: string export type NavListFragment = { __typename?: 'nav_list', id: string, flatten?: boolean | null, mobile_only?: boolean | null, link?: { __typename?: 'nav_link', id: string, title?: string | null, url?: string | null } | null }; -export type CompanyLogoFragment = { __typename?: 'company_logos', slug?: string | null, name: string, url?: string | null, width?: number | null, logo_light?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null, logo_dark?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null }; +export type CompanyLogoFragment = { __typename?: 'company_logos', slug?: string | null, name: string, url?: string | null, logo_light?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null, logo_dark?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null }; -export type LogoListFragment = { __typename?: 'company_logo_lists', slug?: string | null }; +export type LogoListFragment = { __typename?: 'company_logo_lists', slug?: string | null, logos?: Array<{ __typename?: 'company_logo_lists_company_logos', company_logos_id?: { __typename?: 'company_logos', slug?: string | null, name: string, url?: string | null, logo_light?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null, logo_dark?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null } | null } | null> | null }; export type CaseStudyFragment = { __typename?: 'case_studies', id: string, slug?: string | null, label?: string | null, title?: string | null, content?: string | null, ctas?: any | null, stack_label?: string | null, stack_apps?: any | null, hero_image?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null }; @@ -9710,7 +9898,7 @@ export type SolutionsQueryVariables = Exact<{ export type SolutionsQuery = { __typename?: 'Query', solutions_pages: Array<{ __typename?: 'solutions_pages', id: string, slug: string, title?: string | null, description?: string | null, upper_features_title?: string | null, lower_features_title?: string | null, download_section_title?: string | null, download_section_description?: string | null, upper_features?: Array<{ __typename?: 'solution_features', id: string, title?: string | null, description?: string | null, icon?: string | null, link_title?: string | null, link_url?: string | null } | null> | null, lower_features?: Array<{ __typename?: 'solution_features', id: string, title?: string | null, description?: string | null, icon?: string | null, link_title?: string | null, link_url?: string | null } | null> | null, problems?: Array<{ __typename?: 'solution_problems', id: string, title?: string | null, subtitle?: string | null, problem?: string | null, solution?: string | null } | null> | null, featured_quote?: { __typename?: 'quotes', id: string, quote?: string | null, author_text?: string | null } | null }> }; -export type CustomPageFragment = { __typename?: 'custom_pages', id: string, slug: string, components?: Array<{ __typename?: 'custom_pages_components', collection?: string | null, item?: { __typename?: 'blog_cards', spacing?: string | null } | { __typename?: 'cards', spacing?: string | null } | { __typename?: 'cta', spacing?: string | null } | { __typename?: 'customer_quote', spacing?: string | null } | { __typename?: 'hero', spacing?: string | null, heading?: string | null, body_text?: string | null, media_type?: string | null, video_url?: string | null, form?: string | null, cta_text?: string | null, cta_url?: string | null, image?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null } | { __typename?: 'large_image', spacing?: string | null } | { __typename?: 'logo_strip', spacing?: string | null } | { __typename?: 'rich_text_columns', spacing?: string | null } | { __typename?: 'section_header', spacing?: string | null } | null } | null> | null }; +export type CustomPageFragment = { __typename?: 'custom_pages', id: string, slug: string, components?: Array<{ __typename?: 'custom_pages_components', collection?: string | null, item?: { __typename?: 'blog_cards', spacing?: string | null } | { __typename?: 'cards', spacing?: string | null } | { __typename?: 'cta', spacing?: string | null } | { __typename?: 'customer_quote', spacing?: string | null } | { __typename?: 'hero', spacing?: string | null, heading?: string | null, body_text?: string | null, media_type?: string | null, video_url?: string | null, form?: string | null, cta_text?: string | null, cta_url?: string | null, image?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null } | { __typename?: 'large_image', spacing?: string | null } | { __typename?: 'logo_strip', spacing?: string | null, logo_list?: { __typename?: 'company_logo_lists', slug?: string | null, logos?: Array<{ __typename?: 'company_logo_lists_company_logos', company_logos_id?: { __typename?: 'company_logos', slug?: string | null, name: string, url?: string | null, logo_light?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null, logo_dark?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null } | null } | null> | null } | null } | { __typename?: 'rich_text_columns', spacing?: string | null } | { __typename?: 'section_header', spacing?: string | null } | null } | null> | null }; export type CustomPageTinyFragment = { __typename?: 'custom_pages', id: string, slug: string }; @@ -9724,11 +9912,11 @@ export type CustomPageQueryVariables = Exact<{ }>; -export type CustomPageQuery = { __typename?: 'Query', custom_pages: Array<{ __typename?: 'custom_pages', id: string, slug: string, components?: Array<{ __typename?: 'custom_pages_components', collection?: string | null, item?: { __typename?: 'blog_cards', spacing?: string | null } | { __typename?: 'cards', spacing?: string | null } | { __typename?: 'cta', spacing?: string | null } | { __typename?: 'customer_quote', spacing?: string | null } | { __typename?: 'hero', spacing?: string | null, heading?: string | null, body_text?: string | null, media_type?: string | null, video_url?: string | null, form?: string | null, cta_text?: string | null, cta_url?: string | null, image?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null } | { __typename?: 'large_image', spacing?: string | null } | { __typename?: 'logo_strip', spacing?: string | null } | { __typename?: 'rich_text_columns', spacing?: string | null } | { __typename?: 'section_header', spacing?: string | null } | null } | null> | null }> }; +export type CustomPageQuery = { __typename?: 'Query', custom_pages: Array<{ __typename?: 'custom_pages', id: string, slug: string, components?: Array<{ __typename?: 'custom_pages_components', collection?: string | null, item?: { __typename?: 'blog_cards', spacing?: string | null } | { __typename?: 'cards', spacing?: string | null } | { __typename?: 'cta', spacing?: string | null } | { __typename?: 'customer_quote', spacing?: string | null } | { __typename?: 'hero', spacing?: string | null, heading?: string | null, body_text?: string | null, media_type?: string | null, video_url?: string | null, form?: string | null, cta_text?: string | null, cta_url?: string | null, image?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null } | { __typename?: 'large_image', spacing?: string | null } | { __typename?: 'logo_strip', spacing?: string | null, logo_list?: { __typename?: 'company_logo_lists', slug?: string | null, logos?: Array<{ __typename?: 'company_logo_lists_company_logos', company_logos_id?: { __typename?: 'company_logos', slug?: string | null, name: string, url?: string | null, logo_light?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null, logo_dark?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null } | null } | null> | null } | null } | { __typename?: 'rich_text_columns', spacing?: string | null } | { __typename?: 'section_header', spacing?: string | null } | null } | null> | null }> }; export type HeroComponentFragment = { __typename?: 'hero', spacing?: string | null, heading?: string | null, body_text?: string | null, media_type?: string | null, video_url?: string | null, form?: string | null, cta_text?: string | null, cta_url?: string | null, image?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null }; -export type LogoStripComponentFragment = { __typename?: 'logo_strip', spacing?: string | null }; +export type LogoStripComponentFragment = { __typename?: 'logo_strip', spacing?: string | null, logo_list?: { __typename?: 'company_logo_lists', slug?: string | null, logos?: Array<{ __typename?: 'company_logo_lists_company_logos', company_logos_id?: { __typename?: 'company_logos', slug?: string | null, name: string, url?: string | null, logo_light?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null, logo_dark?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null } | null } | null> | null } | null }; export type SectionHeaderComponentFragment = { __typename?: 'section_header', spacing?: string | null }; @@ -9874,25 +10062,6 @@ export const ImageFileFragmentDoc = gql` filesize } `; -export const CompanyLogoFragmentDoc = gql` - fragment CompanyLogo on company_logos { - slug - name - logo_light { - ...ImageFile - } - logo_dark { - ...ImageFile - } - url - width -} - ${ImageFileFragmentDoc}`; -export const LogoListFragmentDoc = gql` - fragment LogoList on company_logo_lists { - slug -} - `; export const CaseStudyFragmentDoc = gql` fragment CaseStudy on case_studies { id @@ -10073,11 +10242,37 @@ export const HeroComponentFragmentDoc = gql` cta_url } ${ImageFileFragmentDoc}`; +export const CompanyLogoFragmentDoc = gql` + fragment CompanyLogo on company_logos { + slug + name + logo_light { + ...ImageFile + } + logo_dark { + ...ImageFile + } + url +} + ${ImageFileFragmentDoc}`; +export const LogoListFragmentDoc = gql` + fragment LogoList on company_logo_lists { + slug + logos { + company_logos_id { + ...CompanyLogo + } + } +} + ${CompanyLogoFragmentDoc}`; export const LogoStripComponentFragmentDoc = gql` fragment LogoStripComponent on logo_strip { spacing + logo_list { + ...LogoList + } } - `; + ${LogoListFragmentDoc}`; export const SectionHeaderComponentFragmentDoc = gql` fragment SectionHeaderComponent on section_header { spacing diff --git a/src/graph/directus/cms.graphql b/src/graph/directus/cms.graphql index faba6f7f..00da39d0 100644 --- a/src/graph/directus/cms.graphql +++ b/src/graph/directus/cms.graphql @@ -53,16 +53,15 @@ fragment CompanyLogo on company_logos { ...ImageFile } url - width } fragment LogoList on company_logo_lists { slug - # items { - # item { - # ...CompanyLogo - # } - # } + logos { + company_logos_id { + ...CompanyLogo + } + } } # fragment SiteSettings on site_settings { diff --git a/src/graph/directus/customPages.graphql b/src/graph/directus/customPages.graphql index e0d9b371..bc390b0f 100644 --- a/src/graph/directus/customPages.graphql +++ b/src/graph/directus/customPages.graphql @@ -50,6 +50,9 @@ fragment HeroComponent on hero { fragment LogoStripComponent on logo_strip { spacing + logo_list { + ...LogoList + } } fragment SectionHeaderComponent on section_header {