From bcbf1800be3b8a1ba9cbfe6c1ec4b497a27895ce Mon Sep 17 00:00:00 2001 From: bryantgillespie Date: Tue, 30 Jul 2024 15:20:13 -0400 Subject: [PATCH 01/18] add types --- types/schema/blocks/block-directory.ts | 18 +++++++++ types/schema/blocks/block.ts | 7 +++- types/schema/blocks/index.ts | 1 + types/schema/content/agency-partner.ts | 56 ++++++++++++++++++++++++++ types/schema/content/index.ts | 1 + types/schema/schema.ts | 8 ++++ 6 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 types/schema/blocks/block-directory.ts create mode 100644 types/schema/content/agency-partner.ts diff --git a/types/schema/blocks/block-directory.ts b/types/schema/blocks/block-directory.ts new file mode 100644 index 00000000..75243777 --- /dev/null +++ b/types/schema/blocks/block-directory.ts @@ -0,0 +1,18 @@ +export interface BlockDirectory { + id: string; + collection: 'agency_partners'; + filter: Record | null; + style: + | 'none' + | 'image-fill-16-9' + | 'image-fill-1-1' + | 'image-centered-16-9' + | 'image-centered-1-1' + | 'icon-centered-16-9' + | 'icon-centered-1-1' + | 'image-title' + | 'icon-title' + | 'icon-above-title'; + grid: '3' | '4' | '6'; + title_size: 'small' | 'medium' | 'large'; +} diff --git a/types/schema/blocks/block.ts b/types/schema/blocks/block.ts index ccb37bb4..b039b43c 100644 --- a/types/schema/blocks/block.ts +++ b/types/schema/blocks/block.ts @@ -25,6 +25,7 @@ import type { BlockTable } from './block-table.js'; import type { BlockTestimonialSlider } from './block-testimonial-slider.js'; import type { BlockTierGroup } from './block-tier-group.js'; import type { BlockTier } from './block-tier.js'; +import type { BlockDirectory } from './block-directory.js'; export type BlockType = | 'block_accordion_group' @@ -54,7 +55,8 @@ export type BlockType = | 'block_table' | 'block_testimonial_slider' | 'block_tier_group' - | 'block_tier'; + | 'block_tier' + | 'block_directory'; export type Block = | BlockAccordion @@ -84,4 +86,5 @@ export type Block = | BlockTable | BlockTestimonialSlider | BlockTier - | BlockTierGroup; + | BlockTierGroup + | BlockDirectory; diff --git a/types/schema/blocks/index.ts b/types/schema/blocks/index.ts index 06478f4d..0468f955 100644 --- a/types/schema/blocks/index.ts +++ b/types/schema/blocks/index.ts @@ -26,4 +26,5 @@ export type * from './block-table.js'; export type * from './block-testimonial-slider.js'; export type * from './block-tier-group.js'; export type * from './block-tier.js'; +export type * from './block-directory.js'; export type * from './block.js'; diff --git a/types/schema/content/agency-partner.ts b/types/schema/content/agency-partner.ts new file mode 100644 index 00000000..49107bfb --- /dev/null +++ b/types/schema/content/agency-partner.ts @@ -0,0 +1,56 @@ +import type { File, User } from '../system'; + +export interface AgencyPartner { + id: string; + status: 'published' | 'draft' | 'archived'; + user_created: string | User; + date_created: string; + user_updated: string | User | null; + date_updated: string | null; + partner_name: string; + slug: string; + tier: 'basic' | 'bronze' | 'silver' | 'gold'; + partner_logo: string | File | null; + short_description: string; + description: string; + website: string; + links: + | { + label?: string; + description?: string; + url?: string; + }[] + | null; + country: string; + region: string[]; + team_size: string; + specializations: string[]; + projects: string[] | Project[] | null; + contact_first_name: string; + contact_last_name: string; + contact_email: string; +} + +export interface Project { + id: string; + status: 'published' | 'draft' | 'archived'; + user_created: string | User; + date_created: string; + user_updated: string | User | null; + date_updated: string | null; + date_published: string | null; + slug: string; + client_name: string; + website: string; + featured_image: string | File; + short_summary: string; + content: string; + built_with: string[]; + image_gallery: string[] | ProjectFile[] | null; +} + +export interface ProjectFile { + id: string; + projects_id: string | Project; + directus_files_id: string | File; +} diff --git a/types/schema/content/index.ts b/types/schema/content/index.ts index 970b16a7..06ba66c8 100644 --- a/types/schema/content/index.ts +++ b/types/schema/content/index.ts @@ -5,3 +5,4 @@ export type * from './team.js'; export type * from './video.js'; export type * from './event.js'; export type * from './developer-article.js'; +export type * from './agency-partner.js'; diff --git a/types/schema/schema.ts b/types/schema/schema.ts index 3d0da3b5..d2941158 100644 --- a/types/schema/schema.ts +++ b/types/schema/schema.ts @@ -39,6 +39,7 @@ import type { BlockTier, BlockTierGroup, BlockTierGroupBlockTier, + BlockDirectory, } from './blocks/index.js'; import type { Form, @@ -51,6 +52,8 @@ import type { DeveloperArticle, DeveloperArticleDocTag, DocTag, + AgencyPartner, + Project, } from './content/index.js'; import type { Globals, Navigation, Redirect, Seo } from './meta/index.js'; import type { ContentType, Page, PageBlock } from './routes/index.js'; @@ -72,6 +75,10 @@ export interface Schema { team: Team[]; events: Event[]; + // Partner Program + agency_partners: AgencyPartner[]; + projects: Project[]; + // Docs & Developer Blog developer_articles: DeveloperArticle[]; developer_articles_doc_tags: DeveloperArticleDocTag[]; @@ -118,6 +125,7 @@ export interface Schema { block_tier_group_block_tier: BlockTierGroupBlockTier[]; block_tier_group: BlockTierGroup[]; block_tier: BlockTier[]; + block_directory: BlockDirectory[]; // Meta globals: Globals; From 1797c921e1b44c9c9441759175ffb570dbf51f18 Mon Sep 17 00:00:00 2001 From: bryantgillespie Date: Thu, 1 Aug 2024 11:37:29 -0400 Subject: [PATCH 02/18] fix captcha --- components/Base/HsForm.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/Base/HsForm.vue b/components/Base/HsForm.vue index 1fce5d2b..6528ea88 100644 --- a/components/Base/HsForm.vue +++ b/components/Base/HsForm.vue @@ -154,7 +154,8 @@ watch(formId, renderHsForm); } :deep(fieldset + fieldset .hs-form-field > label), - :deep(.hs-dependent-field > * + * .hs-form-field > label) { + :deep(.hs-dependent-field > * + * .hs-form-field > label), + :deep(.hs_recaptcha) { display: block; margin-block-start: var(--space-6); } From 0f3da3d5999fc0868e80874edb25ab8706d015b2 Mon Sep 17 00:00:00 2001 From: bryantgillespie Date: Thu, 1 Aug 2024 16:57:43 -0400 Subject: [PATCH 03/18] buncha type fixes --- components/Base/Block.vue | 1 + components/Base/Byline.vue | 2 +- components/Base/Card.vue | 2 +- components/Base/CardGroup.vue | 4 ++-- components/Base/Icon.vue | 3 +++ components/Base/Video.vue | 2 +- components/Block/Accordion.vue | 2 +- components/Block/AccordionGroup.vue | 2 +- components/Block/ButtonGroup.vue | 2 +- components/Block/Card.vue | 4 ++-- components/Block/CardGroup.vue | 4 ++-- components/Block/CardGroupDynamic.vue | 20 ++++++++++++++----- components/Block/Columns.vue | 4 ++-- components/Block/Cta.vue | 4 ++-- components/Block/Header.vue | 7 ++++++- components/Block/Media.vue | 4 ++-- components/Block/MetricGroup.vue | 2 +- components/Block/Paper.vue | 8 +++++++- components/Block/Quote.vue | 6 +++--- components/Block/ResourceSlider.vue | 2 +- components/Block/Showcase.vue | 2 +- components/Block/TestimonialSlider.vue | 4 ++-- components/Block/Tier.vue | 2 +- components/Block/TierGroup.vue | 2 +- components/Nav/Header.vue | 2 +- components/ResourcePage.vue | 27 +++++++++++++++++++------- pages/[...permalink].vue | 7 ++++--- pages/team/[slug].vue | 2 +- 28 files changed, 86 insertions(+), 47 deletions(-) diff --git a/components/Base/Block.vue b/components/Base/Block.vue index ba27340f..18c8dd03 100644 --- a/components/Base/Block.vue +++ b/components/Base/Block.vue @@ -40,6 +40,7 @@ const components: Record> = { block_testimonial_slider: resolveComponent('BlockTestimonialSlider'), block_tier_group: resolveComponent('BlockTierGroup'), block_tier: resolveComponent('BlockTier'), + block_directory: resolveComponent('BlockDirectory'), }; diff --git a/components/Base/Byline.vue b/components/Base/Byline.vue index 664d6df7..8f0e8a0b 100644 --- a/components/Base/Byline.vue +++ b/components/Base/Byline.vue @@ -10,7 +10,7 @@ defineProps(); diff --git a/components/Block/Quote.vue b/components/Block/Quote.vue index 5396f789..cfc0cc64 100644 --- a/components/Block/Quote.vue +++ b/components/Block/Quote.vue @@ -21,20 +21,20 @@ const { data: block } = useAsyncData(props.uuid, () => v-if="block.company_logo" class="company-logo" :height="40" - :uuid="block.company_logo" + :uuid="block.company_logo as string" alt="" /> diff --git a/components/Block/ResourceSlider.vue b/components/Block/ResourceSlider.vue index 65cc6c10..e9de4443 100644 --- a/components/Block/ResourceSlider.vue +++ b/components/Block/ResourceSlider.vue @@ -76,7 +76,7 @@ loop(); class="byline" :name="resource.author.name" :title="resource.author.job_title ?? undefined" - :image="resource.author.image ?? undefined" + :image="(resource.author.image as string) ?? undefined" /> diff --git a/components/Block/Showcase.vue b/components/Block/Showcase.vue index 8965bddc..d3970088 100644 --- a/components/Block/Showcase.vue +++ b/components/Block/Showcase.vue @@ -51,7 +51,7 @@ loop(); v-for="nested in item.blocks" :key="nested.id" :type="nested.collection" - :uuid="nested.item" + :uuid="nested.item as string" :class="{ active: activeShowcase === index }" class="block" /> diff --git a/components/Block/TestimonialSlider.vue b/components/Block/TestimonialSlider.vue index f2e0c406..0b12a0d7 100644 --- a/components/Block/TestimonialSlider.vue +++ b/components/Block/TestimonialSlider.vue @@ -87,7 +87,7 @@ loop(); :key="item.id" class="company-logo" :height="25" - :uuid="item.block_quote_id.company_logo" + :uuid="item.block_quote_id.company_logo as string" alt="" /> @@ -105,7 +105,7 @@ loop(); :key="item.id" class="slide" :quote="item.block_quote_id.quote" - :person-image="item.block_quote_id.person_image ?? undefined" + :person-image="(item.block_quote_id.person_image as string) ?? undefined" :person-name="item.block_quote_id.person_name ?? undefined" :person-title="item.block_quote_id.person_title ?? undefined" /> diff --git a/components/Block/Tier.vue b/components/Block/Tier.vue index dbf161ac..0cf1b887 100644 --- a/components/Block/Tier.vue +++ b/components/Block/Tier.vue @@ -52,7 +52,7 @@ const { data: block } = useAsyncData(props.uuid, () => {{ block.description }}

- +