Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💄 Component Redesign | Logo Carousel and Image and Accordian Blocks #3389

Closed
wants to merge 204 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
204 commits
Select commit Hold shift + click to select a range
e355173
initial commit to setup shadcn
isaaclombardssw Nov 20, 2024
d79a048
added config for shadcn and components.json
isaaclombardssw Nov 20, 2024
f65c8b1
merge with main
isaaclombardssw Nov 20, 2024
0034c89
shadcn import setup and breadcrum template code
isaaclombardssw Nov 20, 2024
4294650
breadcrumbs component
isaaclombardssw Nov 21, 2024
4b79730
🎨 moved base case to switch statement
Calinator444 Nov 21, 2024
13fd61e
breadcrumb component integrated with Tina
isaaclombardssw Nov 21, 2024
6a8521b
adding a consulting v2 collection (WIP)
isaaclombardssw Nov 22, 2024
ee8a452
Merge branch 'main' into image-text-block-component
isaaclombardssw Nov 22, 2024
a1a2650
🪓 Split consulting page into 2 separate routes
Calinator444 Nov 22, 2024
987017a
starting the image text block schema
isaaclombardssw Nov 22, 2024
c0a5f67
starting to create the blocks page
isaaclombardssw Nov 22, 2024
f5db5dd
💄 Replaced navbar on consultingv2 page with stylistically consistent …
Calinator444 Nov 24, 2024
db97e4d
🐛 Fixed Breadcrumbs not rendering on new consulting pages
Calinator444 Nov 24, 2024
4e49bb5
🏷️ Added explicit typing for Breadcrumbs component
Calinator444 Nov 24, 2024
67e7230
♻️ Added variable for initial breadcrumb value
Calinator444 Nov 25, 2024
08e17f8
💄 Fixed layout for v2 consulting page
Calinator444 Nov 25, 2024
d012164
💄 Updated breadcrumbs to match figma prototype
Calinator444 Nov 25, 2024
ff4377f
💄offset text underline for breadcrumbs to match figma prototype
Calinator444 Nov 25, 2024
83d59db
🎨 Added new background color type for new consulting pages
Calinator444 Nov 25, 2024
3ad8113
💄Made breadcrumbs thinner to match figma prototype
Calinator444 Nov 25, 2024
0d76ed4
✨ Made breadcrumb default to title of the current page
Calinator444 Nov 25, 2024
95bd400
✨ updated consulting schema to automatically fill out first breadcrum…
Calinator444 Nov 25, 2024
d012a4a
🐛 Fixed consulting page not saving when no blocks are provided
Calinator444 Nov 25, 2024
df42391
🪵 Removed console logging in consultingv2 return
Calinator444 Nov 25, 2024
324be99
💄 Fixed responsive view for breadcrumbs & configured dark mode settings
Calinator444 Nov 26, 2024
e8c198a
🦺 Added contextual editing for final breadcrumb
Calinator444 Nov 26, 2024
359d7e7
✨ Added option to configure breadcrumb url segments
Calinator444 Nov 26, 2024
ebfe88f
Fixed consulting page layout
Calinator444 Nov 26, 2024
9c156fe
Updated tina info fields to be consistent
Calinator444 Nov 26, 2024
8d41dc1
🦺 Applied tina editor feedback from Betty
Calinator444 Nov 26, 2024
a348641
🦺 Made final breadcrumb clickable when empty
Calinator444 Nov 26, 2024
682f5d8
💄 Added validation for final breadcrumb
Calinator444 Nov 26, 2024
bec3f75
💄 Fixed missing bottom side padding for breadcrumb
Calinator444 Nov 26, 2024
c632508
adding in the schema, just some refinements to the color picker left
isaaclombardssw Nov 26, 2024
ae014ba
🐛 Fixed consulting page type inference throwing exception
Calinator444 Nov 26, 2024
42424fd
Update consulting page v2 schema to always populate the last breadcru…
Calinator444 Nov 26, 2024
5797d1c
🦙 committing tina lock file
Calinator444 Nov 26, 2024
15b49f0
Merge branch 'main' into new-consulting-page-breadcrumbs
Calinator444 Nov 26, 2024
b28590c
brought over layout fix from consulting page branch
Calinator444 Nov 26, 2024
4ad5667
🐛 Fixed new consulting pages not being generated
Calinator444 Nov 27, 2024
d0a775e
ironing out the schema implementation (colour picker)
isaaclombardssw Nov 27, 2024
9cd5fa5
🚨 removed unused screen class
Calinator444 Nov 27, 2024
561a373
🚨 Fixed class name order for hero component
Calinator444 Nov 27, 2024
afa0b9c
🚨 Fixed explicit any on new consulting page
Calinator444 Nov 27, 2024
d062341
♻️ Simplified layout on consulting pages
Calinator444 Nov 27, 2024
668586b
💄 Fixed old consulting page missing open sans font
Calinator444 Nov 27, 2024
1cd1b07
🔎 Added seo props to consulting pages
Calinator444 Nov 27, 2024
6dd9572
🔥 Removed commented code inside of consulting page server component
Calinator444 Nov 27, 2024
7ec3cfa
🚨 Fixed linting errors
Calinator444 Nov 27, 2024
8960619
💄 made section padding for consulting 2 smaller on mobile devices
Calinator444 Nov 27, 2024
894bbf5
initial draft of list items subcomponent
isaaclombardssw Nov 27, 2024
b4241b3
merge with main
isaaclombardssw Nov 27, 2024
47d2351
💄 Added padding around breadcrumbs rather than page
Calinator444 Nov 27, 2024
ec03ebe
🚨 Disabled eslint rule about custom tailwind classes
Calinator444 Nov 27, 2024
17418e2
🚚 updated breadcrumb file names to match current tina collection naming
Calinator444 Nov 27, 2024
887708b
🔧 Fixed es lint ignore message
Calinator444 Nov 27, 2024
c313884
🦙 Committing updated tina lock file
Calinator444 Nov 27, 2024
4883c5b
🦙 committing updated lock file
Calinator444 Nov 27, 2024
7d9cf56
Merge branch 'main' into new-consulting-page-breadcrumbs
Calinator444 Nov 28, 2024
6035abf
⬆️ update pnpm lock file
Calinator444 Nov 28, 2024
6d2d8d8
🚨 Fixed casing on "stroke-linecap" property
Calinator444 Nov 28, 2024
a66eeb8
🔥 removed duplicated consulting page information
Calinator444 Nov 28, 2024
e6333a0
🦙 Comitting updated tina lock file
Calinator444 Nov 28, 2024
6d26718
🐛 Fixed some consulting pages not being generated
Calinator444 Nov 28, 2024
4bec39e
🐛 Fixed articlesConnection being initialized for no reason
Calinator444 Nov 28, 2024
0ff85e0
🐛 Fixed some consulting pages not being included in the initial fetch
Calinator444 Nov 28, 2024
3f3271c
✏️ Renamed consulting page params to remove ambiguity
Calinator444 Nov 28, 2024
8e48d6b
💄 Added a prefix for the breadcrumbs component
Calinator444 Nov 28, 2024
a66906c
🦺 Added placeholder value for breadcrumb title
Calinator444 Nov 28, 2024
1754856
✨ Added option to configure home route for breadcrumb component
Calinator444 Nov 28, 2024
6fd9d15
🦙 Updating schema new
Calinator444 Nov 28, 2024
85bd972
adding in the list item and icon label subcomponents, no styling
isaaclombardssw Nov 29, 2024
fa0de41
merge and fix content
isaaclombardssw Nov 29, 2024
5e9999c
updating the image text block features cols condition and adding in t…
isaaclombardssw Nov 29, 2024
6a00974
adding heading and description
isaaclombardssw Nov 29, 2024
84c795e
heading configurable to H1
isaaclombardssw Nov 29, 2024
6a36dc7
🔥 removed on save functionality for breadcrumbs
Calinator444 Nov 29, 2024
6a2a904
adding in some more visual editing
isaaclombardssw Nov 29, 2024
583995b
🎨 Moved Breadcrumb schema to breadcrumbs folder
Calinator444 Nov 29, 2024
fb95373
🐛 Fixed screen flashing white after breadcrumbs are created
Calinator444 Nov 29, 2024
2895e73
creating a new button and moving renaming other buttons (WIP)
isaaclombardssw Nov 29, 2024
916f6bc
improved styling for list component
Calinator444 Nov 29, 2024
8a2a426
merge with consultingv2breadcrumbs
isaaclombardssw Nov 29, 2024
e799413
removing consulting v2 padding, icon label styling
isaaclombardssw Nov 29, 2024
d1819b8
removing the lead capture for now, adding in styling
isaaclombardssw Nov 29, 2024
c34728e
🐛 Fixed ripple animation not working on button
Calinator444 Nov 29, 2024
8d39eea
💄 Updated ripple effect to be black when button is clicked
Calinator444 Nov 29, 2024
cc52703
Merge branch 'image-text-block-component' of https://github.com/SSWCo…
Calinator444 Dec 1, 2024
9e8f4e8
Merge branch 'main' into image-text-block-component
Calinator444 Dec 1, 2024
af6e59e
💄 Updated consulting page button to ripple on mouse enter rather than…
Calinator444 Dec 1, 2024
aaa7d5c
💄Fixed alginment of image text and block buttons
Calinator444 Dec 1, 2024
3d09e93
💄 Updated ripple button with alternate stylign option
Calinator444 Dec 1, 2024
428e91c
💄 Configured image text and block to use button color
Calinator444 Dec 1, 2024
d5d9e2e
🦺 Added default text for image text and block button
Calinator444 Dec 2, 2024
507d658
💄 fixed border expanding around buttons
Calinator444 Dec 2, 2024
6265cad
✏️ Fixed typo in media configuration field
Calinator444 Dec 2, 2024
5c70c23
fixed further typos for mediaConfiguration tina field
Calinator444 Dec 2, 2024
9fd7fc9
Added setting to configure where image in image and text block sits
Calinator444 Dec 2, 2024
d3d08a5
🦺 Updated image text and block to default to right side
Calinator444 Dec 2, 2024
103498c
💄 Updated padding and spacing on buttons
Calinator444 Dec 2, 2024
f900095
💄 Updated image and text block to occupy full page width when image i…
Calinator444 Dec 2, 2024
0f5040a
💄 Fixed missing text when ripple button is in secondary view
Calinator444 Dec 2, 2024
e88ec35
Added developer customizeability for ripple button
Calinator444 Dec 2, 2024
293f4da
📱 Fixed mobile layout for image block and text image
Calinator444 Dec 2, 2024
b336eae
💄 Made text block and image same size on desktop
Calinator444 Dec 2, 2024
a8591c7
Committing missing changes to tailwind config
Calinator444 Dec 2, 2024
d49f9ba
🔗 configured link for button
Calinator444 Dec 2, 2024
8dbfc90
Added option to add icons for ripple button
Calinator444 Dec 2, 2024
a1259d6
Added tina highlighting for button
Calinator444 Dec 2, 2024
8a1bd17
💄 Fixed image alignment in grid layout
Calinator444 Dec 2, 2024
98ebc86
Fixed users being able to place more than one button
Calinator444 Dec 2, 2024
ff2dd2f
removed unused tina field props for buttons
Calinator444 Dec 2, 2024
fa59b8f
removed unused tina field prop for buttons
Calinator444 Dec 2, 2024
1dd3d47
initial commit
isaaclombardssw Dec 2, 2024
05e297d
💄 Added option to change where the button icon is placed
Calinator444 Dec 2, 2024
e7f8177
Updated button row labels to read as button text value
Calinator444 Dec 2, 2024
c6ef554
Added fade in animation for list items
Calinator444 Dec 3, 2024
08c5c52
fixed stacking for image in media block for mobile view
Calinator444 Dec 3, 2024
8a73667
🧪 testing bundle size for icon selector
Calinator444 Dec 3, 2024
a3e9d87
logo carousel implementation
isaaclombardssw Dec 3, 2024
7ff9611
🚨 Fixed liniting errors
Calinator444 Dec 3, 2024
bb2c46c
🏷️ Fixed typing for button element
Calinator444 Dec 3, 2024
11eeb05
💄 Made image in image block and text round
Calinator444 Dec 3, 2024
a55a22b
accordian schema barebones
isaaclombardssw Dec 3, 2024
2f1b4df
✨ Added setting to veritcally centre the image in the media text block
Calinator444 Dec 3, 2024
d50afe0
moved breakpoints for mobile with to tablet width
Calinator444 Dec 3, 2024
649c64c
using the correct ssw black colour and workaround tailwind config imp…
isaaclombardssw Dec 3, 2024
3bcb796
💄 Added fade in animation for text block on scroll
Calinator444 Dec 3, 2024
d1e41be
📱 Fixed mobile layout for image text block
Calinator444 Dec 3, 2024
e571f4a
brought over correct shade of grey for block background
Calinator444 Dec 3, 2024
65e0c5b
Fixed shade of red for color picker
Calinator444 Dec 3, 2024
7c22897
💄 Fixed padding for breadcrumbs
Calinator444 Dec 3, 2024
055cca9
Merge branch 'image-text-block-component' of https://github.com/SSWCo…
isaaclombardssw Dec 3, 2024
1176acd
improvements to editor colour selector, and button responsivity
isaaclombardssw Dec 3, 2024
a974c6e
Merge branch 'image-text-block-component' into logo-carousel
isaaclombardssw Dec 3, 2024
c983bc3
using shared component with image-text block
isaaclombardssw Dec 3, 2024
986a10e
Merge branch 'image-text-block-component' into accordian
isaaclombardssw Dec 3, 2024
ebe62cd
refactoring out common code, updating tailwind config with accordion …
isaaclombardssw Dec 4, 2024
c4f836e
accordion styling to match figma
isaaclombardssw Dec 4, 2024
4e6a08d
finishing touches... single vs multiple open, cleaning up styling, la…
isaaclombardssw Dec 4, 2024
ee6ef9b
fixing classname order
isaaclombardssw Dec 4, 2024
bada4b2
merging
isaaclombardssw Dec 4, 2024
f9a541f
Removed side padding when list item has no icon
Calinator444 Dec 4, 2024
dc50aa2
Merge branch 'image-text-block-component' of https://github.com/SSWCo…
Calinator444 Dec 4, 2024
1b3b18f
fixes to components, adding backgrounds to breadcrumbs
isaaclombardssw Dec 4, 2024
9bcc4a8
removed Tina a tests and audit from tests
Calinator444 Dec 5, 2024
40b7760
updated peer dependencies for eslit
Calinator444 Dec 5, 2024
0a77fdd
Added default values for image and text block
Calinator444 Dec 5, 2024
2a1115d
Configured default values for accordion block
Calinator444 Dec 5, 2024
26533c5
Added default values for the accorion body
Calinator444 Dec 5, 2024
970506e
Fixed default colors not being set for image block and text buttons
Calinator444 Dec 5, 2024
d9dfebc
🦙 Comitting tina lock file
Calinator444 Dec 5, 2024
3f3d8dc
🔥 Deleted accidentally committed sitemaps (they get created on build)
Calinator444 Dec 5, 2024
f8d0f31
configured default values for logo carousel
Calinator444 Dec 5, 2024
891938f
🦙 Committing tina lock file
Calinator444 Dec 5, 2024
fa5d471
Removed empty space when list items do not have icons
Calinator444 Dec 5, 2024
bf85bc0
Updated defaults for breadcrumbs to be consistent with the other comp…
Calinator444 Dec 5, 2024
1f45d03
🎨 Updated schema files to follow similar schema convention
Calinator444 Dec 5, 2024
2fe59a3
reverted changes to alm-tooling.mdx
Calinator444 Dec 5, 2024
6913dcb
🔥 removed unused "french" value
Calinator444 Dec 5, 2024
61b9f51
brought over robots from main
Calinator444 Dec 5, 2024
2b5359c
fixed linter linting tina generated files
Calinator444 Dec 5, 2024
5aad1dc
fixed linting errors that were causing a build error
Calinator444 Dec 5, 2024
cd297aa
testing eslint
babakamyljanovssw Dec 6, 2024
e527a97
removed redundant comments
babakamyljanovssw Dec 6, 2024
b1e17b6
added some exceptional class names
babakamyljanovssw Dec 6, 2024
04a7fd4
escape colon
babakamyljanovssw Dec 6, 2024
2dfc949
added regex
babakamyljanovssw Dec 6, 2024
f07b80a
updated regex
babakamyljanovssw Dec 6, 2024
fcf282a
refactor regex
babakamyljanovssw Dec 6, 2024
b9ce958
Merge branch 'fix-pipeline' of https://github.com/SSWConsulting/SSW.W…
Calinator444 Dec 8, 2024
cb64875
merged against main
Calinator444 Dec 9, 2024
71b1352
fixed linting errors
Calinator444 Dec 9, 2024
6e31f82
added google verification code to consulting page
Calinator444 Dec 9, 2024
1144375
fixed entire consulting page re-rendering on load
Calinator444 Dec 9, 2024
032df28
added lodash
Calinator444 Dec 10, 2024
8dcd593
deleted unused fade-in class
Calinator444 Dec 10, 2024
54b58e6
updated breadcrumbs with advanced schema options
Calinator444 Dec 10, 2024
1735d3d
styling updates to match figma – background colours, layout, spacing
isaaclombardssw Dec 10, 2024
bc18861
fixed block background options
Calinator444 Dec 10, 2024
d6d225b
removed leftside padding when iconLabel has no icon
Calinator444 Dec 10, 2024
e1bc94d
added default values for image and text block
Calinator444 Dec 10, 2024
f514675
added option to fix the image to the bottom
Calinator444 Dec 10, 2024
8e4381c
Updated default text for breadcrumbs to fit lorem ipsum theming
Calinator444 Dec 10, 2024
2f98d51
updated list item schema to use existing file convention
Calinator444 Dec 10, 2024
1048b17
Merge branch 'main' into image-text-block-component
Calinator444 Dec 10, 2024
7689317
updated pnpm lock file
Calinator444 Dec 10, 2024
c238107
checking if element is in the viewport using an intersection observer
Calinator444 Dec 10, 2024
e0270a4
merge with Caleb's animation work
isaaclombardssw Dec 10, 2024
d6d9df8
adding a bottom alignment option (requested by Louis)
isaaclombardssw Dec 10, 2024
0489084
lock file
isaaclombardssw Dec 10, 2024
6b9a139
linting errors
isaaclombardssw Dec 10, 2024
5402e2e
refactor file structure
isaaclombardssw Dec 10, 2024
1c89051
removing the test consulting page
isaaclombardssw Dec 10, 2024
6f028b3
TinaCMS content update
tina-cloud-app[bot] Dec 10, 2024
32bf8de
removing test file
isaaclombardssw Dec 10, 2024
b54857e
updating descriptions and block order
isaaclombardssw Dec 11, 2024
6dc0f8e
toolbar override for accordian
isaaclombardssw Dec 11, 2024
b241ac1
updating toolbar and descriptions
isaaclombardssw Dec 11, 2024
d66de99
flex wrap updates so buttons aren't being cut off
isaaclombardssw Dec 11, 2024
fd80fda
adding background image options
isaaclombardssw Dec 12, 2024
d1ebd92
fix for weird overlay behaviour with bgnd images
isaaclombardssw Dec 12, 2024
36de8cf
Merge branch 'main' into accordian-dupe
isaaclombardssw Dec 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ tina/__generated__
node_modules
dist
public
content
content
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
],
"prettier/prettier": [
"error",
"warn",
{
"endOfLine": "auto",
},
Expand Down
2 changes: 1 addition & 1 deletion app/articles/[filename]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const ArticlePage = ({ props, tinaProps }: ArticlePageProps) => {
{data.articles.subTitle && (
<section
className={classNames(
"prose mx-auto w-full max-w-9xl flex-row px-8 pb-8 prose-h1:my-0 prose-h1:pt-8 prose-h2:mt-8 prose-img:my-0 lg:flex"
"mx-auto w-full max-w-9xl flex-row px-8 pb-8 prose-h1:my-0 prose-h1:pt-8 prose-h2:mt-8 prose-img:my-0"
)}
>
<div data-tina-field={tinaField(data.articles, "subTitle")}>
Expand Down
2 changes: 1 addition & 1 deletion app/articles/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function ArticlesIndexPage({ props, tinaProps }: ArticlesIndexPageProps) {
</Section>
<section
className={classNames(
"prose mx-auto w-full max-w-9xl flex-row px-8 pb-8 prose-h1:my-0 prose-h1:pt-8 prose-h2:mt-8 prose-img:my-0 md:flex"
"mx-auto w-full max-w-9xl flex-row px-8 pb-8 prose-h1:my-0 prose-h1:pt-8 prose-h2:mt-8 prose-img:my-0"
)}
>
{data.articlesIndex._body.children.length > 0 && (
Expand Down
2 changes: 1 addition & 1 deletion app/company/[filename]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function CompanyPage({ tinaProps, props }) {
{data.company.subTitle && (
<section
className={classNames(
"prose mx-auto w-full max-w-9xl flex-row px-8 pb-8 prose-h1:my-0 prose-h1:pt-8 prose-h2:mt-8 prose-img:my-0",
"mx-auto w-full max-w-9xl flex-row px-8 pb-8 prose-h1:my-0 prose-h1:pt-8 prose-h2:mt-8 prose-img:my-0",
data.company.fullWidthBody ? "" : "md:flex"
)}
>
Expand Down
56 changes: 32 additions & 24 deletions app/consulting/[filename]/consulting2.tsx
Original file line number Diff line number Diff line change
@@ -1,43 +1,51 @@
"use client";

import { Blocks } from "@/components/blocks-renderer";
import { PreFooter } from "@/components/layout/footer/pre-footer";
import { SectionColor } from "@/components/util/constants/styles";
import { Container } from "@/components/util/container";
import { Section } from "@/components/util/section";
import { Consultingv2Query } from "@/tina/types";
import _ from "lodash";
import React from "react";

type ConsultingV2PageProps<T> = {
tinaProps: {
data: Consultingv2Query;
query: string;
variables: object;
};
props: T;
};

export default function ConsultingV2({
tinaProps,
}: ConsultingV2PageProps<object>) {
const { data } = tinaProps;

return (
<>
<div className="dark flex h-full flex-col">
<Section color={SectionColor.ToggleLightMode}>
<Container width="custom" size="small" className="w-full sm:py-12">
<div className="w-full">
{data.consultingv2.blocks ? (
const ConsultingV2 = React.memo(
function ConsultingV2({ tinaProps }: ConsultingV2PageProps<object>) {
const { data } = tinaProps;
return (
<>
{}
<div className="dark flex h-full flex-col">
<Section color={SectionColor.ToggleLightMode}>
<Container
size="custom"
width="custom"
padding="custom"
className="w-full p-0"
>
<div className="w-full">
<Blocks
prefix={"Consultingv2Blocks"}
blocks={data.consultingv2.blocks}
/>
) : (
<></>
)}
</div>
</Container>
</Section>
<PreFooter />
</div>
</>
);
}
</div>
</Container>
</Section>
<PreFooter />
</div>
</>
);
},
(prevProps, nextProps) => {
return _.isEqual(prevProps.tinaProps.data, nextProps.tinaProps.data);
}
);
export default ConsultingV2;
6 changes: 3 additions & 3 deletions app/consulting/[filename]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { MediaCardProps } from "@/components/consulting/mediaCard/mediaCard";
import { getRandomTestimonialsByCategory } from "@/helpers/getTestimonials";
import { useSEO } from "@/hooks/useSeo";
import client from "@/tina/client";
import "aos/dist/aos.css"; // This is important to keep the animation
import { TODAY } from "hooks/useFetchEvents";
import { useSEO } from "hooks/useSeo";
import { Metadata } from "next";
import { Open_Sans } from "next/font/google";
import { TinaClient } from "../../tina-client";
Expand Down Expand Up @@ -189,9 +189,9 @@ export async function generateMetadata({
}

// eslint-disable-next-line react-hooks/rules-of-hooks
const { seoProps } = useSEO(seo);
const seoData = useSEO(seo);

return { ...seoProps };
return seoData ? { ...seoData.seoProps } : {};
}

export default async function Consulting({
Expand Down
2 changes: 1 addition & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const inter = Inter({
variable: "--inter-font",
subsets: ["latin"],
display: "swap",
weight: ["300", "400", "600", "700"],
weight: ["300", "400", "500", "600", "700"],
});

const ChatBaseBot = dynamic(
Expand Down
19 changes: 19 additions & 0 deletions components/blocks-renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ const LatestTech = dynamic(() =>

import { EventBooking } from "./training/eventBooking";

const AccordionBlock = dynamic(() =>
import("./blocks/imageComponents/accordionBlock/accordionBlock").then(
(mod) => mod.AccordionBlock
)
);

const Breadcrumbs = dynamic(() =>
import("./blocks/breadcrumbs/breadcrumbs").then((mod) => mod.Breadcrumbs)
);
Expand Down Expand Up @@ -118,6 +124,16 @@ const TrainingLearningOutcome = dynamic(() =>
)
);

const LogoCarousel = dynamic(() =>
import("./blocks/logoCarousel/logoCarousel").then((mod) => mod.LogoCarousel)
);

const ImageTextBlock = dynamic(() =>
import("./blocks/imageComponents/imageTextBlock/imageTextBlock").then(
(mod) => mod.ImageTextBlock
)
);

const componentMap = {
AboutUs,
Carousel,
Expand Down Expand Up @@ -150,6 +166,9 @@ const componentMap = {
GridLayout,
FixedColumns,
HorizontalCard,
LogoCarousel,
ImageTextBlock,
AccordionBlock,
};

export const Blocks = ({ prefix, blocks }) => {
Expand Down
2 changes: 1 addition & 1 deletion components/blocks/CustomDownloadButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FaFileDownload } from "react-icons/fa";
import { Template } from "tinacms";
import Button from "../button/button";
import Button from "../button/rippleButton";
import { CustomLink } from "../customLink";

export const CustomDownloadButton = ({ data }) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import Link from "next/link";
import React from "react";
import { Button, Input, Template, wrapFieldsWithMeta } from "tinacms";
import { TinaInfo } from "../../../components/tina/tina-info";
import { backgroundSchema } from "../../../components/layout/v2ComponentWrapper";
import { TinaInfo } from "../../tina/tina-info";

export const BreadcrumbSchema: Template = {
name: "breadcrumbs",
label: "Breadcrumbs",
label: "<V2> Breadcrumbs",
ui: {
previewSrc: "/images/thumbs/tina/breadcrumbs.jpg",
},
fields: [
//@ts-expect-error – custom component typing won't be pinned down
backgroundSchema,
{
type: "string",
label: "Final Breadcrumb",
Expand Down
41 changes: 21 additions & 20 deletions components/blocks/breadcrumbs/breadcrumbs.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client";

import V2ComponentWrapper from "@/components/layout/v2ComponentWrapper";
import {
Breadcrumb,
BreadcrumbEllipsis,
Expand Down Expand Up @@ -28,9 +29,7 @@ function getLinks(
data: Consultingv2BlocksBreadcrumbs,
finalNode?: string
): React.ReactNode[] {
const french = false;

const placeholder = french ? "{{ TITRE DE LA PAGE }}" : "{{ PAGE TITLE }}";
const placeholder = "Lorem Ipsum";
const initialTitle = global.breadcrumbHomeRoute;

// Replace paths with character replacements
Expand Down Expand Up @@ -105,23 +104,25 @@ export function Breadcrumbs({ data }: { data: Consultingv2BlocksBreadcrumbs }) {
const links = getLinks(paths, data, data.finalBreadcrumb);

return (
<Container size="custom">
<Breadcrumb>
<BreadcrumbList>
{links.map((link, index) => (
// react fragments don't appear in the dom
<React.Fragment key={`breadcrumb-${index}`}>
{index !== 0 ? (
<BreadcrumbSeparator>
<Separator />
</BreadcrumbSeparator>
) : null}
<BreadcrumbItem>{link}</BreadcrumbItem>
</React.Fragment>
))}
</BreadcrumbList>
</Breadcrumb>
</Container>
<V2ComponentWrapper data={data}>
<Container size="custom" className="pt-8 sm:pt-12">
<Breadcrumb className="text-gray-300">
<BreadcrumbList>
{links.map((link, index) => (
// react fragments don't appear in the dom
<React.Fragment key={`breadcrumb-${index}`}>
{index !== 0 ? (
<BreadcrumbSeparator>
<Separator />
</BreadcrumbSeparator>
) : null}
<BreadcrumbItem>{link}</BreadcrumbItem>
</React.Fragment>
))}
</BreadcrumbList>
</Breadcrumb>
</Container>
</V2ComponentWrapper>
);
}

Expand Down
2 changes: 1 addition & 1 deletion components/blocks/fixedTabsLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useEffect, useState } from "react";
import type { Template } from "tinacms";
import { TinaMarkdown } from "tinacms/dist/rich-text";
import { bookingButtonSchema } from "../bookingButton/bookingButton";
import Button from "../button/button";
import Button from "../button/rippleButton";
import { customImageBlockSchema } from "./customImage";
import { expertBlockSchema } from "./expertBlock";
import { componentRenderer } from "./mdxComponentRenderer";
Expand Down
66 changes: 66 additions & 0 deletions components/blocks/imageComponents/ImageComponentLayout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
"use client";
import { Container } from "@/components/util/container";
import "aos/dist/aos.css";
import Image from "next/image";
import { classNames } from "tinacms";
import { tinaField } from "tinacms/dist/react";
import V2ComponentWrapper from "../../layout/v2ComponentWrapper";

export const ImageComponentLayout = ({ data, children }) => {
const imageIsLeftAligined = data.mediaConfiguration?.placement === "Left";

return (
<V2ComponentWrapper data={data}>
<Container
size="custom"
className={classNames(
"mx-auto flex flex-col gap-8 align-middle md:grid md:gap-16",
data.mediaConfiguration?.imageSource
? "md:grid-cols-2"
: "md:grid-cols-1",
data.mediaConfiguration?.mobilePlacement === "Above"
? "flex-col-reverse"
: "flex-col",
data.mediaConfiguration?.verticalPlacement === "Bottom"
? "pt-12"
: "py-12"
)}
>
<div
className={classNames(
`flex aspect-auto w-full flex-col justify-center ${data?.mediaConfiguration?.imageSource ? "md:aspect-4/3" : "items-center"}`,
imageIsLeftAligined && "md:order-2",
data.mediaConfiguration?.verticalPlacement === "Bottom" && "pb-12"
)}
>
{children}
</div>

{data.mediaConfiguration?.imageSource && (
<div
className={classNames(
"relative aspect-4/3 w-full md:aspect-auto",
imageIsLeftAligined && "md:order-1"
)}
>
{data.mediaConfiguration.verticalPlacement === "Center"}
<Image
objectFit="contain"
fill={true}
className={classNames(
data.mediaConfiguration?.verticalPlacement === "Centered" &&
"my-auto",
data.mediaConfiguration?.verticalPlacement === "Bottom" &&
"mt-auto",
"!h-auto rounded-md"
)}
src={data.mediaConfiguration?.imageSource}
alt={data.mediaConfiguration?.altText ?? "image"}
data-tina-field={tinaField(data, "mediaConfiguration")}
/>
</div>
)}
</Container>
</V2ComponentWrapper>
);
};
Loading
Loading