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

Logo - Adding FireBootCamp page #2324

Merged
merged 10 commits into from
Mar 19, 2024
2 changes: 1 addition & 1 deletion .tina/__generated__/_graphql.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .tina/__generated__/_schema.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions components/blocks-renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { ClientLogos } from "./blocks/clientLogos";
import { Content } from "./blocks/content";
import { ContentCard } from "./blocks/contentCard";
import { CustomImage } from "./blocks/customImage";
import { FixedColumns } from "./blocks/fixedColumns";
import { JotFormEmbed } from "./blocks/jotFormEmbed";
import { ServiceCards } from "./blocks/serviceCards";
import { TableLayout } from "./blocks/tableLayout";
Expand Down Expand Up @@ -94,6 +95,7 @@ const componentMap = {
ColorBlock,
DownloadBlock,
GridLayout,
FixedColumns,
};

export const Blocks = ({ prefix, blocks }) => {
Expand Down
9 changes: 7 additions & 2 deletions components/blocks/customImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import classNames from "classnames";
import Image from "next/image";
import type { Template } from "tinacms";
import { CustomLink } from "../customLink";
import { customClasses } from "../util/constants";

type textColor = "text-white" | "text-sswBlack";
type alignment = "items-start" | "items-center" | "items-end";
Expand All @@ -13,7 +14,7 @@ export type CustomImageProps = {
height?: number;
width?: number;
link?: string;
customClass?: string;
customClass?: string | keyof typeof customClasses;
caption?: string;
captionColor?: textColor;
sizes?: string;
Expand All @@ -35,7 +36,10 @@ export const CustomImage = ({ data }: { data: CustomImageProps }) => {
alt={data.altText}
height={data.height || 400}
width={data.width || 400}
className={classNames("inline-block", data.customClass ?? "")}
className={classNames(
"inline-block",
(customClasses[data.customClass] || data.customClass) ?? ""
)}
sizes={data.sizes}
/>
{data.caption && (
Expand Down Expand Up @@ -112,6 +116,7 @@ export const customImageBlockSchema: Template = {
type: "string",
label: "Custom Class (optional)",
name: "customClass",
options: Object.keys(customClasses),
required: false,
},
{
Expand Down
2 changes: 2 additions & 0 deletions components/blocks/downloadBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ const bgOptions = {
black: "bg-sswBlack",
grey: "bg-gray-100",
white: "bg-white",
darkgrey: "bg-gray-650",
darkgreen: "bg-[#3a4b49]",
};

export const DownloadBlock = (data: DownloadBlockProps) => {
Expand Down
39 changes: 26 additions & 13 deletions components/blocks/fixedColumns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,47 @@ import { componentRenderer } from "./mdxComponentRenderer";

interface FixedColumnsProps {
data: {
headerSection?: TinaMarkdownContent;
firstColBody: TinaMarkdownContent;
secondColBody: TinaMarkdownContent;
};
}

export const FixedColumns = ({ data }: FixedColumnsProps) => {
return (
<div className="grid md:grid-cols-2 md:gap-6">
<div>
<TinaMarkdown
content={data.firstColBody}
components={componentRenderer}
/>
<>
{data.headerSection && (
<h3 className="py-4">
<TinaMarkdown content={data.headerSection} />
</h3>
)}
<div className="grid md:grid-cols-2 md:gap-6">
<div>
<TinaMarkdown
content={data.firstColBody}
components={componentRenderer}
/>
</div>
<div>
<TinaMarkdown
content={data.secondColBody}
components={componentRenderer}
/>
</div>
</div>
<div>
<TinaMarkdown
content={data.secondColBody}
components={componentRenderer}
/>
</div>
</div>
</>
);
};

export const fixedColumnsSchema: Template = {
name: "FixedColumns",
label: "Fixed Column Layout (2 columns)",
fields: [
{
type: "rich-text",
label: "Header Section (Optional)",
name: "headerSection",
},
{
type: "rich-text",
label: "First column text",
Expand Down
6 changes: 6 additions & 0 deletions components/util/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,9 @@ export const sswColors = {
"#AAAAAA": "bg-ssw-gray-light",
"#797979": "bg-ssw-gray",
};

export const customClasses = {
none: "",
"Only mobile top margin (mt-6)": "mt-6 md:mt-0",
"Top margin (mt-6)": "mt-6",
};
44 changes: 44 additions & 0 deletions content/logo/firebootcamp.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
seo:
title: FireBootCamp Logo
showBreadcrumb: true
header: FireBootCamp Logo
subHeader: "If you have any queries please\_[contact SSW.](/company/contact-us)\n"
_body:
- title: Download
downloads:
- header: Dev SuperPowers Tour
img: /images/company-logos/FireBootCamp_DSP_preview.png
imgBackground: darkgrey
firstLink: /images/company-logos/downloads/images/FireBootCamp_DSP_BW.png
- header: Hands On Workshop
img: /images/company-logos/FireBootCamp_HW_preview.png
imgBackground: darkgreen
firstLink: /images/company-logos/downloads/images/FireBootCamp_HW_BW.png
_template: DownloadBlock
- headerSection: FireBootCamp Banners
firstColBody: >
<CustomImage src="/images/SuperPower-Banner-Master-Angular.jpg"
altText="Angular Superpowers " height={400} width={700}
alignment="items-end" />


<CustomImage
src="/images/company-logos/SuperPower-Banner-Master-Azure.jpg" width={700}
alignment="items-end" height={400} altText="Azure Superpowers "
customClass="Top margin (mt-6)" />
secondColBody: >
<CustomImage
src="/images/company-logos/SuperPower-Banner-Master-NetCore.jpg"
altText="Dotnet SuperPowers" alignment="items-start" height={400}
width={700} customClass="Only mobile top margin (mt-6)" />


<CustomImage
src="/images/company-logos/SuperPower-Banner-Master-Ionic.jpg"
altText="Icon Lunch " alignment="items-start" height={400} width={700}
customClass="Top margin (mt-6)" />
_template: FixedColumns
footer: ''
---

6 changes: 3 additions & 3 deletions content/logo/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,19 @@ _body:
linkContent: >
<UtilityButton buttonText="LOGO OPTIONS" size="small"
btnIcon="BsArrowRightCircle" removeTopMargin={true}
link="https://www.ssw.com.au/ssw/logo/FireBootCamp" />
link="/logo/firebootcamp" />
- title: Angular Hackday
image: /images/company-logos/AngularHackDay_preview.png
linkContent: >
<UtilityButton buttonText="LOGO OPTIONS" size="small"
btnIcon="BsArrowRightCircle" removeTopMargin={true}
link="https://www.ssw.com.au/ssw/logo/AngularHackDay" />
link="/logo/angular-hackday" />
- title: AI Hackday
image: /images/company-logos/AIHackDay_preview.png
linkContent: >
<UtilityButton buttonText="LOGO OPTIONS" size="small"
btnIcon="BsArrowRightCircle" removeTopMargin={true}
link="https://www.ssw.com.au/ssw/logo/AIHackDay" />
link="/logo/ai-hackday" />
- title: MAUI Hackday
image: /images/company-logos/MAUIHackDay_preview.png
linkContent: >
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading