Skip to content

Commit

Permalink
📒 SSW Articles - add contact us form (#2964)
Browse files Browse the repository at this point in the history
* feat: added contact us section for articles

* bump tina lock file

---------

Co-authored-by: igorgoldobin <[email protected]>
  • Loading branch information
fenix2222 and igorgoldobin authored Sep 4, 2024
1 parent c49f244 commit dd3e3cc
Show file tree
Hide file tree
Showing 96 changed files with 1,110 additions and 392 deletions.
12 changes: 5 additions & 7 deletions components/blocks/fixedTabsLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
"use client";

import { TinaMarkdown } from "tinacms/dist/rich-text";
import Button from "../button/button";
import { componentRenderer } from "./mdxComponentRenderer";
import { videoEmbedBlockSchema } from "./videoEmbed";

import classNames from "classnames";
import { useEffect, useState } from "react";
import type { Template } from "tinacms";

import classNames from "classnames";
import { TinaMarkdown } from "tinacms/dist/rich-text";
import { bookingButtonSchema } from "../bookingButton/bookingButton";
import Button from "../button/button";
import { customImageBlockSchema } from "./customImage";
import { expertBlockSchema } from "./expertBlock";
import { componentRenderer } from "./mdxComponentRenderer";
import { videoEmbedBlockSchema } from "./videoEmbed";
import { youtubePlayListBlockSchema } from "./youtubePlaylist";

const fixedTabsBlocks: Template[] = [
Expand Down
65 changes: 38 additions & 27 deletions components/bookingButton/bookingButton.tsx
Original file line number Diff line number Diff line change
@@ -1,43 +1,44 @@
import type { Template } from "tinacms";
import {
default as defaultSetting,
default as layoutData,
} from "../../content/global/index.json";
import globals from "../../content/global/index.json";
import { JotFormEmbed, JotFormEmbedProps } from "../blocks/jotFormEmbed";

const DEFAULT_SUBTITLE = `or call ${globals.bookingPhone}`;
export interface BookingButtonProps {
buttonText?: string;
containerClass?: string;
buttonClass?: string;
hideCallUs?: boolean;
animated?: boolean;
data?: {
buttonText?: string;
containerClass?: string;
buttonClass?: string;
hideCallUs?: boolean;
buttonSubtitle?: string;
tinaField?: string;
animated?: boolean;
};
}

export const BookingButton = ({ data }) => {
const {
containerClass,
buttonClass,
buttonText,
hideCallUs,
animated = true,
}: BookingButtonProps = data;

const bookingPhone = layoutData.bookingPhone;

export const BookingButton: React.FC<BookingButtonProps | undefined> = ({
data = undefined,
}) => {
const buttonText = data?.buttonText ?? globals.bookingButtonText;
const buttonSubtitle = data?.buttonSubtitle ?? DEFAULT_SUBTITLE;
const hideCallUs = data?.hideCallUs ?? false;
const dataTinaField = data?.tinaField || undefined;
const animated = data?.animated ?? true;
const jotFormBookingForm: JotFormEmbedProps = {
jotFormId: defaultSetting.bookingJotFormId,
containerClass: containerClass,
buttonClass: buttonClass,
jotFormId: globals.bookingJotFormId,
containerClass: data?.containerClass || "",
buttonClass: data?.buttonClass || "",
buttonText: buttonText,
animated: animated,
};
//Create lead - JotForm Doc - https://sswcom.sharepoint.com/sites/SSWDevelopers/_layouts/15/doc.aspx?sourcedoc={45a11067-ef82-4dce-9b43-20812631a184}&action=edit
return (
<>
<JotFormEmbed {...jotFormBookingForm}>
{!hideCallUs && (
<h2 className="mx-auto max-w-full text-center">
or call {bookingPhone}
{!hideCallUs && buttonSubtitle && (
<h2
data-tina-field={dataTinaField}
className="mx-auto max-w-full text-center"
>
{buttonSubtitle}
</h2>
)}
</JotFormEmbed>
Expand All @@ -50,6 +51,11 @@ export const bookingButtonSchema: Template = {
label: "Booking Button",
ui: {
previewSrc: "/images/thumbs/tina/booking-button.jpg",
defaultItem: {
buttonText: globals.bookingButtonText,
buttonSubtitle: DEFAULT_SUBTITLE,
animated: true,
},
itemProps: (item) => ({ label: item?.btnText }),
},
fields: [
Expand All @@ -64,5 +70,10 @@ export const bookingButtonSchema: Template = {
label: "Animated",
name: "animated",
},
{
type: "string",
label: "Button Subtitle",
name: "buttonSubtitle",
},
],
};
77 changes: 77 additions & 0 deletions components/callToAction/callToAction.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import { BookingButton } from "../blocks";
import { bookingButtonSchema } from "../bookingButton/bookingButton";
import { Container } from "../util/container";
import { Section } from "../util/section";

export const callToActionSchema = {
name: "callToAction",
label: "Call to Action",
description: "The call to action button for contacting SSW",
type: "object",
fields: [
{
type: "string",
label: "Sub Title",
name: "subTitle",
},
{
type: "boolean",
label: "Show Call to Action",
name: "showCallToAction",
},
...bookingButtonSchema.fields,
],
};

type CallToActionProps = {
tinaFields: {
subTitle: string;
buttonSubtitle: string;
};
animated: boolean;
subTitle: string;
buttonText: string;
buttonSubtitle: string;
children: React.ReactNode;
};
export const CallToAction: React.FC<CallToActionProps> = ({
tinaFields,
animated,
subTitle,
buttonText,
buttonSubtitle,
children,
}) => {
return (
<Section className="!bg-gray-75 pb-25 text-center">
<Container size="custom" className="w-full">
{children}
{subTitle && (
<p
data-tina-field={tinaFields.subTitle}
className="mx-auto w-fit text-lg"
>
{subTitle}
</p>
)}
<BookingButton
data={{
animated: animated,
buttonText: buttonText,
buttonSubtitle: buttonSubtitle,
tinaField: tinaFields.buttonSubtitle,
}}
/>
</Container>
</Section>
);
};

export const callToActionDefaults = {
callToAction: {
title: "Talk to us about your project",
subTitle: "Connect with our Account Managers to discuss how we can help.",
showCallToAction: true,
...bookingButtonSchema?.ui.defaultItem,
},
};
18 changes: 15 additions & 3 deletions components/sidebar/sidebarPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,35 @@
"use client";

import { classNames } from "tinacms";

type SidebarPanelProps = {
title?: string;

tinaFields: {
title: string;
description: string;
};
description: string;
actionUrl?: string;
actionText?: string;
};

const SidebarPanel = ({
title,
description,
tinaFields,
actionUrl,
actionText,
}: SidebarPanelProps) => {
return (
<>
<div className="border-2 bg-gray-100 p-5">
{title && <strong>{title}</strong>}
<p className="pt-5">{description}</p>
{title && <strong data-tina-field={tinaFields.title}>{title}</strong>}
<p
data-tina-field={tinaFields.description}
className={classNames("pt-5", "w-f")}
>
{description}
</p>
{actionUrl && (
<div className="flex justify-center pt-5">
<a
Expand Down
8 changes: 8 additions & 0 deletions components/util/sidebarPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ export const sidebarPanelSchema = {
component: TextInputWithCount(500, true),
},
},
{
type: "boolean",
name: "showSidebarPanel",
label: "Show Sidebar Panel",
description:
"Disable this if you don't want the sidebar for this article",
required: false,
},
{
type: "string",
label: "Action URL",
Expand Down
26 changes: 16 additions & 10 deletions content/articles/advantages-of-net8.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ articleAuthor:
authorName: Adam Cogan
authorPosition: Chief Architect
authorImage: /images/articles/2024-07-13_12-01-05.png
fullWidthBody: false
hideSidebarOnMobile: false
showSidebarPanel: true
historyCards:
- year: 2020
title: thing
location: Australia
description: |
asdadasd
seo:
title: Why CTOs are Choosing .NET 8 for Modern App Development
description: >+
Expand Down Expand Up @@ -153,22 +162,19 @@ subTitle: >
to consider .NET 8 for their app development needs, backed by detailed
guidelines and expert experiences.
author: content/presenters/adam-cogan.mdx
fullWidthBody: false
hideSidebarOnMobile: false
showSidebarPanel: true

callToAction:
title: Talk to us about your project
subTitle: Connect with our Account Managers to discuss how we can help.
showCallToAction: true
buttonText: Book a FREE Initial Meeting
animated: true
buttonSubtitle: or call +61 2 9953 3000
sidebarPanel:
title: 2-Day Pre-Migration Assessment Engagement
description: >-
Get a solid foundation for your .NET 8 migration project, ensuring you are
well-prepared to tackle the migration with confidence.
actionUrl: 'https://www.ssw.com.au'
actionText: Learn more
historyCards:
- year: 2020
title: thing
location: Australia
description: |
asdadasd
---

14 changes: 14 additions & 0 deletions content/articles/rename-lama-3-1-a-new-era.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
---
bookingButton:
title: Talk to us about your project
subTitle: Connect with our Account Managers to discuss how we can help.
showContactForm: true
buttonText: Book a FREE Initial Meeting
animated: true
buttonSubtitle: or call +61 2 9953 3000
seo:
title: Llama 3.1 launched. Amazing!
description: >-
Expand Down Expand Up @@ -134,5 +141,12 @@ sidebarPanel:
competitive advantage and business growth.
actionUrl: 'https://www.ssw.com.au/company/contact-us'
actionText: Contact us to learn more about AI
callToAction:
title: Talk to us about your project
subTitle: Connect with our Account Managers to discuss how we can help.
showCallToAction: true
buttonText: Book a FREE Initial Meeting
animated: true
buttonSubtitle: or call +61 2 9953 3000
---

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
showSidebarPanel: true
seo:
title: Why Upgrading to .NET 8 is Crucial for Your App's Future | SSW
description: >-
Expand Down Expand Up @@ -151,7 +152,13 @@ subTitle: >
still contemplating, it's time to make the leap. Your app's future depends on
it.
author: content/presenters/matt-goldman.mdx
showSidebarPanel: true
callToAction:
title: Talk to us about your project
subTitle: Connect with our Account Managers to discuss how we can help.
showCallToAction: true
buttonText: Book a FREE Initial Meeting
animated: true
buttonSubtitle: or call +61 2 9953 3000
sidebarPanel:
title: '.NET Application Modernisation: 3-day Assessment'
description: >-
Expand Down
34 changes: 20 additions & 14 deletions content/consulting/access-database-upsizing.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
---
type: consulting
description: null
seo:
title: Enterprise Development and Consulting for Access Upsizing
description: >-
Need a solution for Microsoft Access? SSW Consulting's expert migration
services can upsize your Access database to SQL Server for a more reliable
platform.
images:
- url: /images/consulting/open-graph/access.jpg
width: 1200
height: 629
alt: SSW Microsoft Access Consulting - Enterprise Software Development
booking:
title: Need help with with your <span class="text-sswRed">databases</span>?
subTitle: We can upsize your Microsoft Access database
videoBackground: /images/videos/MVC_background.mp4
solution:
project: Access
callToAction:
subTitle: Connect with our Account Managers to discuss how we can help.
showCallToAction: true
buttonText: Book a FREE Initial Meeting
animated: true
buttonSubtitle: or call +61 2 9953 3000
title: 'Lets find a solution to your {{TITLE}} issues'
benefits:
benefitList:
- image: /images/benefits/no-corruption.png
Expand Down Expand Up @@ -35,20 +55,6 @@ technologies:
technologyCards:
- technologyCard: content/technologies/ms-sql-server.mdx
- technologyCard: content/technologies/ms-access.mdx
solution:
project: Access
callToAction: 'Let''s find a solution to your {{TITLE}} issues'
seo:
title: Enterprise Development and Consulting for Access Upsizing
description: >-
Need a solution for Microsoft Access? SSW Consulting's expert migration
services can upsize your Access database to SQL Server for a more reliable
platform.
images:
- url: /images/consulting/open-graph/access.jpg
width: 1200
height: 629
alt: SSW Microsoft Access Consulting - Enterprise Software Development
---

<VideoEmbed url="https://www.youtube.com/watch?v=ebRQ-FWSIv4" caption="Microsoft Access Consulting" duration="3 mins" />
Expand Down
Loading

0 comments on commit dd3e3cc

Please sign in to comment.